From ad70f6656206677fede1be831446ba0f0f052efb Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Fri, 29 Mar 2024 15:44:00 -0400 Subject: [PATCH 01/27] version updated to 0.31.2-dev --- README.md | 2 +- example/macos/Podfile.lock | 22 ----- example/pubspec.lock | 2 +- ios/bdk_flutter.podspec | 2 +- macos/bdk_flutter.podspec | 2 +- makefile | 2 +- pubspec.yaml | 6 +- rust/Cargo.lock | 179 ++++++++++++++++++++----------------- rust/Cargo.toml | 8 +- 9 files changed, 111 insertions(+), 114 deletions(-) delete mode 100644 example/macos/Podfile.lock diff --git a/README.md b/README.md index d8c9e5c5..c8383c4e 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.1-dev + bdk_flutter: ^0.31.2-dev ``` ### Examples diff --git a/example/macos/Podfile.lock b/example/macos/Podfile.lock deleted file mode 100644 index 4f1e82f9..00000000 --- a/example/macos/Podfile.lock +++ /dev/null @@ -1,22 +0,0 @@ -PODS: - - bdk_flutter (0.31.1-dev): - - 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: 22cd6fbac0aed9857319da174d227539ddfc5f4c - FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 - -PODFILE CHECKSUM: 6acf97521436d16fc31cd5e1a02000905acdb3ae - -COCOAPODS: 1.14.3 diff --git a/example/pubspec.lock b/example/pubspec.lock index 617a7a6d..6599079d 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -39,7 +39,7 @@ packages: path: ".." relative: true source: path - version: "0.31.1-dev" + version: "0.31.2-dev" boolean_selector: dependency: transitive description: diff --git a/ios/bdk_flutter.podspec b/ios/bdk_flutter.podspec index c8a0a71c..06378f72 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.1-dev" + s.version = "0.31.2-dev" s.summary = 'A Flutter library for the Bitcoin Development Kit (https://bitcoindevkit.org/)' s.description = <<-DESC A new Flutter plugin project. diff --git a/macos/bdk_flutter.podspec b/macos/bdk_flutter.podspec index d7bf194d..1fecb16e 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.1-dev" + s.version = "0.31.2-dev" s.summary = 'A Flutter library for the Bitcoin Development Kit (https://bitcoindevkit.org/)' s.description = <<-DESC A new Flutter plugin project. diff --git a/makefile b/makefile index ad60a8f7..4b57e21b 100644 --- a/makefile +++ b/makefile @@ -11,7 +11,7 @@ help: makefile ## init: Install missing dependencies. init: - cargo install 'flutter_rust_bridge_codegen@^2.0.0-dev.28' + cargo install 'flutter_rust_bridge_codegen@^2.0.0-dev.31' ## : all: init generate-bindings diff --git a/pubspec.yaml b/pubspec.yaml index 6fce732f..0e4a22c0 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.1-dev +version: 0.31.2-dev homepage: https://github.com/LtbLightning/bdk-flutter environment: @@ -10,7 +10,7 @@ environment: dependencies: flutter: sdk: flutter - flutter_rust_bridge: ">2.0.0-dev.25 <= 2.0.0-dev.28" + flutter_rust_bridge: ">2.0.0-dev.30 <= 2.0.0-dev.31" ffi: ^2.0.1 freezed_annotation: ^2.2.0 mockito: ^5.4.0 @@ -34,4 +34,4 @@ flutter: ios: ffiPlugin: true macos: - ffiPlugin: true + ffiPlugin: true \ No newline at end of file diff --git a/rust/Cargo.lock b/rust/Cargo.lock index d5977827..7a367368 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -62,9 +62,9 @@ dependencies = [ [[package]] name = "allocator-api2" -version = "0.2.16" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "android-tzdata" @@ -149,9 +149,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.81" +version = "1.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" +checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" dependencies = [ "backtrace", ] @@ -164,13 +164,13 @@ checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" [[package]] name = "async-trait" -version = "0.1.79" +version = "0.1.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507401cad91ec6a857ed5513a2073c82a9b9048762b885bb98655b306964681" +checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.59", ] [[package]] @@ -262,7 +262,7 @@ dependencies = [ [[package]] name = "bdk_flutter" -version = "0.31.1-dev" +version = "0.31.2-dev" dependencies = [ "anyhow", "assert_matches", @@ -355,9 +355,9 @@ checksum = "832133bbabbbaa9fbdba793456a2827627a7d2b8fb96032fa1e7666d7895832b" [[package]] name = "bumpalo" -version = "3.15.4" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytemuck" @@ -432,9 +432,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.90" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" +checksum = "17f6e324229dc011159fcc089755d1e2e216a90d43a7dea6853ca740b84f35e7" [[package]] name = "cfg-if" @@ -444,16 +444,16 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.37" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a0d04d43504c61aa6c7531f1871dd0d418d91130162063b789da00fd7057a5e" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "wasm-bindgen", - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] @@ -487,7 +487,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.59", ] [[package]] @@ -647,7 +647,7 @@ checksum = "51aac4c99b2e6775164b412ea33ae8441b2fde2dbf05a20bc0052a63d08c475b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.59", ] [[package]] @@ -663,9 +663,9 @@ dependencies = [ [[package]] name = "either" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" +checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" [[package]] name = "electrum-client" @@ -709,19 +709,19 @@ checksum = "03cdc46ec28bd728e67540c528013c6a10eb69a02eb31078a1bda695438cbfb8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.59", ] [[package]] name = "enum_dispatch" -version = "0.3.12" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f33313078bb8d4d05a2733a94ac4c2d8a0df9a2b84424ebf4f33bfc224a890e" +checksum = "aa18ce2bc66555b3218614519ac839ddb759a7d6720732f979ef8d13be147ecd" dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.59", ] [[package]] @@ -816,9 +816,9 @@ dependencies = [ [[package]] name = "flutter_rust_bridge" -version = "2.0.0-dev.28" +version = "2.0.0-dev.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce0ad7ece8037d2e85f53413c5cc1e6b33b56ff63fc0a530c08eec7c4b8b3f26" +checksum = "9d9ceb6f8db0bf711a55e20151c6699132bb5975f846ecac2c3bc7d23cc0845d" dependencies = [ "allo-isolate", "android_logger", @@ -843,9 +843,9 @@ dependencies = [ [[package]] name = "flutter_rust_bridge_codegen" -version = "2.0.0-dev.28" +version = "2.0.0-dev.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e7121d658626cf3921aa75de2cae9f77814b4317a1353e7be7c6be8d656cf01" +checksum = "fb089f0e86a6873eb9538ee5dea459e9bb029feeb6777ecf1f996c805451a507" dependencies = [ "anyhow", "atty", @@ -860,6 +860,7 @@ dependencies = [ "enum_dispatch", "fern", "glob", + "hex", "include_dir", "indicatif", "indicatif-log-bridge", @@ -879,7 +880,7 @@ dependencies = [ "serial_test", "strum", "strum_macros", - "syn 2.0.55", + "syn 2.0.59", "tempfile", "toml 0.5.11", "topological-sort", @@ -887,9 +888,14 @@ dependencies = [ [[package]] name = "flutter_rust_bridge_macros" -version = "2.0.0-dev.28" +version = "2.0.0-dev.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5844c71d6ea7f6023838838e6d01aeeef41920abc8e628ca24bac19d09c8fea6" +checksum = "e02edfe56f04af804d3145b17dfe7820d46a6753b214160f227dbdfa1073f7cb" +dependencies = [ + "hex", + "quote", + "syn 2.0.59", +] [[package]] name = "form_urlencoded" @@ -975,7 +981,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.59", ] [[package]] @@ -1019,9 +1025,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.12" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" dependencies = [ "cfg-if", "libc", @@ -1092,6 +1098,12 @@ 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" @@ -1526,9 +1538,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -1556,18 +1568,18 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "proc-macro2" -version = "1.0.79" +version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" +checksum = "a56dea16b0a29e94408b9aa5e2940a4eedbd128a1ba20e8f7ae60fd3d465af0e" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -1752,9 +1764,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "80af6f9131f277a45a3fba6ce8e2258037bb0477a67e610d3c1fe046ab31de47" [[package]] name = "ryu" @@ -1834,7 +1846,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.59", ] [[package]] @@ -1891,7 +1903,7 @@ checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.59", ] [[package]] @@ -1944,9 +1956,9 @@ checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "strsim" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "strum" @@ -1986,9 +1998,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.55" +version = "2.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "002a1b3dbf967edfafc32655d0f377ab0bb7b994aa1d32c8cc7e9b8bf3ebb8f0" +checksum = "4a6531ffc7b071655e4ce2e04bd464c4830bb585a61cabb96cf808f05172615a" dependencies = [ "proc-macro2", "quote", @@ -2033,9 +2045,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.36.0" +version = "1.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" +checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" dependencies = [ "backtrace", "num_cpus", @@ -2051,7 +2063,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.59", ] [[package]] @@ -2222,7 +2234,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.59", "wasm-bindgen-shared", ] @@ -2256,7 +2268,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.59", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2342,7 +2354,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] @@ -2360,7 +2372,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] @@ -2380,17 +2392,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" dependencies = [ - "windows_aarch64_gnullvm 0.52.4", - "windows_aarch64_msvc 0.52.4", - "windows_i686_gnu 0.52.4", - "windows_i686_msvc 0.52.4", - "windows_x86_64_gnu 0.52.4", - "windows_x86_64_gnullvm 0.52.4", - "windows_x86_64_msvc 0.52.4", + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", ] [[package]] @@ -2401,9 +2414,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" [[package]] name = "windows_aarch64_msvc" @@ -2413,9 +2426,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" [[package]] name = "windows_i686_gnu" @@ -2425,9 +2438,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" +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" @@ -2437,9 +2456,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" [[package]] name = "windows_x86_64_gnu" @@ -2449,9 +2468,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" [[package]] name = "windows_x86_64_gnullvm" @@ -2461,9 +2480,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" [[package]] name = "windows_x86_64_msvc" @@ -2473,15 +2492,15 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] name = "winnow" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dffa400e67ed5a4dd237983829e66475f0a4a26938c4b04c21baede6262215b8" +checksum = "f0c976aaaa0e1f90dbb21e9587cdaf1d9679a1cde8875c0d6bd83ab96a208352" dependencies = [ "memchr", ] @@ -2512,7 +2531,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.59", ] [[package]] diff --git a/rust/Cargo.toml b/rust/Cargo.toml index b2348c0a..96aae617 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bdk_flutter" -version = "0.31.1-dev" +version = "0.31.2-dev" edition = "2021" [lib] @@ -9,10 +9,10 @@ crate-type = ["staticlib", "cdylib"] assert_matches = "1.5" [build-dependencies] -flutter_rust_bridge_codegen = { version = "= 2.0.0-dev.28" } +flutter_rust_bridge_codegen = { version = "= 2.0.0-dev.31" } anyhow = "1.0.68" [dependencies] -flutter_rust_bridge = "=2.0.0-dev.28" +flutter_rust_bridge = { version = "= 2.0.0-dev.31" } rand = "0.8" bdk = { version = "0.29.0", features = ["all-keys", "use-esplora-ureq", "sqlite-bundled", "rpc"] } serde = "1.0.89" @@ -25,4 +25,4 @@ strip = true opt-level = "z" lto = true codegen-units = 1 -panic = "abort" +panic = "abort" \ No newline at end of file From 0243adbbfd432a573c47590465f34bf9bf787c80 Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Fri, 29 Mar 2024 22:24:00 -0400 Subject: [PATCH 02/27] CHANGELOG.md updated --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0dc23153..ad8774e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## [0.31.2-dev] +Updated Rust and Flutter dependencies. + ## [0.31.1-dev] #### Fixed - Failed to load `.so` files in android. From 7bab0030fed48e0ceb5aaffb96a0b63102e5e334 Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Sat, 30 Mar 2024 18:30:00 -0400 Subject: [PATCH 03/27] code cleanup --- rust/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 96aae617..cb8f3928 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -12,7 +12,7 @@ assert_matches = "1.5" flutter_rust_bridge_codegen = { version = "= 2.0.0-dev.31" } anyhow = "1.0.68" [dependencies] -flutter_rust_bridge = { version = "= 2.0.0-dev.31" } +flutter_rust_bridge = "=2.0.0-dev.31" rand = "0.8" bdk = { version = "0.29.0", features = ["all-keys", "use-esplora-ureq", "sqlite-bundled", "rpc"] } serde = "1.0.89" @@ -25,4 +25,4 @@ strip = true opt-level = "z" lto = true codegen-units = 1 -panic = "abort" \ No newline at end of file +panic = "abort" From dca753a32c1f26cc6b05e450837d071bbb2e2a7c Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Sun, 31 Mar 2024 01:31:00 -0400 Subject: [PATCH 04/27] code cleanup --- flutter_rust_bridge.yaml | 2 +- makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flutter_rust_bridge.yaml b/flutter_rust_bridge.yaml index af538cd3..b7fadedc 100644 --- a/flutter_rust_bridge.yaml +++ b/flutter_rust_bridge.yaml @@ -3,4 +3,4 @@ dart_output: lib/src/generated/ full_dep: true c_output: ios/Classes/frb_generated.h duplicated_c_output: [macos/Classes/frb_generated.h] -dart_entrypoint_class_name: BdkCore \ No newline at end of file +dart_entrypoint_class_name: CApi \ No newline at end of file diff --git a/makefile b/makefile index 4b57e21b..60b7bfe4 100644 --- a/makefile +++ b/makefile @@ -11,7 +11,7 @@ help: makefile ## init: Install missing dependencies. init: - cargo install 'flutter_rust_bridge_codegen@^2.0.0-dev.31' + cargo install 'flutter_rust_bridge_codegen@2.0.0-dev.31' ## : all: init generate-bindings From 5120fe1699ed092c8d6ab1d14ad7219168fea68b Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Sun, 31 Mar 2024 09:00:00 -0400 Subject: [PATCH 05/27] Added InvalidInputException, InvalidLockTimeException & InvalidTransactionException --- lib/src/generated/api/error.dart | 21 +- lib/src/generated/api/error.freezed.dart | 2676 ++++++++++++++++++++-- lib/src/utils/exceptions.dart | 18 + rust/src/api/error.rs | 5 +- 4 files changed, 2479 insertions(+), 241 deletions(-) diff --git a/lib/src/generated/api/error.dart b/lib/src/generated/api/error.dart index 5ed1878d..c0cfe1a7 100644 --- a/lib/src/generated/api/error.dart +++ b/lib/src/generated/api/error.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.28. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import @@ -12,6 +12,8 @@ part 'error.freezed.dart'; @freezed sealed class AddressError with _$AddressError { + const AddressError._(); + const factory AddressError.base58( String field0, ) = AddressError_Base58; @@ -56,6 +58,8 @@ sealed class AddressError with _$AddressError { @freezed sealed class BdkError with _$BdkError implements FrbException { + const BdkError._(); + /// Hex decoding error const factory BdkError.hex( HexError field0, @@ -263,10 +267,21 @@ sealed class BdkError with _$BdkError implements FrbException { 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; @@ -290,6 +305,8 @@ sealed class ConsensusError with _$ConsensusError { @freezed sealed class DescriptorError with _$DescriptorError { + const DescriptorError._(); + const factory DescriptorError.invalidHdKeyPath() = DescriptorError_InvalidHdKeyPath; const factory DescriptorError.invalidDescriptorChecksum() = @@ -325,6 +342,8 @@ sealed class DescriptorError with _$DescriptorError { @freezed sealed class HexError with _$HexError { + const HexError._(); + const factory HexError.invalidChar( int field0, ) = HexError_InvalidChar; diff --git a/lib/src/generated/api/error.freezed.dart b/lib/src/generated/api/error.freezed.dart index 5b95650a..23895121 100644 --- a/lib/src/generated/api/error.freezed.dart +++ b/lib/src/generated/api/error.freezed.dart @@ -216,8 +216,8 @@ class __$$AddressError_Base58ImplCopyWithImpl<$Res> /// @nodoc -class _$AddressError_Base58Impl implements AddressError_Base58 { - const _$AddressError_Base58Impl(this.field0); +class _$AddressError_Base58Impl extends AddressError_Base58 { + const _$AddressError_Base58Impl(this.field0) : super._(); @override final String field0; @@ -417,9 +417,10 @@ class _$AddressError_Base58Impl implements AddressError_Base58 { } } -abstract class AddressError_Base58 implements AddressError { +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) @@ -460,8 +461,8 @@ class __$$AddressError_Bech32ImplCopyWithImpl<$Res> /// @nodoc -class _$AddressError_Bech32Impl implements AddressError_Bech32 { - const _$AddressError_Bech32Impl(this.field0); +class _$AddressError_Bech32Impl extends AddressError_Bech32 { + const _$AddressError_Bech32Impl(this.field0) : super._(); @override final String field0; @@ -661,9 +662,10 @@ class _$AddressError_Bech32Impl implements AddressError_Bech32 { } } -abstract class AddressError_Bech32 implements AddressError { +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) @@ -693,8 +695,8 @@ class __$$AddressError_EmptyBech32PayloadImplCopyWithImpl<$Res> /// @nodoc class _$AddressError_EmptyBech32PayloadImpl - implements AddressError_EmptyBech32Payload { - const _$AddressError_EmptyBech32PayloadImpl(); + extends AddressError_EmptyBech32Payload { + const _$AddressError_EmptyBech32PayloadImpl() : super._(); @override String toString() { @@ -883,9 +885,10 @@ class _$AddressError_EmptyBech32PayloadImpl } } -abstract class AddressError_EmptyBech32Payload implements AddressError { +abstract class AddressError_EmptyBech32Payload extends AddressError { const factory AddressError_EmptyBech32Payload() = _$AddressError_EmptyBech32PayloadImpl; + const AddressError_EmptyBech32Payload._() : super._(); } /// @nodoc @@ -930,9 +933,10 @@ class __$$AddressError_InvalidBech32VariantImplCopyWithImpl<$Res> /// @nodoc class _$AddressError_InvalidBech32VariantImpl - implements AddressError_InvalidBech32Variant { + extends AddressError_InvalidBech32Variant { const _$AddressError_InvalidBech32VariantImpl( - {required this.expected, required this.found}); + {required this.expected, required this.found}) + : super._(); @override final Variant expected; @@ -1137,10 +1141,11 @@ class _$AddressError_InvalidBech32VariantImpl } } -abstract class AddressError_InvalidBech32Variant implements AddressError { +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; @@ -1187,8 +1192,8 @@ class __$$AddressError_InvalidWitnessVersionImplCopyWithImpl<$Res> /// @nodoc class _$AddressError_InvalidWitnessVersionImpl - implements AddressError_InvalidWitnessVersion { - const _$AddressError_InvalidWitnessVersionImpl(this.field0); + extends AddressError_InvalidWitnessVersion { + const _$AddressError_InvalidWitnessVersionImpl(this.field0) : super._(); @override final int field0; @@ -1389,9 +1394,10 @@ class _$AddressError_InvalidWitnessVersionImpl } } -abstract class AddressError_InvalidWitnessVersion implements AddressError { +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) @@ -1437,8 +1443,8 @@ class __$$AddressError_UnparsableWitnessVersionImplCopyWithImpl<$Res> /// @nodoc class _$AddressError_UnparsableWitnessVersionImpl - implements AddressError_UnparsableWitnessVersion { - const _$AddressError_UnparsableWitnessVersionImpl(this.field0); + extends AddressError_UnparsableWitnessVersion { + const _$AddressError_UnparsableWitnessVersionImpl(this.field0) : super._(); @override final String field0; @@ -1639,9 +1645,10 @@ class _$AddressError_UnparsableWitnessVersionImpl } } -abstract class AddressError_UnparsableWitnessVersion implements AddressError { +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) @@ -1672,8 +1679,8 @@ class __$$AddressError_MalformedWitnessVersionImplCopyWithImpl<$Res> /// @nodoc class _$AddressError_MalformedWitnessVersionImpl - implements AddressError_MalformedWitnessVersion { - const _$AddressError_MalformedWitnessVersionImpl(); + extends AddressError_MalformedWitnessVersion { + const _$AddressError_MalformedWitnessVersionImpl() : super._(); @override String toString() { @@ -1862,9 +1869,10 @@ class _$AddressError_MalformedWitnessVersionImpl } } -abstract class AddressError_MalformedWitnessVersion implements AddressError { +abstract class AddressError_MalformedWitnessVersion extends AddressError { const factory AddressError_MalformedWitnessVersion() = _$AddressError_MalformedWitnessVersionImpl; + const AddressError_MalformedWitnessVersion._() : super._(); } /// @nodoc @@ -1904,8 +1912,8 @@ class __$$AddressError_InvalidWitnessProgramLengthImplCopyWithImpl<$Res> /// @nodoc class _$AddressError_InvalidWitnessProgramLengthImpl - implements AddressError_InvalidWitnessProgramLength { - const _$AddressError_InvalidWitnessProgramLengthImpl(this.field0); + extends AddressError_InvalidWitnessProgramLength { + const _$AddressError_InvalidWitnessProgramLengthImpl(this.field0) : super._(); @override final int field0; @@ -2107,10 +2115,10 @@ class _$AddressError_InvalidWitnessProgramLengthImpl } } -abstract class AddressError_InvalidWitnessProgramLength - implements AddressError { +abstract class AddressError_InvalidWitnessProgramLength extends AddressError { const factory AddressError_InvalidWitnessProgramLength(final int field0) = _$AddressError_InvalidWitnessProgramLengthImpl; + const AddressError_InvalidWitnessProgramLength._() : super._(); int get field0; @JsonKey(ignore: true) @@ -2156,8 +2164,9 @@ class __$$AddressError_InvalidSegwitV0ProgramLengthImplCopyWithImpl<$Res> /// @nodoc class _$AddressError_InvalidSegwitV0ProgramLengthImpl - implements AddressError_InvalidSegwitV0ProgramLength { - const _$AddressError_InvalidSegwitV0ProgramLengthImpl(this.field0); + extends AddressError_InvalidSegwitV0ProgramLength { + const _$AddressError_InvalidSegwitV0ProgramLengthImpl(this.field0) + : super._(); @override final int field0; @@ -2360,10 +2369,10 @@ class _$AddressError_InvalidSegwitV0ProgramLengthImpl } } -abstract class AddressError_InvalidSegwitV0ProgramLength - implements AddressError { +abstract class AddressError_InvalidSegwitV0ProgramLength extends AddressError { const factory AddressError_InvalidSegwitV0ProgramLength(final int field0) = _$AddressError_InvalidSegwitV0ProgramLengthImpl; + const AddressError_InvalidSegwitV0ProgramLength._() : super._(); int get field0; @JsonKey(ignore: true) @@ -2394,8 +2403,8 @@ class __$$AddressError_UncompressedPubkeyImplCopyWithImpl<$Res> /// @nodoc class _$AddressError_UncompressedPubkeyImpl - implements AddressError_UncompressedPubkey { - const _$AddressError_UncompressedPubkeyImpl(); + extends AddressError_UncompressedPubkey { + const _$AddressError_UncompressedPubkeyImpl() : super._(); @override String toString() { @@ -2584,9 +2593,10 @@ class _$AddressError_UncompressedPubkeyImpl } } -abstract class AddressError_UncompressedPubkey implements AddressError { +abstract class AddressError_UncompressedPubkey extends AddressError { const factory AddressError_UncompressedPubkey() = _$AddressError_UncompressedPubkeyImpl; + const AddressError_UncompressedPubkey._() : super._(); } /// @nodoc @@ -2611,8 +2621,8 @@ class __$$AddressError_ExcessiveScriptSizeImplCopyWithImpl<$Res> /// @nodoc class _$AddressError_ExcessiveScriptSizeImpl - implements AddressError_ExcessiveScriptSize { - const _$AddressError_ExcessiveScriptSizeImpl(); + extends AddressError_ExcessiveScriptSize { + const _$AddressError_ExcessiveScriptSizeImpl() : super._(); @override String toString() { @@ -2801,9 +2811,10 @@ class _$AddressError_ExcessiveScriptSizeImpl } } -abstract class AddressError_ExcessiveScriptSize implements AddressError { +abstract class AddressError_ExcessiveScriptSize extends AddressError { const factory AddressError_ExcessiveScriptSize() = _$AddressError_ExcessiveScriptSizeImpl; + const AddressError_ExcessiveScriptSize._() : super._(); } /// @nodoc @@ -2828,8 +2839,8 @@ class __$$AddressError_UnrecognizedScriptImplCopyWithImpl<$Res> /// @nodoc class _$AddressError_UnrecognizedScriptImpl - implements AddressError_UnrecognizedScript { - const _$AddressError_UnrecognizedScriptImpl(); + extends AddressError_UnrecognizedScript { + const _$AddressError_UnrecognizedScriptImpl() : super._(); @override String toString() { @@ -3018,9 +3029,10 @@ class _$AddressError_UnrecognizedScriptImpl } } -abstract class AddressError_UnrecognizedScript implements AddressError { +abstract class AddressError_UnrecognizedScript extends AddressError { const factory AddressError_UnrecognizedScript() = _$AddressError_UnrecognizedScriptImpl; + const AddressError_UnrecognizedScript._() : super._(); } /// @nodoc @@ -3060,8 +3072,8 @@ class __$$AddressError_UnknownAddressTypeImplCopyWithImpl<$Res> /// @nodoc class _$AddressError_UnknownAddressTypeImpl - implements AddressError_UnknownAddressType { - const _$AddressError_UnknownAddressTypeImpl(this.field0); + extends AddressError_UnknownAddressType { + const _$AddressError_UnknownAddressTypeImpl(this.field0) : super._(); @override final String field0; @@ -3262,9 +3274,10 @@ class _$AddressError_UnknownAddressTypeImpl } } -abstract class AddressError_UnknownAddressType implements AddressError { +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) @@ -3320,11 +3333,12 @@ class __$$AddressError_NetworkValidationImplCopyWithImpl<$Res> /// @nodoc class _$AddressError_NetworkValidationImpl - implements AddressError_NetworkValidation { + extends AddressError_NetworkValidation { const _$AddressError_NetworkValidationImpl( {required this.networkRequired, required this.networkFound, - required this.address}); + required this.address}) + : super._(); @override final Network networkRequired; @@ -3534,11 +3548,12 @@ class _$AddressError_NetworkValidationImpl } } -abstract class AddressError_NetworkValidation implements AddressError { +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; @@ -3596,6 +3611,9 @@ mixin _$BdkError { 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 @@ -3643,6 +3661,9 @@ mixin _$BdkError { 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 @@ -3690,6 +3711,9 @@ mixin _$BdkError { 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; @@ -3749,6 +3773,10 @@ mixin _$BdkError { 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 @@ -3804,6 +3832,9 @@ mixin _$BdkError { 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 @@ -3856,6 +3887,9 @@ mixin _$BdkError { 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; @@ -3921,8 +3955,8 @@ class __$$BdkError_HexImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_HexImpl implements BdkError_Hex { - const _$BdkError_HexImpl(this.field0); +class _$BdkError_HexImpl extends BdkError_Hex { + const _$BdkError_HexImpl(this.field0) : super._(); @override final HexError field0; @@ -3995,6 +4029,9 @@ class _$BdkError_HexImpl implements BdkError_Hex { 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); } @@ -4045,6 +4082,9 @@ class _$BdkError_HexImpl implements BdkError_Hex { 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); } @@ -4095,6 +4135,9 @@ class _$BdkError_HexImpl implements BdkError_Hex { 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) { @@ -4160,6 +4203,10 @@ class _$BdkError_HexImpl implements BdkError_Hex { 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); } @@ -4218,6 +4265,9 @@ class _$BdkError_HexImpl implements BdkError_Hex { 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); } @@ -4273,6 +4323,9 @@ class _$BdkError_HexImpl implements BdkError_Hex { 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) { @@ -4282,8 +4335,9 @@ class _$BdkError_HexImpl implements BdkError_Hex { } } -abstract class BdkError_Hex implements BdkError { +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) @@ -4334,8 +4388,8 @@ class __$$BdkError_ConsensusImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_ConsensusImpl implements BdkError_Consensus { - const _$BdkError_ConsensusImpl(this.field0); +class _$BdkError_ConsensusImpl extends BdkError_Consensus { + const _$BdkError_ConsensusImpl(this.field0) : super._(); @override final ConsensusError field0; @@ -4409,6 +4463,9 @@ class _$BdkError_ConsensusImpl implements BdkError_Consensus { 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); } @@ -4459,6 +4516,9 @@ class _$BdkError_ConsensusImpl implements BdkError_Consensus { 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); } @@ -4509,6 +4569,9 @@ class _$BdkError_ConsensusImpl implements BdkError_Consensus { 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) { @@ -4574,6 +4637,10 @@ class _$BdkError_ConsensusImpl implements BdkError_Consensus { 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); } @@ -4632,6 +4699,9 @@ class _$BdkError_ConsensusImpl implements BdkError_Consensus { 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); } @@ -4687,6 +4757,9 @@ class _$BdkError_ConsensusImpl implements BdkError_Consensus { 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) { @@ -4696,9 +4769,10 @@ class _$BdkError_ConsensusImpl implements BdkError_Consensus { } } -abstract class BdkError_Consensus implements BdkError { +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) @@ -4749,8 +4823,8 @@ class __$$BdkError_AddressImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_AddressImpl implements BdkError_Address { - const _$BdkError_AddressImpl(this.field0); +class _$BdkError_AddressImpl extends BdkError_Address { + const _$BdkError_AddressImpl(this.field0) : super._(); @override final AddressError field0; @@ -4824,6 +4898,9 @@ class _$BdkError_AddressImpl implements BdkError_Address { 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); } @@ -4874,6 +4951,9 @@ class _$BdkError_AddressImpl implements BdkError_Address { 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); } @@ -4924,6 +5004,9 @@ class _$BdkError_AddressImpl implements BdkError_Address { 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) { @@ -4989,6 +5072,10 @@ class _$BdkError_AddressImpl implements BdkError_Address { 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); } @@ -5047,6 +5134,9 @@ class _$BdkError_AddressImpl implements BdkError_Address { 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); } @@ -5102,6 +5192,9 @@ class _$BdkError_AddressImpl implements BdkError_Address { 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) { @@ -5111,9 +5204,10 @@ class _$BdkError_AddressImpl implements BdkError_Address { } } -abstract class BdkError_Address implements BdkError { +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) @@ -5164,8 +5258,8 @@ class __$$BdkError_DescriptorImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_DescriptorImpl implements BdkError_Descriptor { - const _$BdkError_DescriptorImpl(this.field0); +class _$BdkError_DescriptorImpl extends BdkError_Descriptor { + const _$BdkError_DescriptorImpl(this.field0) : super._(); @override final DescriptorError field0; @@ -5239,6 +5333,9 @@ class _$BdkError_DescriptorImpl implements BdkError_Descriptor { 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); } @@ -5289,6 +5386,9 @@ class _$BdkError_DescriptorImpl implements BdkError_Descriptor { 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); } @@ -5339,6 +5439,9 @@ class _$BdkError_DescriptorImpl implements BdkError_Descriptor { 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) { @@ -5404,6 +5507,10 @@ class _$BdkError_DescriptorImpl implements BdkError_Descriptor { 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); } @@ -5462,6 +5569,9 @@ class _$BdkError_DescriptorImpl implements BdkError_Descriptor { 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); } @@ -5517,6 +5627,9 @@ class _$BdkError_DescriptorImpl implements BdkError_Descriptor { 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) { @@ -5526,9 +5639,10 @@ class _$BdkError_DescriptorImpl implements BdkError_Descriptor { } } -abstract class BdkError_Descriptor implements BdkError { +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) @@ -5571,8 +5685,8 @@ class __$$BdkError_InvalidU32BytesImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_InvalidU32BytesImpl implements BdkError_InvalidU32Bytes { - const _$BdkError_InvalidU32BytesImpl(this.field0); +class _$BdkError_InvalidU32BytesImpl extends BdkError_InvalidU32Bytes { + const _$BdkError_InvalidU32BytesImpl(this.field0) : super._(); @override final Uint8List field0; @@ -5647,6 +5761,9 @@ class _$BdkError_InvalidU32BytesImpl implements BdkError_InvalidU32Bytes { 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); } @@ -5697,6 +5814,9 @@ class _$BdkError_InvalidU32BytesImpl implements BdkError_InvalidU32Bytes { 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); } @@ -5747,6 +5867,9 @@ class _$BdkError_InvalidU32BytesImpl implements BdkError_InvalidU32Bytes { 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) { @@ -5812,6 +5935,10 @@ class _$BdkError_InvalidU32BytesImpl implements BdkError_InvalidU32Bytes { 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); } @@ -5870,6 +5997,9 @@ class _$BdkError_InvalidU32BytesImpl implements BdkError_InvalidU32Bytes { 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); } @@ -5925,6 +6055,9 @@ class _$BdkError_InvalidU32BytesImpl implements BdkError_InvalidU32Bytes { 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) { @@ -5934,9 +6067,10 @@ class _$BdkError_InvalidU32BytesImpl implements BdkError_InvalidU32Bytes { } } -abstract class BdkError_InvalidU32Bytes implements BdkError { +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) @@ -5977,8 +6111,8 @@ class __$$BdkError_GenericImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_GenericImpl implements BdkError_Generic { - const _$BdkError_GenericImpl(this.field0); +class _$BdkError_GenericImpl extends BdkError_Generic { + const _$BdkError_GenericImpl(this.field0) : super._(); @override final String field0; @@ -6052,6 +6186,9 @@ class _$BdkError_GenericImpl implements BdkError_Generic { 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); } @@ -6102,6 +6239,9 @@ class _$BdkError_GenericImpl implements BdkError_Generic { 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); } @@ -6152,6 +6292,9 @@ class _$BdkError_GenericImpl implements BdkError_Generic { 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) { @@ -6217,6 +6360,10 @@ class _$BdkError_GenericImpl implements BdkError_Generic { 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); } @@ -6275,6 +6422,9 @@ class _$BdkError_GenericImpl implements BdkError_Generic { 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); } @@ -6330,6 +6480,9 @@ class _$BdkError_GenericImpl implements BdkError_Generic { 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) { @@ -6339,8 +6492,9 @@ class _$BdkError_GenericImpl implements BdkError_Generic { } } -abstract class BdkError_Generic implements BdkError { +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) @@ -6370,8 +6524,8 @@ class __$$BdkError_ScriptDoesntHaveAddressFormImplCopyWithImpl<$Res> /// @nodoc class _$BdkError_ScriptDoesntHaveAddressFormImpl - implements BdkError_ScriptDoesntHaveAddressForm { - const _$BdkError_ScriptDoesntHaveAddressFormImpl(); + extends BdkError_ScriptDoesntHaveAddressForm { + const _$BdkError_ScriptDoesntHaveAddressFormImpl() : super._(); @override String toString() { @@ -6434,6 +6588,9 @@ class _$BdkError_ScriptDoesntHaveAddressFormImpl 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(); } @@ -6484,6 +6641,9 @@ class _$BdkError_ScriptDoesntHaveAddressFormImpl 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(); } @@ -6534,6 +6694,9 @@ class _$BdkError_ScriptDoesntHaveAddressFormImpl 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) { @@ -6599,6 +6762,10 @@ class _$BdkError_ScriptDoesntHaveAddressFormImpl 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); } @@ -6657,6 +6824,9 @@ class _$BdkError_ScriptDoesntHaveAddressFormImpl 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); } @@ -6712,6 +6882,9 @@ class _$BdkError_ScriptDoesntHaveAddressFormImpl 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) { @@ -6721,9 +6894,10 @@ class _$BdkError_ScriptDoesntHaveAddressFormImpl } } -abstract class BdkError_ScriptDoesntHaveAddressForm implements BdkError { +abstract class BdkError_ScriptDoesntHaveAddressForm extends BdkError { const factory BdkError_ScriptDoesntHaveAddressForm() = _$BdkError_ScriptDoesntHaveAddressFormImpl; + const BdkError_ScriptDoesntHaveAddressForm._() : super._(); } /// @nodoc @@ -6745,8 +6919,8 @@ class __$$BdkError_NoRecipientsImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_NoRecipientsImpl implements BdkError_NoRecipients { - const _$BdkError_NoRecipientsImpl(); +class _$BdkError_NoRecipientsImpl extends BdkError_NoRecipients { + const _$BdkError_NoRecipientsImpl() : super._(); @override String toString() { @@ -6809,6 +6983,9 @@ class _$BdkError_NoRecipientsImpl implements BdkError_NoRecipients { 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(); } @@ -6859,6 +7036,9 @@ class _$BdkError_NoRecipientsImpl implements BdkError_NoRecipients { 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(); } @@ -6909,6 +7089,9 @@ class _$BdkError_NoRecipientsImpl implements BdkError_NoRecipients { 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) { @@ -6974,6 +7157,10 @@ class _$BdkError_NoRecipientsImpl implements BdkError_NoRecipients { 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); } @@ -7032,6 +7219,9 @@ class _$BdkError_NoRecipientsImpl implements BdkError_NoRecipients { 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); } @@ -7087,6 +7277,9 @@ class _$BdkError_NoRecipientsImpl implements BdkError_NoRecipients { 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) { @@ -7096,8 +7289,9 @@ class _$BdkError_NoRecipientsImpl implements BdkError_NoRecipients { } } -abstract class BdkError_NoRecipients implements BdkError { +abstract class BdkError_NoRecipients extends BdkError { const factory BdkError_NoRecipients() = _$BdkError_NoRecipientsImpl; + const BdkError_NoRecipients._() : super._(); } /// @nodoc @@ -7120,8 +7314,8 @@ class __$$BdkError_NoUtxosSelectedImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_NoUtxosSelectedImpl implements BdkError_NoUtxosSelected { - const _$BdkError_NoUtxosSelectedImpl(); +class _$BdkError_NoUtxosSelectedImpl extends BdkError_NoUtxosSelected { + const _$BdkError_NoUtxosSelectedImpl() : super._(); @override String toString() { @@ -7184,6 +7378,9 @@ class _$BdkError_NoUtxosSelectedImpl implements BdkError_NoUtxosSelected { 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(); } @@ -7234,6 +7431,9 @@ class _$BdkError_NoUtxosSelectedImpl implements BdkError_NoUtxosSelected { 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(); } @@ -7284,6 +7484,9 @@ class _$BdkError_NoUtxosSelectedImpl implements BdkError_NoUtxosSelected { 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) { @@ -7349,6 +7552,10 @@ class _$BdkError_NoUtxosSelectedImpl implements BdkError_NoUtxosSelected { 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); } @@ -7407,6 +7614,9 @@ class _$BdkError_NoUtxosSelectedImpl implements BdkError_NoUtxosSelected { 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); } @@ -7462,6 +7672,9 @@ class _$BdkError_NoUtxosSelectedImpl implements BdkError_NoUtxosSelected { 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) { @@ -7471,8 +7684,9 @@ class _$BdkError_NoUtxosSelectedImpl implements BdkError_NoUtxosSelected { } } -abstract class BdkError_NoUtxosSelected implements BdkError { +abstract class BdkError_NoUtxosSelected extends BdkError { const factory BdkError_NoUtxosSelected() = _$BdkError_NoUtxosSelectedImpl; + const BdkError_NoUtxosSelected._() : super._(); } /// @nodoc @@ -7511,8 +7725,8 @@ class __$$BdkError_OutputBelowDustLimitImplCopyWithImpl<$Res> /// @nodoc class _$BdkError_OutputBelowDustLimitImpl - implements BdkError_OutputBelowDustLimit { - const _$BdkError_OutputBelowDustLimitImpl(this.field0); + extends BdkError_OutputBelowDustLimit { + const _$BdkError_OutputBelowDustLimitImpl(this.field0) : super._(); @override final int field0; @@ -7587,6 +7801,9 @@ class _$BdkError_OutputBelowDustLimitImpl 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); } @@ -7637,6 +7854,9 @@ class _$BdkError_OutputBelowDustLimitImpl 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); } @@ -7687,6 +7907,9 @@ class _$BdkError_OutputBelowDustLimitImpl 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) { @@ -7752,6 +7975,10 @@ class _$BdkError_OutputBelowDustLimitImpl 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); } @@ -7810,6 +8037,9 @@ class _$BdkError_OutputBelowDustLimitImpl 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); } @@ -7865,6 +8095,9 @@ class _$BdkError_OutputBelowDustLimitImpl 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) { @@ -7874,9 +8107,10 @@ class _$BdkError_OutputBelowDustLimitImpl } } -abstract class BdkError_OutputBelowDustLimit implements BdkError { +abstract class BdkError_OutputBelowDustLimit extends BdkError { const factory BdkError_OutputBelowDustLimit(final int field0) = _$BdkError_OutputBelowDustLimitImpl; + const BdkError_OutputBelowDustLimit._() : super._(); int get field0; @JsonKey(ignore: true) @@ -7925,9 +8159,10 @@ class __$$BdkError_InsufficientFundsImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_InsufficientFundsImpl implements BdkError_InsufficientFunds { +class _$BdkError_InsufficientFundsImpl extends BdkError_InsufficientFunds { const _$BdkError_InsufficientFundsImpl( - {required this.needed, required this.available}); + {required this.needed, required this.available}) + : super._(); /// Sats needed for some transaction @override @@ -8008,6 +8243,9 @@ class _$BdkError_InsufficientFundsImpl implements BdkError_InsufficientFunds { 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); } @@ -8058,6 +8296,9 @@ class _$BdkError_InsufficientFundsImpl implements BdkError_InsufficientFunds { 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); } @@ -8108,6 +8349,9 @@ class _$BdkError_InsufficientFundsImpl implements BdkError_InsufficientFunds { 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) { @@ -8173,6 +8417,10 @@ class _$BdkError_InsufficientFundsImpl implements BdkError_InsufficientFunds { 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); } @@ -8231,6 +8479,9 @@ class _$BdkError_InsufficientFundsImpl implements BdkError_InsufficientFunds { 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); } @@ -8286,6 +8537,9 @@ class _$BdkError_InsufficientFundsImpl implements BdkError_InsufficientFunds { 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) { @@ -8295,10 +8549,11 @@ class _$BdkError_InsufficientFundsImpl implements BdkError_InsufficientFunds { } } -abstract class BdkError_InsufficientFunds implements BdkError { +abstract class BdkError_InsufficientFunds extends BdkError { const factory BdkError_InsufficientFunds( {required final int needed, required final int available}) = _$BdkError_InsufficientFundsImpl; + const BdkError_InsufficientFunds._() : super._(); /// Sats needed for some transaction int get needed; @@ -8331,8 +8586,8 @@ class __$$BdkError_BnBTotalTriesExceededImplCopyWithImpl<$Res> /// @nodoc class _$BdkError_BnBTotalTriesExceededImpl - implements BdkError_BnBTotalTriesExceeded { - const _$BdkError_BnBTotalTriesExceededImpl(); + extends BdkError_BnBTotalTriesExceeded { + const _$BdkError_BnBTotalTriesExceededImpl() : super._(); @override String toString() { @@ -8395,6 +8650,9 @@ class _$BdkError_BnBTotalTriesExceededImpl 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(); } @@ -8445,6 +8703,9 @@ class _$BdkError_BnBTotalTriesExceededImpl 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(); } @@ -8495,6 +8756,9 @@ class _$BdkError_BnBTotalTriesExceededImpl 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) { @@ -8560,6 +8824,10 @@ class _$BdkError_BnBTotalTriesExceededImpl 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); } @@ -8618,6 +8886,9 @@ class _$BdkError_BnBTotalTriesExceededImpl 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); } @@ -8673,6 +8944,9 @@ class _$BdkError_BnBTotalTriesExceededImpl 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) { @@ -8682,9 +8956,10 @@ class _$BdkError_BnBTotalTriesExceededImpl } } -abstract class BdkError_BnBTotalTriesExceeded implements BdkError { +abstract class BdkError_BnBTotalTriesExceeded extends BdkError { const factory BdkError_BnBTotalTriesExceeded() = _$BdkError_BnBTotalTriesExceededImpl; + const BdkError_BnBTotalTriesExceeded._() : super._(); } /// @nodoc @@ -8707,8 +8982,8 @@ class __$$BdkError_BnBNoExactMatchImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_BnBNoExactMatchImpl implements BdkError_BnBNoExactMatch { - const _$BdkError_BnBNoExactMatchImpl(); +class _$BdkError_BnBNoExactMatchImpl extends BdkError_BnBNoExactMatch { + const _$BdkError_BnBNoExactMatchImpl() : super._(); @override String toString() { @@ -8771,6 +9046,9 @@ class _$BdkError_BnBNoExactMatchImpl implements BdkError_BnBNoExactMatch { 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(); } @@ -8821,6 +9099,9 @@ class _$BdkError_BnBNoExactMatchImpl implements BdkError_BnBNoExactMatch { 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(); } @@ -8871,6 +9152,9 @@ class _$BdkError_BnBNoExactMatchImpl implements BdkError_BnBNoExactMatch { 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) { @@ -8936,6 +9220,10 @@ class _$BdkError_BnBNoExactMatchImpl implements BdkError_BnBNoExactMatch { 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); } @@ -8994,6 +9282,9 @@ class _$BdkError_BnBNoExactMatchImpl implements BdkError_BnBNoExactMatch { 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); } @@ -9049,6 +9340,9 @@ class _$BdkError_BnBNoExactMatchImpl implements BdkError_BnBNoExactMatch { 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) { @@ -9058,8 +9352,9 @@ class _$BdkError_BnBNoExactMatchImpl implements BdkError_BnBNoExactMatch { } } -abstract class BdkError_BnBNoExactMatch implements BdkError { +abstract class BdkError_BnBNoExactMatch extends BdkError { const factory BdkError_BnBNoExactMatch() = _$BdkError_BnBNoExactMatchImpl; + const BdkError_BnBNoExactMatch._() : super._(); } /// @nodoc @@ -9080,8 +9375,8 @@ class __$$BdkError_UnknownUtxoImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_UnknownUtxoImpl implements BdkError_UnknownUtxo { - const _$BdkError_UnknownUtxoImpl(); +class _$BdkError_UnknownUtxoImpl extends BdkError_UnknownUtxo { + const _$BdkError_UnknownUtxoImpl() : super._(); @override String toString() { @@ -9144,6 +9439,9 @@ class _$BdkError_UnknownUtxoImpl implements BdkError_UnknownUtxo { 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(); } @@ -9194,6 +9492,9 @@ class _$BdkError_UnknownUtxoImpl implements BdkError_UnknownUtxo { 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(); } @@ -9244,6 +9545,9 @@ class _$BdkError_UnknownUtxoImpl implements BdkError_UnknownUtxo { 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) { @@ -9309,6 +9613,10 @@ class _$BdkError_UnknownUtxoImpl implements BdkError_UnknownUtxo { 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); } @@ -9367,6 +9675,9 @@ class _$BdkError_UnknownUtxoImpl implements BdkError_UnknownUtxo { 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); } @@ -9422,6 +9733,9 @@ class _$BdkError_UnknownUtxoImpl implements BdkError_UnknownUtxo { 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) { @@ -9431,8 +9745,9 @@ class _$BdkError_UnknownUtxoImpl implements BdkError_UnknownUtxo { } } -abstract class BdkError_UnknownUtxo implements BdkError { +abstract class BdkError_UnknownUtxo extends BdkError { const factory BdkError_UnknownUtxo() = _$BdkError_UnknownUtxoImpl; + const BdkError_UnknownUtxo._() : super._(); } /// @nodoc @@ -9455,9 +9770,8 @@ class __$$BdkError_TransactionNotFoundImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_TransactionNotFoundImpl - implements BdkError_TransactionNotFound { - const _$BdkError_TransactionNotFoundImpl(); +class _$BdkError_TransactionNotFoundImpl extends BdkError_TransactionNotFound { + const _$BdkError_TransactionNotFoundImpl() : super._(); @override String toString() { @@ -9520,6 +9834,9 @@ class _$BdkError_TransactionNotFoundImpl 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(); } @@ -9570,6 +9887,9 @@ class _$BdkError_TransactionNotFoundImpl 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(); } @@ -9620,6 +9940,9 @@ class _$BdkError_TransactionNotFoundImpl 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) { @@ -9685,6 +10008,10 @@ class _$BdkError_TransactionNotFoundImpl 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); } @@ -9743,6 +10070,9 @@ class _$BdkError_TransactionNotFoundImpl 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); } @@ -9798,6 +10128,9 @@ class _$BdkError_TransactionNotFoundImpl 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) { @@ -9807,9 +10140,10 @@ class _$BdkError_TransactionNotFoundImpl } } -abstract class BdkError_TransactionNotFound implements BdkError { +abstract class BdkError_TransactionNotFound extends BdkError { const factory BdkError_TransactionNotFound() = _$BdkError_TransactionNotFoundImpl; + const BdkError_TransactionNotFound._() : super._(); } /// @nodoc @@ -9833,8 +10167,8 @@ class __$$BdkError_TransactionConfirmedImplCopyWithImpl<$Res> /// @nodoc class _$BdkError_TransactionConfirmedImpl - implements BdkError_TransactionConfirmed { - const _$BdkError_TransactionConfirmedImpl(); + extends BdkError_TransactionConfirmed { + const _$BdkError_TransactionConfirmedImpl() : super._(); @override String toString() { @@ -9897,6 +10231,9 @@ class _$BdkError_TransactionConfirmedImpl 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(); } @@ -9947,6 +10284,9 @@ class _$BdkError_TransactionConfirmedImpl 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(); } @@ -9997,6 +10337,9 @@ class _$BdkError_TransactionConfirmedImpl 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) { @@ -10062,6 +10405,10 @@ class _$BdkError_TransactionConfirmedImpl 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); } @@ -10120,6 +10467,9 @@ class _$BdkError_TransactionConfirmedImpl 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); } @@ -10175,6 +10525,9 @@ class _$BdkError_TransactionConfirmedImpl 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) { @@ -10184,9 +10537,10 @@ class _$BdkError_TransactionConfirmedImpl } } -abstract class BdkError_TransactionConfirmed implements BdkError { +abstract class BdkError_TransactionConfirmed extends BdkError { const factory BdkError_TransactionConfirmed() = _$BdkError_TransactionConfirmedImpl; + const BdkError_TransactionConfirmed._() : super._(); } /// @nodoc @@ -10211,8 +10565,8 @@ class __$$BdkError_IrreplaceableTransactionImplCopyWithImpl<$Res> /// @nodoc class _$BdkError_IrreplaceableTransactionImpl - implements BdkError_IrreplaceableTransaction { - const _$BdkError_IrreplaceableTransactionImpl(); + extends BdkError_IrreplaceableTransaction { + const _$BdkError_IrreplaceableTransactionImpl() : super._(); @override String toString() { @@ -10275,6 +10629,9 @@ class _$BdkError_IrreplaceableTransactionImpl 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(); } @@ -10325,6 +10682,9 @@ class _$BdkError_IrreplaceableTransactionImpl 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(); } @@ -10375,6 +10735,9 @@ class _$BdkError_IrreplaceableTransactionImpl 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) { @@ -10440,6 +10803,10 @@ class _$BdkError_IrreplaceableTransactionImpl 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); } @@ -10498,6 +10865,9 @@ class _$BdkError_IrreplaceableTransactionImpl 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); } @@ -10553,6 +10923,9 @@ class _$BdkError_IrreplaceableTransactionImpl 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) { @@ -10562,9 +10935,10 @@ class _$BdkError_IrreplaceableTransactionImpl } } -abstract class BdkError_IrreplaceableTransaction implements BdkError { +abstract class BdkError_IrreplaceableTransaction extends BdkError { const factory BdkError_IrreplaceableTransaction() = _$BdkError_IrreplaceableTransactionImpl; + const BdkError_IrreplaceableTransaction._() : super._(); } /// @nodoc @@ -10602,8 +10976,8 @@ class __$$BdkError_FeeRateTooLowImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_FeeRateTooLowImpl implements BdkError_FeeRateTooLow { - const _$BdkError_FeeRateTooLowImpl({required this.needed}); +class _$BdkError_FeeRateTooLowImpl extends BdkError_FeeRateTooLow { + const _$BdkError_FeeRateTooLowImpl({required this.needed}) : super._(); /// Required fee rate (satoshi/vbyte) @override @@ -10678,6 +11052,9 @@ class _$BdkError_FeeRateTooLowImpl implements BdkError_FeeRateTooLow { 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); } @@ -10728,6 +11105,9 @@ class _$BdkError_FeeRateTooLowImpl implements BdkError_FeeRateTooLow { 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); } @@ -10778,6 +11158,9 @@ class _$BdkError_FeeRateTooLowImpl implements BdkError_FeeRateTooLow { 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) { @@ -10843,6 +11226,10 @@ class _$BdkError_FeeRateTooLowImpl implements BdkError_FeeRateTooLow { 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); } @@ -10901,6 +11288,9 @@ class _$BdkError_FeeRateTooLowImpl implements BdkError_FeeRateTooLow { 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); } @@ -10956,6 +11346,9 @@ class _$BdkError_FeeRateTooLowImpl implements BdkError_FeeRateTooLow { 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) { @@ -10965,9 +11358,10 @@ class _$BdkError_FeeRateTooLowImpl implements BdkError_FeeRateTooLow { } } -abstract class BdkError_FeeRateTooLow implements BdkError { +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; @@ -11009,8 +11403,8 @@ class __$$BdkError_FeeTooLowImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_FeeTooLowImpl implements BdkError_FeeTooLow { - const _$BdkError_FeeTooLowImpl({required this.needed}); +class _$BdkError_FeeTooLowImpl extends BdkError_FeeTooLow { + const _$BdkError_FeeTooLowImpl({required this.needed}) : super._(); /// Required fee absolute value (satoshi) @override @@ -11085,6 +11479,9 @@ class _$BdkError_FeeTooLowImpl implements BdkError_FeeTooLow { 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); } @@ -11135,6 +11532,9 @@ class _$BdkError_FeeTooLowImpl implements BdkError_FeeTooLow { 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); } @@ -11185,6 +11585,9 @@ class _$BdkError_FeeTooLowImpl implements BdkError_FeeTooLow { 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) { @@ -11250,6 +11653,10 @@ class _$BdkError_FeeTooLowImpl implements BdkError_FeeTooLow { 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); } @@ -11308,6 +11715,9 @@ class _$BdkError_FeeTooLowImpl implements BdkError_FeeTooLow { 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); } @@ -11363,6 +11773,9 @@ class _$BdkError_FeeTooLowImpl implements BdkError_FeeTooLow { 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) { @@ -11372,9 +11785,10 @@ class _$BdkError_FeeTooLowImpl implements BdkError_FeeTooLow { } } -abstract class BdkError_FeeTooLow implements BdkError { +abstract class BdkError_FeeTooLow extends BdkError { const factory BdkError_FeeTooLow({required final int needed}) = _$BdkError_FeeTooLowImpl; + const BdkError_FeeTooLow._() : super._(); /// Required fee absolute value (satoshi) int get needed; @@ -11403,8 +11817,8 @@ class __$$BdkError_FeeRateUnavailableImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_FeeRateUnavailableImpl implements BdkError_FeeRateUnavailable { - const _$BdkError_FeeRateUnavailableImpl(); +class _$BdkError_FeeRateUnavailableImpl extends BdkError_FeeRateUnavailable { + const _$BdkError_FeeRateUnavailableImpl() : super._(); @override String toString() { @@ -11467,6 +11881,9 @@ class _$BdkError_FeeRateUnavailableImpl implements BdkError_FeeRateUnavailable { 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(); } @@ -11517,6 +11934,9 @@ class _$BdkError_FeeRateUnavailableImpl implements BdkError_FeeRateUnavailable { 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(); } @@ -11567,6 +11987,9 @@ class _$BdkError_FeeRateUnavailableImpl implements BdkError_FeeRateUnavailable { 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) { @@ -11632,6 +12055,10 @@ class _$BdkError_FeeRateUnavailableImpl implements BdkError_FeeRateUnavailable { 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); } @@ -11690,6 +12117,9 @@ class _$BdkError_FeeRateUnavailableImpl implements BdkError_FeeRateUnavailable { 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); } @@ -11745,6 +12175,9 @@ class _$BdkError_FeeRateUnavailableImpl implements BdkError_FeeRateUnavailable { 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) { @@ -11754,9 +12187,10 @@ class _$BdkError_FeeRateUnavailableImpl implements BdkError_FeeRateUnavailable { } } -abstract class BdkError_FeeRateUnavailable implements BdkError { +abstract class BdkError_FeeRateUnavailable extends BdkError { const factory BdkError_FeeRateUnavailable() = _$BdkError_FeeRateUnavailableImpl; + const BdkError_FeeRateUnavailable._() : super._(); } /// @nodoc @@ -11794,8 +12228,8 @@ class __$$BdkError_MissingKeyOriginImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_MissingKeyOriginImpl implements BdkError_MissingKeyOrigin { - const _$BdkError_MissingKeyOriginImpl(this.field0); +class _$BdkError_MissingKeyOriginImpl extends BdkError_MissingKeyOrigin { + const _$BdkError_MissingKeyOriginImpl(this.field0) : super._(); @override final String field0; @@ -11869,6 +12303,9 @@ class _$BdkError_MissingKeyOriginImpl implements BdkError_MissingKeyOrigin { 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); } @@ -11919,6 +12356,9 @@ class _$BdkError_MissingKeyOriginImpl implements BdkError_MissingKeyOrigin { 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); } @@ -11969,6 +12409,9 @@ class _$BdkError_MissingKeyOriginImpl implements BdkError_MissingKeyOrigin { 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) { @@ -12034,6 +12477,10 @@ class _$BdkError_MissingKeyOriginImpl implements BdkError_MissingKeyOrigin { 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); } @@ -12092,6 +12539,9 @@ class _$BdkError_MissingKeyOriginImpl implements BdkError_MissingKeyOrigin { 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); } @@ -12147,6 +12597,9 @@ class _$BdkError_MissingKeyOriginImpl implements BdkError_MissingKeyOrigin { 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) { @@ -12156,9 +12609,10 @@ class _$BdkError_MissingKeyOriginImpl implements BdkError_MissingKeyOrigin { } } -abstract class BdkError_MissingKeyOrigin implements BdkError { +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) @@ -12199,8 +12653,8 @@ class __$$BdkError_KeyImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_KeyImpl implements BdkError_Key { - const _$BdkError_KeyImpl(this.field0); +class _$BdkError_KeyImpl extends BdkError_Key { + const _$BdkError_KeyImpl(this.field0) : super._(); @override final String field0; @@ -12273,6 +12727,9 @@ class _$BdkError_KeyImpl implements BdkError_Key { 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); } @@ -12323,6 +12780,9 @@ class _$BdkError_KeyImpl implements BdkError_Key { 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); } @@ -12373,6 +12833,9 @@ class _$BdkError_KeyImpl implements BdkError_Key { 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) { @@ -12438,6 +12901,10 @@ class _$BdkError_KeyImpl implements BdkError_Key { 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); } @@ -12496,6 +12963,9 @@ class _$BdkError_KeyImpl implements BdkError_Key { 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); } @@ -12551,6 +13021,9 @@ class _$BdkError_KeyImpl implements BdkError_Key { 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) { @@ -12560,8 +13033,9 @@ class _$BdkError_KeyImpl implements BdkError_Key { } } -abstract class BdkError_Key implements BdkError { +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) @@ -12589,8 +13063,8 @@ class __$$BdkError_ChecksumMismatchImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_ChecksumMismatchImpl implements BdkError_ChecksumMismatch { - const _$BdkError_ChecksumMismatchImpl(); +class _$BdkError_ChecksumMismatchImpl extends BdkError_ChecksumMismatch { + const _$BdkError_ChecksumMismatchImpl() : super._(); @override String toString() { @@ -12653,6 +13127,9 @@ class _$BdkError_ChecksumMismatchImpl implements BdkError_ChecksumMismatch { 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(); } @@ -12703,6 +13180,9 @@ class _$BdkError_ChecksumMismatchImpl implements BdkError_ChecksumMismatch { 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(); } @@ -12753,6 +13233,9 @@ class _$BdkError_ChecksumMismatchImpl implements BdkError_ChecksumMismatch { 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) { @@ -12818,6 +13301,10 @@ class _$BdkError_ChecksumMismatchImpl implements BdkError_ChecksumMismatch { 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); } @@ -12876,6 +13363,9 @@ class _$BdkError_ChecksumMismatchImpl implements BdkError_ChecksumMismatch { 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); } @@ -12931,6 +13421,9 @@ class _$BdkError_ChecksumMismatchImpl implements BdkError_ChecksumMismatch { 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) { @@ -12940,8 +13433,9 @@ class _$BdkError_ChecksumMismatchImpl implements BdkError_ChecksumMismatch { } } -abstract class BdkError_ChecksumMismatch implements BdkError { +abstract class BdkError_ChecksumMismatch extends BdkError { const factory BdkError_ChecksumMismatch() = _$BdkError_ChecksumMismatchImpl; + const BdkError_ChecksumMismatch._() : super._(); } /// @nodoc @@ -12980,8 +13474,8 @@ class __$$BdkError_SpendingPolicyRequiredImplCopyWithImpl<$Res> /// @nodoc class _$BdkError_SpendingPolicyRequiredImpl - implements BdkError_SpendingPolicyRequired { - const _$BdkError_SpendingPolicyRequiredImpl(this.field0); + extends BdkError_SpendingPolicyRequired { + const _$BdkError_SpendingPolicyRequiredImpl(this.field0) : super._(); @override final KeychainKind field0; @@ -13056,6 +13550,9 @@ class _$BdkError_SpendingPolicyRequiredImpl 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); } @@ -13106,6 +13603,9 @@ class _$BdkError_SpendingPolicyRequiredImpl 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); } @@ -13156,6 +13656,9 @@ class _$BdkError_SpendingPolicyRequiredImpl 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) { @@ -13221,6 +13724,10 @@ class _$BdkError_SpendingPolicyRequiredImpl 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); } @@ -13279,6 +13786,9 @@ class _$BdkError_SpendingPolicyRequiredImpl 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); } @@ -13334,6 +13844,9 @@ class _$BdkError_SpendingPolicyRequiredImpl 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) { @@ -13343,9 +13856,10 @@ class _$BdkError_SpendingPolicyRequiredImpl } } -abstract class BdkError_SpendingPolicyRequired implements BdkError { +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) @@ -13390,8 +13904,8 @@ class __$$BdkError_InvalidPolicyPathErrorImplCopyWithImpl<$Res> /// @nodoc class _$BdkError_InvalidPolicyPathErrorImpl - implements BdkError_InvalidPolicyPathError { - const _$BdkError_InvalidPolicyPathErrorImpl(this.field0); + extends BdkError_InvalidPolicyPathError { + const _$BdkError_InvalidPolicyPathErrorImpl(this.field0) : super._(); @override final String field0; @@ -13466,6 +13980,9 @@ class _$BdkError_InvalidPolicyPathErrorImpl 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); } @@ -13516,6 +14033,9 @@ class _$BdkError_InvalidPolicyPathErrorImpl 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); } @@ -13566,6 +14086,9 @@ class _$BdkError_InvalidPolicyPathErrorImpl 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) { @@ -13631,6 +14154,10 @@ class _$BdkError_InvalidPolicyPathErrorImpl 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); } @@ -13689,6 +14216,9 @@ class _$BdkError_InvalidPolicyPathErrorImpl 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); } @@ -13744,6 +14274,9 @@ class _$BdkError_InvalidPolicyPathErrorImpl 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) { @@ -13753,9 +14286,10 @@ class _$BdkError_InvalidPolicyPathErrorImpl } } -abstract class BdkError_InvalidPolicyPathError implements BdkError { +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) @@ -13797,8 +14331,8 @@ class __$$BdkError_SignerImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_SignerImpl implements BdkError_Signer { - const _$BdkError_SignerImpl(this.field0); +class _$BdkError_SignerImpl extends BdkError_Signer { + const _$BdkError_SignerImpl(this.field0) : super._(); @override final String field0; @@ -13872,6 +14406,9 @@ class _$BdkError_SignerImpl implements BdkError_Signer { 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); } @@ -13922,6 +14459,9 @@ class _$BdkError_SignerImpl implements BdkError_Signer { 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); } @@ -13972,6 +14512,9 @@ class _$BdkError_SignerImpl implements BdkError_Signer { 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) { @@ -14037,6 +14580,10 @@ class _$BdkError_SignerImpl implements BdkError_Signer { 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); } @@ -14095,6 +14642,9 @@ class _$BdkError_SignerImpl implements BdkError_Signer { 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); } @@ -14150,6 +14700,9 @@ class _$BdkError_SignerImpl implements BdkError_Signer { 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) { @@ -14159,8 +14712,9 @@ class _$BdkError_SignerImpl implements BdkError_Signer { } } -abstract class BdkError_Signer implements BdkError { +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) @@ -14208,9 +14762,10 @@ class __$$BdkError_InvalidNetworkImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_InvalidNetworkImpl implements BdkError_InvalidNetwork { +class _$BdkError_InvalidNetworkImpl extends BdkError_InvalidNetwork { const _$BdkError_InvalidNetworkImpl( - {required this.requested, required this.found}); + {required this.requested, required this.found}) + : super._(); /// requested network, for example what is given as bdk-cli option @override @@ -14291,6 +14846,9 @@ class _$BdkError_InvalidNetworkImpl implements BdkError_InvalidNetwork { 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); } @@ -14341,6 +14899,9 @@ class _$BdkError_InvalidNetworkImpl implements BdkError_InvalidNetwork { 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); } @@ -14391,6 +14952,9 @@ class _$BdkError_InvalidNetworkImpl implements BdkError_InvalidNetwork { 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) { @@ -14456,6 +15020,10 @@ class _$BdkError_InvalidNetworkImpl implements BdkError_InvalidNetwork { 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); } @@ -14514,6 +15082,9 @@ class _$BdkError_InvalidNetworkImpl implements BdkError_InvalidNetwork { 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); } @@ -14569,6 +15140,9 @@ class _$BdkError_InvalidNetworkImpl implements BdkError_InvalidNetwork { 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) { @@ -14578,10 +15152,11 @@ class _$BdkError_InvalidNetworkImpl implements BdkError_InvalidNetwork { } } -abstract class BdkError_InvalidNetwork implements BdkError { +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; @@ -14628,8 +15203,8 @@ class __$$BdkError_InvalidOutpointImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_InvalidOutpointImpl implements BdkError_InvalidOutpoint { - const _$BdkError_InvalidOutpointImpl(this.field0); +class _$BdkError_InvalidOutpointImpl extends BdkError_InvalidOutpoint { + const _$BdkError_InvalidOutpointImpl(this.field0) : super._(); @override final OutPoint field0; @@ -14703,6 +15278,9 @@ class _$BdkError_InvalidOutpointImpl implements BdkError_InvalidOutpoint { 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); } @@ -14753,6 +15331,9 @@ class _$BdkError_InvalidOutpointImpl implements BdkError_InvalidOutpoint { 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); } @@ -14803,6 +15384,9 @@ class _$BdkError_InvalidOutpointImpl implements BdkError_InvalidOutpoint { 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) { @@ -14868,6 +15452,10 @@ class _$BdkError_InvalidOutpointImpl implements BdkError_InvalidOutpoint { 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); } @@ -14926,6 +15514,9 @@ class _$BdkError_InvalidOutpointImpl implements BdkError_InvalidOutpoint { 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); } @@ -14981,6 +15572,9 @@ class _$BdkError_InvalidOutpointImpl implements BdkError_InvalidOutpoint { 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) { @@ -14990,9 +15584,10 @@ class _$BdkError_InvalidOutpointImpl implements BdkError_InvalidOutpoint { } } -abstract class BdkError_InvalidOutpoint implements BdkError { +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) @@ -15033,8 +15628,8 @@ class __$$BdkError_EncodeImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_EncodeImpl implements BdkError_Encode { - const _$BdkError_EncodeImpl(this.field0); +class _$BdkError_EncodeImpl extends BdkError_Encode { + const _$BdkError_EncodeImpl(this.field0) : super._(); @override final String field0; @@ -15108,6 +15703,9 @@ class _$BdkError_EncodeImpl implements BdkError_Encode { 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); } @@ -15158,6 +15756,9 @@ class _$BdkError_EncodeImpl implements BdkError_Encode { 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); } @@ -15208,6 +15809,9 @@ class _$BdkError_EncodeImpl implements BdkError_Encode { 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) { @@ -15273,6 +15877,10 @@ class _$BdkError_EncodeImpl implements BdkError_Encode { 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); } @@ -15331,6 +15939,9 @@ class _$BdkError_EncodeImpl implements BdkError_Encode { 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); } @@ -15386,6 +15997,9 @@ class _$BdkError_EncodeImpl implements BdkError_Encode { 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) { @@ -15395,8 +16009,9 @@ class _$BdkError_EncodeImpl implements BdkError_Encode { } } -abstract class BdkError_Encode implements BdkError { +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) @@ -15437,8 +16052,8 @@ class __$$BdkError_MiniscriptImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_MiniscriptImpl implements BdkError_Miniscript { - const _$BdkError_MiniscriptImpl(this.field0); +class _$BdkError_MiniscriptImpl extends BdkError_Miniscript { + const _$BdkError_MiniscriptImpl(this.field0) : super._(); @override final String field0; @@ -15512,6 +16127,9 @@ class _$BdkError_MiniscriptImpl implements BdkError_Miniscript { 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); } @@ -15562,6 +16180,9 @@ class _$BdkError_MiniscriptImpl implements BdkError_Miniscript { 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); } @@ -15612,6 +16233,9 @@ class _$BdkError_MiniscriptImpl implements BdkError_Miniscript { 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) { @@ -15677,6 +16301,10 @@ class _$BdkError_MiniscriptImpl implements BdkError_Miniscript { 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); } @@ -15735,6 +16363,9 @@ class _$BdkError_MiniscriptImpl implements BdkError_Miniscript { 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); } @@ -15790,6 +16421,9 @@ class _$BdkError_MiniscriptImpl implements BdkError_Miniscript { 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) { @@ -15799,9 +16433,10 @@ class _$BdkError_MiniscriptImpl implements BdkError_Miniscript { } } -abstract class BdkError_Miniscript implements BdkError { +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) @@ -15844,8 +16479,8 @@ class __$$BdkError_MiniscriptPsbtImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_MiniscriptPsbtImpl implements BdkError_MiniscriptPsbt { - const _$BdkError_MiniscriptPsbtImpl(this.field0); +class _$BdkError_MiniscriptPsbtImpl extends BdkError_MiniscriptPsbt { + const _$BdkError_MiniscriptPsbtImpl(this.field0) : super._(); @override final String field0; @@ -15919,6 +16554,9 @@ class _$BdkError_MiniscriptPsbtImpl implements BdkError_MiniscriptPsbt { 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); } @@ -15969,6 +16607,9 @@ class _$BdkError_MiniscriptPsbtImpl implements BdkError_MiniscriptPsbt { 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); } @@ -16019,6 +16660,9 @@ class _$BdkError_MiniscriptPsbtImpl implements BdkError_MiniscriptPsbt { 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) { @@ -16084,6 +16728,10 @@ class _$BdkError_MiniscriptPsbtImpl implements BdkError_MiniscriptPsbt { 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); } @@ -16142,6 +16790,9 @@ class _$BdkError_MiniscriptPsbtImpl implements BdkError_MiniscriptPsbt { 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); } @@ -16197,6 +16848,9 @@ class _$BdkError_MiniscriptPsbtImpl implements BdkError_MiniscriptPsbt { 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) { @@ -16206,9 +16860,10 @@ class _$BdkError_MiniscriptPsbtImpl implements BdkError_MiniscriptPsbt { } } -abstract class BdkError_MiniscriptPsbt implements BdkError { +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) @@ -16249,8 +16904,8 @@ class __$$BdkError_Bip32ImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_Bip32Impl implements BdkError_Bip32 { - const _$BdkError_Bip32Impl(this.field0); +class _$BdkError_Bip32Impl extends BdkError_Bip32 { + const _$BdkError_Bip32Impl(this.field0) : super._(); @override final String field0; @@ -16324,6 +16979,9 @@ class _$BdkError_Bip32Impl implements BdkError_Bip32 { 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); } @@ -16374,6 +17032,9 @@ class _$BdkError_Bip32Impl implements BdkError_Bip32 { 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); } @@ -16424,6 +17085,9 @@ class _$BdkError_Bip32Impl implements BdkError_Bip32 { 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) { @@ -16489,6 +17153,10 @@ class _$BdkError_Bip32Impl implements BdkError_Bip32 { 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); } @@ -16547,6 +17215,9 @@ class _$BdkError_Bip32Impl implements BdkError_Bip32 { 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); } @@ -16602,6 +17273,9 @@ class _$BdkError_Bip32Impl implements BdkError_Bip32 { 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) { @@ -16611,8 +17285,9 @@ class _$BdkError_Bip32Impl implements BdkError_Bip32 { } } -abstract class BdkError_Bip32 implements BdkError { +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) @@ -16653,8 +17328,8 @@ class __$$BdkError_Bip39ImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_Bip39Impl implements BdkError_Bip39 { - const _$BdkError_Bip39Impl(this.field0); +class _$BdkError_Bip39Impl extends BdkError_Bip39 { + const _$BdkError_Bip39Impl(this.field0) : super._(); @override final String field0; @@ -16728,6 +17403,9 @@ class _$BdkError_Bip39Impl implements BdkError_Bip39 { 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); } @@ -16778,6 +17456,9 @@ class _$BdkError_Bip39Impl implements BdkError_Bip39 { 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); } @@ -16828,6 +17509,9 @@ class _$BdkError_Bip39Impl implements BdkError_Bip39 { 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) { @@ -16893,6 +17577,10 @@ class _$BdkError_Bip39Impl implements BdkError_Bip39 { 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); } @@ -16951,6 +17639,9 @@ class _$BdkError_Bip39Impl implements BdkError_Bip39 { 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); } @@ -17006,6 +17697,9 @@ class _$BdkError_Bip39Impl implements BdkError_Bip39 { 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) { @@ -17015,8 +17709,9 @@ class _$BdkError_Bip39Impl implements BdkError_Bip39 { } } -abstract class BdkError_Bip39 implements BdkError { +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) @@ -17057,8 +17752,8 @@ class __$$BdkError_Secp256k1ImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_Secp256k1Impl implements BdkError_Secp256k1 { - const _$BdkError_Secp256k1Impl(this.field0); +class _$BdkError_Secp256k1Impl extends BdkError_Secp256k1 { + const _$BdkError_Secp256k1Impl(this.field0) : super._(); @override final String field0; @@ -17132,6 +17827,9 @@ class _$BdkError_Secp256k1Impl implements BdkError_Secp256k1 { 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); } @@ -17182,6 +17880,9 @@ class _$BdkError_Secp256k1Impl implements BdkError_Secp256k1 { 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); } @@ -17232,6 +17933,9 @@ class _$BdkError_Secp256k1Impl implements BdkError_Secp256k1 { 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) { @@ -17297,6 +18001,10 @@ class _$BdkError_Secp256k1Impl implements BdkError_Secp256k1 { 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); } @@ -17355,6 +18063,9 @@ class _$BdkError_Secp256k1Impl implements BdkError_Secp256k1 { 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); } @@ -17410,6 +18121,9 @@ class _$BdkError_Secp256k1Impl implements BdkError_Secp256k1 { 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) { @@ -17419,9 +18133,10 @@ class _$BdkError_Secp256k1Impl implements BdkError_Secp256k1 { } } -abstract class BdkError_Secp256k1 implements BdkError { +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) @@ -17462,8 +18177,8 @@ class __$$BdkError_JsonImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_JsonImpl implements BdkError_Json { - const _$BdkError_JsonImpl(this.field0); +class _$BdkError_JsonImpl extends BdkError_Json { + const _$BdkError_JsonImpl(this.field0) : super._(); @override final String field0; @@ -17536,6 +18251,9 @@ class _$BdkError_JsonImpl implements BdkError_Json { 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); } @@ -17586,6 +18304,9 @@ class _$BdkError_JsonImpl implements BdkError_Json { 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); } @@ -17636,6 +18357,9 @@ class _$BdkError_JsonImpl implements BdkError_Json { 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) { @@ -17701,6 +18425,10 @@ class _$BdkError_JsonImpl implements BdkError_Json { 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); } @@ -17759,6 +18487,9 @@ class _$BdkError_JsonImpl implements BdkError_Json { 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); } @@ -17814,6 +18545,9 @@ class _$BdkError_JsonImpl implements BdkError_Json { 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) { @@ -17823,8 +18557,9 @@ class _$BdkError_JsonImpl implements BdkError_Json { } } -abstract class BdkError_Json implements BdkError { +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) @@ -17865,8 +18600,8 @@ class __$$BdkError_PsbtImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_PsbtImpl implements BdkError_Psbt { - const _$BdkError_PsbtImpl(this.field0); +class _$BdkError_PsbtImpl extends BdkError_Psbt { + const _$BdkError_PsbtImpl(this.field0) : super._(); @override final String field0; @@ -17939,6 +18674,9 @@ class _$BdkError_PsbtImpl implements BdkError_Psbt { 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); } @@ -17989,6 +18727,9 @@ class _$BdkError_PsbtImpl implements BdkError_Psbt { 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); } @@ -18039,6 +18780,9 @@ class _$BdkError_PsbtImpl implements BdkError_Psbt { 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) { @@ -18104,6 +18848,10 @@ class _$BdkError_PsbtImpl implements BdkError_Psbt { 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); } @@ -18162,6 +18910,9 @@ class _$BdkError_PsbtImpl implements BdkError_Psbt { 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); } @@ -18217,6 +18968,9 @@ class _$BdkError_PsbtImpl implements BdkError_Psbt { 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) { @@ -18226,8 +18980,9 @@ class _$BdkError_PsbtImpl implements BdkError_Psbt { } } -abstract class BdkError_Psbt implements BdkError { +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) @@ -18268,8 +19023,8 @@ class __$$BdkError_PsbtParseImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_PsbtParseImpl implements BdkError_PsbtParse { - const _$BdkError_PsbtParseImpl(this.field0); +class _$BdkError_PsbtParseImpl extends BdkError_PsbtParse { + const _$BdkError_PsbtParseImpl(this.field0) : super._(); @override final String field0; @@ -18343,6 +19098,9 @@ class _$BdkError_PsbtParseImpl implements BdkError_PsbtParse { 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); } @@ -18393,6 +19151,9 @@ class _$BdkError_PsbtParseImpl implements BdkError_PsbtParse { 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); } @@ -18443,6 +19204,9 @@ class _$BdkError_PsbtParseImpl implements BdkError_PsbtParse { 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) { @@ -18508,6 +19272,10 @@ class _$BdkError_PsbtParseImpl implements BdkError_PsbtParse { 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); } @@ -18566,6 +19334,9 @@ class _$BdkError_PsbtParseImpl implements BdkError_PsbtParse { 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); } @@ -18621,6 +19392,9 @@ class _$BdkError_PsbtParseImpl implements BdkError_PsbtParse { 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) { @@ -18630,9 +19404,10 @@ class _$BdkError_PsbtParseImpl implements BdkError_PsbtParse { } } -abstract class BdkError_PsbtParse implements BdkError { +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) @@ -18681,8 +19456,9 @@ class __$$BdkError_MissingCachedScriptsImplCopyWithImpl<$Res> /// @nodoc class _$BdkError_MissingCachedScriptsImpl - implements BdkError_MissingCachedScripts { - const _$BdkError_MissingCachedScriptsImpl(this.field0, this.field1); + extends BdkError_MissingCachedScripts { + const _$BdkError_MissingCachedScriptsImpl(this.field0, this.field1) + : super._(); @override final int field0; @@ -18760,6 +19536,9 @@ class _$BdkError_MissingCachedScriptsImpl 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); } @@ -18810,6 +19589,9 @@ class _$BdkError_MissingCachedScriptsImpl 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); } @@ -18860,6 +19642,9 @@ class _$BdkError_MissingCachedScriptsImpl 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) { @@ -18925,6 +19710,10 @@ class _$BdkError_MissingCachedScriptsImpl 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); } @@ -18983,6 +19772,9 @@ class _$BdkError_MissingCachedScriptsImpl 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); } @@ -19038,6 +19830,9 @@ class _$BdkError_MissingCachedScriptsImpl 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) { @@ -19047,9 +19842,10 @@ class _$BdkError_MissingCachedScriptsImpl } } -abstract class BdkError_MissingCachedScripts implements BdkError { +abstract class BdkError_MissingCachedScripts extends BdkError { const factory BdkError_MissingCachedScripts( final int field0, final int field1) = _$BdkError_MissingCachedScriptsImpl; + const BdkError_MissingCachedScripts._() : super._(); int get field0; int get field1; @@ -19092,8 +19888,8 @@ class __$$BdkError_ElectrumImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_ElectrumImpl implements BdkError_Electrum { - const _$BdkError_ElectrumImpl(this.field0); +class _$BdkError_ElectrumImpl extends BdkError_Electrum { + const _$BdkError_ElectrumImpl(this.field0) : super._(); @override final String field0; @@ -19167,6 +19963,9 @@ class _$BdkError_ElectrumImpl implements BdkError_Electrum { 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); } @@ -19217,6 +20016,9 @@ class _$BdkError_ElectrumImpl implements BdkError_Electrum { 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); } @@ -19267,6 +20069,9 @@ class _$BdkError_ElectrumImpl implements BdkError_Electrum { 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) { @@ -19332,6 +20137,10 @@ class _$BdkError_ElectrumImpl implements BdkError_Electrum { 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); } @@ -19390,6 +20199,9 @@ class _$BdkError_ElectrumImpl implements BdkError_Electrum { 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); } @@ -19445,6 +20257,9 @@ class _$BdkError_ElectrumImpl implements BdkError_Electrum { 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) { @@ -19454,9 +20269,10 @@ class _$BdkError_ElectrumImpl implements BdkError_Electrum { } } -abstract class BdkError_Electrum implements BdkError { +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) @@ -19497,8 +20313,8 @@ class __$$BdkError_EsploraImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_EsploraImpl implements BdkError_Esplora { - const _$BdkError_EsploraImpl(this.field0); +class _$BdkError_EsploraImpl extends BdkError_Esplora { + const _$BdkError_EsploraImpl(this.field0) : super._(); @override final String field0; @@ -19572,6 +20388,9 @@ class _$BdkError_EsploraImpl implements BdkError_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); } @@ -19622,6 +20441,9 @@ class _$BdkError_EsploraImpl implements BdkError_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); } @@ -19672,6 +20494,9 @@ class _$BdkError_EsploraImpl implements BdkError_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) { @@ -19737,6 +20562,10 @@ class _$BdkError_EsploraImpl implements BdkError_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); } @@ -19795,6 +20624,9 @@ class _$BdkError_EsploraImpl implements BdkError_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); } @@ -19850,6 +20682,9 @@ class _$BdkError_EsploraImpl implements BdkError_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) { @@ -19859,8 +20694,9 @@ class _$BdkError_EsploraImpl implements BdkError_Esplora { } } -abstract class BdkError_Esplora implements BdkError { +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) @@ -19901,8 +20737,8 @@ class __$$BdkError_SledImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_SledImpl implements BdkError_Sled { - const _$BdkError_SledImpl(this.field0); +class _$BdkError_SledImpl extends BdkError_Sled { + const _$BdkError_SledImpl(this.field0) : super._(); @override final String field0; @@ -19975,6 +20811,9 @@ class _$BdkError_SledImpl implements BdkError_Sled { 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); } @@ -20025,6 +20864,9 @@ class _$BdkError_SledImpl implements BdkError_Sled { 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); } @@ -20075,6 +20917,9 @@ class _$BdkError_SledImpl implements BdkError_Sled { 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) { @@ -20140,6 +20985,10 @@ class _$BdkError_SledImpl implements BdkError_Sled { 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); } @@ -20198,6 +21047,9 @@ class _$BdkError_SledImpl implements BdkError_Sled { 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); } @@ -20253,6 +21105,9 @@ class _$BdkError_SledImpl implements BdkError_Sled { 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) { @@ -20262,8 +21117,9 @@ class _$BdkError_SledImpl implements BdkError_Sled { } } -abstract class BdkError_Sled implements BdkError { +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) @@ -20304,8 +21160,8 @@ class __$$BdkError_RpcImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_RpcImpl implements BdkError_Rpc { - const _$BdkError_RpcImpl(this.field0); +class _$BdkError_RpcImpl extends BdkError_Rpc { + const _$BdkError_RpcImpl(this.field0) : super._(); @override final String field0; @@ -20378,6 +21234,9 @@ class _$BdkError_RpcImpl implements BdkError_Rpc { 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); } @@ -20428,6 +21287,9 @@ class _$BdkError_RpcImpl implements BdkError_Rpc { 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); } @@ -20478,6 +21340,9 @@ class _$BdkError_RpcImpl implements BdkError_Rpc { 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) { @@ -20543,6 +21408,10 @@ class _$BdkError_RpcImpl implements BdkError_Rpc { 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); } @@ -20601,6 +21470,9 @@ class _$BdkError_RpcImpl implements BdkError_Rpc { 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); } @@ -20656,6 +21528,9 @@ class _$BdkError_RpcImpl implements BdkError_Rpc { 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) { @@ -20665,8 +21540,9 @@ class _$BdkError_RpcImpl implements BdkError_Rpc { } } -abstract class BdkError_Rpc implements BdkError { +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) @@ -20707,8 +21583,8 @@ class __$$BdkError_RusqliteImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_RusqliteImpl implements BdkError_Rusqlite { - const _$BdkError_RusqliteImpl(this.field0); +class _$BdkError_RusqliteImpl extends BdkError_Rusqlite { + const _$BdkError_RusqliteImpl(this.field0) : super._(); @override final String field0; @@ -20782,6 +21658,9 @@ class _$BdkError_RusqliteImpl implements BdkError_Rusqlite { 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); } @@ -20832,6 +21711,9 @@ class _$BdkError_RusqliteImpl implements BdkError_Rusqlite { 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); } @@ -20882,6 +21764,9 @@ class _$BdkError_RusqliteImpl implements BdkError_Rusqlite { 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) { @@ -20947,6 +21832,10 @@ class _$BdkError_RusqliteImpl implements BdkError_Rusqlite { 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); } @@ -21005,6 +21894,9 @@ class _$BdkError_RusqliteImpl implements BdkError_Rusqlite { 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); } @@ -21060,6 +21952,9 @@ class _$BdkError_RusqliteImpl implements BdkError_Rusqlite { 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) { @@ -21069,9 +21964,10 @@ class _$BdkError_RusqliteImpl implements BdkError_Rusqlite { } } -abstract class BdkError_Rusqlite implements BdkError { +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) @@ -21079,6 +21975,1286 @@ abstract class BdkError_Rusqlite implements BdkError { 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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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 @@ -21205,8 +23381,8 @@ class __$$ConsensusError_IoImplCopyWithImpl<$Res> /// @nodoc -class _$ConsensusError_IoImpl implements ConsensusError_Io { - const _$ConsensusError_IoImpl(this.field0); +class _$ConsensusError_IoImpl extends ConsensusError_Io { + const _$ConsensusError_IoImpl(this.field0) : super._(); @override final String field0; @@ -21330,9 +23506,10 @@ class _$ConsensusError_IoImpl implements ConsensusError_Io { } } -abstract class ConsensusError_Io implements ConsensusError { +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) @@ -21382,9 +23559,10 @@ class __$$ConsensusError_OversizedVectorAllocationImplCopyWithImpl<$Res> /// @nodoc class _$ConsensusError_OversizedVectorAllocationImpl - implements ConsensusError_OversizedVectorAllocation { + extends ConsensusError_OversizedVectorAllocation { const _$ConsensusError_OversizedVectorAllocationImpl( - {required this.requested, required this.max}); + {required this.requested, required this.max}) + : super._(); @override final int requested; @@ -21514,11 +23692,11 @@ class _$ConsensusError_OversizedVectorAllocationImpl } } -abstract class ConsensusError_OversizedVectorAllocation - implements ConsensusError { +abstract class ConsensusError_OversizedVectorAllocation extends ConsensusError { const factory ConsensusError_OversizedVectorAllocation( {required final int requested, required final int max}) = _$ConsensusError_OversizedVectorAllocationImpl; + const ConsensusError_OversizedVectorAllocation._() : super._(); int get requested; int get max; @@ -21570,9 +23748,10 @@ class __$$ConsensusError_InvalidChecksumImplCopyWithImpl<$Res> /// @nodoc class _$ConsensusError_InvalidChecksumImpl - implements ConsensusError_InvalidChecksum { + extends ConsensusError_InvalidChecksum { const _$ConsensusError_InvalidChecksumImpl( - {required this.expected, required this.actual}); + {required this.expected, required this.actual}) + : super._(); @override final U8Array4 expected; @@ -21703,10 +23882,11 @@ class _$ConsensusError_InvalidChecksumImpl } } -abstract class ConsensusError_InvalidChecksum implements ConsensusError { +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; @@ -21738,8 +23918,8 @@ class __$$ConsensusError_NonMinimalVarIntImplCopyWithImpl<$Res> /// @nodoc class _$ConsensusError_NonMinimalVarIntImpl - implements ConsensusError_NonMinimalVarInt { - const _$ConsensusError_NonMinimalVarIntImpl(); + extends ConsensusError_NonMinimalVarInt { + const _$ConsensusError_NonMinimalVarIntImpl() : super._(); @override String toString() { @@ -21852,9 +24032,10 @@ class _$ConsensusError_NonMinimalVarIntImpl } } -abstract class ConsensusError_NonMinimalVarInt implements ConsensusError { +abstract class ConsensusError_NonMinimalVarInt extends ConsensusError { const factory ConsensusError_NonMinimalVarInt() = _$ConsensusError_NonMinimalVarIntImpl; + const ConsensusError_NonMinimalVarInt._() : super._(); } /// @nodoc @@ -21892,8 +24073,8 @@ class __$$ConsensusError_ParseFailedImplCopyWithImpl<$Res> /// @nodoc -class _$ConsensusError_ParseFailedImpl implements ConsensusError_ParseFailed { - const _$ConsensusError_ParseFailedImpl(this.field0); +class _$ConsensusError_ParseFailedImpl extends ConsensusError_ParseFailed { + const _$ConsensusError_ParseFailedImpl(this.field0) : super._(); @override final String field0; @@ -22017,9 +24198,10 @@ class _$ConsensusError_ParseFailedImpl implements ConsensusError_ParseFailed { } } -abstract class ConsensusError_ParseFailed implements ConsensusError { +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) @@ -22064,8 +24246,8 @@ class __$$ConsensusError_UnsupportedSegwitFlagImplCopyWithImpl<$Res> /// @nodoc class _$ConsensusError_UnsupportedSegwitFlagImpl - implements ConsensusError_UnsupportedSegwitFlag { - const _$ConsensusError_UnsupportedSegwitFlagImpl(this.field0); + extends ConsensusError_UnsupportedSegwitFlag { + const _$ConsensusError_UnsupportedSegwitFlagImpl(this.field0) : super._(); @override final int field0; @@ -22190,9 +24372,10 @@ class _$ConsensusError_UnsupportedSegwitFlagImpl } } -abstract class ConsensusError_UnsupportedSegwitFlag implements ConsensusError { +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) @@ -22353,8 +24536,8 @@ class __$$DescriptorError_InvalidHdKeyPathImplCopyWithImpl<$Res> /// @nodoc class _$DescriptorError_InvalidHdKeyPathImpl - implements DescriptorError_InvalidHdKeyPath { - const _$DescriptorError_InvalidHdKeyPathImpl(); + extends DescriptorError_InvalidHdKeyPath { + const _$DescriptorError_InvalidHdKeyPathImpl() : super._(); @override String toString() { @@ -22504,9 +24687,10 @@ class _$DescriptorError_InvalidHdKeyPathImpl } } -abstract class DescriptorError_InvalidHdKeyPath implements DescriptorError { +abstract class DescriptorError_InvalidHdKeyPath extends DescriptorError { const factory DescriptorError_InvalidHdKeyPath() = _$DescriptorError_InvalidHdKeyPathImpl; + const DescriptorError_InvalidHdKeyPath._() : super._(); } /// @nodoc @@ -22531,8 +24715,8 @@ class __$$DescriptorError_InvalidDescriptorChecksumImplCopyWithImpl<$Res> /// @nodoc class _$DescriptorError_InvalidDescriptorChecksumImpl - implements DescriptorError_InvalidDescriptorChecksum { - const _$DescriptorError_InvalidDescriptorChecksumImpl(); + extends DescriptorError_InvalidDescriptorChecksum { + const _$DescriptorError_InvalidDescriptorChecksumImpl() : super._(); @override String toString() { @@ -22683,9 +24867,10 @@ class _$DescriptorError_InvalidDescriptorChecksumImpl } abstract class DescriptorError_InvalidDescriptorChecksum - implements DescriptorError { + extends DescriptorError { const factory DescriptorError_InvalidDescriptorChecksum() = _$DescriptorError_InvalidDescriptorChecksumImpl; + const DescriptorError_InvalidDescriptorChecksum._() : super._(); } /// @nodoc @@ -22710,8 +24895,8 @@ class __$$DescriptorError_HardenedDerivationXpubImplCopyWithImpl<$Res> /// @nodoc class _$DescriptorError_HardenedDerivationXpubImpl - implements DescriptorError_HardenedDerivationXpub { - const _$DescriptorError_HardenedDerivationXpubImpl(); + extends DescriptorError_HardenedDerivationXpub { + const _$DescriptorError_HardenedDerivationXpubImpl() : super._(); @override String toString() { @@ -22861,10 +25046,10 @@ class _$DescriptorError_HardenedDerivationXpubImpl } } -abstract class DescriptorError_HardenedDerivationXpub - implements DescriptorError { +abstract class DescriptorError_HardenedDerivationXpub extends DescriptorError { const factory DescriptorError_HardenedDerivationXpub() = _$DescriptorError_HardenedDerivationXpubImpl; + const DescriptorError_HardenedDerivationXpub._() : super._(); } /// @nodoc @@ -22887,8 +25072,8 @@ class __$$DescriptorError_MultiPathImplCopyWithImpl<$Res> /// @nodoc -class _$DescriptorError_MultiPathImpl implements DescriptorError_MultiPath { - const _$DescriptorError_MultiPathImpl(); +class _$DescriptorError_MultiPathImpl extends DescriptorError_MultiPath { + const _$DescriptorError_MultiPathImpl() : super._(); @override String toString() { @@ -23038,8 +25223,9 @@ class _$DescriptorError_MultiPathImpl implements DescriptorError_MultiPath { } } -abstract class DescriptorError_MultiPath implements DescriptorError { +abstract class DescriptorError_MultiPath extends DescriptorError { const factory DescriptorError_MultiPath() = _$DescriptorError_MultiPathImpl; + const DescriptorError_MultiPath._() : super._(); } /// @nodoc @@ -23075,8 +25261,8 @@ class __$$DescriptorError_KeyImplCopyWithImpl<$Res> /// @nodoc -class _$DescriptorError_KeyImpl implements DescriptorError_Key { - const _$DescriptorError_KeyImpl(this.field0); +class _$DescriptorError_KeyImpl extends DescriptorError_Key { + const _$DescriptorError_KeyImpl(this.field0) : super._(); @override final String field0; @@ -23237,9 +25423,10 @@ class _$DescriptorError_KeyImpl implements DescriptorError_Key { } } -abstract class DescriptorError_Key implements DescriptorError { +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) @@ -23282,8 +25469,8 @@ class __$$DescriptorError_PolicyImplCopyWithImpl<$Res> /// @nodoc -class _$DescriptorError_PolicyImpl implements DescriptorError_Policy { - const _$DescriptorError_PolicyImpl(this.field0); +class _$DescriptorError_PolicyImpl extends DescriptorError_Policy { + const _$DescriptorError_PolicyImpl(this.field0) : super._(); @override final String field0; @@ -23444,9 +25631,10 @@ class _$DescriptorError_PolicyImpl implements DescriptorError_Policy { } } -abstract class DescriptorError_Policy implements DescriptorError { +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) @@ -23492,8 +25680,9 @@ class __$$DescriptorError_InvalidDescriptorCharacterImplCopyWithImpl<$Res> /// @nodoc class _$DescriptorError_InvalidDescriptorCharacterImpl - implements DescriptorError_InvalidDescriptorCharacter { - const _$DescriptorError_InvalidDescriptorCharacterImpl(this.field0); + extends DescriptorError_InvalidDescriptorCharacter { + const _$DescriptorError_InvalidDescriptorCharacterImpl(this.field0) + : super._(); @override final int field0; @@ -23658,9 +25847,10 @@ class _$DescriptorError_InvalidDescriptorCharacterImpl } abstract class DescriptorError_InvalidDescriptorCharacter - implements DescriptorError { + extends DescriptorError { const factory DescriptorError_InvalidDescriptorCharacter(final int field0) = _$DescriptorError_InvalidDescriptorCharacterImpl; + const DescriptorError_InvalidDescriptorCharacter._() : super._(); int get field0; @JsonKey(ignore: true) @@ -23703,8 +25893,8 @@ class __$$DescriptorError_Bip32ImplCopyWithImpl<$Res> /// @nodoc -class _$DescriptorError_Bip32Impl implements DescriptorError_Bip32 { - const _$DescriptorError_Bip32Impl(this.field0); +class _$DescriptorError_Bip32Impl extends DescriptorError_Bip32 { + const _$DescriptorError_Bip32Impl(this.field0) : super._(); @override final String field0; @@ -23865,9 +26055,10 @@ class _$DescriptorError_Bip32Impl implements DescriptorError_Bip32 { } } -abstract class DescriptorError_Bip32 implements DescriptorError { +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) @@ -23910,8 +26101,8 @@ class __$$DescriptorError_Base58ImplCopyWithImpl<$Res> /// @nodoc -class _$DescriptorError_Base58Impl implements DescriptorError_Base58 { - const _$DescriptorError_Base58Impl(this.field0); +class _$DescriptorError_Base58Impl extends DescriptorError_Base58 { + const _$DescriptorError_Base58Impl(this.field0) : super._(); @override final String field0; @@ -24072,9 +26263,10 @@ class _$DescriptorError_Base58Impl implements DescriptorError_Base58 { } } -abstract class DescriptorError_Base58 implements DescriptorError { +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) @@ -24115,8 +26307,8 @@ class __$$DescriptorError_PkImplCopyWithImpl<$Res> /// @nodoc -class _$DescriptorError_PkImpl implements DescriptorError_Pk { - const _$DescriptorError_PkImpl(this.field0); +class _$DescriptorError_PkImpl extends DescriptorError_Pk { + const _$DescriptorError_PkImpl(this.field0) : super._(); @override final String field0; @@ -24277,9 +26469,10 @@ class _$DescriptorError_PkImpl implements DescriptorError_Pk { } } -abstract class DescriptorError_Pk implements DescriptorError { +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) @@ -24323,8 +26516,8 @@ class __$$DescriptorError_MiniscriptImplCopyWithImpl<$Res> /// @nodoc -class _$DescriptorError_MiniscriptImpl implements DescriptorError_Miniscript { - const _$DescriptorError_MiniscriptImpl(this.field0); +class _$DescriptorError_MiniscriptImpl extends DescriptorError_Miniscript { + const _$DescriptorError_MiniscriptImpl(this.field0) : super._(); @override final String field0; @@ -24485,9 +26678,10 @@ class _$DescriptorError_MiniscriptImpl implements DescriptorError_Miniscript { } } -abstract class DescriptorError_Miniscript implements DescriptorError { +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) @@ -24528,8 +26722,8 @@ class __$$DescriptorError_HexImplCopyWithImpl<$Res> /// @nodoc -class _$DescriptorError_HexImpl implements DescriptorError_Hex { - const _$DescriptorError_HexImpl(this.field0); +class _$DescriptorError_HexImpl extends DescriptorError_Hex { + const _$DescriptorError_HexImpl(this.field0) : super._(); @override final String field0; @@ -24690,9 +26884,10 @@ class _$DescriptorError_HexImpl implements DescriptorError_Hex { } } -abstract class DescriptorError_Hex implements DescriptorError { +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) @@ -24820,8 +27015,8 @@ class __$$HexError_InvalidCharImplCopyWithImpl<$Res> /// @nodoc -class _$HexError_InvalidCharImpl implements HexError_InvalidChar { - const _$HexError_InvalidCharImpl(this.field0); +class _$HexError_InvalidCharImpl extends HexError_InvalidChar { + const _$HexError_InvalidCharImpl(this.field0) : super._(); @override final int field0; @@ -24919,9 +27114,10 @@ class _$HexError_InvalidCharImpl implements HexError_InvalidChar { } } -abstract class HexError_InvalidChar implements HexError { +abstract class HexError_InvalidChar extends HexError { const factory HexError_InvalidChar(final int field0) = _$HexError_InvalidCharImpl; + const HexError_InvalidChar._() : super._(); @override int get field0; @@ -24968,8 +27164,8 @@ class __$$HexError_OddLengthStringImplCopyWithImpl<$Res> /// @nodoc -class _$HexError_OddLengthStringImpl implements HexError_OddLengthString { - const _$HexError_OddLengthStringImpl(this.field0); +class _$HexError_OddLengthStringImpl extends HexError_OddLengthString { + const _$HexError_OddLengthStringImpl(this.field0) : super._(); @override final int field0; @@ -25066,9 +27262,10 @@ class _$HexError_OddLengthStringImpl implements HexError_OddLengthString { } } -abstract class HexError_OddLengthString implements HexError { +abstract class HexError_OddLengthString extends HexError { const factory HexError_OddLengthString(final int field0) = _$HexError_OddLengthStringImpl; + const HexError_OddLengthString._() : super._(); @override int get field0; @@ -25120,8 +27317,8 @@ class __$$HexError_InvalidLengthImplCopyWithImpl<$Res> /// @nodoc -class _$HexError_InvalidLengthImpl implements HexError_InvalidLength { - const _$HexError_InvalidLengthImpl(this.field0, this.field1); +class _$HexError_InvalidLengthImpl extends HexError_InvalidLength { + const _$HexError_InvalidLengthImpl(this.field0, this.field1) : super._(); @override final int field0; @@ -25221,9 +27418,10 @@ class _$HexError_InvalidLengthImpl implements HexError_InvalidLength { } } -abstract class HexError_InvalidLength implements HexError { +abstract class HexError_InvalidLength extends HexError { const factory HexError_InvalidLength(final int field0, final int field1) = _$HexError_InvalidLengthImpl; + const HexError_InvalidLength._() : super._(); @override int get field0; diff --git a/lib/src/utils/exceptions.dart b/lib/src/utils/exceptions.dart index 2dbb42d6..20ecbd44 100644 --- a/lib/src/utils/exceptions.dart +++ b/lib/src/utils/exceptions.dart @@ -271,6 +271,21 @@ class Bip39Exception extends BdkFfiException { 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}); +} + Exception mapToException(BdkError error) { return error.when( noUtxosSelected: () => NoUtxosSelectedException( @@ -346,5 +361,8 @@ Exception mapToException(BdkError error) { consensus: (e) => ConsensusError(message: e.toString()), address: (e) => AddressException(message: e.toString()), bip39: (e) => Bip39Exception(message: e.toString()), + invalidInput: (e) => InvalidInputException(message: e), + invalidLockTime: (e) => InvalidLockTimeException(message: e), + invalidTransaction: (e) => InvalidTransactionException(message: e), ); } diff --git a/rust/src/api/error.rs b/rust/src/api/error.rs index ca2f940a..57021f14 100644 --- a/rust/src/api/error.rs +++ b/rust/src/api/error.rs @@ -106,6 +106,9 @@ pub enum BdkError { Rpc(String), /// Rusqlite client error Rusqlite(String), + InvalidInput(String), + InvalidLockTime(String), + InvalidTransaction(String), } impl From for BdkError { @@ -351,4 +354,4 @@ impl From for BdkError { fn from(value: bdk::bitcoin::psbt::PsbtParseError) -> Self { BdkError::PsbtParse(value.to_string()) } -} +} \ No newline at end of file From c4c02913f4968dd866e0b316e0a4138ca5664fd5 Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Sun, 31 Mar 2024 14:04:00 -0400 Subject: [PATCH 06/27] renamed base classes --- lib/src/generated/api/blockchain.dart | 48 +- lib/src/generated/api/blockchain.freezed.dart | 43 +- lib/src/generated/api/descriptor.dart | 100 ++-- lib/src/generated/api/key.dart | 141 +++--- lib/src/generated/api/psbt.dart | 51 +- lib/src/generated/api/types.dart | 424 ++++++++--------- lib/src/generated/api/types.freezed.dart | 442 ++++++++++++++++-- lib/src/generated/api/wallet.dart | 119 +++-- rust/src/api/blockchain.rs | 24 +- rust/src/api/descriptor.rs | 26 +- rust/src/api/key.rs | 54 +-- rust/src/api/psbt.rs | 19 +- rust/src/api/types.rs | 340 +++++++++----- rust/src/api/wallet.rs | 107 +++-- 14 files changed, 1169 insertions(+), 769 deletions(-) diff --git a/lib/src/generated/api/blockchain.dart b/lib/src/generated/api/blockchain.dart index 72528466..d66bd784 100644 --- a/lib/src/generated/api/blockchain.dart +++ b/lib/src/generated/api/blockchain.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.28. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import @@ -22,16 +22,18 @@ class AnyBlockchain extends RustOpaque { static final _kStaticData = RustArcStaticData( rustArcIncrementStrongCount: - BdkCore.instance.api.rust_arc_increment_strong_count_AnyBlockchain, + CApi.instance.api.rust_arc_increment_strong_count_AnyBlockchain, rustArcDecrementStrongCount: - BdkCore.instance.api.rust_arc_decrement_strong_count_AnyBlockchain, + CApi.instance.api.rust_arc_decrement_strong_count_AnyBlockchain, rustArcDecrementStrongCountPtr: - BdkCore.instance.api.rust_arc_decrement_strong_count_AnyBlockchainPtr, + CApi.instance.api.rust_arc_decrement_strong_count_AnyBlockchainPtr, ); } @freezed sealed class Auth with _$Auth { + const Auth._(); + /// No authentication const factory Auth.none() = Auth_None; @@ -51,42 +53,34 @@ sealed class Auth with _$Auth { }) = Auth_Cookie; } -class BlockchainBase { +class BdkBlockchain { final AnyBlockchain ptr; - const BlockchainBase({ + const BdkBlockchain({ required this.ptr, }); Future broadcast( - {required TransactionBase transaction, dynamic hint}) => - BdkCore.instance.api.blockchainBaseBroadcast( - that: this, - transaction: transaction, - ); + {required BdkTransaction transaction, dynamic hint}) => + CApi.instance.api.bdkBlockchainBroadcast( + that: this, transaction: transaction, hint: hint); Future estimateFee({required int target, dynamic hint}) => - BdkCore.instance.api.blockchainBaseEstimateFee( - that: this, - target: target, - ); + CApi.instance.api + .bdkBlockchainEstimateFee(that: this, target: target, hint: hint); Future getBlockHash({required int height, dynamic hint}) => - BdkCore.instance.api.blockchainBaseGetBlockHash( - that: this, - height: height, - ); + CApi.instance.api + .bdkBlockchainGetBlockHash(that: this, height: height, hint: hint); Future getHeight({dynamic hint}) => - BdkCore.instance.api.blockchainBaseGetHeight( - that: this, - ); + CApi.instance.api.bdkBlockchainGetHeight(that: this, hint: hint); // HINT: Make it `#[frb(sync)]` to let it become the default constructor of Dart class. - static Future newInstance( + static Future newInstance( {required BlockchainConfig blockchainConfig, dynamic hint}) => - BdkCore.instance.api - .blockchainBaseNew(blockchainConfig: blockchainConfig, hint: hint); + CApi.instance.api + .bdkBlockchainNew(blockchainConfig: blockchainConfig, hint: hint); @override int get hashCode => ptr.hashCode; @@ -94,13 +88,15 @@ class BlockchainBase { @override bool operator ==(Object other) => identical(this, other) || - other is BlockchainBase && + 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, diff --git a/lib/src/generated/api/blockchain.freezed.dart b/lib/src/generated/api/blockchain.freezed.dart index 0f42238f..5fecef07 100644 --- a/lib/src/generated/api/blockchain.freezed.dart +++ b/lib/src/generated/api/blockchain.freezed.dart @@ -97,8 +97,8 @@ class __$$Auth_NoneImplCopyWithImpl<$Res> /// @nodoc -class _$Auth_NoneImpl implements Auth_None { - const _$Auth_NoneImpl(); +class _$Auth_NoneImpl extends Auth_None { + const _$Auth_NoneImpl() : super._(); @override String toString() { @@ -183,8 +183,9 @@ class _$Auth_NoneImpl implements Auth_None { } } -abstract class Auth_None implements Auth { +abstract class Auth_None extends Auth { const factory Auth_None() = _$Auth_NoneImpl; + const Auth_None._() : super._(); } /// @nodoc @@ -225,8 +226,9 @@ class __$$Auth_UserPassImplCopyWithImpl<$Res> /// @nodoc -class _$Auth_UserPassImpl implements Auth_UserPass { - const _$Auth_UserPassImpl({required this.username, required this.password}); +class _$Auth_UserPassImpl extends Auth_UserPass { + const _$Auth_UserPassImpl({required this.username, required this.password}) + : super._(); /// Username @override @@ -330,10 +332,11 @@ class _$Auth_UserPassImpl implements Auth_UserPass { } } -abstract class Auth_UserPass implements Auth { +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; @@ -378,8 +381,8 @@ class __$$Auth_CookieImplCopyWithImpl<$Res> /// @nodoc -class _$Auth_CookieImpl implements Auth_Cookie { - const _$Auth_CookieImpl({required this.file}); +class _$Auth_CookieImpl extends Auth_Cookie { + const _$Auth_CookieImpl({required this.file}) : super._(); /// Cookie file @override @@ -476,8 +479,9 @@ class _$Auth_CookieImpl implements Auth_Cookie { } } -abstract class Auth_Cookie implements Auth { +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; @@ -589,8 +593,8 @@ class __$$BlockchainConfig_ElectrumImplCopyWithImpl<$Res> /// @nodoc -class _$BlockchainConfig_ElectrumImpl implements BlockchainConfig_Electrum { - const _$BlockchainConfig_ElectrumImpl({required this.config}); +class _$BlockchainConfig_ElectrumImpl extends BlockchainConfig_Electrum { + const _$BlockchainConfig_ElectrumImpl({required this.config}) : super._(); @override final ElectrumConfig config; @@ -687,9 +691,10 @@ class _$BlockchainConfig_ElectrumImpl implements BlockchainConfig_Electrum { } } -abstract class BlockchainConfig_Electrum implements BlockchainConfig { +abstract class BlockchainConfig_Electrum extends BlockchainConfig { const factory BlockchainConfig_Electrum( {required final ElectrumConfig config}) = _$BlockchainConfig_ElectrumImpl; + const BlockchainConfig_Electrum._() : super._(); @override ElectrumConfig get config; @@ -733,8 +738,8 @@ class __$$BlockchainConfig_EsploraImplCopyWithImpl<$Res> /// @nodoc -class _$BlockchainConfig_EsploraImpl implements BlockchainConfig_Esplora { - const _$BlockchainConfig_EsploraImpl({required this.config}); +class _$BlockchainConfig_EsploraImpl extends BlockchainConfig_Esplora { + const _$BlockchainConfig_EsploraImpl({required this.config}) : super._(); @override final EsploraConfig config; @@ -831,9 +836,10 @@ class _$BlockchainConfig_EsploraImpl implements BlockchainConfig_Esplora { } } -abstract class BlockchainConfig_Esplora implements BlockchainConfig { +abstract class BlockchainConfig_Esplora extends BlockchainConfig { const factory BlockchainConfig_Esplora( {required final EsploraConfig config}) = _$BlockchainConfig_EsploraImpl; + const BlockchainConfig_Esplora._() : super._(); @override EsploraConfig get config; @@ -875,8 +881,8 @@ class __$$BlockchainConfig_RpcImplCopyWithImpl<$Res> /// @nodoc -class _$BlockchainConfig_RpcImpl implements BlockchainConfig_Rpc { - const _$BlockchainConfig_RpcImpl({required this.config}); +class _$BlockchainConfig_RpcImpl extends BlockchainConfig_Rpc { + const _$BlockchainConfig_RpcImpl({required this.config}) : super._(); @override final RpcConfig config; @@ -974,9 +980,10 @@ class _$BlockchainConfig_RpcImpl implements BlockchainConfig_Rpc { } } -abstract class BlockchainConfig_Rpc implements BlockchainConfig { +abstract class BlockchainConfig_Rpc extends BlockchainConfig { const factory BlockchainConfig_Rpc({required final RpcConfig config}) = _$BlockchainConfig_RpcImpl; + const BlockchainConfig_Rpc._() : super._(); @override RpcConfig get config; diff --git a/lib/src/generated/api/descriptor.dart b/lib/src/generated/api/descriptor.dart index e21c01b7..4691f4dc 100644 --- a/lib/src/generated/api/descriptor.dart +++ b/lib/src/generated/api/descriptor.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.28. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import @@ -21,11 +21,11 @@ class ExtendedDescriptor extends RustOpaque { static final _kStaticData = RustArcStaticData( rustArcIncrementStrongCount: - BdkCore.instance.api.rust_arc_increment_strong_count_ExtendedDescriptor, + CApi.instance.api.rust_arc_increment_strong_count_ExtendedDescriptor, rustArcDecrementStrongCount: - BdkCore.instance.api.rust_arc_decrement_strong_count_ExtendedDescriptor, - rustArcDecrementStrongCountPtr: BdkCore - .instance.api.rust_arc_decrement_strong_count_ExtendedDescriptorPtr, + CApi.instance.api.rust_arc_decrement_strong_count_ExtendedDescriptor, + rustArcDecrementStrongCountPtr: + CApi.instance.api.rust_arc_decrement_strong_count_ExtendedDescriptorPtr, ); } @@ -39,11 +39,11 @@ class KeysDescriptorPublicKey extends RustOpaque { : super.sseDecode(ptr, externalSizeOnNative, _kStaticData); static final _kStaticData = RustArcStaticData( - rustArcIncrementStrongCount: BdkCore + rustArcIncrementStrongCount: CApi .instance.api.rust_arc_increment_strong_count_KeysDescriptorPublicKey, - rustArcDecrementStrongCount: BdkCore + rustArcDecrementStrongCount: CApi .instance.api.rust_arc_decrement_strong_count_KeysDescriptorPublicKey, - rustArcDecrementStrongCountPtr: BdkCore.instance.api + rustArcDecrementStrongCountPtr: CApi.instance.api .rust_arc_decrement_strong_count_KeysDescriptorPublicKeyPtr, ); } @@ -58,11 +58,11 @@ class KeysDescriptorSecretKey extends RustOpaque { : super.sseDecode(ptr, externalSizeOnNative, _kStaticData); static final _kStaticData = RustArcStaticData( - rustArcIncrementStrongCount: BdkCore + rustArcIncrementStrongCount: CApi .instance.api.rust_arc_increment_strong_count_KeysDescriptorSecretKey, - rustArcDecrementStrongCount: BdkCore + rustArcDecrementStrongCount: CApi .instance.api.rust_arc_decrement_strong_count_KeysDescriptorSecretKey, - rustArcDecrementStrongCountPtr: BdkCore.instance.api + rustArcDecrementStrongCountPtr: CApi.instance.api .rust_arc_decrement_strong_count_KeysDescriptorSecretKeyPtr, ); } @@ -78,136 +78,130 @@ class KeysKeyMap extends RustOpaque { static final _kStaticData = RustArcStaticData( rustArcIncrementStrongCount: - BdkCore.instance.api.rust_arc_increment_strong_count_KeysKeyMap, + CApi.instance.api.rust_arc_increment_strong_count_KeysKeyMap, rustArcDecrementStrongCount: - BdkCore.instance.api.rust_arc_decrement_strong_count_KeysKeyMap, + CApi.instance.api.rust_arc_decrement_strong_count_KeysKeyMap, rustArcDecrementStrongCountPtr: - BdkCore.instance.api.rust_arc_decrement_strong_count_KeysKeyMapPtr, + CApi.instance.api.rust_arc_decrement_strong_count_KeysKeyMapPtr, ); } -class DescriptorBase { +class BdkDescriptor { final ExtendedDescriptor extendedDescriptor; final KeysKeyMap keyMap; - const DescriptorBase({ + const BdkDescriptor({ required this.extendedDescriptor, required this.keyMap, }); Future asString({dynamic hint}) => - BdkCore.instance.api.descriptorBaseAsString( - that: this, - ); + CApi.instance.api.bdkDescriptorAsString(that: this, hint: hint); Future asStringPrivate({dynamic hint}) => - BdkCore.instance.api.descriptorBaseAsStringPrivate( - that: this, - ); + CApi.instance.api.bdkDescriptorAsStringPrivate(that: this, hint: hint); - Future maxSatisfactionWeight({dynamic hint}) => - BdkCore.instance.api.descriptorBaseMaxSatisfactionWeight( - that: this, - ); + Future maxSatisfactionWeight({dynamic hint}) => CApi.instance.api + .bdkDescriptorMaxSatisfactionWeight(that: this, hint: hint); // HINT: Make it `#[frb(sync)]` to let it become the default constructor of Dart class. - static Future newInstance( + static Future newInstance( {required String descriptor, required Network network, dynamic hint}) => - BdkCore.instance.api.descriptorBaseNew( + CApi.instance.api.bdkDescriptorNew( descriptor: descriptor, network: network, hint: hint); - static Future newBip44( - {required DescriptorSecretKeyBase secretKey, + static Future newBip44( + {required BdkDescriptorSecretKey secretKey, required KeychainKind keychainKind, required Network network, dynamic hint}) => - BdkCore.instance.api.descriptorBaseNewBip44( + CApi.instance.api.bdkDescriptorNewBip44( secretKey: secretKey, keychainKind: keychainKind, network: network, hint: hint); - static Future newBip44Public( - {required DescriptorPublicKeyBase publicKey, + static Future newBip44Public( + {required BdkDescriptorPublicKey publicKey, required String fingerprint, required KeychainKind keychainKind, required Network network, dynamic hint}) => - BdkCore.instance.api.descriptorBaseNewBip44Public( + CApi.instance.api.bdkDescriptorNewBip44Public( publicKey: publicKey, fingerprint: fingerprint, keychainKind: keychainKind, network: network, hint: hint); - static Future newBip49( - {required DescriptorSecretKeyBase secretKey, + static Future newBip49( + {required BdkDescriptorSecretKey secretKey, required KeychainKind keychainKind, required Network network, dynamic hint}) => - BdkCore.instance.api.descriptorBaseNewBip49( + CApi.instance.api.bdkDescriptorNewBip49( secretKey: secretKey, keychainKind: keychainKind, network: network, hint: hint); - static Future newBip49Public( - {required DescriptorPublicKeyBase publicKey, + static Future newBip49Public( + {required BdkDescriptorPublicKey publicKey, required String fingerprint, required KeychainKind keychainKind, required Network network, dynamic hint}) => - BdkCore.instance.api.descriptorBaseNewBip49Public( + CApi.instance.api.bdkDescriptorNewBip49Public( publicKey: publicKey, fingerprint: fingerprint, keychainKind: keychainKind, network: network, hint: hint); - static Future newBip84( - {required DescriptorSecretKeyBase secretKey, + static Future newBip84( + {required BdkDescriptorSecretKey secretKey, required KeychainKind keychainKind, required Network network, dynamic hint}) => - BdkCore.instance.api.descriptorBaseNewBip84( + CApi.instance.api.bdkDescriptorNewBip84( secretKey: secretKey, keychainKind: keychainKind, network: network, hint: hint); - static Future newBip84Public( - {required DescriptorPublicKeyBase publicKey, + static Future newBip84Public( + {required BdkDescriptorPublicKey publicKey, required String fingerprint, required KeychainKind keychainKind, required Network network, dynamic hint}) => - BdkCore.instance.api.descriptorBaseNewBip84Public( + CApi.instance.api.bdkDescriptorNewBip84Public( publicKey: publicKey, fingerprint: fingerprint, keychainKind: keychainKind, network: network, hint: hint); - static Future newBip86( - {required DescriptorSecretKeyBase secretKey, + static Future newBip86( + {required BdkDescriptorSecretKey secretKey, required KeychainKind keychainKind, required Network network, dynamic hint}) => - BdkCore.instance.api.descriptorBaseNewBip86( + CApi.instance.api.bdkDescriptorNewBip86( secretKey: secretKey, keychainKind: keychainKind, network: network, hint: hint); - static Future newBip86Public( - {required DescriptorPublicKeyBase publicKey, + static Future newBip86Public( + {required BdkDescriptorPublicKey publicKey, required String fingerprint, required KeychainKind keychainKind, required Network network, dynamic hint}) => - BdkCore.instance.api.descriptorBaseNewBip86Public( + CApi.instance.api.bdkDescriptorNewBip86Public( publicKey: publicKey, fingerprint: fingerprint, keychainKind: keychainKind, @@ -220,7 +214,7 @@ class DescriptorBase { @override bool operator ==(Object other) => identical(this, other) || - other is DescriptorBase && + other is BdkDescriptor && runtimeType == other.runtimeType && extendedDescriptor == other.extendedDescriptor && keyMap == other.keyMap; diff --git a/lib/src/generated/api/key.dart b/lib/src/generated/api/key.dart index 24dce7e8..41cd51f9 100644 --- a/lib/src/generated/api/key.dart +++ b/lib/src/generated/api/key.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.28. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import @@ -20,11 +20,11 @@ class BitcoinBip32DerivationPath extends RustOpaque { : super.sseDecode(ptr, externalSizeOnNative, _kStaticData); static final _kStaticData = RustArcStaticData( - rustArcIncrementStrongCount: BdkCore.instance.api + rustArcIncrementStrongCount: CApi.instance.api .rust_arc_increment_strong_count_BitcoinBip32DerivationPath, - rustArcDecrementStrongCount: BdkCore.instance.api + rustArcDecrementStrongCount: CApi.instance.api .rust_arc_decrement_strong_count_BitcoinBip32DerivationPath, - rustArcDecrementStrongCountPtr: BdkCore.instance.api + rustArcDecrementStrongCountPtr: CApi.instance.api .rust_arc_decrement_strong_count_BitcoinBip32DerivationPathPtr, ); } @@ -40,24 +40,24 @@ class KeysBip39Mnemonic extends RustOpaque { static final _kStaticData = RustArcStaticData( rustArcIncrementStrongCount: - BdkCore.instance.api.rust_arc_increment_strong_count_KeysBip39Mnemonic, + CApi.instance.api.rust_arc_increment_strong_count_KeysBip39Mnemonic, rustArcDecrementStrongCount: - BdkCore.instance.api.rust_arc_decrement_strong_count_KeysBip39Mnemonic, - rustArcDecrementStrongCountPtr: BdkCore - .instance.api.rust_arc_decrement_strong_count_KeysBip39MnemonicPtr, + CApi.instance.api.rust_arc_decrement_strong_count_KeysBip39Mnemonic, + rustArcDecrementStrongCountPtr: + CApi.instance.api.rust_arc_decrement_strong_count_KeysBip39MnemonicPtr, ); } -class DerivationPathBase { +class BdkDerivationPath { final BitcoinBip32DerivationPath ptr; - const DerivationPathBase({ + const BdkDerivationPath({ required this.ptr, }); - static Future fromString( + static Future fromString( {required String path, dynamic hint}) => - BdkCore.instance.api.derivationPathBaseFromString(path: path, hint: hint); + CApi.instance.api.bdkDerivationPathFromString(path: path, hint: hint); @override int get hashCode => ptr.hashCode; @@ -65,41 +65,39 @@ class DerivationPathBase { @override bool operator ==(Object other) => identical(this, other) || - other is DerivationPathBase && + other is BdkDerivationPath && runtimeType == other.runtimeType && ptr == other.ptr; } -class DescriptorPublicKeyBase { +class BdkDescriptorPublicKey { final KeysDescriptorPublicKey ptr; - const DescriptorPublicKeyBase({ + const BdkDescriptorPublicKey({ required this.ptr, }); Future asString({dynamic hint}) => - BdkCore.instance.api.descriptorPublicKeyBaseAsString( - that: this, - ); + CApi.instance.api.bdkDescriptorPublicKeyAsString(that: this, hint: hint); - static Future derive( - {required DescriptorPublicKeyBase ptr, - required DerivationPathBase path, + static Future derive( + {required BdkDescriptorPublicKey ptr, + required BdkDerivationPath path, dynamic hint}) => - BdkCore.instance.api - .descriptorPublicKeyBaseDerive(ptr: ptr, path: path, hint: hint); + CApi.instance.api + .bdkDescriptorPublicKeyDerive(ptr: ptr, path: path, hint: hint); - static Future extend( - {required DescriptorPublicKeyBase ptr, - required DerivationPathBase path, + static Future extend( + {required BdkDescriptorPublicKey ptr, + required BdkDerivationPath path, dynamic hint}) => - BdkCore.instance.api - .descriptorPublicKeyBaseExtend(ptr: ptr, path: path, hint: hint); + CApi.instance.api + .bdkDescriptorPublicKeyExtend(ptr: ptr, path: path, hint: hint); - static Future fromString( + static Future fromString( {required String publicKey, dynamic hint}) => - BdkCore.instance.api - .descriptorPublicKeyBaseFromString(publicKey: publicKey, hint: hint); + CApi.instance.api + .bdkDescriptorPublicKeyFromString(publicKey: publicKey, hint: hint); @override int get hashCode => ptr.hashCode; @@ -107,60 +105,55 @@ class DescriptorPublicKeyBase { @override bool operator ==(Object other) => identical(this, other) || - other is DescriptorPublicKeyBase && + other is BdkDescriptorPublicKey && runtimeType == other.runtimeType && ptr == other.ptr; } -class DescriptorSecretKeyBase { +class BdkDescriptorSecretKey { final KeysDescriptorSecretKey ptr; - const DescriptorSecretKeyBase({ + const BdkDescriptorSecretKey({ required this.ptr, }); - static Future asPublic( - {required DescriptorSecretKeyBase ptr, dynamic hint}) => - BdkCore.instance.api - .descriptorSecretKeyBaseAsPublic(ptr: ptr, hint: hint); + static Future asPublic( + {required BdkDescriptorSecretKey ptr, dynamic hint}) => + CApi.instance.api.bdkDescriptorSecretKeyAsPublic(ptr: ptr, hint: hint); Future asString({dynamic hint}) => - BdkCore.instance.api.descriptorSecretKeyBaseAsString( - that: this, - ); + CApi.instance.api.bdkDescriptorSecretKeyAsString(that: this, hint: hint); - static Future create( + static Future create( {required Network network, - required MnemonicBase mnemonic, + required BdkMnemonic mnemonic, String? password, dynamic hint}) => - BdkCore.instance.api.descriptorSecretKeyBaseCreate( + CApi.instance.api.bdkDescriptorSecretKeyCreate( network: network, mnemonic: mnemonic, password: password, hint: hint); - static Future derive( - {required DescriptorSecretKeyBase ptr, - required DerivationPathBase path, + static Future derive( + {required BdkDescriptorSecretKey ptr, + required BdkDerivationPath path, dynamic hint}) => - BdkCore.instance.api - .descriptorSecretKeyBaseDerive(ptr: ptr, path: path, hint: hint); + CApi.instance.api + .bdkDescriptorSecretKeyDerive(ptr: ptr, path: path, hint: hint); - static Future extend( - {required DescriptorSecretKeyBase ptr, - required DerivationPathBase path, + static Future extend( + {required BdkDescriptorSecretKey ptr, + required BdkDerivationPath path, dynamic hint}) => - BdkCore.instance.api - .descriptorSecretKeyBaseExtend(ptr: ptr, path: path, hint: hint); + CApi.instance.api + .bdkDescriptorSecretKeyExtend(ptr: ptr, path: path, hint: hint); - static Future fromString( + static Future fromString( {required String secretKey, dynamic hint}) => - BdkCore.instance.api - .descriptorSecretKeyBaseFromString(secretKey: secretKey, hint: hint); + CApi.instance.api + .bdkDescriptorSecretKeyFromString(secretKey: secretKey, hint: hint); /// Get the private key as bytes. - Future secretBytes({dynamic hint}) => - BdkCore.instance.api.descriptorSecretKeyBaseSecretBytes( - that: this, - ); + Future secretBytes({dynamic hint}) => CApi.instance.api + .bdkDescriptorSecretKeySecretBytes(that: this, hint: hint); @override int get hashCode => ptr.hashCode; @@ -168,42 +161,38 @@ class DescriptorSecretKeyBase { @override bool operator ==(Object other) => identical(this, other) || - other is DescriptorSecretKeyBase && + other is BdkDescriptorSecretKey && runtimeType == other.runtimeType && ptr == other.ptr; } -class MnemonicBase { +class BdkMnemonic { final KeysBip39Mnemonic ptr; - const MnemonicBase({ + const BdkMnemonic({ required this.ptr, }); /// Returns Mnemonic as string Future asString({dynamic hint}) => - BdkCore.instance.api.mnemonicBaseAsString( - that: this, - ); + CApi.instance.api.bdkMnemonicAsString(that: this, hint: hint); /// 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( + static Future fromEntropy( {required List entropy, dynamic hint}) => - BdkCore.instance.api - .mnemonicBaseFromEntropy(entropy: entropy, hint: hint); + CApi.instance.api.bdkMnemonicFromEntropy(entropy: entropy, hint: hint); /// Parse a Mnemonic with given string - static Future fromString( + static Future fromString( {required String mnemonic, dynamic hint}) => - BdkCore.instance.api - .mnemonicBaseFromString(mnemonic: mnemonic, hint: hint); + CApi.instance.api.bdkMnemonicFromString(mnemonic: mnemonic, hint: hint); // HINT: Make it `#[frb(sync)]` to let it become the default constructor of Dart class. /// Generates Mnemonic with a random entropy - static Future newInstance( + static Future newInstance( {required WordCount wordCount, dynamic hint}) => - BdkCore.instance.api.mnemonicBaseNew(wordCount: wordCount, hint: hint); + CApi.instance.api.bdkMnemonicNew(wordCount: wordCount, hint: hint); @override int get hashCode => ptr.hashCode; @@ -211,7 +200,7 @@ class MnemonicBase { @override bool operator ==(Object other) => identical(this, other) || - other is MnemonicBase && + 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 index 3b2286a6..67a75d30 100644 --- a/lib/src/generated/api/psbt.dart +++ b/lib/src/generated/api/psbt.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.28. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import @@ -19,67 +19,58 @@ class MutexPartiallySignedTransaction extends RustOpaque { : super.sseDecode(ptr, externalSizeOnNative, _kStaticData); static final _kStaticData = RustArcStaticData( - rustArcIncrementStrongCount: BdkCore.instance.api + rustArcIncrementStrongCount: CApi.instance.api .rust_arc_increment_strong_count_MutexPartiallySignedTransaction, - rustArcDecrementStrongCount: BdkCore.instance.api + rustArcDecrementStrongCount: CApi.instance.api .rust_arc_decrement_strong_count_MutexPartiallySignedTransaction, - rustArcDecrementStrongCountPtr: BdkCore.instance.api + rustArcDecrementStrongCountPtr: CApi.instance.api .rust_arc_decrement_strong_count_MutexPartiallySignedTransactionPtr, ); } -class PsbtBase { +class BdkPsbt { final MutexPartiallySignedTransaction ptr; - const PsbtBase({ + const BdkPsbt({ required this.ptr, }); /// 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 PsbtBase ptr, required PsbtBase other, dynamic hint}) => - BdkCore.instance.api.psbtBaseCombine(ptr: ptr, other: other, hint: hint); + static Future combine( + {required BdkPsbt ptr, required BdkPsbt other, dynamic hint}) => + CApi.instance.api.bdkPsbtCombine(ptr: ptr, other: other, hint: hint); /// Return the transaction. - static Future extractTx( - {required PsbtBase ptr, dynamic hint}) => - BdkCore.instance.api.psbtBaseExtractTx(ptr: ptr, hint: hint); + static Future extractTx( + {required BdkPsbt ptr, dynamic hint}) => + CApi.instance.api.bdkPsbtExtractTx(ptr: ptr, hint: hint); /// 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. Future feeAmount({dynamic hint}) => - BdkCore.instance.api.psbtBaseFeeAmount( - that: this, - ); + CApi.instance.api.bdkPsbtFeeAmount(that: this, hint: hint); /// 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. Future feeRate({dynamic hint}) => - BdkCore.instance.api.psbtBaseFeeRate( - that: this, - ); + CApi.instance.api.bdkPsbtFeeRate(that: this, hint: hint); - static Future fromStr({required String psbtBase64, dynamic hint}) => - BdkCore.instance.api.psbtBaseFromStr(psbtBase64: psbtBase64, hint: hint); + static Future fromStr({required String psbtBase64, dynamic hint}) => + CApi.instance.api.bdkPsbtFromStr(psbtBase64: psbtBase64, hint: hint); /// Serialize the PSBT data structure as a String of JSON. Future jsonSerialize({dynamic hint}) => - BdkCore.instance.api.psbtBaseJsonSerialize( - that: this, - ); + CApi.instance.api.bdkPsbtJsonSerialize(that: this, hint: hint); Future serialize({dynamic hint}) => - BdkCore.instance.api.psbtBaseSerialize( - that: this, - ); + CApi.instance.api.bdkPsbtSerialize(that: this, hint: hint); - Future txid({dynamic hint}) => BdkCore.instance.api.psbtBaseTxid( - that: this, - ); + Future txid({dynamic hint}) => + CApi.instance.api.bdkPsbtTxid(that: this, hint: hint); @override int get hashCode => ptr.hashCode; @@ -87,5 +78,5 @@ class PsbtBase { @override bool operator ==(Object other) => identical(this, other) || - other is PsbtBase && runtimeType == other.runtimeType && ptr == other.ptr; + 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 index baf866ea..fe8e99f3 100644 --- a/lib/src/generated/api/types.dart +++ b/lib/src/generated/api/types.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.28. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import @@ -21,78 +21,18 @@ class BdkBitcoinAddress extends RustOpaque { static final _kStaticData = RustArcStaticData( rustArcIncrementStrongCount: - BdkCore.instance.api.rust_arc_increment_strong_count_BdkBitcoinAddress, + CApi.instance.api.rust_arc_increment_strong_count_BdkBitcoinAddress, rustArcDecrementStrongCount: - BdkCore.instance.api.rust_arc_decrement_strong_count_BdkBitcoinAddress, - rustArcDecrementStrongCountPtr: BdkCore - .instance.api.rust_arc_decrement_strong_count_BdkBitcoinAddressPtr, + CApi.instance.api.rust_arc_decrement_strong_count_BdkBitcoinAddress, + rustArcDecrementStrongCountPtr: + CApi.instance.api.rust_arc_decrement_strong_count_BdkBitcoinAddressPtr, ); } -class AddressBase { - final BdkBitcoinAddress ptr; - - const AddressBase({ - required this.ptr, - }); - - Future asString({dynamic hint}) => - BdkCore.instance.api.addressBaseAsString( - that: this, - ); - - static Future fromScript( - {required ScriptBufBase script, - required Network network, - dynamic hint}) => - BdkCore.instance.api - .addressBaseFromScript(script: script, network: network, hint: hint); - - static Future fromString( - {required String address, required Network network, dynamic hint}) => - BdkCore.instance.api.addressBaseFromString( - address: address, network: network, hint: hint); - - Future isValidForNetwork({required Network network, dynamic hint}) => - BdkCore.instance.api.addressBaseIsValidForNetwork( - that: this, - network: network, - ); - - ///The network on which this address is usable. - Future network({dynamic hint}) => - BdkCore.instance.api.addressBaseNetwork( - that: this, - ); - - Future payload({dynamic hint}) => - BdkCore.instance.api.addressBasePayload( - that: this, - ); - - static Future script( - {required AddressBase ptr, dynamic hint}) => - BdkCore.instance.api.addressBaseScript(ptr: ptr, hint: hint); - - ///Creates a URI string bitcoin:address optimized to be encoded in QR codes. - Future toQrUri({dynamic hint}) => - BdkCore.instance.api.addressBaseToQrUri( - that: this, - ); - - @override - int get hashCode => ptr.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is AddressBase && - runtimeType == other.runtimeType && - ptr == other.ptr; -} - @freezed sealed class AddressIndex with _$AddressIndex { + const AddressIndex._(); + ///Return a new address after incrementing the current descriptor index. const factory AddressIndex.increase() = AddressIndex_Increase; @@ -120,31 +60,6 @@ sealed class AddressIndex with _$AddressIndex { }) = AddressIndex_Reset; } -///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 String address; - - const AddressInfo({ - required this.index, - required this.address, - }); - - @override - int get hashCode => index.hashCode ^ address.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is AddressInfo && - runtimeType == other.runtimeType && - index == other.index && - address == other.address; -} - /// Local Wallet's Balance class Balance { final int immature; @@ -195,6 +110,176 @@ class Balance { total == other.total; } +class BdkAddress { + final BdkBitcoinAddress ptr; + + const BdkAddress({ + required this.ptr, + }); + + Future asString({dynamic hint}) => + CApi.instance.api.bdkAddressAsString(that: this, hint: hint); + + static Future fromScript( + {required BdkScriptBuf script, + required Network network, + dynamic hint}) => + CApi.instance.api + .bdkAddressFromScript(script: script, network: network, hint: hint); + + static Future fromString( + {required String address, required Network network, dynamic hint}) => + CApi.instance.api + .bdkAddressFromString(address: address, network: network, hint: hint); + + Future isValidForNetwork({required Network network, dynamic hint}) => + CApi.instance.api.bdkAddressIsValidForNetwork( + that: this, network: network, hint: hint); + + ///The network on which this address is usable. + Future network({dynamic hint}) => + CApi.instance.api.bdkAddressNetwork(that: this, hint: hint); + + Future payload({dynamic hint}) => + CApi.instance.api.bdkAddressPayload(that: this, hint: hint); + + static Future script({required BdkAddress ptr, dynamic hint}) => + CApi.instance.api.bdkAddressScript(ptr: ptr, hint: hint); + + ///Creates a URI string bitcoin:address optimized to be encoded in QR codes. + Future toQrUri({dynamic hint}) => + CApi.instance.api.bdkAddressToQrUri(that: this, hint: hint); + + @override + int get hashCode => ptr.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is BdkAddress && + runtimeType == other.runtimeType && + ptr == other.ptr; +} + +class BdkScriptBuf { + final Uint8List bytes; + + const BdkScriptBuf({ + required this.bytes, + }); + + ///Creates a new empty script. + static Future empty({dynamic hint}) => + CApi.instance.api.bdkScriptBufEmpty(hint: hint); + + static Future fromHex({required String s, dynamic hint}) => + CApi.instance.api.bdkScriptBufFromHex(s: s, hint: hint); + + ///Creates a new empty script with pre-allocated capacity. + static Future withCapacity( + {required int capacity, dynamic hint}) => + CApi.instance.api + .bdkScriptBufWithCapacity(capacity: capacity, hint: hint); + + @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 inner; + + const BdkTransaction({ + required this.inner, + }); + + static Future fromBytes( + {required List transactionBytes, dynamic hint}) => + CApi.instance.api.bdkTransactionFromBytes( + transactionBytes: transactionBytes, hint: hint); + + ///List of transaction inputs. + Future> input({dynamic hint}) => + CApi.instance.api.bdkTransactionInput(that: this, hint: hint); + + ///Is this a coin base transaction? + Future isCoinBase({dynamic hint}) => + CApi.instance.api.bdkTransactionIsCoinBase(that: this, hint: hint); + + ///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({dynamic hint}) => + CApi.instance.api.bdkTransactionIsExplicitlyRbf(that: this, hint: hint); + + ///Returns true if this transactions nLockTime is enabled (BIP-65 ). + Future isLockTimeEnabled({dynamic hint}) => + CApi.instance.api.bdkTransactionIsLockTimeEnabled(that: this, hint: hint); + + ///Block height or timestamp. Transaction cannot be included in a block until this height/time. + Future lockTime({dynamic hint}) => + CApi.instance.api.bdkTransactionLockTime(that: this, hint: hint); + + // 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, + dynamic hint}) => + CApi.instance.api.bdkTransactionNew( + version: version, + lockTime: lockTime, + input: input, + output: output, + hint: hint); + + ///List of transaction outputs. + Future> output({dynamic hint}) => + CApi.instance.api.bdkTransactionOutput(that: this, hint: hint); + + ///Encodes an object into a vector. + Future serialize({dynamic hint}) => + CApi.instance.api.bdkTransactionSerialize(that: this, hint: hint); + + ///Returns the regular byte-wise consensus-serialized size of this transaction. + Future size({dynamic hint}) => + CApi.instance.api.bdkTransactionSize(that: this, hint: hint); + + ///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({dynamic hint}) => + CApi.instance.api.bdkTransactionTxid(that: this, hint: hint); + + ///The protocol version, is currently expected to be 1 or 2 (BIP 68). + Future version({dynamic hint}) => + CApi.instance.api.bdkTransactionVersion(that: this, hint: hint); + + ///Returns the “virtual size†(vsize) of this transaction. + /// + Future vsize({dynamic hint}) => + CApi.instance.api.bdkTransactionVsize(that: this, hint: hint); + + ///Returns the regular byte-wise consensus-serialized size of this transaction. + Future weight({dynamic hint}) => + CApi.instance.api.bdkTransactionWeight(that: this, hint: hint); + + @override + int get hashCode => inner.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is BdkTransaction && + runtimeType == other.runtimeType && + inner == other.inner; +} + ///Block height and timestamp of a block class BlockTime { ///Confirmation block height @@ -228,6 +313,8 @@ enum ChangeSpendPolicy { @freezed sealed class DatabaseConfig with _$DatabaseConfig { + const DatabaseConfig._(); + const factory DatabaseConfig.memory() = DatabaseConfig_Memory; ///Simple key-value embedded database based on sled @@ -313,6 +400,18 @@ class LocalUtxo { 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 @@ -355,6 +454,8 @@ class OutPoint { @freezed sealed class Payload with _$Payload { + const Payload._(); + /// P2PKH address. const factory Payload.pubkeyHash({ required String pubkeyHash, @@ -395,6 +496,8 @@ class PsbtSigHashType { @freezed sealed class RbfValue with _$RbfValue { + const RbfValue._(); + const factory RbfValue.rbfDefault() = RbfValue_RbfDefault; const factory RbfValue.value( int field0, @@ -403,7 +506,7 @@ sealed class RbfValue with _$RbfValue { /// A output script and an amount of satoshis. class ScriptAmount { - final ScriptBufBase script; + final BdkScriptBuf script; final int amount; const ScriptAmount({ @@ -423,37 +526,6 @@ class ScriptAmount { amount == other.amount; } -class ScriptBufBase { - final Uint8List bytes; - - const ScriptBufBase({ - required this.bytes, - }); - - ///Creates a new empty script. - static Future empty({dynamic hint}) => - BdkCore.instance.api.scriptBufBaseEmpty(hint: hint); - - static Future fromHex({required String s, dynamic hint}) => - BdkCore.instance.api.scriptBufBaseFromHex(s: s, hint: hint); - - ///Creates a new empty script with pre-allocated capacity. - static Future withCapacity( - {required int capacity, dynamic hint}) => - BdkCore.instance.api - .scriptBufBaseWithCapacity(capacity: capacity, hint: hint); - - @override - int get hashCode => bytes.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is ScriptBufBase && - runtimeType == other.runtimeType && - bytes == other.bytes; -} - /// Options for a software signer /// /// Adjust the behavior of our software signers and the way a transaction is finalized @@ -591,107 +663,9 @@ class SqliteDbConfiguration { path == other.path; } -class TransactionBase { - final String inner; - - const TransactionBase({ - required this.inner, - }); - - ///List of transaction inputs. - Future> input({dynamic hint}) => - BdkCore.instance.api.transactionBaseInput( - that: this, - ); - - ///Is this a coin base transaction? - Future isCoinBase({dynamic hint}) => - BdkCore.instance.api.transactionBaseIsCoinBase( - 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({dynamic hint}) => - BdkCore.instance.api.transactionBaseIsExplicitlyRbf( - that: this, - ); - - ///Returns true if this transactions nLockTime is enabled (BIP-65 ). - Future isLockTimeEnabled({dynamic hint}) => - BdkCore.instance.api.transactionBaseIsLockTimeEnabled( - that: this, - ); - - ///Block height or timestamp. Transaction cannot be included in a block until this height/time. - Future lockTime({dynamic hint}) => - BdkCore.instance.api.transactionBaseLockTime( - that: this, - ); - - // HINT: Make it `#[frb(sync)]` to let it become the default constructor of Dart class. - static Future newInstance( - {required List transactionBytes, dynamic hint}) => - BdkCore.instance.api - .transactionBaseNew(transactionBytes: transactionBytes, hint: hint); - - ///List of transaction outputs. - Future> output({dynamic hint}) => - BdkCore.instance.api.transactionBaseOutput( - that: this, - ); - - ///Encodes an object into a vector. - Future serialize({dynamic hint}) => - BdkCore.instance.api.transactionBaseSerialize( - that: this, - ); - - ///Returns the regular byte-wise consensus-serialized size of this transaction. - Future size({dynamic hint}) => BdkCore.instance.api.transactionBaseSize( - 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({dynamic hint}) => - BdkCore.instance.api.transactionBaseTxid( - that: this, - ); - - ///The protocol version, is currently expected to be 1 or 2 (BIP 68). - Future version({dynamic hint}) => - BdkCore.instance.api.transactionBaseVersion( - that: this, - ); - - ///Returns the “virtual size†(vsize) of this transaction. - /// - Future vsize({dynamic hint}) => - BdkCore.instance.api.transactionBaseVsize( - that: this, - ); - - ///Returns the regular byte-wise consensus-serialized size of this transaction. - Future weight({dynamic hint}) => - BdkCore.instance.api.transactionBaseWeight( - that: this, - ); - - @override - int get hashCode => inner.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is TransactionBase && - runtimeType == other.runtimeType && - inner == other.inner; -} - ///A wallet transaction class TransactionDetails { - final TransactionBase? transaction; + final BdkTransaction? transaction; /// Transaction id. final String txid; @@ -747,7 +721,7 @@ class TransactionDetails { class TxIn { final OutPoint previousOutput; - final ScriptBufBase scriptSig; + final BdkScriptBuf scriptSig; final int sequence; final List witness; @@ -782,7 +756,7 @@ class TxOut { final int value; /// The address of the output. - final ScriptBufBase scriptPubkey; + final BdkScriptBuf scriptPubkey; const TxOut({ required this.value, diff --git a/lib/src/generated/api/types.freezed.dart b/lib/src/generated/api/types.freezed.dart index 90dffd16..6b9d7255 100644 --- a/lib/src/generated/api/types.freezed.dart +++ b/lib/src/generated/api/types.freezed.dart @@ -105,8 +105,8 @@ class __$$AddressIndex_IncreaseImplCopyWithImpl<$Res> /// @nodoc -class _$AddressIndex_IncreaseImpl implements AddressIndex_Increase { - const _$AddressIndex_IncreaseImpl(); +class _$AddressIndex_IncreaseImpl extends AddressIndex_Increase { + const _$AddressIndex_IncreaseImpl() : super._(); @override String toString() { @@ -198,8 +198,9 @@ class _$AddressIndex_IncreaseImpl implements AddressIndex_Increase { } } -abstract class AddressIndex_Increase implements AddressIndex { +abstract class AddressIndex_Increase extends AddressIndex { const factory AddressIndex_Increase() = _$AddressIndex_IncreaseImpl; + const AddressIndex_Increase._() : super._(); } /// @nodoc @@ -222,8 +223,8 @@ class __$$AddressIndex_LastUnusedImplCopyWithImpl<$Res> /// @nodoc -class _$AddressIndex_LastUnusedImpl implements AddressIndex_LastUnused { - const _$AddressIndex_LastUnusedImpl(); +class _$AddressIndex_LastUnusedImpl extends AddressIndex_LastUnused { + const _$AddressIndex_LastUnusedImpl() : super._(); @override String toString() { @@ -315,8 +316,9 @@ class _$AddressIndex_LastUnusedImpl implements AddressIndex_LastUnused { } } -abstract class AddressIndex_LastUnused implements AddressIndex { +abstract class AddressIndex_LastUnused extends AddressIndex { const factory AddressIndex_LastUnused() = _$AddressIndex_LastUnusedImpl; + const AddressIndex_LastUnused._() : super._(); } /// @nodoc @@ -352,8 +354,8 @@ class __$$AddressIndex_PeekImplCopyWithImpl<$Res> /// @nodoc -class _$AddressIndex_PeekImpl implements AddressIndex_Peek { - const _$AddressIndex_PeekImpl({required this.index}); +class _$AddressIndex_PeekImpl extends AddressIndex_Peek { + const _$AddressIndex_PeekImpl({required this.index}) : super._(); @override final int index; @@ -456,9 +458,10 @@ class _$AddressIndex_PeekImpl implements AddressIndex_Peek { } } -abstract class AddressIndex_Peek implements AddressIndex { +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) @@ -499,8 +502,8 @@ class __$$AddressIndex_ResetImplCopyWithImpl<$Res> /// @nodoc -class _$AddressIndex_ResetImpl implements AddressIndex_Reset { - const _$AddressIndex_ResetImpl({required this.index}); +class _$AddressIndex_ResetImpl extends AddressIndex_Reset { + const _$AddressIndex_ResetImpl({required this.index}) : super._(); @override final int index; @@ -603,9 +606,10 @@ class _$AddressIndex_ResetImpl implements AddressIndex_Reset { } } -abstract class AddressIndex_Reset implements AddressIndex { +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) @@ -698,8 +702,8 @@ class __$$DatabaseConfig_MemoryImplCopyWithImpl<$Res> /// @nodoc -class _$DatabaseConfig_MemoryImpl implements DatabaseConfig_Memory { - const _$DatabaseConfig_MemoryImpl(); +class _$DatabaseConfig_MemoryImpl extends DatabaseConfig_Memory { + const _$DatabaseConfig_MemoryImpl() : super._(); @override String toString() { @@ -785,8 +789,9 @@ class _$DatabaseConfig_MemoryImpl implements DatabaseConfig_Memory { } } -abstract class DatabaseConfig_Memory implements DatabaseConfig { +abstract class DatabaseConfig_Memory extends DatabaseConfig { const factory DatabaseConfig_Memory() = _$DatabaseConfig_MemoryImpl; + const DatabaseConfig_Memory._() : super._(); } /// @nodoc @@ -823,8 +828,8 @@ class __$$DatabaseConfig_SqliteImplCopyWithImpl<$Res> /// @nodoc -class _$DatabaseConfig_SqliteImpl implements DatabaseConfig_Sqlite { - const _$DatabaseConfig_SqliteImpl({required this.config}); +class _$DatabaseConfig_SqliteImpl extends DatabaseConfig_Sqlite { + const _$DatabaseConfig_SqliteImpl({required this.config}) : super._(); @override final SqliteDbConfiguration config; @@ -921,10 +926,11 @@ class _$DatabaseConfig_SqliteImpl implements DatabaseConfig_Sqlite { } } -abstract class DatabaseConfig_Sqlite implements DatabaseConfig { +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) @@ -965,8 +971,8 @@ class __$$DatabaseConfig_SledImplCopyWithImpl<$Res> /// @nodoc -class _$DatabaseConfig_SledImpl implements DatabaseConfig_Sled { - const _$DatabaseConfig_SledImpl({required this.config}); +class _$DatabaseConfig_SledImpl extends DatabaseConfig_Sled { + const _$DatabaseConfig_SledImpl({required this.config}) : super._(); @override final SledDbConfiguration config; @@ -1063,9 +1069,10 @@ class _$DatabaseConfig_SledImpl implements DatabaseConfig_Sled { } } -abstract class DatabaseConfig_Sled implements DatabaseConfig { +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) @@ -1073,6 +1080,363 @@ abstract class DatabaseConfig_Sled implements DatabaseConfig { 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 @@ -1173,8 +1537,8 @@ class __$$Payload_PubkeyHashImplCopyWithImpl<$Res> /// @nodoc -class _$Payload_PubkeyHashImpl implements Payload_PubkeyHash { - const _$Payload_PubkeyHashImpl({required this.pubkeyHash}); +class _$Payload_PubkeyHashImpl extends Payload_PubkeyHash { + const _$Payload_PubkeyHashImpl({required this.pubkeyHash}) : super._(); @override final String pubkeyHash; @@ -1274,9 +1638,10 @@ class _$Payload_PubkeyHashImpl implements Payload_PubkeyHash { } } -abstract class Payload_PubkeyHash implements Payload { +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) @@ -1317,8 +1682,8 @@ class __$$Payload_ScriptHashImplCopyWithImpl<$Res> /// @nodoc -class _$Payload_ScriptHashImpl implements Payload_ScriptHash { - const _$Payload_ScriptHashImpl({required this.scriptHash}); +class _$Payload_ScriptHashImpl extends Payload_ScriptHash { + const _$Payload_ScriptHashImpl({required this.scriptHash}) : super._(); @override final String scriptHash; @@ -1418,9 +1783,10 @@ class _$Payload_ScriptHashImpl implements Payload_ScriptHash { } } -abstract class Payload_ScriptHash implements Payload { +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) @@ -1468,9 +1834,10 @@ class __$$Payload_WitnessProgramImplCopyWithImpl<$Res> /// @nodoc -class _$Payload_WitnessProgramImpl implements Payload_WitnessProgram { +class _$Payload_WitnessProgramImpl extends Payload_WitnessProgram { const _$Payload_WitnessProgramImpl( - {required this.version, required this.program}); + {required this.version, required this.program}) + : super._(); /// The witness program version. @override @@ -1576,10 +1943,11 @@ class _$Payload_WitnessProgramImpl implements Payload_WitnessProgram { } } -abstract class Payload_WitnessProgram implements Payload { +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; @@ -1668,8 +2036,8 @@ class __$$RbfValue_RbfDefaultImplCopyWithImpl<$Res> /// @nodoc -class _$RbfValue_RbfDefaultImpl implements RbfValue_RbfDefault { - const _$RbfValue_RbfDefaultImpl(); +class _$RbfValue_RbfDefaultImpl extends RbfValue_RbfDefault { + const _$RbfValue_RbfDefaultImpl() : super._(); @override String toString() { @@ -1749,8 +2117,9 @@ class _$RbfValue_RbfDefaultImpl implements RbfValue_RbfDefault { } } -abstract class RbfValue_RbfDefault implements RbfValue { +abstract class RbfValue_RbfDefault extends RbfValue { const factory RbfValue_RbfDefault() = _$RbfValue_RbfDefaultImpl; + const RbfValue_RbfDefault._() : super._(); } /// @nodoc @@ -1786,8 +2155,8 @@ class __$$RbfValue_ValueImplCopyWithImpl<$Res> /// @nodoc -class _$RbfValue_ValueImpl implements RbfValue_Value { - const _$RbfValue_ValueImpl(this.field0); +class _$RbfValue_ValueImpl extends RbfValue_Value { + const _$RbfValue_ValueImpl(this.field0) : super._(); @override final int field0; @@ -1878,8 +2247,9 @@ class _$RbfValue_ValueImpl implements RbfValue_Value { } } -abstract class RbfValue_Value implements RbfValue { +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) diff --git a/lib/src/generated/api/wallet.dart b/lib/src/generated/api/wallet.dart index 34e4530f..51b15058 100644 --- a/lib/src/generated/api/wallet.dart +++ b/lib/src/generated/api/wallet.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.28. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import @@ -11,15 +11,15 @@ import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; import 'psbt.dart'; import 'types.dart'; -Future<(PsbtBase, TransactionDetails)> finishBumpFeeTxBuilder( +Future<(BdkPsbt, TransactionDetails)> finishBumpFeeTxBuilder( {required String txid, required double feeRate, - AddressBase? allowShrinking, - required WalletBase wallet, + BdkAddress? allowShrinking, + required BdkWallet wallet, required bool enableRbf, int? nSequence, dynamic hint}) => - BdkCore.instance.api.finishBumpFeeTxBuilder( + CApi.instance.api.finishBumpFeeTxBuilder( txid: txid, feeRate: feeRate, allowShrinking: allowShrinking, @@ -28,8 +28,8 @@ Future<(PsbtBase, TransactionDetails)> finishBumpFeeTxBuilder( nSequence: nSequence, hint: hint); -Future<(PsbtBase, TransactionDetails)> txBuilderFinish( - {required WalletBase wallet, +Future<(BdkPsbt, TransactionDetails)> txBuilderFinish( + {required BdkWallet wallet, required List recipients, required List utxos, (OutPoint, Input, int)? foreignUtxo, @@ -39,11 +39,11 @@ Future<(PsbtBase, TransactionDetails)> txBuilderFinish( double? feeRate, int? feeAbsolute, required bool drainWallet, - ScriptBufBase? drainTo, + BdkScriptBuf? drainTo, RbfValue? rbf, required List data, dynamic hint}) => - BdkCore.instance.api.txBuilderFinish( + CApi.instance.api.txBuilderFinish( wallet: wallet, recipients: recipients, utxos: utxos, @@ -69,45 +69,43 @@ class MutexBdkWalletAnyDatabase extends RustOpaque { : super.sseDecode(ptr, externalSizeOnNative, _kStaticData); static final _kStaticData = RustArcStaticData( - rustArcIncrementStrongCount: BdkCore + rustArcIncrementStrongCount: CApi .instance.api.rust_arc_increment_strong_count_MutexBdkWalletAnyDatabase, - rustArcDecrementStrongCount: BdkCore + rustArcDecrementStrongCount: CApi .instance.api.rust_arc_decrement_strong_count_MutexBdkWalletAnyDatabase, - rustArcDecrementStrongCountPtr: BdkCore.instance.api + rustArcDecrementStrongCountPtr: CApi.instance.api .rust_arc_decrement_strong_count_MutexBdkWalletAnyDatabasePtr, ); } -class WalletBase { +class BdkWallet { final MutexBdkWalletAnyDatabase ptr; - const WalletBase({ + 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. - Future getAddress( - {required AddressIndex addressIndex, dynamic hint}) => - BdkCore.instance.api.walletBaseGetAddress( - that: this, - addressIndex: addressIndex, - ); + static Future<(BdkAddress, int)> getAddress( + {required BdkWallet ptr, + required AddressIndex addressIndex, + dynamic hint}) => + CApi.instance.api.bdkWalletGetAddress( + ptr: ptr, addressIndex: addressIndex, hint: hint); /// 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. Future getBalance({dynamic hint}) => - BdkCore.instance.api.walletBaseGetBalance( - that: this, - ); + CApi.instance.api.bdkWalletGetBalance(that: this, hint: hint); ///Returns the descriptor used to create addresses for a particular keychain. - static Future getDescriptorForKeychain( - {required WalletBase ptr, + static Future getDescriptorForKeychain( + {required BdkWallet ptr, required KeychainKind keychain, dynamic hint}) => - BdkCore.instance.api.walletBaseGetDescriptorForKeychain( + CApi.instance.api.bdkWalletGetDescriptorForKeychain( ptr: ptr, keychain: keychain, hint: hint); /// Return a derived address using the internal (change) descriptor. @@ -117,12 +115,12 @@ class WalletBase { /// 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]. - Future getInternalAddress( - {required AddressIndex addressIndex, dynamic hint}) => - BdkCore.instance.api.walletBaseGetInternalAddress( - that: this, - addressIndex: addressIndex, - ); + static Future<(BdkAddress, int)> getInternalAddress( + {required BdkWallet ptr, + required AddressIndex addressIndex, + dynamic hint}) => + CApi.instance.api.bdkWalletGetInternalAddress( + ptr: ptr, addressIndex: addressIndex, hint: hint); ///get the corresponding PSBT Input for a LocalUtxo Future getPsbtInput( @@ -130,49 +128,40 @@ class WalletBase { required bool onlyWitnessUtxo, PsbtSigHashType? sighashType, dynamic hint}) => - BdkCore.instance.api.walletBaseGetPsbtInput( - that: this, - utxo: utxo, - onlyWitnessUtxo: onlyWitnessUtxo, - sighashType: sighashType, - ); + CApi.instance.api.bdkWalletGetPsbtInput( + that: this, + utxo: utxo, + onlyWitnessUtxo: onlyWitnessUtxo, + sighashType: sighashType, + hint: hint); /// Return whether or not a script is part of this wallet (either internal or external). - Future isMine({required ScriptBufBase script, dynamic hint}) => - BdkCore.instance.api.walletBaseIsMine( - that: this, - script: script, - ); + Future isMine({required BdkScriptBuf script, dynamic hint}) => + CApi.instance.api.bdkWalletIsMine(that: this, script: script, hint: hint); /// 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. Future> listTransactions( {required bool includeRaw, dynamic hint}) => - BdkCore.instance.api.walletBaseListTransactions( - that: this, - includeRaw: includeRaw, - ); + CApi.instance.api.bdkWalletListTransactions( + that: this, includeRaw: includeRaw, hint: hint); /// 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. Future> listUnspent({dynamic hint}) => - BdkCore.instance.api.walletBaseListUnspent( - that: this, - ); + CApi.instance.api.bdkWalletListUnspent(that: this, hint: hint); /// Get the Bitcoin network the wallet is using. Future network({dynamic hint}) => - BdkCore.instance.api.walletBaseNetwork( - that: this, - ); + CApi.instance.api.bdkWalletNetwork(that: this, hint: hint); // HINT: Make it `#[frb(sync)]` to let it become the default constructor of Dart class. - static Future newInstance( - {required DescriptorBase descriptor, - DescriptorBase? changeDescriptor, + static Future newInstance( + {required BdkDescriptor descriptor, + BdkDescriptor? changeDescriptor, required Network network, required DatabaseConfig databaseConfig, dynamic hint}) => - BdkCore.instance.api.walletBaseNew( + CApi.instance.api.bdkWalletNew( descriptor: descriptor, changeDescriptor: changeDescriptor, network: network, @@ -187,20 +176,20 @@ class WalletBase { /// signers will follow the options, but the "software signers" (WIF keys and `xprv`) defined /// in this library will. static Future sign( - {required WalletBase ptr, - required PsbtBase psbt, + {required BdkWallet ptr, + required BdkPsbt psbt, SignOptions? signOptions, dynamic hint}) => - BdkCore.instance.api.walletBaseSign( + CApi.instance.api.bdkWalletSign( ptr: ptr, psbt: psbt, signOptions: signOptions, hint: hint); /// Sync the internal database with the blockchain. static Future sync( - {required WalletBase ptr, - required BlockchainBase blockchain, + {required BdkWallet ptr, + required BdkBlockchain blockchain, dynamic hint}) => - BdkCore.instance.api - .walletBaseSync(ptr: ptr, blockchain: blockchain, hint: hint); + CApi.instance.api + .bdkWalletSync(ptr: ptr, blockchain: blockchain, hint: hint); @override int get hashCode => ptr.hashCode; @@ -208,7 +197,7 @@ class WalletBase { @override bool operator ==(Object other) => identical(this, other) || - other is WalletBase && + other is BdkWallet && runtimeType == other.runtimeType && ptr == other.ptr; } diff --git a/rust/src/api/blockchain.rs b/rust/src/api/blockchain.rs index 509f617e..178c4d40 100644 --- a/rust/src/api/blockchain.rs +++ b/rust/src/api/blockchain.rs @@ -1,30 +1,30 @@ -use crate::api::types::{FeeRate, Network, TransactionBase}; +use crate::api::types::{BdkTransaction, FeeRate, Network}; use crate::api::error::BdkError; use crate::frb_generated::RustOpaque; use bdk::bitcoin::Transaction; use bdk::blockchain; use bdk::blockchain::esplora::EsploraBlockchainConfig; -use bdk::blockchain::Blockchain as BdkBlockchain; + pub use bdk::blockchain::{ AnyBlockchain, AnyBlockchainConfig, ConfigurableBlockchain, ElectrumBlockchainConfig, - GetBlockHash, GetHeight, + rpc, GetBlockHash, GetHeight,Blockchain }; use std::path::PathBuf; -pub struct BlockchainBase { +pub struct BdkBlockchain { pub ptr: RustOpaque, } -impl From for BlockchainBase { +impl From for BdkBlockchain { fn from(value: AnyBlockchain) -> Self { Self { ptr: RustOpaque::new(value), } } } -impl BlockchainBase { - pub fn new(blockchain_config: BlockchainConfig) -> Result { +impl BdkBlockchain { + pub fn new(blockchain_config: BlockchainConfig) -> Result { let any_blockchain_config = match blockchain_config { BlockchainConfig::Electrum { config } => { AnyBlockchainConfig::Electrum(ElectrumBlockchainConfig { @@ -62,9 +62,9 @@ impl BlockchainBase { self.ptr.clone() } - pub fn broadcast(&self, transaction: TransactionBase) -> Result { - let tx: &Transaction = &(&(transaction)).into(); - self.get_blockchain().broadcast(tx)?; + pub fn broadcast(&self, transaction: BdkTransaction) -> Result { + let tx: Transaction = (&transaction).try_into()?; + self.get_blockchain().broadcast(&tx)?; Ok(tx.txid().to_string()) } @@ -141,7 +141,7 @@ pub enum Auth { }, } -impl From for blockchain::rpc::Auth { +impl From for rpc::Auth { fn from(auth: Auth) -> Self { match auth { Auth::None => blockchain::rpc::Auth::None, @@ -204,4 +204,4 @@ pub enum BlockchainConfig { Esplora { config: EsploraConfig }, /// Bitcoin Core RPC client Rpc { config: RpcConfig }, -} +} \ No newline at end of file diff --git a/rust/src/api/descriptor.rs b/rust/src/api/descriptor.rs index 9d28951c..236f2803 100644 --- a/rust/src/api/descriptor.rs +++ b/rust/src/api/descriptor.rs @@ -1,6 +1,7 @@ use crate::api::error::BdkError; -use crate::api::key::{DescriptorPublicKeyBase, DescriptorSecretKeyBase}; +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::{ExtendedDescriptor, IntoWalletDescriptor}; @@ -10,15 +11,14 @@ use bdk::template::{ DescriptorTemplate, }; use std::str::FromStr; -use crate::frb_generated::RustOpaque; #[derive(Debug)] -pub struct DescriptorBase { +pub struct BdkDescriptor { pub extended_descriptor: RustOpaque, pub key_map: RustOpaque, } -impl DescriptorBase { +impl BdkDescriptor { pub fn new(descriptor: String, network: Network) -> Result { let secp = Secp256k1::new(); let (extended_descriptor, key_map) = @@ -30,7 +30,7 @@ impl DescriptorBase { } pub fn new_bip44( - secret_key: DescriptorSecretKeyBase, + secret_key: BdkDescriptorSecretKey, keychain_kind: KeychainKind, network: Network, ) -> Result { @@ -55,7 +55,7 @@ impl DescriptorBase { } pub fn new_bip44_public( - public_key: DescriptorPublicKeyBase, + public_key: BdkDescriptorPublicKey, fingerprint: String, keychain_kind: KeychainKind, network: Network, @@ -84,7 +84,7 @@ impl DescriptorBase { } pub fn new_bip49( - secret_key: DescriptorSecretKeyBase, + secret_key: BdkDescriptorSecretKey, keychain_kind: KeychainKind, network: Network, ) -> Result { @@ -109,7 +109,7 @@ impl DescriptorBase { } pub fn new_bip49_public( - public_key: DescriptorPublicKeyBase, + public_key: BdkDescriptorPublicKey, fingerprint: String, keychain_kind: KeychainKind, network: Network, @@ -139,7 +139,7 @@ impl DescriptorBase { } pub fn new_bip84( - secret_key: DescriptorSecretKeyBase, + secret_key: BdkDescriptorSecretKey, keychain_kind: KeychainKind, network: Network, ) -> Result { @@ -164,7 +164,7 @@ impl DescriptorBase { } pub fn new_bip84_public( - public_key: DescriptorPublicKeyBase, + public_key: BdkDescriptorPublicKey, fingerprint: String, keychain_kind: KeychainKind, network: Network, @@ -195,7 +195,7 @@ impl DescriptorBase { } pub fn new_bip86( - secret_key: DescriptorSecretKeyBase, + secret_key: BdkDescriptorSecretKey, keychain_kind: KeychainKind, network: Network, ) -> Result { @@ -221,7 +221,7 @@ impl DescriptorBase { } pub fn new_bip86_public( - public_key: DescriptorPublicKeyBase, + public_key: BdkDescriptorPublicKey, fingerprint: String, keychain_kind: KeychainKind, network: Network, @@ -264,4 +264,4 @@ impl DescriptorBase { .max_weight_to_satisfy() .map_err(|e| e.into()) } -} +} \ No newline at end of file diff --git a/rust/src/api/key.rs b/rust/src/api/key.rs index 84aabf88..3f9eaf8f 100644 --- a/rust/src/api/key.rs +++ b/rust/src/api/key.rs @@ -1,5 +1,6 @@ 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; @@ -8,19 +9,18 @@ use bdk::keys::{DerivableKey, GeneratableKey}; use bdk::miniscript::descriptor::{DescriptorXKey, Wildcard}; use bdk::miniscript::BareCtx; use std::str::FromStr; -use crate::frb_generated::RustOpaque; -pub struct MnemonicBase { +pub struct BdkMnemonic { pub ptr: RustOpaque, } -impl From for MnemonicBase { +impl From for BdkMnemonic { fn from(value: keys::bip39::Mnemonic) -> Self { Self { ptr: RustOpaque::new(value), } } } -impl MnemonicBase { +impl BdkMnemonic { /// Generates Mnemonic with a random entropy pub fn new(word_count: WordCount) -> Result { let generated_key: keys::GeneratedKey<_, BareCtx> = @@ -50,18 +50,18 @@ impl MnemonicBase { self.ptr.to_string() } } -pub struct DerivationPathBase { +pub struct BdkDerivationPath { pub ptr: RustOpaque, } -impl From for DerivationPathBase { +impl From for BdkDerivationPath { fn from(value: bitcoin::bip32::DerivationPath) -> Self { - DerivationPathBase { + BdkDerivationPath { ptr: RustOpaque::new(value), } } } -impl DerivationPathBase { +impl BdkDerivationPath { pub fn from_string(path: String) -> Result { bitcoin::bip32::DerivationPath::from_str(&path) .map(|e| e.into()) @@ -70,20 +70,20 @@ impl DerivationPathBase { } #[derive(Debug)] -pub struct DescriptorSecretKeyBase { +pub struct BdkDescriptorSecretKey { pub ptr: RustOpaque, } -impl From for DescriptorSecretKeyBase { +impl From for BdkDescriptorSecretKey { fn from(value: keys::DescriptorSecretKey) -> Self { Self { ptr: RustOpaque::new(value), } } } -impl DescriptorSecretKeyBase { +impl BdkDescriptorSecretKey { pub fn create( network: Network, - mnemonic: MnemonicBase, + mnemonic: BdkMnemonic, password: Option, ) -> Result { let mnemonic = (*mnemonic.ptr).clone(); @@ -97,10 +97,7 @@ impl DescriptorSecretKeyBase { Ok(descriptor_secret_key.into()) } - pub fn derive( - ptr: DescriptorSecretKeyBase, - path: DerivationPathBase, - ) -> Result { + pub fn derive(ptr: BdkDescriptorSecretKey, path: BdkDerivationPath) -> Result { let secp = Secp256k1::new(); let descriptor_secret_key = (*ptr.ptr).clone(); match descriptor_secret_key { @@ -135,10 +132,7 @@ impl DescriptorSecretKeyBase { )), } } - pub fn extend( - ptr: DescriptorSecretKeyBase, - path: DerivationPathBase, - ) -> Result { + 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) => { @@ -160,7 +154,7 @@ impl DescriptorSecretKeyBase { )), } } - pub fn as_public(ptr: DescriptorSecretKeyBase) -> Result { + pub fn as_public(ptr: BdkDescriptorSecretKey) -> Result { let secp = Secp256k1::new(); let descriptor_public_key = ptr.ptr.to_public(&secp).unwrap(); Ok(descriptor_public_key.into()) @@ -190,10 +184,10 @@ impl DescriptorSecretKeyBase { } } #[derive(Debug)] -pub struct DescriptorPublicKeyBase { +pub struct BdkDescriptorPublicKey { pub ptr: RustOpaque, } -impl From for DescriptorPublicKeyBase { +impl From for BdkDescriptorPublicKey { fn from(value: keys::DescriptorPublicKey) -> Self { Self { ptr: RustOpaque::new(value), @@ -201,16 +195,13 @@ impl From for DescriptorPublicKeyBase { } } -impl DescriptorPublicKeyBase { +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: DescriptorPublicKeyBase, - path: DerivationPathBase, - ) -> Result { + pub fn derive(ptr: BdkDescriptorPublicKey, path: BdkDerivationPath) -> Result { let secp = Secp256k1::new(); let descriptor_public_key = (*ptr.ptr).clone(); match descriptor_public_key { @@ -245,10 +236,7 @@ impl DescriptorPublicKeyBase { } } - pub fn extend( - ptr: DescriptorPublicKeyBase, - path: DerivationPathBase, - ) -> Result { + 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) => { @@ -278,4 +266,4 @@ impl DescriptorPublicKeyBase { pub fn as_string(&self) -> String { self.ptr.to_string() } -} +} \ No newline at end of file diff --git a/rust/src/api/psbt.rs b/rust/src/api/psbt.rs index b441d9a0..78fcf0f5 100644 --- a/rust/src/api/psbt.rs +++ b/rust/src/api/psbt.rs @@ -1,5 +1,5 @@ use crate::api::error::BdkError; -use crate::api::types::{FeeRate, TransactionBase}; +use crate::api::types::{BdkTransaction, FeeRate}; use crate::frb_generated::RustOpaque; pub use bdk::bitcoin::psbt::PartiallySignedTransaction; use bdk::psbt::PsbtUtils; @@ -8,23 +8,22 @@ use std::str::FromStr; use std::sync::Mutex; #[derive(Debug)] -pub struct PsbtBase { +pub struct BdkPsbt { pub ptr: RustOpaque>, } -impl From for PsbtBase { +impl From for BdkPsbt { fn from(value: PartiallySignedTransaction) -> Self { Self { ptr: RustOpaque::new(Mutex::new(value)), } } } -impl PsbtBase { - pub fn from_str(psbt_base64: String) -> Result { +impl BdkPsbt { + pub fn from_str(psbt_base64: String) -> Result { let psbt: PartiallySignedTransaction = PartiallySignedTransaction::from_str(&psbt_base64)?; Ok(psbt.into()) } - pub fn serialize(&self) -> String { let psbt = self.ptr.lock().unwrap().clone(); psbt.to_string() @@ -37,15 +36,15 @@ impl PsbtBase { } /// Return the transaction. - pub fn extract_tx(ptr: PsbtBase) -> TransactionBase { + pub fn extract_tx(ptr: BdkPsbt) -> Result { let tx = ptr.ptr.lock().unwrap().clone().extract_tx(); - tx.into() + 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: PsbtBase, other: PsbtBase) -> Result { + pub fn combine(ptr: BdkPsbt, other: BdkPsbt) -> Result { let other_psbt = other.ptr.lock().unwrap().clone(); let mut original_psbt = ptr.ptr.lock().unwrap().clone(); original_psbt.combine(other_psbt)?; @@ -71,4 +70,4 @@ impl PsbtBase { let psbt = self.ptr.lock().unwrap(); serde_json::to_string(psbt.deref()).unwrap() } -} +} \ No newline at end of file diff --git a/rust/src/api/types.rs b/rust/src/api/types.rs index 34500d78..9e684b81 100644 --- a/rust/src/api/types.rs +++ b/rust/src/api/types.rs @@ -1,11 +1,11 @@ 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 serde::{Deserialize, Serialize}; use std::io::Cursor; use std::str::FromStr; -use crate::frb_generated::RustOpaque; /// A reference to a transaction output. #[derive(Clone, Debug, PartialEq, Eq, Hash)] @@ -15,12 +15,18 @@ pub struct OutPoint { /// The index of the referenced output in its transaction's vout. pub(crate) vout: u32, } -impl From<&OutPoint> for bdk::bitcoin::OutPoint { - fn from(x: &OutPoint) -> bdk::bitcoin::OutPoint { - bdk::bitcoin::OutPoint { - txid: bdk::bitcoin::Txid::from_str(x.txid.as_str()).expect("invalid txid"), +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 { @@ -34,11 +40,26 @@ impl From for OutPoint { #[derive(Debug, Clone)] pub struct TxIn { pub previous_output: OutPoint, - pub script_sig: ScriptBufBase, + 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 { @@ -54,7 +75,7 @@ pub struct TxOut { /// The value of the output, in satoshis. pub value: u64, /// The address of the output. - pub script_pubkey: ScriptBufBase, + pub script_pubkey: BdkScriptBuf, } impl From for bdk::bitcoin::TxOut { fn from(value: TxOut) -> Self { @@ -72,33 +93,41 @@ impl From<&bdk::bitcoin::TxOut> for TxOut { } } } +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 ScriptBufBase { +pub struct BdkScriptBuf { pub bytes: Vec, } -impl From for ScriptBufBase { +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: ScriptBufBase) -> Self { +impl From for bdk::bitcoin::ScriptBuf { + fn from(value: BdkScriptBuf) -> Self { bdk::bitcoin::ScriptBuf::from_bytes(value.bytes) } } -impl ScriptBufBase { +impl BdkScriptBuf { ///Creates a new empty script. - pub fn empty() -> ScriptBufBase { + pub fn empty() -> BdkScriptBuf { bdk::bitcoin::ScriptBuf::new().into() } ///Creates a new empty script with pre-allocated capacity. - pub fn with_capacity(capacity: usize) -> ScriptBufBase { + pub fn with_capacity(capacity: usize) -> BdkScriptBuf { bdk::bitcoin::ScriptBuf::with_capacity(capacity).into() } - pub fn from_hex(s: String) -> Result { + pub fn from_hex(s: String) -> Result { bdk::bitcoin::ScriptBuf::from_hex(s.as_str()) .map(|e| e.into()) .map_err(|e| match e { @@ -176,25 +205,10 @@ impl From for bdk::wallet::AddressIndex { } } } -///A derived address and the index it was found at For convenience this automatically derefs to Address -pub struct AddressInfo { - ///Child index of this address - pub index: u32, - /// Address - pub address: String, -} -impl From for AddressInfo { - fn from(x: bdk::wallet::AddressInfo) -> AddressInfo { - AddressInfo { - index: x.index, - address: x.address.to_string(), - } - } -} #[derive(Debug, Clone, PartialEq, Eq)] ///A wallet transaction pub struct TransactionDetails { - pub transaction: Option, + pub transaction: Option, /// Transaction id. pub txid: String, /// Received value (sats) @@ -213,28 +227,42 @@ pub struct TransactionDetails { pub confirmation_time: Option, } /// A wallet transaction -impl From<&bdk::TransactionDetails> for TransactionDetails { - fn from(x: &bdk::TransactionDetails) -> TransactionDetails { - TransactionDetails { - transaction: x.clone().transaction.map(|e| e.into()), +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 From for TransactionDetails { - fn from(x: bdk::TransactionDetails) -> TransactionDetails { - TransactionDetails { - transaction: x.transaction.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)] @@ -255,7 +283,7 @@ impl From for BlockTime { } /// A output script and an amount of satoshis. pub struct ScriptAmount { - pub script: ScriptBufBase, + pub script: BdkScriptBuf, pub amount: u64, } #[allow(dead_code)] @@ -413,20 +441,22 @@ impl From for bdk::wallet::tx_builder::ChangeSpendPolicy { } } } -pub struct AddressBase { +pub struct BdkAddress { pub ptr: RustOpaque, } -impl From for AddressBase { +impl From for BdkAddress { fn from(value: bdk::bitcoin::Address) -> Self { - Self { ptr: RustOpaque::new(value) } + Self { + ptr: RustOpaque::new(value), + } } } -impl From<&AddressBase> for bdk::bitcoin::Address { - fn from(value: &AddressBase) -> Self { +impl From<&BdkAddress> for bdk::bitcoin::Address { + fn from(value: &BdkAddress) -> Self { (*value.ptr).clone() } } -impl AddressBase { +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()) { @@ -437,16 +467,16 @@ impl AddressBase { } } - pub fn from_script(script: ScriptBufBase, network: Network) -> Result { + pub fn from_script(script: BdkScriptBuf, network: Network) -> Result { bdk::bitcoin::Address::from_script( - >::into(script).as_script(), + >::into(script).as_script(), network.into(), ) - .map(|a| a.into()) - .map_err(|e| e.into()) + .map(|a| a.into()) + .map_err(|e| e.into()) } pub fn payload(&self) -> Payload { - match <&AddressBase as Into>::into(self).payload { + match <&BdkAddress as Into>::into(self).payload { bdk::bitcoin::address::Payload::PubkeyHash(pubkey_hash) => Payload::PubkeyHash { pubkey_hash: pubkey_hash.to_string(), }, @@ -475,7 +505,7 @@ impl AddressBase { self.ptr.network.into() } - pub fn script(ptr: AddressBase) -> ScriptBufBase { + pub fn script(ptr: BdkAddress) -> BdkScriptBuf { ptr.ptr.script_pubkey().into() } @@ -506,97 +536,158 @@ impl From for Variant { } } } +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 TransactionBase { +pub struct BdkTransaction { pub inner: String, } -impl TransactionBase { - pub fn new(transaction_bytes: Vec) -> Result { +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)?; - Ok(tx.into()) + 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) -> String { - <&TransactionBase as Into>::into(self) - .txid() - .to_string() + 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) -> u64 { - <&TransactionBase as Into>::into(self) - .weight() - .to_wu() + 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) -> u64 { - <&TransactionBase as Into>::into(self).size() as u64 + 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) -> u64 { - <&TransactionBase as Into>::into(self).vsize() as u64 + 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) -> Vec { - serialize(&<&TransactionBase as Into>::into(self)) + 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) -> bool { - <&TransactionBase as Into>::into(self).is_coin_base() + 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) -> bool { - <&TransactionBase as Into>::into(self).is_explicitly_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) -> bool { - <&TransactionBase as Into>::into(self).is_lock_time_enabled() + 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) -> i32 { - <&TransactionBase as Into>::into(self).version + 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) -> u32 { - <&TransactionBase as Into>::into(self) - .lock_time - .to_consensus_u32() + 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) -> Vec { - <&TransactionBase as Into>::into(self) - .input - .iter() - .map(|x| x.into()) - .collect() + 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) -> Vec { - <&TransactionBase as Into>::into(self) - .output - .iter() - .map(|x| (&x.clone()).into()) - .collect() - } -} -impl From for TransactionBase { - fn from(tx: bdk::bitcoin::Transaction) -> Self { - TransactionBase { - inner: serde_json::to_string(&tx).expect("invalid tx"), - } + pub fn output(&self) -> Result, BdkError> { + self.try_into() + .map(|e: bdk::bitcoin::Transaction| e.output.iter().map(|x| x.into()).collect()) } } -impl From<&TransactionBase> for bdk::bitcoin::Transaction { - fn from(tx: &TransactionBase) -> Self { - let tx: bdk::bitcoin::Transaction = serde_json::from_str(&tx.inner).expect("invalid tx"); - tx +impl TryFrom for BdkTransaction { + type Error = BdkError; + fn try_from(tx: bdk::bitcoin::Transaction) -> Result { + Ok(BdkTransaction { + inner: 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.inner).map_err(|e| BdkError::InvalidTransaction(e.to_string())) } } ///Configuration type for a SqliteDatabase database @@ -684,7 +775,7 @@ impl From for LocalUtxo { }, txout: TxOut { value: local_utxo.txout.value, - script_pubkey: ScriptBufBase { + script_pubkey: BdkScriptBuf { bytes: local_utxo.txout.script_pubkey.into_bytes(), }, }, @@ -693,14 +784,16 @@ impl From for LocalUtxo { } } } -impl From for bdk::LocalUtxo { - fn from(value: LocalUtxo) -> Self { - Self { - outpoint: (&value.outpoint).into(), +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 @@ -810,15 +903,18 @@ impl From for FeeRate { pub struct Input { pub s: String, } -impl From for bdk::bitcoin::psbt::Input { - fn from(value: Input) -> Self { - serde_json::from_str(value.s.as_str()).expect("input cannot be de-serialized") +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 From for Input { - fn from(value: bdk::bitcoin::psbt::Input) -> Self { - Input { - s: serde_json::to_string(&value).expect("input cannot be serialized"), - } +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()))?, + }) } } \ No newline at end of file diff --git a/rust/src/api/wallet.rs b/rust/src/api/wallet.rs index 0d16d7b0..022d9ca1 100644 --- a/rust/src/api/wallet.rs +++ b/rust/src/api/wallet.rs @@ -1,15 +1,15 @@ -use crate::api::descriptor::DescriptorBase; +use crate::api::descriptor::BdkDescriptor; use crate::api::types::{ - AddressBase, AddressIndex, AddressInfo, Balance, ChangeSpendPolicy, DatabaseConfig, Input, - KeychainKind, LocalUtxo, Network, OutPoint, PsbtSigHashType, RbfValue, ScriptAmount, - ScriptBufBase, SignOptions, TransactionDetails, + AddressIndex, Balance, BdkAddress, BdkScriptBuf, ChangeSpendPolicy, + DatabaseConfig, Input, KeychainKind, LocalUtxo, Network, OutPoint, PsbtSigHashType, RbfValue, + ScriptAmount, SignOptions, TransactionDetails, }; use std::ops::Deref; use std::str::FromStr; -use crate::api::blockchain::BlockchainBase; +use crate::api::blockchain::BdkBlockchain; use crate::api::error::BdkError; -use crate::api::psbt::PsbtBase; +use crate::api::psbt::BdkPsbt; use crate::frb_generated::RustOpaque; use bdk::bitcoin::script::PushBytesBuf; use bdk::bitcoin::{Sequence, Txid}; @@ -19,13 +19,13 @@ pub use std::sync::Mutex; use std::sync::MutexGuard; #[derive(Debug)] -pub struct WalletBase { +pub struct BdkWallet { pub ptr: RustOpaque>>, } -impl WalletBase { +impl BdkWallet { pub fn new( - descriptor: DescriptorBase, - change_descriptor: Option, + descriptor: BdkDescriptor, + change_descriptor: Option, network: Network, database_config: DatabaseConfig, ) -> Result { @@ -39,7 +39,7 @@ impl WalletBase { network.into(), database, )?; - Ok(WalletBase { + Ok(BdkWallet { ptr: RustOpaque::new(Mutex::new(wallet)), }) } @@ -52,18 +52,18 @@ impl WalletBase { self.get_wallet().network().into() } /// Return whether or not a script is part of this wallet (either internal or external). - pub fn is_mine(&self, script: ScriptBufBase) -> Result { + pub fn is_mine(&self, script: BdkScriptBuf) -> Result { self.get_wallet() - .is_mine(>::into(script).as_script()) + .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. - pub fn get_address(&self, address_index: AddressIndex) -> Result { - self.get_wallet() + pub fn get_address( ptr: BdkWallet, address_index: AddressIndex) -> Result<(BdkAddress, u32), BdkError> { + ptr.get_wallet() .get_address(address_index.into()) - .map(AddressInfo::from) + .map(|e| (e.address.into(), e.index)) .map_err(|e| e.into()) } @@ -75,12 +75,12 @@ impl WalletBase { /// in the descriptor are derivable (i.e. does not end with /*) then the same address will always /// be returned for any [AddressIndex]. pub fn get_internal_address( - &self, + ptr: BdkWallet, address_index: AddressIndex, - ) -> Result { - self.get_wallet() + ) -> Result<(BdkAddress, u32), BdkError> { + ptr.get_wallet() .get_internal_address(address_index.into()) - .map(|e| e.into()) + .map(|e| (e.address.into(), e.index)) .map_err(|e| e.into()) } @@ -97,11 +97,15 @@ impl WalletBase { &self, include_raw: bool, ) -> Result, BdkError> { - let transaction_details = self.get_wallet().list_transactions(include_raw)?; - Ok(transaction_details + let mut transaction_details = vec![]; + for e in self + .get_wallet() + .list_transactions(include_raw)? .into_iter() - .map(TransactionDetails::from) - .collect()) + { + 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, @@ -119,8 +123,8 @@ impl WalletBase { /// signers will follow the options, but the "software signers" (WIF keys and `xprv`) defined /// in this library will. pub fn sign( - ptr: WalletBase, - psbt: PsbtBase, + ptr: BdkWallet, + psbt: BdkPsbt, sign_options: Option, ) -> Result { let mut psbt = psbt.ptr.lock().unwrap(); @@ -132,7 +136,7 @@ impl WalletBase { .map_err(|e| e.into()) } /// Sync the internal database with the blockchain. - pub fn sync(ptr: WalletBase, blockchain: BlockchainBase) -> Result<(), BdkError> { + pub fn sync(ptr: BdkWallet, blockchain: BdkBlockchain) -> Result<(), BdkError> { let blockchain = blockchain.get_blockchain(); ptr.get_wallet() .sync(blockchain.deref(), bdk::SyncOptions::default()) @@ -146,31 +150,31 @@ impl WalletBase { sighash_type: Option, ) -> anyhow::Result { let input = self.get_wallet().get_psbt_input( - utxo.into(), + utxo.try_into()?, sighash_type.map(|e| e.into()), only_witness_utxo, )?; - Ok(input.into()) + input.try_into() } ///Returns the descriptor used to create addresses for a particular keychain. pub fn get_descriptor_for_keychain( - ptr: WalletBase, + ptr: BdkWallet, keychain: KeychainKind, - ) -> anyhow::Result { + ) -> anyhow::Result { let wallet = ptr.get_wallet(); let extended_descriptor = wallet.get_descriptor_for_keychain(keychain.into()); - DescriptorBase::new(extended_descriptor.to_string(), wallet.network().into()) + BdkDescriptor::new(extended_descriptor.to_string(), wallet.network().into()) } } pub fn finish_bump_fee_tx_builder( txid: String, fee_rate: f32, - allow_shrinking: Option, - wallet: WalletBase, + allow_shrinking: Option, + wallet: BdkWallet, enable_rbf: bool, n_sequence: Option, -) -> anyhow::Result<(PsbtBase, TransactionDetails), BdkError> { +) -> anyhow::Result<(BdkPsbt, TransactionDetails), BdkError> { let txid = Txid::from_str(txid.as_str()).unwrap(); let bdk_wallet = wallet.get_wallet(); @@ -188,13 +192,13 @@ pub fn finish_bump_fee_tx_builder( tx_builder.enable_rbf(); } return match tx_builder.finish() { - Ok(e) => Ok((e.0.into(), TransactionDetails::from(&e.1))), + Ok(e) => Ok((e.0.into(), TransactionDetails::try_from(e.1)?)), Err(e) => Err(e.into()), }; } pub fn tx_builder_finish( - wallet: WalletBase, + wallet: BdkWallet, recipients: Vec, utxos: Vec, foreign_utxo: Option<(OutPoint, Input, usize)>, @@ -204,10 +208,10 @@ pub fn tx_builder_finish( fee_rate: Option, fee_absolute: Option, drain_wallet: bool, - drain_to: Option, + drain_to: Option, rbf: Option, data: Vec, -) -> anyhow::Result<(PsbtBase, TransactionDetails), BdkError> { +) -> anyhow::Result<(BdkPsbt, TransactionDetails), BdkError> { let binding = wallet.get_wallet(); let mut tx_builder = binding.build_tx(); @@ -218,16 +222,19 @@ pub fn tx_builder_finish( tx_builder.change_policy(change_policy.into()); if !utxos.is_empty() { - let bdk_utxos: Vec = - utxos.iter().map(bdk::bitcoin::OutPoint::from).collect(); - let utxos: &[bdk::bitcoin::OutPoint] = &bdk_utxos; - tx_builder.add_utxos(utxos).map_err(|e| >::into(e))?; + 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: Vec = un_spendable + let bdk_unspendable = un_spendable .iter() - .map(bdk::bitcoin::OutPoint::from) - .collect(); + .map(|e| bdk::bitcoin::OutPoint::try_from(e)) + .collect::, BdkError>>()?; tx_builder.unspendable(bdk_unspendable); } if manually_selected_only { @@ -246,8 +253,8 @@ pub fn tx_builder_finish( tx_builder.drain_to(script_.into()); } if let Some(utxo) = foreign_utxo { - let foreign_utxo: bdk::bitcoin::psbt::Input = utxo.1.into(); - tx_builder.add_foreign_utxo((&utxo.0).into(), foreign_utxo, utxo.2)?; + 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 { @@ -266,7 +273,7 @@ pub fn tx_builder_finish( } return match tx_builder.finish() { - Ok(e) => Ok((e.0.into(), TransactionDetails::from(&e.1))), + Ok(e) => Ok((e.0.into(), TransactionDetails::try_from(&e.1)?)), Err(e) => Err(e.into()), }; -} +} \ No newline at end of file From 11cea233b66caf156de2220167c28bc7be5b390f Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Sun, 31 Mar 2024 17:02:00 -0400 Subject: [PATCH 07/27] bindings updated --- ios/Classes/frb_generated.h | 692 ++--- lib/src/generated/frb_generated.dart | 2805 ++++++++++---------- lib/src/generated/frb_generated.io.dart | 2988 +++++++++++----------- lib/src/generated/frb_generated.web.dart | 1390 +++++----- macos/Classes/frb_generated.h | 692 ++--- rust/src/frb_generated.io.rs | 1416 +++++----- rust/src/frb_generated.rs | 1638 ++++++------ rust/src/frb_generated.web.rs | 792 +++--- 8 files changed, 6504 insertions(+), 5909 deletions(-) diff --git a/ios/Classes/frb_generated.h b/ios/Classes/frb_generated.h index f8bc1d42..c79716cb 100644 --- a/ios/Classes/frb_generated.h +++ b/ios/Classes/frb_generated.h @@ -14,18 +14,18 @@ void store_dart_post_cobject(DartPostCObjectFnType ptr); // EXTRA END typedef struct _Dart_Handle* Dart_Handle; -typedef struct wire_cst_blockchain_base { +typedef struct wire_cst_bdk_blockchain { uintptr_t ptr; -} wire_cst_blockchain_base; +} 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_transaction_base { +typedef struct wire_cst_bdk_transaction { struct wire_cst_list_prim_u_8_strict *inner; -} wire_cst_transaction_base; +} wire_cst_bdk_transaction; typedef struct wire_cst_electrum_config { struct wire_cst_list_prim_u_8_strict *url; @@ -101,47 +101,97 @@ typedef struct wire_cst_blockchain_config { union BlockchainConfigKind kind; } wire_cst_blockchain_config; -typedef struct wire_cst_descriptor_base { +typedef struct wire_cst_bdk_descriptor { uintptr_t extended_descriptor; uintptr_t key_map; -} wire_cst_descriptor_base; +} wire_cst_bdk_descriptor; -typedef struct wire_cst_descriptor_secret_key_base { +typedef struct wire_cst_bdk_descriptor_secret_key { uintptr_t ptr; -} wire_cst_descriptor_secret_key_base; +} wire_cst_bdk_descriptor_secret_key; -typedef struct wire_cst_descriptor_public_key_base { +typedef struct wire_cst_bdk_descriptor_public_key { uintptr_t ptr; -} wire_cst_descriptor_public_key_base; +} wire_cst_bdk_descriptor_public_key; -typedef struct wire_cst_derivation_path_base { +typedef struct wire_cst_bdk_derivation_path { uintptr_t ptr; -} wire_cst_derivation_path_base; +} wire_cst_bdk_derivation_path; -typedef struct wire_cst_mnemonic_base { +typedef struct wire_cst_bdk_mnemonic { uintptr_t ptr; -} wire_cst_mnemonic_base; +} 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_psbt_base { +typedef struct wire_cst_bdk_psbt { uintptr_t ptr; -} wire_cst_psbt_base; +} wire_cst_bdk_psbt; -typedef struct wire_cst_address_base { +typedef struct wire_cst_bdk_address { uintptr_t ptr; -} wire_cst_address_base; +} wire_cst_bdk_address; -typedef struct wire_cst_script_buf_base { +typedef struct wire_cst_bdk_script_buf { struct wire_cst_list_prim_u_8_strict *bytes; -} wire_cst_script_buf_base; +} wire_cst_bdk_script_buf; -typedef struct wire_cst_wallet_base { +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_wallet_base; +} wire_cst_bdk_wallet; typedef struct wire_cst_AddressIndex_Peek { uint32_t index; @@ -161,16 +211,6 @@ typedef struct wire_cst_address_index { union AddressIndexKind kind; } wire_cst_address_index; -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_tx_out { - uint64_t value; - struct wire_cst_script_buf_base script_pubkey; -} wire_cst_tx_out; - typedef struct wire_cst_local_utxo { struct wire_cst_out_point outpoint; struct wire_cst_tx_out txout; @@ -221,7 +261,7 @@ typedef struct wire_cst_sign_options { } wire_cst_sign_options; typedef struct wire_cst_script_amount { - struct wire_cst_script_buf_base script; + struct wire_cst_bdk_script_buf script; uint64_t amount; } wire_cst_script_amount; @@ -430,18 +470,13 @@ typedef struct wire_cst_hex_error { union HexErrorKind kind; } wire_cst_hex_error; -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_list_local_utxo { struct wire_cst_local_utxo *ptr; int32_t len; } wire_cst_list_local_utxo; typedef struct wire_cst_transaction_details { - struct wire_cst_transaction_base *transaction; + struct wire_cst_bdk_transaction *transaction; struct wire_cst_list_prim_u_8_strict *txid; uint64_t received; uint64_t sent; @@ -454,28 +489,6 @@ typedef struct wire_cst_list_transaction_details { int32_t len; } wire_cst_list_transaction_details; -typedef struct wire_cst_tx_in { - struct wire_cst_out_point previous_output; - struct wire_cst_script_buf_base 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_list_tx_out { - struct wire_cst_tx_out *ptr; - int32_t len; -} wire_cst_list_tx_out; - -typedef struct wire_cst_address_info { - uint32_t index; - struct wire_cst_list_prim_u_8_strict *address; -} wire_cst_address_info; - typedef struct wire_cst_balance { uint64_t immature; uint64_t trusted_pending; @@ -616,6 +629,18 @@ 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; @@ -649,6 +674,9 @@ typedef union BdkErrorKind { 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 { @@ -680,288 +708,298 @@ typedef struct wire_cst_payload { union PayloadKind kind; } wire_cst_payload; -typedef struct wire_cst_record_psbt_base_transaction_details { - struct wire_cst_psbt_base field0; +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_psbt_base_transaction_details; +} wire_cst_record_bdk_psbt_transaction_details; -void frbgen_bdk_flutter_wire_BlockchainBase_broadcast(int64_t port_, - struct wire_cst_blockchain_base *that, - struct wire_cst_transaction_base *transaction); +void frbgen_bdk_flutter_wire_bdk_blockchain_broadcast(int64_t port_, + struct wire_cst_bdk_blockchain *that, + struct wire_cst_bdk_transaction *transaction); -void frbgen_bdk_flutter_wire_BlockchainBase_estimate_fee(int64_t port_, - struct wire_cst_blockchain_base *that, +void frbgen_bdk_flutter_wire_bdk_blockchain_estimate_fee(int64_t port_, + struct wire_cst_bdk_blockchain *that, uint64_t target); -void frbgen_bdk_flutter_wire_BlockchainBase_get_block_hash(int64_t port_, - struct wire_cst_blockchain_base *that, +void frbgen_bdk_flutter_wire_bdk_blockchain_get_block_hash(int64_t port_, + struct wire_cst_bdk_blockchain *that, uint32_t height); -void frbgen_bdk_flutter_wire_BlockchainBase_get_height(int64_t port_, - struct wire_cst_blockchain_base *that); +void frbgen_bdk_flutter_wire_bdk_blockchain_get_height(int64_t port_, + struct wire_cst_bdk_blockchain *that); -void frbgen_bdk_flutter_wire_BlockchainBase_new(int64_t port_, +void frbgen_bdk_flutter_wire_bdk_blockchain_new(int64_t port_, struct wire_cst_blockchain_config *blockchain_config); -void frbgen_bdk_flutter_wire_DescriptorBase_as_string(int64_t port_, - struct wire_cst_descriptor_base *that); +void frbgen_bdk_flutter_wire_bdk_descriptor_as_string(int64_t port_, + struct wire_cst_bdk_descriptor *that); -void frbgen_bdk_flutter_wire_DescriptorBase_as_string_private(int64_t port_, - struct wire_cst_descriptor_base *that); +void frbgen_bdk_flutter_wire_bdk_descriptor_as_string_private(int64_t port_, + struct wire_cst_bdk_descriptor *that); -void frbgen_bdk_flutter_wire_DescriptorBase_max_satisfaction_weight(int64_t port_, - struct wire_cst_descriptor_base *that); +void frbgen_bdk_flutter_wire_bdk_descriptor_max_satisfaction_weight(int64_t port_, + struct wire_cst_bdk_descriptor *that); -void frbgen_bdk_flutter_wire_DescriptorBase_new(int64_t port_, +void frbgen_bdk_flutter_wire_bdk_descriptor_new(int64_t port_, struct wire_cst_list_prim_u_8_strict *descriptor, int32_t network); -void frbgen_bdk_flutter_wire_DescriptorBase_new_bip44(int64_t port_, - struct wire_cst_descriptor_secret_key_base *secret_key, +void frbgen_bdk_flutter_wire_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_DescriptorBase_new_bip44_public(int64_t port_, - struct wire_cst_descriptor_public_key_base *public_key, +void frbgen_bdk_flutter_wire_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_DescriptorBase_new_bip49(int64_t port_, - struct wire_cst_descriptor_secret_key_base *secret_key, +void frbgen_bdk_flutter_wire_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_DescriptorBase_new_bip49_public(int64_t port_, - struct wire_cst_descriptor_public_key_base *public_key, +void frbgen_bdk_flutter_wire_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_DescriptorBase_new_bip84(int64_t port_, - struct wire_cst_descriptor_secret_key_base *secret_key, +void frbgen_bdk_flutter_wire_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_DescriptorBase_new_bip84_public(int64_t port_, - struct wire_cst_descriptor_public_key_base *public_key, +void frbgen_bdk_flutter_wire_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_DescriptorBase_new_bip86(int64_t port_, - struct wire_cst_descriptor_secret_key_base *secret_key, +void frbgen_bdk_flutter_wire_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_DescriptorBase_new_bip86_public(int64_t port_, - struct wire_cst_descriptor_public_key_base *public_key, +void frbgen_bdk_flutter_wire_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); -void frbgen_bdk_flutter_wire_DerivationPathBase_from_string(int64_t port_, - struct wire_cst_list_prim_u_8_strict *path); +void frbgen_bdk_flutter_wire_bdk_derivation_path_from_string(int64_t port_, + struct wire_cst_list_prim_u_8_strict *path); -void frbgen_bdk_flutter_wire_DescriptorPublicKeyBase_as_string(int64_t port_, - struct wire_cst_descriptor_public_key_base *that); +void frbgen_bdk_flutter_wire_bdk_descriptor_public_key_as_string(int64_t port_, + struct wire_cst_bdk_descriptor_public_key *that); -void frbgen_bdk_flutter_wire_DescriptorPublicKeyBase_derive(int64_t port_, - struct wire_cst_descriptor_public_key_base *ptr, - struct wire_cst_derivation_path_base *path); +void frbgen_bdk_flutter_wire_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_DescriptorPublicKeyBase_extend(int64_t port_, - struct wire_cst_descriptor_public_key_base *ptr, - struct wire_cst_derivation_path_base *path); +void frbgen_bdk_flutter_wire_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_DescriptorPublicKeyBase_from_string(int64_t port_, - struct wire_cst_list_prim_u_8_strict *public_key); +void frbgen_bdk_flutter_wire_bdk_descriptor_public_key_from_string(int64_t port_, + struct wire_cst_list_prim_u_8_strict *public_key); -void frbgen_bdk_flutter_wire_DescriptorSecretKeyBase_as_public(int64_t port_, - struct wire_cst_descriptor_secret_key_base *ptr); +void frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_as_public(int64_t port_, + struct wire_cst_bdk_descriptor_secret_key *ptr); -void frbgen_bdk_flutter_wire_DescriptorSecretKeyBase_as_string(int64_t port_, - struct wire_cst_descriptor_secret_key_base *that); +void frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_as_string(int64_t port_, + struct wire_cst_bdk_descriptor_secret_key *that); -void frbgen_bdk_flutter_wire_DescriptorSecretKeyBase_create(int64_t port_, - int32_t network, - struct wire_cst_mnemonic_base *mnemonic, - struct wire_cst_list_prim_u_8_strict *password); +void frbgen_bdk_flutter_wire_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_DescriptorSecretKeyBase_derive(int64_t port_, - struct wire_cst_descriptor_secret_key_base *ptr, - struct wire_cst_derivation_path_base *path); +void frbgen_bdk_flutter_wire_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_DescriptorSecretKeyBase_extend(int64_t port_, - struct wire_cst_descriptor_secret_key_base *ptr, - struct wire_cst_derivation_path_base *path); +void frbgen_bdk_flutter_wire_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_DescriptorSecretKeyBase_from_string(int64_t port_, - struct wire_cst_list_prim_u_8_strict *secret_key); +void frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_from_string(int64_t port_, + struct wire_cst_list_prim_u_8_strict *secret_key); -void frbgen_bdk_flutter_wire_DescriptorSecretKeyBase_secret_bytes(int64_t port_, - struct wire_cst_descriptor_secret_key_base *that); +void frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_secret_bytes(int64_t port_, + struct wire_cst_bdk_descriptor_secret_key *that); -void frbgen_bdk_flutter_wire_MnemonicBase_as_string(int64_t port_, - struct wire_cst_mnemonic_base *that); +void frbgen_bdk_flutter_wire_bdk_mnemonic_as_string(int64_t port_, + struct wire_cst_bdk_mnemonic *that); -void frbgen_bdk_flutter_wire_MnemonicBase_from_entropy(int64_t port_, +void frbgen_bdk_flutter_wire_bdk_mnemonic_from_entropy(int64_t port_, struct wire_cst_list_prim_u_8_loose *entropy); -void frbgen_bdk_flutter_wire_MnemonicBase_from_string(int64_t port_, +void frbgen_bdk_flutter_wire_bdk_mnemonic_from_string(int64_t port_, struct wire_cst_list_prim_u_8_strict *mnemonic); -void frbgen_bdk_flutter_wire_MnemonicBase_new(int64_t port_, int32_t word_count); +void frbgen_bdk_flutter_wire_bdk_mnemonic_new(int64_t port_, int32_t word_count); -void frbgen_bdk_flutter_wire_PsbtBase_combine(int64_t port_, - struct wire_cst_psbt_base *ptr, - struct wire_cst_psbt_base *other); +void frbgen_bdk_flutter_wire_bdk_psbt_combine(int64_t port_, + struct wire_cst_bdk_psbt *ptr, + struct wire_cst_bdk_psbt *other); -void frbgen_bdk_flutter_wire_PsbtBase_extract_tx(int64_t port_, struct wire_cst_psbt_base *ptr); +void frbgen_bdk_flutter_wire_bdk_psbt_extract_tx(int64_t port_, struct wire_cst_bdk_psbt *ptr); -void frbgen_bdk_flutter_wire_PsbtBase_fee_amount(int64_t port_, struct wire_cst_psbt_base *that); +void frbgen_bdk_flutter_wire_bdk_psbt_fee_amount(int64_t port_, struct wire_cst_bdk_psbt *that); -void frbgen_bdk_flutter_wire_PsbtBase_fee_rate(int64_t port_, struct wire_cst_psbt_base *that); +void frbgen_bdk_flutter_wire_bdk_psbt_fee_rate(int64_t port_, struct wire_cst_bdk_psbt *that); -void frbgen_bdk_flutter_wire_PsbtBase_from_str(int64_t port_, +void frbgen_bdk_flutter_wire_bdk_psbt_from_str(int64_t port_, struct wire_cst_list_prim_u_8_strict *psbt_base64); -void frbgen_bdk_flutter_wire_PsbtBase_json_serialize(int64_t port_, - struct wire_cst_psbt_base *that); +void frbgen_bdk_flutter_wire_bdk_psbt_json_serialize(int64_t port_, struct wire_cst_bdk_psbt *that); -void frbgen_bdk_flutter_wire_PsbtBase_serialize(int64_t port_, struct wire_cst_psbt_base *that); +void frbgen_bdk_flutter_wire_bdk_psbt_serialize(int64_t port_, struct wire_cst_bdk_psbt *that); -void frbgen_bdk_flutter_wire_PsbtBase_txid(int64_t port_, struct wire_cst_psbt_base *that); +void frbgen_bdk_flutter_wire_bdk_psbt_txid(int64_t port_, struct wire_cst_bdk_psbt *that); -void frbgen_bdk_flutter_wire_AddressBase_as_string(int64_t port_, - struct wire_cst_address_base *that); +void frbgen_bdk_flutter_wire_bdk_address_as_string(int64_t port_, + struct wire_cst_bdk_address *that); -void frbgen_bdk_flutter_wire_AddressBase_from_script(int64_t port_, - struct wire_cst_script_buf_base *script, +void frbgen_bdk_flutter_wire_bdk_address_from_script(int64_t port_, + struct wire_cst_bdk_script_buf *script, int32_t network); -void frbgen_bdk_flutter_wire_AddressBase_from_string(int64_t port_, +void frbgen_bdk_flutter_wire_bdk_address_from_string(int64_t port_, struct wire_cst_list_prim_u_8_strict *address, int32_t network); -void frbgen_bdk_flutter_wire_AddressBase_is_valid_for_network(int64_t port_, - struct wire_cst_address_base *that, +void frbgen_bdk_flutter_wire_bdk_address_is_valid_for_network(int64_t port_, + struct wire_cst_bdk_address *that, int32_t network); -void frbgen_bdk_flutter_wire_AddressBase_network(int64_t port_, struct wire_cst_address_base *that); +void frbgen_bdk_flutter_wire_bdk_address_network(int64_t port_, struct wire_cst_bdk_address *that); + +void frbgen_bdk_flutter_wire_bdk_address_payload(int64_t port_, struct wire_cst_bdk_address *that); -void frbgen_bdk_flutter_wire_AddressBase_payload(int64_t port_, struct wire_cst_address_base *that); +void frbgen_bdk_flutter_wire_bdk_address_script(int64_t port_, struct wire_cst_bdk_address *ptr); -void frbgen_bdk_flutter_wire_AddressBase_script(int64_t port_, struct wire_cst_address_base *ptr); +void frbgen_bdk_flutter_wire_bdk_address_to_qr_uri(int64_t port_, + struct wire_cst_bdk_address *that); -void frbgen_bdk_flutter_wire_AddressBase_to_qr_uri(int64_t port_, - struct wire_cst_address_base *that); +void frbgen_bdk_flutter_wire_bdk_script_buf_empty(int64_t port_); -void frbgen_bdk_flutter_wire_ScriptBufBase_empty(int64_t port_); +void frbgen_bdk_flutter_wire_bdk_script_buf_from_hex(int64_t port_, + struct wire_cst_list_prim_u_8_strict *s); -void frbgen_bdk_flutter_wire_ScriptBufBase_from_hex(int64_t port_, - struct wire_cst_list_prim_u_8_strict *s); +void frbgen_bdk_flutter_wire_bdk_script_buf_with_capacity(int64_t port_, uintptr_t capacity); -void frbgen_bdk_flutter_wire_ScriptBufBase_with_capacity(int64_t port_, uintptr_t capacity); +void frbgen_bdk_flutter_wire_bdk_transaction_from_bytes(int64_t port_, + struct wire_cst_list_prim_u_8_loose *transaction_bytes); -void frbgen_bdk_flutter_wire_TransactionBase_input(int64_t port_, - struct wire_cst_transaction_base *that); +void frbgen_bdk_flutter_wire_bdk_transaction_input(int64_t port_, + struct wire_cst_bdk_transaction *that); -void frbgen_bdk_flutter_wire_TransactionBase_is_coin_base(int64_t port_, - struct wire_cst_transaction_base *that); +void frbgen_bdk_flutter_wire_bdk_transaction_is_coin_base(int64_t port_, + struct wire_cst_bdk_transaction *that); -void frbgen_bdk_flutter_wire_TransactionBase_is_explicitly_rbf(int64_t port_, - struct wire_cst_transaction_base *that); +void frbgen_bdk_flutter_wire_bdk_transaction_is_explicitly_rbf(int64_t port_, + struct wire_cst_bdk_transaction *that); -void frbgen_bdk_flutter_wire_TransactionBase_is_lock_time_enabled(int64_t port_, - struct wire_cst_transaction_base *that); +void frbgen_bdk_flutter_wire_bdk_transaction_is_lock_time_enabled(int64_t port_, + struct wire_cst_bdk_transaction *that); -void frbgen_bdk_flutter_wire_TransactionBase_lock_time(int64_t port_, - struct wire_cst_transaction_base *that); +void frbgen_bdk_flutter_wire_bdk_transaction_lock_time(int64_t port_, + struct wire_cst_bdk_transaction *that); -void frbgen_bdk_flutter_wire_TransactionBase_new(int64_t port_, - struct wire_cst_list_prim_u_8_loose *transaction_bytes); +void frbgen_bdk_flutter_wire_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_TransactionBase_output(int64_t port_, - struct wire_cst_transaction_base *that); +void frbgen_bdk_flutter_wire_bdk_transaction_output(int64_t port_, + struct wire_cst_bdk_transaction *that); -void frbgen_bdk_flutter_wire_TransactionBase_serialize(int64_t port_, - struct wire_cst_transaction_base *that); +void frbgen_bdk_flutter_wire_bdk_transaction_serialize(int64_t port_, + struct wire_cst_bdk_transaction *that); -void frbgen_bdk_flutter_wire_TransactionBase_size(int64_t port_, - struct wire_cst_transaction_base *that); +void frbgen_bdk_flutter_wire_bdk_transaction_size(int64_t port_, + struct wire_cst_bdk_transaction *that); -void frbgen_bdk_flutter_wire_TransactionBase_txid(int64_t port_, - struct wire_cst_transaction_base *that); +void frbgen_bdk_flutter_wire_bdk_transaction_txid(int64_t port_, + struct wire_cst_bdk_transaction *that); -void frbgen_bdk_flutter_wire_TransactionBase_version(int64_t port_, - struct wire_cst_transaction_base *that); +void frbgen_bdk_flutter_wire_bdk_transaction_version(int64_t port_, + struct wire_cst_bdk_transaction *that); -void frbgen_bdk_flutter_wire_TransactionBase_vsize(int64_t port_, - struct wire_cst_transaction_base *that); +void frbgen_bdk_flutter_wire_bdk_transaction_vsize(int64_t port_, + struct wire_cst_bdk_transaction *that); -void frbgen_bdk_flutter_wire_TransactionBase_weight(int64_t port_, - struct wire_cst_transaction_base *that); +void frbgen_bdk_flutter_wire_bdk_transaction_weight(int64_t port_, + struct wire_cst_bdk_transaction *that); -void frbgen_bdk_flutter_wire_WalletBase_get_address(int64_t port_, - struct wire_cst_wallet_base *that, +void frbgen_bdk_flutter_wire_bdk_wallet_get_address(int64_t port_, + struct wire_cst_bdk_wallet *ptr, struct wire_cst_address_index *address_index); -void frbgen_bdk_flutter_wire_WalletBase_get_balance(int64_t port_, - struct wire_cst_wallet_base *that); +void frbgen_bdk_flutter_wire_bdk_wallet_get_balance(int64_t port_, + struct wire_cst_bdk_wallet *that); -void frbgen_bdk_flutter_wire_WalletBase_get_descriptor_for_keychain(int64_t port_, - struct wire_cst_wallet_base *ptr, +void frbgen_bdk_flutter_wire_bdk_wallet_get_descriptor_for_keychain(int64_t port_, + struct wire_cst_bdk_wallet *ptr, int32_t keychain); -void frbgen_bdk_flutter_wire_WalletBase_get_internal_address(int64_t port_, - struct wire_cst_wallet_base *that, +void frbgen_bdk_flutter_wire_bdk_wallet_get_internal_address(int64_t port_, + struct wire_cst_bdk_wallet *ptr, struct wire_cst_address_index *address_index); -void frbgen_bdk_flutter_wire_WalletBase_get_psbt_input(int64_t port_, - struct wire_cst_wallet_base *that, +void frbgen_bdk_flutter_wire_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); -void frbgen_bdk_flutter_wire_WalletBase_is_mine(int64_t port_, - struct wire_cst_wallet_base *that, - struct wire_cst_script_buf_base *script); +void frbgen_bdk_flutter_wire_bdk_wallet_is_mine(int64_t port_, + struct wire_cst_bdk_wallet *that, + struct wire_cst_bdk_script_buf *script); -void frbgen_bdk_flutter_wire_WalletBase_list_transactions(int64_t port_, - struct wire_cst_wallet_base *that, +void frbgen_bdk_flutter_wire_bdk_wallet_list_transactions(int64_t port_, + struct wire_cst_bdk_wallet *that, bool include_raw); -void frbgen_bdk_flutter_wire_WalletBase_list_unspent(int64_t port_, - struct wire_cst_wallet_base *that); +void frbgen_bdk_flutter_wire_bdk_wallet_list_unspent(int64_t port_, + struct wire_cst_bdk_wallet *that); -void frbgen_bdk_flutter_wire_WalletBase_network(int64_t port_, struct wire_cst_wallet_base *that); +void frbgen_bdk_flutter_wire_bdk_wallet_network(int64_t port_, struct wire_cst_bdk_wallet *that); -void frbgen_bdk_flutter_wire_WalletBase_new(int64_t port_, - struct wire_cst_descriptor_base *descriptor, - struct wire_cst_descriptor_base *change_descriptor, +void frbgen_bdk_flutter_wire_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); -void frbgen_bdk_flutter_wire_WalletBase_sign(int64_t port_, - struct wire_cst_wallet_base *ptr, - struct wire_cst_psbt_base *psbt, +void frbgen_bdk_flutter_wire_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_WalletBase_sync(int64_t port_, - struct wire_cst_wallet_base *ptr, - struct wire_cst_blockchain_base *blockchain); +void frbgen_bdk_flutter_wire_bdk_wallet_sync(int64_t port_, + struct wire_cst_bdk_wallet *ptr, + struct wire_cst_bdk_blockchain *blockchain); void frbgen_bdk_flutter_wire_finish_bump_fee_tx_builder(int64_t port_, struct wire_cst_list_prim_u_8_strict *txid, float fee_rate, - struct wire_cst_address_base *allow_shrinking, - struct wire_cst_wallet_base *wallet, + 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_tx_builder_finish(int64_t port_, - struct wire_cst_wallet_base *wallet, + 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, @@ -971,7 +1009,7 @@ void frbgen_bdk_flutter_wire_tx_builder_finish(int64_t port_, float *fee_rate, uint64_t *fee_absolute, bool drain_wallet, - struct wire_cst_script_buf_base *drain_to, + struct wire_cst_bdk_script_buf *drain_to, struct wire_cst_rbf_value *rbf, struct wire_cst_list_prim_u_8_loose *data); @@ -1015,31 +1053,41 @@ void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysbip39Mnem void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysbip39Mnemonic(const void *ptr); -struct wire_cst_address_base *frbgen_bdk_flutter_cst_new_box_autoadd_address_base(void); - 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_block_time *frbgen_bdk_flutter_cst_new_box_autoadd_block_time(void); +struct wire_cst_bdk_address *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_address(void); -struct wire_cst_blockchain_base *frbgen_bdk_flutter_cst_new_box_autoadd_blockchain_base(void); +struct wire_cst_bdk_blockchain *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_blockchain(void); -struct wire_cst_blockchain_config *frbgen_bdk_flutter_cst_new_box_autoadd_blockchain_config(void); +struct wire_cst_bdk_derivation_path *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_derivation_path(void); -struct wire_cst_consensus_error *frbgen_bdk_flutter_cst_new_box_autoadd_consensus_error(void); +struct wire_cst_bdk_descriptor *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor(void); -struct wire_cst_database_config *frbgen_bdk_flutter_cst_new_box_autoadd_database_config(void); +struct wire_cst_bdk_descriptor_public_key *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor_public_key(void); -struct wire_cst_derivation_path_base *frbgen_bdk_flutter_cst_new_box_autoadd_derivation_path_base(void); +struct wire_cst_bdk_descriptor_secret_key *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor_secret_key(void); -struct wire_cst_descriptor_base *frbgen_bdk_flutter_cst_new_box_autoadd_descriptor_base(void); +struct wire_cst_bdk_mnemonic *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_mnemonic(void); -struct wire_cst_descriptor_error *frbgen_bdk_flutter_cst_new_box_autoadd_descriptor_error(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_descriptor_public_key_base *frbgen_bdk_flutter_cst_new_box_autoadd_descriptor_public_key_base(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); + +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_secret_key_base *frbgen_bdk_flutter_cst_new_box_autoadd_descriptor_secret_key_base(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); @@ -1053,12 +1101,10 @@ 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_mnemonic_base *frbgen_bdk_flutter_cst_new_box_autoadd_mnemonic_base(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_psbt_base *frbgen_bdk_flutter_cst_new_box_autoadd_psbt_base(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); @@ -1069,24 +1115,18 @@ struct wire_cst_rpc_config *frbgen_bdk_flutter_cst_new_box_autoadd_rpc_config(vo struct wire_cst_rpc_sync_params *frbgen_bdk_flutter_cst_new_box_autoadd_rpc_sync_params(void); -struct wire_cst_script_buf_base *frbgen_bdk_flutter_cst_new_box_autoadd_script_buf_base(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); -struct wire_cst_transaction_base *frbgen_bdk_flutter_cst_new_box_autoadd_transaction_base(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_wallet_base *frbgen_bdk_flutter_cst_new_box_autoadd_wallet_base(void); - 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); @@ -1106,42 +1146,43 @@ 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_base); 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_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_base); 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_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_derivation_path_base); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_descriptor_base); 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_descriptor_public_key_base); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_descriptor_secret_key_base); 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_mnemonic_base); + 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_psbt_base); 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_script_buf_base); 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_transaction_base); 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_box_autoadd_wallet_base); 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); @@ -1171,83 +1212,84 @@ static int64_t dummy_method_to_enforce_bundling(void) { dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysDescriptorSecretKey); dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysKeyMap); dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysbip39Mnemonic); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_AddressBase_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_AddressBase_from_script); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_AddressBase_from_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_AddressBase_is_valid_for_network); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_AddressBase_network); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_AddressBase_payload); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_AddressBase_script); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_AddressBase_to_qr_uri); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_BlockchainBase_broadcast); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_BlockchainBase_estimate_fee); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_BlockchainBase_get_block_hash); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_BlockchainBase_get_height); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_BlockchainBase_new); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DerivationPathBase_from_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorBase_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorBase_as_string_private); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorBase_max_satisfaction_weight); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorBase_new); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorBase_new_bip44); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorBase_new_bip44_public); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorBase_new_bip49); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorBase_new_bip49_public); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorBase_new_bip84); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorBase_new_bip84_public); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorBase_new_bip86); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorBase_new_bip86_public); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorPublicKeyBase_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorPublicKeyBase_derive); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorPublicKeyBase_extend); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorPublicKeyBase_from_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorSecretKeyBase_as_public); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorSecretKeyBase_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorSecretKeyBase_create); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorSecretKeyBase_derive); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorSecretKeyBase_extend); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorSecretKeyBase_from_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorSecretKeyBase_secret_bytes); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_MnemonicBase_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_MnemonicBase_from_entropy); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_MnemonicBase_from_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_MnemonicBase_new); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_PsbtBase_combine); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_PsbtBase_extract_tx); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_PsbtBase_fee_amount); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_PsbtBase_fee_rate); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_PsbtBase_from_str); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_PsbtBase_json_serialize); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_PsbtBase_serialize); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_PsbtBase_txid); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_ScriptBufBase_empty); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_ScriptBufBase_from_hex); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_ScriptBufBase_with_capacity); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_TransactionBase_input); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_TransactionBase_is_coin_base); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_TransactionBase_is_explicitly_rbf); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_TransactionBase_is_lock_time_enabled); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_TransactionBase_lock_time); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_TransactionBase_new); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_TransactionBase_output); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_TransactionBase_serialize); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_TransactionBase_size); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_TransactionBase_txid); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_TransactionBase_version); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_TransactionBase_vsize); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_TransactionBase_weight); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_WalletBase_get_address); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_WalletBase_get_balance); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_WalletBase_get_descriptor_for_keychain); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_WalletBase_get_internal_address); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_WalletBase_get_psbt_input); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_WalletBase_is_mine); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_WalletBase_list_transactions); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_WalletBase_list_unspent); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_WalletBase_network); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_WalletBase_new); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_WalletBase_sign); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_WalletBase_sync); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_from_script); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_from_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_is_valid_for_network); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_network); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_payload); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_script); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_to_qr_uri); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_blockchain_broadcast); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_blockchain_estimate_fee); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_blockchain_get_block_hash); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_blockchain_get_height); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_blockchain_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_derivation_path_from_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_as_string_private); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_max_satisfaction_weight); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip44); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip44_public); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip49); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip49_public); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip84); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip84_public); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip86); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip86_public); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_public_key_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_public_key_derive); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_public_key_extend); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_public_key_from_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_as_public); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_create); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_derive); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_extend); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_from_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_secret_bytes); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_mnemonic_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_mnemonic_from_entropy); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_mnemonic_from_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_mnemonic_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_combine); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_extract_tx); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_fee_amount); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_fee_rate); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_from_str); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_json_serialize); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_serialize); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_txid); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_script_buf_empty); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_script_buf_from_hex); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_script_buf_with_capacity); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_from_bytes); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_input); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_is_coin_base); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_is_explicitly_rbf); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_is_lock_time_enabled); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_lock_time); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_output); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_serialize); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_size); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_txid); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_version); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_vsize); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_weight); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_get_address); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_get_balance); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_get_descriptor_for_keychain); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_get_internal_address); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_get_psbt_input); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_is_mine); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_list_transactions); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_list_unspent); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_network); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_sign); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_sync); dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_finish_bump_fee_tx_builder); dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_tx_builder_finish); dummy_var ^= ((int64_t) (void*) store_dart_post_cobject); diff --git a/lib/src/generated/frb_generated.dart b/lib/src/generated/frb_generated.dart index 4ca83a0e..0b4c7516 100644 --- a/lib/src/generated/frb_generated.dart +++ b/lib/src/generated/frb_generated.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.28. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31. // 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 @@ -16,15 +16,15 @@ import 'frb_generated.io.dart' if (dart.library.html) 'frb_generated.web.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; /// Main entrypoint of the Rust API -class BdkCore extends BaseEntrypoint { +class CApi extends BaseEntrypoint { @internal - static final instance = BdkCore._(); + static final instance = CApi._(); - BdkCore._(); + CApi._(); /// Initialize flutter_rust_bridge static Future init({ - BdkCoreApi? api, + CApiApi? api, BaseHandler? handler, ExternalLibrary? externalLibrary, }) async { @@ -42,12 +42,11 @@ class BdkCore extends BaseEntrypoint { static void dispose() => instance.disposeImpl(); @override - ApiImplConstructor get apiImplConstructor => - BdkCoreApiImpl.new; + ApiImplConstructor get apiImplConstructor => + CApiApiImpl.new; @override - WireConstructor get wireConstructor => - BdkCoreWire.fromExternalLibrary; + WireConstructor get wireConstructor => CApiWire.fromExternalLibrary; @override Future executeRustInitializers() async {} @@ -57,7 +56,7 @@ class BdkCore extends BaseEntrypoint { kDefaultExternalLibraryLoaderConfig; @override - String get codegenVersion => '2.0.0-dev.28'; + String get codegenVersion => '2.0.0-dev.31'; static const kDefaultExternalLibraryLoaderConfig = ExternalLibraryLoaderConfig( @@ -67,294 +66,296 @@ class BdkCore extends BaseEntrypoint { ); } -abstract class BdkCoreApi extends BaseApi { - Future blockchainBaseBroadcast( - {required BlockchainBase that, - required TransactionBase transaction, +abstract class CApiApi extends BaseApi { + Future bdkBlockchainBroadcast( + {required BdkBlockchain that, + required BdkTransaction transaction, dynamic hint}); - Future blockchainBaseEstimateFee( - {required BlockchainBase that, required int target, dynamic hint}); + Future bdkBlockchainEstimateFee( + {required BdkBlockchain that, required int target, dynamic hint}); - Future blockchainBaseGetBlockHash( - {required BlockchainBase that, required int height, dynamic hint}); + Future bdkBlockchainGetBlockHash( + {required BdkBlockchain that, required int height, dynamic hint}); - Future blockchainBaseGetHeight( - {required BlockchainBase that, dynamic hint}); + Future bdkBlockchainGetHeight( + {required BdkBlockchain that, dynamic hint}); - Future blockchainBaseNew( + Future bdkBlockchainNew( {required BlockchainConfig blockchainConfig, dynamic hint}); - Future descriptorBaseAsString( - {required DescriptorBase that, dynamic hint}); + Future bdkDescriptorAsString( + {required BdkDescriptor that, dynamic hint}); - Future descriptorBaseAsStringPrivate( - {required DescriptorBase that, dynamic hint}); + Future bdkDescriptorAsStringPrivate( + {required BdkDescriptor that, dynamic hint}); - Future descriptorBaseMaxSatisfactionWeight( - {required DescriptorBase that, dynamic hint}); + Future bdkDescriptorMaxSatisfactionWeight( + {required BdkDescriptor that, dynamic hint}); - Future descriptorBaseNew( + Future bdkDescriptorNew( {required String descriptor, required Network network, dynamic hint}); - Future descriptorBaseNewBip44( - {required DescriptorSecretKeyBase secretKey, + Future bdkDescriptorNewBip44( + {required BdkDescriptorSecretKey secretKey, required KeychainKind keychainKind, required Network network, dynamic hint}); - Future descriptorBaseNewBip44Public( - {required DescriptorPublicKeyBase publicKey, + Future bdkDescriptorNewBip44Public( + {required BdkDescriptorPublicKey publicKey, required String fingerprint, required KeychainKind keychainKind, required Network network, dynamic hint}); - Future descriptorBaseNewBip49( - {required DescriptorSecretKeyBase secretKey, + Future bdkDescriptorNewBip49( + {required BdkDescriptorSecretKey secretKey, required KeychainKind keychainKind, required Network network, dynamic hint}); - Future descriptorBaseNewBip49Public( - {required DescriptorPublicKeyBase publicKey, + Future bdkDescriptorNewBip49Public( + {required BdkDescriptorPublicKey publicKey, required String fingerprint, required KeychainKind keychainKind, required Network network, dynamic hint}); - Future descriptorBaseNewBip84( - {required DescriptorSecretKeyBase secretKey, + Future bdkDescriptorNewBip84( + {required BdkDescriptorSecretKey secretKey, required KeychainKind keychainKind, required Network network, dynamic hint}); - Future descriptorBaseNewBip84Public( - {required DescriptorPublicKeyBase publicKey, + Future bdkDescriptorNewBip84Public( + {required BdkDescriptorPublicKey publicKey, required String fingerprint, required KeychainKind keychainKind, required Network network, dynamic hint}); - Future descriptorBaseNewBip86( - {required DescriptorSecretKeyBase secretKey, + Future bdkDescriptorNewBip86( + {required BdkDescriptorSecretKey secretKey, required KeychainKind keychainKind, required Network network, dynamic hint}); - Future descriptorBaseNewBip86Public( - {required DescriptorPublicKeyBase publicKey, + Future bdkDescriptorNewBip86Public( + {required BdkDescriptorPublicKey publicKey, required String fingerprint, required KeychainKind keychainKind, required Network network, dynamic hint}); - Future derivationPathBaseFromString( + Future bdkDerivationPathFromString( {required String path, dynamic hint}); - Future descriptorPublicKeyBaseAsString( - {required DescriptorPublicKeyBase that, dynamic hint}); + Future bdkDescriptorPublicKeyAsString( + {required BdkDescriptorPublicKey that, dynamic hint}); - Future descriptorPublicKeyBaseDerive( - {required DescriptorPublicKeyBase ptr, - required DerivationPathBase path, + Future bdkDescriptorPublicKeyDerive( + {required BdkDescriptorPublicKey ptr, + required BdkDerivationPath path, dynamic hint}); - Future descriptorPublicKeyBaseExtend( - {required DescriptorPublicKeyBase ptr, - required DerivationPathBase path, + Future bdkDescriptorPublicKeyExtend( + {required BdkDescriptorPublicKey ptr, + required BdkDerivationPath path, dynamic hint}); - Future descriptorPublicKeyBaseFromString( + Future bdkDescriptorPublicKeyFromString( {required String publicKey, dynamic hint}); - Future descriptorSecretKeyBaseAsPublic( - {required DescriptorSecretKeyBase ptr, dynamic hint}); + Future bdkDescriptorSecretKeyAsPublic( + {required BdkDescriptorSecretKey ptr, dynamic hint}); - Future descriptorSecretKeyBaseAsString( - {required DescriptorSecretKeyBase that, dynamic hint}); + Future bdkDescriptorSecretKeyAsString( + {required BdkDescriptorSecretKey that, dynamic hint}); - Future descriptorSecretKeyBaseCreate( + Future bdkDescriptorSecretKeyCreate( {required Network network, - required MnemonicBase mnemonic, + required BdkMnemonic mnemonic, String? password, dynamic hint}); - Future descriptorSecretKeyBaseDerive( - {required DescriptorSecretKeyBase ptr, - required DerivationPathBase path, + Future bdkDescriptorSecretKeyDerive( + {required BdkDescriptorSecretKey ptr, + required BdkDerivationPath path, dynamic hint}); - Future descriptorSecretKeyBaseExtend( - {required DescriptorSecretKeyBase ptr, - required DerivationPathBase path, + Future bdkDescriptorSecretKeyExtend( + {required BdkDescriptorSecretKey ptr, + required BdkDerivationPath path, dynamic hint}); - Future descriptorSecretKeyBaseFromString( + Future bdkDescriptorSecretKeyFromString( {required String secretKey, dynamic hint}); - Future descriptorSecretKeyBaseSecretBytes( - {required DescriptorSecretKeyBase that, dynamic hint}); + Future bdkDescriptorSecretKeySecretBytes( + {required BdkDescriptorSecretKey that, dynamic hint}); - Future mnemonicBaseAsString( - {required MnemonicBase that, dynamic hint}); + Future bdkMnemonicAsString({required BdkMnemonic that, dynamic hint}); - Future mnemonicBaseFromEntropy( + Future bdkMnemonicFromEntropy( {required List entropy, dynamic hint}); - Future mnemonicBaseFromString( + Future bdkMnemonicFromString( {required String mnemonic, dynamic hint}); - Future mnemonicBaseNew( + Future bdkMnemonicNew( {required WordCount wordCount, dynamic hint}); - Future psbtBaseCombine( - {required PsbtBase ptr, required PsbtBase other, dynamic hint}); + Future bdkPsbtCombine( + {required BdkPsbt ptr, required BdkPsbt other, dynamic hint}); - Future psbtBaseExtractTx( - {required PsbtBase ptr, dynamic hint}); + Future bdkPsbtExtractTx({required BdkPsbt ptr, dynamic hint}); - Future psbtBaseFeeAmount({required PsbtBase that, dynamic hint}); + Future bdkPsbtFeeAmount({required BdkPsbt that, dynamic hint}); - Future psbtBaseFeeRate({required PsbtBase that, dynamic hint}); + Future bdkPsbtFeeRate({required BdkPsbt that, dynamic hint}); - Future psbtBaseFromStr({required String psbtBase64, dynamic hint}); + Future bdkPsbtFromStr({required String psbtBase64, dynamic hint}); - Future psbtBaseJsonSerialize({required PsbtBase that, dynamic hint}); + Future bdkPsbtJsonSerialize({required BdkPsbt that, dynamic hint}); - Future psbtBaseSerialize({required PsbtBase that, dynamic hint}); + Future bdkPsbtSerialize({required BdkPsbt that, dynamic hint}); - Future psbtBaseTxid({required PsbtBase that, dynamic hint}); + Future bdkPsbtTxid({required BdkPsbt that, dynamic hint}); - Future addressBaseAsString({required AddressBase that, dynamic hint}); + Future bdkAddressAsString({required BdkAddress that, dynamic hint}); - Future addressBaseFromScript( - {required ScriptBufBase script, required Network network, dynamic hint}); + Future bdkAddressFromScript( + {required BdkScriptBuf script, required Network network, dynamic hint}); - Future addressBaseFromString( + Future bdkAddressFromString( {required String address, required Network network, dynamic hint}); - Future addressBaseIsValidForNetwork( - {required AddressBase that, required Network network, dynamic hint}); + Future bdkAddressIsValidForNetwork( + {required BdkAddress that, required Network network, dynamic hint}); - Future addressBaseNetwork({required AddressBase that, dynamic hint}); + Future bdkAddressNetwork({required BdkAddress that, dynamic hint}); - Future addressBasePayload({required AddressBase that, dynamic hint}); + Future bdkAddressPayload({required BdkAddress that, dynamic hint}); - Future addressBaseScript( - {required AddressBase ptr, dynamic hint}); + Future bdkAddressScript( + {required BdkAddress ptr, dynamic hint}); - Future addressBaseToQrUri({required AddressBase that, dynamic hint}); + Future bdkAddressToQrUri({required BdkAddress that, dynamic hint}); - Future scriptBufBaseEmpty({dynamic hint}); + Future bdkScriptBufEmpty({dynamic hint}); - Future scriptBufBaseFromHex({required String s, dynamic hint}); + Future bdkScriptBufFromHex({required String s, dynamic hint}); - Future scriptBufBaseWithCapacity( + Future bdkScriptBufWithCapacity( {required int capacity, dynamic hint}); - Future> transactionBaseInput( - {required TransactionBase that, dynamic hint}); + Future bdkTransactionFromBytes( + {required List transactionBytes, dynamic hint}); - Future transactionBaseIsCoinBase( - {required TransactionBase that, dynamic hint}); + Future> bdkTransactionInput( + {required BdkTransaction that, dynamic hint}); - Future transactionBaseIsExplicitlyRbf( - {required TransactionBase that, dynamic hint}); + Future bdkTransactionIsCoinBase( + {required BdkTransaction that, dynamic hint}); - Future transactionBaseIsLockTimeEnabled( - {required TransactionBase that, dynamic hint}); + Future bdkTransactionIsExplicitlyRbf( + {required BdkTransaction that, dynamic hint}); - Future transactionBaseLockTime( - {required TransactionBase that, dynamic hint}); + Future bdkTransactionIsLockTimeEnabled( + {required BdkTransaction that, dynamic hint}); - Future transactionBaseNew( - {required List transactionBytes, dynamic hint}); + Future bdkTransactionLockTime( + {required BdkTransaction that, dynamic hint}); + + Future bdkTransactionNew( + {required int version, + required LockTime lockTime, + required List input, + required List output, + dynamic hint}); - Future> transactionBaseOutput( - {required TransactionBase that, dynamic hint}); + Future> bdkTransactionOutput( + {required BdkTransaction that, dynamic hint}); - Future transactionBaseSerialize( - {required TransactionBase that, dynamic hint}); + Future bdkTransactionSerialize( + {required BdkTransaction that, dynamic hint}); - Future transactionBaseSize( - {required TransactionBase that, dynamic hint}); + Future bdkTransactionSize({required BdkTransaction that, dynamic hint}); - Future transactionBaseTxid( - {required TransactionBase that, dynamic hint}); + Future bdkTransactionTxid( + {required BdkTransaction that, dynamic hint}); - Future transactionBaseVersion( - {required TransactionBase that, dynamic hint}); + Future bdkTransactionVersion( + {required BdkTransaction that, dynamic hint}); - Future transactionBaseVsize( - {required TransactionBase that, dynamic hint}); + Future bdkTransactionVsize({required BdkTransaction that, dynamic hint}); - Future transactionBaseWeight( - {required TransactionBase that, dynamic hint}); + Future bdkTransactionWeight( + {required BdkTransaction that, dynamic hint}); - Future walletBaseGetAddress( - {required WalletBase that, + Future<(BdkAddress, int)> bdkWalletGetAddress( + {required BdkWallet ptr, required AddressIndex addressIndex, dynamic hint}); - Future walletBaseGetBalance( - {required WalletBase that, dynamic hint}); + Future bdkWalletGetBalance({required BdkWallet that, dynamic hint}); - Future walletBaseGetDescriptorForKeychain( - {required WalletBase ptr, required KeychainKind keychain, dynamic hint}); + Future bdkWalletGetDescriptorForKeychain( + {required BdkWallet ptr, required KeychainKind keychain, dynamic hint}); - Future walletBaseGetInternalAddress( - {required WalletBase that, + Future<(BdkAddress, int)> bdkWalletGetInternalAddress( + {required BdkWallet ptr, required AddressIndex addressIndex, dynamic hint}); - Future walletBaseGetPsbtInput( - {required WalletBase that, + Future bdkWalletGetPsbtInput( + {required BdkWallet that, required LocalUtxo utxo, required bool onlyWitnessUtxo, PsbtSigHashType? sighashType, dynamic hint}); - Future walletBaseIsMine( - {required WalletBase that, required ScriptBufBase script, dynamic hint}); + Future bdkWalletIsMine( + {required BdkWallet that, required BdkScriptBuf script, dynamic hint}); - Future> walletBaseListTransactions( - {required WalletBase that, required bool includeRaw, dynamic hint}); + Future> bdkWalletListTransactions( + {required BdkWallet that, required bool includeRaw, dynamic hint}); - Future> walletBaseListUnspent( - {required WalletBase that, dynamic hint}); + Future> bdkWalletListUnspent( + {required BdkWallet that, dynamic hint}); - Future walletBaseNetwork({required WalletBase that, dynamic hint}); + Future bdkWalletNetwork({required BdkWallet that, dynamic hint}); - Future walletBaseNew( - {required DescriptorBase descriptor, - DescriptorBase? changeDescriptor, + Future bdkWalletNew( + {required BdkDescriptor descriptor, + BdkDescriptor? changeDescriptor, required Network network, required DatabaseConfig databaseConfig, dynamic hint}); - Future walletBaseSign( - {required WalletBase ptr, - required PsbtBase psbt, + Future bdkWalletSign( + {required BdkWallet ptr, + required BdkPsbt psbt, SignOptions? signOptions, dynamic hint}); - Future walletBaseSync( - {required WalletBase ptr, - required BlockchainBase blockchain, + Future bdkWalletSync( + {required BdkWallet ptr, + required BdkBlockchain blockchain, dynamic hint}); - Future<(PsbtBase, TransactionDetails)> finishBumpFeeTxBuilder( + Future<(BdkPsbt, TransactionDetails)> finishBumpFeeTxBuilder( {required String txid, required double feeRate, - AddressBase? allowShrinking, - required WalletBase wallet, + BdkAddress? allowShrinking, + required BdkWallet wallet, required bool enableRbf, int? nSequence, dynamic hint}); - Future<(PsbtBase, TransactionDetails)> txBuilderFinish( - {required WalletBase wallet, + Future<(BdkPsbt, TransactionDetails)> txBuilderFinish( + {required BdkWallet wallet, required List recipients, required List utxos, (OutPoint, Input, int)? foreignUtxo, @@ -364,7 +365,7 @@ abstract class BdkCoreApi extends BaseApi { double? feeRate, int? feeAbsolute, required bool drainWallet, - ScriptBufBase? drainTo, + BdkScriptBuf? drainTo, RbfValue? rbf, required List data, dynamic hint}); @@ -459,8 +460,8 @@ abstract class BdkCoreApi extends BaseApi { get rust_arc_decrement_strong_count_KeysBip39MnemonicPtr; } -class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { - BdkCoreApiImpl({ +class CApiApiImpl extends CApiApiImplPlatform implements CApiApi { + CApiApiImpl({ required super.handler, required super.wire, required super.generalizedFrbRustBinding, @@ -468,1920 +469,1945 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { }); @override - Future blockchainBaseBroadcast( - {required BlockchainBase that, - required TransactionBase transaction, + Future bdkBlockchainBroadcast( + {required BdkBlockchain that, + required BdkTransaction transaction, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_blockchain_base(that); - var arg1 = cst_encode_box_autoadd_transaction_base(transaction); - return wire.wire_BlockchainBase_broadcast(port_, arg0, arg1); + var arg0 = cst_encode_box_autoadd_bdk_blockchain(that); + var arg1 = cst_encode_box_autoadd_bdk_transaction(transaction); + return wire.wire_bdk_blockchain_broadcast(port_, arg0, arg1); }, codec: DcoCodec( decodeSuccessData: dco_decode_String, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kBlockchainBaseBroadcastConstMeta, + constMeta: kBdkBlockchainBroadcastConstMeta, argValues: [that, transaction], apiImpl: this, hint: hint, )); } - TaskConstMeta get kBlockchainBaseBroadcastConstMeta => const TaskConstMeta( - debugName: "BlockchainBase_broadcast", + TaskConstMeta get kBdkBlockchainBroadcastConstMeta => const TaskConstMeta( + debugName: "bdk_blockchain_broadcast", argNames: ["that", "transaction"], ); @override - Future blockchainBaseEstimateFee( - {required BlockchainBase that, required int target, dynamic hint}) { + Future bdkBlockchainEstimateFee( + {required BdkBlockchain that, required int target, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_blockchain_base(that); + var arg0 = cst_encode_box_autoadd_bdk_blockchain(that); var arg1 = cst_encode_u_64(target); - return wire.wire_BlockchainBase_estimate_fee(port_, arg0, arg1); + return wire.wire_bdk_blockchain_estimate_fee(port_, arg0, arg1); }, codec: DcoCodec( decodeSuccessData: dco_decode_fee_rate, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kBlockchainBaseEstimateFeeConstMeta, + constMeta: kBdkBlockchainEstimateFeeConstMeta, argValues: [that, target], apiImpl: this, hint: hint, )); } - TaskConstMeta get kBlockchainBaseEstimateFeeConstMeta => const TaskConstMeta( - debugName: "BlockchainBase_estimate_fee", + TaskConstMeta get kBdkBlockchainEstimateFeeConstMeta => const TaskConstMeta( + debugName: "bdk_blockchain_estimate_fee", argNames: ["that", "target"], ); @override - Future blockchainBaseGetBlockHash( - {required BlockchainBase that, required int height, dynamic hint}) { + Future bdkBlockchainGetBlockHash( + {required BdkBlockchain that, required int height, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_blockchain_base(that); + var arg0 = cst_encode_box_autoadd_bdk_blockchain(that); var arg1 = cst_encode_u_32(height); - return wire.wire_BlockchainBase_get_block_hash(port_, arg0, arg1); + return wire.wire_bdk_blockchain_get_block_hash(port_, arg0, arg1); }, codec: DcoCodec( decodeSuccessData: dco_decode_String, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kBlockchainBaseGetBlockHashConstMeta, + constMeta: kBdkBlockchainGetBlockHashConstMeta, argValues: [that, height], apiImpl: this, hint: hint, )); } - TaskConstMeta get kBlockchainBaseGetBlockHashConstMeta => const TaskConstMeta( - debugName: "BlockchainBase_get_block_hash", + TaskConstMeta get kBdkBlockchainGetBlockHashConstMeta => const TaskConstMeta( + debugName: "bdk_blockchain_get_block_hash", argNames: ["that", "height"], ); @override - Future blockchainBaseGetHeight( - {required BlockchainBase that, dynamic hint}) { + Future bdkBlockchainGetHeight( + {required BdkBlockchain that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_blockchain_base(that); - return wire.wire_BlockchainBase_get_height(port_, arg0); + var arg0 = cst_encode_box_autoadd_bdk_blockchain(that); + return wire.wire_bdk_blockchain_get_height(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_u_32, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kBlockchainBaseGetHeightConstMeta, + constMeta: kBdkBlockchainGetHeightConstMeta, argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kBlockchainBaseGetHeightConstMeta => const TaskConstMeta( - debugName: "BlockchainBase_get_height", + TaskConstMeta get kBdkBlockchainGetHeightConstMeta => const TaskConstMeta( + debugName: "bdk_blockchain_get_height", argNames: ["that"], ); @override - Future blockchainBaseNew( + Future bdkBlockchainNew( {required BlockchainConfig blockchainConfig, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_blockchain_config(blockchainConfig); - return wire.wire_BlockchainBase_new(port_, arg0); + return wire.wire_bdk_blockchain_new(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_blockchain_base, + decodeSuccessData: dco_decode_bdk_blockchain, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kBlockchainBaseNewConstMeta, + constMeta: kBdkBlockchainNewConstMeta, argValues: [blockchainConfig], apiImpl: this, hint: hint, )); } - TaskConstMeta get kBlockchainBaseNewConstMeta => const TaskConstMeta( - debugName: "BlockchainBase_new", + TaskConstMeta get kBdkBlockchainNewConstMeta => const TaskConstMeta( + debugName: "bdk_blockchain_new", argNames: ["blockchainConfig"], ); @override - Future descriptorBaseAsString( - {required DescriptorBase that, dynamic hint}) { + Future bdkDescriptorAsString( + {required BdkDescriptor that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_descriptor_base(that); - return wire.wire_DescriptorBase_as_string(port_, arg0); + var arg0 = cst_encode_box_autoadd_bdk_descriptor(that); + return wire.wire_bdk_descriptor_as_string(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_String, decodeErrorData: null, ), - constMeta: kDescriptorBaseAsStringConstMeta, + constMeta: kBdkDescriptorAsStringConstMeta, argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kDescriptorBaseAsStringConstMeta => const TaskConstMeta( - debugName: "DescriptorBase_as_string", + TaskConstMeta get kBdkDescriptorAsStringConstMeta => const TaskConstMeta( + debugName: "bdk_descriptor_as_string", argNames: ["that"], ); @override - Future descriptorBaseAsStringPrivate( - {required DescriptorBase that, dynamic hint}) { + Future bdkDescriptorAsStringPrivate( + {required BdkDescriptor that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_descriptor_base(that); - return wire.wire_DescriptorBase_as_string_private(port_, arg0); + var arg0 = cst_encode_box_autoadd_bdk_descriptor(that); + return wire.wire_bdk_descriptor_as_string_private(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_String, decodeErrorData: null, ), - constMeta: kDescriptorBaseAsStringPrivateConstMeta, + constMeta: kBdkDescriptorAsStringPrivateConstMeta, argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kDescriptorBaseAsStringPrivateConstMeta => + TaskConstMeta get kBdkDescriptorAsStringPrivateConstMeta => const TaskConstMeta( - debugName: "DescriptorBase_as_string_private", + debugName: "bdk_descriptor_as_string_private", argNames: ["that"], ); @override - Future descriptorBaseMaxSatisfactionWeight( - {required DescriptorBase that, dynamic hint}) { + Future bdkDescriptorMaxSatisfactionWeight( + {required BdkDescriptor that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_descriptor_base(that); - return wire.wire_DescriptorBase_max_satisfaction_weight(port_, arg0); + var arg0 = cst_encode_box_autoadd_bdk_descriptor(that); + return wire.wire_bdk_descriptor_max_satisfaction_weight(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_usize, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kDescriptorBaseMaxSatisfactionWeightConstMeta, + constMeta: kBdkDescriptorMaxSatisfactionWeightConstMeta, argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kDescriptorBaseMaxSatisfactionWeightConstMeta => + TaskConstMeta get kBdkDescriptorMaxSatisfactionWeightConstMeta => const TaskConstMeta( - debugName: "DescriptorBase_max_satisfaction_weight", + debugName: "bdk_descriptor_max_satisfaction_weight", argNames: ["that"], ); @override - Future descriptorBaseNew( + Future bdkDescriptorNew( {required String descriptor, required Network network, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_String(descriptor); var arg1 = cst_encode_network(network); - return wire.wire_DescriptorBase_new(port_, arg0, arg1); + return wire.wire_bdk_descriptor_new(port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_descriptor_base, + decodeSuccessData: dco_decode_bdk_descriptor, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kDescriptorBaseNewConstMeta, + constMeta: kBdkDescriptorNewConstMeta, argValues: [descriptor, network], apiImpl: this, hint: hint, )); } - TaskConstMeta get kDescriptorBaseNewConstMeta => const TaskConstMeta( - debugName: "DescriptorBase_new", + TaskConstMeta get kBdkDescriptorNewConstMeta => const TaskConstMeta( + debugName: "bdk_descriptor_new", argNames: ["descriptor", "network"], ); @override - Future descriptorBaseNewBip44( - {required DescriptorSecretKeyBase secretKey, + Future bdkDescriptorNewBip44( + {required BdkDescriptorSecretKey secretKey, required KeychainKind keychainKind, required Network network, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_descriptor_secret_key_base(secretKey); + 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_DescriptorBase_new_bip44(port_, arg0, arg1, arg2); + return wire.wire_bdk_descriptor_new_bip44(port_, arg0, arg1, arg2); }, codec: DcoCodec( - decodeSuccessData: dco_decode_descriptor_base, + decodeSuccessData: dco_decode_bdk_descriptor, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kDescriptorBaseNewBip44ConstMeta, + constMeta: kBdkDescriptorNewBip44ConstMeta, argValues: [secretKey, keychainKind, network], apiImpl: this, hint: hint, )); } - TaskConstMeta get kDescriptorBaseNewBip44ConstMeta => const TaskConstMeta( - debugName: "DescriptorBase_new_bip44", + TaskConstMeta get kBdkDescriptorNewBip44ConstMeta => const TaskConstMeta( + debugName: "bdk_descriptor_new_bip44", argNames: ["secretKey", "keychainKind", "network"], ); @override - Future descriptorBaseNewBip44Public( - {required DescriptorPublicKeyBase publicKey, + Future bdkDescriptorNewBip44Public( + {required BdkDescriptorPublicKey publicKey, required String fingerprint, required KeychainKind keychainKind, required Network network, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_descriptor_public_key_base(publicKey); + 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_DescriptorBase_new_bip44_public( + return wire.wire_bdk_descriptor_new_bip44_public( port_, arg0, arg1, arg2, arg3); }, codec: DcoCodec( - decodeSuccessData: dco_decode_descriptor_base, + decodeSuccessData: dco_decode_bdk_descriptor, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kDescriptorBaseNewBip44PublicConstMeta, + constMeta: kBdkDescriptorNewBip44PublicConstMeta, argValues: [publicKey, fingerprint, keychainKind, network], apiImpl: this, hint: hint, )); } - TaskConstMeta get kDescriptorBaseNewBip44PublicConstMeta => + TaskConstMeta get kBdkDescriptorNewBip44PublicConstMeta => const TaskConstMeta( - debugName: "DescriptorBase_new_bip44_public", + debugName: "bdk_descriptor_new_bip44_public", argNames: ["publicKey", "fingerprint", "keychainKind", "network"], ); @override - Future descriptorBaseNewBip49( - {required DescriptorSecretKeyBase secretKey, + Future bdkDescriptorNewBip49( + {required BdkDescriptorSecretKey secretKey, required KeychainKind keychainKind, required Network network, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_descriptor_secret_key_base(secretKey); + 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_DescriptorBase_new_bip49(port_, arg0, arg1, arg2); + return wire.wire_bdk_descriptor_new_bip49(port_, arg0, arg1, arg2); }, codec: DcoCodec( - decodeSuccessData: dco_decode_descriptor_base, + decodeSuccessData: dco_decode_bdk_descriptor, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kDescriptorBaseNewBip49ConstMeta, + constMeta: kBdkDescriptorNewBip49ConstMeta, argValues: [secretKey, keychainKind, network], apiImpl: this, hint: hint, )); } - TaskConstMeta get kDescriptorBaseNewBip49ConstMeta => const TaskConstMeta( - debugName: "DescriptorBase_new_bip49", + TaskConstMeta get kBdkDescriptorNewBip49ConstMeta => const TaskConstMeta( + debugName: "bdk_descriptor_new_bip49", argNames: ["secretKey", "keychainKind", "network"], ); @override - Future descriptorBaseNewBip49Public( - {required DescriptorPublicKeyBase publicKey, + Future bdkDescriptorNewBip49Public( + {required BdkDescriptorPublicKey publicKey, required String fingerprint, required KeychainKind keychainKind, required Network network, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_descriptor_public_key_base(publicKey); + 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_DescriptorBase_new_bip49_public( + return wire.wire_bdk_descriptor_new_bip49_public( port_, arg0, arg1, arg2, arg3); }, codec: DcoCodec( - decodeSuccessData: dco_decode_descriptor_base, + decodeSuccessData: dco_decode_bdk_descriptor, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kDescriptorBaseNewBip49PublicConstMeta, + constMeta: kBdkDescriptorNewBip49PublicConstMeta, argValues: [publicKey, fingerprint, keychainKind, network], apiImpl: this, hint: hint, )); } - TaskConstMeta get kDescriptorBaseNewBip49PublicConstMeta => + TaskConstMeta get kBdkDescriptorNewBip49PublicConstMeta => const TaskConstMeta( - debugName: "DescriptorBase_new_bip49_public", + debugName: "bdk_descriptor_new_bip49_public", argNames: ["publicKey", "fingerprint", "keychainKind", "network"], ); @override - Future descriptorBaseNewBip84( - {required DescriptorSecretKeyBase secretKey, + Future bdkDescriptorNewBip84( + {required BdkDescriptorSecretKey secretKey, required KeychainKind keychainKind, required Network network, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_descriptor_secret_key_base(secretKey); + 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_DescriptorBase_new_bip84(port_, arg0, arg1, arg2); + return wire.wire_bdk_descriptor_new_bip84(port_, arg0, arg1, arg2); }, codec: DcoCodec( - decodeSuccessData: dco_decode_descriptor_base, + decodeSuccessData: dco_decode_bdk_descriptor, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kDescriptorBaseNewBip84ConstMeta, + constMeta: kBdkDescriptorNewBip84ConstMeta, argValues: [secretKey, keychainKind, network], apiImpl: this, hint: hint, )); } - TaskConstMeta get kDescriptorBaseNewBip84ConstMeta => const TaskConstMeta( - debugName: "DescriptorBase_new_bip84", + TaskConstMeta get kBdkDescriptorNewBip84ConstMeta => const TaskConstMeta( + debugName: "bdk_descriptor_new_bip84", argNames: ["secretKey", "keychainKind", "network"], ); @override - Future descriptorBaseNewBip84Public( - {required DescriptorPublicKeyBase publicKey, + Future bdkDescriptorNewBip84Public( + {required BdkDescriptorPublicKey publicKey, required String fingerprint, required KeychainKind keychainKind, required Network network, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_descriptor_public_key_base(publicKey); + 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_DescriptorBase_new_bip84_public( + return wire.wire_bdk_descriptor_new_bip84_public( port_, arg0, arg1, arg2, arg3); }, codec: DcoCodec( - decodeSuccessData: dco_decode_descriptor_base, + decodeSuccessData: dco_decode_bdk_descriptor, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kDescriptorBaseNewBip84PublicConstMeta, + constMeta: kBdkDescriptorNewBip84PublicConstMeta, argValues: [publicKey, fingerprint, keychainKind, network], apiImpl: this, hint: hint, )); } - TaskConstMeta get kDescriptorBaseNewBip84PublicConstMeta => + TaskConstMeta get kBdkDescriptorNewBip84PublicConstMeta => const TaskConstMeta( - debugName: "DescriptorBase_new_bip84_public", + debugName: "bdk_descriptor_new_bip84_public", argNames: ["publicKey", "fingerprint", "keychainKind", "network"], ); @override - Future descriptorBaseNewBip86( - {required DescriptorSecretKeyBase secretKey, + Future bdkDescriptorNewBip86( + {required BdkDescriptorSecretKey secretKey, required KeychainKind keychainKind, required Network network, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_descriptor_secret_key_base(secretKey); + 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_DescriptorBase_new_bip86(port_, arg0, arg1, arg2); + return wire.wire_bdk_descriptor_new_bip86(port_, arg0, arg1, arg2); }, codec: DcoCodec( - decodeSuccessData: dco_decode_descriptor_base, + decodeSuccessData: dco_decode_bdk_descriptor, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kDescriptorBaseNewBip86ConstMeta, + constMeta: kBdkDescriptorNewBip86ConstMeta, argValues: [secretKey, keychainKind, network], apiImpl: this, hint: hint, )); } - TaskConstMeta get kDescriptorBaseNewBip86ConstMeta => const TaskConstMeta( - debugName: "DescriptorBase_new_bip86", + TaskConstMeta get kBdkDescriptorNewBip86ConstMeta => const TaskConstMeta( + debugName: "bdk_descriptor_new_bip86", argNames: ["secretKey", "keychainKind", "network"], ); @override - Future descriptorBaseNewBip86Public( - {required DescriptorPublicKeyBase publicKey, + Future bdkDescriptorNewBip86Public( + {required BdkDescriptorPublicKey publicKey, required String fingerprint, required KeychainKind keychainKind, required Network network, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_descriptor_public_key_base(publicKey); + 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_DescriptorBase_new_bip86_public( + return wire.wire_bdk_descriptor_new_bip86_public( port_, arg0, arg1, arg2, arg3); }, codec: DcoCodec( - decodeSuccessData: dco_decode_descriptor_base, + decodeSuccessData: dco_decode_bdk_descriptor, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kDescriptorBaseNewBip86PublicConstMeta, + constMeta: kBdkDescriptorNewBip86PublicConstMeta, argValues: [publicKey, fingerprint, keychainKind, network], apiImpl: this, hint: hint, )); } - TaskConstMeta get kDescriptorBaseNewBip86PublicConstMeta => + TaskConstMeta get kBdkDescriptorNewBip86PublicConstMeta => const TaskConstMeta( - debugName: "DescriptorBase_new_bip86_public", + debugName: "bdk_descriptor_new_bip86_public", argNames: ["publicKey", "fingerprint", "keychainKind", "network"], ); @override - Future derivationPathBaseFromString( + Future bdkDerivationPathFromString( {required String path, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_String(path); - return wire.wire_DerivationPathBase_from_string(port_, arg0); + return wire.wire_bdk_derivation_path_from_string(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_derivation_path_base, + decodeSuccessData: dco_decode_bdk_derivation_path, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kDerivationPathBaseFromStringConstMeta, + constMeta: kBdkDerivationPathFromStringConstMeta, argValues: [path], apiImpl: this, hint: hint, )); } - TaskConstMeta get kDerivationPathBaseFromStringConstMeta => + TaskConstMeta get kBdkDerivationPathFromStringConstMeta => const TaskConstMeta( - debugName: "DerivationPathBase_from_string", + debugName: "bdk_derivation_path_from_string", argNames: ["path"], ); @override - Future descriptorPublicKeyBaseAsString( - {required DescriptorPublicKeyBase that, dynamic hint}) { + Future bdkDescriptorPublicKeyAsString( + {required BdkDescriptorPublicKey that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_descriptor_public_key_base(that); - return wire.wire_DescriptorPublicKeyBase_as_string(port_, arg0); + var arg0 = cst_encode_box_autoadd_bdk_descriptor_public_key(that); + return wire.wire_bdk_descriptor_public_key_as_string(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_String, decodeErrorData: null, ), - constMeta: kDescriptorPublicKeyBaseAsStringConstMeta, + constMeta: kBdkDescriptorPublicKeyAsStringConstMeta, argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kDescriptorPublicKeyBaseAsStringConstMeta => + TaskConstMeta get kBdkDescriptorPublicKeyAsStringConstMeta => const TaskConstMeta( - debugName: "DescriptorPublicKeyBase_as_string", + debugName: "bdk_descriptor_public_key_as_string", argNames: ["that"], ); @override - Future descriptorPublicKeyBaseDerive( - {required DescriptorPublicKeyBase ptr, - required DerivationPathBase path, + Future bdkDescriptorPublicKeyDerive( + {required BdkDescriptorPublicKey ptr, + required BdkDerivationPath path, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_descriptor_public_key_base(ptr); - var arg1 = cst_encode_box_autoadd_derivation_path_base(path); - return wire.wire_DescriptorPublicKeyBase_derive(port_, arg0, arg1); + var arg0 = cst_encode_box_autoadd_bdk_descriptor_public_key(ptr); + var arg1 = cst_encode_box_autoadd_bdk_derivation_path(path); + return wire.wire_bdk_descriptor_public_key_derive(port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_descriptor_public_key_base, + decodeSuccessData: dco_decode_bdk_descriptor_public_key, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kDescriptorPublicKeyBaseDeriveConstMeta, + constMeta: kBdkDescriptorPublicKeyDeriveConstMeta, argValues: [ptr, path], apiImpl: this, hint: hint, )); } - TaskConstMeta get kDescriptorPublicKeyBaseDeriveConstMeta => + TaskConstMeta get kBdkDescriptorPublicKeyDeriveConstMeta => const TaskConstMeta( - debugName: "DescriptorPublicKeyBase_derive", + debugName: "bdk_descriptor_public_key_derive", argNames: ["ptr", "path"], ); @override - Future descriptorPublicKeyBaseExtend( - {required DescriptorPublicKeyBase ptr, - required DerivationPathBase path, + Future bdkDescriptorPublicKeyExtend( + {required BdkDescriptorPublicKey ptr, + required BdkDerivationPath path, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_descriptor_public_key_base(ptr); - var arg1 = cst_encode_box_autoadd_derivation_path_base(path); - return wire.wire_DescriptorPublicKeyBase_extend(port_, arg0, arg1); + var arg0 = cst_encode_box_autoadd_bdk_descriptor_public_key(ptr); + var arg1 = cst_encode_box_autoadd_bdk_derivation_path(path); + return wire.wire_bdk_descriptor_public_key_extend(port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_descriptor_public_key_base, + decodeSuccessData: dco_decode_bdk_descriptor_public_key, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kDescriptorPublicKeyBaseExtendConstMeta, + constMeta: kBdkDescriptorPublicKeyExtendConstMeta, argValues: [ptr, path], apiImpl: this, hint: hint, )); } - TaskConstMeta get kDescriptorPublicKeyBaseExtendConstMeta => + TaskConstMeta get kBdkDescriptorPublicKeyExtendConstMeta => const TaskConstMeta( - debugName: "DescriptorPublicKeyBase_extend", + debugName: "bdk_descriptor_public_key_extend", argNames: ["ptr", "path"], ); @override - Future descriptorPublicKeyBaseFromString( + Future bdkDescriptorPublicKeyFromString( {required String publicKey, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_String(publicKey); - return wire.wire_DescriptorPublicKeyBase_from_string(port_, arg0); + return wire.wire_bdk_descriptor_public_key_from_string(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_descriptor_public_key_base, + decodeSuccessData: dco_decode_bdk_descriptor_public_key, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kDescriptorPublicKeyBaseFromStringConstMeta, + constMeta: kBdkDescriptorPublicKeyFromStringConstMeta, argValues: [publicKey], apiImpl: this, hint: hint, )); } - TaskConstMeta get kDescriptorPublicKeyBaseFromStringConstMeta => + TaskConstMeta get kBdkDescriptorPublicKeyFromStringConstMeta => const TaskConstMeta( - debugName: "DescriptorPublicKeyBase_from_string", + debugName: "bdk_descriptor_public_key_from_string", argNames: ["publicKey"], ); @override - Future descriptorSecretKeyBaseAsPublic( - {required DescriptorSecretKeyBase ptr, dynamic hint}) { + Future bdkDescriptorSecretKeyAsPublic( + {required BdkDescriptorSecretKey ptr, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_descriptor_secret_key_base(ptr); - return wire.wire_DescriptorSecretKeyBase_as_public(port_, arg0); + var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(ptr); + return wire.wire_bdk_descriptor_secret_key_as_public(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_descriptor_public_key_base, + decodeSuccessData: dco_decode_bdk_descriptor_public_key, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kDescriptorSecretKeyBaseAsPublicConstMeta, + constMeta: kBdkDescriptorSecretKeyAsPublicConstMeta, argValues: [ptr], apiImpl: this, hint: hint, )); } - TaskConstMeta get kDescriptorSecretKeyBaseAsPublicConstMeta => + TaskConstMeta get kBdkDescriptorSecretKeyAsPublicConstMeta => const TaskConstMeta( - debugName: "DescriptorSecretKeyBase_as_public", + debugName: "bdk_descriptor_secret_key_as_public", argNames: ["ptr"], ); @override - Future descriptorSecretKeyBaseAsString( - {required DescriptorSecretKeyBase that, dynamic hint}) { + Future bdkDescriptorSecretKeyAsString( + {required BdkDescriptorSecretKey that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_descriptor_secret_key_base(that); - return wire.wire_DescriptorSecretKeyBase_as_string(port_, arg0); + var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(that); + return wire.wire_bdk_descriptor_secret_key_as_string(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_String, decodeErrorData: null, ), - constMeta: kDescriptorSecretKeyBaseAsStringConstMeta, + constMeta: kBdkDescriptorSecretKeyAsStringConstMeta, argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kDescriptorSecretKeyBaseAsStringConstMeta => + TaskConstMeta get kBdkDescriptorSecretKeyAsStringConstMeta => const TaskConstMeta( - debugName: "DescriptorSecretKeyBase_as_string", + debugName: "bdk_descriptor_secret_key_as_string", argNames: ["that"], ); @override - Future descriptorSecretKeyBaseCreate( + Future bdkDescriptorSecretKeyCreate( {required Network network, - required MnemonicBase mnemonic, + required BdkMnemonic mnemonic, String? password, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_network(network); - var arg1 = cst_encode_box_autoadd_mnemonic_base(mnemonic); + var arg1 = cst_encode_box_autoadd_bdk_mnemonic(mnemonic); var arg2 = cst_encode_opt_String(password); - return wire.wire_DescriptorSecretKeyBase_create( + return wire.wire_bdk_descriptor_secret_key_create( port_, arg0, arg1, arg2); }, codec: DcoCodec( - decodeSuccessData: dco_decode_descriptor_secret_key_base, + decodeSuccessData: dco_decode_bdk_descriptor_secret_key, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kDescriptorSecretKeyBaseCreateConstMeta, + constMeta: kBdkDescriptorSecretKeyCreateConstMeta, argValues: [network, mnemonic, password], apiImpl: this, hint: hint, )); } - TaskConstMeta get kDescriptorSecretKeyBaseCreateConstMeta => + TaskConstMeta get kBdkDescriptorSecretKeyCreateConstMeta => const TaskConstMeta( - debugName: "DescriptorSecretKeyBase_create", + debugName: "bdk_descriptor_secret_key_create", argNames: ["network", "mnemonic", "password"], ); @override - Future descriptorSecretKeyBaseDerive( - {required DescriptorSecretKeyBase ptr, - required DerivationPathBase path, + Future bdkDescriptorSecretKeyDerive( + {required BdkDescriptorSecretKey ptr, + required BdkDerivationPath path, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_descriptor_secret_key_base(ptr); - var arg1 = cst_encode_box_autoadd_derivation_path_base(path); - return wire.wire_DescriptorSecretKeyBase_derive(port_, arg0, arg1); + var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(ptr); + var arg1 = cst_encode_box_autoadd_bdk_derivation_path(path); + return wire.wire_bdk_descriptor_secret_key_derive(port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_descriptor_secret_key_base, + decodeSuccessData: dco_decode_bdk_descriptor_secret_key, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kDescriptorSecretKeyBaseDeriveConstMeta, + constMeta: kBdkDescriptorSecretKeyDeriveConstMeta, argValues: [ptr, path], apiImpl: this, hint: hint, )); } - TaskConstMeta get kDescriptorSecretKeyBaseDeriveConstMeta => + TaskConstMeta get kBdkDescriptorSecretKeyDeriveConstMeta => const TaskConstMeta( - debugName: "DescriptorSecretKeyBase_derive", + debugName: "bdk_descriptor_secret_key_derive", argNames: ["ptr", "path"], ); @override - Future descriptorSecretKeyBaseExtend( - {required DescriptorSecretKeyBase ptr, - required DerivationPathBase path, + Future bdkDescriptorSecretKeyExtend( + {required BdkDescriptorSecretKey ptr, + required BdkDerivationPath path, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_descriptor_secret_key_base(ptr); - var arg1 = cst_encode_box_autoadd_derivation_path_base(path); - return wire.wire_DescriptorSecretKeyBase_extend(port_, arg0, arg1); + var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(ptr); + var arg1 = cst_encode_box_autoadd_bdk_derivation_path(path); + return wire.wire_bdk_descriptor_secret_key_extend(port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_descriptor_secret_key_base, + decodeSuccessData: dco_decode_bdk_descriptor_secret_key, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kDescriptorSecretKeyBaseExtendConstMeta, + constMeta: kBdkDescriptorSecretKeyExtendConstMeta, argValues: [ptr, path], apiImpl: this, hint: hint, )); } - TaskConstMeta get kDescriptorSecretKeyBaseExtendConstMeta => + TaskConstMeta get kBdkDescriptorSecretKeyExtendConstMeta => const TaskConstMeta( - debugName: "DescriptorSecretKeyBase_extend", + debugName: "bdk_descriptor_secret_key_extend", argNames: ["ptr", "path"], ); @override - Future descriptorSecretKeyBaseFromString( + Future bdkDescriptorSecretKeyFromString( {required String secretKey, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_String(secretKey); - return wire.wire_DescriptorSecretKeyBase_from_string(port_, arg0); + return wire.wire_bdk_descriptor_secret_key_from_string(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_descriptor_secret_key_base, + decodeSuccessData: dco_decode_bdk_descriptor_secret_key, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kDescriptorSecretKeyBaseFromStringConstMeta, + constMeta: kBdkDescriptorSecretKeyFromStringConstMeta, argValues: [secretKey], apiImpl: this, hint: hint, )); } - TaskConstMeta get kDescriptorSecretKeyBaseFromStringConstMeta => + TaskConstMeta get kBdkDescriptorSecretKeyFromStringConstMeta => const TaskConstMeta( - debugName: "DescriptorSecretKeyBase_from_string", + debugName: "bdk_descriptor_secret_key_from_string", argNames: ["secretKey"], ); @override - Future descriptorSecretKeyBaseSecretBytes( - {required DescriptorSecretKeyBase that, dynamic hint}) { + Future bdkDescriptorSecretKeySecretBytes( + {required BdkDescriptorSecretKey that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_descriptor_secret_key_base(that); - return wire.wire_DescriptorSecretKeyBase_secret_bytes(port_, arg0); + var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(that); + return wire.wire_bdk_descriptor_secret_key_secret_bytes(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_list_prim_u_8_strict, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kDescriptorSecretKeyBaseSecretBytesConstMeta, + constMeta: kBdkDescriptorSecretKeySecretBytesConstMeta, argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kDescriptorSecretKeyBaseSecretBytesConstMeta => + TaskConstMeta get kBdkDescriptorSecretKeySecretBytesConstMeta => const TaskConstMeta( - debugName: "DescriptorSecretKeyBase_secret_bytes", + debugName: "bdk_descriptor_secret_key_secret_bytes", argNames: ["that"], ); @override - Future mnemonicBaseAsString( - {required MnemonicBase that, dynamic hint}) { + Future bdkMnemonicAsString( + {required BdkMnemonic that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_mnemonic_base(that); - return wire.wire_MnemonicBase_as_string(port_, arg0); + var arg0 = cst_encode_box_autoadd_bdk_mnemonic(that); + return wire.wire_bdk_mnemonic_as_string(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_String, decodeErrorData: null, ), - constMeta: kMnemonicBaseAsStringConstMeta, + constMeta: kBdkMnemonicAsStringConstMeta, argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kMnemonicBaseAsStringConstMeta => const TaskConstMeta( - debugName: "MnemonicBase_as_string", + TaskConstMeta get kBdkMnemonicAsStringConstMeta => const TaskConstMeta( + debugName: "bdk_mnemonic_as_string", argNames: ["that"], ); @override - Future mnemonicBaseFromEntropy( + Future bdkMnemonicFromEntropy( {required List entropy, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_list_prim_u_8_loose(entropy); - return wire.wire_MnemonicBase_from_entropy(port_, arg0); + return wire.wire_bdk_mnemonic_from_entropy(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_mnemonic_base, + decodeSuccessData: dco_decode_bdk_mnemonic, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kMnemonicBaseFromEntropyConstMeta, + constMeta: kBdkMnemonicFromEntropyConstMeta, argValues: [entropy], apiImpl: this, hint: hint, )); } - TaskConstMeta get kMnemonicBaseFromEntropyConstMeta => const TaskConstMeta( - debugName: "MnemonicBase_from_entropy", + TaskConstMeta get kBdkMnemonicFromEntropyConstMeta => const TaskConstMeta( + debugName: "bdk_mnemonic_from_entropy", argNames: ["entropy"], ); @override - Future mnemonicBaseFromString( + Future bdkMnemonicFromString( {required String mnemonic, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_String(mnemonic); - return wire.wire_MnemonicBase_from_string(port_, arg0); + return wire.wire_bdk_mnemonic_from_string(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_mnemonic_base, + decodeSuccessData: dco_decode_bdk_mnemonic, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kMnemonicBaseFromStringConstMeta, + constMeta: kBdkMnemonicFromStringConstMeta, argValues: [mnemonic], apiImpl: this, hint: hint, )); } - TaskConstMeta get kMnemonicBaseFromStringConstMeta => const TaskConstMeta( - debugName: "MnemonicBase_from_string", + TaskConstMeta get kBdkMnemonicFromStringConstMeta => const TaskConstMeta( + debugName: "bdk_mnemonic_from_string", argNames: ["mnemonic"], ); @override - Future mnemonicBaseNew( + Future bdkMnemonicNew( {required WordCount wordCount, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_word_count(wordCount); - return wire.wire_MnemonicBase_new(port_, arg0); + return wire.wire_bdk_mnemonic_new(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_mnemonic_base, + decodeSuccessData: dco_decode_bdk_mnemonic, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kMnemonicBaseNewConstMeta, + constMeta: kBdkMnemonicNewConstMeta, argValues: [wordCount], apiImpl: this, hint: hint, )); } - TaskConstMeta get kMnemonicBaseNewConstMeta => const TaskConstMeta( - debugName: "MnemonicBase_new", + TaskConstMeta get kBdkMnemonicNewConstMeta => const TaskConstMeta( + debugName: "bdk_mnemonic_new", argNames: ["wordCount"], ); @override - Future psbtBaseCombine( - {required PsbtBase ptr, required PsbtBase other, dynamic hint}) { + Future bdkPsbtCombine( + {required BdkPsbt ptr, required BdkPsbt other, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_psbt_base(ptr); - var arg1 = cst_encode_box_autoadd_psbt_base(other); - return wire.wire_PsbtBase_combine(port_, arg0, arg1); + var arg0 = cst_encode_box_autoadd_bdk_psbt(ptr); + var arg1 = cst_encode_box_autoadd_bdk_psbt(other); + return wire.wire_bdk_psbt_combine(port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_psbt_base, + decodeSuccessData: dco_decode_bdk_psbt, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kPsbtBaseCombineConstMeta, + constMeta: kBdkPsbtCombineConstMeta, argValues: [ptr, other], apiImpl: this, hint: hint, )); } - TaskConstMeta get kPsbtBaseCombineConstMeta => const TaskConstMeta( - debugName: "PsbtBase_combine", + TaskConstMeta get kBdkPsbtCombineConstMeta => const TaskConstMeta( + debugName: "bdk_psbt_combine", argNames: ["ptr", "other"], ); @override - Future psbtBaseExtractTx( - {required PsbtBase ptr, dynamic hint}) { + Future bdkPsbtExtractTx( + {required BdkPsbt ptr, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_psbt_base(ptr); - return wire.wire_PsbtBase_extract_tx(port_, arg0); + var arg0 = cst_encode_box_autoadd_bdk_psbt(ptr); + return wire.wire_bdk_psbt_extract_tx(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_transaction_base, - decodeErrorData: null, + decodeSuccessData: dco_decode_bdk_transaction, + decodeErrorData: dco_decode_bdk_error, ), - constMeta: kPsbtBaseExtractTxConstMeta, + constMeta: kBdkPsbtExtractTxConstMeta, argValues: [ptr], apiImpl: this, hint: hint, )); } - TaskConstMeta get kPsbtBaseExtractTxConstMeta => const TaskConstMeta( - debugName: "PsbtBase_extract_tx", + TaskConstMeta get kBdkPsbtExtractTxConstMeta => const TaskConstMeta( + debugName: "bdk_psbt_extract_tx", argNames: ["ptr"], ); @override - Future psbtBaseFeeAmount({required PsbtBase that, dynamic hint}) { + Future bdkPsbtFeeAmount({required BdkPsbt that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_psbt_base(that); - return wire.wire_PsbtBase_fee_amount(port_, arg0); + var arg0 = cst_encode_box_autoadd_bdk_psbt(that); + return wire.wire_bdk_psbt_fee_amount(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_opt_box_autoadd_u_64, decodeErrorData: null, ), - constMeta: kPsbtBaseFeeAmountConstMeta, + constMeta: kBdkPsbtFeeAmountConstMeta, argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kPsbtBaseFeeAmountConstMeta => const TaskConstMeta( - debugName: "PsbtBase_fee_amount", + TaskConstMeta get kBdkPsbtFeeAmountConstMeta => const TaskConstMeta( + debugName: "bdk_psbt_fee_amount", argNames: ["that"], ); @override - Future psbtBaseFeeRate({required PsbtBase that, dynamic hint}) { + Future bdkPsbtFeeRate({required BdkPsbt that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_psbt_base(that); - return wire.wire_PsbtBase_fee_rate(port_, arg0); + var arg0 = cst_encode_box_autoadd_bdk_psbt(that); + return wire.wire_bdk_psbt_fee_rate(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_opt_box_autoadd_fee_rate, decodeErrorData: null, ), - constMeta: kPsbtBaseFeeRateConstMeta, + constMeta: kBdkPsbtFeeRateConstMeta, argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kPsbtBaseFeeRateConstMeta => const TaskConstMeta( - debugName: "PsbtBase_fee_rate", + TaskConstMeta get kBdkPsbtFeeRateConstMeta => const TaskConstMeta( + debugName: "bdk_psbt_fee_rate", argNames: ["that"], ); @override - Future psbtBaseFromStr({required String psbtBase64, dynamic hint}) { + Future bdkPsbtFromStr({required String psbtBase64, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_String(psbtBase64); - return wire.wire_PsbtBase_from_str(port_, arg0); + return wire.wire_bdk_psbt_from_str(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_psbt_base, + decodeSuccessData: dco_decode_bdk_psbt, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kPsbtBaseFromStrConstMeta, + constMeta: kBdkPsbtFromStrConstMeta, argValues: [psbtBase64], apiImpl: this, hint: hint, )); } - TaskConstMeta get kPsbtBaseFromStrConstMeta => const TaskConstMeta( - debugName: "PsbtBase_from_str", + TaskConstMeta get kBdkPsbtFromStrConstMeta => const TaskConstMeta( + debugName: "bdk_psbt_from_str", argNames: ["psbtBase64"], ); @override - Future psbtBaseJsonSerialize({required PsbtBase that, dynamic hint}) { + Future bdkPsbtJsonSerialize({required BdkPsbt that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_psbt_base(that); - return wire.wire_PsbtBase_json_serialize(port_, arg0); + var arg0 = cst_encode_box_autoadd_bdk_psbt(that); + return wire.wire_bdk_psbt_json_serialize(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_String, decodeErrorData: null, ), - constMeta: kPsbtBaseJsonSerializeConstMeta, + constMeta: kBdkPsbtJsonSerializeConstMeta, argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kPsbtBaseJsonSerializeConstMeta => const TaskConstMeta( - debugName: "PsbtBase_json_serialize", + TaskConstMeta get kBdkPsbtJsonSerializeConstMeta => const TaskConstMeta( + debugName: "bdk_psbt_json_serialize", argNames: ["that"], ); @override - Future psbtBaseSerialize({required PsbtBase that, dynamic hint}) { + Future bdkPsbtSerialize({required BdkPsbt that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_psbt_base(that); - return wire.wire_PsbtBase_serialize(port_, arg0); + var arg0 = cst_encode_box_autoadd_bdk_psbt(that); + return wire.wire_bdk_psbt_serialize(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_String, decodeErrorData: null, ), - constMeta: kPsbtBaseSerializeConstMeta, + constMeta: kBdkPsbtSerializeConstMeta, argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kPsbtBaseSerializeConstMeta => const TaskConstMeta( - debugName: "PsbtBase_serialize", + TaskConstMeta get kBdkPsbtSerializeConstMeta => const TaskConstMeta( + debugName: "bdk_psbt_serialize", argNames: ["that"], ); @override - Future psbtBaseTxid({required PsbtBase that, dynamic hint}) { + Future bdkPsbtTxid({required BdkPsbt that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_psbt_base(that); - return wire.wire_PsbtBase_txid(port_, arg0); + var arg0 = cst_encode_box_autoadd_bdk_psbt(that); + return wire.wire_bdk_psbt_txid(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_String, decodeErrorData: null, ), - constMeta: kPsbtBaseTxidConstMeta, + constMeta: kBdkPsbtTxidConstMeta, argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kPsbtBaseTxidConstMeta => const TaskConstMeta( - debugName: "PsbtBase_txid", + TaskConstMeta get kBdkPsbtTxidConstMeta => const TaskConstMeta( + debugName: "bdk_psbt_txid", argNames: ["that"], ); @override - Future addressBaseAsString( - {required AddressBase that, dynamic hint}) { + Future bdkAddressAsString({required BdkAddress that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_address_base(that); - return wire.wire_AddressBase_as_string(port_, arg0); + var arg0 = cst_encode_box_autoadd_bdk_address(that); + return wire.wire_bdk_address_as_string(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_String, decodeErrorData: null, ), - constMeta: kAddressBaseAsStringConstMeta, + constMeta: kBdkAddressAsStringConstMeta, argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kAddressBaseAsStringConstMeta => const TaskConstMeta( - debugName: "AddressBase_as_string", + TaskConstMeta get kBdkAddressAsStringConstMeta => const TaskConstMeta( + debugName: "bdk_address_as_string", argNames: ["that"], ); @override - Future addressBaseFromScript( - {required ScriptBufBase script, required Network network, dynamic hint}) { + Future bdkAddressFromScript( + {required BdkScriptBuf script, required Network network, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_script_buf_base(script); + var arg0 = cst_encode_box_autoadd_bdk_script_buf(script); var arg1 = cst_encode_network(network); - return wire.wire_AddressBase_from_script(port_, arg0, arg1); + return wire.wire_bdk_address_from_script(port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_address_base, + decodeSuccessData: dco_decode_bdk_address, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kAddressBaseFromScriptConstMeta, + constMeta: kBdkAddressFromScriptConstMeta, argValues: [script, network], apiImpl: this, hint: hint, )); } - TaskConstMeta get kAddressBaseFromScriptConstMeta => const TaskConstMeta( - debugName: "AddressBase_from_script", + TaskConstMeta get kBdkAddressFromScriptConstMeta => const TaskConstMeta( + debugName: "bdk_address_from_script", argNames: ["script", "network"], ); @override - Future addressBaseFromString( + Future bdkAddressFromString( {required String address, required Network network, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_String(address); var arg1 = cst_encode_network(network); - return wire.wire_AddressBase_from_string(port_, arg0, arg1); + return wire.wire_bdk_address_from_string(port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_address_base, + decodeSuccessData: dco_decode_bdk_address, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kAddressBaseFromStringConstMeta, + constMeta: kBdkAddressFromStringConstMeta, argValues: [address, network], apiImpl: this, hint: hint, )); } - TaskConstMeta get kAddressBaseFromStringConstMeta => const TaskConstMeta( - debugName: "AddressBase_from_string", + TaskConstMeta get kBdkAddressFromStringConstMeta => const TaskConstMeta( + debugName: "bdk_address_from_string", argNames: ["address", "network"], ); @override - Future addressBaseIsValidForNetwork( - {required AddressBase that, required Network network, dynamic hint}) { + Future bdkAddressIsValidForNetwork( + {required BdkAddress that, required Network network, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_address_base(that); + var arg0 = cst_encode_box_autoadd_bdk_address(that); var arg1 = cst_encode_network(network); - return wire.wire_AddressBase_is_valid_for_network(port_, arg0, arg1); + return wire.wire_bdk_address_is_valid_for_network(port_, arg0, arg1); }, codec: DcoCodec( decodeSuccessData: dco_decode_bool, decodeErrorData: null, ), - constMeta: kAddressBaseIsValidForNetworkConstMeta, + constMeta: kBdkAddressIsValidForNetworkConstMeta, argValues: [that, network], apiImpl: this, hint: hint, )); } - TaskConstMeta get kAddressBaseIsValidForNetworkConstMeta => + TaskConstMeta get kBdkAddressIsValidForNetworkConstMeta => const TaskConstMeta( - debugName: "AddressBase_is_valid_for_network", + debugName: "bdk_address_is_valid_for_network", argNames: ["that", "network"], ); @override - Future addressBaseNetwork( - {required AddressBase that, dynamic hint}) { + Future bdkAddressNetwork({required BdkAddress that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_address_base(that); - return wire.wire_AddressBase_network(port_, arg0); + var arg0 = cst_encode_box_autoadd_bdk_address(that); + return wire.wire_bdk_address_network(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_network, decodeErrorData: null, ), - constMeta: kAddressBaseNetworkConstMeta, + constMeta: kBdkAddressNetworkConstMeta, argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kAddressBaseNetworkConstMeta => const TaskConstMeta( - debugName: "AddressBase_network", + TaskConstMeta get kBdkAddressNetworkConstMeta => const TaskConstMeta( + debugName: "bdk_address_network", argNames: ["that"], ); @override - Future addressBasePayload( - {required AddressBase that, dynamic hint}) { + Future bdkAddressPayload({required BdkAddress that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_address_base(that); - return wire.wire_AddressBase_payload(port_, arg0); + var arg0 = cst_encode_box_autoadd_bdk_address(that); + return wire.wire_bdk_address_payload(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_payload, decodeErrorData: null, ), - constMeta: kAddressBasePayloadConstMeta, + constMeta: kBdkAddressPayloadConstMeta, argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kAddressBasePayloadConstMeta => const TaskConstMeta( - debugName: "AddressBase_payload", + TaskConstMeta get kBdkAddressPayloadConstMeta => const TaskConstMeta( + debugName: "bdk_address_payload", argNames: ["that"], ); @override - Future addressBaseScript( - {required AddressBase ptr, dynamic hint}) { + Future bdkAddressScript( + {required BdkAddress ptr, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_address_base(ptr); - return wire.wire_AddressBase_script(port_, arg0); + var arg0 = cst_encode_box_autoadd_bdk_address(ptr); + return wire.wire_bdk_address_script(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_script_buf_base, + decodeSuccessData: dco_decode_bdk_script_buf, decodeErrorData: null, ), - constMeta: kAddressBaseScriptConstMeta, + constMeta: kBdkAddressScriptConstMeta, argValues: [ptr], apiImpl: this, hint: hint, )); } - TaskConstMeta get kAddressBaseScriptConstMeta => const TaskConstMeta( - debugName: "AddressBase_script", + TaskConstMeta get kBdkAddressScriptConstMeta => const TaskConstMeta( + debugName: "bdk_address_script", argNames: ["ptr"], ); @override - Future addressBaseToQrUri({required AddressBase that, dynamic hint}) { + Future bdkAddressToQrUri({required BdkAddress that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_address_base(that); - return wire.wire_AddressBase_to_qr_uri(port_, arg0); + var arg0 = cst_encode_box_autoadd_bdk_address(that); + return wire.wire_bdk_address_to_qr_uri(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_String, decodeErrorData: null, ), - constMeta: kAddressBaseToQrUriConstMeta, + constMeta: kBdkAddressToQrUriConstMeta, argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kAddressBaseToQrUriConstMeta => const TaskConstMeta( - debugName: "AddressBase_to_qr_uri", + TaskConstMeta get kBdkAddressToQrUriConstMeta => const TaskConstMeta( + debugName: "bdk_address_to_qr_uri", argNames: ["that"], ); @override - Future scriptBufBaseEmpty({dynamic hint}) { + Future bdkScriptBufEmpty({dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire_ScriptBufBase_empty(port_); + return wire.wire_bdk_script_buf_empty(port_); }, codec: DcoCodec( - decodeSuccessData: dco_decode_script_buf_base, + decodeSuccessData: dco_decode_bdk_script_buf, decodeErrorData: null, ), - constMeta: kScriptBufBaseEmptyConstMeta, + constMeta: kBdkScriptBufEmptyConstMeta, argValues: [], apiImpl: this, hint: hint, )); } - TaskConstMeta get kScriptBufBaseEmptyConstMeta => const TaskConstMeta( - debugName: "ScriptBufBase_empty", + TaskConstMeta get kBdkScriptBufEmptyConstMeta => const TaskConstMeta( + debugName: "bdk_script_buf_empty", argNames: [], ); @override - Future scriptBufBaseFromHex( - {required String s, dynamic hint}) { + Future bdkScriptBufFromHex({required String s, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_String(s); - return wire.wire_ScriptBufBase_from_hex(port_, arg0); + return wire.wire_bdk_script_buf_from_hex(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_script_buf_base, + decodeSuccessData: dco_decode_bdk_script_buf, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kScriptBufBaseFromHexConstMeta, + constMeta: kBdkScriptBufFromHexConstMeta, argValues: [s], apiImpl: this, hint: hint, )); } - TaskConstMeta get kScriptBufBaseFromHexConstMeta => const TaskConstMeta( - debugName: "ScriptBufBase_from_hex", + TaskConstMeta get kBdkScriptBufFromHexConstMeta => const TaskConstMeta( + debugName: "bdk_script_buf_from_hex", argNames: ["s"], ); @override - Future scriptBufBaseWithCapacity( + Future bdkScriptBufWithCapacity( {required int capacity, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_usize(capacity); - return wire.wire_ScriptBufBase_with_capacity(port_, arg0); + return wire.wire_bdk_script_buf_with_capacity(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_script_buf_base, + decodeSuccessData: dco_decode_bdk_script_buf, decodeErrorData: null, ), - constMeta: kScriptBufBaseWithCapacityConstMeta, + constMeta: kBdkScriptBufWithCapacityConstMeta, argValues: [capacity], apiImpl: this, hint: hint, )); } - TaskConstMeta get kScriptBufBaseWithCapacityConstMeta => const TaskConstMeta( - debugName: "ScriptBufBase_with_capacity", + TaskConstMeta get kBdkScriptBufWithCapacityConstMeta => const TaskConstMeta( + debugName: "bdk_script_buf_with_capacity", argNames: ["capacity"], ); @override - Future> transactionBaseInput( - {required TransactionBase that, dynamic hint}) { + Future bdkTransactionFromBytes( + {required List transactionBytes, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_list_prim_u_8_loose(transactionBytes); + return wire.wire_bdk_transaction_from_bytes(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_transaction, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkTransactionFromBytesConstMeta, + argValues: [transactionBytes], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkTransactionFromBytesConstMeta => const TaskConstMeta( + debugName: "bdk_transaction_from_bytes", + argNames: ["transactionBytes"], + ); + + @override + Future> bdkTransactionInput( + {required BdkTransaction that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_transaction_base(that); - return wire.wire_TransactionBase_input(port_, arg0); + var arg0 = cst_encode_box_autoadd_bdk_transaction(that); + return wire.wire_bdk_transaction_input(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_list_tx_in, - decodeErrorData: null, + decodeErrorData: dco_decode_bdk_error, ), - constMeta: kTransactionBaseInputConstMeta, + constMeta: kBdkTransactionInputConstMeta, argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kTransactionBaseInputConstMeta => const TaskConstMeta( - debugName: "TransactionBase_input", + TaskConstMeta get kBdkTransactionInputConstMeta => const TaskConstMeta( + debugName: "bdk_transaction_input", argNames: ["that"], ); @override - Future transactionBaseIsCoinBase( - {required TransactionBase that, dynamic hint}) { + Future bdkTransactionIsCoinBase( + {required BdkTransaction that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_transaction_base(that); - return wire.wire_TransactionBase_is_coin_base(port_, arg0); + var arg0 = cst_encode_box_autoadd_bdk_transaction(that); + return wire.wire_bdk_transaction_is_coin_base(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_bool, - decodeErrorData: null, + decodeErrorData: dco_decode_bdk_error, ), - constMeta: kTransactionBaseIsCoinBaseConstMeta, + constMeta: kBdkTransactionIsCoinBaseConstMeta, argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kTransactionBaseIsCoinBaseConstMeta => const TaskConstMeta( - debugName: "TransactionBase_is_coin_base", + TaskConstMeta get kBdkTransactionIsCoinBaseConstMeta => const TaskConstMeta( + debugName: "bdk_transaction_is_coin_base", argNames: ["that"], ); @override - Future transactionBaseIsExplicitlyRbf( - {required TransactionBase that, dynamic hint}) { + Future bdkTransactionIsExplicitlyRbf( + {required BdkTransaction that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_transaction_base(that); - return wire.wire_TransactionBase_is_explicitly_rbf(port_, arg0); + var arg0 = cst_encode_box_autoadd_bdk_transaction(that); + return wire.wire_bdk_transaction_is_explicitly_rbf(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_bool, - decodeErrorData: null, + decodeErrorData: dco_decode_bdk_error, ), - constMeta: kTransactionBaseIsExplicitlyRbfConstMeta, + constMeta: kBdkTransactionIsExplicitlyRbfConstMeta, argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kTransactionBaseIsExplicitlyRbfConstMeta => + TaskConstMeta get kBdkTransactionIsExplicitlyRbfConstMeta => const TaskConstMeta( - debugName: "TransactionBase_is_explicitly_rbf", + debugName: "bdk_transaction_is_explicitly_rbf", argNames: ["that"], ); @override - Future transactionBaseIsLockTimeEnabled( - {required TransactionBase that, dynamic hint}) { + Future bdkTransactionIsLockTimeEnabled( + {required BdkTransaction that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_transaction_base(that); - return wire.wire_TransactionBase_is_lock_time_enabled(port_, arg0); + var arg0 = cst_encode_box_autoadd_bdk_transaction(that); + return wire.wire_bdk_transaction_is_lock_time_enabled(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_bool, - decodeErrorData: null, + decodeErrorData: dco_decode_bdk_error, ), - constMeta: kTransactionBaseIsLockTimeEnabledConstMeta, + constMeta: kBdkTransactionIsLockTimeEnabledConstMeta, argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kTransactionBaseIsLockTimeEnabledConstMeta => + TaskConstMeta get kBdkTransactionIsLockTimeEnabledConstMeta => const TaskConstMeta( - debugName: "TransactionBase_is_lock_time_enabled", + debugName: "bdk_transaction_is_lock_time_enabled", argNames: ["that"], ); @override - Future transactionBaseLockTime( - {required TransactionBase that, dynamic hint}) { + Future bdkTransactionLockTime( + {required BdkTransaction that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_transaction_base(that); - return wire.wire_TransactionBase_lock_time(port_, arg0); + var arg0 = cst_encode_box_autoadd_bdk_transaction(that); + return wire.wire_bdk_transaction_lock_time(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_u_32, - decodeErrorData: null, + decodeSuccessData: dco_decode_lock_time, + decodeErrorData: dco_decode_bdk_error, ), - constMeta: kTransactionBaseLockTimeConstMeta, + constMeta: kBdkTransactionLockTimeConstMeta, argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kTransactionBaseLockTimeConstMeta => const TaskConstMeta( - debugName: "TransactionBase_lock_time", + TaskConstMeta get kBdkTransactionLockTimeConstMeta => const TaskConstMeta( + debugName: "bdk_transaction_lock_time", argNames: ["that"], ); @override - Future transactionBaseNew( - {required List transactionBytes, dynamic hint}) { + Future bdkTransactionNew( + {required int version, + required LockTime lockTime, + required List input, + required List output, + dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_list_prim_u_8_loose(transactionBytes); - return wire.wire_TransactionBase_new(port_, arg0); + 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_bdk_transaction_new(port_, arg0, arg1, arg2, arg3); }, codec: DcoCodec( - decodeSuccessData: dco_decode_transaction_base, + decodeSuccessData: dco_decode_bdk_transaction, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kTransactionBaseNewConstMeta, - argValues: [transactionBytes], + constMeta: kBdkTransactionNewConstMeta, + argValues: [version, lockTime, input, output], apiImpl: this, hint: hint, )); } - TaskConstMeta get kTransactionBaseNewConstMeta => const TaskConstMeta( - debugName: "TransactionBase_new", - argNames: ["transactionBytes"], + TaskConstMeta get kBdkTransactionNewConstMeta => const TaskConstMeta( + debugName: "bdk_transaction_new", + argNames: ["version", "lockTime", "input", "output"], ); @override - Future> transactionBaseOutput( - {required TransactionBase that, dynamic hint}) { + Future> bdkTransactionOutput( + {required BdkTransaction that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_transaction_base(that); - return wire.wire_TransactionBase_output(port_, arg0); + var arg0 = cst_encode_box_autoadd_bdk_transaction(that); + return wire.wire_bdk_transaction_output(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_list_tx_out, - decodeErrorData: null, + decodeErrorData: dco_decode_bdk_error, ), - constMeta: kTransactionBaseOutputConstMeta, + constMeta: kBdkTransactionOutputConstMeta, argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kTransactionBaseOutputConstMeta => const TaskConstMeta( - debugName: "TransactionBase_output", + TaskConstMeta get kBdkTransactionOutputConstMeta => const TaskConstMeta( + debugName: "bdk_transaction_output", argNames: ["that"], ); @override - Future transactionBaseSerialize( - {required TransactionBase that, dynamic hint}) { + Future bdkTransactionSerialize( + {required BdkTransaction that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_transaction_base(that); - return wire.wire_TransactionBase_serialize(port_, arg0); + var arg0 = cst_encode_box_autoadd_bdk_transaction(that); + return wire.wire_bdk_transaction_serialize(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_list_prim_u_8_strict, - decodeErrorData: null, + decodeErrorData: dco_decode_bdk_error, ), - constMeta: kTransactionBaseSerializeConstMeta, + constMeta: kBdkTransactionSerializeConstMeta, argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kTransactionBaseSerializeConstMeta => const TaskConstMeta( - debugName: "TransactionBase_serialize", + TaskConstMeta get kBdkTransactionSerializeConstMeta => const TaskConstMeta( + debugName: "bdk_transaction_serialize", argNames: ["that"], ); @override - Future transactionBaseSize( - {required TransactionBase that, dynamic hint}) { + Future bdkTransactionSize({required BdkTransaction that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_transaction_base(that); - return wire.wire_TransactionBase_size(port_, arg0); + var arg0 = cst_encode_box_autoadd_bdk_transaction(that); + return wire.wire_bdk_transaction_size(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_u_64, - decodeErrorData: null, + decodeErrorData: dco_decode_bdk_error, ), - constMeta: kTransactionBaseSizeConstMeta, + constMeta: kBdkTransactionSizeConstMeta, argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kTransactionBaseSizeConstMeta => const TaskConstMeta( - debugName: "TransactionBase_size", + TaskConstMeta get kBdkTransactionSizeConstMeta => const TaskConstMeta( + debugName: "bdk_transaction_size", argNames: ["that"], ); @override - Future transactionBaseTxid( - {required TransactionBase that, dynamic hint}) { + Future bdkTransactionTxid( + {required BdkTransaction that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_transaction_base(that); - return wire.wire_TransactionBase_txid(port_, arg0); + var arg0 = cst_encode_box_autoadd_bdk_transaction(that); + return wire.wire_bdk_transaction_txid(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_String, - decodeErrorData: null, + decodeErrorData: dco_decode_bdk_error, ), - constMeta: kTransactionBaseTxidConstMeta, + constMeta: kBdkTransactionTxidConstMeta, argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kTransactionBaseTxidConstMeta => const TaskConstMeta( - debugName: "TransactionBase_txid", + TaskConstMeta get kBdkTransactionTxidConstMeta => const TaskConstMeta( + debugName: "bdk_transaction_txid", argNames: ["that"], ); @override - Future transactionBaseVersion( - {required TransactionBase that, dynamic hint}) { + Future bdkTransactionVersion( + {required BdkTransaction that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_transaction_base(that); - return wire.wire_TransactionBase_version(port_, arg0); + var arg0 = cst_encode_box_autoadd_bdk_transaction(that); + return wire.wire_bdk_transaction_version(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_i_32, - decodeErrorData: null, + decodeErrorData: dco_decode_bdk_error, ), - constMeta: kTransactionBaseVersionConstMeta, + constMeta: kBdkTransactionVersionConstMeta, argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kTransactionBaseVersionConstMeta => const TaskConstMeta( - debugName: "TransactionBase_version", + TaskConstMeta get kBdkTransactionVersionConstMeta => const TaskConstMeta( + debugName: "bdk_transaction_version", argNames: ["that"], ); @override - Future transactionBaseVsize( - {required TransactionBase that, dynamic hint}) { + Future bdkTransactionVsize( + {required BdkTransaction that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_transaction_base(that); - return wire.wire_TransactionBase_vsize(port_, arg0); + var arg0 = cst_encode_box_autoadd_bdk_transaction(that); + return wire.wire_bdk_transaction_vsize(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_u_64, - decodeErrorData: null, + decodeErrorData: dco_decode_bdk_error, ), - constMeta: kTransactionBaseVsizeConstMeta, + constMeta: kBdkTransactionVsizeConstMeta, argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kTransactionBaseVsizeConstMeta => const TaskConstMeta( - debugName: "TransactionBase_vsize", + TaskConstMeta get kBdkTransactionVsizeConstMeta => const TaskConstMeta( + debugName: "bdk_transaction_vsize", argNames: ["that"], ); @override - Future transactionBaseWeight( - {required TransactionBase that, dynamic hint}) { + Future bdkTransactionWeight( + {required BdkTransaction that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_transaction_base(that); - return wire.wire_TransactionBase_weight(port_, arg0); + var arg0 = cst_encode_box_autoadd_bdk_transaction(that); + return wire.wire_bdk_transaction_weight(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_u_64, - decodeErrorData: null, + decodeErrorData: dco_decode_bdk_error, ), - constMeta: kTransactionBaseWeightConstMeta, + constMeta: kBdkTransactionWeightConstMeta, argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kTransactionBaseWeightConstMeta => const TaskConstMeta( - debugName: "TransactionBase_weight", + TaskConstMeta get kBdkTransactionWeightConstMeta => const TaskConstMeta( + debugName: "bdk_transaction_weight", argNames: ["that"], ); @override - Future walletBaseGetAddress( - {required WalletBase that, + Future<(BdkAddress, int)> bdkWalletGetAddress( + {required BdkWallet ptr, required AddressIndex addressIndex, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_wallet_base(that); + var arg0 = cst_encode_box_autoadd_bdk_wallet(ptr); var arg1 = cst_encode_box_autoadd_address_index(addressIndex); - return wire.wire_WalletBase_get_address(port_, arg0, arg1); + return wire.wire_bdk_wallet_get_address(port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_address_info, + decodeSuccessData: dco_decode_record_bdk_address_u_32, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kWalletBaseGetAddressConstMeta, - argValues: [that, addressIndex], + constMeta: kBdkWalletGetAddressConstMeta, + argValues: [ptr, addressIndex], apiImpl: this, hint: hint, )); } - TaskConstMeta get kWalletBaseGetAddressConstMeta => const TaskConstMeta( - debugName: "WalletBase_get_address", - argNames: ["that", "addressIndex"], + TaskConstMeta get kBdkWalletGetAddressConstMeta => const TaskConstMeta( + debugName: "bdk_wallet_get_address", + argNames: ["ptr", "addressIndex"], ); @override - Future walletBaseGetBalance( - {required WalletBase that, dynamic hint}) { + Future bdkWalletGetBalance({required BdkWallet that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_wallet_base(that); - return wire.wire_WalletBase_get_balance(port_, arg0); + var arg0 = cst_encode_box_autoadd_bdk_wallet(that); + return wire.wire_bdk_wallet_get_balance(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_balance, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kWalletBaseGetBalanceConstMeta, + constMeta: kBdkWalletGetBalanceConstMeta, argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kWalletBaseGetBalanceConstMeta => const TaskConstMeta( - debugName: "WalletBase_get_balance", + TaskConstMeta get kBdkWalletGetBalanceConstMeta => const TaskConstMeta( + debugName: "bdk_wallet_get_balance", argNames: ["that"], ); @override - Future walletBaseGetDescriptorForKeychain( - {required WalletBase ptr, required KeychainKind keychain, dynamic hint}) { + Future bdkWalletGetDescriptorForKeychain( + {required BdkWallet ptr, required KeychainKind keychain, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_wallet_base(ptr); + var arg0 = cst_encode_box_autoadd_bdk_wallet(ptr); var arg1 = cst_encode_keychain_kind(keychain); - return wire.wire_WalletBase_get_descriptor_for_keychain( + return wire.wire_bdk_wallet_get_descriptor_for_keychain( port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_descriptor_base, + decodeSuccessData: dco_decode_bdk_descriptor, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kWalletBaseGetDescriptorForKeychainConstMeta, + constMeta: kBdkWalletGetDescriptorForKeychainConstMeta, argValues: [ptr, keychain], apiImpl: this, hint: hint, )); } - TaskConstMeta get kWalletBaseGetDescriptorForKeychainConstMeta => + TaskConstMeta get kBdkWalletGetDescriptorForKeychainConstMeta => const TaskConstMeta( - debugName: "WalletBase_get_descriptor_for_keychain", + debugName: "bdk_wallet_get_descriptor_for_keychain", argNames: ["ptr", "keychain"], ); @override - Future walletBaseGetInternalAddress( - {required WalletBase that, + Future<(BdkAddress, int)> bdkWalletGetInternalAddress( + {required BdkWallet ptr, required AddressIndex addressIndex, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_wallet_base(that); + var arg0 = cst_encode_box_autoadd_bdk_wallet(ptr); var arg1 = cst_encode_box_autoadd_address_index(addressIndex); - return wire.wire_WalletBase_get_internal_address(port_, arg0, arg1); + return wire.wire_bdk_wallet_get_internal_address(port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_address_info, + decodeSuccessData: dco_decode_record_bdk_address_u_32, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kWalletBaseGetInternalAddressConstMeta, - argValues: [that, addressIndex], + constMeta: kBdkWalletGetInternalAddressConstMeta, + argValues: [ptr, addressIndex], apiImpl: this, hint: hint, )); } - TaskConstMeta get kWalletBaseGetInternalAddressConstMeta => + TaskConstMeta get kBdkWalletGetInternalAddressConstMeta => const TaskConstMeta( - debugName: "WalletBase_get_internal_address", - argNames: ["that", "addressIndex"], + debugName: "bdk_wallet_get_internal_address", + argNames: ["ptr", "addressIndex"], ); @override - Future walletBaseGetPsbtInput( - {required WalletBase that, + Future bdkWalletGetPsbtInput( + {required BdkWallet that, required LocalUtxo utxo, required bool onlyWitnessUtxo, PsbtSigHashType? sighashType, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_wallet_base(that); + 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_WalletBase_get_psbt_input( + return wire.wire_bdk_wallet_get_psbt_input( port_, arg0, arg1, arg2, arg3); }, codec: DcoCodec( decodeSuccessData: dco_decode_input, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kWalletBaseGetPsbtInputConstMeta, + constMeta: kBdkWalletGetPsbtInputConstMeta, argValues: [that, utxo, onlyWitnessUtxo, sighashType], apiImpl: this, hint: hint, )); } - TaskConstMeta get kWalletBaseGetPsbtInputConstMeta => const TaskConstMeta( - debugName: "WalletBase_get_psbt_input", + TaskConstMeta get kBdkWalletGetPsbtInputConstMeta => const TaskConstMeta( + debugName: "bdk_wallet_get_psbt_input", argNames: ["that", "utxo", "onlyWitnessUtxo", "sighashType"], ); @override - Future walletBaseIsMine( - {required WalletBase that, required ScriptBufBase script, dynamic hint}) { + Future bdkWalletIsMine( + {required BdkWallet that, required BdkScriptBuf script, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_wallet_base(that); - var arg1 = cst_encode_box_autoadd_script_buf_base(script); - return wire.wire_WalletBase_is_mine(port_, arg0, arg1); + var arg0 = cst_encode_box_autoadd_bdk_wallet(that); + var arg1 = cst_encode_box_autoadd_bdk_script_buf(script); + return wire.wire_bdk_wallet_is_mine(port_, arg0, arg1); }, codec: DcoCodec( decodeSuccessData: dco_decode_bool, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kWalletBaseIsMineConstMeta, + constMeta: kBdkWalletIsMineConstMeta, argValues: [that, script], apiImpl: this, hint: hint, )); } - TaskConstMeta get kWalletBaseIsMineConstMeta => const TaskConstMeta( - debugName: "WalletBase_is_mine", + TaskConstMeta get kBdkWalletIsMineConstMeta => const TaskConstMeta( + debugName: "bdk_wallet_is_mine", argNames: ["that", "script"], ); @override - Future> walletBaseListTransactions( - {required WalletBase that, required bool includeRaw, dynamic hint}) { + Future> bdkWalletListTransactions( + {required BdkWallet that, required bool includeRaw, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_wallet_base(that); + var arg0 = cst_encode_box_autoadd_bdk_wallet(that); var arg1 = cst_encode_bool(includeRaw); - return wire.wire_WalletBase_list_transactions(port_, arg0, arg1); + return wire.wire_bdk_wallet_list_transactions(port_, arg0, arg1); }, codec: DcoCodec( decodeSuccessData: dco_decode_list_transaction_details, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kWalletBaseListTransactionsConstMeta, + constMeta: kBdkWalletListTransactionsConstMeta, argValues: [that, includeRaw], apiImpl: this, hint: hint, )); } - TaskConstMeta get kWalletBaseListTransactionsConstMeta => const TaskConstMeta( - debugName: "WalletBase_list_transactions", + TaskConstMeta get kBdkWalletListTransactionsConstMeta => const TaskConstMeta( + debugName: "bdk_wallet_list_transactions", argNames: ["that", "includeRaw"], ); @override - Future> walletBaseListUnspent( - {required WalletBase that, dynamic hint}) { + Future> bdkWalletListUnspent( + {required BdkWallet that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_wallet_base(that); - return wire.wire_WalletBase_list_unspent(port_, arg0); + var arg0 = cst_encode_box_autoadd_bdk_wallet(that); + return wire.wire_bdk_wallet_list_unspent(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_list_local_utxo, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kWalletBaseListUnspentConstMeta, + constMeta: kBdkWalletListUnspentConstMeta, argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kWalletBaseListUnspentConstMeta => const TaskConstMeta( - debugName: "WalletBase_list_unspent", + TaskConstMeta get kBdkWalletListUnspentConstMeta => const TaskConstMeta( + debugName: "bdk_wallet_list_unspent", argNames: ["that"], ); @override - Future walletBaseNetwork({required WalletBase that, dynamic hint}) { + Future bdkWalletNetwork({required BdkWallet that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_wallet_base(that); - return wire.wire_WalletBase_network(port_, arg0); + var arg0 = cst_encode_box_autoadd_bdk_wallet(that); + return wire.wire_bdk_wallet_network(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_network, decodeErrorData: null, ), - constMeta: kWalletBaseNetworkConstMeta, + constMeta: kBdkWalletNetworkConstMeta, argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kWalletBaseNetworkConstMeta => const TaskConstMeta( - debugName: "WalletBase_network", + TaskConstMeta get kBdkWalletNetworkConstMeta => const TaskConstMeta( + debugName: "bdk_wallet_network", argNames: ["that"], ); @override - Future walletBaseNew( - {required DescriptorBase descriptor, - DescriptorBase? changeDescriptor, + Future bdkWalletNew( + {required BdkDescriptor descriptor, + BdkDescriptor? changeDescriptor, required Network network, required DatabaseConfig databaseConfig, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_descriptor_base(descriptor); - var arg1 = cst_encode_opt_box_autoadd_descriptor_base(changeDescriptor); + 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_WalletBase_new(port_, arg0, arg1, arg2, arg3); + return wire.wire_bdk_wallet_new(port_, arg0, arg1, arg2, arg3); }, codec: DcoCodec( - decodeSuccessData: dco_decode_wallet_base, + decodeSuccessData: dco_decode_bdk_wallet, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kWalletBaseNewConstMeta, + constMeta: kBdkWalletNewConstMeta, argValues: [descriptor, changeDescriptor, network, databaseConfig], apiImpl: this, hint: hint, )); } - TaskConstMeta get kWalletBaseNewConstMeta => const TaskConstMeta( - debugName: "WalletBase_new", + TaskConstMeta get kBdkWalletNewConstMeta => const TaskConstMeta( + debugName: "bdk_wallet_new", argNames: [ "descriptor", "changeDescriptor", @@ -2391,67 +2417,67 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { ); @override - Future walletBaseSign( - {required WalletBase ptr, - required PsbtBase psbt, + Future bdkWalletSign( + {required BdkWallet ptr, + required BdkPsbt psbt, SignOptions? signOptions, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_wallet_base(ptr); - var arg1 = cst_encode_box_autoadd_psbt_base(psbt); + 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_WalletBase_sign(port_, arg0, arg1, arg2); + return wire.wire_bdk_wallet_sign(port_, arg0, arg1, arg2); }, codec: DcoCodec( decodeSuccessData: dco_decode_bool, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kWalletBaseSignConstMeta, + constMeta: kBdkWalletSignConstMeta, argValues: [ptr, psbt, signOptions], apiImpl: this, hint: hint, )); } - TaskConstMeta get kWalletBaseSignConstMeta => const TaskConstMeta( - debugName: "WalletBase_sign", + TaskConstMeta get kBdkWalletSignConstMeta => const TaskConstMeta( + debugName: "bdk_wallet_sign", argNames: ["ptr", "psbt", "signOptions"], ); @override - Future walletBaseSync( - {required WalletBase ptr, - required BlockchainBase blockchain, + Future bdkWalletSync( + {required BdkWallet ptr, + required BdkBlockchain blockchain, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_wallet_base(ptr); - var arg1 = cst_encode_box_autoadd_blockchain_base(blockchain); - return wire.wire_WalletBase_sync(port_, arg0, arg1); + var arg0 = cst_encode_box_autoadd_bdk_wallet(ptr); + var arg1 = cst_encode_box_autoadd_bdk_blockchain(blockchain); + return wire.wire_bdk_wallet_sync(port_, arg0, arg1); }, codec: DcoCodec( decodeSuccessData: dco_decode_unit, decodeErrorData: dco_decode_bdk_error, ), - constMeta: kWalletBaseSyncConstMeta, + constMeta: kBdkWalletSyncConstMeta, argValues: [ptr, blockchain], apiImpl: this, hint: hint, )); } - TaskConstMeta get kWalletBaseSyncConstMeta => const TaskConstMeta( - debugName: "WalletBase_sync", + TaskConstMeta get kBdkWalletSyncConstMeta => const TaskConstMeta( + debugName: "bdk_wallet_sync", argNames: ["ptr", "blockchain"], ); @override - Future<(PsbtBase, TransactionDetails)> finishBumpFeeTxBuilder( + Future<(BdkPsbt, TransactionDetails)> finishBumpFeeTxBuilder( {required String txid, required double feeRate, - AddressBase? allowShrinking, - required WalletBase wallet, + BdkAddress? allowShrinking, + required BdkWallet wallet, required bool enableRbf, int? nSequence, dynamic hint}) { @@ -2459,15 +2485,15 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { callFfi: (port_) { var arg0 = cst_encode_String(txid); var arg1 = cst_encode_f_32(feeRate); - var arg2 = cst_encode_opt_box_autoadd_address_base(allowShrinking); - var arg3 = cst_encode_box_autoadd_wallet_base(wallet); + 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_finish_bump_fee_tx_builder( port_, arg0, arg1, arg2, arg3, arg4, arg5); }, codec: DcoCodec( - decodeSuccessData: dco_decode_record_psbt_base_transaction_details, + decodeSuccessData: dco_decode_record_bdk_psbt_transaction_details, decodeErrorData: dco_decode_bdk_error, ), constMeta: kFinishBumpFeeTxBuilderConstMeta, @@ -2490,8 +2516,8 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { ); @override - Future<(PsbtBase, TransactionDetails)> txBuilderFinish( - {required WalletBase wallet, + Future<(BdkPsbt, TransactionDetails)> txBuilderFinish( + {required BdkWallet wallet, required List recipients, required List utxos, (OutPoint, Input, int)? foreignUtxo, @@ -2501,13 +2527,13 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { double? feeRate, int? feeAbsolute, required bool drainWallet, - ScriptBufBase? drainTo, + BdkScriptBuf? drainTo, RbfValue? rbf, required List data, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_wallet_base(wallet); + 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( @@ -2518,14 +2544,14 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { 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_script_buf_base(drainTo); + 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_list_prim_u_8_loose(data); return wire.wire_tx_builder_finish(port_, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12); }, codec: DcoCodec( - decodeSuccessData: dco_decode_record_psbt_base_transaction_details, + decodeSuccessData: dco_decode_record_bdk_psbt_transaction_details, decodeErrorData: dco_decode_bdk_error, ), constMeta: kTxBuilderFinishConstMeta, @@ -2719,17 +2745,6 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { return raw as String; } - @protected - AddressBase dco_decode_address_base(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 AddressBase( - ptr: dco_decode_RustOpaque_bdkbitcoinAddress(arr[0]), - ); - } - @protected AddressError dco_decode_address_error(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -2809,18 +2824,6 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { } } - @protected - AddressInfo dco_decode_address_info(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 AddressInfo( - index: dco_decode_u_32(arr[0]), - address: dco_decode_String(arr[1]), - ); - } - @protected Auth dco_decode_auth(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -2857,6 +2860,73 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { ); } + @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_AnyBlockchain(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_bitcoinbip32DerivationPath(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_ExtendedDescriptor(arr[0]), + keyMap: dco_decode_RustOpaque_keysKeyMap(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_keysDescriptorPublicKey(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_keysDescriptorSecretKey(arr[0]), + ); + } + @protected BdkError dco_decode_bdk_error(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -3014,31 +3084,87 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { return BdkError_Rusqlite( dco_decode_String(raw[1]), ); + case 43: + return BdkError_InvalidInput( + dco_decode_String(raw[1]), + ); + case 44: + return BdkError_InvalidLockTime( + dco_decode_String(raw[1]), + ); + case 45: + return BdkError_InvalidTransaction( + dco_decode_String(raw[1]), + ); default: throw Exception("unreachable"); } } @protected - BlockTime dco_decode_block_time(dynamic raw) { + 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 != 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]), + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return BdkMnemonic( + ptr: dco_decode_RustOpaque_keysbip39Mnemonic(arr[0]), ); } @protected - BlockchainBase dco_decode_blockchain_base(dynamic raw) { + 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 BlockchainBase( - ptr: dco_decode_RustOpaque_AnyBlockchain(arr[0]), + return BdkPsbt( + ptr: dco_decode_RustOpaque_MutexPartiallySignedTransaction(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( + inner: 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_MutexbdkWalletAnyDatabase(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]), ); } @@ -3069,12 +3195,6 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { return raw as bool; } - @protected - AddressBase dco_decode_box_autoadd_address_base(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_address_base(raw); - } - @protected AddressError dco_decode_box_autoadd_address_error(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -3088,65 +3208,101 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { } @protected - BlockTime dco_decode_box_autoadd_block_time(dynamic raw) { + BdkAddress dco_decode_box_autoadd_bdk_address(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_block_time(raw); + return dco_decode_bdk_address(raw); } @protected - BlockchainBase dco_decode_box_autoadd_blockchain_base(dynamic raw) { + BdkBlockchain dco_decode_box_autoadd_bdk_blockchain(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_blockchain_base(raw); + return dco_decode_bdk_blockchain(raw); } @protected - BlockchainConfig dco_decode_box_autoadd_blockchain_config(dynamic raw) { + BdkDerivationPath dco_decode_box_autoadd_bdk_derivation_path(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_blockchain_config(raw); + return dco_decode_bdk_derivation_path(raw); } @protected - ConsensusError dco_decode_box_autoadd_consensus_error(dynamic raw) { + BdkDescriptor dco_decode_box_autoadd_bdk_descriptor(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_consensus_error(raw); + return dco_decode_bdk_descriptor(raw); } @protected - DatabaseConfig dco_decode_box_autoadd_database_config(dynamic raw) { + BdkDescriptorPublicKey dco_decode_box_autoadd_bdk_descriptor_public_key( + dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_database_config(raw); + return dco_decode_bdk_descriptor_public_key(raw); } @protected - DerivationPathBase dco_decode_box_autoadd_derivation_path_base(dynamic raw) { + BdkDescriptorSecretKey dco_decode_box_autoadd_bdk_descriptor_secret_key( + dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_derivation_path_base(raw); + return dco_decode_bdk_descriptor_secret_key(raw); } @protected - DescriptorBase dco_decode_box_autoadd_descriptor_base(dynamic raw) { + BdkMnemonic dco_decode_box_autoadd_bdk_mnemonic(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_descriptor_base(raw); + return dco_decode_bdk_mnemonic(raw); } @protected - DescriptorError dco_decode_box_autoadd_descriptor_error(dynamic raw) { + BdkPsbt dco_decode_box_autoadd_bdk_psbt(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_descriptor_error(raw); + return dco_decode_bdk_psbt(raw); } @protected - DescriptorPublicKeyBase dco_decode_box_autoadd_descriptor_public_key_base( - dynamic raw) { + BdkScriptBuf dco_decode_box_autoadd_bdk_script_buf(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_descriptor_public_key_base(raw); + return dco_decode_bdk_script_buf(raw); } @protected - DescriptorSecretKeyBase dco_decode_box_autoadd_descriptor_secret_key_base( - dynamic raw) { + 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 + 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_secret_key_base(raw); + return dco_decode_descriptor_error(raw); } @protected @@ -3186,9 +3342,9 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { } @protected - MnemonicBase dco_decode_box_autoadd_mnemonic_base(dynamic raw) { + LockTime dco_decode_box_autoadd_lock_time(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_mnemonic_base(raw); + return dco_decode_lock_time(raw); } @protected @@ -3197,12 +3353,6 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { return dco_decode_out_point(raw); } - @protected - PsbtBase dco_decode_box_autoadd_psbt_base(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_psbt_base(raw); - } - @protected PsbtSigHashType dco_decode_box_autoadd_psbt_sig_hash_type(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -3234,12 +3384,6 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { return dco_decode_rpc_sync_params(raw); } - @protected - ScriptBufBase dco_decode_box_autoadd_script_buf_base(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_script_buf_base(raw); - } - @protected SignOptions dco_decode_box_autoadd_sign_options(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -3260,12 +3404,6 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { return dco_decode_sqlite_db_configuration(raw); } - @protected - TransactionBase dco_decode_box_autoadd_transaction_base(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_transaction_base(raw); - } - @protected int dco_decode_box_autoadd_u_32(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -3284,12 +3422,6 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { return raw as int; } - @protected - WalletBase dco_decode_box_autoadd_wallet_base(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_wallet_base(raw); - } - @protected ChangeSpendPolicy dco_decode_change_spend_policy(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -3349,30 +3481,7 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { } @protected - DerivationPathBase dco_decode_derivation_path_base(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 DerivationPathBase( - ptr: dco_decode_RustOpaque_bitcoinbip32DerivationPath(arr[0]), - ); - } - - @protected - DescriptorBase dco_decode_descriptor_base(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 DescriptorBase( - extendedDescriptor: dco_decode_RustOpaque_ExtendedDescriptor(arr[0]), - keyMap: dco_decode_RustOpaque_keysKeyMap(arr[1]), - ); - } - - @protected - DescriptorError dco_decode_descriptor_error(dynamic raw) { + DescriptorError dco_decode_descriptor_error(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs switch (raw[0]) { case 0: @@ -3420,28 +3529,6 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { } } - @protected - DescriptorPublicKeyBase dco_decode_descriptor_public_key_base(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 DescriptorPublicKeyBase( - ptr: dco_decode_RustOpaque_keysDescriptorPublicKey(arr[0]), - ); - } - - @protected - DescriptorSecretKeyBase dco_decode_descriptor_secret_key_base(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 DescriptorSecretKeyBase( - ptr: dco_decode_RustOpaque_keysDescriptorSecretKey(arr[0]), - ); - } - @protected ElectrumConfig dco_decode_electrum_config(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -3604,14 +3691,20 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { } @protected - MnemonicBase dco_decode_mnemonic_base(dynamic raw) { + LockTime dco_decode_lock_time(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 MnemonicBase( - ptr: dco_decode_RustOpaque_keysbip39Mnemonic(arr[0]), - ); + 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 @@ -3627,21 +3720,33 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { } @protected - AddressBase? dco_decode_opt_box_autoadd_address_base(dynamic raw) { + 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_address_base(raw); + return raw == null ? null : dco_decode_box_autoadd_bdk_address(raw); } @protected - BlockTime? dco_decode_opt_box_autoadd_block_time(dynamic raw) { + 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_block_time(raw); + return raw == null ? null : dco_decode_box_autoadd_bdk_descriptor(raw); } @protected - DescriptorBase? dco_decode_opt_box_autoadd_descriptor_base(dynamic raw) { + 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_descriptor_base(raw); + 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 @@ -3683,24 +3788,12 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { return raw == null ? null : dco_decode_box_autoadd_rpc_sync_params(raw); } - @protected - ScriptBufBase? dco_decode_opt_box_autoadd_script_buf_base(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw == null ? null : dco_decode_box_autoadd_script_buf_base(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 - TransactionBase? dco_decode_opt_box_autoadd_transaction_base(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw == null ? null : dco_decode_box_autoadd_transaction_base(raw); - } - @protected int? dco_decode_opt_box_autoadd_u_32(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -3753,17 +3846,6 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { } } - @protected - PsbtBase dco_decode_psbt_base(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 PsbtBase( - ptr: dco_decode_RustOpaque_MutexPartiallySignedTransaction(arr[0]), - ); - } - @protected PsbtSigHashType dco_decode_psbt_sig_hash_type(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -3791,33 +3873,46 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { } @protected - (OutPoint, Input, int) dco_decode_record_out_point_input_usize(dynamic raw) { + (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 != 3) { - throw Exception('Expected 3 elements, got ${arr.length}'); + if (arr.length != 2) { + throw Exception('Expected 2 elements, got ${arr.length}'); } return ( - dco_decode_out_point(arr[0]), - dco_decode_input(arr[1]), - dco_decode_usize(arr[2]), + dco_decode_bdk_address(arr[0]), + dco_decode_u_32(arr[1]), ); } @protected - (PsbtBase, TransactionDetails) - dco_decode_record_psbt_base_transaction_details(dynamic raw) { + (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_psbt_base(arr[0]), + dco_decode_bdk_psbt(arr[0]), dco_decode_transaction_details(arr[1]), ); } + @protected + (OutPoint, Input, int) 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 RpcConfig dco_decode_rpc_config(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -3854,22 +3949,11 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); return ScriptAmount( - script: dco_decode_script_buf_base(arr[0]), + script: dco_decode_bdk_script_buf(arr[0]), amount: dco_decode_u_64(arr[1]), ); } - @protected - ScriptBufBase dco_decode_script_buf_base(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 ScriptBufBase( - bytes: dco_decode_list_prim_u_8_strict(arr[0]), - ); - } - @protected SignOptions dco_decode_sign_options(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -3911,17 +3995,6 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { ); } - @protected - TransactionBase dco_decode_transaction_base(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 TransactionBase( - inner: dco_decode_String(arr[0]), - ); - } - @protected TransactionDetails dco_decode_transaction_details(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -3929,7 +4002,7 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { if (arr.length != 6) throw Exception('unexpected arr length: expect 6 but see ${arr.length}'); return TransactionDetails( - transaction: dco_decode_opt_box_autoadd_transaction_base(arr[0]), + 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]), @@ -3946,7 +4019,7 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { throw Exception('unexpected arr length: expect 4 but see ${arr.length}'); return TxIn( previousOutput: dco_decode_out_point(arr[0]), - scriptSig: dco_decode_script_buf_base(arr[1]), + 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]), ); @@ -3960,7 +4033,7 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); return TxOut( value: dco_decode_u_64(arr[0]), - scriptPubkey: dco_decode_script_buf_base(arr[1]), + scriptPubkey: dco_decode_bdk_script_buf(arr[1]), ); } @@ -4006,17 +4079,6 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { return Variant.values[raw as int]; } - @protected - WalletBase dco_decode_wallet_base(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 WalletBase( - ptr: dco_decode_RustOpaque_MutexbdkWalletAnyDatabase(arr[0]), - ); - } - @protected WitnessVersion dco_decode_witness_version(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -4116,13 +4178,6 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { return utf8.decoder.convert(inner); } - @protected - AddressBase sse_decode_address_base(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_ptr = sse_decode_RustOpaque_bdkbitcoinAddress(deserializer); - return AddressBase(ptr: var_ptr); - } - @protected AddressError sse_decode_address_error(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -4199,14 +4254,6 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { } } - @protected - AddressInfo sse_decode_address_info(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_index = sse_decode_u_32(deserializer); - var var_address = sse_decode_String(deserializer); - return AddressInfo(index: var_index, address: var_address); - } - @protected Auth sse_decode_auth(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -4245,6 +4292,55 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { 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_AnyBlockchain(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_bitcoinbip32DerivationPath(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_ExtendedDescriptor(deserializer); + var var_keyMap = sse_decode_RustOpaque_keysKeyMap(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_keysDescriptorPublicKey(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_keysDescriptorSecretKey(deserializer); + return BdkDescriptorSecretKey(ptr: var_ptr); + } + @protected BdkError sse_decode_bdk_error(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -4374,24 +4470,62 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { case 42: var var_field0 = sse_decode_String(deserializer); return BdkError_Rusqlite(var_field0); + case 43: + var var_field0 = sse_decode_String(deserializer); + return BdkError_InvalidInput(var_field0); + case 44: + var var_field0 = sse_decode_String(deserializer); + return BdkError_InvalidLockTime(var_field0); + case 45: + var var_field0 = sse_decode_String(deserializer); + return BdkError_InvalidTransaction(var_field0); default: throw UnimplementedError(''); } } @protected - BlockTime sse_decode_block_time(SseDeserializer deserializer) { + BdkMnemonic sse_decode_bdk_mnemonic(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); + var var_ptr = sse_decode_RustOpaque_keysbip39Mnemonic(deserializer); + return BdkMnemonic(ptr: var_ptr); } @protected - BlockchainBase sse_decode_blockchain_base(SseDeserializer deserializer) { + BdkPsbt sse_decode_bdk_psbt(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - var var_ptr = sse_decode_RustOpaque_AnyBlockchain(deserializer); - return BlockchainBase(ptr: var_ptr); + var var_ptr = + sse_decode_RustOpaque_MutexPartiallySignedTransaction(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_inner = sse_decode_String(deserializer); + return BdkTransaction(inner: var_inner); + } + + @protected + BdkWallet sse_decode_bdk_wallet(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_ptr = sse_decode_RustOpaque_MutexbdkWalletAnyDatabase(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 @@ -4421,93 +4555,125 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { } @protected - AddressBase sse_decode_box_autoadd_address_base( + AddressError sse_decode_box_autoadd_address_error( SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_address_base(deserializer)); + return (sse_decode_address_error(deserializer)); } @protected - AddressError sse_decode_box_autoadd_address_error( + AddressIndex sse_decode_box_autoadd_address_index( SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_address_error(deserializer)); + return (sse_decode_address_index(deserializer)); } @protected - AddressIndex sse_decode_box_autoadd_address_index( + 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_address_index(deserializer)); + return (sse_decode_bdk_blockchain(deserializer)); } @protected - BlockTime sse_decode_box_autoadd_block_time(SseDeserializer deserializer) { + BdkDerivationPath sse_decode_box_autoadd_bdk_derivation_path( + SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_block_time(deserializer)); + return (sse_decode_bdk_derivation_path(deserializer)); } @protected - BlockchainBase sse_decode_box_autoadd_blockchain_base( + BdkDescriptor sse_decode_box_autoadd_bdk_descriptor( SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_blockchain_base(deserializer)); + return (sse_decode_bdk_descriptor(deserializer)); } @protected - BlockchainConfig sse_decode_box_autoadd_blockchain_config( + BdkDescriptorPublicKey sse_decode_box_autoadd_bdk_descriptor_public_key( SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_blockchain_config(deserializer)); + return (sse_decode_bdk_descriptor_public_key(deserializer)); } @protected - ConsensusError sse_decode_box_autoadd_consensus_error( + BdkDescriptorSecretKey sse_decode_box_autoadd_bdk_descriptor_secret_key( SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_consensus_error(deserializer)); + return (sse_decode_bdk_descriptor_secret_key(deserializer)); } @protected - DatabaseConfig sse_decode_box_autoadd_database_config( + BdkMnemonic sse_decode_box_autoadd_bdk_mnemonic( SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_database_config(deserializer)); + return (sse_decode_bdk_mnemonic(deserializer)); } @protected - DerivationPathBase sse_decode_box_autoadd_derivation_path_base( + 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_derivation_path_base(deserializer)); + return (sse_decode_bdk_script_buf(deserializer)); } @protected - DescriptorBase sse_decode_box_autoadd_descriptor_base( + BdkTransaction sse_decode_box_autoadd_bdk_transaction( SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_descriptor_base(deserializer)); + return (sse_decode_bdk_transaction(deserializer)); } @protected - DescriptorError sse_decode_box_autoadd_descriptor_error( + 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_descriptor_error(deserializer)); + return (sse_decode_blockchain_config(deserializer)); } @protected - DescriptorPublicKeyBase sse_decode_box_autoadd_descriptor_public_key_base( + ConsensusError sse_decode_box_autoadd_consensus_error( SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_descriptor_public_key_base(deserializer)); + return (sse_decode_consensus_error(deserializer)); } @protected - DescriptorSecretKeyBase sse_decode_box_autoadd_descriptor_secret_key_base( + DatabaseConfig sse_decode_box_autoadd_database_config( SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_descriptor_secret_key_base(deserializer)); + 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 @@ -4549,10 +4715,9 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { } @protected - MnemonicBase sse_decode_box_autoadd_mnemonic_base( - SseDeserializer deserializer) { + LockTime sse_decode_box_autoadd_lock_time(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_mnemonic_base(deserializer)); + return (sse_decode_lock_time(deserializer)); } @protected @@ -4561,12 +4726,6 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { return (sse_decode_out_point(deserializer)); } - @protected - PsbtBase sse_decode_box_autoadd_psbt_base(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_psbt_base(deserializer)); - } - @protected PsbtSigHashType sse_decode_box_autoadd_psbt_sig_hash_type( SseDeserializer deserializer) { @@ -4600,13 +4759,6 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { return (sse_decode_rpc_sync_params(deserializer)); } - @protected - ScriptBufBase sse_decode_box_autoadd_script_buf_base( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_script_buf_base(deserializer)); - } - @protected SignOptions sse_decode_box_autoadd_sign_options( SseDeserializer deserializer) { @@ -4628,13 +4780,6 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { return (sse_decode_sqlite_db_configuration(deserializer)); } - @protected - TransactionBase sse_decode_box_autoadd_transaction_base( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_transaction_base(deserializer)); - } - @protected int sse_decode_box_autoadd_u_32(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -4653,12 +4798,6 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { return (sse_decode_u_8(deserializer)); } - @protected - WalletBase sse_decode_box_autoadd_wallet_base(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_wallet_base(deserializer)); - } - @protected ChangeSpendPolicy sse_decode_change_spend_policy( SseDeserializer deserializer) { @@ -4720,25 +4859,6 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { } } - @protected - DerivationPathBase sse_decode_derivation_path_base( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_ptr = - sse_decode_RustOpaque_bitcoinbip32DerivationPath(deserializer); - return DerivationPathBase(ptr: var_ptr); - } - - @protected - DescriptorBase sse_decode_descriptor_base(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_extendedDescriptor = - sse_decode_RustOpaque_ExtendedDescriptor(deserializer); - var var_keyMap = sse_decode_RustOpaque_keysKeyMap(deserializer); - return DescriptorBase( - extendedDescriptor: var_extendedDescriptor, keyMap: var_keyMap); - } - @protected DescriptorError sse_decode_descriptor_error(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -4782,22 +4902,6 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { } } - @protected - DescriptorPublicKeyBase sse_decode_descriptor_public_key_base( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_ptr = sse_decode_RustOpaque_keysDescriptorPublicKey(deserializer); - return DescriptorPublicKeyBase(ptr: var_ptr); - } - - @protected - DescriptorSecretKeyBase sse_decode_descriptor_secret_key_base( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_ptr = sse_decode_RustOpaque_keysDescriptorSecretKey(deserializer); - return DescriptorSecretKeyBase(ptr: var_ptr); - } - @protected ElectrumConfig sse_decode_electrum_config(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -5002,10 +5106,20 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { } @protected - MnemonicBase sse_decode_mnemonic_base(SseDeserializer deserializer) { + LockTime sse_decode_lock_time(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - var var_ptr = sse_decode_RustOpaque_keysbip39Mnemonic(deserializer); - return MnemonicBase(ptr: var_ptr); + + 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 @@ -5027,143 +5141,143 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { } @protected - AddressBase? sse_decode_opt_box_autoadd_address_base( + 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_address_base(deserializer)); + return (sse_decode_box_autoadd_bdk_address(deserializer)); } else { return null; } } @protected - BlockTime? sse_decode_opt_box_autoadd_block_time( + 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_block_time(deserializer)); + return (sse_decode_box_autoadd_bdk_descriptor(deserializer)); } else { return null; } } @protected - DescriptorBase? sse_decode_opt_box_autoadd_descriptor_base( + 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_descriptor_base(deserializer)); + return (sse_decode_box_autoadd_bdk_script_buf(deserializer)); } else { return null; } } @protected - double? sse_decode_opt_box_autoadd_f_32(SseDeserializer deserializer) { + 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_f_32(deserializer)); + return (sse_decode_box_autoadd_bdk_transaction(deserializer)); } else { return null; } } @protected - FeeRate? sse_decode_opt_box_autoadd_fee_rate(SseDeserializer deserializer) { + 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_fee_rate(deserializer)); + return (sse_decode_box_autoadd_block_time(deserializer)); } else { return null; } } @protected - PsbtSigHashType? sse_decode_opt_box_autoadd_psbt_sig_hash_type( - SseDeserializer deserializer) { + 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_psbt_sig_hash_type(deserializer)); + return (sse_decode_box_autoadd_f_32(deserializer)); } else { return null; } } @protected - RbfValue? sse_decode_opt_box_autoadd_rbf_value(SseDeserializer deserializer) { + 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_rbf_value(deserializer)); + return (sse_decode_box_autoadd_fee_rate(deserializer)); } else { return null; } } @protected - (OutPoint, Input, int)? - sse_decode_opt_box_autoadd_record_out_point_input_usize( - SseDeserializer deserializer) { + 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_record_out_point_input_usize( - deserializer)); + return (sse_decode_box_autoadd_psbt_sig_hash_type(deserializer)); } else { return null; } } @protected - RpcSyncParams? sse_decode_opt_box_autoadd_rpc_sync_params( - SseDeserializer deserializer) { + 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_rpc_sync_params(deserializer)); + return (sse_decode_box_autoadd_rbf_value(deserializer)); } else { return null; } } @protected - ScriptBufBase? sse_decode_opt_box_autoadd_script_buf_base( - SseDeserializer deserializer) { + (OutPoint, Input, int)? + 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_script_buf_base(deserializer)); + return (sse_decode_box_autoadd_record_out_point_input_usize( + deserializer)); } else { return null; } } @protected - SignOptions? sse_decode_opt_box_autoadd_sign_options( + 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_sign_options(deserializer)); + return (sse_decode_box_autoadd_rpc_sync_params(deserializer)); } else { return null; } } @protected - TransactionBase? sse_decode_opt_box_autoadd_transaction_base( + 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_transaction_base(deserializer)); + return (sse_decode_box_autoadd_sign_options(deserializer)); } else { return null; } @@ -5232,14 +5346,6 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { } } - @protected - PsbtBase sse_decode_psbt_base(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_ptr = - sse_decode_RustOpaque_MutexPartiallySignedTransaction(deserializer); - return PsbtBase(ptr: var_ptr); - } - @protected PsbtSigHashType sse_decode_psbt_sig_hash_type(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -5264,25 +5370,33 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { } @protected - (OutPoint, Input, int) sse_decode_record_out_point_input_usize( + (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_out_point(deserializer); - var var_field1 = sse_decode_input(deserializer); - var var_field2 = sse_decode_usize(deserializer); - return (var_field0, var_field1, var_field2); + var var_field0 = sse_decode_bdk_address(deserializer); + var var_field1 = sse_decode_u_32(deserializer); + return (var_field0, var_field1); } @protected - (PsbtBase, TransactionDetails) - sse_decode_record_psbt_base_transaction_details( - SseDeserializer deserializer) { + (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_psbt_base(deserializer); + var var_field0 = sse_decode_bdk_psbt(deserializer); var var_field1 = sse_decode_transaction_details(deserializer); return (var_field0, var_field1); } + @protected + (OutPoint, Input, int) 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 RpcConfig sse_decode_rpc_config(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -5317,18 +5431,11 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { @protected ScriptAmount sse_decode_script_amount(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - var var_script = sse_decode_script_buf_base(deserializer); + 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 - ScriptBufBase sse_decode_script_buf_base(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_bytes = sse_decode_list_prim_u_8_strict(deserializer); - return ScriptBufBase(bytes: var_bytes); - } - @protected SignOptions sse_decode_sign_options(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -5362,17 +5469,10 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { @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 - TransactionBase sse_decode_transaction_base(SseDeserializer deserializer) { + SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - var var_inner = sse_decode_String(deserializer); - return TransactionBase(inner: var_inner); + var var_path = sse_decode_String(deserializer); + return SqliteDbConfiguration(path: var_path); } @protected @@ -5380,7 +5480,7 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs var var_transaction = - sse_decode_opt_box_autoadd_transaction_base(deserializer); + 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); @@ -5400,7 +5500,7 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { 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_script_buf_base(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( @@ -5414,7 +5514,7 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { 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_script_buf_base(deserializer); + var var_scriptPubkey = sse_decode_bdk_script_buf(deserializer); return TxOut(value: var_value, scriptPubkey: var_scriptPubkey); } @@ -5461,13 +5561,6 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { return Variant.values[inner]; } - @protected - WalletBase sse_decode_wallet_base(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_ptr = sse_decode_RustOpaque_MutexbdkWalletAnyDatabase(deserializer); - return WalletBase(ptr: var_ptr); - } - @protected WitnessVersion sse_decode_witness_version(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -5711,12 +5804,6 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { sse_encode_list_prim_u_8_strict(utf8.encoder.convert(self), serializer); } - @protected - void sse_encode_address_base(AddressBase self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_RustOpaque_bdkbitcoinAddress(self.ptr, serializer); - } - @protected void sse_encode_address_error(AddressError self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -5788,13 +5875,6 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { } } - @protected - void sse_encode_address_info(AddressInfo self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_u_32(self.index, serializer); - sse_encode_String(self.address, serializer); - } - @protected void sse_encode_auth(Auth self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -5822,6 +5902,47 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { 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_AnyBlockchain(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_bitcoinbip32DerivationPath(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_ExtendedDescriptor( + self.extendedDescriptor, serializer); + sse_encode_RustOpaque_keysKeyMap(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_keysDescriptorPublicKey(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_keysDescriptorSecretKey(self.ptr, serializer); + } + @protected void sse_encode_bdk_error(BdkError self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -5956,21 +6077,54 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { case BdkError_Rusqlite(field0: final field0): sse_encode_i_32(42, serializer); sse_encode_String(field0, serializer); + case BdkError_InvalidInput(field0: final field0): + sse_encode_i_32(43, serializer); + sse_encode_String(field0, serializer); + case BdkError_InvalidLockTime(field0: final field0): + sse_encode_i_32(44, serializer); + sse_encode_String(field0, serializer); + case BdkError_InvalidTransaction(field0: final field0): + sse_encode_i_32(45, serializer); + sse_encode_String(field0, serializer); } } @protected - void sse_encode_block_time(BlockTime self, SseSerializer serializer) { + void sse_encode_bdk_mnemonic(BdkMnemonic 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); + sse_encode_RustOpaque_keysbip39Mnemonic(self.ptr, serializer); } @protected - void sse_encode_blockchain_base( - BlockchainBase self, SseSerializer serializer) { + void sse_encode_bdk_psbt(BdkPsbt self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_RustOpaque_AnyBlockchain(self.ptr, serializer); + sse_encode_RustOpaque_MutexPartiallySignedTransaction(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.inner, serializer); + } + + @protected + void sse_encode_bdk_wallet(BdkWallet self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_RustOpaque_MutexbdkWalletAnyDatabase(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 @@ -5996,13 +6150,6 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { serializer.buffer.putUint8(self ? 1 : 0); } - @protected - void sse_encode_box_autoadd_address_base( - AddressBase self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_address_base(self, serializer); - } - @protected void sse_encode_box_autoadd_address_error( AddressError self, SseSerializer serializer) { @@ -6018,73 +6165,114 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { } @protected - void sse_encode_box_autoadd_block_time( - BlockTime self, SseSerializer serializer) { + void sse_encode_box_autoadd_bdk_address( + BdkAddress self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_block_time(self, serializer); + sse_encode_bdk_address(self, serializer); } @protected - void sse_encode_box_autoadd_blockchain_base( - BlockchainBase self, SseSerializer serializer) { + void sse_encode_box_autoadd_bdk_blockchain( + BdkBlockchain self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_blockchain_base(self, serializer); + sse_encode_bdk_blockchain(self, serializer); } @protected - void sse_encode_box_autoadd_blockchain_config( - BlockchainConfig self, SseSerializer serializer) { + void sse_encode_box_autoadd_bdk_derivation_path( + BdkDerivationPath self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_blockchain_config(self, serializer); + sse_encode_bdk_derivation_path(self, serializer); } @protected - void sse_encode_box_autoadd_consensus_error( - ConsensusError self, SseSerializer serializer) { + void sse_encode_box_autoadd_bdk_descriptor( + BdkDescriptor self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_consensus_error(self, serializer); + sse_encode_bdk_descriptor(self, serializer); } @protected - void sse_encode_box_autoadd_database_config( - DatabaseConfig self, SseSerializer serializer) { + 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_database_config(self, serializer); + sse_encode_bdk_descriptor_public_key(self, serializer); } @protected - void sse_encode_box_autoadd_derivation_path_base( - DerivationPathBase self, SseSerializer serializer) { + 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_derivation_path_base(self, serializer); + sse_encode_bdk_descriptor_secret_key(self, serializer); } @protected - void sse_encode_box_autoadd_descriptor_base( - DescriptorBase self, SseSerializer serializer) { + void sse_encode_box_autoadd_bdk_mnemonic( + BdkMnemonic self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_descriptor_base(self, serializer); + sse_encode_bdk_mnemonic(self, serializer); } @protected - void sse_encode_box_autoadd_descriptor_error( - DescriptorError self, SseSerializer serializer) { + void sse_encode_box_autoadd_bdk_psbt(BdkPsbt self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_descriptor_error(self, serializer); + 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_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_descriptor_public_key_base( - DescriptorPublicKeyBase self, SseSerializer serializer) { + void sse_encode_box_autoadd_database_config( + DatabaseConfig self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_descriptor_public_key_base(self, serializer); + sse_encode_database_config(self, serializer); } @protected - void sse_encode_box_autoadd_descriptor_secret_key_base( - DescriptorSecretKeyBase self, SseSerializer serializer) { + void sse_encode_box_autoadd_descriptor_error( + DescriptorError self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_descriptor_secret_key_base(self, serializer); + sse_encode_descriptor_error(self, serializer); } @protected @@ -6128,10 +6316,10 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { } @protected - void sse_encode_box_autoadd_mnemonic_base( - MnemonicBase self, SseSerializer serializer) { + void sse_encode_box_autoadd_lock_time( + LockTime self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_mnemonic_base(self, serializer); + sse_encode_lock_time(self, serializer); } @protected @@ -6141,13 +6329,6 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { sse_encode_out_point(self, serializer); } - @protected - void sse_encode_box_autoadd_psbt_base( - PsbtBase self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_psbt_base(self, serializer); - } - @protected void sse_encode_box_autoadd_psbt_sig_hash_type( PsbtSigHashType self, SseSerializer serializer) { @@ -6183,13 +6364,6 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { sse_encode_rpc_sync_params(self, serializer); } - @protected - void sse_encode_box_autoadd_script_buf_base( - ScriptBufBase self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_script_buf_base(self, serializer); - } - @protected void sse_encode_box_autoadd_sign_options( SignOptions self, SseSerializer serializer) { @@ -6211,13 +6385,6 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { sse_encode_sqlite_db_configuration(self, serializer); } - @protected - void sse_encode_box_autoadd_transaction_base( - TransactionBase self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_transaction_base(self, serializer); - } - @protected void sse_encode_box_autoadd_u_32(int self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -6236,13 +6403,6 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { sse_encode_u_8(self, serializer); } - @protected - void sse_encode_box_autoadd_wallet_base( - WalletBase self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_wallet_base(self, serializer); - } - @protected void sse_encode_change_spend_policy( ChangeSpendPolicy self, SseSerializer serializer) { @@ -6299,22 +6459,6 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { } } - @protected - void sse_encode_derivation_path_base( - DerivationPathBase self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_RustOpaque_bitcoinbip32DerivationPath(self.ptr, serializer); - } - - @protected - void sse_encode_descriptor_base( - DescriptorBase self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_RustOpaque_ExtendedDescriptor( - self.extendedDescriptor, serializer); - sse_encode_RustOpaque_keysKeyMap(self.keyMap, serializer); - } - @protected void sse_encode_descriptor_error( DescriptorError self, SseSerializer serializer) { @@ -6355,20 +6499,6 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { } } - @protected - void sse_encode_descriptor_public_key_base( - DescriptorPublicKeyBase self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_RustOpaque_keysDescriptorPublicKey(self.ptr, serializer); - } - - @protected - void sse_encode_descriptor_secret_key_base( - DescriptorSecretKeyBase self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_RustOpaque_keysDescriptorSecretKey(self.ptr, serializer); - } - @protected void sse_encode_electrum_config( ElectrumConfig self, SseSerializer serializer) { @@ -6533,9 +6663,16 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { } @protected - void sse_encode_mnemonic_base(MnemonicBase self, SseSerializer serializer) { + void sse_encode_lock_time(LockTime self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_RustOpaque_keysbip39Mnemonic(self.ptr, serializer); + 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); + } } @protected @@ -6555,35 +6692,57 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { } @protected - void sse_encode_opt_box_autoadd_address_base( - AddressBase? self, SseSerializer serializer) { + 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_address_base(self, serializer); + sse_encode_box_autoadd_bdk_address(self, serializer); } } @protected - void sse_encode_opt_box_autoadd_block_time( - BlockTime? self, SseSerializer serializer) { + 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_block_time(self, serializer); + sse_encode_box_autoadd_bdk_descriptor(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_descriptor_base( - DescriptorBase? self, SseSerializer serializer) { + 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_descriptor_base(self, serializer); + sse_encode_box_autoadd_block_time(self, serializer); } } @@ -6652,17 +6811,6 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { } } - @protected - void sse_encode_opt_box_autoadd_script_buf_base( - ScriptBufBase? 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_script_buf_base(self, serializer); - } - } - @protected void sse_encode_opt_box_autoadd_sign_options( SignOptions? self, SseSerializer serializer) { @@ -6674,17 +6822,6 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { } } - @protected - void sse_encode_opt_box_autoadd_transaction_base( - TransactionBase? 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_transaction_base(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 @@ -6742,12 +6879,6 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { } } - @protected - void sse_encode_psbt_base(PsbtBase self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_RustOpaque_MutexPartiallySignedTransaction(self.ptr, serializer); - } - @protected void sse_encode_psbt_sig_hash_type( PsbtSigHashType self, SseSerializer serializer) { @@ -6768,22 +6899,30 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { } @protected - void sse_encode_record_out_point_input_usize( - (OutPoint, Input, int) self, SseSerializer serializer) { + 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_out_point(self.$1, serializer); - sse_encode_input(self.$2, serializer); - sse_encode_usize(self.$3, serializer); + sse_encode_bdk_address(self.$1, serializer); + sse_encode_u_32(self.$2, serializer); } @protected - void sse_encode_record_psbt_base_transaction_details( - (PsbtBase, TransactionDetails) self, SseSerializer serializer) { + 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_psbt_base(self.$1, serializer); + sse_encode_bdk_psbt(self.$1, serializer); sse_encode_transaction_details(self.$2, serializer); } + @protected + void sse_encode_record_out_point_input_usize( + (OutPoint, Input, int) 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_rpc_config(RpcConfig self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -6807,17 +6946,10 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { @protected void sse_encode_script_amount(ScriptAmount self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_script_buf_base(self.script, serializer); + sse_encode_bdk_script_buf(self.script, serializer); sse_encode_u_64(self.amount, serializer); } - @protected - void sse_encode_script_buf_base( - ScriptBufBase 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_sign_options(SignOptions self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -6846,18 +6978,11 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { sse_encode_String(self.path, serializer); } - @protected - void sse_encode_transaction_base( - TransactionBase self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_String(self.inner, 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_transaction_base(self.transaction, serializer); + 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); @@ -6869,7 +6994,7 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { 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_script_buf_base(self.scriptSig, 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); } @@ -6878,7 +7003,7 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { 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_script_buf_base(self.scriptPubkey, serializer); + sse_encode_bdk_script_buf(self.scriptPubkey, serializer); } @protected @@ -6922,12 +7047,6 @@ class BdkCoreApiImpl extends BdkCoreApiImplPlatform implements BdkCoreApi { sse_encode_i_32(self.index, serializer); } - @protected - void sse_encode_wallet_base(WalletBase self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_RustOpaque_MutexbdkWalletAnyDatabase(self.ptr, serializer); - } - @protected void sse_encode_witness_version( WitnessVersion self, SseSerializer serializer) { diff --git a/lib/src/generated/frb_generated.io.dart b/lib/src/generated/frb_generated.io.dart index 24b359ce..c9af61fe 100644 --- a/lib/src/generated/frb_generated.io.dart +++ b/lib/src/generated/frb_generated.io.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.28. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31. // 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 @@ -16,8 +16,8 @@ import 'dart:ffi' as ffi; import 'frb_generated.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated_io.dart'; -abstract class BdkCoreApiImplPlatform extends BaseApiImpl { - BdkCoreApiImplPlatform({ +abstract class CApiApiImplPlatform extends BaseApiImpl { + CApiApiImplPlatform({ required super.handler, required super.wire, required super.generalizedFrbRustBinding, @@ -101,41 +101,62 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected String dco_decode_String(dynamic raw); - @protected - AddressBase dco_decode_address_base(dynamic raw); - @protected AddressError dco_decode_address_error(dynamic raw); @protected AddressIndex dco_decode_address_index(dynamic raw); - @protected - AddressInfo dco_decode_address_info(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 - BlockTime dco_decode_block_time(dynamic raw); + BdkMnemonic dco_decode_bdk_mnemonic(dynamic raw); @protected - BlockchainBase dco_decode_blockchain_base(dynamic raw); + BdkPsbt dco_decode_bdk_psbt(dynamic raw); @protected - BlockchainConfig dco_decode_blockchain_config(dynamic raw); + BdkScriptBuf dco_decode_bdk_script_buf(dynamic raw); @protected - bool dco_decode_bool(dynamic raw); + 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 - AddressBase dco_decode_box_autoadd_address_base(dynamic raw); + bool dco_decode_bool(dynamic raw); @protected AddressError dco_decode_box_autoadd_address_error(dynamic raw); @@ -144,36 +165,54 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { AddressIndex dco_decode_box_autoadd_address_index(dynamic raw); @protected - BlockTime dco_decode_box_autoadd_block_time(dynamic raw); + BdkAddress dco_decode_box_autoadd_bdk_address(dynamic raw); @protected - BlockchainBase dco_decode_box_autoadd_blockchain_base(dynamic raw); + BdkBlockchain dco_decode_box_autoadd_bdk_blockchain(dynamic raw); @protected - BlockchainConfig dco_decode_box_autoadd_blockchain_config(dynamic raw); + BdkDerivationPath dco_decode_box_autoadd_bdk_derivation_path(dynamic raw); @protected - ConsensusError dco_decode_box_autoadd_consensus_error(dynamic raw); + BdkDescriptor dco_decode_box_autoadd_bdk_descriptor(dynamic raw); @protected - DatabaseConfig dco_decode_box_autoadd_database_config(dynamic raw); + BdkDescriptorPublicKey dco_decode_box_autoadd_bdk_descriptor_public_key( + dynamic raw); @protected - DerivationPathBase dco_decode_box_autoadd_derivation_path_base(dynamic raw); + BdkDescriptorSecretKey dco_decode_box_autoadd_bdk_descriptor_secret_key( + dynamic raw); @protected - DescriptorBase dco_decode_box_autoadd_descriptor_base(dynamic raw); + BdkMnemonic dco_decode_box_autoadd_bdk_mnemonic(dynamic raw); @protected - DescriptorError dco_decode_box_autoadd_descriptor_error(dynamic raw); + BdkPsbt dco_decode_box_autoadd_bdk_psbt(dynamic raw); @protected - DescriptorPublicKeyBase dco_decode_box_autoadd_descriptor_public_key_base( - dynamic raw); + BdkScriptBuf dco_decode_box_autoadd_bdk_script_buf(dynamic raw); @protected - DescriptorSecretKeyBase dco_decode_box_autoadd_descriptor_secret_key_base( - dynamic raw); + 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 + 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); @@ -194,14 +233,11 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { LocalUtxo dco_decode_box_autoadd_local_utxo(dynamic raw); @protected - MnemonicBase dco_decode_box_autoadd_mnemonic_base(dynamic raw); + LockTime dco_decode_box_autoadd_lock_time(dynamic raw); @protected OutPoint dco_decode_box_autoadd_out_point(dynamic raw); - @protected - PsbtBase dco_decode_box_autoadd_psbt_base(dynamic raw); - @protected PsbtSigHashType dco_decode_box_autoadd_psbt_sig_hash_type(dynamic raw); @@ -218,9 +254,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected RpcSyncParams dco_decode_box_autoadd_rpc_sync_params(dynamic raw); - @protected - ScriptBufBase dco_decode_box_autoadd_script_buf_base(dynamic raw); - @protected SignOptions dco_decode_box_autoadd_sign_options(dynamic raw); @@ -231,9 +264,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { SqliteDbConfiguration dco_decode_box_autoadd_sqlite_db_configuration( dynamic raw); - @protected - TransactionBase dco_decode_box_autoadd_transaction_base(dynamic raw); - @protected int dco_decode_box_autoadd_u_32(dynamic raw); @@ -243,9 +273,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected int dco_decode_box_autoadd_u_8(dynamic raw); - @protected - WalletBase dco_decode_box_autoadd_wallet_base(dynamic raw); - @protected ChangeSpendPolicy dco_decode_change_spend_policy(dynamic raw); @@ -255,21 +282,9 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected DatabaseConfig dco_decode_database_config(dynamic raw); - @protected - DerivationPathBase dco_decode_derivation_path_base(dynamic raw); - - @protected - DescriptorBase dco_decode_descriptor_base(dynamic raw); - @protected DescriptorError dco_decode_descriptor_error(dynamic raw); - @protected - DescriptorPublicKeyBase dco_decode_descriptor_public_key_base(dynamic raw); - - @protected - DescriptorSecretKeyBase dco_decode_descriptor_secret_key_base(dynamic raw); - @protected ElectrumConfig dco_decode_electrum_config(dynamic raw); @@ -325,7 +340,7 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { LocalUtxo dco_decode_local_utxo(dynamic raw); @protected - MnemonicBase dco_decode_mnemonic_base(dynamic raw); + LockTime dco_decode_lock_time(dynamic raw); @protected Network dco_decode_network(dynamic raw); @@ -334,13 +349,19 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { String? dco_decode_opt_String(dynamic raw); @protected - AddressBase? dco_decode_opt_box_autoadd_address_base(dynamic raw); + BdkAddress? dco_decode_opt_box_autoadd_bdk_address(dynamic raw); @protected - BlockTime? dco_decode_opt_box_autoadd_block_time(dynamic raw); + BdkDescriptor? dco_decode_opt_box_autoadd_bdk_descriptor(dynamic raw); @protected - DescriptorBase? dco_decode_opt_box_autoadd_descriptor_base(dynamic raw); + 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 double? dco_decode_opt_box_autoadd_f_32(dynamic raw); @@ -361,15 +382,9 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected RpcSyncParams? dco_decode_opt_box_autoadd_rpc_sync_params(dynamic raw); - @protected - ScriptBufBase? dco_decode_opt_box_autoadd_script_buf_base(dynamic raw); - @protected SignOptions? dco_decode_opt_box_autoadd_sign_options(dynamic raw); - @protected - TransactionBase? dco_decode_opt_box_autoadd_transaction_base(dynamic raw); - @protected int? dco_decode_opt_box_autoadd_u_32(dynamic raw); @@ -385,9 +400,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected Payload dco_decode_payload(dynamic raw); - @protected - PsbtBase dco_decode_psbt_base(dynamic raw); - @protected PsbtSigHashType dco_decode_psbt_sig_hash_type(dynamic raw); @@ -395,11 +407,14 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { RbfValue dco_decode_rbf_value(dynamic raw); @protected - (OutPoint, Input, int) dco_decode_record_out_point_input_usize(dynamic raw); + (BdkAddress, int) dco_decode_record_bdk_address_u_32(dynamic raw); @protected - (PsbtBase, TransactionDetails) - dco_decode_record_psbt_base_transaction_details(dynamic raw); + (BdkPsbt, TransactionDetails) dco_decode_record_bdk_psbt_transaction_details( + dynamic raw); + + @protected + (OutPoint, Input, int) dco_decode_record_out_point_input_usize(dynamic raw); @protected RpcConfig dco_decode_rpc_config(dynamic raw); @@ -410,9 +425,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected ScriptAmount dco_decode_script_amount(dynamic raw); - @protected - ScriptBufBase dco_decode_script_buf_base(dynamic raw); - @protected SignOptions dco_decode_sign_options(dynamic raw); @@ -422,9 +434,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected SqliteDbConfiguration dco_decode_sqlite_db_configuration(dynamic raw); - @protected - TransactionBase dco_decode_transaction_base(dynamic raw); - @protected TransactionDetails dco_decode_transaction_details(dynamic raw); @@ -455,9 +464,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected Variant dco_decode_variant(dynamic raw); - @protected - WalletBase dco_decode_wallet_base(dynamic raw); - @protected WitnessVersion dco_decode_witness_version(dynamic raw); @@ -507,41 +513,65 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected String sse_decode_String(SseDeserializer deserializer); - @protected - AddressBase sse_decode_address_base(SseDeserializer deserializer); - @protected AddressError sse_decode_address_error(SseDeserializer deserializer); @protected AddressIndex sse_decode_address_index(SseDeserializer deserializer); - @protected - AddressInfo sse_decode_address_info(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 - BlockTime sse_decode_block_time(SseDeserializer deserializer); + BdkMnemonic sse_decode_bdk_mnemonic(SseDeserializer deserializer); @protected - BlockchainBase sse_decode_blockchain_base(SseDeserializer deserializer); + BdkPsbt sse_decode_bdk_psbt(SseDeserializer deserializer); @protected - BlockchainConfig sse_decode_blockchain_config(SseDeserializer deserializer); + BdkScriptBuf sse_decode_bdk_script_buf(SseDeserializer deserializer); @protected - bool sse_decode_bool(SseDeserializer deserializer); + 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 - AddressBase sse_decode_box_autoadd_address_base(SseDeserializer deserializer); + bool sse_decode_bool(SseDeserializer deserializer); @protected AddressError sse_decode_box_autoadd_address_error( @@ -552,42 +582,62 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { SseDeserializer deserializer); @protected - BlockTime sse_decode_box_autoadd_block_time(SseDeserializer deserializer); + BdkAddress sse_decode_box_autoadd_bdk_address(SseDeserializer deserializer); @protected - BlockchainBase sse_decode_box_autoadd_blockchain_base( + BdkBlockchain sse_decode_box_autoadd_bdk_blockchain( SseDeserializer deserializer); @protected - BlockchainConfig sse_decode_box_autoadd_blockchain_config( + BdkDerivationPath sse_decode_box_autoadd_bdk_derivation_path( SseDeserializer deserializer); @protected - ConsensusError sse_decode_box_autoadd_consensus_error( + BdkDescriptor sse_decode_box_autoadd_bdk_descriptor( SseDeserializer deserializer); @protected - DatabaseConfig sse_decode_box_autoadd_database_config( + 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 + BdkPsbt sse_decode_box_autoadd_bdk_psbt(SseDeserializer deserializer); + + @protected + BdkScriptBuf sse_decode_box_autoadd_bdk_script_buf( SseDeserializer deserializer); @protected - DerivationPathBase sse_decode_box_autoadd_derivation_path_base( + BdkTransaction sse_decode_box_autoadd_bdk_transaction( SseDeserializer deserializer); @protected - DescriptorBase sse_decode_box_autoadd_descriptor_base( + 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 - DescriptorError sse_decode_box_autoadd_descriptor_error( + ConsensusError sse_decode_box_autoadd_consensus_error( SseDeserializer deserializer); @protected - DescriptorPublicKeyBase sse_decode_box_autoadd_descriptor_public_key_base( + DatabaseConfig sse_decode_box_autoadd_database_config( SseDeserializer deserializer); @protected - DescriptorSecretKeyBase sse_decode_box_autoadd_descriptor_secret_key_base( + DescriptorError sse_decode_box_autoadd_descriptor_error( SseDeserializer deserializer); @protected @@ -611,15 +661,11 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { LocalUtxo sse_decode_box_autoadd_local_utxo(SseDeserializer deserializer); @protected - MnemonicBase sse_decode_box_autoadd_mnemonic_base( - SseDeserializer deserializer); + LockTime sse_decode_box_autoadd_lock_time(SseDeserializer deserializer); @protected OutPoint sse_decode_box_autoadd_out_point(SseDeserializer deserializer); - @protected - PsbtBase sse_decode_box_autoadd_psbt_base(SseDeserializer deserializer); - @protected PsbtSigHashType sse_decode_box_autoadd_psbt_sig_hash_type( SseDeserializer deserializer); @@ -638,10 +684,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { RpcSyncParams sse_decode_box_autoadd_rpc_sync_params( SseDeserializer deserializer); - @protected - ScriptBufBase sse_decode_box_autoadd_script_buf_base( - SseDeserializer deserializer); - @protected SignOptions sse_decode_box_autoadd_sign_options(SseDeserializer deserializer); @@ -653,10 +695,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { SqliteDbConfiguration sse_decode_box_autoadd_sqlite_db_configuration( SseDeserializer deserializer); - @protected - TransactionBase sse_decode_box_autoadd_transaction_base( - SseDeserializer deserializer); - @protected int sse_decode_box_autoadd_u_32(SseDeserializer deserializer); @@ -666,9 +704,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected int sse_decode_box_autoadd_u_8(SseDeserializer deserializer); - @protected - WalletBase sse_decode_box_autoadd_wallet_base(SseDeserializer deserializer); - @protected ChangeSpendPolicy sse_decode_change_spend_policy( SseDeserializer deserializer); @@ -679,24 +714,9 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected DatabaseConfig sse_decode_database_config(SseDeserializer deserializer); - @protected - DerivationPathBase sse_decode_derivation_path_base( - SseDeserializer deserializer); - - @protected - DescriptorBase sse_decode_descriptor_base(SseDeserializer deserializer); - @protected DescriptorError sse_decode_descriptor_error(SseDeserializer deserializer); - @protected - DescriptorPublicKeyBase sse_decode_descriptor_public_key_base( - SseDeserializer deserializer); - - @protected - DescriptorSecretKeyBase sse_decode_descriptor_secret_key_base( - SseDeserializer deserializer); - @protected ElectrumConfig sse_decode_electrum_config(SseDeserializer deserializer); @@ -755,7 +775,7 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { LocalUtxo sse_decode_local_utxo(SseDeserializer deserializer); @protected - MnemonicBase sse_decode_mnemonic_base(SseDeserializer deserializer); + LockTime sse_decode_lock_time(SseDeserializer deserializer); @protected Network sse_decode_network(SseDeserializer deserializer); @@ -764,15 +784,23 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { String? sse_decode_opt_String(SseDeserializer deserializer); @protected - AddressBase? sse_decode_opt_box_autoadd_address_base( + BdkAddress? sse_decode_opt_box_autoadd_bdk_address( SseDeserializer deserializer); @protected - BlockTime? sse_decode_opt_box_autoadd_block_time( + BdkDescriptor? sse_decode_opt_box_autoadd_bdk_descriptor( SseDeserializer deserializer); @protected - DescriptorBase? sse_decode_opt_box_autoadd_descriptor_base( + 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 @@ -797,18 +825,10 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { RpcSyncParams? sse_decode_opt_box_autoadd_rpc_sync_params( SseDeserializer deserializer); - @protected - ScriptBufBase? sse_decode_opt_box_autoadd_script_buf_base( - SseDeserializer deserializer); - @protected SignOptions? sse_decode_opt_box_autoadd_sign_options( SseDeserializer deserializer); - @protected - TransactionBase? sse_decode_opt_box_autoadd_transaction_base( - SseDeserializer deserializer); - @protected int? sse_decode_opt_box_autoadd_u_32(SseDeserializer deserializer); @@ -824,9 +844,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected Payload sse_decode_payload(SseDeserializer deserializer); - @protected - PsbtBase sse_decode_psbt_base(SseDeserializer deserializer); - @protected PsbtSigHashType sse_decode_psbt_sig_hash_type(SseDeserializer deserializer); @@ -834,13 +851,16 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { RbfValue sse_decode_rbf_value(SseDeserializer deserializer); @protected - (OutPoint, Input, int) sse_decode_record_out_point_input_usize( + (BdkAddress, int) sse_decode_record_bdk_address_u_32( SseDeserializer deserializer); @protected - (PsbtBase, TransactionDetails) - sse_decode_record_psbt_base_transaction_details( - SseDeserializer deserializer); + (BdkPsbt, TransactionDetails) sse_decode_record_bdk_psbt_transaction_details( + SseDeserializer deserializer); + + @protected + (OutPoint, Input, int) sse_decode_record_out_point_input_usize( + SseDeserializer deserializer); @protected RpcConfig sse_decode_rpc_config(SseDeserializer deserializer); @@ -851,9 +871,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected ScriptAmount sse_decode_script_amount(SseDeserializer deserializer); - @protected - ScriptBufBase sse_decode_script_buf_base(SseDeserializer deserializer); - @protected SignOptions sse_decode_sign_options(SseDeserializer deserializer); @@ -865,9 +882,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { SqliteDbConfiguration sse_decode_sqlite_db_configuration( SseDeserializer deserializer); - @protected - TransactionBase sse_decode_transaction_base(SseDeserializer deserializer); - @protected TransactionDetails sse_decode_transaction_details( SseDeserializer deserializer); @@ -899,9 +913,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected Variant sse_decode_variant(SseDeserializer deserializer); - @protected - WalletBase sse_decode_wallet_base(SseDeserializer deserializer); - @protected WitnessVersion sse_decode_witness_version(SseDeserializer deserializer); @@ -914,15 +925,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { return cst_encode_list_prim_u_8_strict(utf8.encoder.convert(raw)); } - @protected - ffi.Pointer cst_encode_box_autoadd_address_base( - AddressBase raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_address_base(); - cst_api_fill_to_wire_address_base(raw, ptr.ref); - return ptr; - } - @protected ffi.Pointer cst_encode_box_autoadd_address_error( AddressError raw) { @@ -942,94 +944,147 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { } @protected - ffi.Pointer cst_encode_box_autoadd_block_time( - BlockTime raw) { + 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_block_time(); - cst_api_fill_to_wire_block_time(raw, ptr.ref); + 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_blockchain_base( - BlockchainBase raw) { + 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_blockchain_base(); - cst_api_fill_to_wire_blockchain_base(raw, ptr.ref); + 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_blockchain_config(BlockchainConfig raw) { + 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_blockchain_config(); - cst_api_fill_to_wire_blockchain_config(raw, ptr.ref); + 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_consensus_error( - ConsensusError raw) { + 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_consensus_error(); - cst_api_fill_to_wire_consensus_error(raw, ptr.ref); + 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_database_config( - DatabaseConfig raw) { + 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_database_config(); - cst_api_fill_to_wire_database_config(raw, ptr.ref); + 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_derivation_path_base(DerivationPathBase raw) { + 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_derivation_path_base(); - cst_api_fill_to_wire_derivation_path_base(raw, ptr.ref); + 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_descriptor_base( - DescriptorBase raw) { + 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_descriptor_base(); - cst_api_fill_to_wire_descriptor_base(raw, ptr.ref); + 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_descriptor_error(DescriptorError raw) { + 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_descriptor_error(); - cst_api_fill_to_wire_descriptor_error(raw, ptr.ref); + 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_descriptor_public_key_base( - DescriptorPublicKeyBase raw) { + 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_descriptor_public_key_base(); - cst_api_fill_to_wire_descriptor_public_key_base(raw, ptr.ref); + 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_descriptor_secret_key_base( - DescriptorSecretKeyBase raw) { + 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_descriptor_secret_key_base(); - cst_api_fill_to_wire_descriptor_secret_key_base(raw, ptr.ref); + 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; } @@ -1084,11 +1139,11 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { } @protected - ffi.Pointer cst_encode_box_autoadd_mnemonic_base( - MnemonicBase raw) { + 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_mnemonic_base(); - cst_api_fill_to_wire_mnemonic_base(raw, ptr.ref); + final ptr = wire.cst_new_box_autoadd_lock_time(); + cst_api_fill_to_wire_lock_time(raw, ptr.ref); return ptr; } @@ -1101,15 +1156,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { return ptr; } - @protected - ffi.Pointer cst_encode_box_autoadd_psbt_base( - PsbtBase raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_psbt_base(); - cst_api_fill_to_wire_psbt_base(raw, ptr.ref); - return ptr; - } - @protected ffi.Pointer cst_encode_box_autoadd_psbt_sig_hash_type(PsbtSigHashType raw) { @@ -1156,15 +1202,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { return ptr; } - @protected - ffi.Pointer cst_encode_box_autoadd_script_buf_base( - ScriptBufBase raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_script_buf_base(); - cst_api_fill_to_wire_script_buf_base(raw, ptr.ref); - return ptr; - } - @protected ffi.Pointer cst_encode_box_autoadd_sign_options( SignOptions raw) { @@ -1193,15 +1230,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { return ptr; } - @protected - ffi.Pointer - cst_encode_box_autoadd_transaction_base(TransactionBase raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_transaction_base(); - cst_api_fill_to_wire_transaction_base(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 @@ -1220,15 +1248,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { return wire.cst_new_box_autoadd_u_8(cst_encode_u_8(raw)); } - @protected - ffi.Pointer cst_encode_box_autoadd_wallet_base( - WalletBase raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_wallet_base(); - cst_api_fill_to_wire_wallet_base(raw, ptr.ref); - return ptr; - } - @protected ffi.Pointer cst_encode_list_list_prim_u_8_strict(List raw) { @@ -1330,26 +1349,44 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { } @protected - ffi.Pointer cst_encode_opt_box_autoadd_address_base( - AddressBase? raw) { + 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_address_base(raw); + return raw == null ? ffi.nullptr : cst_encode_box_autoadd_bdk_address(raw); } @protected - ffi.Pointer cst_encode_opt_box_autoadd_block_time( - BlockTime? raw) { + 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_block_time(raw); + return raw == null + ? ffi.nullptr + : cst_encode_box_autoadd_bdk_descriptor(raw); } @protected - ffi.Pointer - cst_encode_opt_box_autoadd_descriptor_base(DescriptorBase? raw) { + 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_descriptor_base(raw); + : 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 @@ -1400,15 +1437,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { : cst_encode_box_autoadd_rpc_sync_params(raw); } - @protected - ffi.Pointer - cst_encode_opt_box_autoadd_script_buf_base(ScriptBufBase? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null - ? ffi.nullptr - : cst_encode_box_autoadd_script_buf_base(raw); - } - @protected ffi.Pointer cst_encode_opt_box_autoadd_sign_options( SignOptions? raw) { @@ -1416,15 +1444,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { return raw == null ? ffi.nullptr : cst_encode_box_autoadd_sign_options(raw); } - @protected - ffi.Pointer - cst_encode_opt_box_autoadd_transaction_base(TransactionBase? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null - ? ffi.nullptr - : cst_encode_box_autoadd_transaction_base(raw); - } - @protected ffi.Pointer cst_encode_opt_box_autoadd_u_32(int? raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -1458,12 +1477,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { return ans; } - @protected - void cst_api_fill_to_wire_address_base( - AddressBase apiObj, wire_cst_address_base wireObj) { - wireObj.ptr = cst_encode_RustOpaque_bdkbitcoinAddress(apiObj.ptr); - } - @protected void cst_api_fill_to_wire_address_error( AddressError apiObj, wire_cst_address_error wireObj) { @@ -1574,13 +1587,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { } } - @protected - void cst_api_fill_to_wire_address_info( - AddressInfo apiObj, wire_cst_address_info wireObj) { - wireObj.index = cst_encode_u_32(apiObj.index); - wireObj.address = cst_encode_String(apiObj.address); - } - @protected void cst_api_fill_to_wire_auth(Auth apiObj, wire_cst_auth wireObj) { if (apiObj is Auth_None) { @@ -1604,13 +1610,53 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { } @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); + 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_AnyBlockchain(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_bitcoinbip32DerivationPath(apiObj.ptr); + } + + @protected + void cst_api_fill_to_wire_bdk_descriptor( + BdkDescriptor apiObj, wire_cst_bdk_descriptor wireObj) { + wireObj.extended_descriptor = + cst_encode_RustOpaque_ExtendedDescriptor(apiObj.extendedDescriptor); + wireObj.key_map = cst_encode_RustOpaque_keysKeyMap(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_keysDescriptorPublicKey(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_keysDescriptorSecretKey(apiObj.ptr); } @protected @@ -1858,6 +1904,55 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { wireObj.kind.Rusqlite.field0 = pre_field0; return; } + if (apiObj is BdkError_InvalidInput) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 43; + wireObj.kind.InvalidInput.field0 = pre_field0; + return; + } + if (apiObj is BdkError_InvalidLockTime) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 44; + wireObj.kind.InvalidLockTime.field0 = pre_field0; + return; + } + if (apiObj is BdkError_InvalidTransaction) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 45; + 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_keysbip39Mnemonic(apiObj.ptr); + } + + @protected + void cst_api_fill_to_wire_bdk_psbt( + BdkPsbt apiObj, wire_cst_bdk_psbt wireObj) { + wireObj.ptr = + cst_encode_RustOpaque_MutexPartiallySignedTransaction(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.inner = cst_encode_String(apiObj.inner); + } + + @protected + void cst_api_fill_to_wire_bdk_wallet( + BdkWallet apiObj, wire_cst_bdk_wallet wireObj) { + wireObj.ptr = cst_encode_RustOpaque_MutexbdkWalletAnyDatabase(apiObj.ptr); } @protected @@ -1867,12 +1962,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { wireObj.timestamp = cst_encode_u_64(apiObj.timestamp); } - @protected - void cst_api_fill_to_wire_blockchain_base( - BlockchainBase apiObj, wire_cst_blockchain_base wireObj) { - wireObj.ptr = cst_encode_RustOpaque_AnyBlockchain(apiObj.ptr); - } - @protected void cst_api_fill_to_wire_blockchain_config( BlockchainConfig apiObj, wire_cst_blockchain_config wireObj) { @@ -1896,12 +1985,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { } } - @protected - void cst_api_fill_to_wire_box_autoadd_address_base( - AddressBase apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_address_base(apiObj, wireObj.ref); - } - @protected void cst_api_fill_to_wire_box_autoadd_address_error( AddressError apiObj, ffi.Pointer wireObj) { @@ -1915,15 +1998,78 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { } @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); + 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_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_blockchain_base( - BlockchainBase apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_blockchain_base(apiObj, wireObj.ref); + 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 @@ -1945,39 +2091,12 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { cst_api_fill_to_wire_database_config(apiObj, wireObj.ref); } - @protected - void cst_api_fill_to_wire_box_autoadd_derivation_path_base( - DerivationPathBase apiObj, - ffi.Pointer wireObj) { - cst_api_fill_to_wire_derivation_path_base(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_descriptor_base( - DescriptorBase apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_descriptor_base(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_descriptor_public_key_base( - DescriptorPublicKeyBase apiObj, - ffi.Pointer wireObj) { - cst_api_fill_to_wire_descriptor_public_key_base(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_descriptor_secret_key_base( - DescriptorSecretKeyBase apiObj, - ffi.Pointer wireObj) { - cst_api_fill_to_wire_descriptor_secret_key_base(apiObj, wireObj.ref); - } - @protected void cst_api_fill_to_wire_box_autoadd_electrum_config( ElectrumConfig apiObj, ffi.Pointer wireObj) { @@ -2009,9 +2128,9 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { } @protected - void cst_api_fill_to_wire_box_autoadd_mnemonic_base( - MnemonicBase apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_mnemonic_base(apiObj, wireObj.ref); + 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 @@ -2020,12 +2139,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { cst_api_fill_to_wire_out_point(apiObj, wireObj.ref); } - @protected - void cst_api_fill_to_wire_box_autoadd_psbt_base( - PsbtBase apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_psbt_base(apiObj, wireObj.ref); - } - @protected void cst_api_fill_to_wire_box_autoadd_psbt_sig_hash_type( PsbtSigHashType apiObj, @@ -2058,12 +2171,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { cst_api_fill_to_wire_rpc_sync_params(apiObj, wireObj.ref); } - @protected - void cst_api_fill_to_wire_box_autoadd_script_buf_base( - ScriptBufBase apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_script_buf_base(apiObj, wireObj.ref); - } - @protected void cst_api_fill_to_wire_box_autoadd_sign_options( SignOptions apiObj, ffi.Pointer wireObj) { @@ -2084,18 +2191,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { cst_api_fill_to_wire_sqlite_db_configuration(apiObj, wireObj.ref); } - @protected - void cst_api_fill_to_wire_box_autoadd_transaction_base( - TransactionBase apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_transaction_base(apiObj, wireObj.ref); - } - - @protected - void cst_api_fill_to_wire_box_autoadd_wallet_base( - WalletBase apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_wallet_base(apiObj, wireObj.ref); - } - @protected void cst_api_fill_to_wire_consensus_error( ConsensusError apiObj, wire_cst_consensus_error wireObj) { @@ -2162,20 +2257,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { } } - @protected - void cst_api_fill_to_wire_derivation_path_base( - DerivationPathBase apiObj, wire_cst_derivation_path_base wireObj) { - wireObj.ptr = cst_encode_RustOpaque_bitcoinbip32DerivationPath(apiObj.ptr); - } - - @protected - void cst_api_fill_to_wire_descriptor_base( - DescriptorBase apiObj, wire_cst_descriptor_base wireObj) { - wireObj.extended_descriptor = - cst_encode_RustOpaque_ExtendedDescriptor(apiObj.extendedDescriptor); - wireObj.key_map = cst_encode_RustOpaque_keysKeyMap(apiObj.keyMap); - } - @protected void cst_api_fill_to_wire_descriptor_error( DescriptorError apiObj, wire_cst_descriptor_error wireObj) { @@ -2245,20 +2326,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { } } - @protected - void cst_api_fill_to_wire_descriptor_public_key_base( - DescriptorPublicKeyBase apiObj, - wire_cst_descriptor_public_key_base wireObj) { - wireObj.ptr = cst_encode_RustOpaque_keysDescriptorPublicKey(apiObj.ptr); - } - - @protected - void cst_api_fill_to_wire_descriptor_secret_key_base( - DescriptorSecretKeyBase apiObj, - wire_cst_descriptor_secret_key_base wireObj) { - wireObj.ptr = cst_encode_RustOpaque_keysDescriptorSecretKey(apiObj.ptr); - } - @protected void cst_api_fill_to_wire_electrum_config( ElectrumConfig apiObj, wire_cst_electrum_config wireObj) { @@ -2326,9 +2393,20 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { } @protected - void cst_api_fill_to_wire_mnemonic_base( - MnemonicBase apiObj, wire_cst_mnemonic_base wireObj) { - wireObj.ptr = cst_encode_RustOpaque_keysbip39Mnemonic(apiObj.ptr); + 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 @@ -2362,13 +2440,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { } } - @protected - void cst_api_fill_to_wire_psbt_base( - PsbtBase apiObj, wire_cst_psbt_base wireObj) { - wireObj.ptr = - cst_encode_RustOpaque_MutexPartiallySignedTransaction(apiObj.ptr); - } - @protected void cst_api_fill_to_wire_psbt_sig_hash_type( PsbtSigHashType apiObj, wire_cst_psbt_sig_hash_type wireObj) { @@ -2390,6 +2461,21 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { } } + @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_out_point_input_usize( (OutPoint, Input, int) apiObj, @@ -2399,14 +2485,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { wireObj.field2 = cst_encode_usize(apiObj.$3); } - @protected - void cst_api_fill_to_wire_record_psbt_base_transaction_details( - (PsbtBase, TransactionDetails) apiObj, - wire_cst_record_psbt_base_transaction_details wireObj) { - cst_api_fill_to_wire_psbt_base(apiObj.$1, wireObj.field0); - cst_api_fill_to_wire_transaction_details(apiObj.$2, wireObj.field1); - } - @protected void cst_api_fill_to_wire_rpc_config( RpcConfig apiObj, wire_cst_rpc_config wireObj) { @@ -2430,16 +2508,10 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected void cst_api_fill_to_wire_script_amount( ScriptAmount apiObj, wire_cst_script_amount wireObj) { - cst_api_fill_to_wire_script_buf_base(apiObj.script, wireObj.script); + 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_script_buf_base( - ScriptBufBase apiObj, wire_cst_script_buf_base wireObj) { - wireObj.bytes = cst_encode_list_prim_u_8_strict(apiObj.bytes); - } - @protected void cst_api_fill_to_wire_sign_options( SignOptions apiObj, wire_cst_sign_options wireObj) { @@ -2468,17 +2540,11 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { wireObj.path = cst_encode_String(apiObj.path); } - @protected - void cst_api_fill_to_wire_transaction_base( - TransactionBase apiObj, wire_cst_transaction_base wireObj) { - wireObj.inner = cst_encode_String(apiObj.inner); - } - @protected void cst_api_fill_to_wire_transaction_details( TransactionDetails apiObj, wire_cst_transaction_details wireObj) { wireObj.transaction = - cst_encode_opt_box_autoadd_transaction_base(apiObj.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); @@ -2491,7 +2557,7 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { 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_script_buf_base(apiObj.scriptSig, wireObj.script_sig); + 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); } @@ -2499,16 +2565,10 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @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_script_buf_base( + cst_api_fill_to_wire_bdk_script_buf( apiObj.scriptPubkey, wireObj.script_pubkey); } - @protected - void cst_api_fill_to_wire_wallet_base( - WalletBase apiObj, wire_cst_wallet_base wireObj) { - wireObj.ptr = cst_encode_RustOpaque_MutexbdkWalletAnyDatabase(apiObj.ptr); - } - @protected int cst_encode_RustOpaque_AnyBlockchain(AnyBlockchain raw); @@ -2626,33 +2686,60 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected void sse_encode_String(String self, SseSerializer serializer); - @protected - void sse_encode_address_base(AddressBase 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_address_info(AddressInfo 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_block_time(BlockTime self, SseSerializer serializer); + void sse_encode_bdk_mnemonic(BdkMnemonic 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_blockchain_base( - BlockchainBase self, SseSerializer serializer); + void sse_encode_block_time(BlockTime self, SseSerializer serializer); @protected void sse_encode_blockchain_config( @@ -2661,10 +2748,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected void sse_encode_bool(bool self, SseSerializer serializer); - @protected - void sse_encode_box_autoadd_address_base( - AddressBase self, SseSerializer serializer); - @protected void sse_encode_box_autoadd_address_error( AddressError self, SseSerializer serializer); @@ -2674,44 +2757,67 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { AddressIndex self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_block_time( - BlockTime self, SseSerializer serializer); + void sse_encode_box_autoadd_bdk_address( + BdkAddress self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_blockchain_base( - BlockchainBase self, SseSerializer serializer); + void sse_encode_box_autoadd_bdk_blockchain( + BdkBlockchain self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_blockchain_config( - BlockchainConfig self, SseSerializer serializer); + void sse_encode_box_autoadd_bdk_derivation_path( + BdkDerivationPath self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_consensus_error( - ConsensusError self, SseSerializer serializer); + void sse_encode_box_autoadd_bdk_descriptor( + BdkDescriptor self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_database_config( - DatabaseConfig self, SseSerializer serializer); + void sse_encode_box_autoadd_bdk_descriptor_public_key( + BdkDescriptorPublicKey self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_derivation_path_base( - DerivationPathBase self, SseSerializer serializer); + void sse_encode_box_autoadd_bdk_descriptor_secret_key( + BdkDescriptorSecretKey self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_descriptor_base( - DescriptorBase self, SseSerializer serializer); + void sse_encode_box_autoadd_bdk_mnemonic( + BdkMnemonic self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_descriptor_error( - DescriptorError self, SseSerializer serializer); + 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_descriptor_public_key_base( - DescriptorPublicKeyBase self, SseSerializer serializer); + 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_secret_key_base( - DescriptorSecretKeyBase self, SseSerializer serializer); + void sse_encode_box_autoadd_descriptor_error( + DescriptorError self, SseSerializer serializer); @protected void sse_encode_box_autoadd_electrum_config( @@ -2736,17 +2842,13 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { LocalUtxo self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_mnemonic_base( - MnemonicBase self, SseSerializer serializer); + 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_psbt_base( - PsbtBase self, SseSerializer serializer); - @protected void sse_encode_box_autoadd_psbt_sig_hash_type( PsbtSigHashType self, SseSerializer serializer); @@ -2767,10 +2869,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { void sse_encode_box_autoadd_rpc_sync_params( RpcSyncParams self, SseSerializer serializer); - @protected - void sse_encode_box_autoadd_script_buf_base( - ScriptBufBase self, SseSerializer serializer); - @protected void sse_encode_box_autoadd_sign_options( SignOptions self, SseSerializer serializer); @@ -2783,10 +2881,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { void sse_encode_box_autoadd_sqlite_db_configuration( SqliteDbConfiguration self, SseSerializer serializer); - @protected - void sse_encode_box_autoadd_transaction_base( - TransactionBase self, SseSerializer serializer); - @protected void sse_encode_box_autoadd_u_32(int self, SseSerializer serializer); @@ -2796,10 +2890,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected void sse_encode_box_autoadd_u_8(int self, SseSerializer serializer); - @protected - void sse_encode_box_autoadd_wallet_base( - WalletBase self, SseSerializer serializer); - @protected void sse_encode_change_spend_policy( ChangeSpendPolicy self, SseSerializer serializer); @@ -2812,26 +2902,10 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { void sse_encode_database_config( DatabaseConfig self, SseSerializer serializer); - @protected - void sse_encode_derivation_path_base( - DerivationPathBase self, SseSerializer serializer); - - @protected - void sse_encode_descriptor_base( - DescriptorBase self, SseSerializer serializer); - @protected void sse_encode_descriptor_error( DescriptorError self, SseSerializer serializer); - @protected - void sse_encode_descriptor_public_key_base( - DescriptorPublicKeyBase self, SseSerializer serializer); - - @protected - void sse_encode_descriptor_secret_key_base( - DescriptorSecretKeyBase self, SseSerializer serializer); - @protected void sse_encode_electrum_config( ElectrumConfig self, SseSerializer serializer); @@ -2893,26 +2967,34 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { void sse_encode_local_utxo(LocalUtxo self, SseSerializer serializer); @protected - void sse_encode_mnemonic_base(MnemonicBase self, SseSerializer serializer); + void sse_encode_lock_time(LockTime self, SseSerializer serializer); + + @protected + void sse_encode_network(Network 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_network(Network self, SseSerializer serializer); + void sse_encode_opt_box_autoadd_bdk_descriptor( + BdkDescriptor? self, SseSerializer serializer); @protected - void sse_encode_opt_String(String? self, SseSerializer serializer); + void sse_encode_opt_box_autoadd_bdk_script_buf( + BdkScriptBuf? self, SseSerializer serializer); @protected - void sse_encode_opt_box_autoadd_address_base( - AddressBase? self, SseSerializer serializer); + 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_descriptor_base( - DescriptorBase? self, SseSerializer serializer); - @protected void sse_encode_opt_box_autoadd_f_32(double? self, SseSerializer serializer); @@ -2936,18 +3018,10 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { void sse_encode_opt_box_autoadd_rpc_sync_params( RpcSyncParams? self, SseSerializer serializer); - @protected - void sse_encode_opt_box_autoadd_script_buf_base( - ScriptBufBase? self, SseSerializer serializer); - @protected void sse_encode_opt_box_autoadd_sign_options( SignOptions? self, SseSerializer serializer); - @protected - void sse_encode_opt_box_autoadd_transaction_base( - TransactionBase? self, SseSerializer serializer); - @protected void sse_encode_opt_box_autoadd_u_32(int? self, SseSerializer serializer); @@ -2963,9 +3037,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected void sse_encode_payload(Payload self, SseSerializer serializer); - @protected - void sse_encode_psbt_base(PsbtBase self, SseSerializer serializer); - @protected void sse_encode_psbt_sig_hash_type( PsbtSigHashType self, SseSerializer serializer); @@ -2974,12 +3045,16 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { void sse_encode_rbf_value(RbfValue self, SseSerializer serializer); @protected - void sse_encode_record_out_point_input_usize( - (OutPoint, Input, int) self, SseSerializer serializer); + void sse_encode_record_bdk_address_u_32( + (BdkAddress, int) self, SseSerializer serializer); @protected - void sse_encode_record_psbt_base_transaction_details( - (PsbtBase, TransactionDetails) self, SseSerializer serializer); + void sse_encode_record_bdk_psbt_transaction_details( + (BdkPsbt, TransactionDetails) self, SseSerializer serializer); + + @protected + void sse_encode_record_out_point_input_usize( + (OutPoint, Input, int) self, SseSerializer serializer); @protected void sse_encode_rpc_config(RpcConfig self, SseSerializer serializer); @@ -2990,9 +3065,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected void sse_encode_script_amount(ScriptAmount self, SseSerializer serializer); - @protected - void sse_encode_script_buf_base(ScriptBufBase self, SseSerializer serializer); - @protected void sse_encode_sign_options(SignOptions self, SseSerializer serializer); @@ -3004,10 +3076,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { void sse_encode_sqlite_db_configuration( SqliteDbConfiguration self, SseSerializer serializer); - @protected - void sse_encode_transaction_base( - TransactionBase self, SseSerializer serializer); - @protected void sse_encode_transaction_details( TransactionDetails self, SseSerializer serializer); @@ -3039,9 +3107,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected void sse_encode_variant(Variant self, SseSerializer serializer); - @protected - void sse_encode_wallet_base(WalletBase self, SseSerializer serializer); - @protected void sse_encode_witness_version( WitnessVersion self, SseSerializer serializer); @@ -3059,20 +3124,19 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { // ignore_for_file: type=lint /// generated by flutter_rust_bridge -class BdkCoreWire implements BaseWire { - factory BdkCoreWire.fromExternalLibrary(ExternalLibrary lib) => - BdkCoreWire(lib.ffiDynamicLibrary); +class CApiWire implements BaseWire { + factory CApiWire.fromExternalLibrary(ExternalLibrary lib) => + CApiWire(lib.ffiDynamicLibrary); /// Holds the symbol lookup function. final ffi.Pointer Function(String symbolName) _lookup; /// The symbols are looked up in [dynamicLibrary]. - BdkCoreWire(ffi.DynamicLibrary dynamicLibrary) - : _lookup = dynamicLibrary.lookup; + CApiWire(ffi.DynamicLibrary dynamicLibrary) : _lookup = dynamicLibrary.lookup; /// The symbols are looked up with [lookup]. - BdkCoreWire.fromLookup( + CApiWire.fromLookup( ffi.Pointer Function(String symbolName) lookup) : _lookup = lookup; @@ -3091,193 +3155,191 @@ class BdkCoreWire implements BaseWire { late final _store_dart_post_cobject = _store_dart_post_cobjectPtr .asFunction(); - void wire_BlockchainBase_broadcast( + void wire_bdk_blockchain_broadcast( int port_, - ffi.Pointer that, - ffi.Pointer transaction, + ffi.Pointer that, + ffi.Pointer transaction, ) { - return _wire_BlockchainBase_broadcast( + return _wire_bdk_blockchain_broadcast( port_, that, transaction, ); } - late final _wire_BlockchainBase_broadcastPtr = _lookup< + late final _wire_bdk_blockchain_broadcastPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_BlockchainBase_broadcast'); - late final _wire_BlockchainBase_broadcast = - _wire_BlockchainBase_broadcastPtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); - - void wire_BlockchainBase_estimate_fee( + ffi.Void Function(ffi.Int64, ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_blockchain_broadcast'); + late final _wire_bdk_blockchain_broadcast = + _wire_bdk_blockchain_broadcastPtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer)>(); + + void wire_bdk_blockchain_estimate_fee( int port_, - ffi.Pointer that, + ffi.Pointer that, int target, ) { - return _wire_BlockchainBase_estimate_fee( + return _wire_bdk_blockchain_estimate_fee( port_, that, target, ); } - late final _wire_BlockchainBase_estimate_feePtr = _lookup< + late final _wire_bdk_blockchain_estimate_feePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer, ffi.Uint64)>>( - 'frbgen_bdk_flutter_wire_BlockchainBase_estimate_fee'); - late final _wire_BlockchainBase_estimate_fee = - _wire_BlockchainBase_estimate_feePtr.asFunction< - void Function(int, ffi.Pointer, int)>(); - - void wire_BlockchainBase_get_block_hash( + ffi.Void Function(ffi.Int64, ffi.Pointer, + ffi.Uint64)>>( + 'frbgen_bdk_flutter_wire_bdk_blockchain_estimate_fee'); + late final _wire_bdk_blockchain_estimate_fee = + _wire_bdk_blockchain_estimate_feePtr.asFunction< + void Function(int, ffi.Pointer, int)>(); + + void wire_bdk_blockchain_get_block_hash( int port_, - ffi.Pointer that, + ffi.Pointer that, int height, ) { - return _wire_BlockchainBase_get_block_hash( + return _wire_bdk_blockchain_get_block_hash( port_, that, height, ); } - late final _wire_BlockchainBase_get_block_hashPtr = _lookup< + late final _wire_bdk_blockchain_get_block_hashPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer, ffi.Uint32)>>( - 'frbgen_bdk_flutter_wire_BlockchainBase_get_block_hash'); - late final _wire_BlockchainBase_get_block_hash = - _wire_BlockchainBase_get_block_hashPtr.asFunction< - void Function(int, ffi.Pointer, int)>(); - - void wire_BlockchainBase_get_height( + ffi.Void Function(ffi.Int64, ffi.Pointer, + ffi.Uint32)>>( + 'frbgen_bdk_flutter_wire_bdk_blockchain_get_block_hash'); + late final _wire_bdk_blockchain_get_block_hash = + _wire_bdk_blockchain_get_block_hashPtr.asFunction< + void Function(int, ffi.Pointer, int)>(); + + void wire_bdk_blockchain_get_height( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire_BlockchainBase_get_height( + return _wire_bdk_blockchain_get_height( port_, that, ); } - late final _wire_BlockchainBase_get_heightPtr = _lookup< + late final _wire_bdk_blockchain_get_heightPtr = _lookup< ffi.NativeFunction< ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_BlockchainBase_get_height'); - late final _wire_BlockchainBase_get_height = - _wire_BlockchainBase_get_heightPtr.asFunction< - void Function(int, ffi.Pointer)>(); + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_blockchain_get_height'); + late final _wire_bdk_blockchain_get_height = + _wire_bdk_blockchain_get_heightPtr.asFunction< + void Function(int, ffi.Pointer)>(); - void wire_BlockchainBase_new( + void wire_bdk_blockchain_new( int port_, ffi.Pointer blockchain_config, ) { - return _wire_BlockchainBase_new( + return _wire_bdk_blockchain_new( port_, blockchain_config, ); } - late final _wire_BlockchainBase_newPtr = _lookup< + late final _wire_bdk_blockchain_newPtr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_BlockchainBase_new'); - late final _wire_BlockchainBase_new = _wire_BlockchainBase_newPtr.asFunction< + 'frbgen_bdk_flutter_wire_bdk_blockchain_new'); + late final _wire_bdk_blockchain_new = _wire_bdk_blockchain_newPtr.asFunction< void Function(int, ffi.Pointer)>(); - void wire_DescriptorBase_as_string( + void wire_bdk_descriptor_as_string( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire_DescriptorBase_as_string( + return _wire_bdk_descriptor_as_string( port_, that, ); } - late final _wire_DescriptorBase_as_stringPtr = _lookup< + late final _wire_bdk_descriptor_as_stringPtr = _lookup< ffi.NativeFunction< ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_DescriptorBase_as_string'); - late final _wire_DescriptorBase_as_string = _wire_DescriptorBase_as_stringPtr - .asFunction)>(); + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_descriptor_as_string'); + late final _wire_bdk_descriptor_as_string = _wire_bdk_descriptor_as_stringPtr + .asFunction)>(); - void wire_DescriptorBase_as_string_private( + void wire_bdk_descriptor_as_string_private( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire_DescriptorBase_as_string_private( + return _wire_bdk_descriptor_as_string_private( port_, that, ); } - late final _wire_DescriptorBase_as_string_privatePtr = _lookup< + late final _wire_bdk_descriptor_as_string_privatePtr = _lookup< ffi.NativeFunction< ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_DescriptorBase_as_string_private'); - late final _wire_DescriptorBase_as_string_private = - _wire_DescriptorBase_as_string_privatePtr.asFunction< - void Function(int, ffi.Pointer)>(); + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_descriptor_as_string_private'); + late final _wire_bdk_descriptor_as_string_private = + _wire_bdk_descriptor_as_string_privatePtr.asFunction< + void Function(int, ffi.Pointer)>(); - void wire_DescriptorBase_max_satisfaction_weight( + void wire_bdk_descriptor_max_satisfaction_weight( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire_DescriptorBase_max_satisfaction_weight( + return _wire_bdk_descriptor_max_satisfaction_weight( port_, that, ); } - late final _wire_DescriptorBase_max_satisfaction_weightPtr = _lookup< + late final _wire_bdk_descriptor_max_satisfaction_weightPtr = _lookup< ffi.NativeFunction< ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_DescriptorBase_max_satisfaction_weight'); - late final _wire_DescriptorBase_max_satisfaction_weight = - _wire_DescriptorBase_max_satisfaction_weightPtr.asFunction< - void Function(int, ffi.Pointer)>(); + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_descriptor_max_satisfaction_weight'); + late final _wire_bdk_descriptor_max_satisfaction_weight = + _wire_bdk_descriptor_max_satisfaction_weightPtr.asFunction< + void Function(int, ffi.Pointer)>(); - void wire_DescriptorBase_new( + void wire_bdk_descriptor_new( int port_, ffi.Pointer descriptor, int network, ) { - return _wire_DescriptorBase_new( + return _wire_bdk_descriptor_new( port_, descriptor, network, ); } - late final _wire_DescriptorBase_newPtr = _lookup< + late final _wire_bdk_descriptor_newPtr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, ffi.Pointer, - ffi.Int32)>>('frbgen_bdk_flutter_wire_DescriptorBase_new'); - late final _wire_DescriptorBase_new = _wire_DescriptorBase_newPtr.asFunction< + ffi.Int32)>>('frbgen_bdk_flutter_wire_bdk_descriptor_new'); + late final _wire_bdk_descriptor_new = _wire_bdk_descriptor_newPtr.asFunction< void Function(int, ffi.Pointer, int)>(); - void wire_DescriptorBase_new_bip44( + void wire_bdk_descriptor_new_bip44( int port_, - ffi.Pointer secret_key, + ffi.Pointer secret_key, int keychain_kind, int network, ) { - return _wire_DescriptorBase_new_bip44( + return _wire_bdk_descriptor_new_bip44( port_, secret_key, keychain_kind, @@ -3285,26 +3347,26 @@ class BdkCoreWire implements BaseWire { ); } - late final _wire_DescriptorBase_new_bip44Ptr = _lookup< + late final _wire_bdk_descriptor_new_bip44Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, - ffi.Pointer, + ffi.Pointer, ffi.Int32, - ffi.Int32)>>('frbgen_bdk_flutter_wire_DescriptorBase_new_bip44'); - late final _wire_DescriptorBase_new_bip44 = - _wire_DescriptorBase_new_bip44Ptr.asFunction< - void Function(int, ffi.Pointer, + ffi.Int32)>>('frbgen_bdk_flutter_wire_bdk_descriptor_new_bip44'); + late final _wire_bdk_descriptor_new_bip44 = + _wire_bdk_descriptor_new_bip44Ptr.asFunction< + void Function(int, ffi.Pointer, int, int)>(); - void wire_DescriptorBase_new_bip44_public( + void wire_bdk_descriptor_new_bip44_public( int port_, - ffi.Pointer public_key, + ffi.Pointer public_key, ffi.Pointer fingerprint, int keychain_kind, int network, ) { - return _wire_DescriptorBase_new_bip44_public( + return _wire_bdk_descriptor_new_bip44_public( port_, public_key, fingerprint, @@ -3313,27 +3375,27 @@ class BdkCoreWire implements BaseWire { ); } - late final _wire_DescriptorBase_new_bip44_publicPtr = _lookup< + late final _wire_bdk_descriptor_new_bip44_publicPtr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, - ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Int32, ffi.Int32)>>( - 'frbgen_bdk_flutter_wire_DescriptorBase_new_bip44_public'); - late final _wire_DescriptorBase_new_bip44_public = - _wire_DescriptorBase_new_bip44_publicPtr.asFunction< - void Function(int, ffi.Pointer, + 'frbgen_bdk_flutter_wire_bdk_descriptor_new_bip44_public'); + late final _wire_bdk_descriptor_new_bip44_public = + _wire_bdk_descriptor_new_bip44_publicPtr.asFunction< + void Function(int, ffi.Pointer, ffi.Pointer, int, int)>(); - void wire_DescriptorBase_new_bip49( + void wire_bdk_descriptor_new_bip49( int port_, - ffi.Pointer secret_key, + ffi.Pointer secret_key, int keychain_kind, int network, ) { - return _wire_DescriptorBase_new_bip49( + return _wire_bdk_descriptor_new_bip49( port_, secret_key, keychain_kind, @@ -3341,26 +3403,26 @@ class BdkCoreWire implements BaseWire { ); } - late final _wire_DescriptorBase_new_bip49Ptr = _lookup< + late final _wire_bdk_descriptor_new_bip49Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, - ffi.Pointer, + ffi.Pointer, ffi.Int32, - ffi.Int32)>>('frbgen_bdk_flutter_wire_DescriptorBase_new_bip49'); - late final _wire_DescriptorBase_new_bip49 = - _wire_DescriptorBase_new_bip49Ptr.asFunction< - void Function(int, ffi.Pointer, + ffi.Int32)>>('frbgen_bdk_flutter_wire_bdk_descriptor_new_bip49'); + late final _wire_bdk_descriptor_new_bip49 = + _wire_bdk_descriptor_new_bip49Ptr.asFunction< + void Function(int, ffi.Pointer, int, int)>(); - void wire_DescriptorBase_new_bip49_public( + void wire_bdk_descriptor_new_bip49_public( int port_, - ffi.Pointer public_key, + ffi.Pointer public_key, ffi.Pointer fingerprint, int keychain_kind, int network, ) { - return _wire_DescriptorBase_new_bip49_public( + return _wire_bdk_descriptor_new_bip49_public( port_, public_key, fingerprint, @@ -3369,27 +3431,27 @@ class BdkCoreWire implements BaseWire { ); } - late final _wire_DescriptorBase_new_bip49_publicPtr = _lookup< + late final _wire_bdk_descriptor_new_bip49_publicPtr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, - ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Int32, ffi.Int32)>>( - 'frbgen_bdk_flutter_wire_DescriptorBase_new_bip49_public'); - late final _wire_DescriptorBase_new_bip49_public = - _wire_DescriptorBase_new_bip49_publicPtr.asFunction< - void Function(int, ffi.Pointer, + 'frbgen_bdk_flutter_wire_bdk_descriptor_new_bip49_public'); + late final _wire_bdk_descriptor_new_bip49_public = + _wire_bdk_descriptor_new_bip49_publicPtr.asFunction< + void Function(int, ffi.Pointer, ffi.Pointer, int, int)>(); - void wire_DescriptorBase_new_bip84( + void wire_bdk_descriptor_new_bip84( int port_, - ffi.Pointer secret_key, + ffi.Pointer secret_key, int keychain_kind, int network, ) { - return _wire_DescriptorBase_new_bip84( + return _wire_bdk_descriptor_new_bip84( port_, secret_key, keychain_kind, @@ -3397,26 +3459,26 @@ class BdkCoreWire implements BaseWire { ); } - late final _wire_DescriptorBase_new_bip84Ptr = _lookup< + late final _wire_bdk_descriptor_new_bip84Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, - ffi.Pointer, + ffi.Pointer, ffi.Int32, - ffi.Int32)>>('frbgen_bdk_flutter_wire_DescriptorBase_new_bip84'); - late final _wire_DescriptorBase_new_bip84 = - _wire_DescriptorBase_new_bip84Ptr.asFunction< - void Function(int, ffi.Pointer, + ffi.Int32)>>('frbgen_bdk_flutter_wire_bdk_descriptor_new_bip84'); + late final _wire_bdk_descriptor_new_bip84 = + _wire_bdk_descriptor_new_bip84Ptr.asFunction< + void Function(int, ffi.Pointer, int, int)>(); - void wire_DescriptorBase_new_bip84_public( + void wire_bdk_descriptor_new_bip84_public( int port_, - ffi.Pointer public_key, + ffi.Pointer public_key, ffi.Pointer fingerprint, int keychain_kind, int network, ) { - return _wire_DescriptorBase_new_bip84_public( + return _wire_bdk_descriptor_new_bip84_public( port_, public_key, fingerprint, @@ -3425,27 +3487,27 @@ class BdkCoreWire implements BaseWire { ); } - late final _wire_DescriptorBase_new_bip84_publicPtr = _lookup< + late final _wire_bdk_descriptor_new_bip84_publicPtr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, - ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Int32, ffi.Int32)>>( - 'frbgen_bdk_flutter_wire_DescriptorBase_new_bip84_public'); - late final _wire_DescriptorBase_new_bip84_public = - _wire_DescriptorBase_new_bip84_publicPtr.asFunction< - void Function(int, ffi.Pointer, + 'frbgen_bdk_flutter_wire_bdk_descriptor_new_bip84_public'); + late final _wire_bdk_descriptor_new_bip84_public = + _wire_bdk_descriptor_new_bip84_publicPtr.asFunction< + void Function(int, ffi.Pointer, ffi.Pointer, int, int)>(); - void wire_DescriptorBase_new_bip86( + void wire_bdk_descriptor_new_bip86( int port_, - ffi.Pointer secret_key, + ffi.Pointer secret_key, int keychain_kind, int network, ) { - return _wire_DescriptorBase_new_bip86( + return _wire_bdk_descriptor_new_bip86( port_, secret_key, keychain_kind, @@ -3453,26 +3515,26 @@ class BdkCoreWire implements BaseWire { ); } - late final _wire_DescriptorBase_new_bip86Ptr = _lookup< + late final _wire_bdk_descriptor_new_bip86Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, - ffi.Pointer, + ffi.Pointer, ffi.Int32, - ffi.Int32)>>('frbgen_bdk_flutter_wire_DescriptorBase_new_bip86'); - late final _wire_DescriptorBase_new_bip86 = - _wire_DescriptorBase_new_bip86Ptr.asFunction< - void Function(int, ffi.Pointer, + ffi.Int32)>>('frbgen_bdk_flutter_wire_bdk_descriptor_new_bip86'); + late final _wire_bdk_descriptor_new_bip86 = + _wire_bdk_descriptor_new_bip86Ptr.asFunction< + void Function(int, ffi.Pointer, int, int)>(); - void wire_DescriptorBase_new_bip86_public( + void wire_bdk_descriptor_new_bip86_public( int port_, - ffi.Pointer public_key, + ffi.Pointer public_key, ffi.Pointer fingerprint, int keychain_kind, int network, ) { - return _wire_DescriptorBase_new_bip86_public( + return _wire_bdk_descriptor_new_bip86_public( port_, public_key, fingerprint, @@ -3481,173 +3543,173 @@ class BdkCoreWire implements BaseWire { ); } - late final _wire_DescriptorBase_new_bip86_publicPtr = _lookup< + late final _wire_bdk_descriptor_new_bip86_publicPtr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, - ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Int32, ffi.Int32)>>( - 'frbgen_bdk_flutter_wire_DescriptorBase_new_bip86_public'); - late final _wire_DescriptorBase_new_bip86_public = - _wire_DescriptorBase_new_bip86_publicPtr.asFunction< - void Function(int, ffi.Pointer, + 'frbgen_bdk_flutter_wire_bdk_descriptor_new_bip86_public'); + late final _wire_bdk_descriptor_new_bip86_public = + _wire_bdk_descriptor_new_bip86_publicPtr.asFunction< + void Function(int, ffi.Pointer, ffi.Pointer, int, int)>(); - void wire_DerivationPathBase_from_string( + void wire_bdk_derivation_path_from_string( int port_, ffi.Pointer path, ) { - return _wire_DerivationPathBase_from_string( + return _wire_bdk_derivation_path_from_string( port_, path, ); } - late final _wire_DerivationPathBase_from_stringPtr = _lookup< + late final _wire_bdk_derivation_path_from_stringPtr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_DerivationPathBase_from_string'); - late final _wire_DerivationPathBase_from_string = - _wire_DerivationPathBase_from_stringPtr.asFunction< + 'frbgen_bdk_flutter_wire_bdk_derivation_path_from_string'); + late final _wire_bdk_derivation_path_from_string = + _wire_bdk_derivation_path_from_stringPtr.asFunction< void Function(int, ffi.Pointer)>(); - void wire_DescriptorPublicKeyBase_as_string( + void wire_bdk_descriptor_public_key_as_string( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire_DescriptorPublicKeyBase_as_string( + return _wire_bdk_descriptor_public_key_as_string( port_, that, ); } - late final _wire_DescriptorPublicKeyBase_as_stringPtr = _lookup< + late final _wire_bdk_descriptor_public_key_as_stringPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_DescriptorPublicKeyBase_as_string'); - late final _wire_DescriptorPublicKeyBase_as_string = - _wire_DescriptorPublicKeyBase_as_stringPtr.asFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_descriptor_public_key_as_string'); + late final _wire_bdk_descriptor_public_key_as_string = + _wire_bdk_descriptor_public_key_as_stringPtr.asFunction< void Function( - int, ffi.Pointer)>(); + int, ffi.Pointer)>(); - void wire_DescriptorPublicKeyBase_derive( + void wire_bdk_descriptor_public_key_derive( int port_, - ffi.Pointer ptr, - ffi.Pointer path, + ffi.Pointer ptr, + ffi.Pointer path, ) { - return _wire_DescriptorPublicKeyBase_derive( + return _wire_bdk_descriptor_public_key_derive( port_, ptr, path, ); } - late final _wire_DescriptorPublicKeyBase_derivePtr = _lookup< + late final _wire_bdk_descriptor_public_key_derivePtr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_DescriptorPublicKeyBase_derive'); - late final _wire_DescriptorPublicKeyBase_derive = - _wire_DescriptorPublicKeyBase_derivePtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); - - void wire_DescriptorPublicKeyBase_extend( + ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_descriptor_public_key_derive'); + late final _wire_bdk_descriptor_public_key_derive = + _wire_bdk_descriptor_public_key_derivePtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer)>(); + + void wire_bdk_descriptor_public_key_extend( int port_, - ffi.Pointer ptr, - ffi.Pointer path, + ffi.Pointer ptr, + ffi.Pointer path, ) { - return _wire_DescriptorPublicKeyBase_extend( + return _wire_bdk_descriptor_public_key_extend( port_, ptr, path, ); } - late final _wire_DescriptorPublicKeyBase_extendPtr = _lookup< + late final _wire_bdk_descriptor_public_key_extendPtr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_DescriptorPublicKeyBase_extend'); - late final _wire_DescriptorPublicKeyBase_extend = - _wire_DescriptorPublicKeyBase_extendPtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); - - void wire_DescriptorPublicKeyBase_from_string( + ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_descriptor_public_key_extend'); + late final _wire_bdk_descriptor_public_key_extend = + _wire_bdk_descriptor_public_key_extendPtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer)>(); + + void wire_bdk_descriptor_public_key_from_string( int port_, ffi.Pointer public_key, ) { - return _wire_DescriptorPublicKeyBase_from_string( + return _wire_bdk_descriptor_public_key_from_string( port_, public_key, ); } - late final _wire_DescriptorPublicKeyBase_from_stringPtr = _lookup< + late final _wire_bdk_descriptor_public_key_from_stringPtr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_DescriptorPublicKeyBase_from_string'); - late final _wire_DescriptorPublicKeyBase_from_string = - _wire_DescriptorPublicKeyBase_from_stringPtr.asFunction< + 'frbgen_bdk_flutter_wire_bdk_descriptor_public_key_from_string'); + late final _wire_bdk_descriptor_public_key_from_string = + _wire_bdk_descriptor_public_key_from_stringPtr.asFunction< void Function(int, ffi.Pointer)>(); - void wire_DescriptorSecretKeyBase_as_public( + void wire_bdk_descriptor_secret_key_as_public( int port_, - ffi.Pointer ptr, + ffi.Pointer ptr, ) { - return _wire_DescriptorSecretKeyBase_as_public( + return _wire_bdk_descriptor_secret_key_as_public( port_, ptr, ); } - late final _wire_DescriptorSecretKeyBase_as_publicPtr = _lookup< + late final _wire_bdk_descriptor_secret_key_as_publicPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_DescriptorSecretKeyBase_as_public'); - late final _wire_DescriptorSecretKeyBase_as_public = - _wire_DescriptorSecretKeyBase_as_publicPtr.asFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_as_public'); + late final _wire_bdk_descriptor_secret_key_as_public = + _wire_bdk_descriptor_secret_key_as_publicPtr.asFunction< void Function( - int, ffi.Pointer)>(); + int, ffi.Pointer)>(); - void wire_DescriptorSecretKeyBase_as_string( + void wire_bdk_descriptor_secret_key_as_string( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire_DescriptorSecretKeyBase_as_string( + return _wire_bdk_descriptor_secret_key_as_string( port_, that, ); } - late final _wire_DescriptorSecretKeyBase_as_stringPtr = _lookup< + late final _wire_bdk_descriptor_secret_key_as_stringPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_DescriptorSecretKeyBase_as_string'); - late final _wire_DescriptorSecretKeyBase_as_string = - _wire_DescriptorSecretKeyBase_as_stringPtr.asFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_as_string'); + late final _wire_bdk_descriptor_secret_key_as_string = + _wire_bdk_descriptor_secret_key_as_stringPtr.asFunction< void Function( - int, ffi.Pointer)>(); + int, ffi.Pointer)>(); - void wire_DescriptorSecretKeyBase_create( + void wire_bdk_descriptor_secret_key_create( int port_, int network, - ffi.Pointer mnemonic, + ffi.Pointer mnemonic, ffi.Pointer password, ) { - return _wire_DescriptorSecretKeyBase_create( + return _wire_bdk_descriptor_secret_key_create( port_, network, mnemonic, @@ -3655,853 +3717,882 @@ class BdkCoreWire implements BaseWire { ); } - late final _wire_DescriptorSecretKeyBase_createPtr = _lookup< + late final _wire_bdk_descriptor_secret_key_createPtr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, ffi.Int32, - ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_DescriptorSecretKeyBase_create'); - late final _wire_DescriptorSecretKeyBase_create = - _wire_DescriptorSecretKeyBase_createPtr.asFunction< - void Function(int, int, ffi.Pointer, + 'frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_create'); + late final _wire_bdk_descriptor_secret_key_create = + _wire_bdk_descriptor_secret_key_createPtr.asFunction< + void Function(int, int, ffi.Pointer, ffi.Pointer)>(); - void wire_DescriptorSecretKeyBase_derive( + void wire_bdk_descriptor_secret_key_derive( int port_, - ffi.Pointer ptr, - ffi.Pointer path, + ffi.Pointer ptr, + ffi.Pointer path, ) { - return _wire_DescriptorSecretKeyBase_derive( + return _wire_bdk_descriptor_secret_key_derive( port_, ptr, path, ); } - late final _wire_DescriptorSecretKeyBase_derivePtr = _lookup< + late final _wire_bdk_descriptor_secret_key_derivePtr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_DescriptorSecretKeyBase_derive'); - late final _wire_DescriptorSecretKeyBase_derive = - _wire_DescriptorSecretKeyBase_derivePtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); - - void wire_DescriptorSecretKeyBase_extend( + ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_derive'); + late final _wire_bdk_descriptor_secret_key_derive = + _wire_bdk_descriptor_secret_key_derivePtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer)>(); + + void wire_bdk_descriptor_secret_key_extend( int port_, - ffi.Pointer ptr, - ffi.Pointer path, + ffi.Pointer ptr, + ffi.Pointer path, ) { - return _wire_DescriptorSecretKeyBase_extend( + return _wire_bdk_descriptor_secret_key_extend( port_, ptr, path, ); } - late final _wire_DescriptorSecretKeyBase_extendPtr = _lookup< + late final _wire_bdk_descriptor_secret_key_extendPtr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_DescriptorSecretKeyBase_extend'); - late final _wire_DescriptorSecretKeyBase_extend = - _wire_DescriptorSecretKeyBase_extendPtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); - - void wire_DescriptorSecretKeyBase_from_string( + ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_extend'); + late final _wire_bdk_descriptor_secret_key_extend = + _wire_bdk_descriptor_secret_key_extendPtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer)>(); + + void wire_bdk_descriptor_secret_key_from_string( int port_, ffi.Pointer secret_key, ) { - return _wire_DescriptorSecretKeyBase_from_string( + return _wire_bdk_descriptor_secret_key_from_string( port_, secret_key, ); } - late final _wire_DescriptorSecretKeyBase_from_stringPtr = _lookup< + late final _wire_bdk_descriptor_secret_key_from_stringPtr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_DescriptorSecretKeyBase_from_string'); - late final _wire_DescriptorSecretKeyBase_from_string = - _wire_DescriptorSecretKeyBase_from_stringPtr.asFunction< + 'frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_from_string'); + late final _wire_bdk_descriptor_secret_key_from_string = + _wire_bdk_descriptor_secret_key_from_stringPtr.asFunction< void Function(int, ffi.Pointer)>(); - void wire_DescriptorSecretKeyBase_secret_bytes( + void wire_bdk_descriptor_secret_key_secret_bytes( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire_DescriptorSecretKeyBase_secret_bytes( + return _wire_bdk_descriptor_secret_key_secret_bytes( port_, that, ); } - late final _wire_DescriptorSecretKeyBase_secret_bytesPtr = _lookup< + late final _wire_bdk_descriptor_secret_key_secret_bytesPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_DescriptorSecretKeyBase_secret_bytes'); - late final _wire_DescriptorSecretKeyBase_secret_bytes = - _wire_DescriptorSecretKeyBase_secret_bytesPtr.asFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_secret_bytes'); + late final _wire_bdk_descriptor_secret_key_secret_bytes = + _wire_bdk_descriptor_secret_key_secret_bytesPtr.asFunction< void Function( - int, ffi.Pointer)>(); + int, ffi.Pointer)>(); - void wire_MnemonicBase_as_string( + void wire_bdk_mnemonic_as_string( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire_MnemonicBase_as_string( + return _wire_bdk_mnemonic_as_string( port_, that, ); } - late final _wire_MnemonicBase_as_stringPtr = _lookup< + late final _wire_bdk_mnemonic_as_stringPtr = _lookup< ffi.NativeFunction< ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_MnemonicBase_as_string'); - late final _wire_MnemonicBase_as_string = _wire_MnemonicBase_as_stringPtr - .asFunction)>(); + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_mnemonic_as_string'); + late final _wire_bdk_mnemonic_as_string = _wire_bdk_mnemonic_as_stringPtr + .asFunction)>(); - void wire_MnemonicBase_from_entropy( + void wire_bdk_mnemonic_from_entropy( int port_, ffi.Pointer entropy, ) { - return _wire_MnemonicBase_from_entropy( + return _wire_bdk_mnemonic_from_entropy( port_, entropy, ); } - late final _wire_MnemonicBase_from_entropyPtr = _lookup< + late final _wire_bdk_mnemonic_from_entropyPtr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_MnemonicBase_from_entropy'); - late final _wire_MnemonicBase_from_entropy = - _wire_MnemonicBase_from_entropyPtr.asFunction< + 'frbgen_bdk_flutter_wire_bdk_mnemonic_from_entropy'); + late final _wire_bdk_mnemonic_from_entropy = + _wire_bdk_mnemonic_from_entropyPtr.asFunction< void Function(int, ffi.Pointer)>(); - void wire_MnemonicBase_from_string( + void wire_bdk_mnemonic_from_string( int port_, ffi.Pointer mnemonic, ) { - return _wire_MnemonicBase_from_string( + return _wire_bdk_mnemonic_from_string( port_, mnemonic, ); } - late final _wire_MnemonicBase_from_stringPtr = _lookup< + late final _wire_bdk_mnemonic_from_stringPtr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_MnemonicBase_from_string'); - late final _wire_MnemonicBase_from_string = - _wire_MnemonicBase_from_stringPtr.asFunction< + 'frbgen_bdk_flutter_wire_bdk_mnemonic_from_string'); + late final _wire_bdk_mnemonic_from_string = + _wire_bdk_mnemonic_from_stringPtr.asFunction< void Function(int, ffi.Pointer)>(); - void wire_MnemonicBase_new( + void wire_bdk_mnemonic_new( int port_, int word_count, ) { - return _wire_MnemonicBase_new( + return _wire_bdk_mnemonic_new( port_, word_count, ); } - late final _wire_MnemonicBase_newPtr = + late final _wire_bdk_mnemonic_newPtr = _lookup>( - 'frbgen_bdk_flutter_wire_MnemonicBase_new'); - late final _wire_MnemonicBase_new = - _wire_MnemonicBase_newPtr.asFunction(); + 'frbgen_bdk_flutter_wire_bdk_mnemonic_new'); + late final _wire_bdk_mnemonic_new = + _wire_bdk_mnemonic_newPtr.asFunction(); - void wire_PsbtBase_combine( + void wire_bdk_psbt_combine( int port_, - ffi.Pointer ptr, - ffi.Pointer other, + ffi.Pointer ptr, + ffi.Pointer other, ) { - return _wire_PsbtBase_combine( + return _wire_bdk_psbt_combine( port_, ptr, other, ); } - late final _wire_PsbtBase_combinePtr = _lookup< + late final _wire_bdk_psbt_combinePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_PsbtBase_combine'); - late final _wire_PsbtBase_combine = _wire_PsbtBase_combinePtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); - - void wire_PsbtBase_extract_tx( + ffi.Void Function(ffi.Int64, ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_psbt_combine'); + late final _wire_bdk_psbt_combine = _wire_bdk_psbt_combinePtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer)>(); + + void wire_bdk_psbt_extract_tx( int port_, - ffi.Pointer ptr, + ffi.Pointer ptr, ) { - return _wire_PsbtBase_extract_tx( + return _wire_bdk_psbt_extract_tx( port_, ptr, ); } - late final _wire_PsbtBase_extract_txPtr = _lookup< + late final _wire_bdk_psbt_extract_txPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_PsbtBase_extract_tx'); - late final _wire_PsbtBase_extract_tx = _wire_PsbtBase_extract_txPtr - .asFunction)>(); + ffi.Void Function(ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_psbt_extract_tx'); + late final _wire_bdk_psbt_extract_tx = _wire_bdk_psbt_extract_txPtr + .asFunction)>(); - void wire_PsbtBase_fee_amount( + void wire_bdk_psbt_fee_amount( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire_PsbtBase_fee_amount( + return _wire_bdk_psbt_fee_amount( port_, that, ); } - late final _wire_PsbtBase_fee_amountPtr = _lookup< + late final _wire_bdk_psbt_fee_amountPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_PsbtBase_fee_amount'); - late final _wire_PsbtBase_fee_amount = _wire_PsbtBase_fee_amountPtr - .asFunction)>(); + ffi.Void Function(ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_psbt_fee_amount'); + late final _wire_bdk_psbt_fee_amount = _wire_bdk_psbt_fee_amountPtr + .asFunction)>(); - void wire_PsbtBase_fee_rate( + void wire_bdk_psbt_fee_rate( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire_PsbtBase_fee_rate( + return _wire_bdk_psbt_fee_rate( port_, that, ); } - late final _wire_PsbtBase_fee_ratePtr = _lookup< + late final _wire_bdk_psbt_fee_ratePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_PsbtBase_fee_rate'); - late final _wire_PsbtBase_fee_rate = _wire_PsbtBase_fee_ratePtr - .asFunction)>(); + ffi.Void Function(ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_psbt_fee_rate'); + late final _wire_bdk_psbt_fee_rate = _wire_bdk_psbt_fee_ratePtr + .asFunction)>(); - void wire_PsbtBase_from_str( + void wire_bdk_psbt_from_str( int port_, ffi.Pointer psbt_base64, ) { - return _wire_PsbtBase_from_str( + return _wire_bdk_psbt_from_str( port_, psbt_base64, ); } - late final _wire_PsbtBase_from_strPtr = _lookup< + late final _wire_bdk_psbt_from_strPtr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_PsbtBase_from_str'); - late final _wire_PsbtBase_from_str = _wire_PsbtBase_from_strPtr.asFunction< + 'frbgen_bdk_flutter_wire_bdk_psbt_from_str'); + late final _wire_bdk_psbt_from_str = _wire_bdk_psbt_from_strPtr.asFunction< void Function(int, ffi.Pointer)>(); - void wire_PsbtBase_json_serialize( + void wire_bdk_psbt_json_serialize( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire_PsbtBase_json_serialize( + return _wire_bdk_psbt_json_serialize( port_, that, ); } - late final _wire_PsbtBase_json_serializePtr = _lookup< + late final _wire_bdk_psbt_json_serializePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_PsbtBase_json_serialize'); - late final _wire_PsbtBase_json_serialize = _wire_PsbtBase_json_serializePtr - .asFunction)>(); + ffi.Void Function(ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_psbt_json_serialize'); + late final _wire_bdk_psbt_json_serialize = _wire_bdk_psbt_json_serializePtr + .asFunction)>(); - void wire_PsbtBase_serialize( + void wire_bdk_psbt_serialize( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire_PsbtBase_serialize( + return _wire_bdk_psbt_serialize( port_, that, ); } - late final _wire_PsbtBase_serializePtr = _lookup< + late final _wire_bdk_psbt_serializePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_PsbtBase_serialize'); - late final _wire_PsbtBase_serialize = _wire_PsbtBase_serializePtr - .asFunction)>(); + ffi.Void Function(ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_psbt_serialize'); + late final _wire_bdk_psbt_serialize = _wire_bdk_psbt_serializePtr + .asFunction)>(); - void wire_PsbtBase_txid( + void wire_bdk_psbt_txid( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire_PsbtBase_txid( + return _wire_bdk_psbt_txid( port_, that, ); } - late final _wire_PsbtBase_txidPtr = _lookup< + late final _wire_bdk_psbt_txidPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_PsbtBase_txid'); - late final _wire_PsbtBase_txid = _wire_PsbtBase_txidPtr - .asFunction)>(); + ffi.Void Function(ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_psbt_txid'); + late final _wire_bdk_psbt_txid = _wire_bdk_psbt_txidPtr + .asFunction)>(); - void wire_AddressBase_as_string( + void wire_bdk_address_as_string( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire_AddressBase_as_string( + return _wire_bdk_address_as_string( port_, that, ); } - late final _wire_AddressBase_as_stringPtr = _lookup< + late final _wire_bdk_address_as_stringPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_AddressBase_as_string'); - late final _wire_AddressBase_as_string = _wire_AddressBase_as_stringPtr - .asFunction)>(); + ffi.Void Function(ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_address_as_string'); + late final _wire_bdk_address_as_string = _wire_bdk_address_as_stringPtr + .asFunction)>(); - void wire_AddressBase_from_script( + void wire_bdk_address_from_script( int port_, - ffi.Pointer script, + ffi.Pointer script, int network, ) { - return _wire_AddressBase_from_script( + return _wire_bdk_address_from_script( port_, script, network, ); } - late final _wire_AddressBase_from_scriptPtr = _lookup< + late final _wire_bdk_address_from_scriptPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer, - ffi.Int32)>>('frbgen_bdk_flutter_wire_AddressBase_from_script'); - late final _wire_AddressBase_from_script = - _wire_AddressBase_from_scriptPtr.asFunction< - void Function(int, ffi.Pointer, int)>(); + ffi.Void Function(ffi.Int64, ffi.Pointer, + ffi.Int32)>>('frbgen_bdk_flutter_wire_bdk_address_from_script'); + late final _wire_bdk_address_from_script = + _wire_bdk_address_from_scriptPtr.asFunction< + void Function(int, ffi.Pointer, int)>(); - void wire_AddressBase_from_string( + void wire_bdk_address_from_string( int port_, ffi.Pointer address, int network, ) { - return _wire_AddressBase_from_string( + return _wire_bdk_address_from_string( port_, address, network, ); } - late final _wire_AddressBase_from_stringPtr = _lookup< + late final _wire_bdk_address_from_stringPtr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, ffi.Pointer, - ffi.Int32)>>('frbgen_bdk_flutter_wire_AddressBase_from_string'); - late final _wire_AddressBase_from_string = - _wire_AddressBase_from_stringPtr.asFunction< + ffi.Int32)>>('frbgen_bdk_flutter_wire_bdk_address_from_string'); + late final _wire_bdk_address_from_string = + _wire_bdk_address_from_stringPtr.asFunction< void Function( int, ffi.Pointer, int)>(); - void wire_AddressBase_is_valid_for_network( + void wire_bdk_address_is_valid_for_network( int port_, - ffi.Pointer that, + ffi.Pointer that, int network, ) { - return _wire_AddressBase_is_valid_for_network( + return _wire_bdk_address_is_valid_for_network( port_, that, network, ); } - late final _wire_AddressBase_is_valid_for_networkPtr = _lookup< + late final _wire_bdk_address_is_valid_for_networkPtr = _lookup< ffi.NativeFunction< ffi.Void Function( - ffi.Int64, ffi.Pointer, ffi.Int32)>>( - 'frbgen_bdk_flutter_wire_AddressBase_is_valid_for_network'); - late final _wire_AddressBase_is_valid_for_network = - _wire_AddressBase_is_valid_for_networkPtr.asFunction< - void Function(int, ffi.Pointer, int)>(); + ffi.Int64, ffi.Pointer, ffi.Int32)>>( + 'frbgen_bdk_flutter_wire_bdk_address_is_valid_for_network'); + late final _wire_bdk_address_is_valid_for_network = + _wire_bdk_address_is_valid_for_networkPtr.asFunction< + void Function(int, ffi.Pointer, int)>(); - void wire_AddressBase_network( + void wire_bdk_address_network( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire_AddressBase_network( + return _wire_bdk_address_network( port_, that, ); } - late final _wire_AddressBase_networkPtr = _lookup< + late final _wire_bdk_address_networkPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_AddressBase_network'); - late final _wire_AddressBase_network = _wire_AddressBase_networkPtr - .asFunction)>(); + ffi.Void Function(ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_address_network'); + late final _wire_bdk_address_network = _wire_bdk_address_networkPtr + .asFunction)>(); - void wire_AddressBase_payload( + void wire_bdk_address_payload( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire_AddressBase_payload( + return _wire_bdk_address_payload( port_, that, ); } - late final _wire_AddressBase_payloadPtr = _lookup< + late final _wire_bdk_address_payloadPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_AddressBase_payload'); - late final _wire_AddressBase_payload = _wire_AddressBase_payloadPtr - .asFunction)>(); + ffi.Void Function(ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_address_payload'); + late final _wire_bdk_address_payload = _wire_bdk_address_payloadPtr + .asFunction)>(); - void wire_AddressBase_script( + void wire_bdk_address_script( int port_, - ffi.Pointer ptr, + ffi.Pointer ptr, ) { - return _wire_AddressBase_script( + return _wire_bdk_address_script( port_, ptr, ); } - late final _wire_AddressBase_scriptPtr = _lookup< + late final _wire_bdk_address_scriptPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_AddressBase_script'); - late final _wire_AddressBase_script = _wire_AddressBase_scriptPtr - .asFunction)>(); + ffi.Void Function(ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_address_script'); + late final _wire_bdk_address_script = _wire_bdk_address_scriptPtr + .asFunction)>(); - void wire_AddressBase_to_qr_uri( + void wire_bdk_address_to_qr_uri( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire_AddressBase_to_qr_uri( + return _wire_bdk_address_to_qr_uri( port_, that, ); } - late final _wire_AddressBase_to_qr_uriPtr = _lookup< + late final _wire_bdk_address_to_qr_uriPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_AddressBase_to_qr_uri'); - late final _wire_AddressBase_to_qr_uri = _wire_AddressBase_to_qr_uriPtr - .asFunction)>(); + ffi.Void Function(ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_address_to_qr_uri'); + late final _wire_bdk_address_to_qr_uri = _wire_bdk_address_to_qr_uriPtr + .asFunction)>(); - void wire_ScriptBufBase_empty( + void wire_bdk_script_buf_empty( int port_, ) { - return _wire_ScriptBufBase_empty( + return _wire_bdk_script_buf_empty( port_, ); } - late final _wire_ScriptBufBase_emptyPtr = + late final _wire_bdk_script_buf_emptyPtr = _lookup>( - 'frbgen_bdk_flutter_wire_ScriptBufBase_empty'); - late final _wire_ScriptBufBase_empty = - _wire_ScriptBufBase_emptyPtr.asFunction(); + 'frbgen_bdk_flutter_wire_bdk_script_buf_empty'); + late final _wire_bdk_script_buf_empty = + _wire_bdk_script_buf_emptyPtr.asFunction(); - void wire_ScriptBufBase_from_hex( + void wire_bdk_script_buf_from_hex( int port_, ffi.Pointer s, ) { - return _wire_ScriptBufBase_from_hex( + return _wire_bdk_script_buf_from_hex( port_, s, ); } - late final _wire_ScriptBufBase_from_hexPtr = _lookup< + late final _wire_bdk_script_buf_from_hexPtr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_ScriptBufBase_from_hex'); - late final _wire_ScriptBufBase_from_hex = - _wire_ScriptBufBase_from_hexPtr.asFunction< + 'frbgen_bdk_flutter_wire_bdk_script_buf_from_hex'); + late final _wire_bdk_script_buf_from_hex = + _wire_bdk_script_buf_from_hexPtr.asFunction< void Function(int, ffi.Pointer)>(); - void wire_ScriptBufBase_with_capacity( + void wire_bdk_script_buf_with_capacity( int port_, int capacity, ) { - return _wire_ScriptBufBase_with_capacity( + return _wire_bdk_script_buf_with_capacity( port_, capacity, ); } - late final _wire_ScriptBufBase_with_capacityPtr = + late final _wire_bdk_script_buf_with_capacityPtr = _lookup>( - 'frbgen_bdk_flutter_wire_ScriptBufBase_with_capacity'); - late final _wire_ScriptBufBase_with_capacity = - _wire_ScriptBufBase_with_capacityPtr + 'frbgen_bdk_flutter_wire_bdk_script_buf_with_capacity'); + late final _wire_bdk_script_buf_with_capacity = + _wire_bdk_script_buf_with_capacityPtr .asFunction(); - void wire_TransactionBase_input( + void wire_bdk_transaction_from_bytes( + int port_, + ffi.Pointer transaction_bytes, + ) { + return _wire_bdk_transaction_from_bytes( + port_, + transaction_bytes, + ); + } + + late final _wire_bdk_transaction_from_bytesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_transaction_from_bytes'); + late final _wire_bdk_transaction_from_bytes = + _wire_bdk_transaction_from_bytesPtr.asFunction< + void Function(int, ffi.Pointer)>(); + + void wire_bdk_transaction_input( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire_TransactionBase_input( + return _wire_bdk_transaction_input( port_, that, ); } - late final _wire_TransactionBase_inputPtr = _lookup< + late final _wire_bdk_transaction_inputPtr = _lookup< ffi.NativeFunction< ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_TransactionBase_input'); - late final _wire_TransactionBase_input = _wire_TransactionBase_inputPtr - .asFunction)>(); + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_transaction_input'); + late final _wire_bdk_transaction_input = _wire_bdk_transaction_inputPtr + .asFunction)>(); - void wire_TransactionBase_is_coin_base( + void wire_bdk_transaction_is_coin_base( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire_TransactionBase_is_coin_base( + return _wire_bdk_transaction_is_coin_base( port_, that, ); } - late final _wire_TransactionBase_is_coin_basePtr = _lookup< + late final _wire_bdk_transaction_is_coin_basePtr = _lookup< ffi.NativeFunction< ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_TransactionBase_is_coin_base'); - late final _wire_TransactionBase_is_coin_base = - _wire_TransactionBase_is_coin_basePtr.asFunction< - void Function(int, ffi.Pointer)>(); + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_transaction_is_coin_base'); + late final _wire_bdk_transaction_is_coin_base = + _wire_bdk_transaction_is_coin_basePtr.asFunction< + void Function(int, ffi.Pointer)>(); - void wire_TransactionBase_is_explicitly_rbf( + void wire_bdk_transaction_is_explicitly_rbf( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire_TransactionBase_is_explicitly_rbf( + return _wire_bdk_transaction_is_explicitly_rbf( port_, that, ); } - late final _wire_TransactionBase_is_explicitly_rbfPtr = _lookup< + late final _wire_bdk_transaction_is_explicitly_rbfPtr = _lookup< ffi.NativeFunction< ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_TransactionBase_is_explicitly_rbf'); - late final _wire_TransactionBase_is_explicitly_rbf = - _wire_TransactionBase_is_explicitly_rbfPtr.asFunction< - void Function(int, ffi.Pointer)>(); + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_transaction_is_explicitly_rbf'); + late final _wire_bdk_transaction_is_explicitly_rbf = + _wire_bdk_transaction_is_explicitly_rbfPtr.asFunction< + void Function(int, ffi.Pointer)>(); - void wire_TransactionBase_is_lock_time_enabled( + void wire_bdk_transaction_is_lock_time_enabled( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire_TransactionBase_is_lock_time_enabled( + return _wire_bdk_transaction_is_lock_time_enabled( port_, that, ); } - late final _wire_TransactionBase_is_lock_time_enabledPtr = _lookup< + late final _wire_bdk_transaction_is_lock_time_enabledPtr = _lookup< ffi.NativeFunction< ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_TransactionBase_is_lock_time_enabled'); - late final _wire_TransactionBase_is_lock_time_enabled = - _wire_TransactionBase_is_lock_time_enabledPtr.asFunction< - void Function(int, ffi.Pointer)>(); + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_transaction_is_lock_time_enabled'); + late final _wire_bdk_transaction_is_lock_time_enabled = + _wire_bdk_transaction_is_lock_time_enabledPtr.asFunction< + void Function(int, ffi.Pointer)>(); - void wire_TransactionBase_lock_time( + void wire_bdk_transaction_lock_time( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire_TransactionBase_lock_time( + return _wire_bdk_transaction_lock_time( port_, that, ); } - late final _wire_TransactionBase_lock_timePtr = _lookup< + late final _wire_bdk_transaction_lock_timePtr = _lookup< ffi.NativeFunction< ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_TransactionBase_lock_time'); - late final _wire_TransactionBase_lock_time = - _wire_TransactionBase_lock_timePtr.asFunction< - void Function(int, ffi.Pointer)>(); + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_transaction_lock_time'); + late final _wire_bdk_transaction_lock_time = + _wire_bdk_transaction_lock_timePtr.asFunction< + void Function(int, ffi.Pointer)>(); - void wire_TransactionBase_new( + void wire_bdk_transaction_new( int port_, - ffi.Pointer transaction_bytes, + int version, + ffi.Pointer lock_time, + ffi.Pointer input, + ffi.Pointer output, ) { - return _wire_TransactionBase_new( + return _wire_bdk_transaction_new( port_, - transaction_bytes, + version, + lock_time, + input, + output, ); } - late final _wire_TransactionBase_newPtr = _lookup< + late final _wire_bdk_transaction_newPtr = _lookup< ffi.NativeFunction< ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_TransactionBase_new'); - late final _wire_TransactionBase_new = - _wire_TransactionBase_newPtr.asFunction< - void Function(int, ffi.Pointer)>(); + ffi.Int64, + ffi.Int32, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_transaction_new'); + late final _wire_bdk_transaction_new = + _wire_bdk_transaction_newPtr.asFunction< + void Function( + int, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - void wire_TransactionBase_output( + void wire_bdk_transaction_output( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire_TransactionBase_output( + return _wire_bdk_transaction_output( port_, that, ); } - late final _wire_TransactionBase_outputPtr = _lookup< + late final _wire_bdk_transaction_outputPtr = _lookup< ffi.NativeFunction< ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_TransactionBase_output'); - late final _wire_TransactionBase_output = _wire_TransactionBase_outputPtr - .asFunction)>(); + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_transaction_output'); + late final _wire_bdk_transaction_output = _wire_bdk_transaction_outputPtr + .asFunction)>(); - void wire_TransactionBase_serialize( + void wire_bdk_transaction_serialize( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire_TransactionBase_serialize( + return _wire_bdk_transaction_serialize( port_, that, ); } - late final _wire_TransactionBase_serializePtr = _lookup< + late final _wire_bdk_transaction_serializePtr = _lookup< ffi.NativeFunction< ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_TransactionBase_serialize'); - late final _wire_TransactionBase_serialize = - _wire_TransactionBase_serializePtr.asFunction< - void Function(int, ffi.Pointer)>(); + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_transaction_serialize'); + late final _wire_bdk_transaction_serialize = + _wire_bdk_transaction_serializePtr.asFunction< + void Function(int, ffi.Pointer)>(); - void wire_TransactionBase_size( + void wire_bdk_transaction_size( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire_TransactionBase_size( + return _wire_bdk_transaction_size( port_, that, ); } - late final _wire_TransactionBase_sizePtr = _lookup< + late final _wire_bdk_transaction_sizePtr = _lookup< ffi.NativeFunction< ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_TransactionBase_size'); - late final _wire_TransactionBase_size = _wire_TransactionBase_sizePtr - .asFunction)>(); + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_transaction_size'); + late final _wire_bdk_transaction_size = _wire_bdk_transaction_sizePtr + .asFunction)>(); - void wire_TransactionBase_txid( + void wire_bdk_transaction_txid( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire_TransactionBase_txid( + return _wire_bdk_transaction_txid( port_, that, ); } - late final _wire_TransactionBase_txidPtr = _lookup< + late final _wire_bdk_transaction_txidPtr = _lookup< ffi.NativeFunction< ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_TransactionBase_txid'); - late final _wire_TransactionBase_txid = _wire_TransactionBase_txidPtr - .asFunction)>(); + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_transaction_txid'); + late final _wire_bdk_transaction_txid = _wire_bdk_transaction_txidPtr + .asFunction)>(); - void wire_TransactionBase_version( + void wire_bdk_transaction_version( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire_TransactionBase_version( + return _wire_bdk_transaction_version( port_, that, ); } - late final _wire_TransactionBase_versionPtr = _lookup< + late final _wire_bdk_transaction_versionPtr = _lookup< ffi.NativeFunction< ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_TransactionBase_version'); - late final _wire_TransactionBase_version = _wire_TransactionBase_versionPtr - .asFunction)>(); + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_transaction_version'); + late final _wire_bdk_transaction_version = _wire_bdk_transaction_versionPtr + .asFunction)>(); - void wire_TransactionBase_vsize( + void wire_bdk_transaction_vsize( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire_TransactionBase_vsize( + return _wire_bdk_transaction_vsize( port_, that, ); } - late final _wire_TransactionBase_vsizePtr = _lookup< + late final _wire_bdk_transaction_vsizePtr = _lookup< ffi.NativeFunction< ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_TransactionBase_vsize'); - late final _wire_TransactionBase_vsize = _wire_TransactionBase_vsizePtr - .asFunction)>(); + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_transaction_vsize'); + late final _wire_bdk_transaction_vsize = _wire_bdk_transaction_vsizePtr + .asFunction)>(); - void wire_TransactionBase_weight( + void wire_bdk_transaction_weight( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire_TransactionBase_weight( + return _wire_bdk_transaction_weight( port_, that, ); } - late final _wire_TransactionBase_weightPtr = _lookup< + late final _wire_bdk_transaction_weightPtr = _lookup< ffi.NativeFunction< ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_TransactionBase_weight'); - late final _wire_TransactionBase_weight = _wire_TransactionBase_weightPtr - .asFunction)>(); + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_transaction_weight'); + late final _wire_bdk_transaction_weight = _wire_bdk_transaction_weightPtr + .asFunction)>(); - void wire_WalletBase_get_address( + void wire_bdk_wallet_get_address( int port_, - ffi.Pointer that, + ffi.Pointer ptr, ffi.Pointer address_index, ) { - return _wire_WalletBase_get_address( + return _wire_bdk_wallet_get_address( port_, - that, + ptr, address_index, ); } - late final _wire_WalletBase_get_addressPtr = _lookup< + late final _wire_bdk_wallet_get_addressPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer, + ffi.Void Function(ffi.Int64, ffi.Pointer, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_WalletBase_get_address'); - late final _wire_WalletBase_get_address = - _wire_WalletBase_get_addressPtr.asFunction< - void Function(int, ffi.Pointer, + 'frbgen_bdk_flutter_wire_bdk_wallet_get_address'); + late final _wire_bdk_wallet_get_address = + _wire_bdk_wallet_get_addressPtr.asFunction< + void Function(int, ffi.Pointer, ffi.Pointer)>(); - void wire_WalletBase_get_balance( + void wire_bdk_wallet_get_balance( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire_WalletBase_get_balance( + return _wire_bdk_wallet_get_balance( port_, that, ); } - late final _wire_WalletBase_get_balancePtr = _lookup< + late final _wire_bdk_wallet_get_balancePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_WalletBase_get_balance'); - late final _wire_WalletBase_get_balance = _wire_WalletBase_get_balancePtr - .asFunction)>(); + ffi.Void Function(ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_wallet_get_balance'); + late final _wire_bdk_wallet_get_balance = _wire_bdk_wallet_get_balancePtr + .asFunction)>(); - void wire_WalletBase_get_descriptor_for_keychain( + void wire_bdk_wallet_get_descriptor_for_keychain( int port_, - ffi.Pointer ptr, + ffi.Pointer ptr, int keychain, ) { - return _wire_WalletBase_get_descriptor_for_keychain( + return _wire_bdk_wallet_get_descriptor_for_keychain( port_, ptr, keychain, ); } - late final _wire_WalletBase_get_descriptor_for_keychainPtr = _lookup< + late final _wire_bdk_wallet_get_descriptor_for_keychainPtr = _lookup< ffi.NativeFunction< ffi.Void Function( - ffi.Int64, ffi.Pointer, ffi.Int32)>>( - 'frbgen_bdk_flutter_wire_WalletBase_get_descriptor_for_keychain'); - late final _wire_WalletBase_get_descriptor_for_keychain = - _wire_WalletBase_get_descriptor_for_keychainPtr.asFunction< - void Function(int, ffi.Pointer, int)>(); + ffi.Int64, ffi.Pointer, ffi.Int32)>>( + 'frbgen_bdk_flutter_wire_bdk_wallet_get_descriptor_for_keychain'); + late final _wire_bdk_wallet_get_descriptor_for_keychain = + _wire_bdk_wallet_get_descriptor_for_keychainPtr.asFunction< + void Function(int, ffi.Pointer, int)>(); - void wire_WalletBase_get_internal_address( + void wire_bdk_wallet_get_internal_address( int port_, - ffi.Pointer that, + ffi.Pointer ptr, ffi.Pointer address_index, ) { - return _wire_WalletBase_get_internal_address( + return _wire_bdk_wallet_get_internal_address( port_, - that, + ptr, address_index, ); } - late final _wire_WalletBase_get_internal_addressPtr = _lookup< + late final _wire_bdk_wallet_get_internal_addressPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer, + ffi.Void Function(ffi.Int64, ffi.Pointer, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_WalletBase_get_internal_address'); - late final _wire_WalletBase_get_internal_address = - _wire_WalletBase_get_internal_addressPtr.asFunction< - void Function(int, ffi.Pointer, + 'frbgen_bdk_flutter_wire_bdk_wallet_get_internal_address'); + late final _wire_bdk_wallet_get_internal_address = + _wire_bdk_wallet_get_internal_addressPtr.asFunction< + void Function(int, ffi.Pointer, ffi.Pointer)>(); - void wire_WalletBase_get_psbt_input( + void wire_bdk_wallet_get_psbt_input( int port_, - ffi.Pointer that, + ffi.Pointer that, ffi.Pointer utxo, bool only_witness_utxo, ffi.Pointer sighash_type, ) { - return _wire_WalletBase_get_psbt_input( + return _wire_bdk_wallet_get_psbt_input( port_, that, utxo, @@ -4510,108 +4601,108 @@ class BdkCoreWire implements BaseWire { ); } - late final _wire_WalletBase_get_psbt_inputPtr = _lookup< + late final _wire_bdk_wallet_get_psbt_inputPtr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, - ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Bool, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_WalletBase_get_psbt_input'); - late final _wire_WalletBase_get_psbt_input = - _wire_WalletBase_get_psbt_inputPtr.asFunction< + 'frbgen_bdk_flutter_wire_bdk_wallet_get_psbt_input'); + late final _wire_bdk_wallet_get_psbt_input = + _wire_bdk_wallet_get_psbt_inputPtr.asFunction< void Function( int, - ffi.Pointer, + ffi.Pointer, ffi.Pointer, bool, ffi.Pointer)>(); - void wire_WalletBase_is_mine( + void wire_bdk_wallet_is_mine( int port_, - ffi.Pointer that, - ffi.Pointer script, + ffi.Pointer that, + ffi.Pointer script, ) { - return _wire_WalletBase_is_mine( + return _wire_bdk_wallet_is_mine( port_, that, script, ); } - late final _wire_WalletBase_is_minePtr = _lookup< + late final _wire_bdk_wallet_is_minePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_WalletBase_is_mine'); - late final _wire_WalletBase_is_mine = _wire_WalletBase_is_minePtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); - - void wire_WalletBase_list_transactions( + ffi.Void Function(ffi.Int64, ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_wallet_is_mine'); + late final _wire_bdk_wallet_is_mine = _wire_bdk_wallet_is_minePtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer)>(); + + void wire_bdk_wallet_list_transactions( int port_, - ffi.Pointer that, + ffi.Pointer that, bool include_raw, ) { - return _wire_WalletBase_list_transactions( + return _wire_bdk_wallet_list_transactions( port_, that, include_raw, ); } - late final _wire_WalletBase_list_transactionsPtr = _lookup< + late final _wire_bdk_wallet_list_transactionsPtr = _lookup< ffi.NativeFunction< ffi.Void Function( - ffi.Int64, ffi.Pointer, ffi.Bool)>>( - 'frbgen_bdk_flutter_wire_WalletBase_list_transactions'); - late final _wire_WalletBase_list_transactions = - _wire_WalletBase_list_transactionsPtr.asFunction< - void Function(int, ffi.Pointer, bool)>(); + ffi.Int64, ffi.Pointer, ffi.Bool)>>( + 'frbgen_bdk_flutter_wire_bdk_wallet_list_transactions'); + late final _wire_bdk_wallet_list_transactions = + _wire_bdk_wallet_list_transactionsPtr.asFunction< + void Function(int, ffi.Pointer, bool)>(); - void wire_WalletBase_list_unspent( + void wire_bdk_wallet_list_unspent( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire_WalletBase_list_unspent( + return _wire_bdk_wallet_list_unspent( port_, that, ); } - late final _wire_WalletBase_list_unspentPtr = _lookup< + late final _wire_bdk_wallet_list_unspentPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_WalletBase_list_unspent'); - late final _wire_WalletBase_list_unspent = _wire_WalletBase_list_unspentPtr - .asFunction)>(); + ffi.Void Function(ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_wallet_list_unspent'); + late final _wire_bdk_wallet_list_unspent = _wire_bdk_wallet_list_unspentPtr + .asFunction)>(); - void wire_WalletBase_network( + void wire_bdk_wallet_network( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire_WalletBase_network( + return _wire_bdk_wallet_network( port_, that, ); } - late final _wire_WalletBase_networkPtr = _lookup< + late final _wire_bdk_wallet_networkPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_WalletBase_network'); - late final _wire_WalletBase_network = _wire_WalletBase_networkPtr - .asFunction)>(); + ffi.Void Function(ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_wallet_network'); + late final _wire_bdk_wallet_network = _wire_bdk_wallet_networkPtr + .asFunction)>(); - void wire_WalletBase_new( + void wire_bdk_wallet_new( int port_, - ffi.Pointer descriptor, - ffi.Pointer change_descriptor, + ffi.Pointer descriptor, + ffi.Pointer change_descriptor, int network, ffi.Pointer database_config, ) { - return _wire_WalletBase_new( + return _wire_bdk_wallet_new( port_, descriptor, change_descriptor, @@ -4620,30 +4711,30 @@ class BdkCoreWire implements BaseWire { ); } - late final _wire_WalletBase_newPtr = _lookup< + late final _wire_bdk_wallet_newPtr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, - ffi.Pointer, - ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ffi.Int32, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_WalletBase_new'); - late final _wire_WalletBase_new = _wire_WalletBase_newPtr.asFunction< + 'frbgen_bdk_flutter_wire_bdk_wallet_new'); + late final _wire_bdk_wallet_new = _wire_bdk_wallet_newPtr.asFunction< void Function( int, - ffi.Pointer, - ffi.Pointer, + ffi.Pointer, + ffi.Pointer, int, ffi.Pointer)>(); - void wire_WalletBase_sign( + void wire_bdk_wallet_sign( int port_, - ffi.Pointer ptr, - ffi.Pointer psbt, + ffi.Pointer ptr, + ffi.Pointer psbt, ffi.Pointer sign_options, ) { - return _wire_WalletBase_sign( + return _wire_bdk_wallet_sign( port_, ptr, psbt, @@ -4651,48 +4742,48 @@ class BdkCoreWire implements BaseWire { ); } - late final _wire_WalletBase_signPtr = _lookup< + late final _wire_bdk_wallet_signPtr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, - ffi.Pointer, - ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_WalletBase_sign'); - late final _wire_WalletBase_sign = _wire_WalletBase_signPtr.asFunction< + 'frbgen_bdk_flutter_wire_bdk_wallet_sign'); + late final _wire_bdk_wallet_sign = _wire_bdk_wallet_signPtr.asFunction< void Function( int, - ffi.Pointer, - ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - void wire_WalletBase_sync( + void wire_bdk_wallet_sync( int port_, - ffi.Pointer ptr, - ffi.Pointer blockchain, + ffi.Pointer ptr, + ffi.Pointer blockchain, ) { - return _wire_WalletBase_sync( + return _wire_bdk_wallet_sync( port_, ptr, blockchain, ); } - late final _wire_WalletBase_syncPtr = _lookup< + late final _wire_bdk_wallet_syncPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_WalletBase_sync'); - late final _wire_WalletBase_sync = _wire_WalletBase_syncPtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); + ffi.Void Function(ffi.Int64, ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_wallet_sync'); + late final _wire_bdk_wallet_sync = _wire_bdk_wallet_syncPtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer)>(); void wire_finish_bump_fee_tx_builder( int port_, ffi.Pointer txid, double fee_rate, - ffi.Pointer allow_shrinking, - ffi.Pointer wallet, + ffi.Pointer allow_shrinking, + ffi.Pointer wallet, bool enable_rbf, ffi.Pointer n_sequence, ) { @@ -4713,8 +4804,8 @@ class BdkCoreWire implements BaseWire { ffi.Int64, ffi.Pointer, ffi.Float, - ffi.Pointer, - ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ffi.Bool, ffi.Pointer)>>( 'frbgen_bdk_flutter_wire_finish_bump_fee_tx_builder'); @@ -4724,14 +4815,14 @@ class BdkCoreWire implements BaseWire { int, ffi.Pointer, double, - ffi.Pointer, - ffi.Pointer, + ffi.Pointer, + ffi.Pointer, bool, ffi.Pointer)>(); void wire_tx_builder_finish( int port_, - ffi.Pointer wallet, + ffi.Pointer wallet, ffi.Pointer recipients, ffi.Pointer utxos, ffi.Pointer foreign_utxo, @@ -4741,7 +4832,7 @@ class BdkCoreWire implements BaseWire { ffi.Pointer fee_rate, ffi.Pointer fee_absolute, bool drain_wallet, - ffi.Pointer drain_to, + ffi.Pointer drain_to, ffi.Pointer rbf, ffi.Pointer data, ) { @@ -4767,7 +4858,7 @@ class BdkCoreWire implements BaseWire { ffi.NativeFunction< ffi.Void Function( ffi.Int64, - ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, @@ -4777,14 +4868,14 @@ class BdkCoreWire implements BaseWire { ffi.Pointer, ffi.Pointer, ffi.Bool, - ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Pointer)>>( 'frbgen_bdk_flutter_wire_tx_builder_finish'); late final _wire_tx_builder_finish = _wire_tx_builder_finishPtr.asFunction< void Function( int, - ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, @@ -4794,7 +4885,7 @@ class BdkCoreWire implements BaseWire { ffi.Pointer, ffi.Pointer, bool, - ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -5100,17 +5191,6 @@ class BdkCoreWire implements BaseWire { _rust_arc_decrement_strong_count_RustOpaque_keysbip39MnemonicPtr .asFunction)>(); - ffi.Pointer cst_new_box_autoadd_address_base() { - return _cst_new_box_autoadd_address_base(); - } - - late final _cst_new_box_autoadd_address_basePtr = _lookup< - ffi.NativeFunction Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_address_base'); - late final _cst_new_box_autoadd_address_base = - _cst_new_box_autoadd_address_basePtr - .asFunction Function()>(); - ffi.Pointer cst_new_box_autoadd_address_error() { return _cst_new_box_autoadd_address_error(); } @@ -5133,6 +5213,132 @@ class BdkCoreWire implements BaseWire { _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_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(); } @@ -5144,17 +5350,6 @@ class BdkCoreWire implements BaseWire { _cst_new_box_autoadd_block_timePtr .asFunction Function()>(); - ffi.Pointer cst_new_box_autoadd_blockchain_base() { - return _cst_new_box_autoadd_blockchain_base(); - } - - late final _cst_new_box_autoadd_blockchain_basePtr = _lookup< - ffi.NativeFunction Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_blockchain_base'); - late final _cst_new_box_autoadd_blockchain_base = - _cst_new_box_autoadd_blockchain_basePtr - .asFunction Function()>(); - ffi.Pointer cst_new_box_autoadd_blockchain_config() { return _cst_new_box_autoadd_blockchain_config(); @@ -5190,30 +5385,6 @@ class BdkCoreWire implements BaseWire { _cst_new_box_autoadd_database_configPtr .asFunction Function()>(); - ffi.Pointer - cst_new_box_autoadd_derivation_path_base() { - return _cst_new_box_autoadd_derivation_path_base(); - } - - late final _cst_new_box_autoadd_derivation_path_basePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_derivation_path_base'); - late final _cst_new_box_autoadd_derivation_path_base = - _cst_new_box_autoadd_derivation_path_basePtr - .asFunction Function()>(); - - ffi.Pointer cst_new_box_autoadd_descriptor_base() { - return _cst_new_box_autoadd_descriptor_base(); - } - - late final _cst_new_box_autoadd_descriptor_basePtr = _lookup< - ffi.NativeFunction Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_descriptor_base'); - late final _cst_new_box_autoadd_descriptor_base = - _cst_new_box_autoadd_descriptor_basePtr - .asFunction Function()>(); - ffi.Pointer cst_new_box_autoadd_descriptor_error() { return _cst_new_box_autoadd_descriptor_error(); @@ -5227,32 +5398,6 @@ class BdkCoreWire implements BaseWire { _cst_new_box_autoadd_descriptor_errorPtr .asFunction Function()>(); - ffi.Pointer - cst_new_box_autoadd_descriptor_public_key_base() { - return _cst_new_box_autoadd_descriptor_public_key_base(); - } - - late final _cst_new_box_autoadd_descriptor_public_key_basePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_descriptor_public_key_base'); - late final _cst_new_box_autoadd_descriptor_public_key_base = - _cst_new_box_autoadd_descriptor_public_key_basePtr.asFunction< - ffi.Pointer Function()>(); - - ffi.Pointer - cst_new_box_autoadd_descriptor_secret_key_base() { - return _cst_new_box_autoadd_descriptor_secret_key_base(); - } - - late final _cst_new_box_autoadd_descriptor_secret_key_basePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_descriptor_secret_key_base'); - late final _cst_new_box_autoadd_descriptor_secret_key_base = - _cst_new_box_autoadd_descriptor_secret_key_basePtr.asFunction< - ffi.Pointer Function()>(); - ffi.Pointer cst_new_box_autoadd_electrum_config() { return _cst_new_box_autoadd_electrum_config(); } @@ -5320,16 +5465,15 @@ class BdkCoreWire implements BaseWire { _cst_new_box_autoadd_local_utxoPtr .asFunction Function()>(); - ffi.Pointer cst_new_box_autoadd_mnemonic_base() { - return _cst_new_box_autoadd_mnemonic_base(); + ffi.Pointer cst_new_box_autoadd_lock_time() { + return _cst_new_box_autoadd_lock_time(); } - late final _cst_new_box_autoadd_mnemonic_basePtr = _lookup< - ffi.NativeFunction Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_mnemonic_base'); - late final _cst_new_box_autoadd_mnemonic_base = - _cst_new_box_autoadd_mnemonic_basePtr - .asFunction Function()>(); + 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(); @@ -5341,16 +5485,6 @@ class BdkCoreWire implements BaseWire { late final _cst_new_box_autoadd_out_point = _cst_new_box_autoadd_out_pointPtr .asFunction Function()>(); - ffi.Pointer cst_new_box_autoadd_psbt_base() { - return _cst_new_box_autoadd_psbt_base(); - } - - late final _cst_new_box_autoadd_psbt_basePtr = - _lookup Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_psbt_base'); - late final _cst_new_box_autoadd_psbt_base = _cst_new_box_autoadd_psbt_basePtr - .asFunction Function()>(); - ffi.Pointer cst_new_box_autoadd_psbt_sig_hash_type() { return _cst_new_box_autoadd_psbt_sig_hash_type(); @@ -5409,17 +5543,6 @@ class BdkCoreWire implements BaseWire { _cst_new_box_autoadd_rpc_sync_paramsPtr .asFunction Function()>(); - ffi.Pointer cst_new_box_autoadd_script_buf_base() { - return _cst_new_box_autoadd_script_buf_base(); - } - - late final _cst_new_box_autoadd_script_buf_basePtr = _lookup< - ffi.NativeFunction Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_script_buf_base'); - late final _cst_new_box_autoadd_script_buf_base = - _cst_new_box_autoadd_script_buf_basePtr - .asFunction Function()>(); - ffi.Pointer cst_new_box_autoadd_sign_options() { return _cst_new_box_autoadd_sign_options(); } @@ -5457,19 +5580,6 @@ class BdkCoreWire implements BaseWire { _cst_new_box_autoadd_sqlite_db_configurationPtr.asFunction< ffi.Pointer Function()>(); - ffi.Pointer - cst_new_box_autoadd_transaction_base() { - return _cst_new_box_autoadd_transaction_base(); - } - - late final _cst_new_box_autoadd_transaction_basePtr = _lookup< - ffi - .NativeFunction Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_transaction_base'); - late final _cst_new_box_autoadd_transaction_base = - _cst_new_box_autoadd_transaction_basePtr - .asFunction Function()>(); - ffi.Pointer cst_new_box_autoadd_u_32( int value, ) { @@ -5512,17 +5622,6 @@ class BdkCoreWire implements BaseWire { late final _cst_new_box_autoadd_u_8 = _cst_new_box_autoadd_u_8Ptr .asFunction Function(int)>(); - ffi.Pointer cst_new_box_autoadd_wallet_base() { - return _cst_new_box_autoadd_wallet_base(); - } - - late final _cst_new_box_autoadd_wallet_basePtr = - _lookup Function()>>( - 'frbgen_bdk_flutter_cst_new_box_autoadd_wallet_base'); - late final _cst_new_box_autoadd_wallet_base = - _cst_new_box_autoadd_wallet_basePtr - .asFunction Function()>(); - ffi.Pointer cst_new_list_list_prim_u_8_strict( int len, @@ -5680,7 +5779,7 @@ typedef DartPostCObjectFnType = ffi.Pointer< ffi.Bool Function(DartPort port_id, ffi.Pointer message)>>; typedef DartPort = ffi.Int64; -final class wire_cst_blockchain_base extends ffi.Struct { +final class wire_cst_bdk_blockchain extends ffi.Struct { @ffi.UintPtr() external int ptr; } @@ -5692,7 +5791,7 @@ final class wire_cst_list_prim_u_8_strict extends ffi.Struct { external int len; } -final class wire_cst_transaction_base extends ffi.Struct { +final class wire_cst_bdk_transaction extends ffi.Struct { external ffi.Pointer inner; } @@ -5803,7 +5902,7 @@ final class wire_cst_blockchain_config extends ffi.Struct { external BlockchainConfigKind kind; } -final class wire_cst_descriptor_base extends ffi.Struct { +final class wire_cst_bdk_descriptor extends ffi.Struct { @ffi.UintPtr() external int extended_descriptor; @@ -5811,22 +5910,22 @@ final class wire_cst_descriptor_base extends ffi.Struct { external int key_map; } -final class wire_cst_descriptor_secret_key_base extends ffi.Struct { +final class wire_cst_bdk_descriptor_secret_key extends ffi.Struct { @ffi.UintPtr() external int ptr; } -final class wire_cst_descriptor_public_key_base extends ffi.Struct { +final class wire_cst_bdk_descriptor_public_key extends ffi.Struct { @ffi.UintPtr() external int ptr; } -final class wire_cst_derivation_path_base extends ffi.Struct { +final class wire_cst_bdk_derivation_path extends ffi.Struct { @ffi.UintPtr() external int ptr; } -final class wire_cst_mnemonic_base extends ffi.Struct { +final class wire_cst_bdk_mnemonic extends ffi.Struct { @ffi.UintPtr() external int ptr; } @@ -5838,46 +5937,41 @@ final class wire_cst_list_prim_u_8_loose extends ffi.Struct { external int len; } -final class wire_cst_psbt_base extends ffi.Struct { +final class wire_cst_bdk_psbt extends ffi.Struct { @ffi.UintPtr() external int ptr; } -final class wire_cst_address_base extends ffi.Struct { +final class wire_cst_bdk_address extends ffi.Struct { @ffi.UintPtr() external int ptr; } -final class wire_cst_script_buf_base extends ffi.Struct { +final class wire_cst_bdk_script_buf extends ffi.Struct { external ffi.Pointer bytes; } -final class wire_cst_wallet_base extends ffi.Struct { - @ffi.UintPtr() - external int ptr; -} - -final class wire_cst_AddressIndex_Peek extends ffi.Struct { +final class wire_cst_LockTime_Blocks extends ffi.Struct { @ffi.Uint32() - external int index; + external int field0; } -final class wire_cst_AddressIndex_Reset extends ffi.Struct { +final class wire_cst_LockTime_Seconds extends ffi.Struct { @ffi.Uint32() - external int index; + external int field0; } -final class AddressIndexKind extends ffi.Union { - external wire_cst_AddressIndex_Peek Peek; +final class LockTimeKind extends ffi.Union { + external wire_cst_LockTime_Blocks Blocks; - external wire_cst_AddressIndex_Reset Reset; + external wire_cst_LockTime_Seconds Seconds; } -final class wire_cst_address_index extends ffi.Struct { +final class wire_cst_lock_time extends ffi.Struct { @ffi.Int32() external int tag; - external AddressIndexKind kind; + external LockTimeKind kind; } final class wire_cst_out_point extends ffi.Struct { @@ -5887,11 +5981,71 @@ final class wire_cst_out_point extends ffi.Struct { 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_script_buf_base script_pubkey; + 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 { @@ -5968,7 +6122,7 @@ final class wire_cst_sign_options extends ffi.Struct { } final class wire_cst_script_amount extends ffi.Struct { - external wire_cst_script_buf_base script; + external wire_cst_bdk_script_buf script; @ffi.Uint64() external int amount; @@ -6252,13 +6406,6 @@ final class wire_cst_hex_error extends ffi.Struct { external HexErrorKind kind; } -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_list_local_utxo extends ffi.Struct { external ffi.Pointer ptr; @@ -6267,7 +6414,7 @@ final class wire_cst_list_local_utxo extends ffi.Struct { } final class wire_cst_transaction_details extends ffi.Struct { - external ffi.Pointer transaction; + external ffi.Pointer transaction; external ffi.Pointer txid; @@ -6289,38 +6436,6 @@ final class wire_cst_list_transaction_details extends ffi.Struct { external int len; } -final class wire_cst_tx_in extends ffi.Struct { - external wire_cst_out_point previous_output; - - external wire_cst_script_buf_base 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_list_tx_out extends ffi.Struct { - external ffi.Pointer ptr; - - @ffi.Int32() - external int len; -} - -final class wire_cst_address_info extends ffi.Struct { - @ffi.Uint32() - external int index; - - external ffi.Pointer address; -} - final class wire_cst_balance extends ffi.Struct { @ffi.Uint64() external int immature; @@ -6485,6 +6600,18 @@ 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; @@ -6549,6 +6676,12 @@ final class BdkErrorKind extends ffi.Union { 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 { @@ -6588,8 +6721,15 @@ final class wire_cst_payload extends ffi.Struct { external PayloadKind kind; } -final class wire_cst_record_psbt_base_transaction_details extends ffi.Struct { - external wire_cst_psbt_base field0; +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; } diff --git a/lib/src/generated/frb_generated.web.dart b/lib/src/generated/frb_generated.web.dart index 32fbc33e..c30e669d 100644 --- a/lib/src/generated/frb_generated.web.dart +++ b/lib/src/generated/frb_generated.web.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.28. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31. // 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 @@ -15,8 +15,8 @@ import 'dart:convert'; import 'frb_generated.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated_web.dart'; -abstract class BdkCoreApiImplPlatform extends BaseApiImpl { - BdkCoreApiImplPlatform({ +abstract class CApiApiImplPlatform extends BaseApiImpl { + CApiApiImplPlatform({ required super.handler, required super.wire, required super.generalizedFrbRustBinding, @@ -100,41 +100,62 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected String dco_decode_String(dynamic raw); - @protected - AddressBase dco_decode_address_base(dynamic raw); - @protected AddressError dco_decode_address_error(dynamic raw); @protected AddressIndex dco_decode_address_index(dynamic raw); - @protected - AddressInfo dco_decode_address_info(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 - BlockTime dco_decode_block_time(dynamic raw); + BdkMnemonic dco_decode_bdk_mnemonic(dynamic raw); @protected - BlockchainBase dco_decode_blockchain_base(dynamic raw); + BdkPsbt dco_decode_bdk_psbt(dynamic raw); @protected - BlockchainConfig dco_decode_blockchain_config(dynamic raw); + BdkScriptBuf dco_decode_bdk_script_buf(dynamic raw); @protected - bool dco_decode_bool(dynamic raw); + BdkTransaction dco_decode_bdk_transaction(dynamic raw); @protected - AddressBase dco_decode_box_autoadd_address_base(dynamic raw); + 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); @@ -143,36 +164,54 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { AddressIndex dco_decode_box_autoadd_address_index(dynamic raw); @protected - BlockTime dco_decode_box_autoadd_block_time(dynamic raw); + BdkAddress dco_decode_box_autoadd_bdk_address(dynamic raw); @protected - BlockchainBase dco_decode_box_autoadd_blockchain_base(dynamic raw); + BdkBlockchain dco_decode_box_autoadd_bdk_blockchain(dynamic raw); @protected - BlockchainConfig dco_decode_box_autoadd_blockchain_config(dynamic raw); + BdkDerivationPath dco_decode_box_autoadd_bdk_derivation_path(dynamic raw); @protected - ConsensusError dco_decode_box_autoadd_consensus_error(dynamic raw); + BdkDescriptor dco_decode_box_autoadd_bdk_descriptor(dynamic raw); @protected - DatabaseConfig dco_decode_box_autoadd_database_config(dynamic raw); + BdkDescriptorPublicKey dco_decode_box_autoadd_bdk_descriptor_public_key( + dynamic raw); @protected - DerivationPathBase dco_decode_box_autoadd_derivation_path_base(dynamic raw); + BdkDescriptorSecretKey dco_decode_box_autoadd_bdk_descriptor_secret_key( + dynamic raw); @protected - DescriptorBase dco_decode_box_autoadd_descriptor_base(dynamic raw); + BdkMnemonic dco_decode_box_autoadd_bdk_mnemonic(dynamic raw); @protected - DescriptorError dco_decode_box_autoadd_descriptor_error(dynamic raw); + BdkPsbt dco_decode_box_autoadd_bdk_psbt(dynamic raw); @protected - DescriptorPublicKeyBase dco_decode_box_autoadd_descriptor_public_key_base( - dynamic raw); + BdkScriptBuf dco_decode_box_autoadd_bdk_script_buf(dynamic raw); @protected - DescriptorSecretKeyBase dco_decode_box_autoadd_descriptor_secret_key_base( - dynamic raw); + 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 + 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); @@ -193,14 +232,11 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { LocalUtxo dco_decode_box_autoadd_local_utxo(dynamic raw); @protected - MnemonicBase dco_decode_box_autoadd_mnemonic_base(dynamic raw); + LockTime dco_decode_box_autoadd_lock_time(dynamic raw); @protected OutPoint dco_decode_box_autoadd_out_point(dynamic raw); - @protected - PsbtBase dco_decode_box_autoadd_psbt_base(dynamic raw); - @protected PsbtSigHashType dco_decode_box_autoadd_psbt_sig_hash_type(dynamic raw); @@ -217,9 +253,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected RpcSyncParams dco_decode_box_autoadd_rpc_sync_params(dynamic raw); - @protected - ScriptBufBase dco_decode_box_autoadd_script_buf_base(dynamic raw); - @protected SignOptions dco_decode_box_autoadd_sign_options(dynamic raw); @@ -230,9 +263,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { SqliteDbConfiguration dco_decode_box_autoadd_sqlite_db_configuration( dynamic raw); - @protected - TransactionBase dco_decode_box_autoadd_transaction_base(dynamic raw); - @protected int dco_decode_box_autoadd_u_32(dynamic raw); @@ -242,9 +272,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected int dco_decode_box_autoadd_u_8(dynamic raw); - @protected - WalletBase dco_decode_box_autoadd_wallet_base(dynamic raw); - @protected ChangeSpendPolicy dco_decode_change_spend_policy(dynamic raw); @@ -254,21 +281,9 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected DatabaseConfig dco_decode_database_config(dynamic raw); - @protected - DerivationPathBase dco_decode_derivation_path_base(dynamic raw); - - @protected - DescriptorBase dco_decode_descriptor_base(dynamic raw); - @protected DescriptorError dco_decode_descriptor_error(dynamic raw); - @protected - DescriptorPublicKeyBase dco_decode_descriptor_public_key_base(dynamic raw); - - @protected - DescriptorSecretKeyBase dco_decode_descriptor_secret_key_base(dynamic raw); - @protected ElectrumConfig dco_decode_electrum_config(dynamic raw); @@ -324,7 +339,7 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { LocalUtxo dco_decode_local_utxo(dynamic raw); @protected - MnemonicBase dco_decode_mnemonic_base(dynamic raw); + LockTime dco_decode_lock_time(dynamic raw); @protected Network dco_decode_network(dynamic raw); @@ -333,13 +348,19 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { String? dco_decode_opt_String(dynamic raw); @protected - AddressBase? dco_decode_opt_box_autoadd_address_base(dynamic raw); + BdkAddress? dco_decode_opt_box_autoadd_bdk_address(dynamic raw); @protected - BlockTime? dco_decode_opt_box_autoadd_block_time(dynamic raw); + BdkDescriptor? dco_decode_opt_box_autoadd_bdk_descriptor(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 - DescriptorBase? dco_decode_opt_box_autoadd_descriptor_base(dynamic raw); + BlockTime? dco_decode_opt_box_autoadd_block_time(dynamic raw); @protected double? dco_decode_opt_box_autoadd_f_32(dynamic raw); @@ -360,15 +381,9 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected RpcSyncParams? dco_decode_opt_box_autoadd_rpc_sync_params(dynamic raw); - @protected - ScriptBufBase? dco_decode_opt_box_autoadd_script_buf_base(dynamic raw); - @protected SignOptions? dco_decode_opt_box_autoadd_sign_options(dynamic raw); - @protected - TransactionBase? dco_decode_opt_box_autoadd_transaction_base(dynamic raw); - @protected int? dco_decode_opt_box_autoadd_u_32(dynamic raw); @@ -384,9 +399,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected Payload dco_decode_payload(dynamic raw); - @protected - PsbtBase dco_decode_psbt_base(dynamic raw); - @protected PsbtSigHashType dco_decode_psbt_sig_hash_type(dynamic raw); @@ -394,11 +406,14 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { RbfValue dco_decode_rbf_value(dynamic raw); @protected - (OutPoint, Input, int) dco_decode_record_out_point_input_usize(dynamic raw); + (BdkAddress, int) dco_decode_record_bdk_address_u_32(dynamic raw); @protected - (PsbtBase, TransactionDetails) - dco_decode_record_psbt_base_transaction_details(dynamic raw); + (BdkPsbt, TransactionDetails) dco_decode_record_bdk_psbt_transaction_details( + dynamic raw); + + @protected + (OutPoint, Input, int) dco_decode_record_out_point_input_usize(dynamic raw); @protected RpcConfig dco_decode_rpc_config(dynamic raw); @@ -409,9 +424,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected ScriptAmount dco_decode_script_amount(dynamic raw); - @protected - ScriptBufBase dco_decode_script_buf_base(dynamic raw); - @protected SignOptions dco_decode_sign_options(dynamic raw); @@ -421,9 +433,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected SqliteDbConfiguration dco_decode_sqlite_db_configuration(dynamic raw); - @protected - TransactionBase dco_decode_transaction_base(dynamic raw); - @protected TransactionDetails dco_decode_transaction_details(dynamic raw); @@ -454,9 +463,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected Variant dco_decode_variant(dynamic raw); - @protected - WalletBase dco_decode_wallet_base(dynamic raw); - @protected WitnessVersion dco_decode_witness_version(dynamic raw); @@ -506,41 +512,65 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected String sse_decode_String(SseDeserializer deserializer); - @protected - AddressBase sse_decode_address_base(SseDeserializer deserializer); - @protected AddressError sse_decode_address_error(SseDeserializer deserializer); @protected AddressIndex sse_decode_address_index(SseDeserializer deserializer); - @protected - AddressInfo sse_decode_address_info(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 - BlockTime sse_decode_block_time(SseDeserializer deserializer); + BdkMnemonic sse_decode_bdk_mnemonic(SseDeserializer deserializer); @protected - BlockchainBase sse_decode_blockchain_base(SseDeserializer deserializer); + BdkPsbt sse_decode_bdk_psbt(SseDeserializer deserializer); @protected - BlockchainConfig sse_decode_blockchain_config(SseDeserializer deserializer); + BdkScriptBuf sse_decode_bdk_script_buf(SseDeserializer deserializer); @protected - bool sse_decode_bool(SseDeserializer deserializer); + BdkTransaction sse_decode_bdk_transaction(SseDeserializer deserializer); + + @protected + BdkWallet sse_decode_bdk_wallet(SseDeserializer deserializer); @protected - AddressBase sse_decode_box_autoadd_address_base(SseDeserializer deserializer); + 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( @@ -551,42 +581,62 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { SseDeserializer deserializer); @protected - BlockTime sse_decode_box_autoadd_block_time(SseDeserializer deserializer); + BdkAddress sse_decode_box_autoadd_bdk_address(SseDeserializer deserializer); @protected - BlockchainBase sse_decode_box_autoadd_blockchain_base( + BdkBlockchain sse_decode_box_autoadd_bdk_blockchain( SseDeserializer deserializer); @protected - BlockchainConfig sse_decode_box_autoadd_blockchain_config( + BdkDerivationPath sse_decode_box_autoadd_bdk_derivation_path( SseDeserializer deserializer); @protected - ConsensusError sse_decode_box_autoadd_consensus_error( + BdkDescriptor sse_decode_box_autoadd_bdk_descriptor( SseDeserializer deserializer); @protected - DatabaseConfig sse_decode_box_autoadd_database_config( + BdkDescriptorPublicKey sse_decode_box_autoadd_bdk_descriptor_public_key( SseDeserializer deserializer); @protected - DerivationPathBase sse_decode_box_autoadd_derivation_path_base( + BdkDescriptorSecretKey sse_decode_box_autoadd_bdk_descriptor_secret_key( SseDeserializer deserializer); @protected - DescriptorBase sse_decode_box_autoadd_descriptor_base( + BdkMnemonic sse_decode_box_autoadd_bdk_mnemonic(SseDeserializer deserializer); + + @protected + BdkPsbt sse_decode_box_autoadd_bdk_psbt(SseDeserializer deserializer); + + @protected + BdkScriptBuf sse_decode_box_autoadd_bdk_script_buf( SseDeserializer deserializer); @protected - DescriptorError sse_decode_box_autoadd_descriptor_error( + 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 - DescriptorPublicKeyBase sse_decode_box_autoadd_descriptor_public_key_base( + ConsensusError sse_decode_box_autoadd_consensus_error( SseDeserializer deserializer); @protected - DescriptorSecretKeyBase sse_decode_box_autoadd_descriptor_secret_key_base( + DatabaseConfig sse_decode_box_autoadd_database_config( + SseDeserializer deserializer); + + @protected + DescriptorError sse_decode_box_autoadd_descriptor_error( SseDeserializer deserializer); @protected @@ -610,15 +660,11 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { LocalUtxo sse_decode_box_autoadd_local_utxo(SseDeserializer deserializer); @protected - MnemonicBase sse_decode_box_autoadd_mnemonic_base( - SseDeserializer deserializer); + LockTime sse_decode_box_autoadd_lock_time(SseDeserializer deserializer); @protected OutPoint sse_decode_box_autoadd_out_point(SseDeserializer deserializer); - @protected - PsbtBase sse_decode_box_autoadd_psbt_base(SseDeserializer deserializer); - @protected PsbtSigHashType sse_decode_box_autoadd_psbt_sig_hash_type( SseDeserializer deserializer); @@ -637,10 +683,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { RpcSyncParams sse_decode_box_autoadd_rpc_sync_params( SseDeserializer deserializer); - @protected - ScriptBufBase sse_decode_box_autoadd_script_buf_base( - SseDeserializer deserializer); - @protected SignOptions sse_decode_box_autoadd_sign_options(SseDeserializer deserializer); @@ -652,10 +694,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { SqliteDbConfiguration sse_decode_box_autoadd_sqlite_db_configuration( SseDeserializer deserializer); - @protected - TransactionBase sse_decode_box_autoadd_transaction_base( - SseDeserializer deserializer); - @protected int sse_decode_box_autoadd_u_32(SseDeserializer deserializer); @@ -665,9 +703,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected int sse_decode_box_autoadd_u_8(SseDeserializer deserializer); - @protected - WalletBase sse_decode_box_autoadd_wallet_base(SseDeserializer deserializer); - @protected ChangeSpendPolicy sse_decode_change_spend_policy( SseDeserializer deserializer); @@ -678,24 +713,9 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected DatabaseConfig sse_decode_database_config(SseDeserializer deserializer); - @protected - DerivationPathBase sse_decode_derivation_path_base( - SseDeserializer deserializer); - - @protected - DescriptorBase sse_decode_descriptor_base(SseDeserializer deserializer); - @protected DescriptorError sse_decode_descriptor_error(SseDeserializer deserializer); - @protected - DescriptorPublicKeyBase sse_decode_descriptor_public_key_base( - SseDeserializer deserializer); - - @protected - DescriptorSecretKeyBase sse_decode_descriptor_secret_key_base( - SseDeserializer deserializer); - @protected ElectrumConfig sse_decode_electrum_config(SseDeserializer deserializer); @@ -754,7 +774,7 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { LocalUtxo sse_decode_local_utxo(SseDeserializer deserializer); @protected - MnemonicBase sse_decode_mnemonic_base(SseDeserializer deserializer); + LockTime sse_decode_lock_time(SseDeserializer deserializer); @protected Network sse_decode_network(SseDeserializer deserializer); @@ -763,15 +783,23 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { String? sse_decode_opt_String(SseDeserializer deserializer); @protected - AddressBase? sse_decode_opt_box_autoadd_address_base( + BdkAddress? sse_decode_opt_box_autoadd_bdk_address( SseDeserializer deserializer); @protected - BlockTime? sse_decode_opt_box_autoadd_block_time( + BdkDescriptor? sse_decode_opt_box_autoadd_bdk_descriptor( + 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 - DescriptorBase? sse_decode_opt_box_autoadd_descriptor_base( + BlockTime? sse_decode_opt_box_autoadd_block_time( SseDeserializer deserializer); @protected @@ -796,18 +824,10 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { RpcSyncParams? sse_decode_opt_box_autoadd_rpc_sync_params( SseDeserializer deserializer); - @protected - ScriptBufBase? sse_decode_opt_box_autoadd_script_buf_base( - SseDeserializer deserializer); - @protected SignOptions? sse_decode_opt_box_autoadd_sign_options( SseDeserializer deserializer); - @protected - TransactionBase? sse_decode_opt_box_autoadd_transaction_base( - SseDeserializer deserializer); - @protected int? sse_decode_opt_box_autoadd_u_32(SseDeserializer deserializer); @@ -823,9 +843,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected Payload sse_decode_payload(SseDeserializer deserializer); - @protected - PsbtBase sse_decode_psbt_base(SseDeserializer deserializer); - @protected PsbtSigHashType sse_decode_psbt_sig_hash_type(SseDeserializer deserializer); @@ -833,13 +850,16 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { RbfValue sse_decode_rbf_value(SseDeserializer deserializer); @protected - (OutPoint, Input, int) sse_decode_record_out_point_input_usize( + (BdkAddress, int) sse_decode_record_bdk_address_u_32( SseDeserializer deserializer); @protected - (PsbtBase, TransactionDetails) - sse_decode_record_psbt_base_transaction_details( - SseDeserializer deserializer); + (BdkPsbt, TransactionDetails) sse_decode_record_bdk_psbt_transaction_details( + SseDeserializer deserializer); + + @protected + (OutPoint, Input, int) sse_decode_record_out_point_input_usize( + SseDeserializer deserializer); @protected RpcConfig sse_decode_rpc_config(SseDeserializer deserializer); @@ -850,9 +870,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected ScriptAmount sse_decode_script_amount(SseDeserializer deserializer); - @protected - ScriptBufBase sse_decode_script_buf_base(SseDeserializer deserializer); - @protected SignOptions sse_decode_sign_options(SseDeserializer deserializer); @@ -864,9 +881,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { SqliteDbConfiguration sse_decode_sqlite_db_configuration( SseDeserializer deserializer); - @protected - TransactionBase sse_decode_transaction_base(SseDeserializer deserializer); - @protected TransactionDetails sse_decode_transaction_details( SseDeserializer deserializer); @@ -898,9 +912,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected Variant sse_decode_variant(SseDeserializer deserializer); - @protected - WalletBase sse_decode_wallet_base(SseDeserializer deserializer); - @protected WitnessVersion sse_decode_witness_version(SseDeserializer deserializer); @@ -913,12 +924,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { return raw; } - @protected - List cst_encode_address_base(AddressBase raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_RustOpaque_bdkbitcoinAddress(raw.ptr)]; - } - @protected List cst_encode_address_error(AddressError raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -996,12 +1001,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { throw Exception('unreachable'); } - @protected - List cst_encode_address_info(AddressInfo raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_u_32(raw.index), cst_encode_String(raw.address)]; - } - @protected List cst_encode_auth(Auth raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -1035,6 +1034,47 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { ]; } + @protected + List cst_encode_bdk_address(BdkAddress raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [cst_encode_RustOpaque_bdkbitcoinAddress(raw.ptr)]; + } + + @protected + List cst_encode_bdk_blockchain(BdkBlockchain raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [cst_encode_RustOpaque_AnyBlockchain(raw.ptr)]; + } + + @protected + List cst_encode_bdk_derivation_path(BdkDerivationPath raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [cst_encode_RustOpaque_bitcoinbip32DerivationPath(raw.ptr)]; + } + + @protected + List cst_encode_bdk_descriptor(BdkDescriptor raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [ + cst_encode_RustOpaque_ExtendedDescriptor(raw.extendedDescriptor), + cst_encode_RustOpaque_keysKeyMap(raw.keyMap) + ]; + } + + @protected + List cst_encode_bdk_descriptor_public_key( + BdkDescriptorPublicKey raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [cst_encode_RustOpaque_keysDescriptorPublicKey(raw.ptr)]; + } + + @protected + List cst_encode_bdk_descriptor_secret_key( + BdkDescriptorSecretKey raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [cst_encode_RustOpaque_keysDescriptorSecretKey(raw.ptr)]; + } + @protected List cst_encode_bdk_error(BdkError raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -1171,117 +1211,180 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { if (raw is BdkError_Rusqlite) { return [42, cst_encode_String(raw.field0)]; } + if (raw is BdkError_InvalidInput) { + return [43, cst_encode_String(raw.field0)]; + } + if (raw is BdkError_InvalidLockTime) { + return [44, cst_encode_String(raw.field0)]; + } + if (raw is BdkError_InvalidTransaction) { + return [45, cst_encode_String(raw.field0)]; + } throw Exception('unreachable'); } @protected - List cst_encode_block_time(BlockTime raw) { + List cst_encode_bdk_mnemonic(BdkMnemonic raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [cst_encode_RustOpaque_keysbip39Mnemonic(raw.ptr)]; + } + + @protected + List cst_encode_bdk_psbt(BdkPsbt raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [cst_encode_RustOpaque_MutexPartiallySignedTransaction(raw.ptr)]; + } + + @protected + List cst_encode_bdk_script_buf(BdkScriptBuf raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [cst_encode_list_prim_u_8_strict(raw.bytes)]; + } + + @protected + List cst_encode_bdk_transaction(BdkTransaction raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [cst_encode_String(raw.inner)]; + } + + @protected + List cst_encode_bdk_wallet(BdkWallet raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [cst_encode_RustOpaque_MutexbdkWalletAnyDatabase(raw.ptr)]; + } + + @protected + List cst_encode_block_time(BlockTime raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [cst_encode_u_32(raw.height), cst_encode_u_64(raw.timestamp)]; + } + + @protected + List cst_encode_blockchain_config(BlockchainConfig raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + if (raw is BlockchainConfig_Electrum) { + return [0, cst_encode_box_autoadd_electrum_config(raw.config)]; + } + if (raw is BlockchainConfig_Esplora) { + return [1, cst_encode_box_autoadd_esplora_config(raw.config)]; + } + if (raw is BlockchainConfig_Rpc) { + return [2, cst_encode_box_autoadd_rpc_config(raw.config)]; + } + + throw Exception('unreachable'); + } + + @protected + List cst_encode_box_autoadd_address_error(AddressError raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_address_error(raw); + } + + @protected + List cst_encode_box_autoadd_address_index(AddressIndex raw) { // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_u_32(raw.height), cst_encode_u_64(raw.timestamp)]; + return cst_encode_address_index(raw); } @protected - List cst_encode_blockchain_base(BlockchainBase raw) { + List cst_encode_box_autoadd_bdk_address(BdkAddress raw) { // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_RustOpaque_AnyBlockchain(raw.ptr)]; + return cst_encode_bdk_address(raw); } @protected - List cst_encode_blockchain_config(BlockchainConfig raw) { + List cst_encode_box_autoadd_bdk_blockchain(BdkBlockchain raw) { // Codec=Cst (C-struct based), see doc to use other codecs - if (raw is BlockchainConfig_Electrum) { - return [0, cst_encode_box_autoadd_electrum_config(raw.config)]; - } - if (raw is BlockchainConfig_Esplora) { - return [1, cst_encode_box_autoadd_esplora_config(raw.config)]; - } - if (raw is BlockchainConfig_Rpc) { - return [2, cst_encode_box_autoadd_rpc_config(raw.config)]; - } + return cst_encode_bdk_blockchain(raw); + } - throw Exception('unreachable'); + @protected + List cst_encode_box_autoadd_bdk_derivation_path( + BdkDerivationPath raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_bdk_derivation_path(raw); } @protected - List cst_encode_box_autoadd_address_base(AddressBase raw) { + List cst_encode_box_autoadd_bdk_descriptor(BdkDescriptor raw) { // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_address_base(raw); + return cst_encode_bdk_descriptor(raw); } @protected - List cst_encode_box_autoadd_address_error(AddressError raw) { + List cst_encode_box_autoadd_bdk_descriptor_public_key( + BdkDescriptorPublicKey raw) { // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_address_error(raw); + return cst_encode_bdk_descriptor_public_key(raw); } @protected - List cst_encode_box_autoadd_address_index(AddressIndex raw) { + List cst_encode_box_autoadd_bdk_descriptor_secret_key( + BdkDescriptorSecretKey raw) { // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_address_index(raw); + return cst_encode_bdk_descriptor_secret_key(raw); } @protected - List cst_encode_box_autoadd_block_time(BlockTime raw) { + List cst_encode_box_autoadd_bdk_mnemonic(BdkMnemonic raw) { // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_block_time(raw); + return cst_encode_bdk_mnemonic(raw); } @protected - List cst_encode_box_autoadd_blockchain_base(BlockchainBase raw) { + List cst_encode_box_autoadd_bdk_psbt(BdkPsbt raw) { // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_blockchain_base(raw); + return cst_encode_bdk_psbt(raw); } @protected - List cst_encode_box_autoadd_blockchain_config(BlockchainConfig raw) { + List cst_encode_box_autoadd_bdk_script_buf(BdkScriptBuf raw) { // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_blockchain_config(raw); + return cst_encode_bdk_script_buf(raw); } @protected - List cst_encode_box_autoadd_consensus_error(ConsensusError raw) { + List cst_encode_box_autoadd_bdk_transaction(BdkTransaction raw) { // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_consensus_error(raw); + return cst_encode_bdk_transaction(raw); } @protected - List cst_encode_box_autoadd_database_config(DatabaseConfig raw) { + List cst_encode_box_autoadd_bdk_wallet(BdkWallet raw) { // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_database_config(raw); + return cst_encode_bdk_wallet(raw); } @protected - List cst_encode_box_autoadd_derivation_path_base( - DerivationPathBase raw) { + List cst_encode_box_autoadd_block_time(BlockTime raw) { // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_derivation_path_base(raw); + return cst_encode_block_time(raw); } @protected - List cst_encode_box_autoadd_descriptor_base(DescriptorBase raw) { + List cst_encode_box_autoadd_blockchain_config(BlockchainConfig raw) { // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_descriptor_base(raw); + return cst_encode_blockchain_config(raw); } @protected - List cst_encode_box_autoadd_descriptor_error(DescriptorError raw) { + List cst_encode_box_autoadd_consensus_error(ConsensusError raw) { // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_descriptor_error(raw); + return cst_encode_consensus_error(raw); } @protected - List cst_encode_box_autoadd_descriptor_public_key_base( - DescriptorPublicKeyBase raw) { + List cst_encode_box_autoadd_database_config(DatabaseConfig raw) { // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_descriptor_public_key_base(raw); + return cst_encode_database_config(raw); } @protected - List cst_encode_box_autoadd_descriptor_secret_key_base( - DescriptorSecretKeyBase raw) { + List cst_encode_box_autoadd_descriptor_error(DescriptorError raw) { // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_descriptor_secret_key_base(raw); + return cst_encode_descriptor_error(raw); } @protected @@ -1321,9 +1424,9 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { } @protected - List cst_encode_box_autoadd_mnemonic_base(MnemonicBase raw) { + List cst_encode_box_autoadd_lock_time(LockTime raw) { // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_mnemonic_base(raw); + return cst_encode_lock_time(raw); } @protected @@ -1332,12 +1435,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { return cst_encode_out_point(raw); } - @protected - List cst_encode_box_autoadd_psbt_base(PsbtBase raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_psbt_base(raw); - } - @protected List cst_encode_box_autoadd_psbt_sig_hash_type(PsbtSigHashType raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -1369,12 +1466,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { return cst_encode_rpc_sync_params(raw); } - @protected - List cst_encode_box_autoadd_script_buf_base(ScriptBufBase raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_script_buf_base(raw); - } - @protected List cst_encode_box_autoadd_sign_options(SignOptions raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -1395,12 +1486,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { return cst_encode_sqlite_db_configuration(raw); } - @protected - List cst_encode_box_autoadd_transaction_base(TransactionBase raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_transaction_base(raw); - } - @protected int cst_encode_box_autoadd_u_32(int raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -1419,12 +1504,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { return cst_encode_u_8(raw); } - @protected - List cst_encode_box_autoadd_wallet_base(WalletBase raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_wallet_base(raw); - } - @protected List cst_encode_consensus_error(ConsensusError raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -1470,21 +1549,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { throw Exception('unreachable'); } - @protected - List cst_encode_derivation_path_base(DerivationPathBase raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_RustOpaque_bitcoinbip32DerivationPath(raw.ptr)]; - } - - @protected - List cst_encode_descriptor_base(DescriptorBase raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [ - cst_encode_RustOpaque_ExtendedDescriptor(raw.extendedDescriptor), - cst_encode_RustOpaque_keysKeyMap(raw.keyMap) - ]; - } - @protected List cst_encode_descriptor_error(DescriptorError raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -1528,20 +1592,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { throw Exception('unreachable'); } - @protected - List cst_encode_descriptor_public_key_base( - DescriptorPublicKeyBase raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_RustOpaque_keysDescriptorPublicKey(raw.ptr)]; - } - - @protected - List cst_encode_descriptor_secret_key_base( - DescriptorSecretKeyBase raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_RustOpaque_keysDescriptorSecretKey(raw.ptr)]; - } - @protected List cst_encode_electrum_config(ElectrumConfig raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -1662,9 +1712,16 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { } @protected - List cst_encode_mnemonic_base(MnemonicBase raw) { + List cst_encode_lock_time(LockTime raw) { // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_RustOpaque_keysbip39Mnemonic(raw.ptr)]; + if (raw is LockTime_Blocks) { + return [0, cst_encode_u_32(raw.field0)]; + } + if (raw is LockTime_Seconds) { + return [1, cst_encode_u_32(raw.field0)]; + } + + throw Exception('unreachable'); } @protected @@ -1674,22 +1731,34 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { } @protected - List? cst_encode_opt_box_autoadd_address_base(AddressBase? raw) { + List? cst_encode_opt_box_autoadd_bdk_address(BdkAddress? raw) { // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null ? null : cst_encode_box_autoadd_address_base(raw); + return raw == null ? null : cst_encode_box_autoadd_bdk_address(raw); } @protected - List? cst_encode_opt_box_autoadd_block_time(BlockTime? raw) { + List? cst_encode_opt_box_autoadd_bdk_descriptor(BdkDescriptor? raw) { // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null ? null : cst_encode_box_autoadd_block_time(raw); + return raw == null ? null : cst_encode_box_autoadd_bdk_descriptor(raw); + } + + @protected + List? cst_encode_opt_box_autoadd_bdk_script_buf(BdkScriptBuf? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? null : cst_encode_box_autoadd_bdk_script_buf(raw); } @protected - List? cst_encode_opt_box_autoadd_descriptor_base( - DescriptorBase? raw) { + List? cst_encode_opt_box_autoadd_bdk_transaction( + BdkTransaction? raw) { // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null ? null : cst_encode_box_autoadd_descriptor_base(raw); + return raw == null ? null : cst_encode_box_autoadd_bdk_transaction(raw); + } + + @protected + List? cst_encode_opt_box_autoadd_block_time(BlockTime? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? null : cst_encode_box_autoadd_block_time(raw); } @protected @@ -1733,26 +1802,12 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { return raw == null ? null : cst_encode_box_autoadd_rpc_sync_params(raw); } - @protected - List? cst_encode_opt_box_autoadd_script_buf_base( - ScriptBufBase? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null ? null : cst_encode_box_autoadd_script_buf_base(raw); - } - @protected List? cst_encode_opt_box_autoadd_sign_options(SignOptions? raw) { // Codec=Cst (C-struct based), see doc to use other codecs return raw == null ? null : cst_encode_box_autoadd_sign_options(raw); } - @protected - List? cst_encode_opt_box_autoadd_transaction_base( - TransactionBase? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null ? null : cst_encode_box_autoadd_transaction_base(raw); - } - @protected int? cst_encode_opt_box_autoadd_u_32(int? raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -1797,12 +1852,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { throw Exception('unreachable'); } - @protected - List cst_encode_psbt_base(PsbtBase raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_RustOpaque_MutexPartiallySignedTransaction(raw.ptr)]; - } - @protected List cst_encode_psbt_sig_hash_type(PsbtSigHashType raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -1823,23 +1872,29 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { } @protected - List cst_encode_record_out_point_input_usize( - (OutPoint, Input, int) raw) { + List cst_encode_record_bdk_address_u_32((BdkAddress, int) raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [cst_encode_bdk_address(raw.$1), cst_encode_u_32(raw.$2)]; + } + + @protected + List cst_encode_record_bdk_psbt_transaction_details( + (BdkPsbt, TransactionDetails) raw) { // Codec=Cst (C-struct based), see doc to use other codecs return [ - cst_encode_out_point(raw.$1), - cst_encode_input(raw.$2), - cst_encode_usize(raw.$3) + cst_encode_bdk_psbt(raw.$1), + cst_encode_transaction_details(raw.$2) ]; } @protected - List cst_encode_record_psbt_base_transaction_details( - (PsbtBase, TransactionDetails) raw) { + List cst_encode_record_out_point_input_usize( + (OutPoint, Input, int) raw) { // Codec=Cst (C-struct based), see doc to use other codecs return [ - cst_encode_psbt_base(raw.$1), - cst_encode_transaction_details(raw.$2) + cst_encode_out_point(raw.$1), + cst_encode_input(raw.$2), + cst_encode_usize(raw.$3) ]; } @@ -1869,16 +1924,7 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected List cst_encode_script_amount(ScriptAmount raw) { // Codec=Cst (C-struct based), see doc to use other codecs - return [ - cst_encode_script_buf_base(raw.script), - cst_encode_u_64(raw.amount) - ]; - } - - @protected - List cst_encode_script_buf_base(ScriptBufBase raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_list_prim_u_8_strict(raw.bytes)]; + return [cst_encode_bdk_script_buf(raw.script), cst_encode_u_64(raw.amount)]; } @protected @@ -1908,17 +1954,11 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { return [cst_encode_String(raw.path)]; } - @protected - List cst_encode_transaction_base(TransactionBase raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_String(raw.inner)]; - } - @protected List cst_encode_transaction_details(TransactionDetails raw) { // Codec=Cst (C-struct based), see doc to use other codecs return [ - cst_encode_opt_box_autoadd_transaction_base(raw.transaction), + cst_encode_opt_box_autoadd_bdk_transaction(raw.transaction), cst_encode_String(raw.txid), cst_encode_u_64(raw.received), cst_encode_u_64(raw.sent), @@ -1932,7 +1972,7 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { // Codec=Cst (C-struct based), see doc to use other codecs return [ cst_encode_out_point(raw.previousOutput), - cst_encode_script_buf_base(raw.scriptSig), + cst_encode_bdk_script_buf(raw.scriptSig), cst_encode_u_32(raw.sequence), cst_encode_list_list_prim_u_8_strict(raw.witness) ]; @@ -1943,7 +1983,7 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { // Codec=Cst (C-struct based), see doc to use other codecs return [ cst_encode_u_64(raw.value), - cst_encode_script_buf_base(raw.scriptPubkey) + cst_encode_bdk_script_buf(raw.scriptPubkey) ]; } @@ -1959,12 +1999,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { return Uint8List.fromList(raw); } - @protected - List cst_encode_wallet_base(WalletBase raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_RustOpaque_MutexbdkWalletAnyDatabase(raw.ptr)]; - } - @protected int cst_encode_RustOpaque_AnyBlockchain(AnyBlockchain raw); @@ -2082,33 +2116,60 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected void sse_encode_String(String self, SseSerializer serializer); - @protected - void sse_encode_address_base(AddressBase 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_address_info(AddressInfo 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_block_time(BlockTime self, SseSerializer serializer); + void sse_encode_bdk_mnemonic(BdkMnemonic 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_blockchain_base( - BlockchainBase self, SseSerializer serializer); + void sse_encode_block_time(BlockTime self, SseSerializer serializer); @protected void sse_encode_blockchain_config( @@ -2117,10 +2178,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected void sse_encode_bool(bool self, SseSerializer serializer); - @protected - void sse_encode_box_autoadd_address_base( - AddressBase self, SseSerializer serializer); - @protected void sse_encode_box_autoadd_address_error( AddressError self, SseSerializer serializer); @@ -2130,44 +2187,67 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { AddressIndex self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_block_time( - BlockTime self, SseSerializer serializer); + void sse_encode_box_autoadd_bdk_address( + BdkAddress self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_blockchain_base( - BlockchainBase self, SseSerializer serializer); + void sse_encode_box_autoadd_bdk_blockchain( + BdkBlockchain self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_blockchain_config( - BlockchainConfig self, SseSerializer serializer); + void sse_encode_box_autoadd_bdk_derivation_path( + BdkDerivationPath self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_consensus_error( - ConsensusError self, SseSerializer serializer); + void sse_encode_box_autoadd_bdk_descriptor( + BdkDescriptor self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_database_config( - DatabaseConfig self, SseSerializer serializer); + void sse_encode_box_autoadd_bdk_descriptor_public_key( + BdkDescriptorPublicKey self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_derivation_path_base( - DerivationPathBase self, SseSerializer serializer); + void sse_encode_box_autoadd_bdk_descriptor_secret_key( + BdkDescriptorSecretKey self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_descriptor_base( - DescriptorBase self, SseSerializer serializer); + void sse_encode_box_autoadd_bdk_mnemonic( + BdkMnemonic self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_descriptor_error( - DescriptorError self, SseSerializer serializer); + 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_descriptor_public_key_base( - DescriptorPublicKeyBase self, SseSerializer serializer); + 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_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_secret_key_base( - DescriptorSecretKeyBase self, SseSerializer serializer); + void sse_encode_box_autoadd_descriptor_error( + DescriptorError self, SseSerializer serializer); @protected void sse_encode_box_autoadd_electrum_config( @@ -2192,17 +2272,13 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { LocalUtxo self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_mnemonic_base( - MnemonicBase self, SseSerializer serializer); + 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_psbt_base( - PsbtBase self, SseSerializer serializer); - @protected void sse_encode_box_autoadd_psbt_sig_hash_type( PsbtSigHashType self, SseSerializer serializer); @@ -2223,10 +2299,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { void sse_encode_box_autoadd_rpc_sync_params( RpcSyncParams self, SseSerializer serializer); - @protected - void sse_encode_box_autoadd_script_buf_base( - ScriptBufBase self, SseSerializer serializer); - @protected void sse_encode_box_autoadd_sign_options( SignOptions self, SseSerializer serializer); @@ -2239,10 +2311,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { void sse_encode_box_autoadd_sqlite_db_configuration( SqliteDbConfiguration self, SseSerializer serializer); - @protected - void sse_encode_box_autoadd_transaction_base( - TransactionBase self, SseSerializer serializer); - @protected void sse_encode_box_autoadd_u_32(int self, SseSerializer serializer); @@ -2252,10 +2320,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected void sse_encode_box_autoadd_u_8(int self, SseSerializer serializer); - @protected - void sse_encode_box_autoadd_wallet_base( - WalletBase self, SseSerializer serializer); - @protected void sse_encode_change_spend_policy( ChangeSpendPolicy self, SseSerializer serializer); @@ -2268,26 +2332,10 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { void sse_encode_database_config( DatabaseConfig self, SseSerializer serializer); - @protected - void sse_encode_derivation_path_base( - DerivationPathBase self, SseSerializer serializer); - - @protected - void sse_encode_descriptor_base( - DescriptorBase self, SseSerializer serializer); - @protected void sse_encode_descriptor_error( DescriptorError self, SseSerializer serializer); - @protected - void sse_encode_descriptor_public_key_base( - DescriptorPublicKeyBase self, SseSerializer serializer); - - @protected - void sse_encode_descriptor_secret_key_base( - DescriptorSecretKeyBase self, SseSerializer serializer); - @protected void sse_encode_electrum_config( ElectrumConfig self, SseSerializer serializer); @@ -2349,7 +2397,7 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { void sse_encode_local_utxo(LocalUtxo self, SseSerializer serializer); @protected - void sse_encode_mnemonic_base(MnemonicBase self, SseSerializer serializer); + void sse_encode_lock_time(LockTime self, SseSerializer serializer); @protected void sse_encode_network(Network self, SseSerializer serializer); @@ -2358,16 +2406,24 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { void sse_encode_opt_String(String? self, SseSerializer serializer); @protected - void sse_encode_opt_box_autoadd_address_base( - AddressBase? self, SseSerializer serializer); + void sse_encode_opt_box_autoadd_bdk_address( + BdkAddress? self, SseSerializer serializer); @protected - void sse_encode_opt_box_autoadd_block_time( - BlockTime? self, SseSerializer serializer); + void sse_encode_opt_box_autoadd_bdk_descriptor( + BdkDescriptor? self, SseSerializer serializer); + + @protected + void sse_encode_opt_box_autoadd_bdk_script_buf( + BdkScriptBuf? self, SseSerializer serializer); @protected - void sse_encode_opt_box_autoadd_descriptor_base( - DescriptorBase? self, SseSerializer serializer); + 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_f_32(double? self, SseSerializer serializer); @@ -2392,18 +2448,10 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { void sse_encode_opt_box_autoadd_rpc_sync_params( RpcSyncParams? self, SseSerializer serializer); - @protected - void sse_encode_opt_box_autoadd_script_buf_base( - ScriptBufBase? self, SseSerializer serializer); - @protected void sse_encode_opt_box_autoadd_sign_options( SignOptions? self, SseSerializer serializer); - @protected - void sse_encode_opt_box_autoadd_transaction_base( - TransactionBase? self, SseSerializer serializer); - @protected void sse_encode_opt_box_autoadd_u_32(int? self, SseSerializer serializer); @@ -2419,9 +2467,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected void sse_encode_payload(Payload self, SseSerializer serializer); - @protected - void sse_encode_psbt_base(PsbtBase self, SseSerializer serializer); - @protected void sse_encode_psbt_sig_hash_type( PsbtSigHashType self, SseSerializer serializer); @@ -2430,12 +2475,16 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { void sse_encode_rbf_value(RbfValue self, SseSerializer serializer); @protected - void sse_encode_record_out_point_input_usize( - (OutPoint, Input, int) self, SseSerializer serializer); + void sse_encode_record_bdk_address_u_32( + (BdkAddress, int) self, SseSerializer serializer); @protected - void sse_encode_record_psbt_base_transaction_details( - (PsbtBase, TransactionDetails) self, SseSerializer serializer); + void sse_encode_record_bdk_psbt_transaction_details( + (BdkPsbt, TransactionDetails) self, SseSerializer serializer); + + @protected + void sse_encode_record_out_point_input_usize( + (OutPoint, Input, int) self, SseSerializer serializer); @protected void sse_encode_rpc_config(RpcConfig self, SseSerializer serializer); @@ -2446,9 +2495,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected void sse_encode_script_amount(ScriptAmount self, SseSerializer serializer); - @protected - void sse_encode_script_buf_base(ScriptBufBase self, SseSerializer serializer); - @protected void sse_encode_sign_options(SignOptions self, SseSerializer serializer); @@ -2460,10 +2506,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { void sse_encode_sqlite_db_configuration( SqliteDbConfiguration self, SseSerializer serializer); - @protected - void sse_encode_transaction_base( - TransactionBase self, SseSerializer serializer); - @protected void sse_encode_transaction_details( TransactionDetails self, SseSerializer serializer); @@ -2495,9 +2537,6 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { @protected void sse_encode_variant(Variant self, SseSerializer serializer); - @protected - void sse_encode_wallet_base(WalletBase self, SseSerializer serializer); - @protected void sse_encode_witness_version( WitnessVersion self, SseSerializer serializer); @@ -2508,324 +2547,330 @@ abstract class BdkCoreApiImplPlatform extends BaseApiImpl { // Section: wire_class -class BdkCoreWire implements BaseWire { - BdkCoreWire.fromExternalLibrary(ExternalLibrary lib); +class CApiWire implements BaseWire { + CApiWire.fromExternalLibrary(ExternalLibrary lib); - void wire_BlockchainBase_broadcast(NativePortType port_, List that, + void wire_bdk_blockchain_broadcast(NativePortType port_, List that, List transaction) => - wasmModule.wire_BlockchainBase_broadcast(port_, that, transaction); + wasmModule.wire_bdk_blockchain_broadcast(port_, that, transaction); - void wire_BlockchainBase_estimate_fee( + void wire_bdk_blockchain_estimate_fee( NativePortType port_, List that, Object target) => - wasmModule.wire_BlockchainBase_estimate_fee(port_, that, target); + wasmModule.wire_bdk_blockchain_estimate_fee(port_, that, target); - void wire_BlockchainBase_get_block_hash( + void wire_bdk_blockchain_get_block_hash( NativePortType port_, List that, int height) => - wasmModule.wire_BlockchainBase_get_block_hash(port_, that, height); + wasmModule.wire_bdk_blockchain_get_block_hash(port_, that, height); - void wire_BlockchainBase_get_height( + void wire_bdk_blockchain_get_height( NativePortType port_, List that) => - wasmModule.wire_BlockchainBase_get_height(port_, that); + wasmModule.wire_bdk_blockchain_get_height(port_, that); - void wire_BlockchainBase_new( + void wire_bdk_blockchain_new( NativePortType port_, List blockchain_config) => - wasmModule.wire_BlockchainBase_new(port_, blockchain_config); + wasmModule.wire_bdk_blockchain_new(port_, blockchain_config); - void wire_DescriptorBase_as_string( + void wire_bdk_descriptor_as_string( NativePortType port_, List that) => - wasmModule.wire_DescriptorBase_as_string(port_, that); + wasmModule.wire_bdk_descriptor_as_string(port_, that); - void wire_DescriptorBase_as_string_private( + void wire_bdk_descriptor_as_string_private( NativePortType port_, List that) => - wasmModule.wire_DescriptorBase_as_string_private(port_, that); + wasmModule.wire_bdk_descriptor_as_string_private(port_, that); - void wire_DescriptorBase_max_satisfaction_weight( + void wire_bdk_descriptor_max_satisfaction_weight( NativePortType port_, List that) => - wasmModule.wire_DescriptorBase_max_satisfaction_weight(port_, that); + wasmModule.wire_bdk_descriptor_max_satisfaction_weight(port_, that); - void wire_DescriptorBase_new( + void wire_bdk_descriptor_new( NativePortType port_, String descriptor, int network) => - wasmModule.wire_DescriptorBase_new(port_, descriptor, network); + wasmModule.wire_bdk_descriptor_new(port_, descriptor, network); - void wire_DescriptorBase_new_bip44(NativePortType port_, + void wire_bdk_descriptor_new_bip44(NativePortType port_, List secret_key, int keychain_kind, int network) => - wasmModule.wire_DescriptorBase_new_bip44( + wasmModule.wire_bdk_descriptor_new_bip44( port_, secret_key, keychain_kind, network); - void wire_DescriptorBase_new_bip44_public( + void wire_bdk_descriptor_new_bip44_public( NativePortType port_, List public_key, String fingerprint, int keychain_kind, int network) => - wasmModule.wire_DescriptorBase_new_bip44_public( + wasmModule.wire_bdk_descriptor_new_bip44_public( port_, public_key, fingerprint, keychain_kind, network); - void wire_DescriptorBase_new_bip49(NativePortType port_, + void wire_bdk_descriptor_new_bip49(NativePortType port_, List secret_key, int keychain_kind, int network) => - wasmModule.wire_DescriptorBase_new_bip49( + wasmModule.wire_bdk_descriptor_new_bip49( port_, secret_key, keychain_kind, network); - void wire_DescriptorBase_new_bip49_public( + void wire_bdk_descriptor_new_bip49_public( NativePortType port_, List public_key, String fingerprint, int keychain_kind, int network) => - wasmModule.wire_DescriptorBase_new_bip49_public( + wasmModule.wire_bdk_descriptor_new_bip49_public( port_, public_key, fingerprint, keychain_kind, network); - void wire_DescriptorBase_new_bip84(NativePortType port_, + void wire_bdk_descriptor_new_bip84(NativePortType port_, List secret_key, int keychain_kind, int network) => - wasmModule.wire_DescriptorBase_new_bip84( + wasmModule.wire_bdk_descriptor_new_bip84( port_, secret_key, keychain_kind, network); - void wire_DescriptorBase_new_bip84_public( + void wire_bdk_descriptor_new_bip84_public( NativePortType port_, List public_key, String fingerprint, int keychain_kind, int network) => - wasmModule.wire_DescriptorBase_new_bip84_public( + wasmModule.wire_bdk_descriptor_new_bip84_public( port_, public_key, fingerprint, keychain_kind, network); - void wire_DescriptorBase_new_bip86(NativePortType port_, + void wire_bdk_descriptor_new_bip86(NativePortType port_, List secret_key, int keychain_kind, int network) => - wasmModule.wire_DescriptorBase_new_bip86( + wasmModule.wire_bdk_descriptor_new_bip86( port_, secret_key, keychain_kind, network); - void wire_DescriptorBase_new_bip86_public( + void wire_bdk_descriptor_new_bip86_public( NativePortType port_, List public_key, String fingerprint, int keychain_kind, int network) => - wasmModule.wire_DescriptorBase_new_bip86_public( + wasmModule.wire_bdk_descriptor_new_bip86_public( port_, public_key, fingerprint, keychain_kind, network); - void wire_DerivationPathBase_from_string(NativePortType port_, String path) => - wasmModule.wire_DerivationPathBase_from_string(port_, path); + void wire_bdk_derivation_path_from_string( + NativePortType port_, String path) => + wasmModule.wire_bdk_derivation_path_from_string(port_, path); - void wire_DescriptorPublicKeyBase_as_string( + void wire_bdk_descriptor_public_key_as_string( NativePortType port_, List that) => - wasmModule.wire_DescriptorPublicKeyBase_as_string(port_, that); + wasmModule.wire_bdk_descriptor_public_key_as_string(port_, that); - void wire_DescriptorPublicKeyBase_derive( + void wire_bdk_descriptor_public_key_derive( NativePortType port_, List ptr, List path) => - wasmModule.wire_DescriptorPublicKeyBase_derive(port_, ptr, path); + wasmModule.wire_bdk_descriptor_public_key_derive(port_, ptr, path); - void wire_DescriptorPublicKeyBase_extend( + void wire_bdk_descriptor_public_key_extend( NativePortType port_, List ptr, List path) => - wasmModule.wire_DescriptorPublicKeyBase_extend(port_, ptr, path); + wasmModule.wire_bdk_descriptor_public_key_extend(port_, ptr, path); - void wire_DescriptorPublicKeyBase_from_string( + void wire_bdk_descriptor_public_key_from_string( NativePortType port_, String public_key) => - wasmModule.wire_DescriptorPublicKeyBase_from_string(port_, public_key); + wasmModule.wire_bdk_descriptor_public_key_from_string(port_, public_key); - void wire_DescriptorSecretKeyBase_as_public( + void wire_bdk_descriptor_secret_key_as_public( NativePortType port_, List ptr) => - wasmModule.wire_DescriptorSecretKeyBase_as_public(port_, ptr); + wasmModule.wire_bdk_descriptor_secret_key_as_public(port_, ptr); - void wire_DescriptorSecretKeyBase_as_string( + void wire_bdk_descriptor_secret_key_as_string( NativePortType port_, List that) => - wasmModule.wire_DescriptorSecretKeyBase_as_string(port_, that); + wasmModule.wire_bdk_descriptor_secret_key_as_string(port_, that); - void wire_DescriptorSecretKeyBase_create(NativePortType port_, int network, + void wire_bdk_descriptor_secret_key_create(NativePortType port_, int network, List mnemonic, String? password) => - wasmModule.wire_DescriptorSecretKeyBase_create( + wasmModule.wire_bdk_descriptor_secret_key_create( port_, network, mnemonic, password); - void wire_DescriptorSecretKeyBase_derive( + void wire_bdk_descriptor_secret_key_derive( NativePortType port_, List ptr, List path) => - wasmModule.wire_DescriptorSecretKeyBase_derive(port_, ptr, path); + wasmModule.wire_bdk_descriptor_secret_key_derive(port_, ptr, path); - void wire_DescriptorSecretKeyBase_extend( + void wire_bdk_descriptor_secret_key_extend( NativePortType port_, List ptr, List path) => - wasmModule.wire_DescriptorSecretKeyBase_extend(port_, ptr, path); + wasmModule.wire_bdk_descriptor_secret_key_extend(port_, ptr, path); - void wire_DescriptorSecretKeyBase_from_string( + void wire_bdk_descriptor_secret_key_from_string( NativePortType port_, String secret_key) => - wasmModule.wire_DescriptorSecretKeyBase_from_string(port_, secret_key); + wasmModule.wire_bdk_descriptor_secret_key_from_string(port_, secret_key); - void wire_DescriptorSecretKeyBase_secret_bytes( + void wire_bdk_descriptor_secret_key_secret_bytes( NativePortType port_, List that) => - wasmModule.wire_DescriptorSecretKeyBase_secret_bytes(port_, that); + wasmModule.wire_bdk_descriptor_secret_key_secret_bytes(port_, that); - void wire_MnemonicBase_as_string(NativePortType port_, List that) => - wasmModule.wire_MnemonicBase_as_string(port_, that); + void wire_bdk_mnemonic_as_string(NativePortType port_, List that) => + wasmModule.wire_bdk_mnemonic_as_string(port_, that); - void wire_MnemonicBase_from_entropy( + void wire_bdk_mnemonic_from_entropy( NativePortType port_, List entropy) => - wasmModule.wire_MnemonicBase_from_entropy(port_, entropy); + wasmModule.wire_bdk_mnemonic_from_entropy(port_, entropy); - void wire_MnemonicBase_from_string(NativePortType port_, String mnemonic) => - wasmModule.wire_MnemonicBase_from_string(port_, mnemonic); + void wire_bdk_mnemonic_from_string(NativePortType port_, String mnemonic) => + wasmModule.wire_bdk_mnemonic_from_string(port_, mnemonic); - void wire_MnemonicBase_new(NativePortType port_, int word_count) => - wasmModule.wire_MnemonicBase_new(port_, word_count); + void wire_bdk_mnemonic_new(NativePortType port_, int word_count) => + wasmModule.wire_bdk_mnemonic_new(port_, word_count); - void wire_PsbtBase_combine( + void wire_bdk_psbt_combine( NativePortType port_, List ptr, List other) => - wasmModule.wire_PsbtBase_combine(port_, ptr, other); + wasmModule.wire_bdk_psbt_combine(port_, ptr, other); - void wire_PsbtBase_extract_tx(NativePortType port_, List ptr) => - wasmModule.wire_PsbtBase_extract_tx(port_, ptr); + void wire_bdk_psbt_extract_tx(NativePortType port_, List ptr) => + wasmModule.wire_bdk_psbt_extract_tx(port_, ptr); - void wire_PsbtBase_fee_amount(NativePortType port_, List that) => - wasmModule.wire_PsbtBase_fee_amount(port_, that); + void wire_bdk_psbt_fee_amount(NativePortType port_, List that) => + wasmModule.wire_bdk_psbt_fee_amount(port_, that); - void wire_PsbtBase_fee_rate(NativePortType port_, List that) => - wasmModule.wire_PsbtBase_fee_rate(port_, that); + void wire_bdk_psbt_fee_rate(NativePortType port_, List that) => + wasmModule.wire_bdk_psbt_fee_rate(port_, that); - void wire_PsbtBase_from_str(NativePortType port_, String psbt_base64) => - wasmModule.wire_PsbtBase_from_str(port_, psbt_base64); + void wire_bdk_psbt_from_str(NativePortType port_, String psbt_base64) => + wasmModule.wire_bdk_psbt_from_str(port_, psbt_base64); - void wire_PsbtBase_json_serialize(NativePortType port_, List that) => - wasmModule.wire_PsbtBase_json_serialize(port_, that); + void wire_bdk_psbt_json_serialize(NativePortType port_, List that) => + wasmModule.wire_bdk_psbt_json_serialize(port_, that); - void wire_PsbtBase_serialize(NativePortType port_, List that) => - wasmModule.wire_PsbtBase_serialize(port_, that); + void wire_bdk_psbt_serialize(NativePortType port_, List that) => + wasmModule.wire_bdk_psbt_serialize(port_, that); - void wire_PsbtBase_txid(NativePortType port_, List that) => - wasmModule.wire_PsbtBase_txid(port_, that); + void wire_bdk_psbt_txid(NativePortType port_, List that) => + wasmModule.wire_bdk_psbt_txid(port_, that); - void wire_AddressBase_as_string(NativePortType port_, List that) => - wasmModule.wire_AddressBase_as_string(port_, that); + void wire_bdk_address_as_string(NativePortType port_, List that) => + wasmModule.wire_bdk_address_as_string(port_, that); - void wire_AddressBase_from_script( + void wire_bdk_address_from_script( NativePortType port_, List script, int network) => - wasmModule.wire_AddressBase_from_script(port_, script, network); + wasmModule.wire_bdk_address_from_script(port_, script, network); - void wire_AddressBase_from_string( + void wire_bdk_address_from_string( NativePortType port_, String address, int network) => - wasmModule.wire_AddressBase_from_string(port_, address, network); + wasmModule.wire_bdk_address_from_string(port_, address, network); - void wire_AddressBase_is_valid_for_network( + void wire_bdk_address_is_valid_for_network( NativePortType port_, List that, int network) => - wasmModule.wire_AddressBase_is_valid_for_network(port_, that, network); + wasmModule.wire_bdk_address_is_valid_for_network(port_, that, network); - void wire_AddressBase_network(NativePortType port_, List that) => - wasmModule.wire_AddressBase_network(port_, that); + void wire_bdk_address_network(NativePortType port_, List that) => + wasmModule.wire_bdk_address_network(port_, that); - void wire_AddressBase_payload(NativePortType port_, List that) => - wasmModule.wire_AddressBase_payload(port_, that); + void wire_bdk_address_payload(NativePortType port_, List that) => + wasmModule.wire_bdk_address_payload(port_, that); - void wire_AddressBase_script(NativePortType port_, List ptr) => - wasmModule.wire_AddressBase_script(port_, ptr); + void wire_bdk_address_script(NativePortType port_, List ptr) => + wasmModule.wire_bdk_address_script(port_, ptr); - void wire_AddressBase_to_qr_uri(NativePortType port_, List that) => - wasmModule.wire_AddressBase_to_qr_uri(port_, that); + void wire_bdk_address_to_qr_uri(NativePortType port_, List that) => + wasmModule.wire_bdk_address_to_qr_uri(port_, that); - void wire_ScriptBufBase_empty(NativePortType port_) => - wasmModule.wire_ScriptBufBase_empty(port_); + void wire_bdk_script_buf_empty(NativePortType port_) => + wasmModule.wire_bdk_script_buf_empty(port_); - void wire_ScriptBufBase_from_hex(NativePortType port_, String s) => - wasmModule.wire_ScriptBufBase_from_hex(port_, s); + void wire_bdk_script_buf_from_hex(NativePortType port_, String s) => + wasmModule.wire_bdk_script_buf_from_hex(port_, s); - void wire_ScriptBufBase_with_capacity(NativePortType port_, int capacity) => - wasmModule.wire_ScriptBufBase_with_capacity(port_, capacity); + void wire_bdk_script_buf_with_capacity(NativePortType port_, int capacity) => + wasmModule.wire_bdk_script_buf_with_capacity(port_, capacity); + + void wire_bdk_transaction_from_bytes( + NativePortType port_, List transaction_bytes) => + wasmModule.wire_bdk_transaction_from_bytes(port_, transaction_bytes); - void wire_TransactionBase_input(NativePortType port_, List that) => - wasmModule.wire_TransactionBase_input(port_, that); + void wire_bdk_transaction_input(NativePortType port_, List that) => + wasmModule.wire_bdk_transaction_input(port_, that); - void wire_TransactionBase_is_coin_base( + void wire_bdk_transaction_is_coin_base( NativePortType port_, List that) => - wasmModule.wire_TransactionBase_is_coin_base(port_, that); + wasmModule.wire_bdk_transaction_is_coin_base(port_, that); - void wire_TransactionBase_is_explicitly_rbf( + void wire_bdk_transaction_is_explicitly_rbf( NativePortType port_, List that) => - wasmModule.wire_TransactionBase_is_explicitly_rbf(port_, that); + wasmModule.wire_bdk_transaction_is_explicitly_rbf(port_, that); - void wire_TransactionBase_is_lock_time_enabled( + void wire_bdk_transaction_is_lock_time_enabled( NativePortType port_, List that) => - wasmModule.wire_TransactionBase_is_lock_time_enabled(port_, that); + wasmModule.wire_bdk_transaction_is_lock_time_enabled(port_, that); - void wire_TransactionBase_lock_time( + void wire_bdk_transaction_lock_time( NativePortType port_, List that) => - wasmModule.wire_TransactionBase_lock_time(port_, that); + wasmModule.wire_bdk_transaction_lock_time(port_, that); - void wire_TransactionBase_new( - NativePortType port_, List transaction_bytes) => - wasmModule.wire_TransactionBase_new(port_, transaction_bytes); + void wire_bdk_transaction_new(NativePortType port_, int version, + List lock_time, List input, List output) => + wasmModule.wire_bdk_transaction_new( + port_, version, lock_time, input, output); - void wire_TransactionBase_output(NativePortType port_, List that) => - wasmModule.wire_TransactionBase_output(port_, that); + void wire_bdk_transaction_output(NativePortType port_, List that) => + wasmModule.wire_bdk_transaction_output(port_, that); - void wire_TransactionBase_serialize( + void wire_bdk_transaction_serialize( NativePortType port_, List that) => - wasmModule.wire_TransactionBase_serialize(port_, that); + wasmModule.wire_bdk_transaction_serialize(port_, that); - void wire_TransactionBase_size(NativePortType port_, List that) => - wasmModule.wire_TransactionBase_size(port_, that); + void wire_bdk_transaction_size(NativePortType port_, List that) => + wasmModule.wire_bdk_transaction_size(port_, that); - void wire_TransactionBase_txid(NativePortType port_, List that) => - wasmModule.wire_TransactionBase_txid(port_, that); + void wire_bdk_transaction_txid(NativePortType port_, List that) => + wasmModule.wire_bdk_transaction_txid(port_, that); - void wire_TransactionBase_version(NativePortType port_, List that) => - wasmModule.wire_TransactionBase_version(port_, that); + void wire_bdk_transaction_version(NativePortType port_, List that) => + wasmModule.wire_bdk_transaction_version(port_, that); - void wire_TransactionBase_vsize(NativePortType port_, List that) => - wasmModule.wire_TransactionBase_vsize(port_, that); + void wire_bdk_transaction_vsize(NativePortType port_, List that) => + wasmModule.wire_bdk_transaction_vsize(port_, that); - void wire_TransactionBase_weight(NativePortType port_, List that) => - wasmModule.wire_TransactionBase_weight(port_, that); + void wire_bdk_transaction_weight(NativePortType port_, List that) => + wasmModule.wire_bdk_transaction_weight(port_, that); - void wire_WalletBase_get_address(NativePortType port_, List that, + void wire_bdk_wallet_get_address(NativePortType port_, List ptr, List address_index) => - wasmModule.wire_WalletBase_get_address(port_, that, address_index); + wasmModule.wire_bdk_wallet_get_address(port_, ptr, address_index); - void wire_WalletBase_get_balance(NativePortType port_, List that) => - wasmModule.wire_WalletBase_get_balance(port_, that); + void wire_bdk_wallet_get_balance(NativePortType port_, List that) => + wasmModule.wire_bdk_wallet_get_balance(port_, that); - void wire_WalletBase_get_descriptor_for_keychain( + void wire_bdk_wallet_get_descriptor_for_keychain( NativePortType port_, List ptr, int keychain) => - wasmModule.wire_WalletBase_get_descriptor_for_keychain( + wasmModule.wire_bdk_wallet_get_descriptor_for_keychain( port_, ptr, keychain); - void wire_WalletBase_get_internal_address(NativePortType port_, - List that, List address_index) => - wasmModule.wire_WalletBase_get_internal_address( - port_, that, address_index); + void wire_bdk_wallet_get_internal_address(NativePortType port_, + List ptr, List address_index) => + wasmModule.wire_bdk_wallet_get_internal_address( + port_, ptr, address_index); - void wire_WalletBase_get_psbt_input( + void wire_bdk_wallet_get_psbt_input( NativePortType port_, List that, List utxo, bool only_witness_utxo, List? sighash_type) => - wasmModule.wire_WalletBase_get_psbt_input( + wasmModule.wire_bdk_wallet_get_psbt_input( port_, that, utxo, only_witness_utxo, sighash_type); - void wire_WalletBase_is_mine( + void wire_bdk_wallet_is_mine( NativePortType port_, List that, List script) => - wasmModule.wire_WalletBase_is_mine(port_, that, script); + wasmModule.wire_bdk_wallet_is_mine(port_, that, script); - void wire_WalletBase_list_transactions( + void wire_bdk_wallet_list_transactions( NativePortType port_, List that, bool include_raw) => - wasmModule.wire_WalletBase_list_transactions(port_, that, include_raw); + wasmModule.wire_bdk_wallet_list_transactions(port_, that, include_raw); - void wire_WalletBase_list_unspent(NativePortType port_, List that) => - wasmModule.wire_WalletBase_list_unspent(port_, that); + void wire_bdk_wallet_list_unspent(NativePortType port_, List that) => + wasmModule.wire_bdk_wallet_list_unspent(port_, that); - void wire_WalletBase_network(NativePortType port_, List that) => - wasmModule.wire_WalletBase_network(port_, that); + void wire_bdk_wallet_network(NativePortType port_, List that) => + wasmModule.wire_bdk_wallet_network(port_, that); - void wire_WalletBase_new( + void wire_bdk_wallet_new( NativePortType port_, List descriptor, List? change_descriptor, int network, List database_config) => - wasmModule.wire_WalletBase_new( + wasmModule.wire_bdk_wallet_new( port_, descriptor, change_descriptor, network, database_config); - void wire_WalletBase_sign(NativePortType port_, List ptr, + void wire_bdk_wallet_sign(NativePortType port_, List ptr, List psbt, List? sign_options) => - wasmModule.wire_WalletBase_sign(port_, ptr, psbt, sign_options); + wasmModule.wire_bdk_wallet_sign(port_, ptr, psbt, sign_options); - void wire_WalletBase_sync( + void wire_bdk_wallet_sync( NativePortType port_, List ptr, List blockchain) => - wasmModule.wire_WalletBase_sync(port_, ptr, blockchain); + wasmModule.wire_bdk_wallet_sync(port_, ptr, blockchain); void wire_finish_bump_fee_tx_builder( NativePortType port_, @@ -2973,266 +3018,269 @@ class BdkCoreWire implements BaseWire { } @JS('wasm_bindgen') -external BdkCoreWasmModule get wasmModule; +external CApiWasmModule get wasmModule; @JS() @anonymous -class BdkCoreWasmModule implements WasmModule { +class CApiWasmModule implements WasmModule { @override external Object /* Promise */ call([String? moduleName]); @override - external BdkCoreWasmModule bind(dynamic thisArg, String moduleName); + external CApiWasmModule bind(dynamic thisArg, String moduleName); - external void wire_BlockchainBase_broadcast( + external void wire_bdk_blockchain_broadcast( NativePortType port_, List that, List transaction); - external void wire_BlockchainBase_estimate_fee( + external void wire_bdk_blockchain_estimate_fee( NativePortType port_, List that, Object target); - external void wire_BlockchainBase_get_block_hash( + external void wire_bdk_blockchain_get_block_hash( NativePortType port_, List that, int height); - external void wire_BlockchainBase_get_height( + external void wire_bdk_blockchain_get_height( NativePortType port_, List that); - external void wire_BlockchainBase_new( + external void wire_bdk_blockchain_new( NativePortType port_, List blockchain_config); - external void wire_DescriptorBase_as_string( + external void wire_bdk_descriptor_as_string( NativePortType port_, List that); - external void wire_DescriptorBase_as_string_private( + external void wire_bdk_descriptor_as_string_private( NativePortType port_, List that); - external void wire_DescriptorBase_max_satisfaction_weight( + external void wire_bdk_descriptor_max_satisfaction_weight( NativePortType port_, List that); - external void wire_DescriptorBase_new( + external void wire_bdk_descriptor_new( NativePortType port_, String descriptor, int network); - external void wire_DescriptorBase_new_bip44(NativePortType port_, + external void wire_bdk_descriptor_new_bip44(NativePortType port_, List secret_key, int keychain_kind, int network); - external void wire_DescriptorBase_new_bip44_public( + external void wire_bdk_descriptor_new_bip44_public( NativePortType port_, List public_key, String fingerprint, int keychain_kind, int network); - external void wire_DescriptorBase_new_bip49(NativePortType port_, + external void wire_bdk_descriptor_new_bip49(NativePortType port_, List secret_key, int keychain_kind, int network); - external void wire_DescriptorBase_new_bip49_public( + external void wire_bdk_descriptor_new_bip49_public( NativePortType port_, List public_key, String fingerprint, int keychain_kind, int network); - external void wire_DescriptorBase_new_bip84(NativePortType port_, + external void wire_bdk_descriptor_new_bip84(NativePortType port_, List secret_key, int keychain_kind, int network); - external void wire_DescriptorBase_new_bip84_public( + external void wire_bdk_descriptor_new_bip84_public( NativePortType port_, List public_key, String fingerprint, int keychain_kind, int network); - external void wire_DescriptorBase_new_bip86(NativePortType port_, + external void wire_bdk_descriptor_new_bip86(NativePortType port_, List secret_key, int keychain_kind, int network); - external void wire_DescriptorBase_new_bip86_public( + external void wire_bdk_descriptor_new_bip86_public( NativePortType port_, List public_key, String fingerprint, int keychain_kind, int network); - external void wire_DerivationPathBase_from_string( + external void wire_bdk_derivation_path_from_string( NativePortType port_, String path); - external void wire_DescriptorPublicKeyBase_as_string( + external void wire_bdk_descriptor_public_key_as_string( NativePortType port_, List that); - external void wire_DescriptorPublicKeyBase_derive( + external void wire_bdk_descriptor_public_key_derive( NativePortType port_, List ptr, List path); - external void wire_DescriptorPublicKeyBase_extend( + external void wire_bdk_descriptor_public_key_extend( NativePortType port_, List ptr, List path); - external void wire_DescriptorPublicKeyBase_from_string( + external void wire_bdk_descriptor_public_key_from_string( NativePortType port_, String public_key); - external void wire_DescriptorSecretKeyBase_as_public( + external void wire_bdk_descriptor_secret_key_as_public( NativePortType port_, List ptr); - external void wire_DescriptorSecretKeyBase_as_string( + external void wire_bdk_descriptor_secret_key_as_string( NativePortType port_, List that); - external void wire_DescriptorSecretKeyBase_create(NativePortType port_, + external void wire_bdk_descriptor_secret_key_create(NativePortType port_, int network, List mnemonic, String? password); - external void wire_DescriptorSecretKeyBase_derive( + external void wire_bdk_descriptor_secret_key_derive( NativePortType port_, List ptr, List path); - external void wire_DescriptorSecretKeyBase_extend( + external void wire_bdk_descriptor_secret_key_extend( NativePortType port_, List ptr, List path); - external void wire_DescriptorSecretKeyBase_from_string( + external void wire_bdk_descriptor_secret_key_from_string( NativePortType port_, String secret_key); - external void wire_DescriptorSecretKeyBase_secret_bytes( + external void wire_bdk_descriptor_secret_key_secret_bytes( NativePortType port_, List that); - external void wire_MnemonicBase_as_string( + external void wire_bdk_mnemonic_as_string( NativePortType port_, List that); - external void wire_MnemonicBase_from_entropy( + external void wire_bdk_mnemonic_from_entropy( NativePortType port_, List entropy); - external void wire_MnemonicBase_from_string( + external void wire_bdk_mnemonic_from_string( NativePortType port_, String mnemonic); - external void wire_MnemonicBase_new(NativePortType port_, int word_count); + external void wire_bdk_mnemonic_new(NativePortType port_, int word_count); - external void wire_PsbtBase_combine( + external void wire_bdk_psbt_combine( NativePortType port_, List ptr, List other); - external void wire_PsbtBase_extract_tx( + external void wire_bdk_psbt_extract_tx( NativePortType port_, List ptr); - external void wire_PsbtBase_fee_amount( + external void wire_bdk_psbt_fee_amount( NativePortType port_, List that); - external void wire_PsbtBase_fee_rate( + external void wire_bdk_psbt_fee_rate( NativePortType port_, List that); - external void wire_PsbtBase_from_str( + external void wire_bdk_psbt_from_str( NativePortType port_, String psbt_base64); - external void wire_PsbtBase_json_serialize( + external void wire_bdk_psbt_json_serialize( NativePortType port_, List that); - external void wire_PsbtBase_serialize( + external void wire_bdk_psbt_serialize( NativePortType port_, List that); - external void wire_PsbtBase_txid(NativePortType port_, List that); + external void wire_bdk_psbt_txid(NativePortType port_, List that); - external void wire_AddressBase_as_string( + external void wire_bdk_address_as_string( NativePortType port_, List that); - external void wire_AddressBase_from_script( + external void wire_bdk_address_from_script( NativePortType port_, List script, int network); - external void wire_AddressBase_from_string( + external void wire_bdk_address_from_string( NativePortType port_, String address, int network); - external void wire_AddressBase_is_valid_for_network( + external void wire_bdk_address_is_valid_for_network( NativePortType port_, List that, int network); - external void wire_AddressBase_network( + external void wire_bdk_address_network( NativePortType port_, List that); - external void wire_AddressBase_payload( + external void wire_bdk_address_payload( NativePortType port_, List that); - external void wire_AddressBase_script( + external void wire_bdk_address_script( NativePortType port_, List ptr); - external void wire_AddressBase_to_qr_uri( + external void wire_bdk_address_to_qr_uri( NativePortType port_, List that); - external void wire_ScriptBufBase_empty(NativePortType port_); + external void wire_bdk_script_buf_empty(NativePortType port_); - external void wire_ScriptBufBase_from_hex(NativePortType port_, String s); + external void wire_bdk_script_buf_from_hex(NativePortType port_, String s); - external void wire_ScriptBufBase_with_capacity( + external void wire_bdk_script_buf_with_capacity( NativePortType port_, int capacity); - external void wire_TransactionBase_input( + external void wire_bdk_transaction_from_bytes( + NativePortType port_, List transaction_bytes); + + external void wire_bdk_transaction_input( NativePortType port_, List that); - external void wire_TransactionBase_is_coin_base( + external void wire_bdk_transaction_is_coin_base( NativePortType port_, List that); - external void wire_TransactionBase_is_explicitly_rbf( + external void wire_bdk_transaction_is_explicitly_rbf( NativePortType port_, List that); - external void wire_TransactionBase_is_lock_time_enabled( + external void wire_bdk_transaction_is_lock_time_enabled( NativePortType port_, List that); - external void wire_TransactionBase_lock_time( + external void wire_bdk_transaction_lock_time( NativePortType port_, List that); - external void wire_TransactionBase_new( - NativePortType port_, List transaction_bytes); + external void wire_bdk_transaction_new(NativePortType port_, int version, + List lock_time, List input, List output); - external void wire_TransactionBase_output( + external void wire_bdk_transaction_output( NativePortType port_, List that); - external void wire_TransactionBase_serialize( + external void wire_bdk_transaction_serialize( NativePortType port_, List that); - external void wire_TransactionBase_size( + external void wire_bdk_transaction_size( NativePortType port_, List that); - external void wire_TransactionBase_txid( + external void wire_bdk_transaction_txid( NativePortType port_, List that); - external void wire_TransactionBase_version( + external void wire_bdk_transaction_version( NativePortType port_, List that); - external void wire_TransactionBase_vsize( + external void wire_bdk_transaction_vsize( NativePortType port_, List that); - external void wire_TransactionBase_weight( + external void wire_bdk_transaction_weight( NativePortType port_, List that); - external void wire_WalletBase_get_address( - NativePortType port_, List that, List address_index); + external void wire_bdk_wallet_get_address( + NativePortType port_, List ptr, List address_index); - external void wire_WalletBase_get_balance( + external void wire_bdk_wallet_get_balance( NativePortType port_, List that); - external void wire_WalletBase_get_descriptor_for_keychain( + external void wire_bdk_wallet_get_descriptor_for_keychain( NativePortType port_, List ptr, int keychain); - external void wire_WalletBase_get_internal_address( - NativePortType port_, List that, List address_index); + external void wire_bdk_wallet_get_internal_address( + NativePortType port_, List ptr, List address_index); - external void wire_WalletBase_get_psbt_input( + external void wire_bdk_wallet_get_psbt_input( NativePortType port_, List that, List utxo, bool only_witness_utxo, List? sighash_type); - external void wire_WalletBase_is_mine( + external void wire_bdk_wallet_is_mine( NativePortType port_, List that, List script); - external void wire_WalletBase_list_transactions( + external void wire_bdk_wallet_list_transactions( NativePortType port_, List that, bool include_raw); - external void wire_WalletBase_list_unspent( + external void wire_bdk_wallet_list_unspent( NativePortType port_, List that); - external void wire_WalletBase_network( + external void wire_bdk_wallet_network( NativePortType port_, List that); - external void wire_WalletBase_new( + external void wire_bdk_wallet_new( NativePortType port_, List descriptor, List? change_descriptor, int network, List database_config); - external void wire_WalletBase_sign(NativePortType port_, List ptr, + external void wire_bdk_wallet_sign(NativePortType port_, List ptr, List psbt, List? sign_options); - external void wire_WalletBase_sync( + external void wire_bdk_wallet_sync( NativePortType port_, List ptr, List blockchain); external void wire_finish_bump_fee_tx_builder( diff --git a/macos/Classes/frb_generated.h b/macos/Classes/frb_generated.h index f8bc1d42..c79716cb 100644 --- a/macos/Classes/frb_generated.h +++ b/macos/Classes/frb_generated.h @@ -14,18 +14,18 @@ void store_dart_post_cobject(DartPostCObjectFnType ptr); // EXTRA END typedef struct _Dart_Handle* Dart_Handle; -typedef struct wire_cst_blockchain_base { +typedef struct wire_cst_bdk_blockchain { uintptr_t ptr; -} wire_cst_blockchain_base; +} 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_transaction_base { +typedef struct wire_cst_bdk_transaction { struct wire_cst_list_prim_u_8_strict *inner; -} wire_cst_transaction_base; +} wire_cst_bdk_transaction; typedef struct wire_cst_electrum_config { struct wire_cst_list_prim_u_8_strict *url; @@ -101,47 +101,97 @@ typedef struct wire_cst_blockchain_config { union BlockchainConfigKind kind; } wire_cst_blockchain_config; -typedef struct wire_cst_descriptor_base { +typedef struct wire_cst_bdk_descriptor { uintptr_t extended_descriptor; uintptr_t key_map; -} wire_cst_descriptor_base; +} wire_cst_bdk_descriptor; -typedef struct wire_cst_descriptor_secret_key_base { +typedef struct wire_cst_bdk_descriptor_secret_key { uintptr_t ptr; -} wire_cst_descriptor_secret_key_base; +} wire_cst_bdk_descriptor_secret_key; -typedef struct wire_cst_descriptor_public_key_base { +typedef struct wire_cst_bdk_descriptor_public_key { uintptr_t ptr; -} wire_cst_descriptor_public_key_base; +} wire_cst_bdk_descriptor_public_key; -typedef struct wire_cst_derivation_path_base { +typedef struct wire_cst_bdk_derivation_path { uintptr_t ptr; -} wire_cst_derivation_path_base; +} wire_cst_bdk_derivation_path; -typedef struct wire_cst_mnemonic_base { +typedef struct wire_cst_bdk_mnemonic { uintptr_t ptr; -} wire_cst_mnemonic_base; +} 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_psbt_base { +typedef struct wire_cst_bdk_psbt { uintptr_t ptr; -} wire_cst_psbt_base; +} wire_cst_bdk_psbt; -typedef struct wire_cst_address_base { +typedef struct wire_cst_bdk_address { uintptr_t ptr; -} wire_cst_address_base; +} wire_cst_bdk_address; -typedef struct wire_cst_script_buf_base { +typedef struct wire_cst_bdk_script_buf { struct wire_cst_list_prim_u_8_strict *bytes; -} wire_cst_script_buf_base; +} wire_cst_bdk_script_buf; -typedef struct wire_cst_wallet_base { +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_wallet_base; +} wire_cst_bdk_wallet; typedef struct wire_cst_AddressIndex_Peek { uint32_t index; @@ -161,16 +211,6 @@ typedef struct wire_cst_address_index { union AddressIndexKind kind; } wire_cst_address_index; -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_tx_out { - uint64_t value; - struct wire_cst_script_buf_base script_pubkey; -} wire_cst_tx_out; - typedef struct wire_cst_local_utxo { struct wire_cst_out_point outpoint; struct wire_cst_tx_out txout; @@ -221,7 +261,7 @@ typedef struct wire_cst_sign_options { } wire_cst_sign_options; typedef struct wire_cst_script_amount { - struct wire_cst_script_buf_base script; + struct wire_cst_bdk_script_buf script; uint64_t amount; } wire_cst_script_amount; @@ -430,18 +470,13 @@ typedef struct wire_cst_hex_error { union HexErrorKind kind; } wire_cst_hex_error; -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_list_local_utxo { struct wire_cst_local_utxo *ptr; int32_t len; } wire_cst_list_local_utxo; typedef struct wire_cst_transaction_details { - struct wire_cst_transaction_base *transaction; + struct wire_cst_bdk_transaction *transaction; struct wire_cst_list_prim_u_8_strict *txid; uint64_t received; uint64_t sent; @@ -454,28 +489,6 @@ typedef struct wire_cst_list_transaction_details { int32_t len; } wire_cst_list_transaction_details; -typedef struct wire_cst_tx_in { - struct wire_cst_out_point previous_output; - struct wire_cst_script_buf_base 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_list_tx_out { - struct wire_cst_tx_out *ptr; - int32_t len; -} wire_cst_list_tx_out; - -typedef struct wire_cst_address_info { - uint32_t index; - struct wire_cst_list_prim_u_8_strict *address; -} wire_cst_address_info; - typedef struct wire_cst_balance { uint64_t immature; uint64_t trusted_pending; @@ -616,6 +629,18 @@ 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; @@ -649,6 +674,9 @@ typedef union BdkErrorKind { 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 { @@ -680,288 +708,298 @@ typedef struct wire_cst_payload { union PayloadKind kind; } wire_cst_payload; -typedef struct wire_cst_record_psbt_base_transaction_details { - struct wire_cst_psbt_base field0; +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_psbt_base_transaction_details; +} wire_cst_record_bdk_psbt_transaction_details; -void frbgen_bdk_flutter_wire_BlockchainBase_broadcast(int64_t port_, - struct wire_cst_blockchain_base *that, - struct wire_cst_transaction_base *transaction); +void frbgen_bdk_flutter_wire_bdk_blockchain_broadcast(int64_t port_, + struct wire_cst_bdk_blockchain *that, + struct wire_cst_bdk_transaction *transaction); -void frbgen_bdk_flutter_wire_BlockchainBase_estimate_fee(int64_t port_, - struct wire_cst_blockchain_base *that, +void frbgen_bdk_flutter_wire_bdk_blockchain_estimate_fee(int64_t port_, + struct wire_cst_bdk_blockchain *that, uint64_t target); -void frbgen_bdk_flutter_wire_BlockchainBase_get_block_hash(int64_t port_, - struct wire_cst_blockchain_base *that, +void frbgen_bdk_flutter_wire_bdk_blockchain_get_block_hash(int64_t port_, + struct wire_cst_bdk_blockchain *that, uint32_t height); -void frbgen_bdk_flutter_wire_BlockchainBase_get_height(int64_t port_, - struct wire_cst_blockchain_base *that); +void frbgen_bdk_flutter_wire_bdk_blockchain_get_height(int64_t port_, + struct wire_cst_bdk_blockchain *that); -void frbgen_bdk_flutter_wire_BlockchainBase_new(int64_t port_, +void frbgen_bdk_flutter_wire_bdk_blockchain_new(int64_t port_, struct wire_cst_blockchain_config *blockchain_config); -void frbgen_bdk_flutter_wire_DescriptorBase_as_string(int64_t port_, - struct wire_cst_descriptor_base *that); +void frbgen_bdk_flutter_wire_bdk_descriptor_as_string(int64_t port_, + struct wire_cst_bdk_descriptor *that); -void frbgen_bdk_flutter_wire_DescriptorBase_as_string_private(int64_t port_, - struct wire_cst_descriptor_base *that); +void frbgen_bdk_flutter_wire_bdk_descriptor_as_string_private(int64_t port_, + struct wire_cst_bdk_descriptor *that); -void frbgen_bdk_flutter_wire_DescriptorBase_max_satisfaction_weight(int64_t port_, - struct wire_cst_descriptor_base *that); +void frbgen_bdk_flutter_wire_bdk_descriptor_max_satisfaction_weight(int64_t port_, + struct wire_cst_bdk_descriptor *that); -void frbgen_bdk_flutter_wire_DescriptorBase_new(int64_t port_, +void frbgen_bdk_flutter_wire_bdk_descriptor_new(int64_t port_, struct wire_cst_list_prim_u_8_strict *descriptor, int32_t network); -void frbgen_bdk_flutter_wire_DescriptorBase_new_bip44(int64_t port_, - struct wire_cst_descriptor_secret_key_base *secret_key, +void frbgen_bdk_flutter_wire_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_DescriptorBase_new_bip44_public(int64_t port_, - struct wire_cst_descriptor_public_key_base *public_key, +void frbgen_bdk_flutter_wire_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_DescriptorBase_new_bip49(int64_t port_, - struct wire_cst_descriptor_secret_key_base *secret_key, +void frbgen_bdk_flutter_wire_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_DescriptorBase_new_bip49_public(int64_t port_, - struct wire_cst_descriptor_public_key_base *public_key, +void frbgen_bdk_flutter_wire_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_DescriptorBase_new_bip84(int64_t port_, - struct wire_cst_descriptor_secret_key_base *secret_key, +void frbgen_bdk_flutter_wire_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_DescriptorBase_new_bip84_public(int64_t port_, - struct wire_cst_descriptor_public_key_base *public_key, +void frbgen_bdk_flutter_wire_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_DescriptorBase_new_bip86(int64_t port_, - struct wire_cst_descriptor_secret_key_base *secret_key, +void frbgen_bdk_flutter_wire_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_DescriptorBase_new_bip86_public(int64_t port_, - struct wire_cst_descriptor_public_key_base *public_key, +void frbgen_bdk_flutter_wire_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); -void frbgen_bdk_flutter_wire_DerivationPathBase_from_string(int64_t port_, - struct wire_cst_list_prim_u_8_strict *path); +void frbgen_bdk_flutter_wire_bdk_derivation_path_from_string(int64_t port_, + struct wire_cst_list_prim_u_8_strict *path); -void frbgen_bdk_flutter_wire_DescriptorPublicKeyBase_as_string(int64_t port_, - struct wire_cst_descriptor_public_key_base *that); +void frbgen_bdk_flutter_wire_bdk_descriptor_public_key_as_string(int64_t port_, + struct wire_cst_bdk_descriptor_public_key *that); -void frbgen_bdk_flutter_wire_DescriptorPublicKeyBase_derive(int64_t port_, - struct wire_cst_descriptor_public_key_base *ptr, - struct wire_cst_derivation_path_base *path); +void frbgen_bdk_flutter_wire_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_DescriptorPublicKeyBase_extend(int64_t port_, - struct wire_cst_descriptor_public_key_base *ptr, - struct wire_cst_derivation_path_base *path); +void frbgen_bdk_flutter_wire_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_DescriptorPublicKeyBase_from_string(int64_t port_, - struct wire_cst_list_prim_u_8_strict *public_key); +void frbgen_bdk_flutter_wire_bdk_descriptor_public_key_from_string(int64_t port_, + struct wire_cst_list_prim_u_8_strict *public_key); -void frbgen_bdk_flutter_wire_DescriptorSecretKeyBase_as_public(int64_t port_, - struct wire_cst_descriptor_secret_key_base *ptr); +void frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_as_public(int64_t port_, + struct wire_cst_bdk_descriptor_secret_key *ptr); -void frbgen_bdk_flutter_wire_DescriptorSecretKeyBase_as_string(int64_t port_, - struct wire_cst_descriptor_secret_key_base *that); +void frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_as_string(int64_t port_, + struct wire_cst_bdk_descriptor_secret_key *that); -void frbgen_bdk_flutter_wire_DescriptorSecretKeyBase_create(int64_t port_, - int32_t network, - struct wire_cst_mnemonic_base *mnemonic, - struct wire_cst_list_prim_u_8_strict *password); +void frbgen_bdk_flutter_wire_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_DescriptorSecretKeyBase_derive(int64_t port_, - struct wire_cst_descriptor_secret_key_base *ptr, - struct wire_cst_derivation_path_base *path); +void frbgen_bdk_flutter_wire_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_DescriptorSecretKeyBase_extend(int64_t port_, - struct wire_cst_descriptor_secret_key_base *ptr, - struct wire_cst_derivation_path_base *path); +void frbgen_bdk_flutter_wire_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_DescriptorSecretKeyBase_from_string(int64_t port_, - struct wire_cst_list_prim_u_8_strict *secret_key); +void frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_from_string(int64_t port_, + struct wire_cst_list_prim_u_8_strict *secret_key); -void frbgen_bdk_flutter_wire_DescriptorSecretKeyBase_secret_bytes(int64_t port_, - struct wire_cst_descriptor_secret_key_base *that); +void frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_secret_bytes(int64_t port_, + struct wire_cst_bdk_descriptor_secret_key *that); -void frbgen_bdk_flutter_wire_MnemonicBase_as_string(int64_t port_, - struct wire_cst_mnemonic_base *that); +void frbgen_bdk_flutter_wire_bdk_mnemonic_as_string(int64_t port_, + struct wire_cst_bdk_mnemonic *that); -void frbgen_bdk_flutter_wire_MnemonicBase_from_entropy(int64_t port_, +void frbgen_bdk_flutter_wire_bdk_mnemonic_from_entropy(int64_t port_, struct wire_cst_list_prim_u_8_loose *entropy); -void frbgen_bdk_flutter_wire_MnemonicBase_from_string(int64_t port_, +void frbgen_bdk_flutter_wire_bdk_mnemonic_from_string(int64_t port_, struct wire_cst_list_prim_u_8_strict *mnemonic); -void frbgen_bdk_flutter_wire_MnemonicBase_new(int64_t port_, int32_t word_count); +void frbgen_bdk_flutter_wire_bdk_mnemonic_new(int64_t port_, int32_t word_count); -void frbgen_bdk_flutter_wire_PsbtBase_combine(int64_t port_, - struct wire_cst_psbt_base *ptr, - struct wire_cst_psbt_base *other); +void frbgen_bdk_flutter_wire_bdk_psbt_combine(int64_t port_, + struct wire_cst_bdk_psbt *ptr, + struct wire_cst_bdk_psbt *other); -void frbgen_bdk_flutter_wire_PsbtBase_extract_tx(int64_t port_, struct wire_cst_psbt_base *ptr); +void frbgen_bdk_flutter_wire_bdk_psbt_extract_tx(int64_t port_, struct wire_cst_bdk_psbt *ptr); -void frbgen_bdk_flutter_wire_PsbtBase_fee_amount(int64_t port_, struct wire_cst_psbt_base *that); +void frbgen_bdk_flutter_wire_bdk_psbt_fee_amount(int64_t port_, struct wire_cst_bdk_psbt *that); -void frbgen_bdk_flutter_wire_PsbtBase_fee_rate(int64_t port_, struct wire_cst_psbt_base *that); +void frbgen_bdk_flutter_wire_bdk_psbt_fee_rate(int64_t port_, struct wire_cst_bdk_psbt *that); -void frbgen_bdk_flutter_wire_PsbtBase_from_str(int64_t port_, +void frbgen_bdk_flutter_wire_bdk_psbt_from_str(int64_t port_, struct wire_cst_list_prim_u_8_strict *psbt_base64); -void frbgen_bdk_flutter_wire_PsbtBase_json_serialize(int64_t port_, - struct wire_cst_psbt_base *that); +void frbgen_bdk_flutter_wire_bdk_psbt_json_serialize(int64_t port_, struct wire_cst_bdk_psbt *that); -void frbgen_bdk_flutter_wire_PsbtBase_serialize(int64_t port_, struct wire_cst_psbt_base *that); +void frbgen_bdk_flutter_wire_bdk_psbt_serialize(int64_t port_, struct wire_cst_bdk_psbt *that); -void frbgen_bdk_flutter_wire_PsbtBase_txid(int64_t port_, struct wire_cst_psbt_base *that); +void frbgen_bdk_flutter_wire_bdk_psbt_txid(int64_t port_, struct wire_cst_bdk_psbt *that); -void frbgen_bdk_flutter_wire_AddressBase_as_string(int64_t port_, - struct wire_cst_address_base *that); +void frbgen_bdk_flutter_wire_bdk_address_as_string(int64_t port_, + struct wire_cst_bdk_address *that); -void frbgen_bdk_flutter_wire_AddressBase_from_script(int64_t port_, - struct wire_cst_script_buf_base *script, +void frbgen_bdk_flutter_wire_bdk_address_from_script(int64_t port_, + struct wire_cst_bdk_script_buf *script, int32_t network); -void frbgen_bdk_flutter_wire_AddressBase_from_string(int64_t port_, +void frbgen_bdk_flutter_wire_bdk_address_from_string(int64_t port_, struct wire_cst_list_prim_u_8_strict *address, int32_t network); -void frbgen_bdk_flutter_wire_AddressBase_is_valid_for_network(int64_t port_, - struct wire_cst_address_base *that, +void frbgen_bdk_flutter_wire_bdk_address_is_valid_for_network(int64_t port_, + struct wire_cst_bdk_address *that, int32_t network); -void frbgen_bdk_flutter_wire_AddressBase_network(int64_t port_, struct wire_cst_address_base *that); +void frbgen_bdk_flutter_wire_bdk_address_network(int64_t port_, struct wire_cst_bdk_address *that); + +void frbgen_bdk_flutter_wire_bdk_address_payload(int64_t port_, struct wire_cst_bdk_address *that); -void frbgen_bdk_flutter_wire_AddressBase_payload(int64_t port_, struct wire_cst_address_base *that); +void frbgen_bdk_flutter_wire_bdk_address_script(int64_t port_, struct wire_cst_bdk_address *ptr); -void frbgen_bdk_flutter_wire_AddressBase_script(int64_t port_, struct wire_cst_address_base *ptr); +void frbgen_bdk_flutter_wire_bdk_address_to_qr_uri(int64_t port_, + struct wire_cst_bdk_address *that); -void frbgen_bdk_flutter_wire_AddressBase_to_qr_uri(int64_t port_, - struct wire_cst_address_base *that); +void frbgen_bdk_flutter_wire_bdk_script_buf_empty(int64_t port_); -void frbgen_bdk_flutter_wire_ScriptBufBase_empty(int64_t port_); +void frbgen_bdk_flutter_wire_bdk_script_buf_from_hex(int64_t port_, + struct wire_cst_list_prim_u_8_strict *s); -void frbgen_bdk_flutter_wire_ScriptBufBase_from_hex(int64_t port_, - struct wire_cst_list_prim_u_8_strict *s); +void frbgen_bdk_flutter_wire_bdk_script_buf_with_capacity(int64_t port_, uintptr_t capacity); -void frbgen_bdk_flutter_wire_ScriptBufBase_with_capacity(int64_t port_, uintptr_t capacity); +void frbgen_bdk_flutter_wire_bdk_transaction_from_bytes(int64_t port_, + struct wire_cst_list_prim_u_8_loose *transaction_bytes); -void frbgen_bdk_flutter_wire_TransactionBase_input(int64_t port_, - struct wire_cst_transaction_base *that); +void frbgen_bdk_flutter_wire_bdk_transaction_input(int64_t port_, + struct wire_cst_bdk_transaction *that); -void frbgen_bdk_flutter_wire_TransactionBase_is_coin_base(int64_t port_, - struct wire_cst_transaction_base *that); +void frbgen_bdk_flutter_wire_bdk_transaction_is_coin_base(int64_t port_, + struct wire_cst_bdk_transaction *that); -void frbgen_bdk_flutter_wire_TransactionBase_is_explicitly_rbf(int64_t port_, - struct wire_cst_transaction_base *that); +void frbgen_bdk_flutter_wire_bdk_transaction_is_explicitly_rbf(int64_t port_, + struct wire_cst_bdk_transaction *that); -void frbgen_bdk_flutter_wire_TransactionBase_is_lock_time_enabled(int64_t port_, - struct wire_cst_transaction_base *that); +void frbgen_bdk_flutter_wire_bdk_transaction_is_lock_time_enabled(int64_t port_, + struct wire_cst_bdk_transaction *that); -void frbgen_bdk_flutter_wire_TransactionBase_lock_time(int64_t port_, - struct wire_cst_transaction_base *that); +void frbgen_bdk_flutter_wire_bdk_transaction_lock_time(int64_t port_, + struct wire_cst_bdk_transaction *that); -void frbgen_bdk_flutter_wire_TransactionBase_new(int64_t port_, - struct wire_cst_list_prim_u_8_loose *transaction_bytes); +void frbgen_bdk_flutter_wire_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_TransactionBase_output(int64_t port_, - struct wire_cst_transaction_base *that); +void frbgen_bdk_flutter_wire_bdk_transaction_output(int64_t port_, + struct wire_cst_bdk_transaction *that); -void frbgen_bdk_flutter_wire_TransactionBase_serialize(int64_t port_, - struct wire_cst_transaction_base *that); +void frbgen_bdk_flutter_wire_bdk_transaction_serialize(int64_t port_, + struct wire_cst_bdk_transaction *that); -void frbgen_bdk_flutter_wire_TransactionBase_size(int64_t port_, - struct wire_cst_transaction_base *that); +void frbgen_bdk_flutter_wire_bdk_transaction_size(int64_t port_, + struct wire_cst_bdk_transaction *that); -void frbgen_bdk_flutter_wire_TransactionBase_txid(int64_t port_, - struct wire_cst_transaction_base *that); +void frbgen_bdk_flutter_wire_bdk_transaction_txid(int64_t port_, + struct wire_cst_bdk_transaction *that); -void frbgen_bdk_flutter_wire_TransactionBase_version(int64_t port_, - struct wire_cst_transaction_base *that); +void frbgen_bdk_flutter_wire_bdk_transaction_version(int64_t port_, + struct wire_cst_bdk_transaction *that); -void frbgen_bdk_flutter_wire_TransactionBase_vsize(int64_t port_, - struct wire_cst_transaction_base *that); +void frbgen_bdk_flutter_wire_bdk_transaction_vsize(int64_t port_, + struct wire_cst_bdk_transaction *that); -void frbgen_bdk_flutter_wire_TransactionBase_weight(int64_t port_, - struct wire_cst_transaction_base *that); +void frbgen_bdk_flutter_wire_bdk_transaction_weight(int64_t port_, + struct wire_cst_bdk_transaction *that); -void frbgen_bdk_flutter_wire_WalletBase_get_address(int64_t port_, - struct wire_cst_wallet_base *that, +void frbgen_bdk_flutter_wire_bdk_wallet_get_address(int64_t port_, + struct wire_cst_bdk_wallet *ptr, struct wire_cst_address_index *address_index); -void frbgen_bdk_flutter_wire_WalletBase_get_balance(int64_t port_, - struct wire_cst_wallet_base *that); +void frbgen_bdk_flutter_wire_bdk_wallet_get_balance(int64_t port_, + struct wire_cst_bdk_wallet *that); -void frbgen_bdk_flutter_wire_WalletBase_get_descriptor_for_keychain(int64_t port_, - struct wire_cst_wallet_base *ptr, +void frbgen_bdk_flutter_wire_bdk_wallet_get_descriptor_for_keychain(int64_t port_, + struct wire_cst_bdk_wallet *ptr, int32_t keychain); -void frbgen_bdk_flutter_wire_WalletBase_get_internal_address(int64_t port_, - struct wire_cst_wallet_base *that, +void frbgen_bdk_flutter_wire_bdk_wallet_get_internal_address(int64_t port_, + struct wire_cst_bdk_wallet *ptr, struct wire_cst_address_index *address_index); -void frbgen_bdk_flutter_wire_WalletBase_get_psbt_input(int64_t port_, - struct wire_cst_wallet_base *that, +void frbgen_bdk_flutter_wire_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); -void frbgen_bdk_flutter_wire_WalletBase_is_mine(int64_t port_, - struct wire_cst_wallet_base *that, - struct wire_cst_script_buf_base *script); +void frbgen_bdk_flutter_wire_bdk_wallet_is_mine(int64_t port_, + struct wire_cst_bdk_wallet *that, + struct wire_cst_bdk_script_buf *script); -void frbgen_bdk_flutter_wire_WalletBase_list_transactions(int64_t port_, - struct wire_cst_wallet_base *that, +void frbgen_bdk_flutter_wire_bdk_wallet_list_transactions(int64_t port_, + struct wire_cst_bdk_wallet *that, bool include_raw); -void frbgen_bdk_flutter_wire_WalletBase_list_unspent(int64_t port_, - struct wire_cst_wallet_base *that); +void frbgen_bdk_flutter_wire_bdk_wallet_list_unspent(int64_t port_, + struct wire_cst_bdk_wallet *that); -void frbgen_bdk_flutter_wire_WalletBase_network(int64_t port_, struct wire_cst_wallet_base *that); +void frbgen_bdk_flutter_wire_bdk_wallet_network(int64_t port_, struct wire_cst_bdk_wallet *that); -void frbgen_bdk_flutter_wire_WalletBase_new(int64_t port_, - struct wire_cst_descriptor_base *descriptor, - struct wire_cst_descriptor_base *change_descriptor, +void frbgen_bdk_flutter_wire_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); -void frbgen_bdk_flutter_wire_WalletBase_sign(int64_t port_, - struct wire_cst_wallet_base *ptr, - struct wire_cst_psbt_base *psbt, +void frbgen_bdk_flutter_wire_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_WalletBase_sync(int64_t port_, - struct wire_cst_wallet_base *ptr, - struct wire_cst_blockchain_base *blockchain); +void frbgen_bdk_flutter_wire_bdk_wallet_sync(int64_t port_, + struct wire_cst_bdk_wallet *ptr, + struct wire_cst_bdk_blockchain *blockchain); void frbgen_bdk_flutter_wire_finish_bump_fee_tx_builder(int64_t port_, struct wire_cst_list_prim_u_8_strict *txid, float fee_rate, - struct wire_cst_address_base *allow_shrinking, - struct wire_cst_wallet_base *wallet, + 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_tx_builder_finish(int64_t port_, - struct wire_cst_wallet_base *wallet, + 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, @@ -971,7 +1009,7 @@ void frbgen_bdk_flutter_wire_tx_builder_finish(int64_t port_, float *fee_rate, uint64_t *fee_absolute, bool drain_wallet, - struct wire_cst_script_buf_base *drain_to, + struct wire_cst_bdk_script_buf *drain_to, struct wire_cst_rbf_value *rbf, struct wire_cst_list_prim_u_8_loose *data); @@ -1015,31 +1053,41 @@ void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysbip39Mnem void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysbip39Mnemonic(const void *ptr); -struct wire_cst_address_base *frbgen_bdk_flutter_cst_new_box_autoadd_address_base(void); - 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_block_time *frbgen_bdk_flutter_cst_new_box_autoadd_block_time(void); +struct wire_cst_bdk_address *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_address(void); -struct wire_cst_blockchain_base *frbgen_bdk_flutter_cst_new_box_autoadd_blockchain_base(void); +struct wire_cst_bdk_blockchain *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_blockchain(void); -struct wire_cst_blockchain_config *frbgen_bdk_flutter_cst_new_box_autoadd_blockchain_config(void); +struct wire_cst_bdk_derivation_path *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_derivation_path(void); -struct wire_cst_consensus_error *frbgen_bdk_flutter_cst_new_box_autoadd_consensus_error(void); +struct wire_cst_bdk_descriptor *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor(void); -struct wire_cst_database_config *frbgen_bdk_flutter_cst_new_box_autoadd_database_config(void); +struct wire_cst_bdk_descriptor_public_key *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor_public_key(void); -struct wire_cst_derivation_path_base *frbgen_bdk_flutter_cst_new_box_autoadd_derivation_path_base(void); +struct wire_cst_bdk_descriptor_secret_key *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor_secret_key(void); -struct wire_cst_descriptor_base *frbgen_bdk_flutter_cst_new_box_autoadd_descriptor_base(void); +struct wire_cst_bdk_mnemonic *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_mnemonic(void); -struct wire_cst_descriptor_error *frbgen_bdk_flutter_cst_new_box_autoadd_descriptor_error(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_descriptor_public_key_base *frbgen_bdk_flutter_cst_new_box_autoadd_descriptor_public_key_base(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); + +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_secret_key_base *frbgen_bdk_flutter_cst_new_box_autoadd_descriptor_secret_key_base(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); @@ -1053,12 +1101,10 @@ 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_mnemonic_base *frbgen_bdk_flutter_cst_new_box_autoadd_mnemonic_base(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_psbt_base *frbgen_bdk_flutter_cst_new_box_autoadd_psbt_base(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); @@ -1069,24 +1115,18 @@ struct wire_cst_rpc_config *frbgen_bdk_flutter_cst_new_box_autoadd_rpc_config(vo struct wire_cst_rpc_sync_params *frbgen_bdk_flutter_cst_new_box_autoadd_rpc_sync_params(void); -struct wire_cst_script_buf_base *frbgen_bdk_flutter_cst_new_box_autoadd_script_buf_base(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); -struct wire_cst_transaction_base *frbgen_bdk_flutter_cst_new_box_autoadd_transaction_base(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_wallet_base *frbgen_bdk_flutter_cst_new_box_autoadd_wallet_base(void); - 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); @@ -1106,42 +1146,43 @@ 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_base); 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_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_base); 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_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_derivation_path_base); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_descriptor_base); 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_descriptor_public_key_base); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_descriptor_secret_key_base); 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_mnemonic_base); + 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_psbt_base); 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_script_buf_base); 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_transaction_base); 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_box_autoadd_wallet_base); 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); @@ -1171,83 +1212,84 @@ static int64_t dummy_method_to_enforce_bundling(void) { dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysDescriptorSecretKey); dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysKeyMap); dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysbip39Mnemonic); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_AddressBase_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_AddressBase_from_script); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_AddressBase_from_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_AddressBase_is_valid_for_network); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_AddressBase_network); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_AddressBase_payload); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_AddressBase_script); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_AddressBase_to_qr_uri); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_BlockchainBase_broadcast); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_BlockchainBase_estimate_fee); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_BlockchainBase_get_block_hash); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_BlockchainBase_get_height); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_BlockchainBase_new); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DerivationPathBase_from_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorBase_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorBase_as_string_private); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorBase_max_satisfaction_weight); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorBase_new); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorBase_new_bip44); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorBase_new_bip44_public); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorBase_new_bip49); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorBase_new_bip49_public); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorBase_new_bip84); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorBase_new_bip84_public); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorBase_new_bip86); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorBase_new_bip86_public); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorPublicKeyBase_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorPublicKeyBase_derive); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorPublicKeyBase_extend); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorPublicKeyBase_from_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorSecretKeyBase_as_public); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorSecretKeyBase_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorSecretKeyBase_create); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorSecretKeyBase_derive); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorSecretKeyBase_extend); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorSecretKeyBase_from_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_DescriptorSecretKeyBase_secret_bytes); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_MnemonicBase_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_MnemonicBase_from_entropy); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_MnemonicBase_from_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_MnemonicBase_new); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_PsbtBase_combine); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_PsbtBase_extract_tx); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_PsbtBase_fee_amount); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_PsbtBase_fee_rate); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_PsbtBase_from_str); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_PsbtBase_json_serialize); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_PsbtBase_serialize); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_PsbtBase_txid); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_ScriptBufBase_empty); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_ScriptBufBase_from_hex); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_ScriptBufBase_with_capacity); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_TransactionBase_input); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_TransactionBase_is_coin_base); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_TransactionBase_is_explicitly_rbf); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_TransactionBase_is_lock_time_enabled); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_TransactionBase_lock_time); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_TransactionBase_new); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_TransactionBase_output); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_TransactionBase_serialize); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_TransactionBase_size); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_TransactionBase_txid); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_TransactionBase_version); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_TransactionBase_vsize); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_TransactionBase_weight); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_WalletBase_get_address); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_WalletBase_get_balance); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_WalletBase_get_descriptor_for_keychain); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_WalletBase_get_internal_address); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_WalletBase_get_psbt_input); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_WalletBase_is_mine); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_WalletBase_list_transactions); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_WalletBase_list_unspent); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_WalletBase_network); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_WalletBase_new); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_WalletBase_sign); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_WalletBase_sync); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_from_script); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_from_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_is_valid_for_network); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_network); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_payload); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_script); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_to_qr_uri); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_blockchain_broadcast); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_blockchain_estimate_fee); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_blockchain_get_block_hash); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_blockchain_get_height); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_blockchain_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_derivation_path_from_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_as_string_private); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_max_satisfaction_weight); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip44); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip44_public); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip49); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip49_public); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip84); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip84_public); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip86); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip86_public); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_public_key_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_public_key_derive); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_public_key_extend); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_public_key_from_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_as_public); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_create); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_derive); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_extend); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_from_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_secret_bytes); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_mnemonic_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_mnemonic_from_entropy); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_mnemonic_from_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_mnemonic_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_combine); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_extract_tx); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_fee_amount); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_fee_rate); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_from_str); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_json_serialize); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_serialize); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_txid); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_script_buf_empty); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_script_buf_from_hex); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_script_buf_with_capacity); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_from_bytes); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_input); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_is_coin_base); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_is_explicitly_rbf); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_is_lock_time_enabled); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_lock_time); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_output); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_serialize); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_size); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_txid); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_version); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_vsize); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_weight); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_get_address); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_get_balance); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_get_descriptor_for_keychain); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_get_internal_address); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_get_psbt_input); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_is_mine); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_list_transactions); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_list_unspent); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_network); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_sign); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_sync); dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_finish_bump_fee_tx_builder); dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_tx_builder_finish); dummy_var ^= ((int64_t) (void*) store_dart_post_cobject); diff --git a/rust/src/frb_generated.io.rs b/rust/src/frb_generated.io.rs index 1b794141..d634557a 100644 --- a/rust/src/frb_generated.io.rs +++ b/rust/src/frb_generated.io.rs @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.28. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31. // Section: imports @@ -87,14 +87,6 @@ impl CstDecode for *mut wire_cst_list_prim_u_8_strict { String::from_utf8(vec).unwrap() } } -impl CstDecode for wire_cst_address_base { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::AddressBase { - crate::api::types::AddressBase { - ptr: self.ptr.cst_decode(), - } - } -} 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 { @@ -177,15 +169,6 @@ impl CstDecode for wire_cst_address_index { } } } -impl CstDecode for wire_cst_address_info { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::AddressInfo { - crate::api::types::AddressInfo { - index: self.index.cst_decode(), - address: self.address.cst_decode(), - } - } -} 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 { @@ -221,6 +204,55 @@ impl CstDecode for wire_cst_balance { } } } +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 { @@ -377,27 +409,71 @@ impl CstDecode for wire_cst_bdk_error { let ans = unsafe { self.kind.Rusqlite }; crate::api::error::BdkError::Rusqlite(ans.field0.cst_decode()) } + 43 => { + let ans = unsafe { self.kind.InvalidInput }; + crate::api::error::BdkError::InvalidInput(ans.field0.cst_decode()) + } + 44 => { + let ans = unsafe { self.kind.InvalidLockTime }; + crate::api::error::BdkError::InvalidLockTime(ans.field0.cst_decode()) + } + 45 => { + let ans = unsafe { self.kind.InvalidTransaction }; + crate::api::error::BdkError::InvalidTransaction(ans.field0.cst_decode()) + } _ => unreachable!(), } } } -impl CstDecode for wire_cst_block_time { +impl CstDecode for wire_cst_bdk_mnemonic { // 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(), + fn cst_decode(self) -> crate::api::key::BdkMnemonic { + crate::api::key::BdkMnemonic { + 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_blockchain_base { +impl CstDecode for wire_cst_bdk_transaction { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::blockchain::BlockchainBase { - crate::api::blockchain::BlockchainBase { + fn cst_decode(self) -> crate::api::types::BdkTransaction { + crate::api::types::BdkTransaction { + inner: self.inner.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 { @@ -424,13 +500,6 @@ impl CstDecode for wire_cst_blockchain } } } -impl CstDecode for *mut wire_cst_address_base { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::AddressBase { - 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_error { // Codec=Cst (C-struct based), see doc to use other codecs fn cst_decode(self) -> crate::api::error::AddressError { @@ -445,78 +514,120 @@ impl CstDecode for *mut wire_cst_address_index CstDecode::::cst_decode(*wrap).into() } } -impl CstDecode for *mut wire_cst_block_time { +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::BlockTime { + 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() + CstDecode::::cst_decode(*wrap).into() } } -impl CstDecode for *mut wire_cst_blockchain_base { +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::BlockchainBase { + 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() + CstDecode::::cst_decode(*wrap).into() } } -impl CstDecode for *mut wire_cst_blockchain_config { +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::blockchain::BlockchainConfig { + 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() + CstDecode::::cst_decode(*wrap).into() } } -impl CstDecode for *mut wire_cst_consensus_error { +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::error::ConsensusError { + 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() + CstDecode::::cst_decode(*wrap).into() } } -impl CstDecode for *mut wire_cst_database_config { +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::types::DatabaseConfig { + 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() + CstDecode::::cst_decode(*wrap).into() } } -impl CstDecode for *mut wire_cst_derivation_path_base { +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::DerivationPathBase { + 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() + CstDecode::::cst_decode(*wrap).into() } } -impl CstDecode for *mut wire_cst_descriptor_base { +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::descriptor::DescriptorBase { + 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() + CstDecode::::cst_decode(*wrap).into() } } -impl CstDecode for *mut wire_cst_descriptor_error { +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::error::DescriptorError { + 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() + CstDecode::::cst_decode(*wrap).into() } } -impl CstDecode - for *mut wire_cst_descriptor_public_key_base -{ +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::key::DescriptorPublicKeyBase { + 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() + CstDecode::::cst_decode(*wrap).into() } } -impl CstDecode - for *mut wire_cst_descriptor_secret_key_base -{ +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::key::DescriptorSecretKeyBase { + 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() + 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 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 { @@ -560,11 +671,11 @@ impl CstDecode for *mut wire_cst_local_utxo { CstDecode::::cst_decode(*wrap).into() } } -impl CstDecode for *mut wire_cst_mnemonic_base { +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::key::MnemonicBase { + 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() + CstDecode::::cst_decode(*wrap).into() } } impl CstDecode for *mut wire_cst_out_point { @@ -574,13 +685,6 @@ impl CstDecode for *mut wire_cst_out_point { CstDecode::::cst_decode(*wrap).into() } } -impl CstDecode for *mut wire_cst_psbt_base { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::psbt::PsbtBase { - 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 { @@ -621,13 +725,6 @@ impl CstDecode for *mut wire_cst_rpc_sync CstDecode::::cst_decode(*wrap).into() } } -impl CstDecode for *mut wire_cst_script_buf_base { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::ScriptBufBase { - 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 { @@ -649,13 +746,6 @@ impl CstDecode for *mut wire_cst_sqlit CstDecode::::cst_decode(*wrap).into() } } -impl CstDecode for *mut wire_cst_transaction_base { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::TransactionBase { - 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 { @@ -674,13 +764,6 @@ impl CstDecode for *mut u8 { unsafe { *flutter_rust_bridge::for_generated::box_from_leak_ptr(self) } } } -impl CstDecode for *mut wire_cst_wallet_base { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::wallet::WalletBase { - let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; - CstDecode::::cst_decode(*wrap).into() - } -} 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 { @@ -737,23 +820,6 @@ impl CstDecode for wire_cst_database_config { } } } -impl CstDecode for wire_cst_derivation_path_base { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::key::DerivationPathBase { - crate::api::key::DerivationPathBase { - ptr: self.ptr.cst_decode(), - } - } -} -impl CstDecode for wire_cst_descriptor_base { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::descriptor::DescriptorBase { - crate::api::descriptor::DescriptorBase { - extended_descriptor: self.extended_descriptor.cst_decode(), - key_map: self.key_map.cst_decode(), - } - } -} 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 { @@ -800,22 +866,6 @@ impl CstDecode for wire_cst_descriptor_error } } } -impl CstDecode for wire_cst_descriptor_public_key_base { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::key::DescriptorPublicKeyBase { - crate::api::key::DescriptorPublicKeyBase { - ptr: self.ptr.cst_decode(), - } - } -} -impl CstDecode for wire_cst_descriptor_secret_key_base { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::key::DescriptorSecretKeyBase { - crate::api::key::DescriptorSecretKeyBase { - ptr: self.ptr.cst_decode(), - } - } -} 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 { @@ -981,11 +1031,19 @@ impl CstDecode for wire_cst_local_utxo { } } } -impl CstDecode for wire_cst_mnemonic_base { +impl CstDecode for wire_cst_lock_time { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::key::MnemonicBase { - crate::api::key::MnemonicBase { - ptr: self.ptr.cst_decode(), + 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!(), } } } @@ -1025,14 +1083,6 @@ impl CstDecode for wire_cst_payload { } } } -impl CstDecode for wire_cst_psbt_base { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::psbt::PsbtBase { - crate::api::psbt::PsbtBase { - ptr: self.ptr.cst_decode(), - } - } -} 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 { @@ -1054,34 +1104,40 @@ impl CstDecode for wire_cst_rbf_value { } } } -impl CstDecode<(crate::api::types::OutPoint, crate::api::types::Input, usize)> - for wire_cst_record_out_point_input_usize -{ +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::OutPoint, crate::api::types::Input, usize) { - ( - self.field0.cst_decode(), - self.field1.cst_decode(), - self.field2.cst_decode(), - ) + fn cst_decode(self) -> (crate::api::types::BdkAddress, u32) { + (self.field0.cst_decode(), self.field1.cst_decode()) } } impl CstDecode<( - crate::api::psbt::PsbtBase, + crate::api::psbt::BdkPsbt, crate::api::types::TransactionDetails, - )> for wire_cst_record_psbt_base_transaction_details + )> 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::PsbtBase, + crate::api::psbt::BdkPsbt, crate::api::types::TransactionDetails, ) { (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 for wire_cst_rpc_config { // Codec=Cst (C-struct based), see doc to use other codecs fn cst_decode(self) -> crate::api::blockchain::RpcConfig { @@ -1114,14 +1170,6 @@ impl CstDecode for wire_cst_script_amount { } } } -impl CstDecode for wire_cst_script_buf_base { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::ScriptBufBase { - crate::api::types::ScriptBufBase { - bytes: self.bytes.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 { @@ -1154,14 +1202,6 @@ impl CstDecode for wire_cst_sqlite_db_ } } } -impl CstDecode for wire_cst_transaction_base { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::TransactionBase { - crate::api::types::TransactionBase { - inner: self.inner.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 { @@ -1202,91 +1242,131 @@ impl CstDecode<[u8; 4]> for *mut wire_cst_list_prim_u_8_strict { flutter_rust_bridge::for_generated::from_vec_to_array(vec) } } -impl CstDecode for wire_cst_wallet_base { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::wallet::WalletBase { - crate::api::wallet::WalletBase { - ptr: self.ptr.cst_decode(), +impl NewWithNullPtr for wire_cst_address_error { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: AddressErrorKind { nil__: () }, } } } -impl NewWithNullPtr for wire_cst_address_base { +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 { - ptr: Default::default(), + tag: -1, + kind: AddressIndexKind { nil__: () }, } } } -impl Default for wire_cst_address_base { +impl Default for wire_cst_address_index { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_address_error { +impl NewWithNullPtr for wire_cst_auth { fn new_with_null_ptr() -> Self { Self { tag: -1, - kind: AddressErrorKind { nil__: () }, + kind: AuthKind { nil__: () }, } } } -impl Default for wire_cst_address_error { +impl Default for wire_cst_auth { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_address_index { +impl NewWithNullPtr for wire_cst_balance { fn new_with_null_ptr() -> Self { Self { - tag: -1, - kind: AddressIndexKind { nil__: () }, + 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_address_index { +impl Default for wire_cst_balance { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_address_info { +impl NewWithNullPtr for wire_cst_bdk_address { fn new_with_null_ptr() -> Self { Self { - index: Default::default(), - address: core::ptr::null_mut(), + ptr: Default::default(), } } } -impl Default for wire_cst_address_info { +impl Default for wire_cst_bdk_address { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_auth { +impl NewWithNullPtr for wire_cst_bdk_blockchain { fn new_with_null_ptr() -> Self { Self { - tag: -1, - kind: AuthKind { nil__: () }, + ptr: Default::default(), } } } -impl Default for wire_cst_auth { +impl Default for wire_cst_bdk_blockchain { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_balance { +impl NewWithNullPtr for wire_cst_bdk_derivation_path { 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(), + ptr: Default::default(), } } } -impl Default for wire_cst_balance { +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() } @@ -1304,128 +1384,127 @@ impl Default for wire_cst_bdk_error { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_block_time { +impl NewWithNullPtr for wire_cst_bdk_mnemonic { fn new_with_null_ptr() -> Self { Self { - height: Default::default(), - timestamp: Default::default(), + ptr: Default::default(), } } } -impl Default for wire_cst_block_time { +impl Default for wire_cst_bdk_mnemonic { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_blockchain_base { +impl NewWithNullPtr for wire_cst_bdk_psbt { fn new_with_null_ptr() -> Self { Self { ptr: Default::default(), } } } -impl Default for wire_cst_blockchain_base { +impl Default for wire_cst_bdk_psbt { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_blockchain_config { +impl NewWithNullPtr for wire_cst_bdk_script_buf { fn new_with_null_ptr() -> Self { Self { - tag: -1, - kind: BlockchainConfigKind { nil__: () }, + bytes: core::ptr::null_mut(), } } } -impl Default for wire_cst_blockchain_config { +impl Default for wire_cst_bdk_script_buf { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_consensus_error { +impl NewWithNullPtr for wire_cst_bdk_transaction { fn new_with_null_ptr() -> Self { Self { - tag: -1, - kind: ConsensusErrorKind { nil__: () }, + inner: core::ptr::null_mut(), } } } -impl Default for wire_cst_consensus_error { +impl Default for wire_cst_bdk_transaction { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_database_config { +impl NewWithNullPtr for wire_cst_bdk_wallet { fn new_with_null_ptr() -> Self { Self { - tag: -1, - kind: DatabaseConfigKind { nil__: () }, + ptr: Default::default(), } } } -impl Default for wire_cst_database_config { +impl Default for wire_cst_bdk_wallet { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_derivation_path_base { +impl NewWithNullPtr for wire_cst_block_time { fn new_with_null_ptr() -> Self { Self { - ptr: Default::default(), + height: Default::default(), + timestamp: Default::default(), } } } -impl Default for wire_cst_derivation_path_base { +impl Default for wire_cst_block_time { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_descriptor_base { +impl NewWithNullPtr for wire_cst_blockchain_config { fn new_with_null_ptr() -> Self { Self { - extended_descriptor: Default::default(), - key_map: Default::default(), + tag: -1, + kind: BlockchainConfigKind { nil__: () }, } } } -impl Default for wire_cst_descriptor_base { +impl Default for wire_cst_blockchain_config { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_descriptor_error { +impl NewWithNullPtr for wire_cst_consensus_error { fn new_with_null_ptr() -> Self { Self { tag: -1, - kind: DescriptorErrorKind { nil__: () }, + kind: ConsensusErrorKind { nil__: () }, } } } -impl Default for wire_cst_descriptor_error { +impl Default for wire_cst_consensus_error { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_descriptor_public_key_base { +impl NewWithNullPtr for wire_cst_database_config { fn new_with_null_ptr() -> Self { Self { - ptr: Default::default(), + tag: -1, + kind: DatabaseConfigKind { nil__: () }, } } } -impl Default for wire_cst_descriptor_public_key_base { +impl Default for wire_cst_database_config { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_descriptor_secret_key_base { +impl NewWithNullPtr for wire_cst_descriptor_error { fn new_with_null_ptr() -> Self { Self { - ptr: Default::default(), + tag: -1, + kind: DescriptorErrorKind { nil__: () }, } } } -impl Default for wire_cst_descriptor_secret_key_base { +impl Default for wire_cst_descriptor_error { fn default() -> Self { Self::new_with_null_ptr() } @@ -1515,14 +1594,15 @@ impl Default for wire_cst_local_utxo { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_mnemonic_base { +impl NewWithNullPtr for wire_cst_lock_time { fn new_with_null_ptr() -> Self { Self { - ptr: Default::default(), + tag: -1, + kind: LockTimeKind { nil__: () }, } } } -impl Default for wire_cst_mnemonic_base { +impl Default for wire_cst_lock_time { fn default() -> Self { Self::new_with_null_ptr() } @@ -1553,18 +1633,6 @@ impl Default for wire_cst_payload { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_psbt_base { - fn new_with_null_ptr() -> Self { - Self { - ptr: Default::default(), - } - } -} -impl Default for wire_cst_psbt_base { - fn default() -> Self { - Self::new_with_null_ptr() - } -} impl NewWithNullPtr for wire_cst_psbt_sig_hash_type { fn new_with_null_ptr() -> Self { Self { @@ -1590,29 +1658,42 @@ impl Default for wire_cst_rbf_value { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_record_out_point_input_usize { +impl NewWithNullPtr for wire_cst_record_bdk_address_u_32 { 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 { +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_psbt_base_transaction_details { +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_psbt_base_transaction_details { +impl Default for wire_cst_record_out_point_input_usize { fn default() -> Self { Self::new_with_null_ptr() } @@ -1661,18 +1742,6 @@ impl Default for wire_cst_script_amount { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_script_buf_base { - fn new_with_null_ptr() -> Self { - Self { - bytes: core::ptr::null_mut(), - } - } -} -impl Default for wire_cst_script_buf_base { - fn default() -> Self { - Self::new_with_null_ptr() - } -} impl NewWithNullPtr for wire_cst_sign_options { fn new_with_null_ptr() -> Self { Self { @@ -1717,18 +1786,6 @@ impl Default for wire_cst_sqlite_db_configuration { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_transaction_base { - fn new_with_null_ptr() -> Self { - Self { - inner: core::ptr::null_mut(), - } - } -} -impl Default for wire_cst_transaction_base { - fn default() -> Self { - Self::new_with_null_ptr() - } -} impl NewWithNullPtr for wire_cst_transaction_details { fn new_with_null_ptr() -> Self { Self { @@ -1774,114 +1831,102 @@ impl Default for wire_cst_tx_out { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_wallet_base { - fn new_with_null_ptr() -> Self { - Self { - ptr: Default::default(), - } - } -} -impl Default for wire_cst_wallet_base { - fn default() -> Self { - Self::new_with_null_ptr() - } -} #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_BlockchainBase_broadcast( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_blockchain_broadcast( port_: i64, - that: *mut wire_cst_blockchain_base, - transaction: *mut wire_cst_transaction_base, + that: *mut wire_cst_bdk_blockchain, + transaction: *mut wire_cst_bdk_transaction, ) { - wire_BlockchainBase_broadcast_impl(port_, that, transaction) + wire_bdk_blockchain_broadcast_impl(port_, that, transaction) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_BlockchainBase_estimate_fee( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_blockchain_estimate_fee( port_: i64, - that: *mut wire_cst_blockchain_base, + that: *mut wire_cst_bdk_blockchain, target: u64, ) { - wire_BlockchainBase_estimate_fee_impl(port_, that, target) + wire_bdk_blockchain_estimate_fee_impl(port_, that, target) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_BlockchainBase_get_block_hash( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_blockchain_get_block_hash( port_: i64, - that: *mut wire_cst_blockchain_base, + that: *mut wire_cst_bdk_blockchain, height: u32, ) { - wire_BlockchainBase_get_block_hash_impl(port_, that, height) + wire_bdk_blockchain_get_block_hash_impl(port_, that, height) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_BlockchainBase_get_height( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_blockchain_get_height( port_: i64, - that: *mut wire_cst_blockchain_base, + that: *mut wire_cst_bdk_blockchain, ) { - wire_BlockchainBase_get_height_impl(port_, that) + wire_bdk_blockchain_get_height_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_BlockchainBase_new( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_blockchain_new( port_: i64, blockchain_config: *mut wire_cst_blockchain_config, ) { - wire_BlockchainBase_new_impl(port_, blockchain_config) + wire_bdk_blockchain_new_impl(port_, blockchain_config) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_DescriptorBase_as_string( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_as_string( port_: i64, - that: *mut wire_cst_descriptor_base, + that: *mut wire_cst_bdk_descriptor, ) { - wire_DescriptorBase_as_string_impl(port_, that) + wire_bdk_descriptor_as_string_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_DescriptorBase_as_string_private( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_as_string_private( port_: i64, - that: *mut wire_cst_descriptor_base, + that: *mut wire_cst_bdk_descriptor, ) { - wire_DescriptorBase_as_string_private_impl(port_, that) + wire_bdk_descriptor_as_string_private_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_DescriptorBase_max_satisfaction_weight( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_max_satisfaction_weight( port_: i64, - that: *mut wire_cst_descriptor_base, + that: *mut wire_cst_bdk_descriptor, ) { - wire_DescriptorBase_max_satisfaction_weight_impl(port_, that) + wire_bdk_descriptor_max_satisfaction_weight_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_DescriptorBase_new( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_new( port_: i64, descriptor: *mut wire_cst_list_prim_u_8_strict, network: i32, ) { - wire_DescriptorBase_new_impl(port_, descriptor, network) + wire_bdk_descriptor_new_impl(port_, descriptor, network) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_DescriptorBase_new_bip44( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_new_bip44( port_: i64, - secret_key: *mut wire_cst_descriptor_secret_key_base, + secret_key: *mut wire_cst_bdk_descriptor_secret_key, keychain_kind: i32, network: i32, ) { - wire_DescriptorBase_new_bip44_impl(port_, secret_key, keychain_kind, network) + wire_bdk_descriptor_new_bip44_impl(port_, secret_key, keychain_kind, network) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_DescriptorBase_new_bip44_public( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_new_bip44_public( port_: i64, - public_key: *mut wire_cst_descriptor_public_key_base, + public_key: *mut wire_cst_bdk_descriptor_public_key, fingerprint: *mut wire_cst_list_prim_u_8_strict, keychain_kind: i32, network: i32, ) { - wire_DescriptorBase_new_bip44_public_impl( + wire_bdk_descriptor_new_bip44_public_impl( port_, public_key, fingerprint, @@ -1891,24 +1936,24 @@ pub extern "C" fn frbgen_bdk_flutter_wire_DescriptorBase_new_bip44_public( } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_DescriptorBase_new_bip49( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_new_bip49( port_: i64, - secret_key: *mut wire_cst_descriptor_secret_key_base, + secret_key: *mut wire_cst_bdk_descriptor_secret_key, keychain_kind: i32, network: i32, ) { - wire_DescriptorBase_new_bip49_impl(port_, secret_key, keychain_kind, network) + wire_bdk_descriptor_new_bip49_impl(port_, secret_key, keychain_kind, network) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_DescriptorBase_new_bip49_public( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_new_bip49_public( port_: i64, - public_key: *mut wire_cst_descriptor_public_key_base, + public_key: *mut wire_cst_bdk_descriptor_public_key, fingerprint: *mut wire_cst_list_prim_u_8_strict, keychain_kind: i32, network: i32, ) { - wire_DescriptorBase_new_bip49_public_impl( + wire_bdk_descriptor_new_bip49_public_impl( port_, public_key, fingerprint, @@ -1918,24 +1963,24 @@ pub extern "C" fn frbgen_bdk_flutter_wire_DescriptorBase_new_bip49_public( } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_DescriptorBase_new_bip84( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_new_bip84( port_: i64, - secret_key: *mut wire_cst_descriptor_secret_key_base, + secret_key: *mut wire_cst_bdk_descriptor_secret_key, keychain_kind: i32, network: i32, ) { - wire_DescriptorBase_new_bip84_impl(port_, secret_key, keychain_kind, network) + wire_bdk_descriptor_new_bip84_impl(port_, secret_key, keychain_kind, network) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_DescriptorBase_new_bip84_public( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_new_bip84_public( port_: i64, - public_key: *mut wire_cst_descriptor_public_key_base, + public_key: *mut wire_cst_bdk_descriptor_public_key, fingerprint: *mut wire_cst_list_prim_u_8_strict, keychain_kind: i32, network: i32, ) { - wire_DescriptorBase_new_bip84_public_impl( + wire_bdk_descriptor_new_bip84_public_impl( port_, public_key, fingerprint, @@ -1945,24 +1990,24 @@ pub extern "C" fn frbgen_bdk_flutter_wire_DescriptorBase_new_bip84_public( } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_DescriptorBase_new_bip86( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_new_bip86( port_: i64, - secret_key: *mut wire_cst_descriptor_secret_key_base, + secret_key: *mut wire_cst_bdk_descriptor_secret_key, keychain_kind: i32, network: i32, ) { - wire_DescriptorBase_new_bip86_impl(port_, secret_key, keychain_kind, network) + wire_bdk_descriptor_new_bip86_impl(port_, secret_key, keychain_kind, network) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_DescriptorBase_new_bip86_public( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_new_bip86_public( port_: i64, - public_key: *mut wire_cst_descriptor_public_key_base, + public_key: *mut wire_cst_bdk_descriptor_public_key, fingerprint: *mut wire_cst_list_prim_u_8_strict, keychain_kind: i32, network: i32, ) { - wire_DescriptorBase_new_bip86_public_impl( + wire_bdk_descriptor_new_bip86_public_impl( port_, public_key, fingerprint, @@ -1972,476 +2017,490 @@ pub extern "C" fn frbgen_bdk_flutter_wire_DescriptorBase_new_bip86_public( } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_DerivationPathBase_from_string( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_derivation_path_from_string( port_: i64, path: *mut wire_cst_list_prim_u_8_strict, ) { - wire_DerivationPathBase_from_string_impl(port_, path) + wire_bdk_derivation_path_from_string_impl(port_, path) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_DescriptorPublicKeyBase_as_string( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_public_key_as_string( port_: i64, - that: *mut wire_cst_descriptor_public_key_base, + that: *mut wire_cst_bdk_descriptor_public_key, ) { - wire_DescriptorPublicKeyBase_as_string_impl(port_, that) + wire_bdk_descriptor_public_key_as_string_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_DescriptorPublicKeyBase_derive( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_public_key_derive( port_: i64, - ptr: *mut wire_cst_descriptor_public_key_base, - path: *mut wire_cst_derivation_path_base, + ptr: *mut wire_cst_bdk_descriptor_public_key, + path: *mut wire_cst_bdk_derivation_path, ) { - wire_DescriptorPublicKeyBase_derive_impl(port_, ptr, path) + wire_bdk_descriptor_public_key_derive_impl(port_, ptr, path) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_DescriptorPublicKeyBase_extend( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_public_key_extend( port_: i64, - ptr: *mut wire_cst_descriptor_public_key_base, - path: *mut wire_cst_derivation_path_base, + ptr: *mut wire_cst_bdk_descriptor_public_key, + path: *mut wire_cst_bdk_derivation_path, ) { - wire_DescriptorPublicKeyBase_extend_impl(port_, ptr, path) + wire_bdk_descriptor_public_key_extend_impl(port_, ptr, path) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_DescriptorPublicKeyBase_from_string( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_public_key_from_string( port_: i64, public_key: *mut wire_cst_list_prim_u_8_strict, ) { - wire_DescriptorPublicKeyBase_from_string_impl(port_, public_key) + wire_bdk_descriptor_public_key_from_string_impl(port_, public_key) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_DescriptorSecretKeyBase_as_public( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_as_public( port_: i64, - ptr: *mut wire_cst_descriptor_secret_key_base, + ptr: *mut wire_cst_bdk_descriptor_secret_key, ) { - wire_DescriptorSecretKeyBase_as_public_impl(port_, ptr) + wire_bdk_descriptor_secret_key_as_public_impl(port_, ptr) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_DescriptorSecretKeyBase_as_string( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_as_string( port_: i64, - that: *mut wire_cst_descriptor_secret_key_base, + that: *mut wire_cst_bdk_descriptor_secret_key, ) { - wire_DescriptorSecretKeyBase_as_string_impl(port_, that) + wire_bdk_descriptor_secret_key_as_string_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_DescriptorSecretKeyBase_create( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_create( port_: i64, network: i32, - mnemonic: *mut wire_cst_mnemonic_base, + mnemonic: *mut wire_cst_bdk_mnemonic, password: *mut wire_cst_list_prim_u_8_strict, ) { - wire_DescriptorSecretKeyBase_create_impl(port_, network, mnemonic, password) + wire_bdk_descriptor_secret_key_create_impl(port_, network, mnemonic, password) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_DescriptorSecretKeyBase_derive( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_derive( port_: i64, - ptr: *mut wire_cst_descriptor_secret_key_base, - path: *mut wire_cst_derivation_path_base, + ptr: *mut wire_cst_bdk_descriptor_secret_key, + path: *mut wire_cst_bdk_derivation_path, ) { - wire_DescriptorSecretKeyBase_derive_impl(port_, ptr, path) + wire_bdk_descriptor_secret_key_derive_impl(port_, ptr, path) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_DescriptorSecretKeyBase_extend( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_extend( port_: i64, - ptr: *mut wire_cst_descriptor_secret_key_base, - path: *mut wire_cst_derivation_path_base, + ptr: *mut wire_cst_bdk_descriptor_secret_key, + path: *mut wire_cst_bdk_derivation_path, ) { - wire_DescriptorSecretKeyBase_extend_impl(port_, ptr, path) + wire_bdk_descriptor_secret_key_extend_impl(port_, ptr, path) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_DescriptorSecretKeyBase_from_string( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_from_string( port_: i64, secret_key: *mut wire_cst_list_prim_u_8_strict, ) { - wire_DescriptorSecretKeyBase_from_string_impl(port_, secret_key) + wire_bdk_descriptor_secret_key_from_string_impl(port_, secret_key) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_DescriptorSecretKeyBase_secret_bytes( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_secret_bytes( port_: i64, - that: *mut wire_cst_descriptor_secret_key_base, + that: *mut wire_cst_bdk_descriptor_secret_key, ) { - wire_DescriptorSecretKeyBase_secret_bytes_impl(port_, that) + wire_bdk_descriptor_secret_key_secret_bytes_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_MnemonicBase_as_string( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_mnemonic_as_string( port_: i64, - that: *mut wire_cst_mnemonic_base, + that: *mut wire_cst_bdk_mnemonic, ) { - wire_MnemonicBase_as_string_impl(port_, that) + wire_bdk_mnemonic_as_string_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_MnemonicBase_from_entropy( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_mnemonic_from_entropy( port_: i64, entropy: *mut wire_cst_list_prim_u_8_loose, ) { - wire_MnemonicBase_from_entropy_impl(port_, entropy) + wire_bdk_mnemonic_from_entropy_impl(port_, entropy) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_MnemonicBase_from_string( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_mnemonic_from_string( port_: i64, mnemonic: *mut wire_cst_list_prim_u_8_strict, ) { - wire_MnemonicBase_from_string_impl(port_, mnemonic) + wire_bdk_mnemonic_from_string_impl(port_, mnemonic) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_MnemonicBase_new(port_: i64, word_count: i32) { - wire_MnemonicBase_new_impl(port_, word_count) +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_mnemonic_new(port_: i64, word_count: i32) { + wire_bdk_mnemonic_new_impl(port_, word_count) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_PsbtBase_combine( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_psbt_combine( port_: i64, - ptr: *mut wire_cst_psbt_base, - other: *mut wire_cst_psbt_base, + ptr: *mut wire_cst_bdk_psbt, + other: *mut wire_cst_bdk_psbt, ) { - wire_PsbtBase_combine_impl(port_, ptr, other) + wire_bdk_psbt_combine_impl(port_, ptr, other) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_PsbtBase_extract_tx( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_psbt_extract_tx( port_: i64, - ptr: *mut wire_cst_psbt_base, + ptr: *mut wire_cst_bdk_psbt, ) { - wire_PsbtBase_extract_tx_impl(port_, ptr) + wire_bdk_psbt_extract_tx_impl(port_, ptr) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_PsbtBase_fee_amount( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_psbt_fee_amount( port_: i64, - that: *mut wire_cst_psbt_base, + that: *mut wire_cst_bdk_psbt, ) { - wire_PsbtBase_fee_amount_impl(port_, that) + wire_bdk_psbt_fee_amount_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_PsbtBase_fee_rate( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_psbt_fee_rate( port_: i64, - that: *mut wire_cst_psbt_base, + that: *mut wire_cst_bdk_psbt, ) { - wire_PsbtBase_fee_rate_impl(port_, that) + wire_bdk_psbt_fee_rate_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_PsbtBase_from_str( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_psbt_from_str( port_: i64, psbt_base64: *mut wire_cst_list_prim_u_8_strict, ) { - wire_PsbtBase_from_str_impl(port_, psbt_base64) + wire_bdk_psbt_from_str_impl(port_, psbt_base64) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_PsbtBase_json_serialize( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_psbt_json_serialize( port_: i64, - that: *mut wire_cst_psbt_base, + that: *mut wire_cst_bdk_psbt, ) { - wire_PsbtBase_json_serialize_impl(port_, that) + wire_bdk_psbt_json_serialize_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_PsbtBase_serialize( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_psbt_serialize( port_: i64, - that: *mut wire_cst_psbt_base, + that: *mut wire_cst_bdk_psbt, ) { - wire_PsbtBase_serialize_impl(port_, that) + wire_bdk_psbt_serialize_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_PsbtBase_txid(port_: i64, that: *mut wire_cst_psbt_base) { - wire_PsbtBase_txid_impl(port_, that) +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_psbt_txid(port_: i64, that: *mut wire_cst_bdk_psbt) { + wire_bdk_psbt_txid_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_AddressBase_as_string( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_address_as_string( port_: i64, - that: *mut wire_cst_address_base, + that: *mut wire_cst_bdk_address, ) { - wire_AddressBase_as_string_impl(port_, that) + wire_bdk_address_as_string_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_AddressBase_from_script( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_address_from_script( port_: i64, - script: *mut wire_cst_script_buf_base, + script: *mut wire_cst_bdk_script_buf, network: i32, ) { - wire_AddressBase_from_script_impl(port_, script, network) + wire_bdk_address_from_script_impl(port_, script, network) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_AddressBase_from_string( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_address_from_string( port_: i64, address: *mut wire_cst_list_prim_u_8_strict, network: i32, ) { - wire_AddressBase_from_string_impl(port_, address, network) + wire_bdk_address_from_string_impl(port_, address, network) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_AddressBase_is_valid_for_network( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_address_is_valid_for_network( port_: i64, - that: *mut wire_cst_address_base, + that: *mut wire_cst_bdk_address, network: i32, ) { - wire_AddressBase_is_valid_for_network_impl(port_, that, network) + wire_bdk_address_is_valid_for_network_impl(port_, that, network) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_AddressBase_network( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_address_network( port_: i64, - that: *mut wire_cst_address_base, + that: *mut wire_cst_bdk_address, ) { - wire_AddressBase_network_impl(port_, that) + wire_bdk_address_network_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_AddressBase_payload( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_address_payload( port_: i64, - that: *mut wire_cst_address_base, + that: *mut wire_cst_bdk_address, ) { - wire_AddressBase_payload_impl(port_, that) + wire_bdk_address_payload_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_AddressBase_script( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_address_script( port_: i64, - ptr: *mut wire_cst_address_base, + ptr: *mut wire_cst_bdk_address, ) { - wire_AddressBase_script_impl(port_, ptr) + wire_bdk_address_script_impl(port_, ptr) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_AddressBase_to_qr_uri( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_address_to_qr_uri( port_: i64, - that: *mut wire_cst_address_base, + that: *mut wire_cst_bdk_address, ) { - wire_AddressBase_to_qr_uri_impl(port_, that) + wire_bdk_address_to_qr_uri_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_ScriptBufBase_empty(port_: i64) { - wire_ScriptBufBase_empty_impl(port_) +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_script_buf_empty(port_: i64) { + wire_bdk_script_buf_empty_impl(port_) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_ScriptBufBase_from_hex( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_script_buf_from_hex( port_: i64, s: *mut wire_cst_list_prim_u_8_strict, ) { - wire_ScriptBufBase_from_hex_impl(port_, s) + wire_bdk_script_buf_from_hex_impl(port_, s) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_script_buf_with_capacity( + port_: i64, + capacity: usize, +) { + wire_bdk_script_buf_with_capacity_impl(port_, capacity) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_ScriptBufBase_with_capacity(port_: i64, capacity: usize) { - wire_ScriptBufBase_with_capacity_impl(port_, capacity) +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_transaction_from_bytes( + port_: i64, + transaction_bytes: *mut wire_cst_list_prim_u_8_loose, +) { + wire_bdk_transaction_from_bytes_impl(port_, transaction_bytes) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_TransactionBase_input( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_transaction_input( port_: i64, - that: *mut wire_cst_transaction_base, + that: *mut wire_cst_bdk_transaction, ) { - wire_TransactionBase_input_impl(port_, that) + wire_bdk_transaction_input_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_TransactionBase_is_coin_base( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_transaction_is_coin_base( port_: i64, - that: *mut wire_cst_transaction_base, + that: *mut wire_cst_bdk_transaction, ) { - wire_TransactionBase_is_coin_base_impl(port_, that) + wire_bdk_transaction_is_coin_base_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_TransactionBase_is_explicitly_rbf( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_transaction_is_explicitly_rbf( port_: i64, - that: *mut wire_cst_transaction_base, + that: *mut wire_cst_bdk_transaction, ) { - wire_TransactionBase_is_explicitly_rbf_impl(port_, that) + wire_bdk_transaction_is_explicitly_rbf_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_TransactionBase_is_lock_time_enabled( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_transaction_is_lock_time_enabled( port_: i64, - that: *mut wire_cst_transaction_base, + that: *mut wire_cst_bdk_transaction, ) { - wire_TransactionBase_is_lock_time_enabled_impl(port_, that) + wire_bdk_transaction_is_lock_time_enabled_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_TransactionBase_lock_time( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_transaction_lock_time( port_: i64, - that: *mut wire_cst_transaction_base, + that: *mut wire_cst_bdk_transaction, ) { - wire_TransactionBase_lock_time_impl(port_, that) + wire_bdk_transaction_lock_time_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_TransactionBase_new( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_transaction_new( port_: i64, - transaction_bytes: *mut wire_cst_list_prim_u_8_loose, + version: i32, + lock_time: *mut wire_cst_lock_time, + input: *mut wire_cst_list_tx_in, + output: *mut wire_cst_list_tx_out, ) { - wire_TransactionBase_new_impl(port_, transaction_bytes) + wire_bdk_transaction_new_impl(port_, version, lock_time, input, output) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_TransactionBase_output( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_transaction_output( port_: i64, - that: *mut wire_cst_transaction_base, + that: *mut wire_cst_bdk_transaction, ) { - wire_TransactionBase_output_impl(port_, that) + wire_bdk_transaction_output_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_TransactionBase_serialize( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_transaction_serialize( port_: i64, - that: *mut wire_cst_transaction_base, + that: *mut wire_cst_bdk_transaction, ) { - wire_TransactionBase_serialize_impl(port_, that) + wire_bdk_transaction_serialize_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_TransactionBase_size( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_transaction_size( port_: i64, - that: *mut wire_cst_transaction_base, + that: *mut wire_cst_bdk_transaction, ) { - wire_TransactionBase_size_impl(port_, that) + wire_bdk_transaction_size_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_TransactionBase_txid( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_transaction_txid( port_: i64, - that: *mut wire_cst_transaction_base, + that: *mut wire_cst_bdk_transaction, ) { - wire_TransactionBase_txid_impl(port_, that) + wire_bdk_transaction_txid_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_TransactionBase_version( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_transaction_version( port_: i64, - that: *mut wire_cst_transaction_base, + that: *mut wire_cst_bdk_transaction, ) { - wire_TransactionBase_version_impl(port_, that) + wire_bdk_transaction_version_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_TransactionBase_vsize( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_transaction_vsize( port_: i64, - that: *mut wire_cst_transaction_base, + that: *mut wire_cst_bdk_transaction, ) { - wire_TransactionBase_vsize_impl(port_, that) + wire_bdk_transaction_vsize_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_TransactionBase_weight( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_transaction_weight( port_: i64, - that: *mut wire_cst_transaction_base, + that: *mut wire_cst_bdk_transaction, ) { - wire_TransactionBase_weight_impl(port_, that) + wire_bdk_transaction_weight_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_WalletBase_get_address( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_wallet_get_address( port_: i64, - that: *mut wire_cst_wallet_base, + ptr: *mut wire_cst_bdk_wallet, address_index: *mut wire_cst_address_index, ) { - wire_WalletBase_get_address_impl(port_, that, address_index) + wire_bdk_wallet_get_address_impl(port_, ptr, address_index) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_WalletBase_get_balance( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_wallet_get_balance( port_: i64, - that: *mut wire_cst_wallet_base, + that: *mut wire_cst_bdk_wallet, ) { - wire_WalletBase_get_balance_impl(port_, that) + wire_bdk_wallet_get_balance_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_WalletBase_get_descriptor_for_keychain( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_wallet_get_descriptor_for_keychain( port_: i64, - ptr: *mut wire_cst_wallet_base, + ptr: *mut wire_cst_bdk_wallet, keychain: i32, ) { - wire_WalletBase_get_descriptor_for_keychain_impl(port_, ptr, keychain) + wire_bdk_wallet_get_descriptor_for_keychain_impl(port_, ptr, keychain) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_WalletBase_get_internal_address( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_wallet_get_internal_address( port_: i64, - that: *mut wire_cst_wallet_base, + ptr: *mut wire_cst_bdk_wallet, address_index: *mut wire_cst_address_index, ) { - wire_WalletBase_get_internal_address_impl(port_, that, address_index) + wire_bdk_wallet_get_internal_address_impl(port_, ptr, address_index) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_WalletBase_get_psbt_input( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_wallet_get_psbt_input( port_: i64, - that: *mut wire_cst_wallet_base, + 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_WalletBase_get_psbt_input_impl(port_, that, utxo, only_witness_utxo, sighash_type) + wire_bdk_wallet_get_psbt_input_impl(port_, that, utxo, only_witness_utxo, sighash_type) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_WalletBase_is_mine( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_wallet_is_mine( port_: i64, - that: *mut wire_cst_wallet_base, - script: *mut wire_cst_script_buf_base, + that: *mut wire_cst_bdk_wallet, + script: *mut wire_cst_bdk_script_buf, ) { - wire_WalletBase_is_mine_impl(port_, that, script) + wire_bdk_wallet_is_mine_impl(port_, that, script) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_WalletBase_list_transactions( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_wallet_list_transactions( port_: i64, - that: *mut wire_cst_wallet_base, + that: *mut wire_cst_bdk_wallet, include_raw: bool, ) { - wire_WalletBase_list_transactions_impl(port_, that, include_raw) + wire_bdk_wallet_list_transactions_impl(port_, that, include_raw) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_WalletBase_list_unspent( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_wallet_list_unspent( port_: i64, - that: *mut wire_cst_wallet_base, + that: *mut wire_cst_bdk_wallet, ) { - wire_WalletBase_list_unspent_impl(port_, that) + wire_bdk_wallet_list_unspent_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_WalletBase_network( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_wallet_network( port_: i64, - that: *mut wire_cst_wallet_base, + that: *mut wire_cst_bdk_wallet, ) { - wire_WalletBase_network_impl(port_, that) + wire_bdk_wallet_network_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_WalletBase_new( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_wallet_new( port_: i64, - descriptor: *mut wire_cst_descriptor_base, - change_descriptor: *mut wire_cst_descriptor_base, + descriptor: *mut wire_cst_bdk_descriptor, + change_descriptor: *mut wire_cst_bdk_descriptor, network: i32, database_config: *mut wire_cst_database_config, ) { - wire_WalletBase_new_impl( + wire_bdk_wallet_new_impl( port_, descriptor, change_descriptor, @@ -2451,22 +2510,22 @@ pub extern "C" fn frbgen_bdk_flutter_wire_WalletBase_new( } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_WalletBase_sign( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_wallet_sign( port_: i64, - ptr: *mut wire_cst_wallet_base, - psbt: *mut wire_cst_psbt_base, + ptr: *mut wire_cst_bdk_wallet, + psbt: *mut wire_cst_bdk_psbt, sign_options: *mut wire_cst_sign_options, ) { - wire_WalletBase_sign_impl(port_, ptr, psbt, sign_options) + wire_bdk_wallet_sign_impl(port_, ptr, psbt, sign_options) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_WalletBase_sync( +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_wallet_sync( port_: i64, - ptr: *mut wire_cst_wallet_base, - blockchain: *mut wire_cst_blockchain_base, + ptr: *mut wire_cst_bdk_wallet, + blockchain: *mut wire_cst_bdk_blockchain, ) { - wire_WalletBase_sync_impl(port_, ptr, blockchain) + wire_bdk_wallet_sync_impl(port_, ptr, blockchain) } #[no_mangle] @@ -2474,8 +2533,8 @@ pub extern "C" fn frbgen_bdk_flutter_wire_finish_bump_fee_tx_builder( port_: i64, txid: *mut wire_cst_list_prim_u_8_strict, fee_rate: f32, - allow_shrinking: *mut wire_cst_address_base, - wallet: *mut wire_cst_wallet_base, + allow_shrinking: *mut wire_cst_bdk_address, + wallet: *mut wire_cst_bdk_wallet, enable_rbf: bool, n_sequence: *mut u32, ) { @@ -2493,7 +2552,7 @@ pub extern "C" fn frbgen_bdk_flutter_wire_finish_bump_fee_tx_builder( #[no_mangle] pub extern "C" fn frbgen_bdk_flutter_wire_tx_builder_finish( port_: i64, - wallet: *mut wire_cst_wallet_base, + 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, @@ -2503,7 +2562,7 @@ pub extern "C" fn frbgen_bdk_flutter_wire_tx_builder_finish( fee_rate: *mut f32, fee_absolute: *mut u64, drain_wallet: bool, - drain_to: *mut wire_cst_script_buf_base, + drain_to: *mut wire_cst_bdk_script_buf, rbf: *mut wire_cst_rbf_value, data: *mut wire_cst_list_prim_u_8_loose, ) { @@ -2705,12 +2764,6 @@ pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_ } } -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_address_base() -> *mut wire_cst_address_base -{ - flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_address_base::new_with_null_ptr()) -} - #[no_mangle] pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_address_error( ) -> *mut wire_cst_address_error { @@ -2724,79 +2777,117 @@ pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_address_index( } #[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()) +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_blockchain_base( -) -> *mut wire_cst_blockchain_base { +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_blockchain_base::new_with_null_ptr(), + wire_cst_bdk_blockchain::new_with_null_ptr(), ) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_blockchain_config( -) -> *mut wire_cst_blockchain_config { +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_blockchain_config::new_with_null_ptr(), + wire_cst_bdk_derivation_path::new_with_null_ptr(), ) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_consensus_error( -) -> *mut wire_cst_consensus_error { +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_consensus_error::new_with_null_ptr(), + wire_cst_bdk_descriptor::new_with_null_ptr(), ) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_database_config( -) -> *mut wire_cst_database_config { +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_database_config::new_with_null_ptr(), + wire_cst_bdk_descriptor_public_key::new_with_null_ptr(), ) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_derivation_path_base( -) -> *mut wire_cst_derivation_path_base { +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_derivation_path_base::new_with_null_ptr(), + wire_cst_bdk_descriptor_secret_key::new_with_null_ptr(), ) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_descriptor_base( -) -> *mut wire_cst_descriptor_base { +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_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_descriptor_base::new_with_null_ptr(), + wire_cst_bdk_script_buf::new_with_null_ptr(), ) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_descriptor_error( -) -> *mut wire_cst_descriptor_error { +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_descriptor_error::new_with_null_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_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_descriptor_public_key_base( -) -> *mut wire_cst_descriptor_public_key_base { +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_descriptor_public_key_base::new_with_null_ptr(), + wire_cst_database_config::new_with_null_ptr(), ) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_descriptor_secret_key_base( -) -> *mut wire_cst_descriptor_secret_key_base { +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_secret_key_base::new_with_null_ptr(), + wire_cst_descriptor_error::new_with_null_ptr(), ) } @@ -2837,9 +2928,8 @@ pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_local_utxo() -> *mut wi } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_mnemonic_base( -) -> *mut wire_cst_mnemonic_base { - flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_mnemonic_base::new_with_null_ptr()) +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] @@ -2847,11 +2937,6 @@ pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_out_point() -> *mut wir 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_psbt_base() -> *mut wire_cst_psbt_base { - flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_psbt_base::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 { @@ -2886,14 +2971,6 @@ pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_rpc_sync_params( ) } -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_script_buf_base( -) -> *mut wire_cst_script_buf_base { - flutter_rust_bridge::for_generated::new_leak_box_ptr( - wire_cst_script_buf_base::new_with_null_ptr(), - ) -} - #[no_mangle] pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_sign_options() -> *mut wire_cst_sign_options { @@ -2916,14 +2993,6 @@ pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_sqlite_db_configuration ) } -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_transaction_base( -) -> *mut wire_cst_transaction_base { - flutter_rust_bridge::for_generated::new_leak_box_ptr( - wire_cst_transaction_base::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) @@ -2939,12 +3008,6 @@ pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_u_8(value: u8) -> *mut flutter_rust_bridge::for_generated::new_leak_box_ptr(value) } -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_wallet_base() -> *mut wire_cst_wallet_base -{ - flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_wallet_base::new_with_null_ptr()) -} - #[no_mangle] pub extern "C" fn frbgen_bdk_flutter_cst_new_list_list_prim_u_8_strict( len: i32, @@ -3061,11 +3124,6 @@ pub extern "C" fn frbgen_bdk_flutter_cst_new_list_tx_out(len: i32) -> *mut wire_ flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) } -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_address_base { - ptr: usize, -} #[repr(C)] #[derive(Clone, Copy)] pub struct wire_cst_address_error { @@ -3159,12 +3217,6 @@ pub struct wire_cst_AddressIndex_Reset { } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_address_info { - index: u32, - address: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] pub struct wire_cst_auth { tag: i32, kind: AuthKind, @@ -3199,6 +3251,37 @@ pub struct wire_cst_balance { } #[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, @@ -3238,6 +3321,9 @@ pub union BdkErrorKind { 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)] @@ -3405,17 +3491,52 @@ pub struct wire_cst_BdkError_Rusqlite { } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_block_time { - height: u32, - timestamp: u64, +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_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 { + inner: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_blockchain_base { +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, @@ -3511,17 +3632,6 @@ pub struct wire_cst_DatabaseConfig_Sled { } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_derivation_path_base { - ptr: usize, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_descriptor_base { - extended_descriptor: usize, - key_map: usize, -} -#[repr(C)] -#[derive(Clone, Copy)] pub struct wire_cst_descriptor_error { tag: i32, kind: DescriptorErrorKind, @@ -3581,16 +3691,6 @@ pub struct wire_cst_DescriptorError_Hex { } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_descriptor_public_key_base { - ptr: usize, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_descriptor_secret_key_base { - ptr: usize, -} -#[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, @@ -3712,8 +3812,26 @@ pub struct wire_cst_local_utxo { } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_mnemonic_base { - ptr: usize, +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)] @@ -3753,11 +3871,6 @@ pub struct wire_cst_Payload_WitnessProgram { } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_psbt_base { - ptr: usize, -} -#[repr(C)] -#[derive(Clone, Copy)] pub struct wire_cst_psbt_sig_hash_type { inner: u32, } @@ -3780,19 +3893,25 @@ pub struct wire_cst_RbfValue_Value { } #[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, +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_psbt_base_transaction_details { - field0: wire_cst_psbt_base, +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_out_point_input_usize { + field0: wire_cst_out_point, + field1: wire_cst_input, + field2: usize, +} +#[repr(C)] +#[derive(Clone, Copy)] pub struct wire_cst_rpc_config { url: *mut wire_cst_list_prim_u_8_strict, auth: wire_cst_auth, @@ -3811,16 +3930,11 @@ pub struct wire_cst_rpc_sync_params { #[repr(C)] #[derive(Clone, Copy)] pub struct wire_cst_script_amount { - script: wire_cst_script_buf_base, + script: wire_cst_bdk_script_buf, amount: u64, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_script_buf_base { - bytes: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] pub struct wire_cst_sign_options { multi_sig: bool, trust_witness_utxo: bool, @@ -3844,13 +3958,8 @@ pub struct wire_cst_sqlite_db_configuration { } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_transaction_base { - inner: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] pub struct wire_cst_transaction_details { - transaction: *mut wire_cst_transaction_base, + transaction: *mut wire_cst_bdk_transaction, txid: *mut wire_cst_list_prim_u_8_strict, received: u64, sent: u64, @@ -3861,7 +3970,7 @@ pub struct wire_cst_transaction_details { #[derive(Clone, Copy)] pub struct wire_cst_tx_in { previous_output: wire_cst_out_point, - script_sig: wire_cst_script_buf_base, + script_sig: wire_cst_bdk_script_buf, sequence: u32, witness: *mut wire_cst_list_list_prim_u_8_strict, } @@ -3869,10 +3978,5 @@ pub struct wire_cst_tx_in { #[derive(Clone, Copy)] pub struct wire_cst_tx_out { value: u64, - script_pubkey: wire_cst_script_buf_base, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_wallet_base { - ptr: usize, + script_pubkey: wire_cst_bdk_script_buf, } diff --git a/rust/src/frb_generated.rs b/rust/src/frb_generated.rs index 0cfe48f7..e351e8d3 100644 --- a/rust/src/frb_generated.rs +++ b/rust/src/frb_generated.rs @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.28. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31. #![allow( non_camel_case_types, @@ -36,7 +36,7 @@ flutter_rust_bridge::frb_generated_boilerplate!( default_rust_opaque = RustOpaqueNom, default_rust_auto_opaque = RustAutoOpaqueNom, ); -const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.0.0-dev.28"; +pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.0.0-dev.31"; // Section: executor @@ -44,14 +44,14 @@ flutter_rust_bridge::frb_generated_default_handler!(); // Section: wire_funcs -fn wire_BlockchainBase_broadcast_impl( +fn wire_bdk_blockchain_broadcast_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, - transaction: impl CstDecode, + that: impl CstDecode, + transaction: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "BlockchainBase_broadcast", + debug_name: "bdk_blockchain_broadcast", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -60,20 +60,20 @@ fn wire_BlockchainBase_broadcast_impl( let api_transaction = transaction.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::blockchain::BlockchainBase::broadcast(&api_that, api_transaction) + crate::api::blockchain::BdkBlockchain::broadcast(&api_that, api_transaction) })()) } }, ) } -fn wire_BlockchainBase_estimate_fee_impl( +fn wire_bdk_blockchain_estimate_fee_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + that: impl CstDecode, target: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "BlockchainBase_estimate_fee", + debug_name: "bdk_blockchain_estimate_fee", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -82,20 +82,20 @@ fn wire_BlockchainBase_estimate_fee_impl( let api_target = target.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::blockchain::BlockchainBase::estimate_fee(&api_that, api_target) + crate::api::blockchain::BdkBlockchain::estimate_fee(&api_that, api_target) })()) } }, ) } -fn wire_BlockchainBase_get_block_hash_impl( +fn wire_bdk_blockchain_get_block_hash_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + that: impl CstDecode, height: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "BlockchainBase_get_block_hash", + debug_name: "bdk_blockchain_get_block_hash", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -104,19 +104,19 @@ fn wire_BlockchainBase_get_block_hash_impl( let api_height = height.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::blockchain::BlockchainBase::get_block_hash(&api_that, api_height) + crate::api::blockchain::BdkBlockchain::get_block_hash(&api_that, api_height) })()) } }, ) } -fn wire_BlockchainBase_get_height_impl( +fn wire_bdk_blockchain_get_height_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + that: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "BlockchainBase_get_height", + debug_name: "bdk_blockchain_get_height", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -124,19 +124,19 @@ fn wire_BlockchainBase_get_height_impl( let api_that = that.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::blockchain::BlockchainBase::get_height(&api_that) + crate::api::blockchain::BdkBlockchain::get_height(&api_that) })()) } }, ) } -fn wire_BlockchainBase_new_impl( +fn wire_bdk_blockchain_new_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: "BlockchainBase_new", + debug_name: "bdk_blockchain_new", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -144,19 +144,19 @@ fn wire_BlockchainBase_new_impl( let api_blockchain_config = blockchain_config.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::blockchain::BlockchainBase::new(api_blockchain_config) + crate::api::blockchain::BdkBlockchain::new(api_blockchain_config) })()) } }, ) } -fn wire_DescriptorBase_as_string_impl( +fn wire_bdk_descriptor_as_string_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + that: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "DescriptorBase_as_string", + debug_name: "bdk_descriptor_as_string", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -164,21 +164,19 @@ fn wire_DescriptorBase_as_string_impl( let api_that = that.cst_decode(); move |context| { transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::descriptor::DescriptorBase::as_string( - &api_that, - )) + Result::<_, ()>::Ok(crate::api::descriptor::BdkDescriptor::as_string(&api_that)) })()) } }, ) } -fn wire_DescriptorBase_as_string_private_impl( +fn wire_bdk_descriptor_as_string_private_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + that: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "DescriptorBase_as_string_private", + debug_name: "bdk_descriptor_as_string_private", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -186,7 +184,7 @@ fn wire_DescriptorBase_as_string_private_impl( let api_that = that.cst_decode(); move |context| { transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::descriptor::DescriptorBase::as_string_private( + Result::<_, ()>::Ok(crate::api::descriptor::BdkDescriptor::as_string_private( &api_that, )) })()) @@ -194,13 +192,13 @@ fn wire_DescriptorBase_as_string_private_impl( }, ) } -fn wire_DescriptorBase_max_satisfaction_weight_impl( +fn wire_bdk_descriptor_max_satisfaction_weight_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + that: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "DescriptorBase_max_satisfaction_weight", + debug_name: "bdk_descriptor_max_satisfaction_weight", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -208,20 +206,20 @@ fn wire_DescriptorBase_max_satisfaction_weight_impl( let api_that = that.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::descriptor::DescriptorBase::max_satisfaction_weight(&api_that) + crate::api::descriptor::BdkDescriptor::max_satisfaction_weight(&api_that) })()) } }, ) } -fn wire_DescriptorBase_new_impl( +fn wire_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: "DescriptorBase_new", + debug_name: "bdk_descriptor_new", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -230,21 +228,21 @@ fn wire_DescriptorBase_new_impl( let api_network = network.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::descriptor::DescriptorBase::new(api_descriptor, api_network) + crate::api::descriptor::BdkDescriptor::new(api_descriptor, api_network) })()) } }, ) } -fn wire_DescriptorBase_new_bip44_impl( +fn wire_bdk_descriptor_new_bip44_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - secret_key: impl CstDecode, + 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: "DescriptorBase_new_bip44", + debug_name: "bdk_descriptor_new_bip44", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -254,7 +252,7 @@ fn wire_DescriptorBase_new_bip44_impl( let api_network = network.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::descriptor::DescriptorBase::new_bip44( + crate::api::descriptor::BdkDescriptor::new_bip44( api_secret_key, api_keychain_kind, api_network, @@ -264,16 +262,16 @@ fn wire_DescriptorBase_new_bip44_impl( }, ) } -fn wire_DescriptorBase_new_bip44_public_impl( +fn wire_bdk_descriptor_new_bip44_public_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - public_key: impl CstDecode, + 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: "DescriptorBase_new_bip44_public", + debug_name: "bdk_descriptor_new_bip44_public", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -284,7 +282,7 @@ fn wire_DescriptorBase_new_bip44_public_impl( let api_network = network.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::descriptor::DescriptorBase::new_bip44_public( + crate::api::descriptor::BdkDescriptor::new_bip44_public( api_public_key, api_fingerprint, api_keychain_kind, @@ -295,15 +293,15 @@ fn wire_DescriptorBase_new_bip44_public_impl( }, ) } -fn wire_DescriptorBase_new_bip49_impl( +fn wire_bdk_descriptor_new_bip49_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - secret_key: impl CstDecode, + 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: "DescriptorBase_new_bip49", + debug_name: "bdk_descriptor_new_bip49", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -313,7 +311,7 @@ fn wire_DescriptorBase_new_bip49_impl( let api_network = network.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::descriptor::DescriptorBase::new_bip49( + crate::api::descriptor::BdkDescriptor::new_bip49( api_secret_key, api_keychain_kind, api_network, @@ -323,16 +321,16 @@ fn wire_DescriptorBase_new_bip49_impl( }, ) } -fn wire_DescriptorBase_new_bip49_public_impl( +fn wire_bdk_descriptor_new_bip49_public_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - public_key: impl CstDecode, + 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: "DescriptorBase_new_bip49_public", + debug_name: "bdk_descriptor_new_bip49_public", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -343,7 +341,7 @@ fn wire_DescriptorBase_new_bip49_public_impl( let api_network = network.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::descriptor::DescriptorBase::new_bip49_public( + crate::api::descriptor::BdkDescriptor::new_bip49_public( api_public_key, api_fingerprint, api_keychain_kind, @@ -354,15 +352,15 @@ fn wire_DescriptorBase_new_bip49_public_impl( }, ) } -fn wire_DescriptorBase_new_bip84_impl( +fn wire_bdk_descriptor_new_bip84_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - secret_key: impl CstDecode, + 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: "DescriptorBase_new_bip84", + debug_name: "bdk_descriptor_new_bip84", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -372,7 +370,7 @@ fn wire_DescriptorBase_new_bip84_impl( let api_network = network.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::descriptor::DescriptorBase::new_bip84( + crate::api::descriptor::BdkDescriptor::new_bip84( api_secret_key, api_keychain_kind, api_network, @@ -382,16 +380,16 @@ fn wire_DescriptorBase_new_bip84_impl( }, ) } -fn wire_DescriptorBase_new_bip84_public_impl( +fn wire_bdk_descriptor_new_bip84_public_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - public_key: impl CstDecode, + 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: "DescriptorBase_new_bip84_public", + debug_name: "bdk_descriptor_new_bip84_public", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -402,7 +400,7 @@ fn wire_DescriptorBase_new_bip84_public_impl( let api_network = network.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::descriptor::DescriptorBase::new_bip84_public( + crate::api::descriptor::BdkDescriptor::new_bip84_public( api_public_key, api_fingerprint, api_keychain_kind, @@ -413,15 +411,15 @@ fn wire_DescriptorBase_new_bip84_public_impl( }, ) } -fn wire_DescriptorBase_new_bip86_impl( +fn wire_bdk_descriptor_new_bip86_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - secret_key: impl CstDecode, + 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: "DescriptorBase_new_bip86", + debug_name: "bdk_descriptor_new_bip86", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -431,7 +429,7 @@ fn wire_DescriptorBase_new_bip86_impl( let api_network = network.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::descriptor::DescriptorBase::new_bip86( + crate::api::descriptor::BdkDescriptor::new_bip86( api_secret_key, api_keychain_kind, api_network, @@ -441,16 +439,16 @@ fn wire_DescriptorBase_new_bip86_impl( }, ) } -fn wire_DescriptorBase_new_bip86_public_impl( +fn wire_bdk_descriptor_new_bip86_public_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - public_key: impl CstDecode, + 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: "DescriptorBase_new_bip86_public", + debug_name: "bdk_descriptor_new_bip86_public", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -461,7 +459,7 @@ fn wire_DescriptorBase_new_bip86_public_impl( let api_network = network.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::descriptor::DescriptorBase::new_bip86_public( + crate::api::descriptor::BdkDescriptor::new_bip86_public( api_public_key, api_fingerprint, api_keychain_kind, @@ -472,13 +470,13 @@ fn wire_DescriptorBase_new_bip86_public_impl( }, ) } -fn wire_DerivationPathBase_from_string_impl( +fn wire_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: "DerivationPathBase_from_string", + debug_name: "bdk_derivation_path_from_string", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -486,19 +484,19 @@ fn wire_DerivationPathBase_from_string_impl( let api_path = path.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::key::DerivationPathBase::from_string(api_path) + crate::api::key::BdkDerivationPath::from_string(api_path) })()) } }, ) } -fn wire_DescriptorPublicKeyBase_as_string_impl( +fn wire_bdk_descriptor_public_key_as_string_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + that: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "DescriptorPublicKeyBase_as_string", + debug_name: "bdk_descriptor_public_key_as_string", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -506,7 +504,7 @@ fn wire_DescriptorPublicKeyBase_as_string_impl( let api_that = that.cst_decode(); move |context| { transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::key::DescriptorPublicKeyBase::as_string( + Result::<_, ()>::Ok(crate::api::key::BdkDescriptorPublicKey::as_string( &api_that, )) })()) @@ -514,14 +512,14 @@ fn wire_DescriptorPublicKeyBase_as_string_impl( }, ) } -fn wire_DescriptorPublicKeyBase_derive_impl( +fn wire_bdk_descriptor_public_key_derive_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: impl CstDecode, - path: impl CstDecode, + ptr: impl CstDecode, + path: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "DescriptorPublicKeyBase_derive", + debug_name: "bdk_descriptor_public_key_derive", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -530,20 +528,20 @@ fn wire_DescriptorPublicKeyBase_derive_impl( let api_path = path.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::key::DescriptorPublicKeyBase::derive(api_ptr, api_path) + crate::api::key::BdkDescriptorPublicKey::derive(api_ptr, api_path) })()) } }, ) } -fn wire_DescriptorPublicKeyBase_extend_impl( +fn wire_bdk_descriptor_public_key_extend_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: impl CstDecode, - path: impl CstDecode, + ptr: impl CstDecode, + path: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "DescriptorPublicKeyBase_extend", + debug_name: "bdk_descriptor_public_key_extend", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -552,19 +550,19 @@ fn wire_DescriptorPublicKeyBase_extend_impl( let api_path = path.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::key::DescriptorPublicKeyBase::extend(api_ptr, api_path) + crate::api::key::BdkDescriptorPublicKey::extend(api_ptr, api_path) })()) } }, ) } -fn wire_DescriptorPublicKeyBase_from_string_impl( +fn wire_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: "DescriptorPublicKeyBase_from_string", + debug_name: "bdk_descriptor_public_key_from_string", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -572,19 +570,19 @@ fn wire_DescriptorPublicKeyBase_from_string_impl( let api_public_key = public_key.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::key::DescriptorPublicKeyBase::from_string(api_public_key) + crate::api::key::BdkDescriptorPublicKey::from_string(api_public_key) })()) } }, ) } -fn wire_DescriptorSecretKeyBase_as_public_impl( +fn wire_bdk_descriptor_secret_key_as_public_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: impl CstDecode, + ptr: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "DescriptorSecretKeyBase_as_public", + debug_name: "bdk_descriptor_secret_key_as_public", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -592,19 +590,19 @@ fn wire_DescriptorSecretKeyBase_as_public_impl( let api_ptr = ptr.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::key::DescriptorSecretKeyBase::as_public(api_ptr) + crate::api::key::BdkDescriptorSecretKey::as_public(api_ptr) })()) } }, ) } -fn wire_DescriptorSecretKeyBase_as_string_impl( +fn wire_bdk_descriptor_secret_key_as_string_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + that: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "DescriptorSecretKeyBase_as_string", + debug_name: "bdk_descriptor_secret_key_as_string", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -612,7 +610,7 @@ fn wire_DescriptorSecretKeyBase_as_string_impl( let api_that = that.cst_decode(); move |context| { transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::key::DescriptorSecretKeyBase::as_string( + Result::<_, ()>::Ok(crate::api::key::BdkDescriptorSecretKey::as_string( &api_that, )) })()) @@ -620,15 +618,15 @@ fn wire_DescriptorSecretKeyBase_as_string_impl( }, ) } -fn wire_DescriptorSecretKeyBase_create_impl( +fn wire_bdk_descriptor_secret_key_create_impl( port_: flutter_rust_bridge::for_generated::MessagePort, network: impl CstDecode, - mnemonic: impl CstDecode, + mnemonic: impl CstDecode, password: impl CstDecode>, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "DescriptorSecretKeyBase_create", + debug_name: "bdk_descriptor_secret_key_create", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -638,7 +636,7 @@ fn wire_DescriptorSecretKeyBase_create_impl( let api_password = password.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::key::DescriptorSecretKeyBase::create( + crate::api::key::BdkDescriptorSecretKey::create( api_network, api_mnemonic, api_password, @@ -648,14 +646,14 @@ fn wire_DescriptorSecretKeyBase_create_impl( }, ) } -fn wire_DescriptorSecretKeyBase_derive_impl( +fn wire_bdk_descriptor_secret_key_derive_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: impl CstDecode, - path: impl CstDecode, + ptr: impl CstDecode, + path: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "DescriptorSecretKeyBase_derive", + debug_name: "bdk_descriptor_secret_key_derive", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -664,20 +662,20 @@ fn wire_DescriptorSecretKeyBase_derive_impl( let api_path = path.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::key::DescriptorSecretKeyBase::derive(api_ptr, api_path) + crate::api::key::BdkDescriptorSecretKey::derive(api_ptr, api_path) })()) } }, ) } -fn wire_DescriptorSecretKeyBase_extend_impl( +fn wire_bdk_descriptor_secret_key_extend_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: impl CstDecode, - path: impl CstDecode, + ptr: impl CstDecode, + path: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "DescriptorSecretKeyBase_extend", + debug_name: "bdk_descriptor_secret_key_extend", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -686,19 +684,19 @@ fn wire_DescriptorSecretKeyBase_extend_impl( let api_path = path.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::key::DescriptorSecretKeyBase::extend(api_ptr, api_path) + crate::api::key::BdkDescriptorSecretKey::extend(api_ptr, api_path) })()) } }, ) } -fn wire_DescriptorSecretKeyBase_from_string_impl( +fn wire_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: "DescriptorSecretKeyBase_from_string", + debug_name: "bdk_descriptor_secret_key_from_string", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -706,19 +704,19 @@ fn wire_DescriptorSecretKeyBase_from_string_impl( let api_secret_key = secret_key.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::key::DescriptorSecretKeyBase::from_string(api_secret_key) + crate::api::key::BdkDescriptorSecretKey::from_string(api_secret_key) })()) } }, ) } -fn wire_DescriptorSecretKeyBase_secret_bytes_impl( +fn wire_bdk_descriptor_secret_key_secret_bytes_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + that: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "DescriptorSecretKeyBase_secret_bytes", + debug_name: "bdk_descriptor_secret_key_secret_bytes", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -726,19 +724,19 @@ fn wire_DescriptorSecretKeyBase_secret_bytes_impl( let api_that = that.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::key::DescriptorSecretKeyBase::secret_bytes(&api_that) + crate::api::key::BdkDescriptorSecretKey::secret_bytes(&api_that) })()) } }, ) } -fn wire_MnemonicBase_as_string_impl( +fn wire_bdk_mnemonic_as_string_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + that: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "MnemonicBase_as_string", + debug_name: "bdk_mnemonic_as_string", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -746,19 +744,19 @@ fn wire_MnemonicBase_as_string_impl( let api_that = that.cst_decode(); move |context| { transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::key::MnemonicBase::as_string(&api_that)) + Result::<_, ()>::Ok(crate::api::key::BdkMnemonic::as_string(&api_that)) })()) } }, ) } -fn wire_MnemonicBase_from_entropy_impl( +fn wire_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: "MnemonicBase_from_entropy", + debug_name: "bdk_mnemonic_from_entropy", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -766,19 +764,19 @@ fn wire_MnemonicBase_from_entropy_impl( let api_entropy = entropy.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::key::MnemonicBase::from_entropy(api_entropy) + crate::api::key::BdkMnemonic::from_entropy(api_entropy) })()) } }, ) } -fn wire_MnemonicBase_from_string_impl( +fn wire_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: "MnemonicBase_from_string", + debug_name: "bdk_mnemonic_from_string", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -786,38 +784,38 @@ fn wire_MnemonicBase_from_string_impl( let api_mnemonic = mnemonic.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::key::MnemonicBase::from_string(api_mnemonic) + crate::api::key::BdkMnemonic::from_string(api_mnemonic) })()) } }, ) } -fn wire_MnemonicBase_new_impl( +fn wire_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: "MnemonicBase_new", + 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((move || crate::api::key::MnemonicBase::new(api_word_count))()) + transform_result_dco((move || crate::api::key::BdkMnemonic::new(api_word_count))()) } }, ) } -fn wire_PsbtBase_combine_impl( +fn wire_bdk_psbt_combine_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: impl CstDecode, - other: impl CstDecode, + ptr: impl CstDecode, + other: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "PsbtBase_combine", + debug_name: "bdk_psbt_combine", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -826,39 +824,37 @@ fn wire_PsbtBase_combine_impl( let api_other = other.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::psbt::PsbtBase::combine(api_ptr, api_other) + crate::api::psbt::BdkPsbt::combine(api_ptr, api_other) })()) } }, ) } -fn wire_PsbtBase_extract_tx_impl( +fn wire_bdk_psbt_extract_tx_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: impl CstDecode, + ptr: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "PsbtBase_extract_tx", + debug_name: "bdk_psbt_extract_tx", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { let api_ptr = ptr.cst_decode(); move |context| { - transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::psbt::PsbtBase::extract_tx(api_ptr)) - })()) + transform_result_dco((move || crate::api::psbt::BdkPsbt::extract_tx(api_ptr))()) } }, ) } -fn wire_PsbtBase_fee_amount_impl( +fn wire_bdk_psbt_fee_amount_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + that: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "PsbtBase_fee_amount", + debug_name: "bdk_psbt_fee_amount", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -866,19 +862,19 @@ fn wire_PsbtBase_fee_amount_impl( let api_that = that.cst_decode(); move |context| { transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::psbt::PsbtBase::fee_amount(&api_that)) + Result::<_, ()>::Ok(crate::api::psbt::BdkPsbt::fee_amount(&api_that)) })()) } }, ) } -fn wire_PsbtBase_fee_rate_impl( +fn wire_bdk_psbt_fee_rate_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + that: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "PsbtBase_fee_rate", + debug_name: "bdk_psbt_fee_rate", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -886,19 +882,19 @@ fn wire_PsbtBase_fee_rate_impl( let api_that = that.cst_decode(); move |context| { transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::psbt::PsbtBase::fee_rate(&api_that)) + Result::<_, ()>::Ok(crate::api::psbt::BdkPsbt::fee_rate(&api_that)) })()) } }, ) } -fn wire_PsbtBase_from_str_impl( +fn wire_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: "PsbtBase_from_str", + debug_name: "bdk_psbt_from_str", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -906,19 +902,19 @@ fn wire_PsbtBase_from_str_impl( let api_psbt_base64 = psbt_base64.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::psbt::PsbtBase::from_str(api_psbt_base64) + crate::api::psbt::BdkPsbt::from_str(api_psbt_base64) })()) } }, ) } -fn wire_PsbtBase_json_serialize_impl( +fn wire_bdk_psbt_json_serialize_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + that: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "PsbtBase_json_serialize", + debug_name: "bdk_psbt_json_serialize", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -926,19 +922,19 @@ fn wire_PsbtBase_json_serialize_impl( let api_that = that.cst_decode(); move |context| { transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::psbt::PsbtBase::json_serialize(&api_that)) + Result::<_, ()>::Ok(crate::api::psbt::BdkPsbt::json_serialize(&api_that)) })()) } }, ) } -fn wire_PsbtBase_serialize_impl( +fn wire_bdk_psbt_serialize_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + that: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "PsbtBase_serialize", + debug_name: "bdk_psbt_serialize", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -946,19 +942,19 @@ fn wire_PsbtBase_serialize_impl( let api_that = that.cst_decode(); move |context| { transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::psbt::PsbtBase::serialize(&api_that)) + Result::<_, ()>::Ok(crate::api::psbt::BdkPsbt::serialize(&api_that)) })()) } }, ) } -fn wire_PsbtBase_txid_impl( +fn wire_bdk_psbt_txid_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + that: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "PsbtBase_txid", + debug_name: "bdk_psbt_txid", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -966,19 +962,19 @@ fn wire_PsbtBase_txid_impl( let api_that = that.cst_decode(); move |context| { transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::psbt::PsbtBase::txid(&api_that)) + Result::<_, ()>::Ok(crate::api::psbt::BdkPsbt::txid(&api_that)) })()) } }, ) } -fn wire_AddressBase_as_string_impl( +fn wire_bdk_address_as_string_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + that: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "AddressBase_as_string", + debug_name: "bdk_address_as_string", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -986,20 +982,20 @@ fn wire_AddressBase_as_string_impl( let api_that = that.cst_decode(); move |context| { transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::types::AddressBase::as_string(&api_that)) + Result::<_, ()>::Ok(crate::api::types::BdkAddress::as_string(&api_that)) })()) } }, ) } -fn wire_AddressBase_from_script_impl( +fn wire_bdk_address_from_script_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - script: impl CstDecode, + script: impl CstDecode, network: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "AddressBase_from_script", + debug_name: "bdk_address_from_script", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -1008,20 +1004,20 @@ fn wire_AddressBase_from_script_impl( let api_network = network.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::types::AddressBase::from_script(api_script, api_network) + crate::api::types::BdkAddress::from_script(api_script, api_network) })()) } }, ) } -fn wire_AddressBase_from_string_impl( +fn wire_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: "AddressBase_from_string", + debug_name: "bdk_address_from_string", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -1030,20 +1026,20 @@ fn wire_AddressBase_from_string_impl( let api_network = network.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::types::AddressBase::from_string(api_address, api_network) + crate::api::types::BdkAddress::from_string(api_address, api_network) })()) } }, ) } -fn wire_AddressBase_is_valid_for_network_impl( +fn wire_bdk_address_is_valid_for_network_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + that: impl CstDecode, network: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "AddressBase_is_valid_for_network", + debug_name: "bdk_address_is_valid_for_network", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -1052,7 +1048,7 @@ fn wire_AddressBase_is_valid_for_network_impl( let api_network = network.cst_decode(); move |context| { transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::types::AddressBase::is_valid_for_network( + Result::<_, ()>::Ok(crate::api::types::BdkAddress::is_valid_for_network( &api_that, api_network, )) @@ -1061,13 +1057,13 @@ fn wire_AddressBase_is_valid_for_network_impl( }, ) } -fn wire_AddressBase_network_impl( +fn wire_bdk_address_network_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + that: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "AddressBase_network", + debug_name: "bdk_address_network", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -1075,19 +1071,19 @@ fn wire_AddressBase_network_impl( let api_that = that.cst_decode(); move |context| { transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::types::AddressBase::network(&api_that)) + Result::<_, ()>::Ok(crate::api::types::BdkAddress::network(&api_that)) })()) } }, ) } -fn wire_AddressBase_payload_impl( +fn wire_bdk_address_payload_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + that: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "AddressBase_payload", + debug_name: "bdk_address_payload", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -1095,19 +1091,19 @@ fn wire_AddressBase_payload_impl( let api_that = that.cst_decode(); move |context| { transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::types::AddressBase::payload(&api_that)) + Result::<_, ()>::Ok(crate::api::types::BdkAddress::payload(&api_that)) })()) } }, ) } -fn wire_AddressBase_script_impl( +fn wire_bdk_address_script_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: impl CstDecode, + ptr: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "AddressBase_script", + debug_name: "bdk_address_script", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -1115,19 +1111,19 @@ fn wire_AddressBase_script_impl( let api_ptr = ptr.cst_decode(); move |context| { transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::types::AddressBase::script(api_ptr)) + Result::<_, ()>::Ok(crate::api::types::BdkAddress::script(api_ptr)) })()) } }, ) } -fn wire_AddressBase_to_qr_uri_impl( +fn wire_bdk_address_to_qr_uri_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + that: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "AddressBase_to_qr_uri", + debug_name: "bdk_address_to_qr_uri", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -1135,53 +1131,53 @@ fn wire_AddressBase_to_qr_uri_impl( let api_that = that.cst_decode(); move |context| { transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::types::AddressBase::to_qr_uri(&api_that)) + Result::<_, ()>::Ok(crate::api::types::BdkAddress::to_qr_uri(&api_that)) })()) } }, ) } -fn wire_ScriptBufBase_empty_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { +fn wire_bdk_script_buf_empty_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "ScriptBufBase_empty", + debug_name: "bdk_script_buf_empty", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { move |context| { transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::types::ScriptBufBase::empty()) + Result::<_, ()>::Ok(crate::api::types::BdkScriptBuf::empty()) })()) } }, ) } -fn wire_ScriptBufBase_from_hex_impl( +fn wire_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: "ScriptBufBase_from_hex", + 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((move || crate::api::types::ScriptBufBase::from_hex(api_s))()) + transform_result_dco((move || crate::api::types::BdkScriptBuf::from_hex(api_s))()) } }, ) } -fn wire_ScriptBufBase_with_capacity_impl( +fn wire_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: "ScriptBufBase_with_capacity", + debug_name: "bdk_script_buf_with_capacity", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -1189,7 +1185,7 @@ fn wire_ScriptBufBase_with_capacity_impl( let api_capacity = capacity.cst_decode(); move |context| { transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::types::ScriptBufBase::with_capacity( + Result::<_, ()>::Ok(crate::api::types::BdkScriptBuf::with_capacity( api_capacity, )) })()) @@ -1197,33 +1193,33 @@ fn wire_ScriptBufBase_with_capacity_impl( }, ) } -fn wire_TransactionBase_input_impl( +fn wire_bdk_transaction_from_bytes_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + transaction_bytes: impl CstDecode>, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "TransactionBase_input", + debug_name: "bdk_transaction_from_bytes", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_that = that.cst_decode(); + let api_transaction_bytes = transaction_bytes.cst_decode(); move |context| { transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::types::TransactionBase::input(&api_that)) + crate::api::types::BdkTransaction::from_bytes(api_transaction_bytes) })()) } }, ) } -fn wire_TransactionBase_is_coin_base_impl( +fn wire_bdk_transaction_input_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + that: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "TransactionBase_is_coin_base", + debug_name: "bdk_transaction_input", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -1231,19 +1227,19 @@ fn wire_TransactionBase_is_coin_base_impl( let api_that = that.cst_decode(); move |context| { transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::types::TransactionBase::is_coin_base(&api_that)) + crate::api::types::BdkTransaction::input(&api_that) })()) } }, ) } -fn wire_TransactionBase_is_explicitly_rbf_impl( +fn wire_bdk_transaction_is_coin_base_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + that: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "TransactionBase_is_explicitly_rbf", + debug_name: "bdk_transaction_is_coin_base", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -1251,21 +1247,19 @@ fn wire_TransactionBase_is_explicitly_rbf_impl( let api_that = that.cst_decode(); move |context| { transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::types::TransactionBase::is_explicitly_rbf( - &api_that, - )) + crate::api::types::BdkTransaction::is_coin_base(&api_that) })()) } }, ) } -fn wire_TransactionBase_is_lock_time_enabled_impl( +fn wire_bdk_transaction_is_explicitly_rbf_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + that: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "TransactionBase_is_lock_time_enabled", + debug_name: "bdk_transaction_is_explicitly_rbf", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -1273,21 +1267,19 @@ fn wire_TransactionBase_is_lock_time_enabled_impl( let api_that = that.cst_decode(); move |context| { transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::types::TransactionBase::is_lock_time_enabled( - &api_that, - )) + crate::api::types::BdkTransaction::is_explicitly_rbf(&api_that) })()) } }, ) } -fn wire_TransactionBase_lock_time_impl( +fn wire_bdk_transaction_is_lock_time_enabled_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + that: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "TransactionBase_lock_time", + debug_name: "bdk_transaction_is_lock_time_enabled", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -1295,59 +1287,70 @@ fn wire_TransactionBase_lock_time_impl( let api_that = that.cst_decode(); move |context| { transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::types::TransactionBase::lock_time(&api_that)) + crate::api::types::BdkTransaction::is_lock_time_enabled(&api_that) })()) } }, ) } -fn wire_TransactionBase_new_impl( +fn wire_bdk_transaction_lock_time_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - transaction_bytes: impl CstDecode>, + that: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "TransactionBase_new", + debug_name: "bdk_transaction_lock_time", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_transaction_bytes = transaction_bytes.cst_decode(); + let api_that = that.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::types::TransactionBase::new(api_transaction_bytes) + crate::api::types::BdkTransaction::lock_time(&api_that) })()) } }, ) } -fn wire_TransactionBase_output_impl( +fn wire_bdk_transaction_new_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + 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: "TransactionBase_output", + debug_name: "bdk_transaction_new", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_that = that.cst_decode(); + 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((move || { - Result::<_, ()>::Ok(crate::api::types::TransactionBase::output(&api_that)) + crate::api::types::BdkTransaction::new( + api_version, + api_lock_time, + api_input, + api_output, + ) })()) } }, ) } -fn wire_TransactionBase_serialize_impl( +fn wire_bdk_transaction_output_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + that: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "TransactionBase_serialize", + debug_name: "bdk_transaction_output", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -1355,19 +1358,19 @@ fn wire_TransactionBase_serialize_impl( let api_that = that.cst_decode(); move |context| { transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::types::TransactionBase::serialize(&api_that)) + crate::api::types::BdkTransaction::output(&api_that) })()) } }, ) } -fn wire_TransactionBase_size_impl( +fn wire_bdk_transaction_serialize_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + that: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "TransactionBase_size", + debug_name: "bdk_transaction_serialize", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -1375,39 +1378,55 @@ fn wire_TransactionBase_size_impl( let api_that = that.cst_decode(); move |context| { transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::types::TransactionBase::size(&api_that)) + crate::api::types::BdkTransaction::serialize(&api_that) })()) } }, ) } -fn wire_TransactionBase_txid_impl( +fn wire_bdk_transaction_size_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + that: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "TransactionBase_txid", + 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((move || { - Result::<_, ()>::Ok(crate::api::types::TransactionBase::txid(&api_that)) - })()) + transform_result_dco((move || crate::api::types::BdkTransaction::size(&api_that))()) + } + }, + ) +} +fn wire_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((move || crate::api::types::BdkTransaction::txid(&api_that))()) } }, ) } -fn wire_TransactionBase_version_impl( +fn wire_bdk_transaction_version_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + that: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "TransactionBase_version", + debug_name: "bdk_transaction_version", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -1415,19 +1434,19 @@ fn wire_TransactionBase_version_impl( let api_that = that.cst_decode(); move |context| { transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::types::TransactionBase::version(&api_that)) + crate::api::types::BdkTransaction::version(&api_that) })()) } }, ) } -fn wire_TransactionBase_vsize_impl( +fn wire_bdk_transaction_vsize_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + that: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "TransactionBase_vsize", + debug_name: "bdk_transaction_vsize", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -1435,19 +1454,19 @@ fn wire_TransactionBase_vsize_impl( let api_that = that.cst_decode(); move |context| { transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::types::TransactionBase::vsize(&api_that)) + crate::api::types::BdkTransaction::vsize(&api_that) })()) } }, ) } -fn wire_TransactionBase_weight_impl( +fn wire_bdk_transaction_weight_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + that: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "TransactionBase_weight", + debug_name: "bdk_transaction_weight", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -1455,41 +1474,41 @@ fn wire_TransactionBase_weight_impl( let api_that = that.cst_decode(); move |context| { transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::types::TransactionBase::weight(&api_that)) + crate::api::types::BdkTransaction::weight(&api_that) })()) } }, ) } -fn wire_WalletBase_get_address_impl( +fn wire_bdk_wallet_get_address_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + ptr: impl CstDecode, address_index: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "WalletBase_get_address", + debug_name: "bdk_wallet_get_address", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_that = that.cst_decode(); + let api_ptr = ptr.cst_decode(); let api_address_index = address_index.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::wallet::WalletBase::get_address(&api_that, api_address_index) + crate::api::wallet::BdkWallet::get_address(api_ptr, api_address_index) })()) } }, ) } -fn wire_WalletBase_get_balance_impl( +fn wire_bdk_wallet_get_balance_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + that: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "WalletBase_get_balance", + debug_name: "bdk_wallet_get_balance", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -1497,20 +1516,20 @@ fn wire_WalletBase_get_balance_impl( let api_that = that.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::wallet::WalletBase::get_balance(&api_that) + crate::api::wallet::BdkWallet::get_balance(&api_that) })()) } }, ) } -fn wire_WalletBase_get_descriptor_for_keychain_impl( +fn wire_bdk_wallet_get_descriptor_for_keychain_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: impl CstDecode, + ptr: impl CstDecode, keychain: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "WalletBase_get_descriptor_for_keychain", + debug_name: "bdk_wallet_get_descriptor_for_keychain", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -1519,7 +1538,7 @@ fn wire_WalletBase_get_descriptor_for_keychain_impl( let api_keychain = keychain.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::wallet::WalletBase::get_descriptor_for_keychain( + crate::api::wallet::BdkWallet::get_descriptor_for_keychain( api_ptr, api_keychain, ) @@ -1528,41 +1547,38 @@ fn wire_WalletBase_get_descriptor_for_keychain_impl( }, ) } -fn wire_WalletBase_get_internal_address_impl( +fn wire_bdk_wallet_get_internal_address_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + ptr: impl CstDecode, address_index: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "WalletBase_get_internal_address", + debug_name: "bdk_wallet_get_internal_address", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_that = that.cst_decode(); + let api_ptr = ptr.cst_decode(); let api_address_index = address_index.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::wallet::WalletBase::get_internal_address( - &api_that, - api_address_index, - ) + crate::api::wallet::BdkWallet::get_internal_address(api_ptr, api_address_index) })()) } }, ) } -fn wire_WalletBase_get_psbt_input_impl( +fn wire_bdk_wallet_get_psbt_input_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + 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: "WalletBase_get_psbt_input", + debug_name: "bdk_wallet_get_psbt_input", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -1573,7 +1589,7 @@ fn wire_WalletBase_get_psbt_input_impl( let api_sighash_type = sighash_type.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::wallet::WalletBase::get_psbt_input( + crate::api::wallet::BdkWallet::get_psbt_input( &api_that, api_utxo, api_only_witness_utxo, @@ -1584,14 +1600,14 @@ fn wire_WalletBase_get_psbt_input_impl( }, ) } -fn wire_WalletBase_is_mine_impl( +fn wire_bdk_wallet_is_mine_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, - script: impl CstDecode, + that: impl CstDecode, + script: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "WalletBase_is_mine", + debug_name: "bdk_wallet_is_mine", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -1600,20 +1616,20 @@ fn wire_WalletBase_is_mine_impl( let api_script = script.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::wallet::WalletBase::is_mine(&api_that, api_script) + crate::api::wallet::BdkWallet::is_mine(&api_that, api_script) })()) } }, ) } -fn wire_WalletBase_list_transactions_impl( +fn wire_bdk_wallet_list_transactions_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + that: impl CstDecode, include_raw: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "WalletBase_list_transactions", + debug_name: "bdk_wallet_list_transactions", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -1622,19 +1638,19 @@ fn wire_WalletBase_list_transactions_impl( let api_include_raw = include_raw.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::wallet::WalletBase::list_transactions(&api_that, api_include_raw) + crate::api::wallet::BdkWallet::list_transactions(&api_that, api_include_raw) })()) } }, ) } -fn wire_WalletBase_list_unspent_impl( +fn wire_bdk_wallet_list_unspent_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + that: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "WalletBase_list_unspent", + debug_name: "bdk_wallet_list_unspent", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -1642,19 +1658,19 @@ fn wire_WalletBase_list_unspent_impl( let api_that = that.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::wallet::WalletBase::list_unspent(&api_that) + crate::api::wallet::BdkWallet::list_unspent(&api_that) })()) } }, ) } -fn wire_WalletBase_network_impl( +fn wire_bdk_wallet_network_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + that: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "WalletBase_network", + debug_name: "bdk_wallet_network", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -1662,22 +1678,22 @@ fn wire_WalletBase_network_impl( let api_that = that.cst_decode(); move |context| { transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::wallet::WalletBase::network(&api_that)) + Result::<_, ()>::Ok(crate::api::wallet::BdkWallet::network(&api_that)) })()) } }, ) } -fn wire_WalletBase_new_impl( +fn wire_bdk_wallet_new_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - descriptor: impl CstDecode, - change_descriptor: impl CstDecode>, + 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: "WalletBase_new", + debug_name: "bdk_wallet_new", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -1688,7 +1704,7 @@ fn wire_WalletBase_new_impl( let api_database_config = database_config.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::wallet::WalletBase::new( + crate::api::wallet::BdkWallet::new( api_descriptor, api_change_descriptor, api_network, @@ -1699,15 +1715,15 @@ fn wire_WalletBase_new_impl( }, ) } -fn wire_WalletBase_sign_impl( +fn wire_bdk_wallet_sign_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: impl CstDecode, - psbt: impl CstDecode, + ptr: impl CstDecode, + psbt: impl CstDecode, sign_options: impl CstDecode>, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "WalletBase_sign", + debug_name: "bdk_wallet_sign", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -1717,20 +1733,20 @@ fn wire_WalletBase_sign_impl( let api_sign_options = sign_options.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::wallet::WalletBase::sign(api_ptr, api_psbt, api_sign_options) + crate::api::wallet::BdkWallet::sign(api_ptr, api_psbt, api_sign_options) })()) } }, ) } -fn wire_WalletBase_sync_impl( +fn wire_bdk_wallet_sync_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: impl CstDecode, - blockchain: impl CstDecode, + ptr: impl CstDecode, + blockchain: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "WalletBase_sync", + debug_name: "bdk_wallet_sync", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -1739,7 +1755,7 @@ fn wire_WalletBase_sync_impl( let api_blockchain = blockchain.cst_decode(); move |context| { transform_result_dco((move || { - crate::api::wallet::WalletBase::sync(api_ptr, api_blockchain) + crate::api::wallet::BdkWallet::sync(api_ptr, api_blockchain) })()) } }, @@ -1749,8 +1765,8 @@ fn wire_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, + allow_shrinking: impl CstDecode>, + wallet: impl CstDecode, enable_rbf: impl CstDecode, n_sequence: impl CstDecode>, ) { @@ -1784,7 +1800,7 @@ fn wire_finish_bump_fee_tx_builder_impl( } fn wire_tx_builder_finish_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - wallet: impl CstDecode, + wallet: impl CstDecode, recipients: impl CstDecode>, utxos: impl CstDecode>, foreign_utxo: impl CstDecode>, @@ -1794,7 +1810,7 @@ fn wire_tx_builder_finish_impl( fee_rate: impl CstDecode>, fee_absolute: impl CstDecode>, drain_wallet: impl CstDecode, - drain_to: impl CstDecode>, + drain_to: impl CstDecode>, rbf: impl CstDecode>, data: impl CstDecode>, ) { @@ -2052,14 +2068,6 @@ impl SseDecode for String { } } -impl SseDecode for crate::api::types::AddressBase { - // 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::AddressBase { ptr: var_ptr }; - } -} - 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 { @@ -2160,18 +2168,6 @@ impl SseDecode for crate::api::types::AddressIndex { } } -impl SseDecode for crate::api::types::AddressInfo { - // 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_index = ::sse_decode(deserializer); - let mut var_address = ::sse_decode(deserializer); - return crate::api::types::AddressInfo { - index: var_index, - address: var_address, - }; - } -} - 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 { @@ -2219,6 +2215,59 @@ impl SseDecode for crate::api::types::Balance { } } +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 { @@ -2394,6 +2443,18 @@ impl SseDecode for crate::api::error::BdkError { let mut var_field0 = ::sse_decode(deserializer); return crate::api::error::BdkError::Rusqlite(var_field0); } + 43 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::InvalidInput(var_field0); + } + 44 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::InvalidLockTime(var_field0); + } + 45 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::InvalidTransaction(var_field0); + } _ => { unimplemented!(""); } @@ -2401,6 +2462,48 @@ impl SseDecode for crate::api::error::BdkError { } } +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::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_inner = ::sse_decode(deserializer); + return crate::api::types::BdkTransaction { inner: var_inner }; + } +} + +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 { @@ -2413,14 +2516,6 @@ impl SseDecode for crate::api::types::BlockTime { } } -impl SseDecode for crate::api::blockchain::BlockchainBase { - // 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::BlockchainBase { ptr: var_ptr }; - } -} - 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 { @@ -2535,27 +2630,6 @@ impl SseDecode for crate::api::types::DatabaseConfig { } } -impl SseDecode for crate::api::key::DerivationPathBase { - // 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::DerivationPathBase { ptr: var_ptr }; - } -} - -impl SseDecode for crate::api::descriptor::DescriptorBase { - // 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::DescriptorBase { - extended_descriptor: var_extendedDescriptor, - key_map: var_keyMap, - }; - } -} - 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 { @@ -2612,22 +2686,6 @@ impl SseDecode for crate::api::error::DescriptorError { } } -impl SseDecode for crate::api::key::DescriptorPublicKeyBase { - // 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::DescriptorPublicKeyBase { ptr: var_ptr }; - } -} - -impl SseDecode for crate::api::key::DescriptorSecretKeyBase { - // 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::DescriptorSecretKeyBase { ptr: var_ptr }; - } -} - 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 { @@ -2849,11 +2907,23 @@ impl SseDecode for crate::api::types::LocalUtxo { } } -impl SseDecode for crate::api::key::MnemonicBase { +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 var_ptr = >::sse_decode(deserializer); - return crate::api::key::MnemonicBase { ptr: var_ptr }; + 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!(""); + } + } } } @@ -2882,33 +2952,46 @@ impl SseDecode for Option { } } -impl SseDecode for Option { +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)); + return Some(::sse_decode(deserializer)); } else { return None; } } } -impl SseDecode for Option { +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)); + 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 { +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( + return Some(::sse_decode( deserializer, )); } else { @@ -2917,6 +3000,17 @@ impl SseDecode for Option { } } +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 { @@ -2991,17 +3085,6 @@ impl SseDecode for Option { } } -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 { @@ -3013,19 +3096,6 @@ impl SseDecode for Option { } } -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 { @@ -3103,15 +3173,6 @@ impl SseDecode for crate::api::types::Payload { } } -impl SseDecode for crate::api::psbt::PsbtBase { - // 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::PsbtBase { ptr: var_ptr }; - } -} - 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 { @@ -3139,30 +3200,39 @@ impl SseDecode for crate::api::types::RbfValue { } } -impl SseDecode for (crate::api::types::OutPoint, crate::api::types::Input, usize) { +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); - let mut var_field2 = ::sse_decode(deserializer); - return (var_field0, var_field1, var_field2); + 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::PsbtBase, + 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_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 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 { @@ -3201,7 +3271,7 @@ impl SseDecode for crate::api::blockchain::RpcSyncParams { 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_script = ::sse_decode(deserializer); let mut var_amount = ::sse_decode(deserializer); return crate::api::types::ScriptAmount { script: var_script, @@ -3210,14 +3280,6 @@ impl SseDecode for crate::api::types::ScriptAmount { } } -impl SseDecode for crate::api::types::ScriptBufBase { - // 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::ScriptBufBase { bytes: var_bytes }; - } -} - 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 { @@ -3262,19 +3324,11 @@ impl SseDecode for crate::api::types::SqliteDbConfiguration { } } -impl SseDecode for crate::api::types::TransactionBase { - // 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::TransactionBase { inner: var_inner }; - } -} - 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); + >::sse_decode(deserializer); let mut var_txid = ::sse_decode(deserializer); let mut var_received = ::sse_decode(deserializer); let mut var_sent = ::sse_decode(deserializer); @@ -3296,7 +3350,7 @@ 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_scriptSig = ::sse_decode(deserializer); let mut var_sequence = ::sse_decode(deserializer); let mut var_witness = >>::sse_decode(deserializer); return crate::api::types::TxIn { @@ -3312,7 +3366,7 @@ 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); + let mut var_scriptPubkey = ::sse_decode(deserializer); return crate::api::types::TxOut { value: var_value, script_pubkey: var_scriptPubkey, @@ -3373,15 +3427,6 @@ impl SseDecode for crate::api::types::Variant { } } -impl SseDecode for crate::api::wallet::WalletBase { - // 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::WalletBase { ptr: var_ptr }; - } -} - 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 { @@ -3449,23 +3494,6 @@ fn pde_ffi_dispatcher_sync_impl( // Section: rust2dart -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::AddressBase { - 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::AddressBase -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::AddressBase -{ - fn into_into_dart(self) -> crate::api::types::AddressBase { - self - } -} // 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 { @@ -3554,27 +3582,6 @@ impl flutter_rust_bridge::IntoIntoDart } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::AddressInfo { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [ - self.index.into_into_dart().into_dart(), - self.address.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::types::AddressInfo -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::AddressInfo -{ - fn into_into_dart(self) -> crate::api::types::AddressInfo { - 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 { @@ -3620,6 +3627,109 @@ impl flutter_rust_bridge::IntoIntoDart for crate::ap } } // 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 { @@ -3739,6 +3849,15 @@ impl flutter_rust_bridge::IntoDart for crate::api::error::BdkError { crate::api::error::BdkError::Rusqlite(field0) => { [42.into_dart(), field0.into_into_dart().into_dart()].into_dart() } + crate::api::error::BdkError::InvalidInput(field0) => { + [43.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::InvalidLockTime(field0) => { + [44.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::InvalidTransaction(field0) => { + [45.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } } } } @@ -3751,37 +3870,94 @@ impl flutter_rust_bridge::IntoIntoDart } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::BlockTime { +impl flutter_rust_bridge::IntoDart for crate::api::key::BdkMnemonic { 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() + [self.ptr.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 +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::types::BlockTime { + 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::blockchain::BlockchainBase { +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::blockchain::BlockchainBase + 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.inner.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 + } } -impl flutter_rust_bridge::IntoIntoDart - for crate::api::blockchain::BlockchainBase +// 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::blockchain::BlockchainBase { + fn into_into_dart(self) -> crate::api::types::BlockTime { self } } @@ -3899,44 +4075,6 @@ impl flutter_rust_bridge::IntoIntoDart } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::key::DerivationPathBase { - 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::DerivationPathBase -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::key::DerivationPathBase -{ - fn into_into_dart(self) -> crate::api::key::DerivationPathBase { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::descriptor::DescriptorBase { - 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::DescriptorBase -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::descriptor::DescriptorBase -{ - fn into_into_dart(self) -> crate::api::descriptor::DescriptorBase { - 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 { @@ -3987,40 +4125,6 @@ impl flutter_rust_bridge::IntoIntoDart } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::key::DescriptorPublicKeyBase { - 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::DescriptorPublicKeyBase -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::key::DescriptorPublicKeyBase -{ - fn into_into_dart(self) -> crate::api::key::DescriptorPublicKeyBase { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::key::DescriptorSecretKeyBase { - 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::DescriptorSecretKeyBase -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::key::DescriptorSecretKeyBase -{ - fn into_into_dart(self) -> crate::api::key::DescriptorSecretKeyBase { - 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 { [ @@ -4161,16 +4265,23 @@ impl flutter_rust_bridge::IntoIntoDart } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::key::MnemonicBase { +impl flutter_rust_bridge::IntoDart for crate::api::types::LockTime { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [self.ptr.into_into_dart().into_dart()].into_dart() + 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() + } + } } } -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::key::MnemonicBase {} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::key::MnemonicBase +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::key::MnemonicBase { + fn into_into_dart(self) -> crate::api::types::LockTime { self } } @@ -4235,18 +4346,6 @@ impl flutter_rust_bridge::IntoIntoDart for crate::ap } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::psbt::PsbtBase { - 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::PsbtBase {} -impl flutter_rust_bridge::IntoIntoDart for crate::api::psbt::PsbtBase { - fn into_into_dart(self) -> crate::api::psbt::PsbtBase { - 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() @@ -4351,23 +4450,6 @@ impl flutter_rust_bridge::IntoIntoDart } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::ScriptBufBase { - 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::ScriptBufBase -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::ScriptBufBase -{ - fn into_into_dart(self) -> crate::api::types::ScriptBufBase { - 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 { [ @@ -4433,23 +4515,6 @@ impl flutter_rust_bridge::IntoIntoDart } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::TransactionBase { - 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::TransactionBase -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::TransactionBase -{ - fn into_into_dart(self) -> crate::api::types::TransactionBase { - 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 { [ @@ -4524,23 +4589,6 @@ impl flutter_rust_bridge::IntoIntoDart for crate::ap } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::wallet::WalletBase { - 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::WalletBase -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::wallet::WalletBase -{ - fn into_into_dart(self) -> crate::api::wallet::WalletBase { - 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 { @@ -4691,13 +4739,6 @@ impl SseEncode for String { } } -impl SseEncode for crate::api::types::AddressBase { - // 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::AddressError { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { @@ -4786,14 +4827,6 @@ impl SseEncode for crate::api::types::AddressIndex { } } -impl SseEncode for crate::api::types::AddressInfo { - // 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.index, serializer); - ::sse_encode(self.address, serializer); - } -} - 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) { @@ -4826,6 +4859,49 @@ impl SseEncode for crate::api::types::Balance { } } +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) { @@ -4994,22 +5070,62 @@ impl SseEncode for crate::api::error::BdkError { ::sse_encode(42, serializer); ::sse_encode(field0, serializer); } + crate::api::error::BdkError::InvalidInput(field0) => { + ::sse_encode(43, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::InvalidLockTime(field0) => { + ::sse_encode(44, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::InvalidTransaction(field0) => { + ::sse_encode(45, serializer); + ::sse_encode(field0, serializer); + } } } } -impl SseEncode for crate::api::types::BlockTime { +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.height, serializer); - ::sse_encode(self.timestamp, serializer); + >::sse_encode(self.ptr, serializer); } } -impl SseEncode for crate::api::blockchain::BlockchainBase { +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); + >>::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.inner, 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); } } @@ -5109,21 +5225,6 @@ impl SseEncode for crate::api::types::DatabaseConfig { } } -impl SseEncode for crate::api::key::DerivationPathBase { - // 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::DescriptorBase { - // 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::error::DescriptorError { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { @@ -5176,20 +5277,6 @@ impl SseEncode for crate::api::error::DescriptorError { } } -impl SseEncode for crate::api::key::DescriptorPublicKeyBase { - // 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::DescriptorSecretKeyBase { - // 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::ElectrumConfig { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { @@ -5368,10 +5455,19 @@ impl SseEncode for crate::api::types::LocalUtxo { } } -impl SseEncode for crate::api::key::MnemonicBase { +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) { - >::sse_encode(self.ptr, serializer); + 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); + } + } } } @@ -5403,124 +5499,124 @@ impl SseEncode for Option { } } -impl SseEncode for Option { +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); + ::sse_encode(value, serializer); } } } -impl SseEncode for Option { +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); + ::sse_encode(value, serializer); } } } -impl SseEncode for Option { +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); + ::sse_encode(value, serializer); } } } -impl SseEncode for Option { +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); + ::sse_encode(value, serializer); } } } -impl SseEncode for Option { +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); + ::sse_encode(value, serializer); } } } -impl SseEncode for Option { +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); + ::sse_encode(value, serializer); } } } -impl SseEncode for Option { +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); + ::sse_encode(value, serializer); } } } -impl SseEncode for Option<(crate::api::types::OutPoint, crate::api::types::Input, usize)> { +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 { - <(crate::api::types::OutPoint, crate::api::types::Input, usize)>::sse_encode( - value, serializer, - ); + ::sse_encode(value, serializer); } } } -impl SseEncode for Option { +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); + ::sse_encode(value, serializer); } } } -impl SseEncode for Option { +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 { - ::sse_encode(value, serializer); + <(crate::api::types::OutPoint, crate::api::types::Input, usize)>::sse_encode( + value, serializer, + ); } } } -impl SseEncode for Option { +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); + ::sse_encode(value, serializer); } } } -impl SseEncode for Option { +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); + ::sse_encode(value, serializer); } } } @@ -5584,13 +5680,6 @@ impl SseEncode for crate::api::types::Payload { } } -impl SseEncode for crate::api::psbt::PsbtBase { - // 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::PsbtSigHashType { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { @@ -5613,28 +5702,36 @@ impl SseEncode for crate::api::types::RbfValue { } } -impl SseEncode for (crate::api::types::OutPoint, crate::api::types::Input, usize) { +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); - ::sse_encode(self.2, serializer); + ::sse_encode(self.0, serializer); + ::sse_encode(self.1, serializer); } } impl SseEncode for ( - crate::api::psbt::PsbtBase, + 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.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 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) { @@ -5659,18 +5756,11 @@ impl SseEncode for crate::api::blockchain::RpcSyncParams { 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.script, serializer); ::sse_encode(self.amount, serializer); } } -impl SseEncode for crate::api::types::ScriptBufBase { - // 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::SignOptions { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { @@ -5700,17 +5790,10 @@ impl SseEncode for crate::api::types::SqliteDbConfiguration { } } -impl SseEncode for crate::api::types::TransactionBase { - // 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::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.transaction, serializer); ::sse_encode(self.txid, serializer); ::sse_encode(self.received, serializer); ::sse_encode(self.sent, serializer); @@ -5723,7 +5806,7 @@ 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.script_sig, serializer); ::sse_encode(self.sequence, serializer); >>::sse_encode(self.witness, serializer); } @@ -5733,7 +5816,7 @@ 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); + ::sse_encode(self.script_pubkey, serializer); } } @@ -5802,13 +5885,6 @@ impl SseEncode for crate::api::types::Variant { } } -impl SseEncode for crate::api::wallet::WalletBase { - // 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::WitnessVersion { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { diff --git a/rust/src/frb_generated.web.rs b/rust/src/frb_generated.web.rs index d266db82..464492b5 100644 --- a/rust/src/frb_generated.web.rs +++ b/rust/src/frb_generated.web.rs @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.28. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31. // Section: imports @@ -28,25 +28,6 @@ impl CstDecode for String { self } } -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::AddressBase { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::types::AddressBase { - ptr: self_.get(0).cst_decode(), - } - } -} impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { @@ -104,26 +85,6 @@ impl CstDecode } } } -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::AddressInfo { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 2, - "Expected 2 elements, got {}", - self_.length() - ); - crate::api::types::AddressInfo { - index: self_.get(0).cst_decode(), - address: self_.get(1).cst_decode(), - } - } -} impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { @@ -167,6 +128,121 @@ impl CstDecode } } } +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::BdkAddress { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::api::types::BdkAddress { + ptr: self_.get(0).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::blockchain::BdkBlockchain { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::api::blockchain::BdkBlockchain { + ptr: self_.get(0).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::key::BdkDerivationPath { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::api::key::BdkDerivationPath { + ptr: self_.get(0).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::descriptor::BdkDescriptor { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 2, + "Expected 2 elements, got {}", + self_.length() + ); + crate::api::descriptor::BdkDescriptor { + extended_descriptor: self_.get(0).cst_decode(), + key_map: self_.get(1).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::key::BdkDescriptorPublicKey { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::api::key::BdkDescriptorPublicKey { + ptr: self_.get(0).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::key::BdkDescriptorSecretKey { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::api::key::BdkDescriptorSecretKey { + ptr: self_.get(0).cst_decode(), + } + } +} impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { @@ -230,35 +306,56 @@ impl CstDecode 40 => crate::api::error::BdkError::Sled(self_.get(1).cst_decode()), 41 => crate::api::error::BdkError::Rpc(self_.get(1).cst_decode()), 42 => crate::api::error::BdkError::Rusqlite(self_.get(1).cst_decode()), + 43 => crate::api::error::BdkError::InvalidInput(self_.get(1).cst_decode()), + 44 => crate::api::error::BdkError::InvalidLockTime(self_.get(1).cst_decode()), + 45 => crate::api::error::BdkError::InvalidTransaction(self_.get(1).cst_decode()), _ => unreachable!(), } } } -impl CstDecode +impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::BlockTime { + fn cst_decode(self) -> crate::api::key::BdkMnemonic { let self_ = self .dyn_into::() .unwrap(); assert_eq!( self_.length(), - 2, - "Expected 2 elements, got {}", + 1, + "Expected 1 elements, got {}", self_.length() ); - crate::api::types::BlockTime { - height: self_.get(0).cst_decode(), - timestamp: self_.get(1).cst_decode(), + crate::api::key::BdkMnemonic { + ptr: self_.get(0).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::psbt::BdkPsbt { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::api::psbt::BdkPsbt { + ptr: self_.get(0).cst_decode(), } } } -impl CstDecode +impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::blockchain::BlockchainBase { + fn cst_decode(self) -> crate::api::types::BdkScriptBuf { let self_ = self .dyn_into::() .unwrap(); @@ -268,11 +365,69 @@ impl CstDecode "Expected 1 elements, got {}", self_.length() ); - crate::api::blockchain::BlockchainBase { + crate::api::types::BdkScriptBuf { + bytes: self_.get(0).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::BdkTransaction { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::api::types::BdkTransaction { + inner: self_.get(0).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::wallet::BdkWallet { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::api::wallet::BdkWallet { ptr: self_.get(0).cst_decode(), } } } +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::BlockTime { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 2, + "Expected 2 elements, got {}", + self_.length() + ); + crate::api::types::BlockTime { + height: self_.get(0).cst_decode(), + timestamp: self_.get(1).cst_decode(), + } + } +} impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { @@ -336,45 +491,6 @@ impl CstDecode } } } -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::key::DerivationPathBase { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::key::DerivationPathBase { - ptr: self_.get(0).cst_decode(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::descriptor::DescriptorBase { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 2, - "Expected 2 elements, got {}", - self_.length() - ); - crate::api::descriptor::DescriptorBase { - extended_descriptor: self_.get(0).cst_decode(), - key_map: self_.get(1).cst_decode(), - } - } -} impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { @@ -400,44 +516,6 @@ impl CstDecode } } } -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::key::DescriptorPublicKeyBase { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::key::DescriptorPublicKeyBase { - ptr: self_.get(0).cst_decode(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::key::DescriptorSecretKeyBase { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::key::DescriptorSecretKeyBase { - ptr: self_.get(0).cst_decode(), - } - } -} impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { @@ -650,22 +728,16 @@ impl CstDecode } } } -impl CstDecode +impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::key::MnemonicBase { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::key::MnemonicBase { - ptr: self_.get(0).cst_decode(), + fn cst_decode(self) -> crate::api::types::LockTime { + let self_ = self.unchecked_into::(); + match self_.get(0).unchecked_into_f64() as _ { + 0 => crate::api::types::LockTime::Blocks(self_.get(1).cst_decode()), + 1 => crate::api::types::LockTime::Seconds(self_.get(1).cst_decode()), + _ => unreachable!(), } } } @@ -716,25 +788,6 @@ impl CstDecode } } } -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::psbt::PsbtBase { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::psbt::PsbtBase { - ptr: self_.get(0).cst_decode(), - } - } -} impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { @@ -767,30 +820,26 @@ impl CstDecode } } } -impl CstDecode<(crate::api::types::OutPoint, crate::api::types::Input, usize)> +impl CstDecode<(crate::api::types::BdkAddress, u32)> for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> (crate::api::types::OutPoint, crate::api::types::Input, usize) { + fn cst_decode(self) -> (crate::api::types::BdkAddress, u32) { let self_ = self .dyn_into::() .unwrap(); assert_eq!( self_.length(), - 3, - "Expected 3 elements, got {}", + 2, + "Expected 2 elements, got {}", self_.length() ); - ( - self_.get(0).cst_decode(), - self_.get(1).cst_decode(), - self_.get(2).cst_decode(), - ) + (self_.get(0).cst_decode(), self_.get(1).cst_decode()) } } impl CstDecode<( - crate::api::psbt::PsbtBase, + crate::api::psbt::BdkPsbt, crate::api::types::TransactionDetails, )> for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { @@ -798,7 +847,7 @@ impl fn cst_decode( self, ) -> ( - crate::api::psbt::PsbtBase, + crate::api::psbt::BdkPsbt, crate::api::types::TransactionDetails, ) { let self_ = self @@ -813,6 +862,27 @@ impl (self_.get(0).cst_decode(), self_.get(1).cst_decode()) } } +impl CstDecode<(crate::api::types::OutPoint, crate::api::types::Input, usize)> + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // 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 self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 3, + "Expected 3 elements, got {}", + self_.length() + ); + ( + self_.get(0).cst_decode(), + self_.get(1).cst_decode(), + self_.get(2).cst_decode(), + ) + } +} impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { @@ -878,25 +948,6 @@ impl CstDecode } } } -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::ScriptBufBase { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::types::ScriptBufBase { - bytes: self_.get(0).cst_decode(), - } - } -} impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { @@ -962,25 +1013,6 @@ impl CstDecode } } } -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::TransactionBase { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::types::TransactionBase { - inner: self_.get(0).cst_decode(), - } - } -} impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { @@ -1054,25 +1086,6 @@ impl CstDecode<[u8; 4]> for Box<[u8]> { flutter_rust_bridge::for_generated::from_vec_to_array(vec) } } -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::wallet::WalletBase { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::wallet::WalletBase { - ptr: self_.get(0).cst_decode(), - } - } -} impl CstDecode> for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { @@ -1310,100 +1323,100 @@ impl CstDecode } #[wasm_bindgen] -pub fn wire_BlockchainBase_broadcast( +pub fn wire_bdk_blockchain_broadcast( port_: flutter_rust_bridge::for_generated::MessagePort, that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, transaction: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_BlockchainBase_broadcast_impl(port_, that, transaction) + wire_bdk_blockchain_broadcast_impl(port_, that, transaction) } #[wasm_bindgen] -pub fn wire_BlockchainBase_estimate_fee( +pub fn wire_bdk_blockchain_estimate_fee( port_: flutter_rust_bridge::for_generated::MessagePort, that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, target: u64, ) { - wire_BlockchainBase_estimate_fee_impl(port_, that, target) + wire_bdk_blockchain_estimate_fee_impl(port_, that, target) } #[wasm_bindgen] -pub fn wire_BlockchainBase_get_block_hash( +pub fn wire_bdk_blockchain_get_block_hash( port_: flutter_rust_bridge::for_generated::MessagePort, that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, height: u32, ) { - wire_BlockchainBase_get_block_hash_impl(port_, that, height) + wire_bdk_blockchain_get_block_hash_impl(port_, that, height) } #[wasm_bindgen] -pub fn wire_BlockchainBase_get_height( +pub fn wire_bdk_blockchain_get_height( port_: flutter_rust_bridge::for_generated::MessagePort, that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_BlockchainBase_get_height_impl(port_, that) + wire_bdk_blockchain_get_height_impl(port_, that) } #[wasm_bindgen] -pub fn wire_BlockchainBase_new( +pub fn wire_bdk_blockchain_new( port_: flutter_rust_bridge::for_generated::MessagePort, blockchain_config: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_BlockchainBase_new_impl(port_, blockchain_config) + wire_bdk_blockchain_new_impl(port_, blockchain_config) } #[wasm_bindgen] -pub fn wire_DescriptorBase_as_string( +pub fn wire_bdk_descriptor_as_string( port_: flutter_rust_bridge::for_generated::MessagePort, that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_DescriptorBase_as_string_impl(port_, that) + wire_bdk_descriptor_as_string_impl(port_, that) } #[wasm_bindgen] -pub fn wire_DescriptorBase_as_string_private( +pub fn wire_bdk_descriptor_as_string_private( port_: flutter_rust_bridge::for_generated::MessagePort, that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_DescriptorBase_as_string_private_impl(port_, that) + wire_bdk_descriptor_as_string_private_impl(port_, that) } #[wasm_bindgen] -pub fn wire_DescriptorBase_max_satisfaction_weight( +pub fn wire_bdk_descriptor_max_satisfaction_weight( port_: flutter_rust_bridge::for_generated::MessagePort, that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_DescriptorBase_max_satisfaction_weight_impl(port_, that) + wire_bdk_descriptor_max_satisfaction_weight_impl(port_, that) } #[wasm_bindgen] -pub fn wire_DescriptorBase_new( +pub fn wire_bdk_descriptor_new( port_: flutter_rust_bridge::for_generated::MessagePort, descriptor: String, network: i32, ) { - wire_DescriptorBase_new_impl(port_, descriptor, network) + wire_bdk_descriptor_new_impl(port_, descriptor, network) } #[wasm_bindgen] -pub fn wire_DescriptorBase_new_bip44( +pub fn wire_bdk_descriptor_new_bip44( port_: flutter_rust_bridge::for_generated::MessagePort, secret_key: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, keychain_kind: i32, network: i32, ) { - wire_DescriptorBase_new_bip44_impl(port_, secret_key, keychain_kind, network) + wire_bdk_descriptor_new_bip44_impl(port_, secret_key, keychain_kind, network) } #[wasm_bindgen] -pub fn wire_DescriptorBase_new_bip44_public( +pub fn wire_bdk_descriptor_new_bip44_public( port_: flutter_rust_bridge::for_generated::MessagePort, public_key: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, fingerprint: String, keychain_kind: i32, network: i32, ) { - wire_DescriptorBase_new_bip44_public_impl( + wire_bdk_descriptor_new_bip44_public_impl( port_, public_key, fingerprint, @@ -1413,24 +1426,24 @@ pub fn wire_DescriptorBase_new_bip44_public( } #[wasm_bindgen] -pub fn wire_DescriptorBase_new_bip49( +pub fn wire_bdk_descriptor_new_bip49( port_: flutter_rust_bridge::for_generated::MessagePort, secret_key: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, keychain_kind: i32, network: i32, ) { - wire_DescriptorBase_new_bip49_impl(port_, secret_key, keychain_kind, network) + wire_bdk_descriptor_new_bip49_impl(port_, secret_key, keychain_kind, network) } #[wasm_bindgen] -pub fn wire_DescriptorBase_new_bip49_public( +pub fn wire_bdk_descriptor_new_bip49_public( port_: flutter_rust_bridge::for_generated::MessagePort, public_key: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, fingerprint: String, keychain_kind: i32, network: i32, ) { - wire_DescriptorBase_new_bip49_public_impl( + wire_bdk_descriptor_new_bip49_public_impl( port_, public_key, fingerprint, @@ -1440,24 +1453,24 @@ pub fn wire_DescriptorBase_new_bip49_public( } #[wasm_bindgen] -pub fn wire_DescriptorBase_new_bip84( +pub fn wire_bdk_descriptor_new_bip84( port_: flutter_rust_bridge::for_generated::MessagePort, secret_key: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, keychain_kind: i32, network: i32, ) { - wire_DescriptorBase_new_bip84_impl(port_, secret_key, keychain_kind, network) + wire_bdk_descriptor_new_bip84_impl(port_, secret_key, keychain_kind, network) } #[wasm_bindgen] -pub fn wire_DescriptorBase_new_bip84_public( +pub fn wire_bdk_descriptor_new_bip84_public( port_: flutter_rust_bridge::for_generated::MessagePort, public_key: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, fingerprint: String, keychain_kind: i32, network: i32, ) { - wire_DescriptorBase_new_bip84_public_impl( + wire_bdk_descriptor_new_bip84_public_impl( port_, public_key, fingerprint, @@ -1467,24 +1480,24 @@ pub fn wire_DescriptorBase_new_bip84_public( } #[wasm_bindgen] -pub fn wire_DescriptorBase_new_bip86( +pub fn wire_bdk_descriptor_new_bip86( port_: flutter_rust_bridge::for_generated::MessagePort, secret_key: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, keychain_kind: i32, network: i32, ) { - wire_DescriptorBase_new_bip86_impl(port_, secret_key, keychain_kind, network) + wire_bdk_descriptor_new_bip86_impl(port_, secret_key, keychain_kind, network) } #[wasm_bindgen] -pub fn wire_DescriptorBase_new_bip86_public( +pub fn wire_bdk_descriptor_new_bip86_public( port_: flutter_rust_bridge::for_generated::MessagePort, public_key: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, fingerprint: String, keychain_kind: i32, network: i32, ) { - wire_DescriptorBase_new_bip86_public_impl( + wire_bdk_descriptor_new_bip86_public_impl( port_, public_key, fingerprint, @@ -1494,485 +1507,496 @@ pub fn wire_DescriptorBase_new_bip86_public( } #[wasm_bindgen] -pub fn wire_DerivationPathBase_from_string( +pub fn wire_bdk_derivation_path_from_string( port_: flutter_rust_bridge::for_generated::MessagePort, path: String, ) { - wire_DerivationPathBase_from_string_impl(port_, path) + wire_bdk_derivation_path_from_string_impl(port_, path) } #[wasm_bindgen] -pub fn wire_DescriptorPublicKeyBase_as_string( +pub fn wire_bdk_descriptor_public_key_as_string( port_: flutter_rust_bridge::for_generated::MessagePort, that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_DescriptorPublicKeyBase_as_string_impl(port_, that) + wire_bdk_descriptor_public_key_as_string_impl(port_, that) } #[wasm_bindgen] -pub fn wire_DescriptorPublicKeyBase_derive( +pub fn wire_bdk_descriptor_public_key_derive( port_: flutter_rust_bridge::for_generated::MessagePort, ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, path: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_DescriptorPublicKeyBase_derive_impl(port_, ptr, path) + wire_bdk_descriptor_public_key_derive_impl(port_, ptr, path) } #[wasm_bindgen] -pub fn wire_DescriptorPublicKeyBase_extend( +pub fn wire_bdk_descriptor_public_key_extend( port_: flutter_rust_bridge::for_generated::MessagePort, ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, path: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_DescriptorPublicKeyBase_extend_impl(port_, ptr, path) + wire_bdk_descriptor_public_key_extend_impl(port_, ptr, path) } #[wasm_bindgen] -pub fn wire_DescriptorPublicKeyBase_from_string( +pub fn wire_bdk_descriptor_public_key_from_string( port_: flutter_rust_bridge::for_generated::MessagePort, public_key: String, ) { - wire_DescriptorPublicKeyBase_from_string_impl(port_, public_key) + wire_bdk_descriptor_public_key_from_string_impl(port_, public_key) } #[wasm_bindgen] -pub fn wire_DescriptorSecretKeyBase_as_public( +pub fn wire_bdk_descriptor_secret_key_as_public( port_: flutter_rust_bridge::for_generated::MessagePort, ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_DescriptorSecretKeyBase_as_public_impl(port_, ptr) + wire_bdk_descriptor_secret_key_as_public_impl(port_, ptr) } #[wasm_bindgen] -pub fn wire_DescriptorSecretKeyBase_as_string( +pub fn wire_bdk_descriptor_secret_key_as_string( port_: flutter_rust_bridge::for_generated::MessagePort, that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_DescriptorSecretKeyBase_as_string_impl(port_, that) + wire_bdk_descriptor_secret_key_as_string_impl(port_, that) } #[wasm_bindgen] -pub fn wire_DescriptorSecretKeyBase_create( +pub fn wire_bdk_descriptor_secret_key_create( port_: flutter_rust_bridge::for_generated::MessagePort, network: i32, mnemonic: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, password: Option, ) { - wire_DescriptorSecretKeyBase_create_impl(port_, network, mnemonic, password) + wire_bdk_descriptor_secret_key_create_impl(port_, network, mnemonic, password) } #[wasm_bindgen] -pub fn wire_DescriptorSecretKeyBase_derive( +pub fn wire_bdk_descriptor_secret_key_derive( port_: flutter_rust_bridge::for_generated::MessagePort, ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, path: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_DescriptorSecretKeyBase_derive_impl(port_, ptr, path) + wire_bdk_descriptor_secret_key_derive_impl(port_, ptr, path) } #[wasm_bindgen] -pub fn wire_DescriptorSecretKeyBase_extend( +pub fn wire_bdk_descriptor_secret_key_extend( port_: flutter_rust_bridge::for_generated::MessagePort, ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, path: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_DescriptorSecretKeyBase_extend_impl(port_, ptr, path) + wire_bdk_descriptor_secret_key_extend_impl(port_, ptr, path) } #[wasm_bindgen] -pub fn wire_DescriptorSecretKeyBase_from_string( +pub fn wire_bdk_descriptor_secret_key_from_string( port_: flutter_rust_bridge::for_generated::MessagePort, secret_key: String, ) { - wire_DescriptorSecretKeyBase_from_string_impl(port_, secret_key) + wire_bdk_descriptor_secret_key_from_string_impl(port_, secret_key) } #[wasm_bindgen] -pub fn wire_DescriptorSecretKeyBase_secret_bytes( +pub fn wire_bdk_descriptor_secret_key_secret_bytes( port_: flutter_rust_bridge::for_generated::MessagePort, that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_DescriptorSecretKeyBase_secret_bytes_impl(port_, that) + wire_bdk_descriptor_secret_key_secret_bytes_impl(port_, that) } #[wasm_bindgen] -pub fn wire_MnemonicBase_as_string( +pub fn wire_bdk_mnemonic_as_string( port_: flutter_rust_bridge::for_generated::MessagePort, that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_MnemonicBase_as_string_impl(port_, that) + wire_bdk_mnemonic_as_string_impl(port_, that) } #[wasm_bindgen] -pub fn wire_MnemonicBase_from_entropy( +pub fn wire_bdk_mnemonic_from_entropy( port_: flutter_rust_bridge::for_generated::MessagePort, entropy: Box<[u8]>, ) { - wire_MnemonicBase_from_entropy_impl(port_, entropy) + wire_bdk_mnemonic_from_entropy_impl(port_, entropy) } #[wasm_bindgen] -pub fn wire_MnemonicBase_from_string( +pub fn wire_bdk_mnemonic_from_string( port_: flutter_rust_bridge::for_generated::MessagePort, mnemonic: String, ) { - wire_MnemonicBase_from_string_impl(port_, mnemonic) + wire_bdk_mnemonic_from_string_impl(port_, mnemonic) } #[wasm_bindgen] -pub fn wire_MnemonicBase_new( +pub fn wire_bdk_mnemonic_new( port_: flutter_rust_bridge::for_generated::MessagePort, word_count: i32, ) { - wire_MnemonicBase_new_impl(port_, word_count) + wire_bdk_mnemonic_new_impl(port_, word_count) } #[wasm_bindgen] -pub fn wire_PsbtBase_combine( +pub fn wire_bdk_psbt_combine( port_: flutter_rust_bridge::for_generated::MessagePort, ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, other: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_PsbtBase_combine_impl(port_, ptr, other) + wire_bdk_psbt_combine_impl(port_, ptr, other) } #[wasm_bindgen] -pub fn wire_PsbtBase_extract_tx( +pub fn wire_bdk_psbt_extract_tx( port_: flutter_rust_bridge::for_generated::MessagePort, ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_PsbtBase_extract_tx_impl(port_, ptr) + wire_bdk_psbt_extract_tx_impl(port_, ptr) } #[wasm_bindgen] -pub fn wire_PsbtBase_fee_amount( +pub fn wire_bdk_psbt_fee_amount( port_: flutter_rust_bridge::for_generated::MessagePort, that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_PsbtBase_fee_amount_impl(port_, that) + wire_bdk_psbt_fee_amount_impl(port_, that) } #[wasm_bindgen] -pub fn wire_PsbtBase_fee_rate( +pub fn wire_bdk_psbt_fee_rate( port_: flutter_rust_bridge::for_generated::MessagePort, that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_PsbtBase_fee_rate_impl(port_, that) + wire_bdk_psbt_fee_rate_impl(port_, that) } #[wasm_bindgen] -pub fn wire_PsbtBase_from_str( +pub fn wire_bdk_psbt_from_str( port_: flutter_rust_bridge::for_generated::MessagePort, psbt_base64: String, ) { - wire_PsbtBase_from_str_impl(port_, psbt_base64) + wire_bdk_psbt_from_str_impl(port_, psbt_base64) } #[wasm_bindgen] -pub fn wire_PsbtBase_json_serialize( +pub fn wire_bdk_psbt_json_serialize( port_: flutter_rust_bridge::for_generated::MessagePort, that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_PsbtBase_json_serialize_impl(port_, that) + wire_bdk_psbt_json_serialize_impl(port_, that) } #[wasm_bindgen] -pub fn wire_PsbtBase_serialize( +pub fn wire_bdk_psbt_serialize( port_: flutter_rust_bridge::for_generated::MessagePort, that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_PsbtBase_serialize_impl(port_, that) + wire_bdk_psbt_serialize_impl(port_, that) } #[wasm_bindgen] -pub fn wire_PsbtBase_txid( +pub fn wire_bdk_psbt_txid( port_: flutter_rust_bridge::for_generated::MessagePort, that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_PsbtBase_txid_impl(port_, that) + wire_bdk_psbt_txid_impl(port_, that) } #[wasm_bindgen] -pub fn wire_AddressBase_as_string( +pub fn wire_bdk_address_as_string( port_: flutter_rust_bridge::for_generated::MessagePort, that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_AddressBase_as_string_impl(port_, that) + wire_bdk_address_as_string_impl(port_, that) } #[wasm_bindgen] -pub fn wire_AddressBase_from_script( +pub fn wire_bdk_address_from_script( port_: flutter_rust_bridge::for_generated::MessagePort, script: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, network: i32, ) { - wire_AddressBase_from_script_impl(port_, script, network) + wire_bdk_address_from_script_impl(port_, script, network) } #[wasm_bindgen] -pub fn wire_AddressBase_from_string( +pub fn wire_bdk_address_from_string( port_: flutter_rust_bridge::for_generated::MessagePort, address: String, network: i32, ) { - wire_AddressBase_from_string_impl(port_, address, network) + wire_bdk_address_from_string_impl(port_, address, network) } #[wasm_bindgen] -pub fn wire_AddressBase_is_valid_for_network( +pub fn wire_bdk_address_is_valid_for_network( port_: flutter_rust_bridge::for_generated::MessagePort, that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, network: i32, ) { - wire_AddressBase_is_valid_for_network_impl(port_, that, network) + wire_bdk_address_is_valid_for_network_impl(port_, that, network) } #[wasm_bindgen] -pub fn wire_AddressBase_network( +pub fn wire_bdk_address_network( port_: flutter_rust_bridge::for_generated::MessagePort, that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_AddressBase_network_impl(port_, that) + wire_bdk_address_network_impl(port_, that) } #[wasm_bindgen] -pub fn wire_AddressBase_payload( +pub fn wire_bdk_address_payload( port_: flutter_rust_bridge::for_generated::MessagePort, that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_AddressBase_payload_impl(port_, that) + wire_bdk_address_payload_impl(port_, that) } #[wasm_bindgen] -pub fn wire_AddressBase_script( +pub fn wire_bdk_address_script( port_: flutter_rust_bridge::for_generated::MessagePort, ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_AddressBase_script_impl(port_, ptr) + wire_bdk_address_script_impl(port_, ptr) } #[wasm_bindgen] -pub fn wire_AddressBase_to_qr_uri( +pub fn wire_bdk_address_to_qr_uri( port_: flutter_rust_bridge::for_generated::MessagePort, that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_AddressBase_to_qr_uri_impl(port_, that) + wire_bdk_address_to_qr_uri_impl(port_, that) } #[wasm_bindgen] -pub fn wire_ScriptBufBase_empty(port_: flutter_rust_bridge::for_generated::MessagePort) { - wire_ScriptBufBase_empty_impl(port_) +pub fn wire_bdk_script_buf_empty(port_: flutter_rust_bridge::for_generated::MessagePort) { + wire_bdk_script_buf_empty_impl(port_) } #[wasm_bindgen] -pub fn wire_ScriptBufBase_from_hex( +pub fn wire_bdk_script_buf_from_hex( port_: flutter_rust_bridge::for_generated::MessagePort, s: String, ) { - wire_ScriptBufBase_from_hex_impl(port_, s) + wire_bdk_script_buf_from_hex_impl(port_, s) } #[wasm_bindgen] -pub fn wire_ScriptBufBase_with_capacity( +pub fn wire_bdk_script_buf_with_capacity( port_: flutter_rust_bridge::for_generated::MessagePort, capacity: usize, ) { - wire_ScriptBufBase_with_capacity_impl(port_, capacity) + wire_bdk_script_buf_with_capacity_impl(port_, capacity) +} + +#[wasm_bindgen] +pub fn wire_bdk_transaction_from_bytes( + port_: flutter_rust_bridge::for_generated::MessagePort, + transaction_bytes: Box<[u8]>, +) { + wire_bdk_transaction_from_bytes_impl(port_, transaction_bytes) } #[wasm_bindgen] -pub fn wire_TransactionBase_input( +pub fn wire_bdk_transaction_input( port_: flutter_rust_bridge::for_generated::MessagePort, that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_TransactionBase_input_impl(port_, that) + wire_bdk_transaction_input_impl(port_, that) } #[wasm_bindgen] -pub fn wire_TransactionBase_is_coin_base( +pub fn wire_bdk_transaction_is_coin_base( port_: flutter_rust_bridge::for_generated::MessagePort, that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_TransactionBase_is_coin_base_impl(port_, that) + wire_bdk_transaction_is_coin_base_impl(port_, that) } #[wasm_bindgen] -pub fn wire_TransactionBase_is_explicitly_rbf( +pub fn wire_bdk_transaction_is_explicitly_rbf( port_: flutter_rust_bridge::for_generated::MessagePort, that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_TransactionBase_is_explicitly_rbf_impl(port_, that) + wire_bdk_transaction_is_explicitly_rbf_impl(port_, that) } #[wasm_bindgen] -pub fn wire_TransactionBase_is_lock_time_enabled( +pub fn wire_bdk_transaction_is_lock_time_enabled( port_: flutter_rust_bridge::for_generated::MessagePort, that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_TransactionBase_is_lock_time_enabled_impl(port_, that) + wire_bdk_transaction_is_lock_time_enabled_impl(port_, that) } #[wasm_bindgen] -pub fn wire_TransactionBase_lock_time( +pub fn wire_bdk_transaction_lock_time( port_: flutter_rust_bridge::for_generated::MessagePort, that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_TransactionBase_lock_time_impl(port_, that) + wire_bdk_transaction_lock_time_impl(port_, that) } #[wasm_bindgen] -pub fn wire_TransactionBase_new( +pub fn wire_bdk_transaction_new( port_: flutter_rust_bridge::for_generated::MessagePort, - transaction_bytes: Box<[u8]>, + version: i32, + lock_time: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + input: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + output: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_TransactionBase_new_impl(port_, transaction_bytes) + wire_bdk_transaction_new_impl(port_, version, lock_time, input, output) } #[wasm_bindgen] -pub fn wire_TransactionBase_output( +pub fn wire_bdk_transaction_output( port_: flutter_rust_bridge::for_generated::MessagePort, that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_TransactionBase_output_impl(port_, that) + wire_bdk_transaction_output_impl(port_, that) } #[wasm_bindgen] -pub fn wire_TransactionBase_serialize( +pub fn wire_bdk_transaction_serialize( port_: flutter_rust_bridge::for_generated::MessagePort, that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_TransactionBase_serialize_impl(port_, that) + wire_bdk_transaction_serialize_impl(port_, that) } #[wasm_bindgen] -pub fn wire_TransactionBase_size( +pub fn wire_bdk_transaction_size( port_: flutter_rust_bridge::for_generated::MessagePort, that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_TransactionBase_size_impl(port_, that) + wire_bdk_transaction_size_impl(port_, that) } #[wasm_bindgen] -pub fn wire_TransactionBase_txid( +pub fn wire_bdk_transaction_txid( port_: flutter_rust_bridge::for_generated::MessagePort, that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_TransactionBase_txid_impl(port_, that) + wire_bdk_transaction_txid_impl(port_, that) } #[wasm_bindgen] -pub fn wire_TransactionBase_version( +pub fn wire_bdk_transaction_version( port_: flutter_rust_bridge::for_generated::MessagePort, that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_TransactionBase_version_impl(port_, that) + wire_bdk_transaction_version_impl(port_, that) } #[wasm_bindgen] -pub fn wire_TransactionBase_vsize( +pub fn wire_bdk_transaction_vsize( port_: flutter_rust_bridge::for_generated::MessagePort, that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_TransactionBase_vsize_impl(port_, that) + wire_bdk_transaction_vsize_impl(port_, that) } #[wasm_bindgen] -pub fn wire_TransactionBase_weight( +pub fn wire_bdk_transaction_weight( port_: flutter_rust_bridge::for_generated::MessagePort, that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_TransactionBase_weight_impl(port_, that) + wire_bdk_transaction_weight_impl(port_, that) } #[wasm_bindgen] -pub fn wire_WalletBase_get_address( +pub fn wire_bdk_wallet_get_address( port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, address_index: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_WalletBase_get_address_impl(port_, that, address_index) + wire_bdk_wallet_get_address_impl(port_, ptr, address_index) } #[wasm_bindgen] -pub fn wire_WalletBase_get_balance( +pub fn wire_bdk_wallet_get_balance( port_: flutter_rust_bridge::for_generated::MessagePort, that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_WalletBase_get_balance_impl(port_, that) + wire_bdk_wallet_get_balance_impl(port_, that) } #[wasm_bindgen] -pub fn wire_WalletBase_get_descriptor_for_keychain( +pub fn wire_bdk_wallet_get_descriptor_for_keychain( port_: flutter_rust_bridge::for_generated::MessagePort, ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, keychain: i32, ) { - wire_WalletBase_get_descriptor_for_keychain_impl(port_, ptr, keychain) + wire_bdk_wallet_get_descriptor_for_keychain_impl(port_, ptr, keychain) } #[wasm_bindgen] -pub fn wire_WalletBase_get_internal_address( +pub fn wire_bdk_wallet_get_internal_address( port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, address_index: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_WalletBase_get_internal_address_impl(port_, that, address_index) + wire_bdk_wallet_get_internal_address_impl(port_, ptr, address_index) } #[wasm_bindgen] -pub fn wire_WalletBase_get_psbt_input( +pub fn wire_bdk_wallet_get_psbt_input( port_: flutter_rust_bridge::for_generated::MessagePort, that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, utxo: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, only_witness_utxo: bool, sighash_type: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_WalletBase_get_psbt_input_impl(port_, that, utxo, only_witness_utxo, sighash_type) + wire_bdk_wallet_get_psbt_input_impl(port_, that, utxo, only_witness_utxo, sighash_type) } #[wasm_bindgen] -pub fn wire_WalletBase_is_mine( +pub fn wire_bdk_wallet_is_mine( port_: flutter_rust_bridge::for_generated::MessagePort, that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, script: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_WalletBase_is_mine_impl(port_, that, script) + wire_bdk_wallet_is_mine_impl(port_, that, script) } #[wasm_bindgen] -pub fn wire_WalletBase_list_transactions( +pub fn wire_bdk_wallet_list_transactions( port_: flutter_rust_bridge::for_generated::MessagePort, that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, include_raw: bool, ) { - wire_WalletBase_list_transactions_impl(port_, that, include_raw) + wire_bdk_wallet_list_transactions_impl(port_, that, include_raw) } #[wasm_bindgen] -pub fn wire_WalletBase_list_unspent( +pub fn wire_bdk_wallet_list_unspent( port_: flutter_rust_bridge::for_generated::MessagePort, that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_WalletBase_list_unspent_impl(port_, that) + wire_bdk_wallet_list_unspent_impl(port_, that) } #[wasm_bindgen] -pub fn wire_WalletBase_network( +pub fn wire_bdk_wallet_network( port_: flutter_rust_bridge::for_generated::MessagePort, that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_WalletBase_network_impl(port_, that) + wire_bdk_wallet_network_impl(port_, that) } #[wasm_bindgen] -pub fn wire_WalletBase_new( +pub fn wire_bdk_wallet_new( port_: flutter_rust_bridge::for_generated::MessagePort, descriptor: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, change_descriptor: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, network: i32, database_config: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_WalletBase_new_impl( + wire_bdk_wallet_new_impl( port_, descriptor, change_descriptor, @@ -1982,22 +2006,22 @@ pub fn wire_WalletBase_new( } #[wasm_bindgen] -pub fn wire_WalletBase_sign( +pub fn wire_bdk_wallet_sign( port_: flutter_rust_bridge::for_generated::MessagePort, ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, psbt: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, sign_options: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_WalletBase_sign_impl(port_, ptr, psbt, sign_options) + wire_bdk_wallet_sign_impl(port_, ptr, psbt, sign_options) } #[wasm_bindgen] -pub fn wire_WalletBase_sync( +pub fn wire_bdk_wallet_sync( port_: flutter_rust_bridge::for_generated::MessagePort, ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, blockchain: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, ) { - wire_WalletBase_sync_impl(port_, ptr, blockchain) + wire_bdk_wallet_sync_impl(port_, ptr, blockchain) } #[wasm_bindgen] From 6312fe5d54b584ba19035c1be44b815f1f981d92 Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Sun, 31 Mar 2024 19:11:00 -0400 Subject: [PATCH 08/27] mock tests updated --- test/bdk_flutter_test.dart | 21 +- test/bdk_flutter_test.mocks.dart | 404 ++++++++++++++++--------------- 2 files changed, 211 insertions(+), 214 deletions(-) diff --git a/test/bdk_flutter_test.dart b/test/bdk_flutter_test.dart index a88de95c..82fe0832 100644 --- a/test/bdk_flutter_test.dart +++ b/test/bdk_flutter_test.dart @@ -61,26 +61,7 @@ void main() { await mockWallet.getAddress(addressIndex: AddressIndex.increase()); expect(res, isA()); }); - test('Should return a new AddressInfo', () async { - when(mockWallet.getAddress(addressIndex: AddressIndex.increase())) - .thenAnswer((e) async => AddressInfo( - index: 82, - address: "tb1qzn0qsh9wdp0m7sx877p9u8kptnvmykm9ld5lyd")); - final res = - await mockWallet.getAddress(addressIndex: AddressIndex.increase()); - expect(res.index, 82); - expect(res.address, "tb1qzn0qsh9wdp0m7sx877p9u8kptnvmykm9ld5lyd"); - }); - test('Should return a last unused AddressInfo', () async { - when(mockWallet.getAddress(addressIndex: AddressIndex.lastUnused())) - .thenAnswer((e) async => AddressInfo( - index: 82, - address: "tb1qzn0qsh9wdp0m7sx877p9u8kptnvmykm9ld5lyd")); - final res = - await mockWallet.getAddress(addressIndex: AddressIndex.lastUnused()); - expect(res.index, 82); - expect(res.address, "tb1qzn0qsh9wdp0m7sx877p9u8kptnvmykm9ld5lyd"); - }); + test('Should return valid Balance object', () async { final res = await mockWallet.getBalance(); expect(res, isA()); diff --git a/test/bdk_flutter_test.mocks.dart b/test/bdk_flutter_test.mocks.dart index f012f2ce..c7704028 100644 --- a/test/bdk_flutter_test.mocks.dart +++ b/test/bdk_flutter_test.mocks.dart @@ -10,9 +10,9 @@ import 'package:bdk_flutter/src/generated/api/blockchain.dart' as _i5; import 'package:bdk_flutter/src/generated/api/descriptor.dart' as _i6; import 'package:bdk_flutter/src/generated/api/key.dart' as _i8; import 'package:bdk_flutter/src/generated/api/psbt.dart' as _i7; -import 'package:bdk_flutter/src/generated/api/types.dart' as _i3; +import 'package:bdk_flutter/src/generated/api/types.dart' as _i4; import 'package:bdk_flutter/src/generated/api/wallet.dart' as _i2; -import 'package:bdk_flutter/src/root.dart' as _i4; +import 'package:bdk_flutter/src/root.dart' as _i3; import 'package:mockito/mockito.dart' as _i1; import 'package:mockito/src/dummies.dart' as _i10; @@ -50,7 +50,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, @@ -60,7 +60,7 @@ class _FakeBalance_2 extends _i1.SmartFake implements _i3.Balance { ); } -class _FakeDescriptor_3 extends _i1.SmartFake implements _i4.Descriptor { +class _FakeDescriptor_3 extends _i1.SmartFake implements _i3.Descriptor { _FakeDescriptor_3( Object parent, Invocation parentInvocation, @@ -70,7 +70,7 @@ class _FakeDescriptor_3 extends _i1.SmartFake implements _i4.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, @@ -90,7 +90,7 @@ class _FakeAnyBlockchain_5 extends _i1.SmartFake implements _i5.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, @@ -112,7 +112,7 @@ class _FakeKeysDescriptorSecretKey_7 extends _i1.SmartFake } class _FakeDescriptorSecretKey_8 extends _i1.SmartFake - implements _i4.DescriptorSecretKey { + implements _i3.DescriptorSecretKey { _FakeDescriptorSecretKey_8( Object parent, Invocation parentInvocation, @@ -123,7 +123,7 @@ class _FakeDescriptorSecretKey_8 extends _i1.SmartFake } class _FakeDescriptorPublicKey_9 extends _i1.SmartFake - implements _i4.DescriptorPublicKey { + implements _i3.DescriptorPublicKey { _FakeDescriptorPublicKey_9( Object parent, Invocation parentInvocation, @@ -155,7 +155,7 @@ class _FakeMutexPartiallySignedTransaction_11 extends _i1.SmartFake ); } -class _FakeTransaction_12 extends _i1.SmartFake implements _i4.Transaction { +class _FakeTransaction_12 extends _i1.SmartFake implements _i3.Transaction { _FakeTransaction_12( Object parent, Invocation parentInvocation, @@ -166,7 +166,7 @@ class _FakeTransaction_12 extends _i1.SmartFake implements _i4.Transaction { } class _FakePartiallySignedTransaction_13 extends _i1.SmartFake - implements _i4.PartiallySignedTransaction { + implements _i3.PartiallySignedTransaction { _FakePartiallySignedTransaction_13( Object parent, Invocation parentInvocation, @@ -176,7 +176,7 @@ class _FakePartiallySignedTransaction_13 extends _i1.SmartFake ); } -class _FakeTxBuilder_14 extends _i1.SmartFake implements _i4.TxBuilder { +class _FakeTxBuilder_14 extends _i1.SmartFake implements _i3.TxBuilder { _FakeTxBuilder_14( Object parent, Invocation parentInvocation, @@ -187,7 +187,7 @@ class _FakeTxBuilder_14 extends _i1.SmartFake implements _i4.TxBuilder { } class _FakeTransactionDetails_15 extends _i1.SmartFake - implements _i3.TransactionDetails { + implements _i4.TransactionDetails { _FakeTransactionDetails_15( Object parent, Invocation parentInvocation, @@ -198,7 +198,7 @@ class _FakeTransactionDetails_15 extends _i1.SmartFake } class _FakeBumpFeeTxBuilder_16 extends _i1.SmartFake - implements _i4.BumpFeeTxBuilder { + implements _i3.BumpFeeTxBuilder { _FakeBumpFeeTxBuilder_16( Object parent, Invocation parentInvocation, @@ -209,7 +209,7 @@ class _FakeBumpFeeTxBuilder_16 extends _i1.SmartFake } class _FakeBdkBitcoinAddress_17 extends _i1.SmartFake - implements _i3.BdkBitcoinAddress { + implements _i4.BdkBitcoinAddress { _FakeBdkBitcoinAddress_17( Object parent, Invocation parentInvocation, @@ -219,7 +219,7 @@ class _FakeBdkBitcoinAddress_17 extends _i1.SmartFake ); } -class _FakeScriptBuf_18 extends _i1.SmartFake implements _i4.ScriptBuf { +class _FakeScriptBuf_18 extends _i1.SmartFake implements _i3.ScriptBuf { _FakeScriptBuf_18( Object parent, Invocation parentInvocation, @@ -240,7 +240,7 @@ class _FakeBitcoinBip32DerivationPath_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, @@ -250,7 +250,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, @@ -263,7 +263,7 @@ class _FakeTxOut_21 extends _i1.SmartFake implements _i3.TxOut { /// A class which mocks [Wallet]. /// /// See the documentation for Mockito's code generation for more information. -class MockWallet extends _i1.Mock implements _i4.Wallet { +class MockWallet extends _i1.Mock implements _i3.Wallet { @override _i2.MutexBdkWalletAnyDatabase get ptr => (super.noSuchMethod( Invocation.getter(#ptr), @@ -279,7 +279,7 @@ class MockWallet extends _i1.Mock implements _i4.Wallet { @override _i9.Future<_i3.AddressInfo> getAddress({ - required _i3.AddressIndex? addressIndex, + required _i4.AddressIndex? addressIndex, dynamic hint, }) => (super.noSuchMethod( @@ -317,13 +317,13 @@ class MockWallet extends _i1.Mock implements _i4.Wallet { ) as _i9.Future<_i3.AddressInfo>); @override - _i9.Future<_i3.Balance> getBalance({dynamic hint}) => (super.noSuchMethod( + _i9.Future<_i4.Balance> getBalance({dynamic hint}) => (super.noSuchMethod( Invocation.method( #getBalance, [], {#hint: hint}, ), - returnValue: _i9.Future<_i3.Balance>.value(_FakeBalance_2( + returnValue: _i9.Future<_i4.Balance>.value(_FakeBalance_2( this, Invocation.method( #getBalance, @@ -331,7 +331,7 @@ class MockWallet extends _i1.Mock implements _i4.Wallet { {#hint: hint}, ), )), - returnValueForMissingStub: _i9.Future<_i3.Balance>.value(_FakeBalance_2( + returnValueForMissingStub: _i9.Future<_i4.Balance>.value(_FakeBalance_2( this, Invocation.method( #getBalance, @@ -339,11 +339,11 @@ class MockWallet extends _i1.Mock implements _i4.Wallet { {#hint: hint}, ), )), - ) as _i9.Future<_i3.Balance>); + ) as _i9.Future<_i4.Balance>); @override - _i9.Future<_i4.Descriptor> getDescriptorForKeychain({ - required _i3.KeychainKind? keychain, + _i9.Future<_i3.Descriptor> getDescriptorForKeychain({ + required _i4.KeychainKind? keychain, dynamic hint, }) => (super.noSuchMethod( @@ -355,7 +355,7 @@ class MockWallet extends _i1.Mock implements _i4.Wallet { #hint: hint, }, ), - returnValue: _i9.Future<_i4.Descriptor>.value(_FakeDescriptor_3( + returnValue: _i9.Future<_i3.Descriptor>.value(_FakeDescriptor_3( this, Invocation.method( #getDescriptorForKeychain, @@ -367,7 +367,7 @@ class MockWallet extends _i1.Mock implements _i4.Wallet { ), )), returnValueForMissingStub: - _i9.Future<_i4.Descriptor>.value(_FakeDescriptor_3( + _i9.Future<_i3.Descriptor>.value(_FakeDescriptor_3( this, Invocation.method( #getDescriptorForKeychain, @@ -378,11 +378,11 @@ class MockWallet extends _i1.Mock implements _i4.Wallet { }, ), )), - ) as _i9.Future<_i4.Descriptor>); + ) as _i9.Future<_i3.Descriptor>); @override _i9.Future<_i3.AddressInfo> getInternalAddress({ - required _i3.AddressIndex? addressIndex, + required _i4.AddressIndex? addressIndex, dynamic hint, }) => (super.noSuchMethod( @@ -420,10 +420,10 @@ class MockWallet extends _i1.Mock implements _i4.Wallet { ) as _i9.Future<_i3.AddressInfo>); @override - _i9.Future<_i3.Input> getPsbtInput({ - required _i3.LocalUtxo? utxo, + _i9.Future<_i4.Input> getPsbtInput({ + required _i4.LocalUtxo? utxo, required bool? onlyWitnessUtxo, - _i3.PsbtSigHashType? sighashType, + _i4.PsbtSigHashType? sighashType, dynamic hint, }) => (super.noSuchMethod( @@ -437,7 +437,7 @@ class MockWallet extends _i1.Mock implements _i4.Wallet { #hint: hint, }, ), - returnValue: _i9.Future<_i3.Input>.value(_FakeInput_4( + returnValue: _i9.Future<_i4.Input>.value(_FakeInput_4( this, Invocation.method( #getPsbtInput, @@ -450,7 +450,7 @@ class MockWallet extends _i1.Mock implements _i4.Wallet { }, ), )), - returnValueForMissingStub: _i9.Future<_i3.Input>.value(_FakeInput_4( + returnValueForMissingStub: _i9.Future<_i4.Input>.value(_FakeInput_4( this, Invocation.method( #getPsbtInput, @@ -463,11 +463,11 @@ class MockWallet extends _i1.Mock implements _i4.Wallet { }, ), )), - ) as _i9.Future<_i3.Input>); + ) as _i9.Future<_i4.Input>); @override _i9.Future isMine({ - required _i3.ScriptBufBase? script, + required _i4.BdkScriptBuf? script, dynamic hint, }) => (super.noSuchMethod( @@ -484,7 +484,7 @@ class MockWallet extends _i1.Mock implements _i4.Wallet { ) as _i9.Future); @override - _i9.Future> listTransactions({ + _i9.Future> listTransactions({ required bool? includeRaw, dynamic hint, }) => @@ -497,42 +497,42 @@ class MockWallet extends _i1.Mock implements _i4.Wallet { #hint: hint, }, ), - returnValue: _i9.Future>.value( - <_i3.TransactionDetails>[]), + returnValue: _i9.Future>.value( + <_i4.TransactionDetails>[]), returnValueForMissingStub: - _i9.Future>.value( - <_i3.TransactionDetails>[]), - ) as _i9.Future>); + _i9.Future>.value( + <_i4.TransactionDetails>[]), + ) as _i9.Future>); @override - _i9.Future> listUnspent({dynamic hint}) => + _i9.Future> listUnspent({dynamic hint}) => (super.noSuchMethod( Invocation.method( #listUnspent, [], {#hint: hint}, ), - returnValue: _i9.Future>.value(<_i3.LocalUtxo>[]), + returnValue: _i9.Future>.value(<_i4.LocalUtxo>[]), returnValueForMissingStub: - _i9.Future>.value(<_i3.LocalUtxo>[]), - ) as _i9.Future>); + _i9.Future>.value(<_i4.LocalUtxo>[]), + ) as _i9.Future>); @override - _i9.Future<_i3.Network> network({dynamic hint}) => (super.noSuchMethod( + _i9.Future<_i4.Network> network({dynamic hint}) => (super.noSuchMethod( Invocation.method( #network, [], {#hint: hint}, ), - returnValue: _i9.Future<_i3.Network>.value(_i3.Network.testnet), + returnValue: _i9.Future<_i4.Network>.value(_i4.Network.testnet), returnValueForMissingStub: - _i9.Future<_i3.Network>.value(_i3.Network.testnet), - ) as _i9.Future<_i3.Network>); + _i9.Future<_i4.Network>.value(_i4.Network.testnet), + ) as _i9.Future<_i4.Network>); @override _i9.Future sign({ - required _i7.PsbtBase? psbt, - _i3.SignOptions? signOptions, + required _i3.PartiallySignedTransaction? psbt, + _i4.SignOptions? signOptions, dynamic hint, }) => (super.noSuchMethod( @@ -551,7 +551,7 @@ class MockWallet extends _i1.Mock implements _i4.Wallet { @override _i9.Future sync({ - required _i4.Blockchain? blockchain, + required _i3.Blockchain? blockchain, dynamic hint, }) => (super.noSuchMethod( @@ -571,7 +571,7 @@ class MockWallet extends _i1.Mock implements _i4.Wallet { /// A class which mocks [Transaction]. /// /// See the documentation for Mockito's code generation for more information. -class MockTransaction extends _i1.Mock implements _i4.Transaction { +class MockTransaction extends _i1.Mock implements _i3.Transaction { @override String get inner => (super.noSuchMethod( Invocation.getter(#inner), @@ -586,16 +586,16 @@ class MockTransaction extends _i1.Mock implements _i4.Transaction { ) as String); @override - _i9.Future> input({dynamic hint}) => (super.noSuchMethod( + _i9.Future> input({dynamic hint}) => (super.noSuchMethod( Invocation.method( #input, [], {#hint: hint}, ), - returnValue: _i9.Future>.value(<_i3.TxIn>[]), + returnValue: _i9.Future>.value(<_i4.TxIn>[]), returnValueForMissingStub: - _i9.Future>.value(<_i3.TxIn>[]), - ) as _i9.Future>); + _i9.Future>.value(<_i4.TxIn>[]), + ) as _i9.Future>); @override _i9.Future isCoinBase({dynamic hint}) => (super.noSuchMethod( @@ -631,27 +631,43 @@ class MockTransaction extends _i1.Mock implements _i4.Transaction { ) as _i9.Future); @override - _i9.Future lockTime({dynamic hint}) => (super.noSuchMethod( + _i9.Future<_i4.LockTime> lockTime({dynamic hint}) => (super.noSuchMethod( Invocation.method( #lockTime, [], {#hint: hint}, ), - returnValue: _i9.Future.value(0), - returnValueForMissingStub: _i9.Future.value(0), - ) as _i9.Future); + returnValue: + _i9.Future<_i4.LockTime>.value(_i10.dummyValue<_i4.LockTime>( + this, + Invocation.method( + #lockTime, + [], + {#hint: hint}, + ), + )), + returnValueForMissingStub: + _i9.Future<_i4.LockTime>.value(_i10.dummyValue<_i4.LockTime>( + this, + Invocation.method( + #lockTime, + [], + {#hint: hint}, + ), + )), + ) as _i9.Future<_i4.LockTime>); @override - _i9.Future> output({dynamic hint}) => (super.noSuchMethod( + _i9.Future> output({dynamic hint}) => (super.noSuchMethod( Invocation.method( #output, [], {#hint: hint}, ), - returnValue: _i9.Future>.value(<_i3.TxOut>[]), + returnValue: _i9.Future>.value(<_i4.TxOut>[]), returnValueForMissingStub: - _i9.Future>.value(<_i3.TxOut>[]), - ) as _i9.Future>); + _i9.Future>.value(<_i4.TxOut>[]), + ) as _i9.Future>); @override _i9.Future<_i11.Uint8List> serialize({dynamic hint}) => (super.noSuchMethod( @@ -739,7 +755,7 @@ class MockTransaction extends _i1.Mock implements _i4.Transaction { /// A class which mocks [Blockchain]. /// /// See the documentation for Mockito's code generation for more information. -class MockBlockchain extends _i1.Mock implements _i4.Blockchain { +class MockBlockchain extends _i1.Mock implements _i3.Blockchain { @override _i5.AnyBlockchain get ptr => (super.noSuchMethod( Invocation.getter(#ptr), @@ -754,7 +770,7 @@ class MockBlockchain extends _i1.Mock implements _i4.Blockchain { ) as _i5.AnyBlockchain); @override - _i9.Future<_i3.FeeRate> estimateFee({ + _i9.Future<_i4.FeeRate> estimateFee({ required int? target, dynamic hint, }) => @@ -767,7 +783,7 @@ class MockBlockchain extends _i1.Mock implements _i4.Blockchain { #hint: hint, }, ), - returnValue: _i9.Future<_i3.FeeRate>.value(_FakeFeeRate_6( + returnValue: _i9.Future<_i4.FeeRate>.value(_FakeFeeRate_6( this, Invocation.method( #estimateFee, @@ -778,7 +794,7 @@ class MockBlockchain extends _i1.Mock implements _i4.Blockchain { }, ), )), - returnValueForMissingStub: _i9.Future<_i3.FeeRate>.value(_FakeFeeRate_6( + returnValueForMissingStub: _i9.Future<_i4.FeeRate>.value(_FakeFeeRate_6( this, Invocation.method( #estimateFee, @@ -789,11 +805,11 @@ class MockBlockchain extends _i1.Mock implements _i4.Blockchain { }, ), )), - ) as _i9.Future<_i3.FeeRate>); + ) as _i9.Future<_i4.FeeRate>); @override _i9.Future broadcast({ - required _i3.TransactionBase? transaction, + required _i4.BdkTransaction? transaction, dynamic hint, }) => (super.noSuchMethod( @@ -885,7 +901,7 @@ class MockBlockchain extends _i1.Mock implements _i4.Blockchain { /// /// See the documentation for Mockito's code generation for more information. class MockDescriptorSecretKey extends _i1.Mock - implements _i4.DescriptorSecretKey { + implements _i3.DescriptorSecretKey { @override _i6.KeysDescriptorSecretKey get ptr => (super.noSuchMethod( Invocation.getter(#ptr), @@ -900,13 +916,13 @@ class MockDescriptorSecretKey extends _i1.Mock ) as _i6.KeysDescriptorSecretKey); @override - _i9.Future<_i4.DescriptorSecretKey> derive(_i8.DerivationPathBase? path) => + _i9.Future<_i3.DescriptorSecretKey> derive(_i8.BdkDerivationPath? path) => (super.noSuchMethod( Invocation.method( #derive, [path], ), - returnValue: _i9.Future<_i4.DescriptorSecretKey>.value( + returnValue: _i9.Future<_i3.DescriptorSecretKey>.value( _FakeDescriptorSecretKey_8( this, Invocation.method( @@ -914,7 +930,7 @@ class MockDescriptorSecretKey extends _i1.Mock [path], ), )), - returnValueForMissingStub: _i9.Future<_i4.DescriptorSecretKey>.value( + returnValueForMissingStub: _i9.Future<_i3.DescriptorSecretKey>.value( _FakeDescriptorSecretKey_8( this, Invocation.method( @@ -922,16 +938,16 @@ class MockDescriptorSecretKey extends _i1.Mock [path], ), )), - ) as _i9.Future<_i4.DescriptorSecretKey>); + ) as _i9.Future<_i3.DescriptorSecretKey>); @override - _i9.Future<_i4.DescriptorSecretKey> extend(_i8.DerivationPathBase? path) => + _i9.Future<_i3.DescriptorSecretKey> extend(_i8.BdkDerivationPath? path) => (super.noSuchMethod( Invocation.method( #extend, [path], ), - returnValue: _i9.Future<_i4.DescriptorSecretKey>.value( + returnValue: _i9.Future<_i3.DescriptorSecretKey>.value( _FakeDescriptorSecretKey_8( this, Invocation.method( @@ -939,7 +955,7 @@ class MockDescriptorSecretKey extends _i1.Mock [path], ), )), - returnValueForMissingStub: _i9.Future<_i4.DescriptorSecretKey>.value( + returnValueForMissingStub: _i9.Future<_i3.DescriptorSecretKey>.value( _FakeDescriptorSecretKey_8( this, Invocation.method( @@ -947,15 +963,15 @@ class MockDescriptorSecretKey extends _i1.Mock [path], ), )), - ) as _i9.Future<_i4.DescriptorSecretKey>); + ) as _i9.Future<_i3.DescriptorSecretKey>); @override - _i9.Future<_i4.DescriptorPublicKey> asPublic() => (super.noSuchMethod( + _i9.Future<_i3.DescriptorPublicKey> asPublic() => (super.noSuchMethod( Invocation.method( #asPublic, [], ), - returnValue: _i9.Future<_i4.DescriptorPublicKey>.value( + returnValue: _i9.Future<_i3.DescriptorPublicKey>.value( _FakeDescriptorPublicKey_9( this, Invocation.method( @@ -963,7 +979,7 @@ class MockDescriptorSecretKey extends _i1.Mock [], ), )), - returnValueForMissingStub: _i9.Future<_i4.DescriptorPublicKey>.value( + returnValueForMissingStub: _i9.Future<_i3.DescriptorPublicKey>.value( _FakeDescriptorPublicKey_9( this, Invocation.method( @@ -971,7 +987,7 @@ class MockDescriptorSecretKey extends _i1.Mock [], ), )), - ) as _i9.Future<_i4.DescriptorPublicKey>); + ) as _i9.Future<_i3.DescriptorPublicKey>); @override _i9.Future asString({dynamic hint}) => (super.noSuchMethod( @@ -1016,7 +1032,7 @@ class MockDescriptorSecretKey extends _i1.Mock /// /// See the documentation for Mockito's code generation for more information. class MockDescriptorPublicKey extends _i1.Mock - implements _i4.DescriptorPublicKey { + implements _i3.DescriptorPublicKey { @override _i6.KeysDescriptorPublicKey get ptr => (super.noSuchMethod( Invocation.getter(#ptr), @@ -1057,8 +1073,8 @@ class MockDescriptorPublicKey extends _i1.Mock ) as _i9.Future); @override - _i9.Future<_i4.DescriptorPublicKey> derive({ - required _i8.DerivationPathBase? path, + _i9.Future<_i3.DescriptorPublicKey> derive({ + required _i8.BdkDerivationPath? path, dynamic hint, }) => (super.noSuchMethod( @@ -1070,7 +1086,7 @@ class MockDescriptorPublicKey extends _i1.Mock #hint: hint, }, ), - returnValue: _i9.Future<_i4.DescriptorPublicKey>.value( + returnValue: _i9.Future<_i3.DescriptorPublicKey>.value( _FakeDescriptorPublicKey_9( this, Invocation.method( @@ -1082,7 +1098,7 @@ class MockDescriptorPublicKey extends _i1.Mock }, ), )), - returnValueForMissingStub: _i9.Future<_i4.DescriptorPublicKey>.value( + returnValueForMissingStub: _i9.Future<_i3.DescriptorPublicKey>.value( _FakeDescriptorPublicKey_9( this, Invocation.method( @@ -1094,11 +1110,11 @@ class MockDescriptorPublicKey extends _i1.Mock }, ), )), - ) as _i9.Future<_i4.DescriptorPublicKey>); + ) as _i9.Future<_i3.DescriptorPublicKey>); @override - _i9.Future<_i4.DescriptorPublicKey> extend({ - required _i8.DerivationPathBase? path, + _i9.Future<_i3.DescriptorPublicKey> extend({ + required _i8.BdkDerivationPath? path, dynamic hint, }) => (super.noSuchMethod( @@ -1110,7 +1126,7 @@ class MockDescriptorPublicKey extends _i1.Mock #hint: hint, }, ), - returnValue: _i9.Future<_i4.DescriptorPublicKey>.value( + returnValue: _i9.Future<_i3.DescriptorPublicKey>.value( _FakeDescriptorPublicKey_9( this, Invocation.method( @@ -1122,7 +1138,7 @@ class MockDescriptorPublicKey extends _i1.Mock }, ), )), - returnValueForMissingStub: _i9.Future<_i4.DescriptorPublicKey>.value( + returnValueForMissingStub: _i9.Future<_i3.DescriptorPublicKey>.value( _FakeDescriptorPublicKey_9( this, Invocation.method( @@ -1134,14 +1150,14 @@ class MockDescriptorPublicKey extends _i1.Mock }, ), )), - ) as _i9.Future<_i4.DescriptorPublicKey>); + ) as _i9.Future<_i3.DescriptorPublicKey>); } /// A class which mocks [PartiallySignedTransaction]. /// /// See the documentation for Mockito's code generation for more information. class MockPartiallySignedTransaction extends _i1.Mock - implements _i4.PartiallySignedTransaction { + implements _i3.PartiallySignedTransaction { @override _i7.MutexPartiallySignedTransaction get ptr => (super.noSuchMethod( Invocation.getter(#ptr), @@ -1167,15 +1183,15 @@ class MockPartiallySignedTransaction extends _i1.Mock ) as _i9.Future); @override - _i9.Future<_i3.FeeRate?> feeRate({dynamic hint}) => (super.noSuchMethod( + _i9.Future<_i4.FeeRate?> feeRate({dynamic hint}) => (super.noSuchMethod( Invocation.method( #feeRate, [], {#hint: hint}, ), - returnValue: _i9.Future<_i3.FeeRate?>.value(), - returnValueForMissingStub: _i9.Future<_i3.FeeRate?>.value(), - ) as _i9.Future<_i3.FeeRate?>); + returnValue: _i9.Future<_i4.FeeRate?>.value(), + returnValueForMissingStub: _i9.Future<_i4.FeeRate?>.value(), + ) as _i9.Future<_i4.FeeRate?>); @override _i9.Future jsonSerialize({dynamic hint}) => (super.noSuchMethod( @@ -1230,12 +1246,12 @@ class MockPartiallySignedTransaction extends _i1.Mock ) as _i9.Future); @override - _i9.Future<_i4.Transaction> extractTx() => (super.noSuchMethod( + _i9.Future<_i3.Transaction> extractTx() => (super.noSuchMethod( Invocation.method( #extractTx, [], ), - returnValue: _i9.Future<_i4.Transaction>.value(_FakeTransaction_12( + returnValue: _i9.Future<_i3.Transaction>.value(_FakeTransaction_12( this, Invocation.method( #extractTx, @@ -1243,24 +1259,24 @@ class MockPartiallySignedTransaction extends _i1.Mock ), )), returnValueForMissingStub: - _i9.Future<_i4.Transaction>.value(_FakeTransaction_12( + _i9.Future<_i3.Transaction>.value(_FakeTransaction_12( this, Invocation.method( #extractTx, [], ), )), - ) as _i9.Future<_i4.Transaction>); + ) as _i9.Future<_i3.Transaction>); @override - _i9.Future<_i4.PartiallySignedTransaction> combine( - _i4.PartiallySignedTransaction? other) => + _i9.Future<_i3.PartiallySignedTransaction> combine( + _i3.PartiallySignedTransaction? other) => (super.noSuchMethod( Invocation.method( #combine, [other], ), - returnValue: _i9.Future<_i4.PartiallySignedTransaction>.value( + returnValue: _i9.Future<_i3.PartiallySignedTransaction>.value( _FakePartiallySignedTransaction_13( this, Invocation.method( @@ -1269,7 +1285,7 @@ class MockPartiallySignedTransaction extends _i1.Mock ), )), returnValueForMissingStub: - _i9.Future<_i4.PartiallySignedTransaction>.value( + _i9.Future<_i3.PartiallySignedTransaction>.value( _FakePartiallySignedTransaction_13( this, Invocation.method( @@ -1277,7 +1293,7 @@ class MockPartiallySignedTransaction extends _i1.Mock [other], ), )), - ) as _i9.Future<_i4.PartiallySignedTransaction>); + ) as _i9.Future<_i3.PartiallySignedTransaction>); @override _i9.Future txid({dynamic hint}) => (super.noSuchMethod( @@ -1309,9 +1325,9 @@ class MockPartiallySignedTransaction extends _i1.Mock /// A class which mocks [TxBuilder]. /// /// See the documentation for Mockito's code generation for more information. -class MockTxBuilder extends _i1.Mock implements _i4.TxBuilder { +class MockTxBuilder extends _i1.Mock implements _i3.TxBuilder { @override - _i4.TxBuilder addData({required List? data}) => (super.noSuchMethod( + _i3.TxBuilder addData({required List? data}) => (super.noSuchMethod( Invocation.method( #addData, [], @@ -1333,11 +1349,11 @@ class MockTxBuilder extends _i1.Mock implements _i4.TxBuilder { {#data: data}, ), ), - ) as _i4.TxBuilder); + ) as _i3.TxBuilder); @override - _i4.TxBuilder addRecipient( - _i4.ScriptBuf? script, + _i3.TxBuilder addRecipient( + _i3.ScriptBuf? script, int? amount, ) => (super.noSuchMethod( @@ -1368,10 +1384,10 @@ class MockTxBuilder extends _i1.Mock implements _i4.TxBuilder { ], ), ), - ) as _i4.TxBuilder); + ) as _i3.TxBuilder); @override - _i4.TxBuilder unSpendable(List<_i3.OutPoint>? outpoints) => + _i3.TxBuilder unSpendable(List<_i4.OutPoint>? outpoints) => (super.noSuchMethod( Invocation.method( #unSpendable, @@ -1391,10 +1407,10 @@ class MockTxBuilder extends _i1.Mock implements _i4.TxBuilder { [outpoints], ), ), - ) as _i4.TxBuilder); + ) as _i3.TxBuilder); @override - _i4.TxBuilder addUtxo(_i3.OutPoint? outpoint) => (super.noSuchMethod( + _i3.TxBuilder addUtxo(_i4.OutPoint? outpoint) => (super.noSuchMethod( Invocation.method( #addUtxo, [outpoint], @@ -1413,10 +1429,10 @@ class MockTxBuilder extends _i1.Mock implements _i4.TxBuilder { [outpoint], ), ), - ) as _i4.TxBuilder); + ) as _i3.TxBuilder); @override - _i4.TxBuilder addUtxos(List<_i3.OutPoint>? outpoints) => (super.noSuchMethod( + _i3.TxBuilder addUtxos(List<_i4.OutPoint>? outpoints) => (super.noSuchMethod( Invocation.method( #addUtxos, [outpoints], @@ -1435,12 +1451,12 @@ class MockTxBuilder extends _i1.Mock implements _i4.TxBuilder { [outpoints], ), ), - ) as _i4.TxBuilder); + ) as _i3.TxBuilder); @override - _i4.TxBuilder addForeignUtxo( - _i3.Input? psbtInput, - _i3.OutPoint? outPoint, + _i3.TxBuilder addForeignUtxo( + _i4.Input? psbtInput, + _i4.OutPoint? outPoint, int? satisfactionWeight, ) => (super.noSuchMethod( @@ -1474,10 +1490,10 @@ class MockTxBuilder extends _i1.Mock implements _i4.TxBuilder { ], ), ), - ) as _i4.TxBuilder); + ) as _i3.TxBuilder); @override - _i4.TxBuilder doNotSpendChange() => (super.noSuchMethod( + _i3.TxBuilder doNotSpendChange() => (super.noSuchMethod( Invocation.method( #doNotSpendChange, [], @@ -1496,10 +1512,10 @@ class MockTxBuilder extends _i1.Mock implements _i4.TxBuilder { [], ), ), - ) as _i4.TxBuilder); + ) as _i3.TxBuilder); @override - _i4.TxBuilder drainWallet() => (super.noSuchMethod( + _i3.TxBuilder drainWallet() => (super.noSuchMethod( Invocation.method( #drainWallet, [], @@ -1518,10 +1534,10 @@ class MockTxBuilder extends _i1.Mock implements _i4.TxBuilder { [], ), ), - ) as _i4.TxBuilder); + ) as _i3.TxBuilder); @override - _i4.TxBuilder drainTo(_i4.ScriptBuf? script) => (super.noSuchMethod( + _i3.TxBuilder drainTo(_i3.ScriptBuf? script) => (super.noSuchMethod( Invocation.method( #drainTo, [script], @@ -1540,10 +1556,10 @@ class MockTxBuilder extends _i1.Mock implements _i4.TxBuilder { [script], ), ), - ) as _i4.TxBuilder); + ) as _i3.TxBuilder); @override - _i4.TxBuilder enableRbfWithSequence(int? nSequence) => (super.noSuchMethod( + _i3.TxBuilder enableRbfWithSequence(int? nSequence) => (super.noSuchMethod( Invocation.method( #enableRbfWithSequence, [nSequence], @@ -1562,10 +1578,10 @@ class MockTxBuilder extends _i1.Mock implements _i4.TxBuilder { [nSequence], ), ), - ) as _i4.TxBuilder); + ) as _i3.TxBuilder); @override - _i4.TxBuilder enableRbf() => (super.noSuchMethod( + _i3.TxBuilder enableRbf() => (super.noSuchMethod( Invocation.method( #enableRbf, [], @@ -1584,10 +1600,10 @@ class MockTxBuilder extends _i1.Mock implements _i4.TxBuilder { [], ), ), - ) as _i4.TxBuilder); + ) as _i3.TxBuilder); @override - _i4.TxBuilder feeAbsolute(int? feeAmount) => (super.noSuchMethod( + _i3.TxBuilder feeAbsolute(int? feeAmount) => (super.noSuchMethod( Invocation.method( #feeAbsolute, [feeAmount], @@ -1606,10 +1622,10 @@ class MockTxBuilder extends _i1.Mock implements _i4.TxBuilder { [feeAmount], ), ), - ) as _i4.TxBuilder); + ) as _i3.TxBuilder); @override - _i4.TxBuilder feeRate(double? satPerVbyte) => (super.noSuchMethod( + _i3.TxBuilder feeRate(double? satPerVbyte) => (super.noSuchMethod( Invocation.method( #feeRate, [satPerVbyte], @@ -1628,10 +1644,10 @@ class MockTxBuilder extends _i1.Mock implements _i4.TxBuilder { [satPerVbyte], ), ), - ) as _i4.TxBuilder); + ) as _i3.TxBuilder); @override - _i4.TxBuilder setRecipients(List<_i3.ScriptAmount>? recipients) => + _i3.TxBuilder setRecipients(List<_i4.ScriptAmount>? recipients) => (super.noSuchMethod( Invocation.method( #setRecipients, @@ -1651,10 +1667,10 @@ class MockTxBuilder extends _i1.Mock implements _i4.TxBuilder { [recipients], ), ), - ) as _i4.TxBuilder); + ) as _i3.TxBuilder); @override - _i4.TxBuilder manuallySelectedOnly() => (super.noSuchMethod( + _i3.TxBuilder manuallySelectedOnly() => (super.noSuchMethod( Invocation.method( #manuallySelectedOnly, [], @@ -1673,10 +1689,10 @@ class MockTxBuilder extends _i1.Mock implements _i4.TxBuilder { [], ), ), - ) as _i4.TxBuilder); + ) as _i3.TxBuilder); @override - _i4.TxBuilder addUnSpendable(_i3.OutPoint? unSpendable) => + _i3.TxBuilder addUnSpendable(_i4.OutPoint? unSpendable) => (super.noSuchMethod( Invocation.method( #addUnSpendable, @@ -1696,10 +1712,10 @@ class MockTxBuilder extends _i1.Mock implements _i4.TxBuilder { [unSpendable], ), ), - ) as _i4.TxBuilder); + ) as _i3.TxBuilder); @override - _i4.TxBuilder onlySpendChange() => (super.noSuchMethod( + _i3.TxBuilder onlySpendChange() => (super.noSuchMethod( Invocation.method( #onlySpendChange, [], @@ -1718,18 +1734,18 @@ class MockTxBuilder extends _i1.Mock implements _i4.TxBuilder { [], ), ), - ) as _i4.TxBuilder); + ) as _i3.TxBuilder); @override - _i9.Future<(_i4.PartiallySignedTransaction, _i3.TransactionDetails)> finish( - _i4.Wallet? wallet) => + _i9.Future<(_i3.PartiallySignedTransaction, _i4.TransactionDetails)> finish( + _i3.Wallet? wallet) => (super.noSuchMethod( Invocation.method( #finish, [wallet], ), returnValue: _i9.Future< - (_i4.PartiallySignedTransaction, _i3.TransactionDetails)>.value(( + (_i3.PartiallySignedTransaction, _i4.TransactionDetails)>.value(( _FakePartiallySignedTransaction_13( this, Invocation.method( @@ -1746,7 +1762,7 @@ class MockTxBuilder extends _i1.Mock implements _i4.TxBuilder { ) )), returnValueForMissingStub: _i9.Future< - (_i4.PartiallySignedTransaction, _i3.TransactionDetails)>.value(( + (_i3.PartiallySignedTransaction, _i4.TransactionDetails)>.value(( _FakePartiallySignedTransaction_13( this, Invocation.method( @@ -1763,13 +1779,13 @@ class MockTxBuilder extends _i1.Mock implements _i4.TxBuilder { ) )), ) as _i9 - .Future<(_i4.PartiallySignedTransaction, _i3.TransactionDetails)>); + .Future<(_i3.PartiallySignedTransaction, _i4.TransactionDetails)>); } /// A class which mocks [BumpFeeTxBuilder]. /// /// See the documentation for Mockito's code generation for more information. -class MockBumpFeeTxBuilder extends _i1.Mock implements _i4.BumpFeeTxBuilder { +class MockBumpFeeTxBuilder extends _i1.Mock implements _i3.BumpFeeTxBuilder { @override String get txid => (super.noSuchMethod( Invocation.getter(#txid), @@ -1791,7 +1807,7 @@ class MockBumpFeeTxBuilder extends _i1.Mock implements _i4.BumpFeeTxBuilder { ) as double); @override - _i4.BumpFeeTxBuilder allowShrinking(_i4.Address? address) => + _i3.BumpFeeTxBuilder allowShrinking(_i3.Address? address) => (super.noSuchMethod( Invocation.method( #allowShrinking, @@ -1811,10 +1827,10 @@ class MockBumpFeeTxBuilder extends _i1.Mock implements _i4.BumpFeeTxBuilder { [address], ), ), - ) as _i4.BumpFeeTxBuilder); + ) as _i3.BumpFeeTxBuilder); @override - _i4.BumpFeeTxBuilder enableRbf() => (super.noSuchMethod( + _i3.BumpFeeTxBuilder enableRbf() => (super.noSuchMethod( Invocation.method( #enableRbf, [], @@ -1833,10 +1849,10 @@ class MockBumpFeeTxBuilder extends _i1.Mock implements _i4.BumpFeeTxBuilder { [], ), ), - ) as _i4.BumpFeeTxBuilder); + ) as _i3.BumpFeeTxBuilder); @override - _i4.BumpFeeTxBuilder enableRbfWithSequence(int? nSequence) => + _i3.BumpFeeTxBuilder enableRbfWithSequence(int? nSequence) => (super.noSuchMethod( Invocation.method( #enableRbfWithSequence, @@ -1856,18 +1872,18 @@ class MockBumpFeeTxBuilder extends _i1.Mock implements _i4.BumpFeeTxBuilder { [nSequence], ), ), - ) as _i4.BumpFeeTxBuilder); + ) as _i3.BumpFeeTxBuilder); @override - _i9.Future<(_i4.PartiallySignedTransaction, _i3.TransactionDetails)> finish( - _i4.Wallet? wallet) => + _i9.Future<(_i3.PartiallySignedTransaction, _i4.TransactionDetails)> finish( + _i3.Wallet? wallet) => (super.noSuchMethod( Invocation.method( #finish, [wallet], ), returnValue: _i9.Future< - (_i4.PartiallySignedTransaction, _i3.TransactionDetails)>.value(( + (_i3.PartiallySignedTransaction, _i4.TransactionDetails)>.value(( _FakePartiallySignedTransaction_13( this, Invocation.method( @@ -1884,7 +1900,7 @@ class MockBumpFeeTxBuilder extends _i1.Mock implements _i4.BumpFeeTxBuilder { ) )), returnValueForMissingStub: _i9.Future< - (_i4.PartiallySignedTransaction, _i3.TransactionDetails)>.value(( + (_i3.PartiallySignedTransaction, _i4.TransactionDetails)>.value(( _FakePartiallySignedTransaction_13( this, Invocation.method( @@ -1901,13 +1917,13 @@ class MockBumpFeeTxBuilder extends _i1.Mock implements _i4.BumpFeeTxBuilder { ) )), ) as _i9 - .Future<(_i4.PartiallySignedTransaction, _i3.TransactionDetails)>); + .Future<(_i3.PartiallySignedTransaction, _i4.TransactionDetails)>); } /// A class which mocks [ScriptBuf]. /// /// See the documentation for Mockito's code generation for more information. -class MockScriptBuf extends _i1.Mock implements _i4.ScriptBuf { +class MockScriptBuf extends _i1.Mock implements _i3.ScriptBuf { @override _i11.Uint8List get bytes => (super.noSuchMethod( Invocation.getter(#bytes), @@ -1919,9 +1935,9 @@ class MockScriptBuf extends _i1.Mock implements _i4.ScriptBuf { /// A class which mocks [Address]. /// /// See the documentation for Mockito's code generation for more information. -class MockAddress extends _i1.Mock implements _i4.Address { +class MockAddress extends _i1.Mock implements _i3.Address { @override - _i3.BdkBitcoinAddress get ptr => (super.noSuchMethod( + _i4.BdkBitcoinAddress get ptr => (super.noSuchMethod( Invocation.getter(#ptr), returnValue: _FakeBdkBitcoinAddress_17( this, @@ -1931,15 +1947,15 @@ class MockAddress extends _i1.Mock implements _i4.Address { this, Invocation.getter(#ptr), ), - ) as _i3.BdkBitcoinAddress); + ) as _i4.BdkBitcoinAddress); @override - _i9.Future<_i4.ScriptBuf> scriptPubkey() => (super.noSuchMethod( + _i9.Future<_i3.ScriptBuf> scriptPubkey() => (super.noSuchMethod( Invocation.method( #scriptPubkey, [], ), - returnValue: _i9.Future<_i4.ScriptBuf>.value(_FakeScriptBuf_18( + returnValue: _i9.Future<_i3.ScriptBuf>.value(_FakeScriptBuf_18( this, Invocation.method( #scriptPubkey, @@ -1947,14 +1963,14 @@ class MockAddress extends _i1.Mock implements _i4.Address { ), )), returnValueForMissingStub: - _i9.Future<_i4.ScriptBuf>.value(_FakeScriptBuf_18( + _i9.Future<_i3.ScriptBuf>.value(_FakeScriptBuf_18( this, Invocation.method( #scriptPubkey, [], ), )), - ) as _i9.Future<_i4.ScriptBuf>); + ) as _i9.Future<_i3.ScriptBuf>); @override _i9.Future asString({dynamic hint}) => (super.noSuchMethod( @@ -1984,7 +2000,7 @@ class MockAddress extends _i1.Mock implements _i4.Address { @override _i9.Future isValidForNetwork({ - required _i3.Network? network, + required _i4.Network? network, dynamic hint, }) => (super.noSuchMethod( @@ -2001,25 +2017,25 @@ class MockAddress extends _i1.Mock implements _i4.Address { ) as _i9.Future); @override - _i9.Future<_i3.Network> network({dynamic hint}) => (super.noSuchMethod( + _i9.Future<_i4.Network> network({dynamic hint}) => (super.noSuchMethod( Invocation.method( #network, [], {#hint: hint}, ), - returnValue: _i9.Future<_i3.Network>.value(_i3.Network.testnet), + returnValue: _i9.Future<_i4.Network>.value(_i4.Network.testnet), returnValueForMissingStub: - _i9.Future<_i3.Network>.value(_i3.Network.testnet), - ) as _i9.Future<_i3.Network>); + _i9.Future<_i4.Network>.value(_i4.Network.testnet), + ) as _i9.Future<_i4.Network>); @override - _i9.Future<_i3.Payload> payload({dynamic hint}) => (super.noSuchMethod( + _i9.Future<_i4.Payload> payload({dynamic hint}) => (super.noSuchMethod( Invocation.method( #payload, [], {#hint: hint}, ), - returnValue: _i9.Future<_i3.Payload>.value(_i10.dummyValue<_i3.Payload>( + returnValue: _i9.Future<_i4.Payload>.value(_i10.dummyValue<_i4.Payload>( this, Invocation.method( #payload, @@ -2028,7 +2044,7 @@ class MockAddress extends _i1.Mock implements _i4.Address { ), )), returnValueForMissingStub: - _i9.Future<_i3.Payload>.value(_i10.dummyValue<_i3.Payload>( + _i9.Future<_i4.Payload>.value(_i10.dummyValue<_i4.Payload>( this, Invocation.method( #payload, @@ -2036,7 +2052,7 @@ class MockAddress extends _i1.Mock implements _i4.Address { {#hint: hint}, ), )), - ) as _i9.Future<_i3.Payload>); + ) as _i9.Future<_i4.Payload>); @override _i9.Future toQrUri({dynamic hint}) => (super.noSuchMethod( @@ -2068,7 +2084,7 @@ class MockAddress extends _i1.Mock implements _i4.Address { /// A class which mocks [DerivationPath]. /// /// See the documentation for Mockito's code generation for more information. -class MockDerivationPath extends _i1.Mock implements _i4.DerivationPath { +class MockDerivationPath extends _i1.Mock implements _i3.DerivationPath { @override _i8.BitcoinBip32DerivationPath get ptr => (super.noSuchMethod( Invocation.getter(#ptr), @@ -2086,7 +2102,7 @@ class MockDerivationPath extends _i1.Mock implements _i4.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), @@ -2098,9 +2114,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, @@ -2110,10 +2126,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, @@ -2123,14 +2139,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( @@ -2144,7 +2160,7 @@ class MockLocalUtxo extends _i1.Mock implements _i3.LocalUtxo { /// /// See the documentation for Mockito's code generation for more information. class MockTransactionDetails extends _i1.Mock - implements _i3.TransactionDetails { + implements _i4.TransactionDetails { @override String get txid => (super.noSuchMethod( Invocation.getter(#txid), From 7ef50b45255c57bfcfd86efbaef2bbe030efe3d9 Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Tue, 2 Apr 2024 04:53:00 -0400 Subject: [PATCH 09/27] code cleanup --- lib/bdk_flutter.dart | 26 +++--- lib/src/root.dart | 188 +++++++++++++++++++++------------------ lib/src/utils/utils.dart | 8 +- 3 files changed, 119 insertions(+), 103 deletions(-) diff --git a/lib/bdk_flutter.dart b/lib/bdk_flutter.dart index 83e2847d..d7b86031 100644 --- a/lib/bdk_flutter.dart +++ b/lib/bdk_flutter.dart @@ -3,7 +3,7 @@ library bdk_flutter; export './src/generated/api/blockchain.dart' hide - BlockchainBase, + BdkBlockchain, BlockchainConfig_Electrum, BlockchainConfig_Esplora, AnyBlockchain, @@ -13,28 +13,30 @@ export './src/generated/api/blockchain.dart' BlockchainConfig_Rpc; export './src/generated/api/descriptor.dart' hide - DescriptorBase, + BdkDescriptor, ExtendedDescriptor, KeysDescriptorSecretKey, KeysDescriptorPublicKey, KeysKeyMap; export './src/generated/api/key.dart' hide - DerivationPathBase, - DescriptorPublicKeyBase, - DescriptorSecretKeyBase, + BdkDerivationPath, + BdkDescriptorPublicKey, + BdkDescriptorSecretKey, BitcoinBip32DerivationPath, KeysBip39Mnemonic, - MnemonicBase; + BdkMnemonic; export './src/generated/api/psbt.dart' - hide MutexPartiallySignedTransaction, PsbtBase; + hide MutexPartiallySignedTransaction, BdkPsbt; export './src/generated/api/types.dart' hide BdkBitcoinAddress, - ScriptBufBase, - TransactionBase, + BdkScriptBuf, + BdkTransaction, AddressIndex_Reset, - AddressBase, + LockTime_Blocks, + LockTime_Seconds, + BdkAddress, AddressIndex_Peek, AddressIndex_Increase, AddressIndex_LastUnused, @@ -49,8 +51,8 @@ export './src/generated/api/types.dart' export './src/generated/api/wallet.dart' hide MutexBdkWalletAnyDatabase, - WalletBase, + BdkWallet, finishBumpFeeTxBuilder, txBuilderFinish; export './src/root.dart'; -export 'src/utils/exceptions.dart'; +export 'src/utils/exceptions.dart' hide mapToException, BdkFfiException; diff --git a/lib/src/root.dart b/lib/src/root.dart index 0aa46321..f835d94a 100644 --- a/lib/src/root.dart +++ b/lib/src/root.dart @@ -11,14 +11,13 @@ import 'generated/api/types.dart'; import 'generated/api/wallet.dart'; ///A Bitcoin address. -class Address extends AddressBase { +class Address extends BdkAddress { Address._({required super.ptr}); static Future
fromScript( {required ScriptBuf script, required Network network}) async { try { - await Frb.verifyInit(); - final res = - await AddressBase.fromScript(script: script, network: network); + await Api.initialize(); + final res = await BdkAddress.fromScript(script: script, network: network); return Address._(ptr: res.ptr); } on BdkError catch (e) { throw mapToException(e); @@ -28,8 +27,8 @@ class Address extends AddressBase { static Future
fromString( {required String s, required Network network}) async { try { - await Frb.verifyInit(); - final res = await AddressBase.fromString(address: s, network: network); + await Api.initialize(); + final res = await BdkAddress.fromString(address: s, network: network); return Address._(ptr: res.ptr); } on BdkError catch (e) { throw mapToException(e); @@ -39,7 +38,7 @@ class Address extends AddressBase { ///Generates a script pubkey spending to this address Future scriptPubkey() async { try { - final res = await AddressBase.script(ptr: this); + final res = await BdkAddress.script(ptr: this); return ScriptBuf(bytes: res.bytes); } on BdkError catch (e) { throw mapToException(e); @@ -48,14 +47,14 @@ class Address extends AddressBase { } /// Blockchain backends module provides the implementation of a few commonly-used backends like Electrum, and Esplora. -class Blockchain extends BlockchainBase { +class Blockchain extends BdkBlockchain { Blockchain._({required super.ptr}); /// [Blockchain] constructor static Future create({required BlockchainConfig config}) async { try { - await Frb.verifyInit(); - final res = await BlockchainBase.newInstance(blockchainConfig: config); + await Api.initialize(); + final res = await BdkBlockchain.newInstance(blockchainConfig: config); return Blockchain._(ptr: res.ptr); } on BdkError catch (e) { throw mapToException(e); @@ -74,7 +73,7 @@ class Blockchain extends BlockchainBase { ///The function for broadcasting a transaction @override - Future broadcast({required TransactionBase transaction, hint}) async { + Future broadcast({required BdkTransaction transaction, hint}) async { try { return super.broadcast(transaction: transaction); } on BdkError catch (e) { @@ -161,14 +160,14 @@ class BumpFeeTxBuilder { } ///A `BIP-32` derivation path -class DerivationPath extends DerivationPathBase { +class DerivationPath extends BdkDerivationPath { DerivationPath._({required super.ptr}); /// [DerivationPath] constructor static Future create({required String path}) async { try { - await Frb.verifyInit(); - final res = await DerivationPathBase.fromString(path: path); + await Api.initialize(); + final res = await BdkDerivationPath.fromString(path: path); return DerivationPath._(ptr: res.ptr); } on BdkError catch (e) { throw mapToException(e); @@ -177,15 +176,15 @@ class DerivationPath extends DerivationPathBase { } ///Script descriptor -class Descriptor extends DescriptorBase { +class Descriptor extends BdkDescriptor { Descriptor._({required super.extendedDescriptor, required super.keyMap}); /// [Descriptor] constructor static Future create( {required String descriptor, required Network network}) async { try { - await Frb.verifyInit(); - final res = await DescriptorBase.newInstance( + await Api.initialize(); + final res = await BdkDescriptor.newInstance( descriptor: descriptor, network: network); return Descriptor._( extendedDescriptor: res.extendedDescriptor, keyMap: res.keyMap); @@ -202,8 +201,8 @@ class Descriptor extends DescriptorBase { required Network network, required KeychainKind keychain}) async { try { - await Frb.verifyInit(); - final res = await DescriptorBase.newBip44( + await Api.initialize(); + final res = await BdkDescriptor.newBip44( secretKey: secretKey, network: network, keychainKind: keychain); return Descriptor._( extendedDescriptor: res.extendedDescriptor, keyMap: res.keyMap); @@ -223,8 +222,8 @@ class Descriptor extends DescriptorBase { required Network network, required KeychainKind keychain}) async { try { - await Frb.verifyInit(); - final res = await DescriptorBase.newBip44Public( + await Api.initialize(); + final res = await BdkDescriptor.newBip44Public( network: network, keychainKind: keychain, publicKey: publicKey, @@ -244,8 +243,8 @@ class Descriptor extends DescriptorBase { required Network network, required KeychainKind keychain}) async { try { - await Frb.verifyInit(); - final res = await DescriptorBase.newBip49( + await Api.initialize(); + final res = await BdkDescriptor.newBip49( secretKey: secretKey, network: network, keychainKind: keychain); return Descriptor._( extendedDescriptor: res.extendedDescriptor, keyMap: res.keyMap); @@ -265,8 +264,8 @@ class Descriptor extends DescriptorBase { required Network network, required KeychainKind keychain}) async { try { - await Frb.verifyInit(); - final res = await DescriptorBase.newBip44Public( + await Api.initialize(); + final res = await BdkDescriptor.newBip44Public( network: network, keychainKind: keychain, publicKey: publicKey, @@ -286,8 +285,8 @@ class Descriptor extends DescriptorBase { required Network network, required KeychainKind keychain}) async { try { - await Frb.verifyInit(); - final res = await DescriptorBase.newBip84( + await Api.initialize(); + final res = await BdkDescriptor.newBip84( secretKey: secretKey, network: network, keychainKind: keychain); return Descriptor._( extendedDescriptor: res.extendedDescriptor, keyMap: res.keyMap); @@ -307,8 +306,8 @@ class Descriptor extends DescriptorBase { required Network network, required KeychainKind keychain}) async { try { - await Frb.verifyInit(); - final res = await DescriptorBase.newBip44Public( + await Api.initialize(); + final res = await BdkDescriptor.newBip44Public( network: network, keychainKind: keychain, publicKey: publicKey, @@ -328,8 +327,8 @@ class Descriptor extends DescriptorBase { required Network network, required KeychainKind keychain}) async { try { - await Frb.verifyInit(); - final res = await DescriptorBase.newBip86( + await Api.initialize(); + final res = await BdkDescriptor.newBip86( secretKey: secretKey, network: network, keychainKind: keychain); return Descriptor._( extendedDescriptor: res.extendedDescriptor, keyMap: res.keyMap); @@ -349,8 +348,8 @@ class Descriptor extends DescriptorBase { required Network network, required KeychainKind keychain}) async { try { - await Frb.verifyInit(); - final res = await DescriptorBase.newBip44Public( + await Api.initialize(); + final res = await BdkDescriptor.newBip44Public( network: network, keychainKind: keychain, publicKey: publicKey, @@ -394,15 +393,14 @@ class Descriptor extends DescriptorBase { } ///An extended public key. -class DescriptorPublicKey extends DescriptorPublicKeyBase { +class DescriptorPublicKey extends BdkDescriptorPublicKey { DescriptorPublicKey._({required super.ptr}); /// [DescriptorPublicKey] constructor static Future fromString(String publicKey) async { try { - await Frb.verifyInit(); - final res = - await DescriptorPublicKeyBase.fromString(publicKey: publicKey); + await Api.initialize(); + final res = await BdkDescriptorPublicKey.fromString(publicKey: publicKey); return DescriptorPublicKey._(ptr: res.ptr); } on BdkError catch (e) { throw mapToException(e); @@ -421,9 +419,9 @@ class DescriptorPublicKey extends DescriptorPublicKeyBase { ///Derive a public descriptor at a given path. Future derive( - {required DerivationPathBase path, hint}) async { + {required BdkDerivationPath path, hint}) async { try { - final res = await DescriptorPublicKeyBase.derive(ptr: this, path: path); + final res = await BdkDescriptorPublicKey.derive(ptr: this, path: path); return DescriptorPublicKey._(ptr: res.ptr); } on BdkError catch (e) { throw mapToException(e); @@ -432,9 +430,9 @@ class DescriptorPublicKey extends DescriptorPublicKeyBase { ///Extend the public descriptor with a custom path. Future extend( - {required DerivationPathBase path, hint}) async { + {required BdkDerivationPath path, hint}) async { try { - final res = await DescriptorPublicKeyBase.extend(ptr: this, path: path); + final res = await BdkDescriptorPublicKey.extend(ptr: this, path: path); return DescriptorPublicKey._(ptr: res.ptr); } on BdkError catch (e) { throw mapToException(e); @@ -443,15 +441,14 @@ class DescriptorPublicKey extends DescriptorPublicKeyBase { } ///Script descriptor -class DescriptorSecretKey extends DescriptorSecretKeyBase { +class DescriptorSecretKey extends BdkDescriptorSecretKey { DescriptorSecretKey._({required super.ptr}); /// [DescriptorSecretKey] constructor static Future fromString(String secretKey) async { try { - await Frb.verifyInit(); - final res = - await DescriptorSecretKeyBase.fromString(secretKey: secretKey); + await Api.initialize(); + final res = await BdkDescriptorSecretKey.fromString(secretKey: secretKey); return DescriptorSecretKey._(ptr: res.ptr); } on BdkError catch (e) { throw mapToException(e); @@ -464,8 +461,8 @@ class DescriptorSecretKey extends DescriptorSecretKeyBase { required Mnemonic mnemonic, String? password}) async { try { - await Frb.verifyInit(); - final res = await DescriptorSecretKeyBase.create( + await Api.initialize(); + final res = await BdkDescriptorSecretKey.create( network: network, mnemonic: mnemonic, password: password); return DescriptorSecretKey._(ptr: res.ptr); } on BdkError catch (e) { @@ -474,9 +471,9 @@ class DescriptorSecretKey extends DescriptorSecretKeyBase { } ///Derived the XPrv using the derivation path - Future derive(DerivationPathBase path) async { + Future derive(BdkDerivationPath path) async { try { - final res = await DescriptorSecretKeyBase.derive(ptr: this, path: path); + final res = await BdkDescriptorSecretKey.derive(ptr: this, path: path); return DescriptorSecretKey._(ptr: res.ptr); } on BdkError catch (e) { throw mapToException(e); @@ -484,9 +481,9 @@ class DescriptorSecretKey extends DescriptorSecretKeyBase { } ///Extends the XPrv using the derivation path - Future extend(DerivationPathBase path) async { + Future extend(BdkDerivationPath path) async { try { - final res = await DescriptorSecretKeyBase.extend(ptr: this, path: path); + final res = await BdkDescriptorSecretKey.extend(ptr: this, path: path); return DescriptorSecretKey._(ptr: res.ptr); } on BdkError catch (e) { throw mapToException(e); @@ -496,7 +493,7 @@ class DescriptorSecretKey extends DescriptorSecretKeyBase { ///Returns the public version of this key. Future asPublic() async { try { - final res = await DescriptorSecretKeyBase.asPublic(ptr: this); + final res = await BdkDescriptorSecretKey.asPublic(ptr: this); return DescriptorPublicKey._(ptr: res.ptr); } on BdkError catch (e) { throw mapToException(e); @@ -525,7 +522,7 @@ class DescriptorSecretKey extends DescriptorSecretKeyBase { } ///Mnemonic phrases are a human-readable version of the private keys. Supported number of words are 12, 18, and 24. -class Mnemonic extends MnemonicBase { +class Mnemonic extends BdkMnemonic { Mnemonic._({required super.ptr}); /// Generates [Mnemonic] with given [WordCount] @@ -533,8 +530,8 @@ class Mnemonic extends MnemonicBase { /// [Mnemonic] constructor static Future create(WordCount wordCount) async { try { - await Frb.verifyInit(); - final res = await MnemonicBase.newInstance(wordCount: wordCount); + await Api.initialize(); + final res = await BdkMnemonic.newInstance(wordCount: wordCount); return Mnemonic._(ptr: res.ptr); } on BdkError catch (e) { throw mapToException(e); @@ -547,8 +544,8 @@ class Mnemonic extends MnemonicBase { /// [Mnemonic] constructor static Future fromEntropy(List entropy) async { try { - await Frb.verifyInit(); - final res = await MnemonicBase.fromEntropy(entropy: entropy); + await Api.initialize(); + final res = await BdkMnemonic.fromEntropy(entropy: entropy); return Mnemonic._(ptr: res.ptr); } on BdkError catch (e) { throw mapToException(e); @@ -560,8 +557,8 @@ class Mnemonic extends MnemonicBase { /// [Mnemonic] constructor static Future fromString(String mnemonic) async { try { - await Frb.verifyInit(); - final res = await MnemonicBase.fromString(mnemonic: mnemonic); + await Api.initialize(); + final res = await BdkMnemonic.fromString(mnemonic: mnemonic); return Mnemonic._(ptr: res.ptr); } on BdkError catch (e) { throw mapToException(e); @@ -580,7 +577,7 @@ class Mnemonic extends MnemonicBase { } ///A Partially Signed Transaction -class PartiallySignedTransaction extends PsbtBase { +class PartiallySignedTransaction extends BdkPsbt { PartiallySignedTransaction._({required super.ptr}); /// Parse a [PartiallySignedTransaction] with given Base64 string @@ -589,8 +586,8 @@ class PartiallySignedTransaction extends PsbtBase { static Future fromString( String psbtBase64) async { try { - await Frb.verifyInit(); - final res = await PsbtBase.fromStr(psbtBase64: psbtBase64); + await Api.initialize(); + final res = await BdkPsbt.fromStr(psbtBase64: psbtBase64); return PartiallySignedTransaction._(ptr: res.ptr); } on BdkError catch (e) { throw mapToException(e); @@ -639,7 +636,7 @@ class PartiallySignedTransaction extends PsbtBase { ///Return the transaction as bytes. Future extractTx() async { try { - final res = await PsbtBase.extractTx(ptr: this); + final res = await BdkPsbt.extractTx(ptr: this); return Transaction._(inner: res.inner); } on BdkError catch (e) { throw mapToException(e); @@ -650,7 +647,7 @@ class PartiallySignedTransaction extends PsbtBase { Future combine( PartiallySignedTransaction other) async { try { - final res = await PsbtBase.combine(ptr: this, other: other); + final res = await BdkPsbt.combine(ptr: this, other: other); return PartiallySignedTransaction._(ptr: res.ptr); } on BdkError catch (e) { throw mapToException(e); @@ -669,15 +666,15 @@ class PartiallySignedTransaction extends PsbtBase { } ///Bitcoin script. -class ScriptBuf extends ScriptBufBase { +class ScriptBuf extends BdkScriptBuf { /// [ScriptBuf] constructor ScriptBuf({required super.bytes}); ///Creates a new empty script. static Future empty() async { try { - await Frb.verifyInit(); - final res = await ScriptBufBase.empty(); + await Api.initialize(); + final res = await BdkScriptBuf.empty(); return ScriptBuf(bytes: res.bytes); } on BdkError catch (e) { throw mapToException(e); @@ -687,8 +684,8 @@ class ScriptBuf extends ScriptBufBase { ///Creates a new empty script with pre-allocated capacity. static Future withCapacity(int capacity) async { try { - await Frb.verifyInit(); - final res = await ScriptBufBase.withCapacity(capacity: capacity); + await Api.initialize(); + final res = await BdkScriptBuf.withCapacity(capacity: capacity); return ScriptBuf(bytes: res.bytes); } on BdkError catch (e) { throw mapToException(e); @@ -698,8 +695,8 @@ class ScriptBuf extends ScriptBufBase { ///Creates a ScriptBuf from a hex string. static Future fromHex(String s) async { try { - await Frb.verifyInit(); - final res = await ScriptBufBase.fromHex(s: s); + await Api.initialize(); + final res = await BdkScriptBuf.fromHex(s: s); return ScriptBuf(bytes: res.bytes); } on BdkError catch (e) { throw mapToException(e); @@ -708,19 +705,19 @@ class ScriptBuf extends ScriptBufBase { } ///A bitcoin transaction. -class Transaction extends TransactionBase { +class Transaction extends BdkTransaction { Transaction._({required super.inner}); /// [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 create({ + static Future fromBytes({ required List transactionBytes, }) async { try { - await Frb.verifyInit(); + await Api.initialize(); final res = - await TransactionBase.newInstance(transactionBytes: transactionBytes); + await BdkTransaction.fromBytes(transactionBytes: transactionBytes); return Transaction._(inner: res.inner); } on BdkError catch (e) { throw mapToException(e); @@ -941,7 +938,7 @@ class TxBuilder { /// 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 WalletBase { +class Wallet extends BdkWallet { Wallet._({required super.ptr}); /// [Wallet] constructor @@ -955,8 +952,8 @@ class Wallet extends WalletBase { required DatabaseConfig databaseConfig, }) async { try { - await Frb.verifyInit(); - final res = await WalletBase.newInstance( + await Api.initialize(); + final res = await BdkWallet.newInstance( descriptor: descriptor, changeDescriptor: changeDescriptor, network: network, @@ -971,11 +968,12 @@ class Wallet extends WalletBase { /// 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. - @override Future getAddress( {required AddressIndex addressIndex, hint}) async { try { - return super.getAddress(addressIndex: addressIndex); + final res = + await BdkWallet.getAddress(ptr: this, addressIndex: addressIndex); + return AddressInfo(res.$2, Address._(ptr: res.$1.ptr)); } on BdkError catch (e) { throw mapToException(e); } @@ -996,7 +994,7 @@ class Wallet extends WalletBase { Future getDescriptorForKeychain( {required KeychainKind keychain, hint}) async { try { - final res = await WalletBase.getDescriptorForKeychain( + final res = await BdkWallet.getDescriptorForKeychain( ptr: this, keychain: keychain); return Descriptor._( extendedDescriptor: res.extendedDescriptor, keyMap: res.keyMap); @@ -1012,11 +1010,13 @@ class Wallet extends WalletBase { /// 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]. - @override + Future getInternalAddress( {required AddressIndex addressIndex, hint}) async { try { - return super.getInternalAddress(addressIndex: addressIndex); + final res = await BdkWallet.getInternalAddress( + ptr: this, addressIndex: addressIndex); + return AddressInfo(res.$2, Address._(ptr: res.$1.ptr)); } on BdkError catch (e) { throw mapToException(e); } @@ -1041,7 +1041,7 @@ class Wallet extends WalletBase { /// Return whether or not a script is part of this wallet (either internal or external). @override - Future isMine({required ScriptBufBase script, hint}) async { + Future isMine({required BdkScriptBuf script, hint}) async { try { return super.isMine(script: script); } on BdkError catch (e) { @@ -1062,6 +1062,7 @@ class Wallet extends WalletBase { /// 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 Future> listUnspent({hint}) async { try { @@ -1089,9 +1090,11 @@ class Wallet extends WalletBase { /// signers will follow the options, but the "software signers" (WIF keys and `xprv`) defined /// in this library will. Future sign( - {required PsbtBase psbt, SignOptions? signOptions, hint}) async { + {required PartiallySignedTransaction psbt, + SignOptions? signOptions, + hint}) async { try { - final res = await WalletBase.sign(ptr: this, psbt: psbt); + final res = await BdkWallet.sign(ptr: this, psbt: psbt); return res; } on BdkError catch (e) { throw mapToException(e); @@ -1102,10 +1105,21 @@ class Wallet extends WalletBase { Future sync({required Blockchain blockchain, hint}) async { try { - final res = await WalletBase.sync(ptr: this, blockchain: blockchain); + final res = await BdkWallet.sync(ptr: this, blockchain: blockchain); return res; } on BdkError catch (e) { throw mapToException(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); +} diff --git a/lib/src/utils/utils.dart b/lib/src/utils/utils.dart index ccfef76c..08e25d0e 100644 --- a/lib/src/utils/utils.dart +++ b/lib/src/utils/utils.dart @@ -2,11 +2,11 @@ import '../generated/frb_generated.dart'; export 'exceptions.dart'; -class Frb { - static Future verifyInit() async { +class Api { + static Future initialize() async { try { - if (!BdkCore.instance.initialized) { - await BdkCore.init(); + if (!CApi.instance.initialized) { + await CApi.init(); } } catch (e) { throw Exception("Failed to initialize bdk-flutter"); From 90841f2c6be968f4f23dfe6daa888376046b742b Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Tue, 2 Apr 2024 06:39:00 -0400 Subject: [PATCH 10/27] code cleanup --- example/pubspec.lock | 4 ++-- pubspec.lock | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/example/pubspec.lock b/example/pubspec.lock index 6599079d..f11ebe3f 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -193,10 +193,10 @@ packages: dependency: transitive description: name: flutter_rust_bridge - sha256: c51fa002e57e64d13030269ed9cd43752173ee4c6f60ec1e9c41450d63c75bae + sha256: e9a8716b1ad2fc81c434f3e4bf84b86c578578678c57e568b44aea7acf210102 url: "https://pub.dev" source: hosted - version: "2.0.0-dev.28" + version: "2.0.0-dev.31" flutter_test: dependency: "direct dev" description: flutter diff --git a/pubspec.lock b/pubspec.lock index 2b2b0459..1cb8d5c0 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -234,10 +234,10 @@ packages: dependency: "direct main" description: name: flutter_rust_bridge - sha256: c51fa002e57e64d13030269ed9cd43752173ee4c6f60ec1e9c41450d63c75bae + sha256: e9a8716b1ad2fc81c434f3e4bf84b86c578578678c57e568b44aea7acf210102 url: "https://pub.dev" source: hosted - version: "2.0.0-dev.28" + version: "2.0.0-dev.31" flutter_test: dependency: "direct dev" description: flutter From 3c1820a65165e50ad0bec7878a290b1b4973d430 Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Wed, 3 Apr 2024 12:27:00 -0400 Subject: [PATCH 11/27] code cleanup --- example/lib/simple_wallet.dart | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/example/lib/simple_wallet.dart b/example/lib/simple_wallet.dart index cbde86d0..02f1d0fd 100644 --- a/example/lib/simple_wallet.dart +++ b/example/lib/simple_wallet.dart @@ -55,10 +55,11 @@ class _SimpleWalletState extends State { } getNewAddress() async { - final res = await lib.getAddress(aliceWallet); - debugPrint(res.address); - setState(() { - displayText = "Address: ${res.address} \n Index: ${res.index}"; + final res = (await lib.getAddress(aliceWallet)); + debugPrint(await res.address.asString()); + setState(() async { + displayText = + "Address: ${await res.address.asString()} \n Index: ${res.index}"; }); } From 8347d4158fa66786d2f699e4495e4a7f1f2b2f7e Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Thu, 4 Apr 2024 18:45:00 -0400 Subject: [PATCH 12/27] cargo release toolchain changed to nightly --- .github/workflows/precompile_binaries.yml | 9 +-------- rust/cargokit.yaml | 5 ++++- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/precompile_binaries.yml b/.github/workflows/precompile_binaries.yml index eb6e1d05..9ee29371 100644 --- a/.github/workflows/precompile_binaries.yml +++ b/.github/workflows/precompile_binaries.yml @@ -20,14 +20,7 @@ jobs: 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: diff --git a/rust/cargokit.yaml b/rust/cargokit.yaml index a5b04a5a..f94f555f 100644 --- a/rust/cargokit.yaml +++ b/rust/cargokit.yaml @@ -1,6 +1,9 @@ cargo: release: - toolchain: stable + toolchain: nightly + extra_flags: + - -Z + - build-std=panic_abort,std precompiled_binaries: url_prefix: https://github.com/LtbLightning/bdk-flutter/releases/download/precompiled_ public_key: 0e43d5e8452d00db7f3000c18fb1ba796babfcb5dc6306bb0629eff24f8be85b From 6c5c84d9102be399b6685678db12e61e5418ba15 Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Fri, 5 Apr 2024 21:01:00 -0400 Subject: [PATCH 13/27] v0.31.2-dev added --- .github/workflows/precompile_binaries.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/precompile_binaries.yml b/.github/workflows/precompile_binaries.yml index 9ee29371..ec2ea71e 100644 --- a/.github/workflows/precompile_binaries.yml +++ b/.github/workflows/precompile_binaries.yml @@ -1,6 +1,6 @@ on: push: - branches: [v0.31.1-dev, master, main] + branches: [v0.31.2-dev, master, main] name: Precompile Binaries From 9af373f3d542c58f98ee9d4937f20bfd312af8b2 Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Sat, 6 Apr 2024 19:45:00 -0400 Subject: [PATCH 14/27] CHANGELOG.md updated --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ad8774e9..67db0054 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## [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 From 85f7babe954094ce40dc2c4d1cdaadbf12e6fa55 Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Sun, 7 Apr 2024 12:24:00 -0400 Subject: [PATCH 15/27] README.md updated --- README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c8383c4e..4c7e18d1 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,17 @@ dependencies: bdk_flutter: ^0.31.2-dev ``` +Create a file named `cargokit_options.yaml` in your project root and paste the following content to utilize the pre-built binaries. + +```yaml + verbose_logging: false + use_precompiled_binaries: true +``` + +You can disable the `use_precompiled_binaries` option if you prefer to build the binaries from the source. Click [here](https://matejknopp.com/post/flutter_plugin_in_rust_with_no_prebuilt_binaries) for a tutorial on how to use `Cargokit`. + +> This Flutter plugin is currently in its development (dev) stage and has been released for community review and experimentation. As part of this phase, we have integrated `CargoKit` into our build and release pipeline to streamline the creation and distribution of Rust binaries. + ### Examples ### Create a Wallet & sync the balance of a descriptor @@ -186,7 +197,5 @@ The latest API documentation is available [here](https://pub.dev/documentation/b - Setting up a local Esplora instance for testing: https://bitcoin.stackexchange.com/questions/116937/how-do-i-setup-an-esplora-instance-for-local-testing/116938#116938 -_Note: This Flutter plugin is currently in its development (dev) stage and has been released for community review and experimentation. -We warmly welcome feedback, bug reports, and contributions from developers and enthusiasts alike âš¡ï¸_ Thanks for taking a look! From b489a09218a41560648cefd7e97bf3c3004408e1 Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Mon, 8 Apr 2024 14:36:00 -0400 Subject: [PATCH 16/27] set usePrecompiledBinaries to true --- cargokit/build_tool/lib/src/options.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cargokit/build_tool/lib/src/options.dart b/cargokit/build_tool/lib/src/options.dart index 7937dcac..0b87e3ab 100644 --- a/cargokit/build_tool/lib/src/options.dart +++ b/cargokit/build_tool/lib/src/options.dart @@ -240,7 +240,7 @@ class CargokitUserOptions { }); CargokitUserOptions._() - : usePrecompiledBinaries = defaultUsePrecompiledBinaries(), + : usePrecompiledBinaries = true, verboseLogging = false; static CargokitUserOptions parse(YamlNode node) { From bf4a2ca46777a844d88ee67a8f6eaeb60626fcc5 Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Tue, 9 Apr 2024 02:23:00 -0400 Subject: [PATCH 17/27] removed cargokit options --- cargokit_options.yaml | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 cargokit_options.yaml diff --git a/cargokit_options.yaml b/cargokit_options.yaml deleted file mode 100644 index 01f175a0..00000000 --- a/cargokit_options.yaml +++ /dev/null @@ -1,2 +0,0 @@ -verbose_logging: false -use_precompiled_binaries: true \ No newline at end of file From 7283773de271bf38322277a8ef92e1a79c1ce330 Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Wed, 10 Apr 2024 09:17:00 -0400 Subject: [PATCH 18/27] README.md update --- README.md | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/README.md b/README.md index 4c7e18d1..6aa8574d 100644 --- a/README.md +++ b/README.md @@ -42,17 +42,6 @@ dependencies: bdk_flutter: ^0.31.2-dev ``` -Create a file named `cargokit_options.yaml` in your project root and paste the following content to utilize the pre-built binaries. - -```yaml - verbose_logging: false - use_precompiled_binaries: true -``` - -You can disable the `use_precompiled_binaries` option if you prefer to build the binaries from the source. Click [here](https://matejknopp.com/post/flutter_plugin_in_rust_with_no_prebuilt_binaries) for a tutorial on how to use `Cargokit`. - -> This Flutter plugin is currently in its development (dev) stage and has been released for community review and experimentation. As part of this phase, we have integrated `CargoKit` into our build and release pipeline to streamline the creation and distribution of Rust binaries. - ### Examples ### Create a Wallet & sync the balance of a descriptor From 5c756d044a240bc4914cb11fc58fe9a8fb974866 Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Thu, 11 Apr 2024 00:54:00 -0400 Subject: [PATCH 19/27] code cleanup --- rust/src/api/types.rs | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/rust/src/api/types.rs b/rust/src/api/types.rs index 9e684b81..daecb73c 100644 --- a/rust/src/api/types.rs +++ b/rust/src/api/types.rs @@ -886,18 +886,6 @@ impl From for FeeRate { } } } -// impl FeeRate { -// /// Constructs `FeeRate` from satoshis per 1000 weight units. -// pub fn from_sat_per_kwu(sat_per_kwu: f32) -> Self { -// bdk::FeeRate::from_sat_per_kwu(sat_per_kwu).into() -// } -// -// ///Create a new instance of FeeRate given a float fee rate in sats/kvb -// pub fn from_sat_per_vb(sat_per_kvb: f32) -> Self { -// bdk::FeeRate::from_sat_per_vb(sat_per_kvb).into() -// } -// -// } /// A key-value map for an input of the corresponding index in the unsigned pub struct Input { From f35a2cb190ae0aa70a054753ef5c65a7e380e942 Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Fri, 12 Apr 2024 00:30:00 -0400 Subject: [PATCH 20/27] Remove cargokit subtree --- 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 | 306 ------------ .../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 | 97 ---- cargokit/cmake/resolve_symlinks.ps1 | 27 -- cargokit/docs/architecture.md | 104 ---- cargokit/docs/precompiled_binaries.md | 95 ---- cargokit/gradle/plugin.gradle | 166 ------- cargokit/run_build_tool.cmd | 91 ---- cargokit/run_build_tool.sh | 94 ---- 40 files changed, 4006 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 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 379b9c6d..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 - -"$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 0b87e3ab..00000000 --- a/cargokit/build_tool/lib/src/options.dart +++ /dev/null @@ -1,306 +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 = true, - 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/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 88326005..00000000 --- a/cargokit/cmake/cargokit.cmake +++ /dev/null @@ -1,97 +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 "") - 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() \ No newline at end of file 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 a9a6ec7a..00000000 --- a/cargokit/gradle/plugin.gradle +++ /dev/null @@ -1,166 +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 - - 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 From 27610900e91a94db169c1cad5112b24e88acf4f0 Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Sat, 13 Apr 2024 17:41:00 -0400 Subject: [PATCH 21/27] Squashed 'cargokit/' content from commit 969c49a --- .github/workflows/check_and_lint.yml | 26 + .github/workflows/precompile_binaries.yml | 41 - .../workflows/test_example_plugin_build.yml | 82 + .gitignore | 40 +- .metadata | 36 - CHANGELOG.md | 149 - LICENSE | 40 +- LICENSE-APACHE | 201 - README | 8 + README.md | 190 - 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 | 395 +- 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/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 | 137 - example/lib/main.dart | 6 - example/lib/multi_sig_wallet.dart | 98 - example/lib/simple_wallet.dart | 330 - 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 - .../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 | 83 - flutter_rust_bridge.yaml | 6 - gradle/plugin.gradle | 172 + ios/.gitignore | 41 - ios/Classes/EnforceBundling.swift | 4 - ios/Classes/bdk_flutter.c | 0 ios/Classes/frb_generated.h | 1297 - ios/bdk_flutter.podspec | 31 - lefthook.yml | 16 - lib/bdk_flutter.dart | 58 - lib/src/generated/api/blockchain.dart | 320 - lib/src/generated/api/blockchain.freezed.dart | 993 - lib/src/generated/api/descriptor.dart | 221 - lib/src/generated/api/error.dart | 357 - lib/src/generated/api/error.freezed.dart | 27433 ---------------- lib/src/generated/api/key.dart | 206 - lib/src/generated/api/psbt.dart | 82 - lib/src/generated/api/types.dart | 846 - lib/src/generated/api/types.freezed.dart | 2258 -- lib/src/generated/api/wallet.dart | 203 - lib/src/generated/frb_generated.dart | 7062 ---- lib/src/generated/frb_generated.io.dart | 6735 ---- lib/src/generated/frb_generated.web.dart | 3380 -- lib/src/root.dart | 1125 - lib/src/utils/exceptions.dart | 368 - 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 | 1297 - macos/bdk_flutter.podspec | 34 - makefile | 29 - pubspec.lock | 621 - pubspec.yaml | 37 - run_build_tool.cmd | 91 + run_build_tool.sh | 94 + rust/Cargo.lock | 2541 -- rust/Cargo.toml | 28 - rust/cargokit.yaml | 9 - rust/src/api/blockchain.rs | 207 - rust/src/api/descriptor.rs | 267 - rust/src/api/error.rs | 357 - rust/src/api/key.rs | 269 - rust/src/api/mod.rs | 7 - rust/src/api/psbt.rs | 73 - rust/src/api/types.rs | 908 - rust/src/api/wallet.rs | 279 - rust/src/frb_generated.io.rs | 3982 --- rust/src/frb_generated.rs | 5947 ---- rust/src/frb_generated.web.rs | 2241 -- rust/src/lib.rs | 5 - test/bdk_flutter_test.dart | 348 - test/bdk_flutter_test.mocks.dart | 2190 -- 199 files changed, 3756 insertions(+), 79653 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 (63%) 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/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/multi_sig_wallet.dart delete mode 100644 example/lib/simple_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/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/frb_generated.web.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/frb_generated.web.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..adec80e1 --- /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@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/.github/workflows/precompile_binaries.yml b/.github/workflows/precompile_binaries.yml deleted file mode 100644 index ec2ea71e..00000000 --- a/.github/workflows/precompile_binaries.yml +++ /dev/null @@ -1,41 +0,0 @@ -on: - push: - branches: [v0.31.2-dev, master, main] - -name: Precompile Binaries - -jobs: - Precompile: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: - - ubuntu-20.04 - - macOS-latest - steps: - - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - - uses: dart-lang/setup-dart@v1 - - uses: subosito/flutter-action@v2 - with: - channel: 'stable' - - name: Precompile (with iOS) - if: (matrix.os == 'macOS-latest') - run: dart run build_tool precompile-binaries -v --manifest-dir=../../rust --repository=LtbLightning/bdk-flutter - working-directory: cargokit/build_tool - env: - GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} - PRIVATE_KEY: ${{ secrets.CARGOKIT_PRIVATE_KEY }} - - name: Precompile (with Android) - if: (matrix.os == 'ubuntu-20.04') - run: dart run build_tool precompile-binaries -v --manifest-dir=../../rust --repository=LtbLightning/bdk-flutter --android-sdk-location=/usr/local/lib/android/sdk --android-ndk-version=24.0.8215888 --android-min-sdk-version=23 - working-directory: cargokit/build_tool - env: - GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} - PRIVATE_KEY: ${{ secrets.CARGOKIT_PRIVATE_KEY }} diff --git a/.github/workflows/test_example_plugin_build.yml b/.github/workflows/test_example_plugin_build.yml new file mode 100644 index 00000000..bf36e862 --- /dev/null +++ b/.github/workflows/test_example_plugin_build.yml @@ -0,0 +1,82 @@ +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/.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 67db0054..00000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,149 +0,0 @@ -## [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 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 6aa8574d..00000000 --- a/README.md +++ /dev/null @@ -1,190 +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.2-dev -``` - -### 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 externalPublicDescriptorStr = await externalDescriptor.asString(); -final externalPublicDescriptor = await Descriptor.( descriptor: externalPublicDescriptorStr, - 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 c2b7743f..00000000 --- a/analysis_options.yaml +++ /dev/null @@ -1,31 +0,0 @@ -include: package:lints/recommended.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 0a24818b..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 - - 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 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 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 e59e280d..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 63% rename from example/pubspec.lock rename to build_tool/pubspec.lock index f11ebe3f..343bdd36 100644 --- a/example/pubspec.lock +++ b/build_tool/pubspec.lock @@ -9,6 +9,14 @@ packages: 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: @@ -18,7 +26,7 @@ packages: source: hosted version: "6.2.0" args: - dependency: transitive + dependency: "direct main" description: name: args sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 @@ -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.2-dev" 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: fedde275e0a6b798c3296963c5cd224e3e1b55d0e478d5b7e65e6b540f363a0e - url: "https://pub.dev" - source: hosted - version: "8.9.1" - 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,61 +58,45 @@ 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: crypto - sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + name: coverage + sha256: "2fb815080e44a09b85e0f2ca8a820b15053982b2e714b59267719e8a9ff17097" url: "https://pub.dev" source: hosted - version: "3.0.3" - cupertino_icons: + version: "1.6.3" + crypto: dependency: "direct main" description: - name: cupertino_icons - sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d - url: "https://pub.dev" - source: hosted - version: "1.0.6" - 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" + name: crypto + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab url: "https://pub.dev" source: hosted - version: "1.3.1" - ffi: - dependency: transitive + version: "3.0.3" + ed25519_edwards: + dependency: "direct main" description: - name: ffi - sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + name: ed25519_edwards + sha256: "6ce0112d131327ec6d42beede1e5dfd526069b18ad45dcf654f15074ad9276cd" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "0.3.1" file: dependency: transitive description: name: file - sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" url: "https://pub.dev" source: hosted - version: "7.0.0" + version: "6.1.4" fixnum: dependency: transitive description: @@ -176,40 +105,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.0" - flutter: - dependency: "direct main" - 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: + frontend_server_client: dependency: transitive description: - name: flutter_rust_bridge - sha256: e9a8716b1ad2fc81c434f3e4bf84b86c578578678c57e568b44aea7acf210102 + name: frontend_server_client + sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" url: "https://pub.dev" source: hosted - version: "2.0.0-dev.31" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - freezed_annotation: - dependency: transitive + version: "3.2.0" + github: + dependency: "direct main" description: - name: freezed_annotation - sha256: c3fd9336eb55a38cc1bbd79ab17573113a8deccd0ecbbf926cca3c62803b5c2d + name: github + sha256: "9966bc13bf612342e916b0a343e95e5f046c88f602a14476440e9b75d2295411" url: "https://pub.dev" source: hosted - version: "2.4.1" + version: "9.17.0" glob: dependency: transitive description: @@ -218,48 +129,64 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.2" - js: + 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: js - sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf + name: http_multi_server + sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" url: "https://pub.dev" source: hosted - version: "0.7.1" - json_annotation: + version: "3.2.1" + http_parser: dependency: transitive description: - name: json_annotation - sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" url: "https://pub.dev" source: hosted - version: "4.8.1" - leak_tracker: + version: "4.0.2" + io: dependency: transitive description: - name: leak_tracker - sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + name: io + sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" url: "https://pub.dev" source: hosted - version: "10.0.0" - leak_tracker_flutter_testing: + version: "1.0.4" + js: dependency: transitive description: - name: leak_tracker_flutter_testing - sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + name: js + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 url: "https://pub.dev" source: hosted - version: "2.0.1" - leak_tracker_testing: + version: "0.6.7" + json_annotation: dependency: transitive description: - name: leak_tracker_testing - sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + name: json_annotation + sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "4.8.1" lints: - dependency: transitive + dependency: "direct dev" description: name: lints sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" @@ -267,7 +194,7 @@ packages: source: hosted version: "2.1.1" logging: - dependency: transitive + dependency: "direct main" description: name: logging sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" @@ -278,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: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + name: meta + sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" url: "https://pub.dev" source: hosted - version: "0.8.0" - meta: + version: "1.9.1" + mime: dependency: transitive description: - name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + name: mime + sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e url: "https://pub.dev" source: hosted - version: "1.11.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: @@ -315,13 +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.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.9.0" + version: "1.5.1" pub_semver: dependency: transitive description: @@ -330,35 +273,62 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" - sky_engine: + shelf: dependency: transitive - description: flutter - source: sdk - version: "0.0.99" - source_gen: + description: + name: shelf + sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + url: "https://pub.dev" + source: hosted + version: "1.4.1" + shelf_packages_handler: dependency: transitive description: - name: source_gen - sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" + name: shelf_packages_handler + sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e" url: "https://pub.dev" source: hosted - version: "1.5.0" - source_span: + version: "3.0.2" + shelf_static: dependency: transitive description: - name: source_span - sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + name: shelf_static + sha256: a41d3f53c4adf0f57480578c1d61d90342cd617de7fc8077b1304643c2d85c1e url: "https://pub.dev" source: hosted - version: "1.10.0" - sprintf: + 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: sprintf - sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + 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: "7.0.0" + version: "1.10.0" stack_trace: dependency: transitive description: @@ -391,6 +361,14 @@ 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: @@ -399,38 +377,46 @@ packages: url: "https://pub.dev" source: hosted version: "0.6.1" - typed_data: + test_core: dependency: transitive description: - name: typed_data - sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + name: test_core + sha256: "4bef837e56375537055fdbbbf6dd458b1859881f4c7e6da936158f77d61ab265" url: "https://pub.dev" source: hosted - version: "1.3.2" - uuid: - dependency: transitive + version: "0.5.6" + toml: + dependency: "direct main" description: - name: uuid - sha256: cd210a09f7c18cbe5a02511718e0334de6559871052c90a90c0cca46a4aa81c8 + name: toml + sha256: "157c5dca5160fced243f3ce984117f729c788bb5e475504f3dbcda881accee44" url: "https://pub.dev" source: hosted - version: "4.3.3" - vector_math: + version: "0.14.0" + typed_data: dependency: transitive description: - name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + name: typed_data + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c url: "https://pub.dev" source: hosted - version: "2.1.4" + 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: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "0fae432c85c4ea880b33b497d32824b97795b04cdaa74d270219572a1f50268d" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "11.9.0" watcher: dependency: transitive description: @@ -439,8 +425,24 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.0" - yaml: + 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" @@ -448,5 +450,4 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.2.0-0 <4.0.0" - flutter: ">=3.0.0" + 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 0ce09934..00000000 --- a/example/android/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -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() - } -} - -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/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 70693e4a..00000000 --- a/example/ios/Runner/AppDelegate.swift +++ /dev/null @@ -1,13 +0,0 @@ -import UIKit -import Flutter - -@UIApplicationMain -@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 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 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({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-{l z-x3`7M}qzHsPV@$v#>H-TpjDh2UE$9g6sysUREDy_R(a)>=eHw-WAyfIN z*qb!_hW>G)Tu8nSw9yn#3wFMiLcfc4pY0ek1}8(NqkBR@t4{~oC>ryc-h_ByH(Cg5 z>ao-}771+xE3um9lWAY1FeQFxowa1(!J(;Jg*wrg!=6FdRX+t_<%z&d&?|Bn){>zm zZQj(aA_HeBY&OC^jj*)N`8fa^ePOU72VpInJoI1?`ty#lvlNzs(&MZX+R%2xS~5Kh zX*|AU4QE#~SgPzOXe9>tRj>hjU@c1k5Y_mW*Jp3fI;)1&g3j|zDgC+}2Q_v%YfDax z!?umcN^n}KYQ|a$Lr+51Nf9dkkYFSjZZjkma$0KOj+;aQ&721~t7QUKx61J3(P4P1 zstI~7-wOACnWP4=8oGOwz%vNDqD8w&Q`qcNGGrbbf&0s9L0De{4{mRS?o0MU+nR_! zrvshUau0G^DeMhM_v{5BuLjb#Hh@r23lDAk8oF(C+P0rsBpv85EP>4CVMx#04MOfG z;P%vktHcXwTj~+IE(~px)3*MY77e}p#|c>TD?sMatC0Tu4iKKJ0(X8jxQY*gYtxsC z(zYC$g|@+I+kY;dg_dE>scBf&bP1Nc@Hz<3R)V`=AGkc;8CXqdi=B4l2k|g;2%#m& z*jfX^%b!A8#bI!j9-0Fi0bOXl(-c^AB9|nQaE`*)Hw+o&jS9@7&Gov#HbD~#d{twV zXd^Tr^mWLfFh$@Dr$e;PBEz4(-2q1FF0}c;~B5sA}+Q>TOoP+t>wf)V9Iy=5ruQa;z)y zI9C9*oUga6=hxw6QasLPnee@3^Rr*M{CdaL5=R41nLs(AHk_=Y+A9$2&H(B7!_pURs&8aNw7?`&Z&xY_Ye z)~D5Bog^td-^QbUtkTirdyK^mTHAOuptDflut!#^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 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 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%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|DS{ng)j=2ux)_EzzJ773GmQ_Cic%3JJhC0t2cx>|v zJcVusIB!%F90{+}8hG3QU4KNeKmK%T>mN57NnCZ^56=0?&3@!j>a>B43pi{!u z7JyDj7`6d)qVp^R=%j>UIY6f+3`+qzIc!Y_=+uN^3BYV|o+$vGo-j-Wm<10%A=(Yk^beI{t%ld@yhKjq0iNjqN4XMGgQtbKubPM$JWBz}YA65k%dm*awtC^+f;a-x4+ddbH^7iDWGg&N0n#MW{kA|=8iMUiFYvMoDY@sPC#t$55gn6ykUTPAr`a@!(;np824>2xJthS z*ZdmT`g5-`BuJs`0LVhz+D9NNa3<=6m;cQLaF?tCv8)zcRSh66*Z|vXhG@$I%U~2l z?`Q zykI#*+rQ=z6Jm=Bui-SfpDYLA=|vzGE(dYm=OC8XM&MDo7ux4UF1~0J1+i%aCUpRe zt3L_uNyQ*cE(38Uy03H%I*)*Bh=Lb^Xj3?I^Hnbeq72(EOK^Y93CNp*uAA{5Lc=ky zx=~RKa4{iTm{_>_vSCm?$Ej=i6@=m%@VvAITnigVg{&@!7CDgs908761meDK5azA} z4?=NOH|PdvabgJ&fW2{Mo$Q0CcD8Qc84%{JPYt5EiG{MdLIAeX%T=D7NIP4%Hw}p9 zg)==!2Lbp#j{u_}hMiao9=!VSyx0gHbeCS`;q&vzeq|fs`y&^X-lso(Ls@-706qmA z7u*T5PMo_w3{se1t2`zWeO^hOvTsohG_;>J0wVqVe+n)AbQCx)yh9;w+J6?NF5Lmo zecS@ieAKL8%bVd@+-KT{yI|S}O>pYckUFs;ry9Ow$CD@ztz5K-*D$^{i(_1llhSh^ zEkL$}tsQt5>QA^;QgjgIfBDmcOgi5YDyu?t6vSnbp=1+@6D& z5MJ}B8q;bRlVoxasyhcUF1+)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@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@2x.png b/example/ios/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 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 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 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 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 dbe57859..00000000 --- a/example/lib/bdk_library.dart +++ /dev/null @@ -1,137 +0,0 @@ -import 'package:bdk_flutter/bdk_flutter.dart'; -import 'package:flutter/cupertino.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.testnet, - mnemonic: mnemonic, - ); - final descriptor = await Descriptor.newBip84( - secretKey: descriptorSecretKey, - network: Network.testnet, - keychain: KeychainKind.externalChain); - return descriptor; - } - - Future initializeBlockchain(bool isElectrumBlockchain) async { - if (isElectrumBlockchain) { - final blockchain = await Blockchain.create( - config: const BlockchainConfig.esplora( - config: EsploraConfig( - baseUrl: 'https://blockstream.info/testnet/api', - stopGap: 10))); - return blockchain; - } else { - final blockchain = await Blockchain.create( - config: const BlockchainConfig.electrum( - config: ElectrumConfig( - stopGap: 10, - timeout: 5, - retry: 5, - url: "ssl://electrum.blockstream.info:60002", - validateDomain: true))); - return blockchain; - } - } - - 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 aliceWallet) async { - try { - await aliceWallet.sync(blockchain: blockchain); - } on FormatException catch (e) { - debugPrint(e.message); - } - } - - Future getAddress(Wallet aliceWallet) async { - final address = await aliceWallet.getAddress( - addressIndex: const AddressIndex.increase()); - return address; - } - - Future getPsbtInput( - Wallet aliceWallet, LocalUtxo utxo, bool onlyWitnessUtxo) async { - final input = await aliceWallet.getPsbtInput( - utxo: utxo, onlyWitnessUtxo: onlyWitnessUtxo); - return input; - } - - Future> getUnConfirmedTransactions( - Wallet aliceWallet) async { - List unConfirmed = []; - final res = await aliceWallet.listTransactions(includeRaw: true); - for (var e in res) { - if (e.confirmationTime == null) unConfirmed.add(e); - } - return unConfirmed; - } - - Future> getConfirmedTransactions( - Wallet aliceWallet) async { - List confirmed = []; - final res = await aliceWallet.listTransactions(includeRaw: true); - - for (var e in res) { - if (e.confirmationTime != null) confirmed.add(e); - } - return confirmed; - } - - Future getBalance(Wallet aliceWallet) async { - final res = await aliceWallet.getBalance(); - return res; - } - - Future> listUnspend(Wallet aliceWallet) async { - final res = await aliceWallet.listUnspent(); - return res; - } - - Future estimateFeeRate( - int blocks, - Blockchain blockchain, - ) async { - final feeRate = await blockchain.estimateFee(target: blocks); - return feeRate; - } - - sendBitcoin( - Blockchain blockchain, Wallet aliceWallet, String addressStr) async { - try { - final txBuilder = TxBuilder(); - final address = await Address.fromString( - s: addressStr, network: (await aliceWallet.network())); - - final script = await address.scriptPubkey(); - final feeRate = await estimateFeeRate(25, blockchain); - final (psbt, _) = await txBuilder - .addRecipient(script, 750) - .feeRate(feeRate.satPerVb) - .finish(aliceWallet); - final isFinalized = await aliceWallet.sign(psbt: psbt); - if (isFinalized) { - final tx = await 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 4f12fa02..00000000 --- a/example/lib/main.dart +++ /dev/null @@ -1,6 +0,0 @@ -import 'package:bdk_flutter_example/simple_wallet.dart'; -import 'package:flutter/material.dart'; - -void main() { - runApp(const SimpleWallet()); -} diff --git a/example/lib/multi_sig_wallet.dart b/example/lib/multi_sig_wallet.dart deleted file mode 100644 index 395c74b8..00000000 --- a/example/lib/multi_sig_wallet.dart +++ /dev/null @@ -1,98 +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 = await secret.asPublic(); - 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 aliceWallet, Wallet bobWallet, - String addressStr) async { - try { - final txBuilder = TxBuilder(); - final address = await Address.fromString( - s: addressStr, network: (await aliceWallet.network())); - final script = await address.scriptPubkey(); - final feeRate = await blockchain.estimateFee(target: 25); - final (psbt, _) = await txBuilder - .addRecipient(script, 1000) - .feeRate(feeRate.satPerVb) - .finish(aliceWallet); - await aliceWallet.sign( - psbt: psbt, - signOptions: const SignOptions( - multiSig: true, - trustWitnessUtxo: false, - allowAllSighashes: true, - removePartialSigs: true, - tryFinalize: true, - signWithTapInternalKey: true, - allowGrinding: true)); - final isFinalized = await bobWallet.sign(psbt: psbt); - if (isFinalized) { - final tx = await 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/simple_wallet.dart deleted file mode 100644 index 02f1d0fd..00000000 --- a/example/lib/simple_wallet.dart +++ /dev/null @@ -1,330 +0,0 @@ -import 'package:bdk_flutter/bdk_flutter.dart'; -import 'package:flutter/foundation.dart'; -import 'package:flutter/material.dart'; - -import 'bdk_library.dart'; - -class SimpleWallet extends StatefulWidget { - const SimpleWallet({super.key}); - - @override - State createState() => _SimpleWalletState(); -} - -class _SimpleWalletState extends State { - String displayText = ""; - int balance = 0; - late Wallet aliceWallet; - 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(await res.asString()); - } - } - - restoreWallet() async { - final aliceMnemonic = await Mnemonic.fromString( - 'certain sense kiss guide crumble hint transfer crime much stereo warm coral'); - final aliceDescriptor = await lib.createDescriptor(aliceMnemonic); - aliceWallet = await lib.restoreWallet(aliceDescriptor); - setState(() { - displayText = "Wallets restored"; - }); - } - - initBlockchain(bool isElectrumBlockchain) async { - blockchain = await lib.initializeBlockchain(isElectrumBlockchain); - } - - sync() async { - if (blockchain == null) { - await initBlockchain(false); - } - await lib.sync(blockchain!, aliceWallet); - } - - getNewAddress() async { - final res = (await lib.getAddress(aliceWallet)); - debugPrint(await res.address.asString()); - setState(() async { - displayText = - "Address: ${await res.address.asString()} \n Index: ${res.index}"; - }); - } - - getUnConfirmedTransactions() async { - final unConfirmed = await lib.getUnConfirmedTransactions(aliceWallet); - 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 = await lib.getConfirmedTransactions(aliceWallet); - 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(aliceWallet); - setState(() { - balance = alice.total; - displayText = - "Total Balance: ${alice.total} \n Immature Balance: ${alice.immature}"; - }); - } - - listUnspent() async { - final res = await lib.listUnspend(aliceWallet); - 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() async { - await lib.sendBitcoin( - blockchain!, aliceWallet, "mv4rnyY3Su5gjcDNzbMLKBQkBicCtHUtFB"); - } - - @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(), - 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/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 d53ef643..00000000 --- a/example/macos/Runner/AppDelegate.swift +++ /dev/null @@ -1,9 +0,0 @@ -import Cocoa -import FlutterMacOS - -@NSApplicationMain -class AppDelegate: FlutterAppDelegate { - override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { - return true - } -} diff --git a/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json 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 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ⅅ8MglG&ER{i5lN315cO?EdHNLrg? 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 z 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 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 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 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 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 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 06bbff6a..00000000 --- a/example/pubspec.yaml +++ /dev/null @@ -1,83 +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 - - # 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 b7fadedc..00000000 --- a/flutter_rust_bridge.yaml +++ /dev/null @@ -1,6 +0,0 @@ -rust_input: rust/src/api/*.rs -dart_output: lib/src/generated/ -full_dep: true -c_output: ios/Classes/frb_generated.h -duplicated_c_output: [macos/Classes/frb_generated.h] -dart_entrypoint_class_name: CApi \ No newline at end of file diff --git a/gradle/plugin.gradle b/gradle/plugin.gradle new file mode 100644 index 00000000..12c49f11 --- /dev/null +++ b/gradle/plugin.gradle @@ -0,0 +1,172 @@ +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/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 c79716cb..00000000 --- a/ios/Classes/frb_generated.h +++ /dev/null @@ -1,1297 +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 *inner; -} 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_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 multi_sig; - 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_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_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_list_local_utxo { - struct wire_cst_local_utxo *ptr; - int32_t len; -} wire_cst_list_local_utxo; - -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_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_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; - -void frbgen_bdk_flutter_wire_bdk_blockchain_broadcast(int64_t port_, - struct wire_cst_bdk_blockchain *that, - struct wire_cst_bdk_transaction *transaction); - -void frbgen_bdk_flutter_wire_bdk_blockchain_estimate_fee(int64_t port_, - struct wire_cst_bdk_blockchain *that, - uint64_t target); - -void frbgen_bdk_flutter_wire_bdk_blockchain_get_block_hash(int64_t port_, - struct wire_cst_bdk_blockchain *that, - uint32_t height); - -void frbgen_bdk_flutter_wire_bdk_blockchain_get_height(int64_t port_, - struct wire_cst_bdk_blockchain *that); - -void frbgen_bdk_flutter_wire_bdk_blockchain_new(int64_t port_, - struct wire_cst_blockchain_config *blockchain_config); - -void frbgen_bdk_flutter_wire_bdk_descriptor_as_string(int64_t port_, - struct wire_cst_bdk_descriptor *that); - -void frbgen_bdk_flutter_wire_bdk_descriptor_as_string_private(int64_t port_, - struct wire_cst_bdk_descriptor *that); - -void frbgen_bdk_flutter_wire_bdk_descriptor_max_satisfaction_weight(int64_t port_, - struct wire_cst_bdk_descriptor *that); - -void frbgen_bdk_flutter_wire_bdk_descriptor_new(int64_t port_, - struct wire_cst_list_prim_u_8_strict *descriptor, - int32_t network); - -void frbgen_bdk_flutter_wire_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_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_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_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_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_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_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_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); - -void frbgen_bdk_flutter_wire_bdk_derivation_path_from_string(int64_t port_, - struct wire_cst_list_prim_u_8_strict *path); - -void frbgen_bdk_flutter_wire_bdk_descriptor_public_key_as_string(int64_t port_, - struct wire_cst_bdk_descriptor_public_key *that); - -void frbgen_bdk_flutter_wire_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_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_bdk_descriptor_public_key_from_string(int64_t port_, - struct wire_cst_list_prim_u_8_strict *public_key); - -void frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_as_public(int64_t port_, - struct wire_cst_bdk_descriptor_secret_key *ptr); - -void frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_as_string(int64_t port_, - struct wire_cst_bdk_descriptor_secret_key *that); - -void frbgen_bdk_flutter_wire_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_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_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_bdk_descriptor_secret_key_from_string(int64_t port_, - struct wire_cst_list_prim_u_8_strict *secret_key); - -void frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_secret_bytes(int64_t port_, - struct wire_cst_bdk_descriptor_secret_key *that); - -void frbgen_bdk_flutter_wire_bdk_mnemonic_as_string(int64_t port_, - struct wire_cst_bdk_mnemonic *that); - -void frbgen_bdk_flutter_wire_bdk_mnemonic_from_entropy(int64_t port_, - struct wire_cst_list_prim_u_8_loose *entropy); - -void frbgen_bdk_flutter_wire_bdk_mnemonic_from_string(int64_t port_, - struct wire_cst_list_prim_u_8_strict *mnemonic); - -void frbgen_bdk_flutter_wire_bdk_mnemonic_new(int64_t port_, int32_t word_count); - -void frbgen_bdk_flutter_wire_bdk_psbt_combine(int64_t port_, - struct wire_cst_bdk_psbt *ptr, - struct wire_cst_bdk_psbt *other); - -void frbgen_bdk_flutter_wire_bdk_psbt_extract_tx(int64_t port_, struct wire_cst_bdk_psbt *ptr); - -void frbgen_bdk_flutter_wire_bdk_psbt_fee_amount(int64_t port_, struct wire_cst_bdk_psbt *that); - -void frbgen_bdk_flutter_wire_bdk_psbt_fee_rate(int64_t port_, struct wire_cst_bdk_psbt *that); - -void frbgen_bdk_flutter_wire_bdk_psbt_from_str(int64_t port_, - struct wire_cst_list_prim_u_8_strict *psbt_base64); - -void frbgen_bdk_flutter_wire_bdk_psbt_json_serialize(int64_t port_, struct wire_cst_bdk_psbt *that); - -void frbgen_bdk_flutter_wire_bdk_psbt_serialize(int64_t port_, struct wire_cst_bdk_psbt *that); - -void frbgen_bdk_flutter_wire_bdk_psbt_txid(int64_t port_, struct wire_cst_bdk_psbt *that); - -void frbgen_bdk_flutter_wire_bdk_address_as_string(int64_t port_, - struct wire_cst_bdk_address *that); - -void frbgen_bdk_flutter_wire_bdk_address_from_script(int64_t port_, - struct wire_cst_bdk_script_buf *script, - int32_t network); - -void frbgen_bdk_flutter_wire_bdk_address_from_string(int64_t port_, - struct wire_cst_list_prim_u_8_strict *address, - int32_t network); - -void frbgen_bdk_flutter_wire_bdk_address_is_valid_for_network(int64_t port_, - struct wire_cst_bdk_address *that, - int32_t network); - -void frbgen_bdk_flutter_wire_bdk_address_network(int64_t port_, struct wire_cst_bdk_address *that); - -void frbgen_bdk_flutter_wire_bdk_address_payload(int64_t port_, struct wire_cst_bdk_address *that); - -void frbgen_bdk_flutter_wire_bdk_address_script(int64_t port_, struct wire_cst_bdk_address *ptr); - -void frbgen_bdk_flutter_wire_bdk_address_to_qr_uri(int64_t port_, - struct wire_cst_bdk_address *that); - -void frbgen_bdk_flutter_wire_bdk_script_buf_empty(int64_t port_); - -void frbgen_bdk_flutter_wire_bdk_script_buf_from_hex(int64_t port_, - struct wire_cst_list_prim_u_8_strict *s); - -void frbgen_bdk_flutter_wire_bdk_script_buf_with_capacity(int64_t port_, uintptr_t capacity); - -void frbgen_bdk_flutter_wire_bdk_transaction_from_bytes(int64_t port_, - struct wire_cst_list_prim_u_8_loose *transaction_bytes); - -void frbgen_bdk_flutter_wire_bdk_transaction_input(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire_bdk_transaction_is_coin_base(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire_bdk_transaction_is_explicitly_rbf(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire_bdk_transaction_is_lock_time_enabled(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire_bdk_transaction_lock_time(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire_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_bdk_transaction_output(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire_bdk_transaction_serialize(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire_bdk_transaction_size(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire_bdk_transaction_txid(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire_bdk_transaction_version(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire_bdk_transaction_vsize(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire_bdk_transaction_weight(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire_bdk_wallet_get_address(int64_t port_, - struct wire_cst_bdk_wallet *ptr, - struct wire_cst_address_index *address_index); - -void frbgen_bdk_flutter_wire_bdk_wallet_get_balance(int64_t port_, - struct wire_cst_bdk_wallet *that); - -void frbgen_bdk_flutter_wire_bdk_wallet_get_descriptor_for_keychain(int64_t port_, - struct wire_cst_bdk_wallet *ptr, - int32_t keychain); - -void frbgen_bdk_flutter_wire_bdk_wallet_get_internal_address(int64_t port_, - struct wire_cst_bdk_wallet *ptr, - struct wire_cst_address_index *address_index); - -void frbgen_bdk_flutter_wire_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); - -void frbgen_bdk_flutter_wire_bdk_wallet_is_mine(int64_t port_, - struct wire_cst_bdk_wallet *that, - struct wire_cst_bdk_script_buf *script); - -void frbgen_bdk_flutter_wire_bdk_wallet_list_transactions(int64_t port_, - struct wire_cst_bdk_wallet *that, - bool include_raw); - -void frbgen_bdk_flutter_wire_bdk_wallet_list_unspent(int64_t port_, - struct wire_cst_bdk_wallet *that); - -void frbgen_bdk_flutter_wire_bdk_wallet_network(int64_t port_, struct wire_cst_bdk_wallet *that); - -void frbgen_bdk_flutter_wire_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); - -void frbgen_bdk_flutter_wire_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_bdk_wallet_sync(int64_t port_, - struct wire_cst_bdk_wallet *ptr, - struct wire_cst_bdk_blockchain *blockchain); - -void frbgen_bdk_flutter_wire_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_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_prim_u_8_loose *data); - -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_AnyBlockchain(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_AnyBlockchain(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_ExtendedDescriptor(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_ExtendedDescriptor(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_MutexPartiallySignedTransaction(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_MutexPartiallySignedTransaction(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_MutexbdkWalletAnyDatabase(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_MutexbdkWalletAnyDatabase(const void *ptr); - -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_bitcoinbip32DerivationPath(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bitcoinbip32DerivationPath(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysDescriptorPublicKey(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysDescriptorPublicKey(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysDescriptorSecretKey(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysDescriptorSecretKey(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysKeyMap(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysKeyMap(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysbip39Mnemonic(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysbip39Mnemonic(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_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); - -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_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_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_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_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_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_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_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_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_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_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_AnyBlockchain); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_ExtendedDescriptor); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_MutexPartiallySignedTransaction); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_MutexbdkWalletAnyDatabase); - 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_bitcoinbip32DerivationPath); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysDescriptorPublicKey); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysDescriptorSecretKey); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysKeyMap); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysbip39Mnemonic); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_AnyBlockchain); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_ExtendedDescriptor); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_MutexPartiallySignedTransaction); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_MutexbdkWalletAnyDatabase); - 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_bitcoinbip32DerivationPath); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysDescriptorPublicKey); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysDescriptorSecretKey); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysKeyMap); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysbip39Mnemonic); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_from_script); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_from_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_is_valid_for_network); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_network); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_payload); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_script); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_to_qr_uri); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_blockchain_broadcast); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_blockchain_estimate_fee); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_blockchain_get_block_hash); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_blockchain_get_height); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_blockchain_new); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_derivation_path_from_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_as_string_private); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_max_satisfaction_weight); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip44); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip44_public); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip49); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip49_public); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip84); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip84_public); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip86); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip86_public); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_public_key_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_public_key_derive); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_public_key_extend); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_public_key_from_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_as_public); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_create); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_derive); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_extend); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_from_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_secret_bytes); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_mnemonic_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_mnemonic_from_entropy); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_mnemonic_from_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_mnemonic_new); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_combine); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_extract_tx); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_fee_amount); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_fee_rate); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_from_str); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_json_serialize); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_serialize); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_txid); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_script_buf_empty); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_script_buf_from_hex); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_script_buf_with_capacity); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_from_bytes); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_input); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_is_coin_base); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_is_explicitly_rbf); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_is_lock_time_enabled); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_lock_time); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_new); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_output); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_serialize); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_size); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_txid); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_version); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_vsize); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_weight); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_get_address); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_get_balance); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_get_descriptor_for_keychain); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_get_internal_address); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_get_psbt_input); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_is_mine); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_list_transactions); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_list_unspent); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_network); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_new); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_sign); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_sync); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_finish_bump_fee_tx_builder); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_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 06378f72..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.2-dev" - 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 d7b86031..00000000 --- a/lib/bdk_flutter.dart +++ /dev/null @@ -1,58 +0,0 @@ -///A Flutter library for the [Bitcoin Development Kit](https://bitcoindevkit.org/). -library bdk_flutter; - -export './src/generated/api/blockchain.dart' - hide - BdkBlockchain, - BlockchainConfig_Electrum, - BlockchainConfig_Esplora, - AnyBlockchain, - Auth_Cookie, - Auth_UserPass, - Auth_None, - BlockchainConfig_Rpc; -export './src/generated/api/descriptor.dart' - hide - BdkDescriptor, - ExtendedDescriptor, - KeysDescriptorSecretKey, - KeysDescriptorPublicKey, - KeysKeyMap; -export './src/generated/api/key.dart' - hide - BdkDerivationPath, - BdkDescriptorPublicKey, - BdkDescriptorSecretKey, - BitcoinBip32DerivationPath, - KeysBip39Mnemonic, - BdkMnemonic; -export './src/generated/api/psbt.dart' - hide MutexPartiallySignedTransaction, BdkPsbt; -export './src/generated/api/types.dart' - hide - BdkBitcoinAddress, - 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; -export './src/generated/api/wallet.dart' - hide - MutexBdkWalletAnyDatabase, - BdkWallet, - finishBumpFeeTxBuilder, - txBuilderFinish; -export './src/root.dart'; -export 'src/utils/exceptions.dart' hide mapToException, BdkFfiException; diff --git a/lib/src/generated/api/blockchain.dart b/lib/src/generated/api/blockchain.dart deleted file mode 100644 index d66bd784..00000000 --- a/lib/src/generated/api/blockchain.dart +++ /dev/null @@ -1,320 +0,0 @@ -// This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31. - -// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import - -import '../frb_generated.dart'; -import 'error.dart'; -import 'package:collection/collection.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'; - -// Rust type: RustOpaqueNom -@sealed -class AnyBlockchain extends RustOpaque { - AnyBlockchain.dcoDecode(List wire) - : super.dcoDecode(wire, _kStaticData); - - AnyBlockchain.sseDecode(int ptr, int externalSizeOnNative) - : super.sseDecode(ptr, externalSizeOnNative, _kStaticData); - - static final _kStaticData = RustArcStaticData( - rustArcIncrementStrongCount: - CApi.instance.api.rust_arc_increment_strong_count_AnyBlockchain, - rustArcDecrementStrongCount: - CApi.instance.api.rust_arc_decrement_strong_count_AnyBlockchain, - rustArcDecrementStrongCountPtr: - CApi.instance.api.rust_arc_decrement_strong_count_AnyBlockchainPtr, - ); -} - -@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, - }); - - Future broadcast( - {required BdkTransaction transaction, dynamic hint}) => - CApi.instance.api.bdkBlockchainBroadcast( - that: this, transaction: transaction, hint: hint); - - Future estimateFee({required int target, dynamic hint}) => - CApi.instance.api - .bdkBlockchainEstimateFee(that: this, target: target, hint: hint); - - Future getBlockHash({required int height, dynamic hint}) => - CApi.instance.api - .bdkBlockchainGetBlockHash(that: this, height: height, hint: hint); - - Future getHeight({dynamic hint}) => - CApi.instance.api.bdkBlockchainGetHeight(that: this, hint: hint); - - // HINT: Make it `#[frb(sync)]` to let it become the default constructor of Dart class. - static Future newInstance( - {required BlockchainConfig blockchainConfig, dynamic hint}) => - CApi.instance.api - .bdkBlockchainNew(blockchainConfig: blockchainConfig, hint: hint); - - @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 int 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 int stopGap; - - /// Socket timeout. - final int? 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 int startScriptCount; - - /// Time in unix seconds in which initial sync will start scanning from (0 to start from genesis). - final int startTime; - - /// Forces every sync to use `start_time` as import timestamp. - final bool forceStartTime; - - /// RPC poll rate (in seconds) to get state updates. - final int 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; -} - -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/generated/api/blockchain.freezed.dart b/lib/src/generated/api/blockchain.freezed.dart deleted file mode 100644 index 5fecef07..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#custom-getters-and-methods'); - -/// @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 4691f4dc..00000000 --- a/lib/src/generated/api/descriptor.dart +++ /dev/null @@ -1,221 +0,0 @@ -// This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31. - -// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import - -import '../frb_generated.dart'; -import 'blockchain.dart'; -import 'error.dart'; -import 'key.dart'; -import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; -import 'types.dart'; - -// Rust type: RustOpaqueNom -@sealed -class ExtendedDescriptor extends RustOpaque { - ExtendedDescriptor.dcoDecode(List wire) - : super.dcoDecode(wire, _kStaticData); - - ExtendedDescriptor.sseDecode(int ptr, int externalSizeOnNative) - : super.sseDecode(ptr, externalSizeOnNative, _kStaticData); - - static final _kStaticData = RustArcStaticData( - rustArcIncrementStrongCount: - CApi.instance.api.rust_arc_increment_strong_count_ExtendedDescriptor, - rustArcDecrementStrongCount: - CApi.instance.api.rust_arc_decrement_strong_count_ExtendedDescriptor, - rustArcDecrementStrongCountPtr: - CApi.instance.api.rust_arc_decrement_strong_count_ExtendedDescriptorPtr, - ); -} - -// Rust type: RustOpaqueNom -@sealed -class KeysDescriptorPublicKey extends RustOpaque { - KeysDescriptorPublicKey.dcoDecode(List wire) - : super.dcoDecode(wire, _kStaticData); - - KeysDescriptorPublicKey.sseDecode(int ptr, int externalSizeOnNative) - : super.sseDecode(ptr, externalSizeOnNative, _kStaticData); - - static final _kStaticData = RustArcStaticData( - rustArcIncrementStrongCount: CApi - .instance.api.rust_arc_increment_strong_count_KeysDescriptorPublicKey, - rustArcDecrementStrongCount: CApi - .instance.api.rust_arc_decrement_strong_count_KeysDescriptorPublicKey, - rustArcDecrementStrongCountPtr: CApi.instance.api - .rust_arc_decrement_strong_count_KeysDescriptorPublicKeyPtr, - ); -} - -// Rust type: RustOpaqueNom -@sealed -class KeysDescriptorSecretKey extends RustOpaque { - KeysDescriptorSecretKey.dcoDecode(List wire) - : super.dcoDecode(wire, _kStaticData); - - KeysDescriptorSecretKey.sseDecode(int ptr, int externalSizeOnNative) - : super.sseDecode(ptr, externalSizeOnNative, _kStaticData); - - static final _kStaticData = RustArcStaticData( - rustArcIncrementStrongCount: CApi - .instance.api.rust_arc_increment_strong_count_KeysDescriptorSecretKey, - rustArcDecrementStrongCount: CApi - .instance.api.rust_arc_decrement_strong_count_KeysDescriptorSecretKey, - rustArcDecrementStrongCountPtr: CApi.instance.api - .rust_arc_decrement_strong_count_KeysDescriptorSecretKeyPtr, - ); -} - -// Rust type: RustOpaqueNom -@sealed -class KeysKeyMap extends RustOpaque { - KeysKeyMap.dcoDecode(List wire) - : super.dcoDecode(wire, _kStaticData); - - KeysKeyMap.sseDecode(int ptr, int externalSizeOnNative) - : super.sseDecode(ptr, externalSizeOnNative, _kStaticData); - - static final _kStaticData = RustArcStaticData( - rustArcIncrementStrongCount: - CApi.instance.api.rust_arc_increment_strong_count_KeysKeyMap, - rustArcDecrementStrongCount: - CApi.instance.api.rust_arc_decrement_strong_count_KeysKeyMap, - rustArcDecrementStrongCountPtr: - CApi.instance.api.rust_arc_decrement_strong_count_KeysKeyMapPtr, - ); -} - -class BdkDescriptor { - final ExtendedDescriptor extendedDescriptor; - final KeysKeyMap keyMap; - - const BdkDescriptor({ - required this.extendedDescriptor, - required this.keyMap, - }); - - Future asString({dynamic hint}) => - CApi.instance.api.bdkDescriptorAsString(that: this, hint: hint); - - Future asStringPrivate({dynamic hint}) => - CApi.instance.api.bdkDescriptorAsStringPrivate(that: this, hint: hint); - - Future maxSatisfactionWeight({dynamic hint}) => CApi.instance.api - .bdkDescriptorMaxSatisfactionWeight(that: this, hint: hint); - - // HINT: Make it `#[frb(sync)]` to let it become the default constructor of Dart class. - static Future newInstance( - {required String descriptor, - required Network network, - dynamic hint}) => - CApi.instance.api.bdkDescriptorNew( - descriptor: descriptor, network: network, hint: hint); - - static Future newBip44( - {required BdkDescriptorSecretKey secretKey, - required KeychainKind keychainKind, - required Network network, - dynamic hint}) => - CApi.instance.api.bdkDescriptorNewBip44( - secretKey: secretKey, - keychainKind: keychainKind, - network: network, - hint: hint); - - static Future newBip44Public( - {required BdkDescriptorPublicKey publicKey, - required String fingerprint, - required KeychainKind keychainKind, - required Network network, - dynamic hint}) => - CApi.instance.api.bdkDescriptorNewBip44Public( - publicKey: publicKey, - fingerprint: fingerprint, - keychainKind: keychainKind, - network: network, - hint: hint); - - static Future newBip49( - {required BdkDescriptorSecretKey secretKey, - required KeychainKind keychainKind, - required Network network, - dynamic hint}) => - CApi.instance.api.bdkDescriptorNewBip49( - secretKey: secretKey, - keychainKind: keychainKind, - network: network, - hint: hint); - - static Future newBip49Public( - {required BdkDescriptorPublicKey publicKey, - required String fingerprint, - required KeychainKind keychainKind, - required Network network, - dynamic hint}) => - CApi.instance.api.bdkDescriptorNewBip49Public( - publicKey: publicKey, - fingerprint: fingerprint, - keychainKind: keychainKind, - network: network, - hint: hint); - - static Future newBip84( - {required BdkDescriptorSecretKey secretKey, - required KeychainKind keychainKind, - required Network network, - dynamic hint}) => - CApi.instance.api.bdkDescriptorNewBip84( - secretKey: secretKey, - keychainKind: keychainKind, - network: network, - hint: hint); - - static Future newBip84Public( - {required BdkDescriptorPublicKey publicKey, - required String fingerprint, - required KeychainKind keychainKind, - required Network network, - dynamic hint}) => - CApi.instance.api.bdkDescriptorNewBip84Public( - publicKey: publicKey, - fingerprint: fingerprint, - keychainKind: keychainKind, - network: network, - hint: hint); - - static Future newBip86( - {required BdkDescriptorSecretKey secretKey, - required KeychainKind keychainKind, - required Network network, - dynamic hint}) => - CApi.instance.api.bdkDescriptorNewBip86( - secretKey: secretKey, - keychainKind: keychainKind, - network: network, - hint: hint); - - static Future newBip86Public( - {required BdkDescriptorPublicKey publicKey, - required String fingerprint, - required KeychainKind keychainKind, - required Network network, - dynamic hint}) => - CApi.instance.api.bdkDescriptorNewBip86Public( - publicKey: publicKey, - fingerprint: fingerprint, - keychainKind: keychainKind, - network: network, - hint: hint); - - @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 c0cfe1a7..00000000 --- a/lib/src/generated/api/error.dart +++ /dev/null @@ -1,357 +0,0 @@ -// This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31. - -// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import - -import '../frb_generated.dart'; -import 'blockchain.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'; - -@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( - int field0, - ) = AddressError_InvalidWitnessProgramLength; - const factory AddressError.invalidSegwitV0ProgramLength( - int 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; - - /// 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( - int 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 int needed, - - /// Sats available for spending - required int 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 int 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( - int field0, - int 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 int requested, - required int 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( - int field0, - ) = HexError_OddLengthString; - const factory HexError.invalidLength( - int field0, - int 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 23895121..00000000 --- a/lib/src/generated/api/error.freezed.dart +++ /dev/null @@ -1,27433 +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#custom-getters-and-methods'); - -/// @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(int field0) invalidWitnessProgramLength, - required TResult Function(int 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(int field0)? invalidWitnessProgramLength, - TResult? Function(int 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(int field0)? invalidWitnessProgramLength, - TResult Function(int 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(int field0) invalidWitnessProgramLength, - required TResult Function(int 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(int field0)? invalidWitnessProgramLength, - TResult? Function(int 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(int field0)? invalidWitnessProgramLength, - TResult Function(int 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(int field0) invalidWitnessProgramLength, - required TResult Function(int 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(int field0)? invalidWitnessProgramLength, - TResult? Function(int 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(int field0)? invalidWitnessProgramLength, - TResult Function(int 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(int field0) invalidWitnessProgramLength, - required TResult Function(int 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(int field0)? invalidWitnessProgramLength, - TResult? Function(int 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(int field0)? invalidWitnessProgramLength, - TResult Function(int 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(int field0) invalidWitnessProgramLength, - required TResult Function(int 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(int field0)? invalidWitnessProgramLength, - TResult? Function(int 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(int field0)? invalidWitnessProgramLength, - TResult Function(int 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(int field0) invalidWitnessProgramLength, - required TResult Function(int 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(int field0)? invalidWitnessProgramLength, - TResult? Function(int 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(int field0)? invalidWitnessProgramLength, - TResult Function(int 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(int field0) invalidWitnessProgramLength, - required TResult Function(int 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(int field0)? invalidWitnessProgramLength, - TResult? Function(int 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(int field0)? invalidWitnessProgramLength, - TResult Function(int 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(int field0) invalidWitnessProgramLength, - required TResult Function(int 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(int field0)? invalidWitnessProgramLength, - TResult? Function(int 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(int field0)? invalidWitnessProgramLength, - TResult Function(int 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({int 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 int, - )); - } -} - -/// @nodoc - -class _$AddressError_InvalidWitnessProgramLengthImpl - extends AddressError_InvalidWitnessProgramLength { - const _$AddressError_InvalidWitnessProgramLengthImpl(this.field0) : super._(); - - @override - final int 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(int field0) invalidWitnessProgramLength, - required TResult Function(int 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(int field0)? invalidWitnessProgramLength, - TResult? Function(int 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(int field0)? invalidWitnessProgramLength, - TResult Function(int 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 int field0) = - _$AddressError_InvalidWitnessProgramLengthImpl; - const AddressError_InvalidWitnessProgramLength._() : super._(); - - int 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({int 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 int, - )); - } -} - -/// @nodoc - -class _$AddressError_InvalidSegwitV0ProgramLengthImpl - extends AddressError_InvalidSegwitV0ProgramLength { - const _$AddressError_InvalidSegwitV0ProgramLengthImpl(this.field0) - : super._(); - - @override - final int 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(int field0) invalidWitnessProgramLength, - required TResult Function(int 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(int field0)? invalidWitnessProgramLength, - TResult? Function(int 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(int field0)? invalidWitnessProgramLength, - TResult Function(int 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 int field0) = - _$AddressError_InvalidSegwitV0ProgramLengthImpl; - const AddressError_InvalidSegwitV0ProgramLength._() : super._(); - - int 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(int field0) invalidWitnessProgramLength, - required TResult Function(int 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(int field0)? invalidWitnessProgramLength, - TResult? Function(int 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(int field0)? invalidWitnessProgramLength, - TResult Function(int 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(int field0) invalidWitnessProgramLength, - required TResult Function(int 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(int field0)? invalidWitnessProgramLength, - TResult? Function(int 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(int field0)? invalidWitnessProgramLength, - TResult Function(int 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(int field0) invalidWitnessProgramLength, - required TResult Function(int 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(int field0)? invalidWitnessProgramLength, - TResult? Function(int 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(int field0)? invalidWitnessProgramLength, - TResult Function(int 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(int field0) invalidWitnessProgramLength, - required TResult Function(int 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(int field0)? invalidWitnessProgramLength, - TResult? Function(int 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(int field0)? invalidWitnessProgramLength, - TResult Function(int 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(int field0) invalidWitnessProgramLength, - required TResult Function(int 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(int field0)? invalidWitnessProgramLength, - TResult? Function(int 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(int field0)? invalidWitnessProgramLength, - TResult Function(int 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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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_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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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({int 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 int, - )); - } -} - -/// @nodoc - -class _$BdkError_OutputBelowDustLimitImpl - extends BdkError_OutputBelowDustLimit { - const _$BdkError_OutputBelowDustLimitImpl(this.field0) : super._(); - - @override - final int 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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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 int field0) = - _$BdkError_OutputBelowDustLimitImpl; - const BdkError_OutputBelowDustLimit._() : super._(); - - int 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({int needed, int 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 int, - available: null == available - ? _value.available - : available // ignore: cast_nullable_to_non_nullable - as int, - )); - } -} - -/// @nodoc - -class _$BdkError_InsufficientFundsImpl extends BdkError_InsufficientFunds { - const _$BdkError_InsufficientFundsImpl( - {required this.needed, required this.available}) - : super._(); - - /// Sats needed for some transaction - @override - final int needed; - - /// Sats available for spending - @override - final int 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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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 int needed, - required final int available}) = _$BdkError_InsufficientFundsImpl; - const BdkError_InsufficientFunds._() : super._(); - - /// Sats needed for some transaction - int get needed; - - /// Sats available for spending - int 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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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({int 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 int, - )); - } -} - -/// @nodoc - -class _$BdkError_FeeTooLowImpl extends BdkError_FeeTooLow { - const _$BdkError_FeeTooLowImpl({required this.needed}) : super._(); - - /// Required fee absolute value (satoshi) - @override - final int 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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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 int needed}) = - _$BdkError_FeeTooLowImpl; - const BdkError_FeeTooLow._() : super._(); - - /// Required fee absolute value (satoshi) - int 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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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({int field0, int 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 int, - null == field1 - ? _value.field1 - : field1 // ignore: cast_nullable_to_non_nullable - as int, - )); - } -} - -/// @nodoc - -class _$BdkError_MissingCachedScriptsImpl - extends BdkError_MissingCachedScripts { - const _$BdkError_MissingCachedScriptsImpl(this.field0, this.field1) - : super._(); - - @override - final int field0; - @override - final int 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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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 int field0, final int field1) = _$BdkError_MissingCachedScriptsImpl; - const BdkError_MissingCachedScripts._() : super._(); - - int get field0; - int 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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, - required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, - TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(int requested, int 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(int requested, int 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(int requested, int 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(int requested, int 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(int requested, int 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(int requested, int 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({int requested, int 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 int, - max: null == max - ? _value.max - : max // ignore: cast_nullable_to_non_nullable - as int, - )); - } -} - -/// @nodoc - -class _$ConsensusError_OversizedVectorAllocationImpl - extends ConsensusError_OversizedVectorAllocation { - const _$ConsensusError_OversizedVectorAllocationImpl( - {required this.requested, required this.max}) - : super._(); - - @override - final int requested; - @override - final int 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(int requested, int 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(int requested, int 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(int requested, int 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 int requested, - required final int max}) = _$ConsensusError_OversizedVectorAllocationImpl; - const ConsensusError_OversizedVectorAllocation._() : super._(); - - int get requested; - int 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(int requested, int 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(int requested, int 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(int requested, int 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(int requested, int 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(int requested, int 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(int requested, int 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(int requested, int 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(int requested, int 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(int requested, int 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(int requested, int 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(int requested, int 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(int requested, int 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 { - int get field0 => throw _privateConstructorUsedError; - @optionalTypeArgs - TResult when({ - required TResult Function(int field0) invalidChar, - required TResult Function(int field0) oddLengthString, - required TResult Function(int field0, int field1) invalidLength, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int field0)? invalidChar, - TResult? Function(int field0)? oddLengthString, - TResult? Function(int field0, int field1)? invalidLength, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int field0)? invalidChar, - TResult Function(int field0)? oddLengthString, - TResult Function(int field0, int 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; - - @JsonKey(ignore: true) - $HexErrorCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $HexErrorCopyWith<$Res> { - factory $HexErrorCopyWith(HexError value, $Res Function(HexError) then) = - _$HexErrorCopyWithImpl<$Res, HexError>; - @useResult - $Res call({int field0}); -} - -/// @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; - - @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 _$$HexError_InvalidCharImplCopyWith<$Res> - implements $HexErrorCopyWith<$Res> { - factory _$$HexError_InvalidCharImplCopyWith(_$HexError_InvalidCharImpl value, - $Res Function(_$HexError_InvalidCharImpl) then) = - __$$HexError_InvalidCharImplCopyWithImpl<$Res>; - @override - @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(int field0) oddLengthString, - required TResult Function(int field0, int field1) invalidLength, - }) { - return invalidChar(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int field0)? invalidChar, - TResult? Function(int field0)? oddLengthString, - TResult? Function(int field0, int field1)? invalidLength, - }) { - return invalidChar?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int field0)? invalidChar, - TResult Function(int field0)? oddLengthString, - TResult Function(int field0, int 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; - @override - @JsonKey(ignore: true) - _$$HexError_InvalidCharImplCopyWith<_$HexError_InvalidCharImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$HexError_OddLengthStringImplCopyWith<$Res> - implements $HexErrorCopyWith<$Res> { - factory _$$HexError_OddLengthStringImplCopyWith( - _$HexError_OddLengthStringImpl value, - $Res Function(_$HexError_OddLengthStringImpl) then) = - __$$HexError_OddLengthStringImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({int 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 int, - )); - } -} - -/// @nodoc - -class _$HexError_OddLengthStringImpl extends HexError_OddLengthString { - const _$HexError_OddLengthStringImpl(this.field0) : super._(); - - @override - final int 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(int field0) oddLengthString, - required TResult Function(int field0, int field1) invalidLength, - }) { - return oddLengthString(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int field0)? invalidChar, - TResult? Function(int field0)? oddLengthString, - TResult? Function(int field0, int field1)? invalidLength, - }) { - return oddLengthString?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int field0)? invalidChar, - TResult Function(int field0)? oddLengthString, - TResult Function(int field0, int 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 int field0) = - _$HexError_OddLengthStringImpl; - const HexError_OddLengthString._() : super._(); - - @override - int get field0; - @override - @JsonKey(ignore: true) - _$$HexError_OddLengthStringImplCopyWith<_$HexError_OddLengthStringImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$HexError_InvalidLengthImplCopyWith<$Res> - implements $HexErrorCopyWith<$Res> { - factory _$$HexError_InvalidLengthImplCopyWith( - _$HexError_InvalidLengthImpl value, - $Res Function(_$HexError_InvalidLengthImpl) then) = - __$$HexError_InvalidLengthImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({int field0, int 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 int, - null == field1 - ? _value.field1 - : field1 // ignore: cast_nullable_to_non_nullable - as int, - )); - } -} - -/// @nodoc - -class _$HexError_InvalidLengthImpl extends HexError_InvalidLength { - const _$HexError_InvalidLengthImpl(this.field0, this.field1) : super._(); - - @override - final int field0; - @override - final int 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(int field0) oddLengthString, - required TResult Function(int field0, int field1) invalidLength, - }) { - return invalidLength(field0, field1); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int field0)? invalidChar, - TResult? Function(int field0)? oddLengthString, - TResult? Function(int field0, int field1)? invalidLength, - }) { - return invalidLength?.call(field0, field1); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int field0)? invalidChar, - TResult Function(int field0)? oddLengthString, - TResult Function(int field0, int 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 int field0, final int field1) = - _$HexError_InvalidLengthImpl; - const HexError_InvalidLength._() : super._(); - - @override - int get field0; - int get field1; - @override - @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 41cd51f9..00000000 --- a/lib/src/generated/api/key.dart +++ /dev/null @@ -1,206 +0,0 @@ -// This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31. - -// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import - -import '../frb_generated.dart'; -import 'blockchain.dart'; -import 'descriptor.dart'; -import 'error.dart'; -import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; -import 'types.dart'; - -// Rust type: RustOpaqueNom -@sealed -class BitcoinBip32DerivationPath extends RustOpaque { - BitcoinBip32DerivationPath.dcoDecode(List wire) - : super.dcoDecode(wire, _kStaticData); - - BitcoinBip32DerivationPath.sseDecode(int ptr, int externalSizeOnNative) - : super.sseDecode(ptr, externalSizeOnNative, _kStaticData); - - static final _kStaticData = RustArcStaticData( - rustArcIncrementStrongCount: CApi.instance.api - .rust_arc_increment_strong_count_BitcoinBip32DerivationPath, - rustArcDecrementStrongCount: CApi.instance.api - .rust_arc_decrement_strong_count_BitcoinBip32DerivationPath, - rustArcDecrementStrongCountPtr: CApi.instance.api - .rust_arc_decrement_strong_count_BitcoinBip32DerivationPathPtr, - ); -} - -// Rust type: RustOpaqueNom -@sealed -class KeysBip39Mnemonic extends RustOpaque { - KeysBip39Mnemonic.dcoDecode(List wire) - : super.dcoDecode(wire, _kStaticData); - - KeysBip39Mnemonic.sseDecode(int ptr, int externalSizeOnNative) - : super.sseDecode(ptr, externalSizeOnNative, _kStaticData); - - static final _kStaticData = RustArcStaticData( - rustArcIncrementStrongCount: - CApi.instance.api.rust_arc_increment_strong_count_KeysBip39Mnemonic, - rustArcDecrementStrongCount: - CApi.instance.api.rust_arc_decrement_strong_count_KeysBip39Mnemonic, - rustArcDecrementStrongCountPtr: - CApi.instance.api.rust_arc_decrement_strong_count_KeysBip39MnemonicPtr, - ); -} - -class BdkDerivationPath { - final BitcoinBip32DerivationPath ptr; - - const BdkDerivationPath({ - required this.ptr, - }); - - static Future fromString( - {required String path, dynamic hint}) => - CApi.instance.api.bdkDerivationPathFromString(path: path, hint: hint); - - @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 KeysDescriptorPublicKey ptr; - - const BdkDescriptorPublicKey({ - required this.ptr, - }); - - Future asString({dynamic hint}) => - CApi.instance.api.bdkDescriptorPublicKeyAsString(that: this, hint: hint); - - static Future derive( - {required BdkDescriptorPublicKey ptr, - required BdkDerivationPath path, - dynamic hint}) => - CApi.instance.api - .bdkDescriptorPublicKeyDerive(ptr: ptr, path: path, hint: hint); - - static Future extend( - {required BdkDescriptorPublicKey ptr, - required BdkDerivationPath path, - dynamic hint}) => - CApi.instance.api - .bdkDescriptorPublicKeyExtend(ptr: ptr, path: path, hint: hint); - - static Future fromString( - {required String publicKey, dynamic hint}) => - CApi.instance.api - .bdkDescriptorPublicKeyFromString(publicKey: publicKey, hint: hint); - - @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 KeysDescriptorSecretKey ptr; - - const BdkDescriptorSecretKey({ - required this.ptr, - }); - - static Future asPublic( - {required BdkDescriptorSecretKey ptr, dynamic hint}) => - CApi.instance.api.bdkDescriptorSecretKeyAsPublic(ptr: ptr, hint: hint); - - Future asString({dynamic hint}) => - CApi.instance.api.bdkDescriptorSecretKeyAsString(that: this, hint: hint); - - static Future create( - {required Network network, - required BdkMnemonic mnemonic, - String? password, - dynamic hint}) => - CApi.instance.api.bdkDescriptorSecretKeyCreate( - network: network, mnemonic: mnemonic, password: password, hint: hint); - - static Future derive( - {required BdkDescriptorSecretKey ptr, - required BdkDerivationPath path, - dynamic hint}) => - CApi.instance.api - .bdkDescriptorSecretKeyDerive(ptr: ptr, path: path, hint: hint); - - static Future extend( - {required BdkDescriptorSecretKey ptr, - required BdkDerivationPath path, - dynamic hint}) => - CApi.instance.api - .bdkDescriptorSecretKeyExtend(ptr: ptr, path: path, hint: hint); - - static Future fromString( - {required String secretKey, dynamic hint}) => - CApi.instance.api - .bdkDescriptorSecretKeyFromString(secretKey: secretKey, hint: hint); - - /// Get the private key as bytes. - Future secretBytes({dynamic hint}) => CApi.instance.api - .bdkDescriptorSecretKeySecretBytes(that: this, hint: hint); - - @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 KeysBip39Mnemonic ptr; - - const BdkMnemonic({ - required this.ptr, - }); - - /// Returns Mnemonic as string - Future asString({dynamic hint}) => - CApi.instance.api.bdkMnemonicAsString(that: this, hint: hint); - - /// 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, dynamic hint}) => - CApi.instance.api.bdkMnemonicFromEntropy(entropy: entropy, hint: hint); - - /// Parse a Mnemonic with given string - static Future fromString( - {required String mnemonic, dynamic hint}) => - CApi.instance.api.bdkMnemonicFromString(mnemonic: mnemonic, hint: hint); - - // 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, dynamic hint}) => - CApi.instance.api.bdkMnemonicNew(wordCount: wordCount, hint: hint); - - @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 67a75d30..00000000 --- a/lib/src/generated/api/psbt.dart +++ /dev/null @@ -1,82 +0,0 @@ -// This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31. - -// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import - -import '../frb_generated.dart'; -import 'blockchain.dart'; -import 'error.dart'; -import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; -import 'types.dart'; - -// Rust type: RustOpaqueNom> -@sealed -class MutexPartiallySignedTransaction extends RustOpaque { - MutexPartiallySignedTransaction.dcoDecode(List wire) - : super.dcoDecode(wire, _kStaticData); - - MutexPartiallySignedTransaction.sseDecode(int ptr, int externalSizeOnNative) - : super.sseDecode(ptr, externalSizeOnNative, _kStaticData); - - static final _kStaticData = RustArcStaticData( - rustArcIncrementStrongCount: CApi.instance.api - .rust_arc_increment_strong_count_MutexPartiallySignedTransaction, - rustArcDecrementStrongCount: CApi.instance.api - .rust_arc_decrement_strong_count_MutexPartiallySignedTransaction, - rustArcDecrementStrongCountPtr: CApi.instance.api - .rust_arc_decrement_strong_count_MutexPartiallySignedTransactionPtr, - ); -} - -class BdkPsbt { - final MutexPartiallySignedTransaction ptr; - - const BdkPsbt({ - required this.ptr, - }); - - /// 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, dynamic hint}) => - CApi.instance.api.bdkPsbtCombine(ptr: ptr, other: other, hint: hint); - - /// Return the transaction. - static Future extractTx( - {required BdkPsbt ptr, dynamic hint}) => - CApi.instance.api.bdkPsbtExtractTx(ptr: ptr, hint: hint); - - /// 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. - Future feeAmount({dynamic hint}) => - CApi.instance.api.bdkPsbtFeeAmount(that: this, hint: hint); - - /// 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. - Future feeRate({dynamic hint}) => - CApi.instance.api.bdkPsbtFeeRate(that: this, hint: hint); - - static Future fromStr({required String psbtBase64, dynamic hint}) => - CApi.instance.api.bdkPsbtFromStr(psbtBase64: psbtBase64, hint: hint); - - /// Serialize the PSBT data structure as a String of JSON. - Future jsonSerialize({dynamic hint}) => - CApi.instance.api.bdkPsbtJsonSerialize(that: this, hint: hint); - - Future serialize({dynamic hint}) => - CApi.instance.api.bdkPsbtSerialize(that: this, hint: hint); - - Future txid({dynamic hint}) => - CApi.instance.api.bdkPsbtTxid(that: this, hint: hint); - - @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 fe8e99f3..00000000 --- a/lib/src/generated/api/types.dart +++ /dev/null @@ -1,846 +0,0 @@ -// This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31. - -// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import - -import '../frb_generated.dart'; -import 'blockchain.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'; - -// Rust type: RustOpaqueNom -@sealed -class BdkBitcoinAddress extends RustOpaque { - BdkBitcoinAddress.dcoDecode(List wire) - : super.dcoDecode(wire, _kStaticData); - - BdkBitcoinAddress.sseDecode(int ptr, int externalSizeOnNative) - : super.sseDecode(ptr, externalSizeOnNative, _kStaticData); - - static final _kStaticData = RustArcStaticData( - rustArcIncrementStrongCount: - CApi.instance.api.rust_arc_increment_strong_count_BdkBitcoinAddress, - rustArcDecrementStrongCount: - CApi.instance.api.rust_arc_decrement_strong_count_BdkBitcoinAddress, - rustArcDecrementStrongCountPtr: - CApi.instance.api.rust_arc_decrement_strong_count_BdkBitcoinAddressPtr, - ); -} - -@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 int immature; - - /// Unconfirmed UTXOs generated by a wallet tx - final int trustedPending; - - /// Unconfirmed UTXOs received from an external wallet - final int untrustedPending; - - /// Confirmed and immediately spendable balance - final int confirmed; - - /// Get sum of trusted_pending and confirmed coins - final int spendable; - - /// Get the whole balance visible to the wallet - final int 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 BdkBitcoinAddress ptr; - - const BdkAddress({ - required this.ptr, - }); - - Future asString({dynamic hint}) => - CApi.instance.api.bdkAddressAsString(that: this, hint: hint); - - static Future fromScript( - {required BdkScriptBuf script, - required Network network, - dynamic hint}) => - CApi.instance.api - .bdkAddressFromScript(script: script, network: network, hint: hint); - - static Future fromString( - {required String address, required Network network, dynamic hint}) => - CApi.instance.api - .bdkAddressFromString(address: address, network: network, hint: hint); - - Future isValidForNetwork({required Network network, dynamic hint}) => - CApi.instance.api.bdkAddressIsValidForNetwork( - that: this, network: network, hint: hint); - - ///The network on which this address is usable. - Future network({dynamic hint}) => - CApi.instance.api.bdkAddressNetwork(that: this, hint: hint); - - Future payload({dynamic hint}) => - CApi.instance.api.bdkAddressPayload(that: this, hint: hint); - - static Future script({required BdkAddress ptr, dynamic hint}) => - CApi.instance.api.bdkAddressScript(ptr: ptr, hint: hint); - - ///Creates a URI string bitcoin:address optimized to be encoded in QR codes. - Future toQrUri({dynamic hint}) => - CApi.instance.api.bdkAddressToQrUri(that: this, hint: hint); - - @override - int get hashCode => ptr.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is BdkAddress && - runtimeType == other.runtimeType && - ptr == other.ptr; -} - -class BdkScriptBuf { - final Uint8List bytes; - - const BdkScriptBuf({ - required this.bytes, - }); - - ///Creates a new empty script. - static Future empty({dynamic hint}) => - CApi.instance.api.bdkScriptBufEmpty(hint: hint); - - static Future fromHex({required String s, dynamic hint}) => - CApi.instance.api.bdkScriptBufFromHex(s: s, hint: hint); - - ///Creates a new empty script with pre-allocated capacity. - static Future withCapacity( - {required int capacity, dynamic hint}) => - CApi.instance.api - .bdkScriptBufWithCapacity(capacity: capacity, hint: hint); - - @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 inner; - - const BdkTransaction({ - required this.inner, - }); - - static Future fromBytes( - {required List transactionBytes, dynamic hint}) => - CApi.instance.api.bdkTransactionFromBytes( - transactionBytes: transactionBytes, hint: hint); - - ///List of transaction inputs. - Future> input({dynamic hint}) => - CApi.instance.api.bdkTransactionInput(that: this, hint: hint); - - ///Is this a coin base transaction? - Future isCoinBase({dynamic hint}) => - CApi.instance.api.bdkTransactionIsCoinBase(that: this, hint: hint); - - ///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({dynamic hint}) => - CApi.instance.api.bdkTransactionIsExplicitlyRbf(that: this, hint: hint); - - ///Returns true if this transactions nLockTime is enabled (BIP-65 ). - Future isLockTimeEnabled({dynamic hint}) => - CApi.instance.api.bdkTransactionIsLockTimeEnabled(that: this, hint: hint); - - ///Block height or timestamp. Transaction cannot be included in a block until this height/time. - Future lockTime({dynamic hint}) => - CApi.instance.api.bdkTransactionLockTime(that: this, hint: hint); - - // 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, - dynamic hint}) => - CApi.instance.api.bdkTransactionNew( - version: version, - lockTime: lockTime, - input: input, - output: output, - hint: hint); - - ///List of transaction outputs. - Future> output({dynamic hint}) => - CApi.instance.api.bdkTransactionOutput(that: this, hint: hint); - - ///Encodes an object into a vector. - Future serialize({dynamic hint}) => - CApi.instance.api.bdkTransactionSerialize(that: this, hint: hint); - - ///Returns the regular byte-wise consensus-serialized size of this transaction. - Future size({dynamic hint}) => - CApi.instance.api.bdkTransactionSize(that: this, hint: hint); - - ///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({dynamic hint}) => - CApi.instance.api.bdkTransactionTxid(that: this, hint: hint); - - ///The protocol version, is currently expected to be 1 or 2 (BIP 68). - Future version({dynamic hint}) => - CApi.instance.api.bdkTransactionVersion(that: this, hint: hint); - - ///Returns the “virtual size†(vsize) of this transaction. - /// - Future vsize({dynamic hint}) => - CApi.instance.api.bdkTransactionVsize(that: this, hint: hint); - - ///Returns the regular byte-wise consensus-serialized size of this transaction. - Future weight({dynamic hint}) => - CApi.instance.api.bdkTransactionWeight(that: this, hint: hint); - - @override - int get hashCode => inner.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is BdkTransaction && - runtimeType == other.runtimeType && - inner == other.inner; -} - -///Block height and timestamp of a block -class BlockTime { - ///Confirmation block height - final int height; - - ///Confirmation block timestamp - final int 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, -} - -@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; -} - -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; -} - -/// A output script and an amount of satoshis. -class ScriptAmount { - final BdkScriptBuf script; - final int 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 { - final bool multiSig; - - /// 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.multiSig, - required this.trustWitnessUtxo, - this.assumeHeight, - required this.allowAllSighashes, - required this.removePartialSigs, - required this.tryFinalize, - required this.signWithTapInternalKey, - required this.allowGrinding, - }); - - @override - int get hashCode => - multiSig.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 && - multiSig == other.multiSig && - 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 int received; - - /// Sent value (sats) - /// Sum of owned inputs of this transaction. - final int 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 int? 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 int 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 6b9d7255..00000000 --- a/lib/src/generated/api/types.freezed.dart +++ /dev/null @@ -1,2258 +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#custom-getters-and-methods'); - -/// @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 _$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; -} diff --git a/lib/src/generated/api/wallet.dart b/lib/src/generated/api/wallet.dart deleted file mode 100644 index 51b15058..00000000 --- a/lib/src/generated/api/wallet.dart +++ /dev/null @@ -1,203 +0,0 @@ -// This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31. - -// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import - -import '../frb_generated.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'; - -Future<(BdkPsbt, TransactionDetails)> finishBumpFeeTxBuilder( - {required String txid, - required double feeRate, - BdkAddress? allowShrinking, - required BdkWallet wallet, - required bool enableRbf, - int? nSequence, - dynamic hint}) => - CApi.instance.api.finishBumpFeeTxBuilder( - txid: txid, - feeRate: feeRate, - allowShrinking: allowShrinking, - wallet: wallet, - enableRbf: enableRbf, - nSequence: nSequence, - hint: hint); - -Future<(BdkPsbt, TransactionDetails)> txBuilderFinish( - {required BdkWallet wallet, - required List recipients, - required List utxos, - (OutPoint, Input, int)? foreignUtxo, - required List unSpendable, - required ChangeSpendPolicy changePolicy, - required bool manuallySelectedOnly, - double? feeRate, - int? feeAbsolute, - required bool drainWallet, - BdkScriptBuf? drainTo, - RbfValue? rbf, - required List data, - dynamic hint}) => - CApi.instance.api.txBuilderFinish( - wallet: wallet, - recipients: recipients, - utxos: utxos, - foreignUtxo: foreignUtxo, - unSpendable: unSpendable, - changePolicy: changePolicy, - manuallySelectedOnly: manuallySelectedOnly, - feeRate: feeRate, - feeAbsolute: feeAbsolute, - drainWallet: drainWallet, - drainTo: drainTo, - rbf: rbf, - data: data, - hint: hint); - -// Rust type: RustOpaqueNom >> -@sealed -class MutexBdkWalletAnyDatabase extends RustOpaque { - MutexBdkWalletAnyDatabase.dcoDecode(List wire) - : super.dcoDecode(wire, _kStaticData); - - MutexBdkWalletAnyDatabase.sseDecode(int ptr, int externalSizeOnNative) - : super.sseDecode(ptr, externalSizeOnNative, _kStaticData); - - static final _kStaticData = RustArcStaticData( - rustArcIncrementStrongCount: CApi - .instance.api.rust_arc_increment_strong_count_MutexBdkWalletAnyDatabase, - rustArcDecrementStrongCount: CApi - .instance.api.rust_arc_decrement_strong_count_MutexBdkWalletAnyDatabase, - rustArcDecrementStrongCountPtr: CApi.instance.api - .rust_arc_decrement_strong_count_MutexBdkWalletAnyDatabasePtr, - ); -} - -class BdkWallet { - final MutexBdkWalletAnyDatabase 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 Future<(BdkAddress, int)> getAddress( - {required BdkWallet ptr, - required AddressIndex addressIndex, - dynamic hint}) => - CApi.instance.api.bdkWalletGetAddress( - ptr: ptr, addressIndex: addressIndex, hint: hint); - - /// 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. - Future getBalance({dynamic hint}) => - CApi.instance.api.bdkWalletGetBalance(that: this, hint: hint); - - ///Returns the descriptor used to create addresses for a particular keychain. - static Future getDescriptorForKeychain( - {required BdkWallet ptr, - required KeychainKind keychain, - dynamic hint}) => - CApi.instance.api.bdkWalletGetDescriptorForKeychain( - ptr: ptr, keychain: keychain, hint: hint); - - /// 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 Future<(BdkAddress, int)> getInternalAddress( - {required BdkWallet ptr, - required AddressIndex addressIndex, - dynamic hint}) => - CApi.instance.api.bdkWalletGetInternalAddress( - ptr: ptr, addressIndex: addressIndex, hint: hint); - - ///get the corresponding PSBT Input for a LocalUtxo - Future getPsbtInput( - {required LocalUtxo utxo, - required bool onlyWitnessUtxo, - PsbtSigHashType? sighashType, - dynamic hint}) => - CApi.instance.api.bdkWalletGetPsbtInput( - that: this, - utxo: utxo, - onlyWitnessUtxo: onlyWitnessUtxo, - sighashType: sighashType, - hint: hint); - - /// Return whether or not a script is part of this wallet (either internal or external). - Future isMine({required BdkScriptBuf script, dynamic hint}) => - CApi.instance.api.bdkWalletIsMine(that: this, script: script, hint: hint); - - /// 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. - Future> listTransactions( - {required bool includeRaw, dynamic hint}) => - CApi.instance.api.bdkWalletListTransactions( - that: this, includeRaw: includeRaw, hint: hint); - - /// 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. - Future> listUnspent({dynamic hint}) => - CApi.instance.api.bdkWalletListUnspent(that: this, hint: hint); - - /// Get the Bitcoin network the wallet is using. - Future network({dynamic hint}) => - CApi.instance.api.bdkWalletNetwork(that: this, hint: hint); - - // 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, - dynamic hint}) => - CApi.instance.api.bdkWalletNew( - descriptor: descriptor, - changeDescriptor: changeDescriptor, - network: network, - databaseConfig: databaseConfig, - hint: hint); - - /// 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, - dynamic hint}) => - CApi.instance.api.bdkWalletSign( - ptr: ptr, psbt: psbt, signOptions: signOptions, hint: hint); - - /// Sync the internal database with the blockchain. - static Future sync( - {required BdkWallet ptr, - required BdkBlockchain blockchain, - dynamic hint}) => - CApi.instance.api - .bdkWalletSync(ptr: ptr, blockchain: blockchain, hint: hint); - - @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 0b4c7516..00000000 --- a/lib/src/generated/frb_generated.dart +++ /dev/null @@ -1,7062 +0,0 @@ -// This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31. - -// 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.io.dart' if (dart.library.html) 'frb_generated.web.dart'; -import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; - -/// Main entrypoint of the Rust API -class CApi extends BaseEntrypoint { - @internal - static final instance = CApi._(); - - CApi._(); - - /// Initialize flutter_rust_bridge - static Future init({ - CApiApi? 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 => - CApiApiImpl.new; - - @override - WireConstructor get wireConstructor => CApiWire.fromExternalLibrary; - - @override - Future executeRustInitializers() async {} - - @override - ExternalLibraryLoaderConfig get defaultExternalLibraryLoaderConfig => - kDefaultExternalLibraryLoaderConfig; - - @override - String get codegenVersion => '2.0.0-dev.31'; - - static const kDefaultExternalLibraryLoaderConfig = - ExternalLibraryLoaderConfig( - stem: 'bdk_flutter', - ioDirectory: 'rust/target/release/', - webPrefix: 'pkg/', - ); -} - -abstract class CApiApi extends BaseApi { - Future bdkBlockchainBroadcast( - {required BdkBlockchain that, - required BdkTransaction transaction, - dynamic hint}); - - Future bdkBlockchainEstimateFee( - {required BdkBlockchain that, required int target, dynamic hint}); - - Future bdkBlockchainGetBlockHash( - {required BdkBlockchain that, required int height, dynamic hint}); - - Future bdkBlockchainGetHeight( - {required BdkBlockchain that, dynamic hint}); - - Future bdkBlockchainNew( - {required BlockchainConfig blockchainConfig, dynamic hint}); - - Future bdkDescriptorAsString( - {required BdkDescriptor that, dynamic hint}); - - Future bdkDescriptorAsStringPrivate( - {required BdkDescriptor that, dynamic hint}); - - Future bdkDescriptorMaxSatisfactionWeight( - {required BdkDescriptor that, dynamic hint}); - - Future bdkDescriptorNew( - {required String descriptor, required Network network, dynamic hint}); - - Future bdkDescriptorNewBip44( - {required BdkDescriptorSecretKey secretKey, - required KeychainKind keychainKind, - required Network network, - dynamic hint}); - - Future bdkDescriptorNewBip44Public( - {required BdkDescriptorPublicKey publicKey, - required String fingerprint, - required KeychainKind keychainKind, - required Network network, - dynamic hint}); - - Future bdkDescriptorNewBip49( - {required BdkDescriptorSecretKey secretKey, - required KeychainKind keychainKind, - required Network network, - dynamic hint}); - - Future bdkDescriptorNewBip49Public( - {required BdkDescriptorPublicKey publicKey, - required String fingerprint, - required KeychainKind keychainKind, - required Network network, - dynamic hint}); - - Future bdkDescriptorNewBip84( - {required BdkDescriptorSecretKey secretKey, - required KeychainKind keychainKind, - required Network network, - dynamic hint}); - - Future bdkDescriptorNewBip84Public( - {required BdkDescriptorPublicKey publicKey, - required String fingerprint, - required KeychainKind keychainKind, - required Network network, - dynamic hint}); - - Future bdkDescriptorNewBip86( - {required BdkDescriptorSecretKey secretKey, - required KeychainKind keychainKind, - required Network network, - dynamic hint}); - - Future bdkDescriptorNewBip86Public( - {required BdkDescriptorPublicKey publicKey, - required String fingerprint, - required KeychainKind keychainKind, - required Network network, - dynamic hint}); - - Future bdkDerivationPathFromString( - {required String path, dynamic hint}); - - Future bdkDescriptorPublicKeyAsString( - {required BdkDescriptorPublicKey that, dynamic hint}); - - Future bdkDescriptorPublicKeyDerive( - {required BdkDescriptorPublicKey ptr, - required BdkDerivationPath path, - dynamic hint}); - - Future bdkDescriptorPublicKeyExtend( - {required BdkDescriptorPublicKey ptr, - required BdkDerivationPath path, - dynamic hint}); - - Future bdkDescriptorPublicKeyFromString( - {required String publicKey, dynamic hint}); - - Future bdkDescriptorSecretKeyAsPublic( - {required BdkDescriptorSecretKey ptr, dynamic hint}); - - Future bdkDescriptorSecretKeyAsString( - {required BdkDescriptorSecretKey that, dynamic hint}); - - Future bdkDescriptorSecretKeyCreate( - {required Network network, - required BdkMnemonic mnemonic, - String? password, - dynamic hint}); - - Future bdkDescriptorSecretKeyDerive( - {required BdkDescriptorSecretKey ptr, - required BdkDerivationPath path, - dynamic hint}); - - Future bdkDescriptorSecretKeyExtend( - {required BdkDescriptorSecretKey ptr, - required BdkDerivationPath path, - dynamic hint}); - - Future bdkDescriptorSecretKeyFromString( - {required String secretKey, dynamic hint}); - - Future bdkDescriptorSecretKeySecretBytes( - {required BdkDescriptorSecretKey that, dynamic hint}); - - Future bdkMnemonicAsString({required BdkMnemonic that, dynamic hint}); - - Future bdkMnemonicFromEntropy( - {required List entropy, dynamic hint}); - - Future bdkMnemonicFromString( - {required String mnemonic, dynamic hint}); - - Future bdkMnemonicNew( - {required WordCount wordCount, dynamic hint}); - - Future bdkPsbtCombine( - {required BdkPsbt ptr, required BdkPsbt other, dynamic hint}); - - Future bdkPsbtExtractTx({required BdkPsbt ptr, dynamic hint}); - - Future bdkPsbtFeeAmount({required BdkPsbt that, dynamic hint}); - - Future bdkPsbtFeeRate({required BdkPsbt that, dynamic hint}); - - Future bdkPsbtFromStr({required String psbtBase64, dynamic hint}); - - Future bdkPsbtJsonSerialize({required BdkPsbt that, dynamic hint}); - - Future bdkPsbtSerialize({required BdkPsbt that, dynamic hint}); - - Future bdkPsbtTxid({required BdkPsbt that, dynamic hint}); - - Future bdkAddressAsString({required BdkAddress that, dynamic hint}); - - Future bdkAddressFromScript( - {required BdkScriptBuf script, required Network network, dynamic hint}); - - Future bdkAddressFromString( - {required String address, required Network network, dynamic hint}); - - Future bdkAddressIsValidForNetwork( - {required BdkAddress that, required Network network, dynamic hint}); - - Future bdkAddressNetwork({required BdkAddress that, dynamic hint}); - - Future bdkAddressPayload({required BdkAddress that, dynamic hint}); - - Future bdkAddressScript( - {required BdkAddress ptr, dynamic hint}); - - Future bdkAddressToQrUri({required BdkAddress that, dynamic hint}); - - Future bdkScriptBufEmpty({dynamic hint}); - - Future bdkScriptBufFromHex({required String s, dynamic hint}); - - Future bdkScriptBufWithCapacity( - {required int capacity, dynamic hint}); - - Future bdkTransactionFromBytes( - {required List transactionBytes, dynamic hint}); - - Future> bdkTransactionInput( - {required BdkTransaction that, dynamic hint}); - - Future bdkTransactionIsCoinBase( - {required BdkTransaction that, dynamic hint}); - - Future bdkTransactionIsExplicitlyRbf( - {required BdkTransaction that, dynamic hint}); - - Future bdkTransactionIsLockTimeEnabled( - {required BdkTransaction that, dynamic hint}); - - Future bdkTransactionLockTime( - {required BdkTransaction that, dynamic hint}); - - Future bdkTransactionNew( - {required int version, - required LockTime lockTime, - required List input, - required List output, - dynamic hint}); - - Future> bdkTransactionOutput( - {required BdkTransaction that, dynamic hint}); - - Future bdkTransactionSerialize( - {required BdkTransaction that, dynamic hint}); - - Future bdkTransactionSize({required BdkTransaction that, dynamic hint}); - - Future bdkTransactionTxid( - {required BdkTransaction that, dynamic hint}); - - Future bdkTransactionVersion( - {required BdkTransaction that, dynamic hint}); - - Future bdkTransactionVsize({required BdkTransaction that, dynamic hint}); - - Future bdkTransactionWeight( - {required BdkTransaction that, dynamic hint}); - - Future<(BdkAddress, int)> bdkWalletGetAddress( - {required BdkWallet ptr, - required AddressIndex addressIndex, - dynamic hint}); - - Future bdkWalletGetBalance({required BdkWallet that, dynamic hint}); - - Future bdkWalletGetDescriptorForKeychain( - {required BdkWallet ptr, required KeychainKind keychain, dynamic hint}); - - Future<(BdkAddress, int)> bdkWalletGetInternalAddress( - {required BdkWallet ptr, - required AddressIndex addressIndex, - dynamic hint}); - - Future bdkWalletGetPsbtInput( - {required BdkWallet that, - required LocalUtxo utxo, - required bool onlyWitnessUtxo, - PsbtSigHashType? sighashType, - dynamic hint}); - - Future bdkWalletIsMine( - {required BdkWallet that, required BdkScriptBuf script, dynamic hint}); - - Future> bdkWalletListTransactions( - {required BdkWallet that, required bool includeRaw, dynamic hint}); - - Future> bdkWalletListUnspent( - {required BdkWallet that, dynamic hint}); - - Future bdkWalletNetwork({required BdkWallet that, dynamic hint}); - - Future bdkWalletNew( - {required BdkDescriptor descriptor, - BdkDescriptor? changeDescriptor, - required Network network, - required DatabaseConfig databaseConfig, - dynamic hint}); - - Future bdkWalletSign( - {required BdkWallet ptr, - required BdkPsbt psbt, - SignOptions? signOptions, - dynamic hint}); - - Future bdkWalletSync( - {required BdkWallet ptr, - required BdkBlockchain blockchain, - dynamic hint}); - - Future<(BdkPsbt, TransactionDetails)> finishBumpFeeTxBuilder( - {required String txid, - required double feeRate, - BdkAddress? allowShrinking, - required BdkWallet wallet, - required bool enableRbf, - int? nSequence, - dynamic hint}); - - Future<(BdkPsbt, TransactionDetails)> txBuilderFinish( - {required BdkWallet wallet, - required List recipients, - required List utxos, - (OutPoint, Input, int)? foreignUtxo, - required List unSpendable, - required ChangeSpendPolicy changePolicy, - required bool manuallySelectedOnly, - double? feeRate, - int? feeAbsolute, - required bool drainWallet, - BdkScriptBuf? drainTo, - RbfValue? rbf, - required List data, - dynamic hint}); - - 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_MutexPartiallySignedTransaction; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_MutexPartiallySignedTransaction; - - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_MutexPartiallySignedTransactionPtr; - - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_MutexBdkWalletAnyDatabase; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_MutexBdkWalletAnyDatabase; - - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_MutexBdkWalletAnyDatabasePtr; - - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_BdkBitcoinAddress; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_BdkBitcoinAddress; - - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_BdkBitcoinAddressPtr; - - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_BitcoinBip32DerivationPath; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_BitcoinBip32DerivationPath; - - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_BitcoinBip32DerivationPathPtr; - - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_KeysDescriptorPublicKey; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_KeysDescriptorPublicKey; - - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_KeysDescriptorPublicKeyPtr; - - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_KeysDescriptorSecretKey; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_KeysDescriptorSecretKey; - - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_KeysDescriptorSecretKeyPtr; - - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_KeysKeyMap; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_KeysKeyMap; - - CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_KeysKeyMapPtr; - - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_KeysBip39Mnemonic; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_KeysBip39Mnemonic; - - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_KeysBip39MnemonicPtr; -} - -class CApiApiImpl extends CApiApiImplPlatform implements CApiApi { - CApiApiImpl({ - required super.handler, - required super.wire, - required super.generalizedFrbRustBinding, - required super.portManager, - }); - - @override - Future bdkBlockchainBroadcast( - {required BdkBlockchain that, - required BdkTransaction transaction, - dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_blockchain(that); - var arg1 = cst_encode_box_autoadd_bdk_transaction(transaction); - return wire.wire_bdk_blockchain_broadcast(port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkBlockchainBroadcastConstMeta, - argValues: [that, transaction], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkBlockchainBroadcastConstMeta => const TaskConstMeta( - debugName: "bdk_blockchain_broadcast", - argNames: ["that", "transaction"], - ); - - @override - Future bdkBlockchainEstimateFee( - {required BdkBlockchain that, required int target, dynamic hint}) { - 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_bdk_blockchain_estimate_fee(port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_fee_rate, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkBlockchainEstimateFeeConstMeta, - argValues: [that, target], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkBlockchainEstimateFeeConstMeta => const TaskConstMeta( - debugName: "bdk_blockchain_estimate_fee", - argNames: ["that", "target"], - ); - - @override - Future bdkBlockchainGetBlockHash( - {required BdkBlockchain that, required int height, dynamic hint}) { - 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_bdk_blockchain_get_block_hash(port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkBlockchainGetBlockHashConstMeta, - argValues: [that, height], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkBlockchainGetBlockHashConstMeta => const TaskConstMeta( - debugName: "bdk_blockchain_get_block_hash", - argNames: ["that", "height"], - ); - - @override - Future bdkBlockchainGetHeight( - {required BdkBlockchain that, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_blockchain(that); - return wire.wire_bdk_blockchain_get_height(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_u_32, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkBlockchainGetHeightConstMeta, - argValues: [that], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkBlockchainGetHeightConstMeta => const TaskConstMeta( - debugName: "bdk_blockchain_get_height", - argNames: ["that"], - ); - - @override - Future bdkBlockchainNew( - {required BlockchainConfig blockchainConfig, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_blockchain_config(blockchainConfig); - return wire.wire_bdk_blockchain_new(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_blockchain, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkBlockchainNewConstMeta, - argValues: [blockchainConfig], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkBlockchainNewConstMeta => const TaskConstMeta( - debugName: "bdk_blockchain_new", - argNames: ["blockchainConfig"], - ); - - @override - Future bdkDescriptorAsString( - {required BdkDescriptor that, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_descriptor(that); - return wire.wire_bdk_descriptor_as_string(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: null, - ), - constMeta: kBdkDescriptorAsStringConstMeta, - argValues: [that], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkDescriptorAsStringConstMeta => const TaskConstMeta( - debugName: "bdk_descriptor_as_string", - argNames: ["that"], - ); - - @override - Future bdkDescriptorAsStringPrivate( - {required BdkDescriptor that, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_descriptor(that); - return wire.wire_bdk_descriptor_as_string_private(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: null, - ), - constMeta: kBdkDescriptorAsStringPrivateConstMeta, - argValues: [that], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkDescriptorAsStringPrivateConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_as_string_private", - argNames: ["that"], - ); - - @override - Future bdkDescriptorMaxSatisfactionWeight( - {required BdkDescriptor that, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_descriptor(that); - return wire.wire_bdk_descriptor_max_satisfaction_weight(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_usize, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkDescriptorMaxSatisfactionWeightConstMeta, - argValues: [that], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkDescriptorMaxSatisfactionWeightConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_max_satisfaction_weight", - argNames: ["that"], - ); - - @override - Future bdkDescriptorNew( - {required String descriptor, required Network network, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(descriptor); - var arg1 = cst_encode_network(network); - return wire.wire_bdk_descriptor_new(port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkDescriptorNewConstMeta, - argValues: [descriptor, network], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkDescriptorNewConstMeta => const TaskConstMeta( - debugName: "bdk_descriptor_new", - argNames: ["descriptor", "network"], - ); - - @override - Future bdkDescriptorNewBip44( - {required BdkDescriptorSecretKey secretKey, - required KeychainKind keychainKind, - required Network network, - dynamic hint}) { - 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_bdk_descriptor_new_bip44(port_, arg0, arg1, arg2); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkDescriptorNewBip44ConstMeta, - argValues: [secretKey, keychainKind, network], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkDescriptorNewBip44ConstMeta => const TaskConstMeta( - debugName: "bdk_descriptor_new_bip44", - argNames: ["secretKey", "keychainKind", "network"], - ); - - @override - Future bdkDescriptorNewBip44Public( - {required BdkDescriptorPublicKey publicKey, - required String fingerprint, - required KeychainKind keychainKind, - required Network network, - dynamic hint}) { - 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_bdk_descriptor_new_bip44_public( - port_, arg0, arg1, arg2, arg3); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkDescriptorNewBip44PublicConstMeta, - argValues: [publicKey, fingerprint, keychainKind, network], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkDescriptorNewBip44PublicConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_new_bip44_public", - argNames: ["publicKey", "fingerprint", "keychainKind", "network"], - ); - - @override - Future bdkDescriptorNewBip49( - {required BdkDescriptorSecretKey secretKey, - required KeychainKind keychainKind, - required Network network, - dynamic hint}) { - 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_bdk_descriptor_new_bip49(port_, arg0, arg1, arg2); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkDescriptorNewBip49ConstMeta, - argValues: [secretKey, keychainKind, network], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkDescriptorNewBip49ConstMeta => const TaskConstMeta( - debugName: "bdk_descriptor_new_bip49", - argNames: ["secretKey", "keychainKind", "network"], - ); - - @override - Future bdkDescriptorNewBip49Public( - {required BdkDescriptorPublicKey publicKey, - required String fingerprint, - required KeychainKind keychainKind, - required Network network, - dynamic hint}) { - 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_bdk_descriptor_new_bip49_public( - port_, arg0, arg1, arg2, arg3); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkDescriptorNewBip49PublicConstMeta, - argValues: [publicKey, fingerprint, keychainKind, network], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkDescriptorNewBip49PublicConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_new_bip49_public", - argNames: ["publicKey", "fingerprint", "keychainKind", "network"], - ); - - @override - Future bdkDescriptorNewBip84( - {required BdkDescriptorSecretKey secretKey, - required KeychainKind keychainKind, - required Network network, - dynamic hint}) { - 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_bdk_descriptor_new_bip84(port_, arg0, arg1, arg2); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkDescriptorNewBip84ConstMeta, - argValues: [secretKey, keychainKind, network], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkDescriptorNewBip84ConstMeta => const TaskConstMeta( - debugName: "bdk_descriptor_new_bip84", - argNames: ["secretKey", "keychainKind", "network"], - ); - - @override - Future bdkDescriptorNewBip84Public( - {required BdkDescriptorPublicKey publicKey, - required String fingerprint, - required KeychainKind keychainKind, - required Network network, - dynamic hint}) { - 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_bdk_descriptor_new_bip84_public( - port_, arg0, arg1, arg2, arg3); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkDescriptorNewBip84PublicConstMeta, - argValues: [publicKey, fingerprint, keychainKind, network], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkDescriptorNewBip84PublicConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_new_bip84_public", - argNames: ["publicKey", "fingerprint", "keychainKind", "network"], - ); - - @override - Future bdkDescriptorNewBip86( - {required BdkDescriptorSecretKey secretKey, - required KeychainKind keychainKind, - required Network network, - dynamic hint}) { - 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_bdk_descriptor_new_bip86(port_, arg0, arg1, arg2); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkDescriptorNewBip86ConstMeta, - argValues: [secretKey, keychainKind, network], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkDescriptorNewBip86ConstMeta => const TaskConstMeta( - debugName: "bdk_descriptor_new_bip86", - argNames: ["secretKey", "keychainKind", "network"], - ); - - @override - Future bdkDescriptorNewBip86Public( - {required BdkDescriptorPublicKey publicKey, - required String fingerprint, - required KeychainKind keychainKind, - required Network network, - dynamic hint}) { - 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_bdk_descriptor_new_bip86_public( - port_, arg0, arg1, arg2, arg3); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkDescriptorNewBip86PublicConstMeta, - argValues: [publicKey, fingerprint, keychainKind, network], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkDescriptorNewBip86PublicConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_new_bip86_public", - argNames: ["publicKey", "fingerprint", "keychainKind", "network"], - ); - - @override - Future bdkDerivationPathFromString( - {required String path, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(path); - return wire.wire_bdk_derivation_path_from_string(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_derivation_path, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkDerivationPathFromStringConstMeta, - argValues: [path], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkDerivationPathFromStringConstMeta => - const TaskConstMeta( - debugName: "bdk_derivation_path_from_string", - argNames: ["path"], - ); - - @override - Future bdkDescriptorPublicKeyAsString( - {required BdkDescriptorPublicKey that, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_descriptor_public_key(that); - return wire.wire_bdk_descriptor_public_key_as_string(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: null, - ), - constMeta: kBdkDescriptorPublicKeyAsStringConstMeta, - argValues: [that], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkDescriptorPublicKeyAsStringConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_public_key_as_string", - argNames: ["that"], - ); - - @override - Future bdkDescriptorPublicKeyDerive( - {required BdkDescriptorPublicKey ptr, - required BdkDerivationPath path, - dynamic hint}) { - 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_bdk_descriptor_public_key_derive(port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor_public_key, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkDescriptorPublicKeyDeriveConstMeta, - argValues: [ptr, path], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkDescriptorPublicKeyDeriveConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_public_key_derive", - argNames: ["ptr", "path"], - ); - - @override - Future bdkDescriptorPublicKeyExtend( - {required BdkDescriptorPublicKey ptr, - required BdkDerivationPath path, - dynamic hint}) { - 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_bdk_descriptor_public_key_extend(port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor_public_key, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkDescriptorPublicKeyExtendConstMeta, - argValues: [ptr, path], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkDescriptorPublicKeyExtendConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_public_key_extend", - argNames: ["ptr", "path"], - ); - - @override - Future bdkDescriptorPublicKeyFromString( - {required String publicKey, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(publicKey); - return wire.wire_bdk_descriptor_public_key_from_string(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor_public_key, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkDescriptorPublicKeyFromStringConstMeta, - argValues: [publicKey], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkDescriptorPublicKeyFromStringConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_public_key_from_string", - argNames: ["publicKey"], - ); - - @override - Future bdkDescriptorSecretKeyAsPublic( - {required BdkDescriptorSecretKey ptr, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(ptr); - return wire.wire_bdk_descriptor_secret_key_as_public(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor_public_key, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkDescriptorSecretKeyAsPublicConstMeta, - argValues: [ptr], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkDescriptorSecretKeyAsPublicConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_secret_key_as_public", - argNames: ["ptr"], - ); - - @override - Future bdkDescriptorSecretKeyAsString( - {required BdkDescriptorSecretKey that, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(that); - return wire.wire_bdk_descriptor_secret_key_as_string(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: null, - ), - constMeta: kBdkDescriptorSecretKeyAsStringConstMeta, - argValues: [that], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkDescriptorSecretKeyAsStringConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_secret_key_as_string", - argNames: ["that"], - ); - - @override - Future bdkDescriptorSecretKeyCreate( - {required Network network, - required BdkMnemonic mnemonic, - String? password, - dynamic hint}) { - 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_bdk_descriptor_secret_key_create( - port_, arg0, arg1, arg2); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor_secret_key, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkDescriptorSecretKeyCreateConstMeta, - argValues: [network, mnemonic, password], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkDescriptorSecretKeyCreateConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_secret_key_create", - argNames: ["network", "mnemonic", "password"], - ); - - @override - Future bdkDescriptorSecretKeyDerive( - {required BdkDescriptorSecretKey ptr, - required BdkDerivationPath path, - dynamic hint}) { - 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_bdk_descriptor_secret_key_derive(port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor_secret_key, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkDescriptorSecretKeyDeriveConstMeta, - argValues: [ptr, path], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkDescriptorSecretKeyDeriveConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_secret_key_derive", - argNames: ["ptr", "path"], - ); - - @override - Future bdkDescriptorSecretKeyExtend( - {required BdkDescriptorSecretKey ptr, - required BdkDerivationPath path, - dynamic hint}) { - 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_bdk_descriptor_secret_key_extend(port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor_secret_key, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkDescriptorSecretKeyExtendConstMeta, - argValues: [ptr, path], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkDescriptorSecretKeyExtendConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_secret_key_extend", - argNames: ["ptr", "path"], - ); - - @override - Future bdkDescriptorSecretKeyFromString( - {required String secretKey, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(secretKey); - return wire.wire_bdk_descriptor_secret_key_from_string(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor_secret_key, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkDescriptorSecretKeyFromStringConstMeta, - argValues: [secretKey], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkDescriptorSecretKeyFromStringConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_secret_key_from_string", - argNames: ["secretKey"], - ); - - @override - Future bdkDescriptorSecretKeySecretBytes( - {required BdkDescriptorSecretKey that, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(that); - return wire.wire_bdk_descriptor_secret_key_secret_bytes(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_list_prim_u_8_strict, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkDescriptorSecretKeySecretBytesConstMeta, - argValues: [that], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkDescriptorSecretKeySecretBytesConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_secret_key_secret_bytes", - argNames: ["that"], - ); - - @override - Future bdkMnemonicAsString( - {required BdkMnemonic that, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_mnemonic(that); - return wire.wire_bdk_mnemonic_as_string(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: null, - ), - constMeta: kBdkMnemonicAsStringConstMeta, - argValues: [that], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkMnemonicAsStringConstMeta => const TaskConstMeta( - debugName: "bdk_mnemonic_as_string", - argNames: ["that"], - ); - - @override - Future bdkMnemonicFromEntropy( - {required List entropy, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_list_prim_u_8_loose(entropy); - return wire.wire_bdk_mnemonic_from_entropy(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_mnemonic, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkMnemonicFromEntropyConstMeta, - argValues: [entropy], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkMnemonicFromEntropyConstMeta => const TaskConstMeta( - debugName: "bdk_mnemonic_from_entropy", - argNames: ["entropy"], - ); - - @override - Future bdkMnemonicFromString( - {required String mnemonic, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(mnemonic); - return wire.wire_bdk_mnemonic_from_string(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_mnemonic, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkMnemonicFromStringConstMeta, - argValues: [mnemonic], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkMnemonicFromStringConstMeta => const TaskConstMeta( - debugName: "bdk_mnemonic_from_string", - argNames: ["mnemonic"], - ); - - @override - Future bdkMnemonicNew( - {required WordCount wordCount, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_word_count(wordCount); - return wire.wire_bdk_mnemonic_new(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_mnemonic, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkMnemonicNewConstMeta, - argValues: [wordCount], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkMnemonicNewConstMeta => const TaskConstMeta( - debugName: "bdk_mnemonic_new", - argNames: ["wordCount"], - ); - - @override - Future bdkPsbtCombine( - {required BdkPsbt ptr, required BdkPsbt other, dynamic hint}) { - 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_bdk_psbt_combine(port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_psbt, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkPsbtCombineConstMeta, - argValues: [ptr, other], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkPsbtCombineConstMeta => const TaskConstMeta( - debugName: "bdk_psbt_combine", - argNames: ["ptr", "other"], - ); - - @override - Future bdkPsbtExtractTx( - {required BdkPsbt ptr, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_psbt(ptr); - return wire.wire_bdk_psbt_extract_tx(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_transaction, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkPsbtExtractTxConstMeta, - argValues: [ptr], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkPsbtExtractTxConstMeta => const TaskConstMeta( - debugName: "bdk_psbt_extract_tx", - argNames: ["ptr"], - ); - - @override - Future bdkPsbtFeeAmount({required BdkPsbt that, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_psbt(that); - return wire.wire_bdk_psbt_fee_amount(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_opt_box_autoadd_u_64, - decodeErrorData: null, - ), - constMeta: kBdkPsbtFeeAmountConstMeta, - argValues: [that], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkPsbtFeeAmountConstMeta => const TaskConstMeta( - debugName: "bdk_psbt_fee_amount", - argNames: ["that"], - ); - - @override - Future bdkPsbtFeeRate({required BdkPsbt that, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_psbt(that); - return wire.wire_bdk_psbt_fee_rate(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_opt_box_autoadd_fee_rate, - decodeErrorData: null, - ), - constMeta: kBdkPsbtFeeRateConstMeta, - argValues: [that], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkPsbtFeeRateConstMeta => const TaskConstMeta( - debugName: "bdk_psbt_fee_rate", - argNames: ["that"], - ); - - @override - Future bdkPsbtFromStr({required String psbtBase64, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(psbtBase64); - return wire.wire_bdk_psbt_from_str(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_psbt, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkPsbtFromStrConstMeta, - argValues: [psbtBase64], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkPsbtFromStrConstMeta => const TaskConstMeta( - debugName: "bdk_psbt_from_str", - argNames: ["psbtBase64"], - ); - - @override - Future bdkPsbtJsonSerialize({required BdkPsbt that, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_psbt(that); - return wire.wire_bdk_psbt_json_serialize(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: null, - ), - constMeta: kBdkPsbtJsonSerializeConstMeta, - argValues: [that], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkPsbtJsonSerializeConstMeta => const TaskConstMeta( - debugName: "bdk_psbt_json_serialize", - argNames: ["that"], - ); - - @override - Future bdkPsbtSerialize({required BdkPsbt that, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_psbt(that); - return wire.wire_bdk_psbt_serialize(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: null, - ), - constMeta: kBdkPsbtSerializeConstMeta, - argValues: [that], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkPsbtSerializeConstMeta => const TaskConstMeta( - debugName: "bdk_psbt_serialize", - argNames: ["that"], - ); - - @override - Future bdkPsbtTxid({required BdkPsbt that, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_psbt(that); - return wire.wire_bdk_psbt_txid(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: null, - ), - constMeta: kBdkPsbtTxidConstMeta, - argValues: [that], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkPsbtTxidConstMeta => const TaskConstMeta( - debugName: "bdk_psbt_txid", - argNames: ["that"], - ); - - @override - Future bdkAddressAsString({required BdkAddress that, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_address(that); - return wire.wire_bdk_address_as_string(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: null, - ), - constMeta: kBdkAddressAsStringConstMeta, - argValues: [that], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkAddressAsStringConstMeta => const TaskConstMeta( - debugName: "bdk_address_as_string", - argNames: ["that"], - ); - - @override - Future bdkAddressFromScript( - {required BdkScriptBuf script, required Network network, dynamic hint}) { - 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_bdk_address_from_script(port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_address, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkAddressFromScriptConstMeta, - argValues: [script, network], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkAddressFromScriptConstMeta => const TaskConstMeta( - debugName: "bdk_address_from_script", - argNames: ["script", "network"], - ); - - @override - Future bdkAddressFromString( - {required String address, required Network network, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(address); - var arg1 = cst_encode_network(network); - return wire.wire_bdk_address_from_string(port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_address, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkAddressFromStringConstMeta, - argValues: [address, network], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkAddressFromStringConstMeta => const TaskConstMeta( - debugName: "bdk_address_from_string", - argNames: ["address", "network"], - ); - - @override - Future bdkAddressIsValidForNetwork( - {required BdkAddress that, required Network network, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_address(that); - var arg1 = cst_encode_network(network); - return wire.wire_bdk_address_is_valid_for_network(port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: null, - ), - constMeta: kBdkAddressIsValidForNetworkConstMeta, - argValues: [that, network], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkAddressIsValidForNetworkConstMeta => - const TaskConstMeta( - debugName: "bdk_address_is_valid_for_network", - argNames: ["that", "network"], - ); - - @override - Future bdkAddressNetwork({required BdkAddress that, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_address(that); - return wire.wire_bdk_address_network(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_network, - decodeErrorData: null, - ), - constMeta: kBdkAddressNetworkConstMeta, - argValues: [that], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkAddressNetworkConstMeta => const TaskConstMeta( - debugName: "bdk_address_network", - argNames: ["that"], - ); - - @override - Future bdkAddressPayload({required BdkAddress that, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_address(that); - return wire.wire_bdk_address_payload(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_payload, - decodeErrorData: null, - ), - constMeta: kBdkAddressPayloadConstMeta, - argValues: [that], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkAddressPayloadConstMeta => const TaskConstMeta( - debugName: "bdk_address_payload", - argNames: ["that"], - ); - - @override - Future bdkAddressScript( - {required BdkAddress ptr, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_address(ptr); - return wire.wire_bdk_address_script(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_script_buf, - decodeErrorData: null, - ), - constMeta: kBdkAddressScriptConstMeta, - argValues: [ptr], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkAddressScriptConstMeta => const TaskConstMeta( - debugName: "bdk_address_script", - argNames: ["ptr"], - ); - - @override - Future bdkAddressToQrUri({required BdkAddress that, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_address(that); - return wire.wire_bdk_address_to_qr_uri(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: null, - ), - constMeta: kBdkAddressToQrUriConstMeta, - argValues: [that], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkAddressToQrUriConstMeta => const TaskConstMeta( - debugName: "bdk_address_to_qr_uri", - argNames: ["that"], - ); - - @override - Future bdkScriptBufEmpty({dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - return wire.wire_bdk_script_buf_empty(port_); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_script_buf, - decodeErrorData: null, - ), - constMeta: kBdkScriptBufEmptyConstMeta, - argValues: [], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkScriptBufEmptyConstMeta => const TaskConstMeta( - debugName: "bdk_script_buf_empty", - argNames: [], - ); - - @override - Future bdkScriptBufFromHex({required String s, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(s); - return wire.wire_bdk_script_buf_from_hex(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_script_buf, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkScriptBufFromHexConstMeta, - argValues: [s], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkScriptBufFromHexConstMeta => const TaskConstMeta( - debugName: "bdk_script_buf_from_hex", - argNames: ["s"], - ); - - @override - Future bdkScriptBufWithCapacity( - {required int capacity, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_usize(capacity); - return wire.wire_bdk_script_buf_with_capacity(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_script_buf, - decodeErrorData: null, - ), - constMeta: kBdkScriptBufWithCapacityConstMeta, - argValues: [capacity], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkScriptBufWithCapacityConstMeta => const TaskConstMeta( - debugName: "bdk_script_buf_with_capacity", - argNames: ["capacity"], - ); - - @override - Future bdkTransactionFromBytes( - {required List transactionBytes, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_list_prim_u_8_loose(transactionBytes); - return wire.wire_bdk_transaction_from_bytes(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_transaction, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkTransactionFromBytesConstMeta, - argValues: [transactionBytes], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkTransactionFromBytesConstMeta => const TaskConstMeta( - debugName: "bdk_transaction_from_bytes", - argNames: ["transactionBytes"], - ); - - @override - Future> bdkTransactionInput( - {required BdkTransaction that, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_transaction(that); - return wire.wire_bdk_transaction_input(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_list_tx_in, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkTransactionInputConstMeta, - argValues: [that], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkTransactionInputConstMeta => const TaskConstMeta( - debugName: "bdk_transaction_input", - argNames: ["that"], - ); - - @override - Future bdkTransactionIsCoinBase( - {required BdkTransaction that, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_transaction(that); - return wire.wire_bdk_transaction_is_coin_base(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkTransactionIsCoinBaseConstMeta, - argValues: [that], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkTransactionIsCoinBaseConstMeta => const TaskConstMeta( - debugName: "bdk_transaction_is_coin_base", - argNames: ["that"], - ); - - @override - Future bdkTransactionIsExplicitlyRbf( - {required BdkTransaction that, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_transaction(that); - return wire.wire_bdk_transaction_is_explicitly_rbf(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkTransactionIsExplicitlyRbfConstMeta, - argValues: [that], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkTransactionIsExplicitlyRbfConstMeta => - const TaskConstMeta( - debugName: "bdk_transaction_is_explicitly_rbf", - argNames: ["that"], - ); - - @override - Future bdkTransactionIsLockTimeEnabled( - {required BdkTransaction that, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_transaction(that); - return wire.wire_bdk_transaction_is_lock_time_enabled(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkTransactionIsLockTimeEnabledConstMeta, - argValues: [that], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkTransactionIsLockTimeEnabledConstMeta => - const TaskConstMeta( - debugName: "bdk_transaction_is_lock_time_enabled", - argNames: ["that"], - ); - - @override - Future bdkTransactionLockTime( - {required BdkTransaction that, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_transaction(that); - return wire.wire_bdk_transaction_lock_time(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_lock_time, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkTransactionLockTimeConstMeta, - argValues: [that], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkTransactionLockTimeConstMeta => const TaskConstMeta( - debugName: "bdk_transaction_lock_time", - argNames: ["that"], - ); - - @override - Future bdkTransactionNew( - {required int version, - required LockTime lockTime, - required List input, - required List output, - dynamic hint}) { - 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_bdk_transaction_new(port_, arg0, arg1, arg2, arg3); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_transaction, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkTransactionNewConstMeta, - argValues: [version, lockTime, input, output], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkTransactionNewConstMeta => const TaskConstMeta( - debugName: "bdk_transaction_new", - argNames: ["version", "lockTime", "input", "output"], - ); - - @override - Future> bdkTransactionOutput( - {required BdkTransaction that, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_transaction(that); - return wire.wire_bdk_transaction_output(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_list_tx_out, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkTransactionOutputConstMeta, - argValues: [that], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkTransactionOutputConstMeta => const TaskConstMeta( - debugName: "bdk_transaction_output", - argNames: ["that"], - ); - - @override - Future bdkTransactionSerialize( - {required BdkTransaction that, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_transaction(that); - return wire.wire_bdk_transaction_serialize(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_list_prim_u_8_strict, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkTransactionSerializeConstMeta, - argValues: [that], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkTransactionSerializeConstMeta => const TaskConstMeta( - debugName: "bdk_transaction_serialize", - argNames: ["that"], - ); - - @override - Future bdkTransactionSize({required BdkTransaction that, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_transaction(that); - return wire.wire_bdk_transaction_size(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_u_64, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkTransactionSizeConstMeta, - argValues: [that], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkTransactionSizeConstMeta => const TaskConstMeta( - debugName: "bdk_transaction_size", - argNames: ["that"], - ); - - @override - Future bdkTransactionTxid( - {required BdkTransaction that, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_transaction(that); - return wire.wire_bdk_transaction_txid(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkTransactionTxidConstMeta, - argValues: [that], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkTransactionTxidConstMeta => const TaskConstMeta( - debugName: "bdk_transaction_txid", - argNames: ["that"], - ); - - @override - Future bdkTransactionVersion( - {required BdkTransaction that, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_transaction(that); - return wire.wire_bdk_transaction_version(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_i_32, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkTransactionVersionConstMeta, - argValues: [that], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkTransactionVersionConstMeta => const TaskConstMeta( - debugName: "bdk_transaction_version", - argNames: ["that"], - ); - - @override - Future bdkTransactionVsize( - {required BdkTransaction that, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_transaction(that); - return wire.wire_bdk_transaction_vsize(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_u_64, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkTransactionVsizeConstMeta, - argValues: [that], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkTransactionVsizeConstMeta => const TaskConstMeta( - debugName: "bdk_transaction_vsize", - argNames: ["that"], - ); - - @override - Future bdkTransactionWeight( - {required BdkTransaction that, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_transaction(that); - return wire.wire_bdk_transaction_weight(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_u_64, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkTransactionWeightConstMeta, - argValues: [that], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkTransactionWeightConstMeta => const TaskConstMeta( - debugName: "bdk_transaction_weight", - argNames: ["that"], - ); - - @override - Future<(BdkAddress, int)> bdkWalletGetAddress( - {required BdkWallet ptr, - required AddressIndex addressIndex, - dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_wallet(ptr); - var arg1 = cst_encode_box_autoadd_address_index(addressIndex); - return wire.wire_bdk_wallet_get_address(port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_record_bdk_address_u_32, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkWalletGetAddressConstMeta, - argValues: [ptr, addressIndex], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkWalletGetAddressConstMeta => const TaskConstMeta( - debugName: "bdk_wallet_get_address", - argNames: ["ptr", "addressIndex"], - ); - - @override - Future bdkWalletGetBalance({required BdkWallet that, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_wallet(that); - return wire.wire_bdk_wallet_get_balance(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_balance, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkWalletGetBalanceConstMeta, - argValues: [that], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkWalletGetBalanceConstMeta => const TaskConstMeta( - debugName: "bdk_wallet_get_balance", - argNames: ["that"], - ); - - @override - Future bdkWalletGetDescriptorForKeychain( - {required BdkWallet ptr, required KeychainKind keychain, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_wallet(ptr); - var arg1 = cst_encode_keychain_kind(keychain); - return wire.wire_bdk_wallet_get_descriptor_for_keychain( - port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkWalletGetDescriptorForKeychainConstMeta, - argValues: [ptr, keychain], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkWalletGetDescriptorForKeychainConstMeta => - const TaskConstMeta( - debugName: "bdk_wallet_get_descriptor_for_keychain", - argNames: ["ptr", "keychain"], - ); - - @override - Future<(BdkAddress, int)> bdkWalletGetInternalAddress( - {required BdkWallet ptr, - required AddressIndex addressIndex, - dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_wallet(ptr); - var arg1 = cst_encode_box_autoadd_address_index(addressIndex); - return wire.wire_bdk_wallet_get_internal_address(port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_record_bdk_address_u_32, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkWalletGetInternalAddressConstMeta, - argValues: [ptr, addressIndex], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkWalletGetInternalAddressConstMeta => - const TaskConstMeta( - debugName: "bdk_wallet_get_internal_address", - argNames: ["ptr", "addressIndex"], - ); - - @override - Future bdkWalletGetPsbtInput( - {required BdkWallet that, - required LocalUtxo utxo, - required bool onlyWitnessUtxo, - PsbtSigHashType? sighashType, - dynamic hint}) { - 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_bdk_wallet_get_psbt_input( - port_, arg0, arg1, arg2, arg3); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_input, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkWalletGetPsbtInputConstMeta, - argValues: [that, utxo, onlyWitnessUtxo, sighashType], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkWalletGetPsbtInputConstMeta => const TaskConstMeta( - debugName: "bdk_wallet_get_psbt_input", - argNames: ["that", "utxo", "onlyWitnessUtxo", "sighashType"], - ); - - @override - Future bdkWalletIsMine( - {required BdkWallet that, required BdkScriptBuf script, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_wallet(that); - var arg1 = cst_encode_box_autoadd_bdk_script_buf(script); - return wire.wire_bdk_wallet_is_mine(port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkWalletIsMineConstMeta, - argValues: [that, script], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkWalletIsMineConstMeta => const TaskConstMeta( - debugName: "bdk_wallet_is_mine", - argNames: ["that", "script"], - ); - - @override - Future> bdkWalletListTransactions( - {required BdkWallet that, required bool includeRaw, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_wallet(that); - var arg1 = cst_encode_bool(includeRaw); - return wire.wire_bdk_wallet_list_transactions(port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_list_transaction_details, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkWalletListTransactionsConstMeta, - argValues: [that, includeRaw], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkWalletListTransactionsConstMeta => const TaskConstMeta( - debugName: "bdk_wallet_list_transactions", - argNames: ["that", "includeRaw"], - ); - - @override - Future> bdkWalletListUnspent( - {required BdkWallet that, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_wallet(that); - return wire.wire_bdk_wallet_list_unspent(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_list_local_utxo, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkWalletListUnspentConstMeta, - argValues: [that], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkWalletListUnspentConstMeta => const TaskConstMeta( - debugName: "bdk_wallet_list_unspent", - argNames: ["that"], - ); - - @override - Future bdkWalletNetwork({required BdkWallet that, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_wallet(that); - return wire.wire_bdk_wallet_network(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_network, - decodeErrorData: null, - ), - constMeta: kBdkWalletNetworkConstMeta, - argValues: [that], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkWalletNetworkConstMeta => const TaskConstMeta( - debugName: "bdk_wallet_network", - argNames: ["that"], - ); - - @override - Future bdkWalletNew( - {required BdkDescriptor descriptor, - BdkDescriptor? changeDescriptor, - required Network network, - required DatabaseConfig databaseConfig, - dynamic hint}) { - 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_bdk_wallet_new(port_, arg0, arg1, arg2, arg3); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_wallet, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkWalletNewConstMeta, - argValues: [descriptor, changeDescriptor, network, databaseConfig], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkWalletNewConstMeta => const TaskConstMeta( - debugName: "bdk_wallet_new", - argNames: [ - "descriptor", - "changeDescriptor", - "network", - "databaseConfig" - ], - ); - - @override - Future bdkWalletSign( - {required BdkWallet ptr, - required BdkPsbt psbt, - SignOptions? signOptions, - dynamic hint}) { - 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_bdk_wallet_sign(port_, arg0, arg1, arg2); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkWalletSignConstMeta, - argValues: [ptr, psbt, signOptions], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkWalletSignConstMeta => const TaskConstMeta( - debugName: "bdk_wallet_sign", - argNames: ["ptr", "psbt", "signOptions"], - ); - - @override - Future bdkWalletSync( - {required BdkWallet ptr, - required BdkBlockchain blockchain, - dynamic hint}) { - 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_bdk_wallet_sync(port_, arg0, arg1); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_unit, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kBdkWalletSyncConstMeta, - argValues: [ptr, blockchain], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kBdkWalletSyncConstMeta => const TaskConstMeta( - debugName: "bdk_wallet_sync", - argNames: ["ptr", "blockchain"], - ); - - @override - Future<(BdkPsbt, TransactionDetails)> finishBumpFeeTxBuilder( - {required String txid, - required double feeRate, - BdkAddress? allowShrinking, - required BdkWallet wallet, - required bool enableRbf, - int? nSequence, - dynamic hint}) { - 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_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: kFinishBumpFeeTxBuilderConstMeta, - argValues: [txid, feeRate, allowShrinking, wallet, enableRbf, nSequence], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kFinishBumpFeeTxBuilderConstMeta => const TaskConstMeta( - debugName: "finish_bump_fee_tx_builder", - argNames: [ - "txid", - "feeRate", - "allowShrinking", - "wallet", - "enableRbf", - "nSequence" - ], - ); - - @override - Future<(BdkPsbt, TransactionDetails)> txBuilderFinish( - {required BdkWallet wallet, - required List recipients, - required List utxos, - (OutPoint, Input, int)? foreignUtxo, - required List unSpendable, - required ChangeSpendPolicy changePolicy, - required bool manuallySelectedOnly, - double? feeRate, - int? feeAbsolute, - required bool drainWallet, - BdkScriptBuf? drainTo, - RbfValue? rbf, - required List data, - dynamic hint}) { - 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_list_prim_u_8_loose(data); - return wire.wire_tx_builder_finish(port_, arg0, arg1, arg2, arg3, arg4, - arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_record_bdk_psbt_transaction_details, - decodeErrorData: dco_decode_bdk_error, - ), - constMeta: kTxBuilderFinishConstMeta, - argValues: [ - wallet, - recipients, - utxos, - foreignUtxo, - unSpendable, - changePolicy, - manuallySelectedOnly, - feeRate, - feeAbsolute, - drainWallet, - drainTo, - rbf, - data - ], - apiImpl: this, - hint: hint, - )); - } - - TaskConstMeta get kTxBuilderFinishConstMeta => const TaskConstMeta( - debugName: "tx_builder_finish", - argNames: [ - "wallet", - "recipients", - "utxos", - "foreignUtxo", - "unSpendable", - "changePolicy", - "manuallySelectedOnly", - "feeRate", - "feeAbsolute", - "drainWallet", - "drainTo", - "rbf", - "data" - ], - ); - - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_AnyBlockchain => - wire.rust_arc_increment_strong_count_RustOpaque_AnyBlockchain; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_AnyBlockchain => - wire.rust_arc_decrement_strong_count_RustOpaque_AnyBlockchain; - - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_ExtendedDescriptor => - wire.rust_arc_increment_strong_count_RustOpaque_ExtendedDescriptor; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_ExtendedDescriptor => - wire.rust_arc_decrement_strong_count_RustOpaque_ExtendedDescriptor; - - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_MutexPartiallySignedTransaction => wire - .rust_arc_increment_strong_count_RustOpaque_MutexPartiallySignedTransaction; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_MutexPartiallySignedTransaction => wire - .rust_arc_decrement_strong_count_RustOpaque_MutexPartiallySignedTransaction; - - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_MutexBdkWalletAnyDatabase => wire - .rust_arc_increment_strong_count_RustOpaque_MutexbdkWalletAnyDatabase; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_MutexBdkWalletAnyDatabase => wire - .rust_arc_decrement_strong_count_RustOpaque_MutexbdkWalletAnyDatabase; - - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_BdkBitcoinAddress => - wire.rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddress; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_BdkBitcoinAddress => - wire.rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress; - - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_BitcoinBip32DerivationPath => wire - .rust_arc_increment_strong_count_RustOpaque_bitcoinbip32DerivationPath; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_BitcoinBip32DerivationPath => wire - .rust_arc_decrement_strong_count_RustOpaque_bitcoinbip32DerivationPath; - - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_KeysDescriptorPublicKey => wire - .rust_arc_increment_strong_count_RustOpaque_keysDescriptorPublicKey; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_KeysDescriptorPublicKey => wire - .rust_arc_decrement_strong_count_RustOpaque_keysDescriptorPublicKey; - - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_KeysDescriptorSecretKey => wire - .rust_arc_increment_strong_count_RustOpaque_keysDescriptorSecretKey; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_KeysDescriptorSecretKey => wire - .rust_arc_decrement_strong_count_RustOpaque_keysDescriptorSecretKey; - - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_KeysKeyMap => - wire.rust_arc_increment_strong_count_RustOpaque_keysKeyMap; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_KeysKeyMap => - wire.rust_arc_decrement_strong_count_RustOpaque_keysKeyMap; - - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_KeysBip39Mnemonic => - wire.rust_arc_increment_strong_count_RustOpaque_keysbip39Mnemonic; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_KeysBip39Mnemonic => - wire.rust_arc_decrement_strong_count_RustOpaque_keysbip39Mnemonic; - - @protected - AnyBlockchain dco_decode_RustOpaque_AnyBlockchain(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return AnyBlockchain.dcoDecode(raw as List); - } - - @protected - ExtendedDescriptor dco_decode_RustOpaque_ExtendedDescriptor(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return ExtendedDescriptor.dcoDecode(raw as List); - } - - @protected - MutexPartiallySignedTransaction - dco_decode_RustOpaque_MutexPartiallySignedTransaction(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return MutexPartiallySignedTransaction.dcoDecode(raw as List); - } - - @protected - MutexBdkWalletAnyDatabase dco_decode_RustOpaque_MutexbdkWalletAnyDatabase( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return MutexBdkWalletAnyDatabase.dcoDecode(raw as List); - } - - @protected - BdkBitcoinAddress dco_decode_RustOpaque_bdkbitcoinAddress(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return BdkBitcoinAddress.dcoDecode(raw as List); - } - - @protected - BitcoinBip32DerivationPath dco_decode_RustOpaque_bitcoinbip32DerivationPath( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return BitcoinBip32DerivationPath.dcoDecode(raw as List); - } - - @protected - KeysDescriptorPublicKey dco_decode_RustOpaque_keysDescriptorPublicKey( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return KeysDescriptorPublicKey.dcoDecode(raw as List); - } - - @protected - KeysDescriptorSecretKey dco_decode_RustOpaque_keysDescriptorSecretKey( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return KeysDescriptorSecretKey.dcoDecode(raw as List); - } - - @protected - KeysKeyMap dco_decode_RustOpaque_keysKeyMap(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return KeysKeyMap.dcoDecode(raw as List); - } - - @protected - KeysBip39Mnemonic dco_decode_RustOpaque_keysbip39Mnemonic(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return KeysBip39Mnemonic.dcoDecode(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_AnyBlockchain(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_bitcoinbip32DerivationPath(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_ExtendedDescriptor(arr[0]), - keyMap: dco_decode_RustOpaque_keysKeyMap(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_keysDescriptorPublicKey(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_keysDescriptorSecretKey(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_Address( - dco_decode_box_autoadd_address_error(raw[1]), - ); - case 3: - return BdkError_Descriptor( - dco_decode_box_autoadd_descriptor_error(raw[1]), - ); - case 4: - return BdkError_InvalidU32Bytes( - dco_decode_list_prim_u_8_strict(raw[1]), - ); - case 5: - return BdkError_Generic( - dco_decode_String(raw[1]), - ); - case 6: - return BdkError_ScriptDoesntHaveAddressForm(); - case 7: - return BdkError_NoRecipients(); - case 8: - return BdkError_NoUtxosSelected(); - case 9: - return BdkError_OutputBelowDustLimit( - dco_decode_usize(raw[1]), - ); - case 10: - return BdkError_InsufficientFunds( - needed: dco_decode_u_64(raw[1]), - available: dco_decode_u_64(raw[2]), - ); - case 11: - return BdkError_BnBTotalTriesExceeded(); - case 12: - return BdkError_BnBNoExactMatch(); - case 13: - return BdkError_UnknownUtxo(); - case 14: - return BdkError_TransactionNotFound(); - case 15: - return BdkError_TransactionConfirmed(); - case 16: - return BdkError_IrreplaceableTransaction(); - case 17: - return BdkError_FeeRateTooLow( - needed: dco_decode_f_32(raw[1]), - ); - case 18: - return BdkError_FeeTooLow( - needed: dco_decode_u_64(raw[1]), - ); - case 19: - return BdkError_FeeRateUnavailable(); - case 20: - return BdkError_MissingKeyOrigin( - dco_decode_String(raw[1]), - ); - case 21: - return BdkError_Key( - dco_decode_String(raw[1]), - ); - case 22: - return BdkError_ChecksumMismatch(); - case 23: - return BdkError_SpendingPolicyRequired( - dco_decode_keychain_kind(raw[1]), - ); - case 24: - return BdkError_InvalidPolicyPathError( - dco_decode_String(raw[1]), - ); - case 25: - return BdkError_Signer( - dco_decode_String(raw[1]), - ); - case 26: - return BdkError_InvalidNetwork( - requested: dco_decode_network(raw[1]), - found: dco_decode_network(raw[2]), - ); - case 27: - return BdkError_InvalidOutpoint( - dco_decode_box_autoadd_out_point(raw[1]), - ); - case 28: - return BdkError_Encode( - dco_decode_String(raw[1]), - ); - case 29: - return BdkError_Miniscript( - dco_decode_String(raw[1]), - ); - case 30: - return BdkError_MiniscriptPsbt( - dco_decode_String(raw[1]), - ); - case 31: - return BdkError_Bip32( - dco_decode_String(raw[1]), - ); - case 32: - return BdkError_Bip39( - dco_decode_String(raw[1]), - ); - case 33: - return BdkError_Secp256k1( - dco_decode_String(raw[1]), - ); - case 34: - return BdkError_Json( - dco_decode_String(raw[1]), - ); - case 35: - return BdkError_Psbt( - dco_decode_String(raw[1]), - ); - case 36: - return BdkError_PsbtParse( - dco_decode_String(raw[1]), - ); - case 37: - return BdkError_MissingCachedScripts( - dco_decode_usize(raw[1]), - dco_decode_usize(raw[2]), - ); - case 38: - return BdkError_Electrum( - dco_decode_String(raw[1]), - ); - case 39: - return BdkError_Esplora( - dco_decode_String(raw[1]), - ); - case 40: - return BdkError_Sled( - dco_decode_String(raw[1]), - ); - case 41: - return BdkError_Rpc( - dco_decode_String(raw[1]), - ); - case 42: - return BdkError_Rusqlite( - dco_decode_String(raw[1]), - ); - case 43: - return BdkError_InvalidInput( - dco_decode_String(raw[1]), - ); - case 44: - return BdkError_InvalidLockTime( - dco_decode_String(raw[1]), - ); - case 45: - 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_keysbip39Mnemonic(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_MutexPartiallySignedTransaction(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( - inner: 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_MutexbdkWalletAnyDatabase(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 - 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 - 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 - 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, int) 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, int); - } - - @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 - int 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 - 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_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_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 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 - 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 - 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 - 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 - 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, int)? - 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 - int? 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 - 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 - (OutPoint, Input, int) 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 - 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 - 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 != 8) - throw Exception('unexpected arr length: expect 8 but see ${arr.length}'); - return SignOptions( - multiSig: dco_decode_bool(arr[0]), - trustWitnessUtxo: dco_decode_bool(arr[1]), - assumeHeight: dco_decode_opt_box_autoadd_u_32(arr[2]), - allowAllSighashes: dco_decode_bool(arr[3]), - removePartialSigs: dco_decode_bool(arr[4]), - tryFinalize: dco_decode_bool(arr[5]), - signWithTapInternalKey: dco_decode_bool(arr[6]), - allowGrinding: dco_decode_bool(arr[7]), - ); - } - - @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 - int dco_decode_u_64(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dcoDecodeI64OrU64(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 - int dco_decode_usize(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dcoDecodeI64OrU64(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 - AnyBlockchain sse_decode_RustOpaque_AnyBlockchain( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return AnyBlockchain.sseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); - } - - @protected - ExtendedDescriptor sse_decode_RustOpaque_ExtendedDescriptor( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return ExtendedDescriptor.sseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); - } - - @protected - MutexPartiallySignedTransaction - sse_decode_RustOpaque_MutexPartiallySignedTransaction( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return MutexPartiallySignedTransaction.sseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); - } - - @protected - MutexBdkWalletAnyDatabase sse_decode_RustOpaque_MutexbdkWalletAnyDatabase( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return MutexBdkWalletAnyDatabase.sseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); - } - - @protected - BdkBitcoinAddress sse_decode_RustOpaque_bdkbitcoinAddress( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return BdkBitcoinAddress.sseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); - } - - @protected - BitcoinBip32DerivationPath sse_decode_RustOpaque_bitcoinbip32DerivationPath( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return BitcoinBip32DerivationPath.sseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); - } - - @protected - KeysDescriptorPublicKey sse_decode_RustOpaque_keysDescriptorPublicKey( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return KeysDescriptorPublicKey.sseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); - } - - @protected - KeysDescriptorSecretKey sse_decode_RustOpaque_keysDescriptorSecretKey( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return KeysDescriptorSecretKey.sseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); - } - - @protected - KeysKeyMap sse_decode_RustOpaque_keysKeyMap(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return KeysKeyMap.sseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); - } - - @protected - KeysBip39Mnemonic sse_decode_RustOpaque_keysbip39Mnemonic( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return KeysBip39Mnemonic.sseDecode( - 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_AnyBlockchain(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_bitcoinbip32DerivationPath(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_ExtendedDescriptor(deserializer); - var var_keyMap = sse_decode_RustOpaque_keysKeyMap(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_keysDescriptorPublicKey(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_keysDescriptorSecretKey(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_box_autoadd_address_error(deserializer); - return BdkError_Address(var_field0); - case 3: - var var_field0 = sse_decode_box_autoadd_descriptor_error(deserializer); - return BdkError_Descriptor(var_field0); - case 4: - var var_field0 = sse_decode_list_prim_u_8_strict(deserializer); - return BdkError_InvalidU32Bytes(var_field0); - case 5: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Generic(var_field0); - case 6: - return BdkError_ScriptDoesntHaveAddressForm(); - case 7: - return BdkError_NoRecipients(); - case 8: - return BdkError_NoUtxosSelected(); - case 9: - var var_field0 = sse_decode_usize(deserializer); - return BdkError_OutputBelowDustLimit(var_field0); - case 10: - 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 11: - return BdkError_BnBTotalTriesExceeded(); - case 12: - return BdkError_BnBNoExactMatch(); - case 13: - return BdkError_UnknownUtxo(); - case 14: - return BdkError_TransactionNotFound(); - case 15: - return BdkError_TransactionConfirmed(); - case 16: - return BdkError_IrreplaceableTransaction(); - case 17: - var var_needed = sse_decode_f_32(deserializer); - return BdkError_FeeRateTooLow(needed: var_needed); - case 18: - var var_needed = sse_decode_u_64(deserializer); - return BdkError_FeeTooLow(needed: var_needed); - case 19: - return BdkError_FeeRateUnavailable(); - case 20: - var var_field0 = sse_decode_String(deserializer); - return BdkError_MissingKeyOrigin(var_field0); - case 21: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Key(var_field0); - case 22: - return BdkError_ChecksumMismatch(); - case 23: - var var_field0 = sse_decode_keychain_kind(deserializer); - return BdkError_SpendingPolicyRequired(var_field0); - case 24: - var var_field0 = sse_decode_String(deserializer); - return BdkError_InvalidPolicyPathError(var_field0); - case 25: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Signer(var_field0); - case 26: - var var_requested = sse_decode_network(deserializer); - var var_found = sse_decode_network(deserializer); - return BdkError_InvalidNetwork( - requested: var_requested, found: var_found); - case 27: - var var_field0 = sse_decode_box_autoadd_out_point(deserializer); - return BdkError_InvalidOutpoint(var_field0); - case 28: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Encode(var_field0); - case 29: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Miniscript(var_field0); - case 30: - var var_field0 = sse_decode_String(deserializer); - return BdkError_MiniscriptPsbt(var_field0); - case 31: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Bip32(var_field0); - case 32: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Bip39(var_field0); - case 33: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Secp256k1(var_field0); - case 34: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Json(var_field0); - case 35: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Psbt(var_field0); - case 36: - var var_field0 = sse_decode_String(deserializer); - return BdkError_PsbtParse(var_field0); - case 37: - var var_field0 = sse_decode_usize(deserializer); - var var_field1 = sse_decode_usize(deserializer); - return BdkError_MissingCachedScripts(var_field0, var_field1); - case 38: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Electrum(var_field0); - case 39: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Esplora(var_field0); - case 40: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Sled(var_field0); - case 41: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Rpc(var_field0); - case 42: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Rusqlite(var_field0); - case 43: - var var_field0 = sse_decode_String(deserializer); - return BdkError_InvalidInput(var_field0); - case 44: - var var_field0 = sse_decode_String(deserializer); - return BdkError_InvalidLockTime(var_field0); - case 45: - 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_keysbip39Mnemonic(deserializer); - return BdkMnemonic(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_MutexPartiallySignedTransaction(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_inner = sse_decode_String(deserializer); - return BdkTransaction(inner: var_inner); - } - - @protected - BdkWallet sse_decode_bdk_wallet(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_ptr = sse_decode_RustOpaque_MutexbdkWalletAnyDatabase(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 - 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 - 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 - 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, int) 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 - int 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 - 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_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_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 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 - 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 - 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 - 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 - 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, int)? - 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 - int? 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 - 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 - (OutPoint, Input, int) 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 - 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 - 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_multiSig = sse_decode_bool(deserializer); - 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( - multiSig: var_multiSig, - 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 - int sse_decode_u_64(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return deserializer.buffer.getUint64(); - } - - @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 - int sse_decode_usize(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return deserializer.buffer.getUint64(); - } - - @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_AnyBlockchain(AnyBlockchain raw) { - // Codec=Cst (C-struct based), see doc to use other codecs -// ignore: invalid_use_of_internal_member - return raw.cstEncode(); - } - - @protected - int cst_encode_RustOpaque_ExtendedDescriptor(ExtendedDescriptor raw) { - // Codec=Cst (C-struct based), see doc to use other codecs -// ignore: invalid_use_of_internal_member - return raw.cstEncode(); - } - - @protected - int cst_encode_RustOpaque_MutexPartiallySignedTransaction( - MutexPartiallySignedTransaction raw) { - // Codec=Cst (C-struct based), see doc to use other codecs -// ignore: invalid_use_of_internal_member - return raw.cstEncode(); - } - - @protected - int cst_encode_RustOpaque_MutexbdkWalletAnyDatabase( - MutexBdkWalletAnyDatabase raw) { - // Codec=Cst (C-struct based), see doc to use other codecs -// ignore: invalid_use_of_internal_member - return raw.cstEncode(); - } - - @protected - int cst_encode_RustOpaque_bdkbitcoinAddress(BdkBitcoinAddress raw) { - // Codec=Cst (C-struct based), see doc to use other codecs -// ignore: invalid_use_of_internal_member - return raw.cstEncode(); - } - - @protected - int cst_encode_RustOpaque_bitcoinbip32DerivationPath( - BitcoinBip32DerivationPath raw) { - // Codec=Cst (C-struct based), see doc to use other codecs -// ignore: invalid_use_of_internal_member - return raw.cstEncode(); - } - - @protected - int cst_encode_RustOpaque_keysDescriptorPublicKey( - KeysDescriptorPublicKey raw) { - // Codec=Cst (C-struct based), see doc to use other codecs -// ignore: invalid_use_of_internal_member - return raw.cstEncode(); - } - - @protected - int cst_encode_RustOpaque_keysDescriptorSecretKey( - KeysDescriptorSecretKey raw) { - // Codec=Cst (C-struct based), see doc to use other codecs -// ignore: invalid_use_of_internal_member - return raw.cstEncode(); - } - - @protected - int cst_encode_RustOpaque_keysKeyMap(KeysKeyMap raw) { - // Codec=Cst (C-struct based), see doc to use other codecs -// ignore: invalid_use_of_internal_member - return raw.cstEncode(); - } - - @protected - int cst_encode_RustOpaque_keysbip39Mnemonic(KeysBip39Mnemonic raw) { - // Codec=Cst (C-struct based), see doc to use other codecs -// ignore: invalid_use_of_internal_member - return raw.cstEncode(); - } - - @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_usize(int 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_RustOpaque_AnyBlockchain( - AnyBlockchain self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_usize(self.sseEncode(move: null), serializer); - } - - @protected - void sse_encode_RustOpaque_ExtendedDescriptor( - ExtendedDescriptor self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_usize(self.sseEncode(move: null), serializer); - } - - @protected - void sse_encode_RustOpaque_MutexPartiallySignedTransaction( - MutexPartiallySignedTransaction self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_usize(self.sseEncode(move: null), serializer); - } - - @protected - void sse_encode_RustOpaque_MutexbdkWalletAnyDatabase( - MutexBdkWalletAnyDatabase self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_usize(self.sseEncode(move: null), serializer); - } - - @protected - void sse_encode_RustOpaque_bdkbitcoinAddress( - BdkBitcoinAddress self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_usize(self.sseEncode(move: null), serializer); - } - - @protected - void sse_encode_RustOpaque_bitcoinbip32DerivationPath( - BitcoinBip32DerivationPath self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_usize(self.sseEncode(move: null), serializer); - } - - @protected - void sse_encode_RustOpaque_keysDescriptorPublicKey( - KeysDescriptorPublicKey self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_usize(self.sseEncode(move: null), serializer); - } - - @protected - void sse_encode_RustOpaque_keysDescriptorSecretKey( - KeysDescriptorSecretKey self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_usize(self.sseEncode(move: null), serializer); - } - - @protected - void sse_encode_RustOpaque_keysKeyMap( - KeysKeyMap self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_usize(self.sseEncode(move: null), serializer); - } - - @protected - void sse_encode_RustOpaque_keysbip39Mnemonic( - KeysBip39Mnemonic self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_usize(self.sseEncode(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); - } - } - - @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); - } - } - - @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); - } - } - - @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_AnyBlockchain(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_bitcoinbip32DerivationPath(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_ExtendedDescriptor( - self.extendedDescriptor, serializer); - sse_encode_RustOpaque_keysKeyMap(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_keysDescriptorPublicKey(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_keysDescriptorSecretKey(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_Address(field0: final field0): - sse_encode_i_32(2, serializer); - sse_encode_box_autoadd_address_error(field0, serializer); - case BdkError_Descriptor(field0: final field0): - sse_encode_i_32(3, serializer); - sse_encode_box_autoadd_descriptor_error(field0, serializer); - case BdkError_InvalidU32Bytes(field0: final field0): - sse_encode_i_32(4, serializer); - sse_encode_list_prim_u_8_strict(field0, serializer); - case BdkError_Generic(field0: final field0): - sse_encode_i_32(5, serializer); - sse_encode_String(field0, serializer); - case BdkError_ScriptDoesntHaveAddressForm(): - sse_encode_i_32(6, serializer); - case BdkError_NoRecipients(): - sse_encode_i_32(7, serializer); - case BdkError_NoUtxosSelected(): - sse_encode_i_32(8, serializer); - case BdkError_OutputBelowDustLimit(field0: final field0): - sse_encode_i_32(9, serializer); - sse_encode_usize(field0, serializer); - case BdkError_InsufficientFunds( - needed: final needed, - available: final available - ): - sse_encode_i_32(10, serializer); - sse_encode_u_64(needed, serializer); - sse_encode_u_64(available, serializer); - case BdkError_BnBTotalTriesExceeded(): - sse_encode_i_32(11, serializer); - case BdkError_BnBNoExactMatch(): - sse_encode_i_32(12, serializer); - case BdkError_UnknownUtxo(): - sse_encode_i_32(13, serializer); - case BdkError_TransactionNotFound(): - sse_encode_i_32(14, serializer); - case BdkError_TransactionConfirmed(): - sse_encode_i_32(15, serializer); - case BdkError_IrreplaceableTransaction(): - sse_encode_i_32(16, serializer); - case BdkError_FeeRateTooLow(needed: final needed): - sse_encode_i_32(17, serializer); - sse_encode_f_32(needed, serializer); - case BdkError_FeeTooLow(needed: final needed): - sse_encode_i_32(18, serializer); - sse_encode_u_64(needed, serializer); - case BdkError_FeeRateUnavailable(): - sse_encode_i_32(19, serializer); - case BdkError_MissingKeyOrigin(field0: final field0): - sse_encode_i_32(20, serializer); - sse_encode_String(field0, serializer); - case BdkError_Key(field0: final field0): - sse_encode_i_32(21, serializer); - sse_encode_String(field0, serializer); - case BdkError_ChecksumMismatch(): - sse_encode_i_32(22, serializer); - case BdkError_SpendingPolicyRequired(field0: final field0): - sse_encode_i_32(23, serializer); - sse_encode_keychain_kind(field0, serializer); - case BdkError_InvalidPolicyPathError(field0: final field0): - sse_encode_i_32(24, serializer); - sse_encode_String(field0, serializer); - case BdkError_Signer(field0: final field0): - sse_encode_i_32(25, serializer); - sse_encode_String(field0, serializer); - case BdkError_InvalidNetwork( - requested: final requested, - found: final found - ): - sse_encode_i_32(26, serializer); - sse_encode_network(requested, serializer); - sse_encode_network(found, serializer); - case BdkError_InvalidOutpoint(field0: final field0): - sse_encode_i_32(27, serializer); - sse_encode_box_autoadd_out_point(field0, serializer); - case BdkError_Encode(field0: final field0): - sse_encode_i_32(28, serializer); - sse_encode_String(field0, serializer); - case BdkError_Miniscript(field0: final field0): - sse_encode_i_32(29, serializer); - sse_encode_String(field0, serializer); - case BdkError_MiniscriptPsbt(field0: final field0): - sse_encode_i_32(30, serializer); - sse_encode_String(field0, serializer); - case BdkError_Bip32(field0: final field0): - sse_encode_i_32(31, serializer); - sse_encode_String(field0, serializer); - case BdkError_Bip39(field0: final field0): - sse_encode_i_32(32, serializer); - sse_encode_String(field0, serializer); - case BdkError_Secp256k1(field0: final field0): - sse_encode_i_32(33, serializer); - sse_encode_String(field0, serializer); - case BdkError_Json(field0: final field0): - sse_encode_i_32(34, serializer); - sse_encode_String(field0, serializer); - case BdkError_Psbt(field0: final field0): - sse_encode_i_32(35, serializer); - sse_encode_String(field0, serializer); - case BdkError_PsbtParse(field0: final field0): - sse_encode_i_32(36, serializer); - sse_encode_String(field0, serializer); - case BdkError_MissingCachedScripts( - field0: final field0, - field1: final field1 - ): - sse_encode_i_32(37, serializer); - sse_encode_usize(field0, serializer); - sse_encode_usize(field1, serializer); - case BdkError_Electrum(field0: final field0): - sse_encode_i_32(38, serializer); - sse_encode_String(field0, serializer); - case BdkError_Esplora(field0: final field0): - sse_encode_i_32(39, serializer); - sse_encode_String(field0, serializer); - case BdkError_Sled(field0: final field0): - sse_encode_i_32(40, serializer); - sse_encode_String(field0, serializer); - case BdkError_Rpc(field0: final field0): - sse_encode_i_32(41, serializer); - sse_encode_String(field0, serializer); - case BdkError_Rusqlite(field0: final field0): - sse_encode_i_32(42, serializer); - sse_encode_String(field0, serializer); - case BdkError_InvalidInput(field0: final field0): - sse_encode_i_32(43, serializer); - sse_encode_String(field0, serializer); - case BdkError_InvalidLockTime(field0: final field0): - sse_encode_i_32(44, serializer); - sse_encode_String(field0, serializer); - case BdkError_InvalidTransaction(field0: final field0): - sse_encode_i_32(45, serializer); - sse_encode_String(field0, serializer); - } - } - - @protected - void sse_encode_bdk_mnemonic(BdkMnemonic self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_RustOpaque_keysbip39Mnemonic(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_MutexPartiallySignedTransaction(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.inner, serializer); - } - - @protected - void sse_encode_bdk_wallet(BdkWallet self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_RustOpaque_MutexbdkWalletAnyDatabase(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); - } - } - - @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_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_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_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, int) 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(int 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_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); - } - } - - @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); - } - } - - @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); - } - } - - @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); - } - } - - @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_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_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_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); - } - } - - @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_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_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_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_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, 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_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(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_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); - } - } - - @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); - } - } - - @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_out_point_input_usize( - (OutPoint, Input, int) 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_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_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.multiSig, serializer); - 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(int self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - serializer.buffer.putUint64(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(int self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - serializer.buffer.putUint64(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); - } -} diff --git a/lib/src/generated/frb_generated.io.dart b/lib/src/generated/frb_generated.io.dart deleted file mode 100644 index c9af61fe..00000000 --- a/lib/src/generated/frb_generated.io.dart +++ /dev/null @@ -1,6735 +0,0 @@ -// This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31. - -// 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 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated_io.dart'; - -abstract class CApiApiImplPlatform extends BaseApiImpl { - CApiApiImplPlatform({ - required super.handler, - required super.wire, - required super.generalizedFrbRustBinding, - required super.portManager, - }); - - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_AnyBlockchainPtr => - wire._rust_arc_decrement_strong_count_RustOpaque_AnyBlockchainPtr; - - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ExtendedDescriptorPtr => wire - ._rust_arc_decrement_strong_count_RustOpaque_ExtendedDescriptorPtr; - - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_MutexPartiallySignedTransactionPtr => - wire._rust_arc_decrement_strong_count_RustOpaque_MutexPartiallySignedTransactionPtr; - - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_MutexBdkWalletAnyDatabasePtr => wire - ._rust_arc_decrement_strong_count_RustOpaque_MutexbdkWalletAnyDatabasePtr; - - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_BdkBitcoinAddressPtr => - wire._rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddressPtr; - - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_BitcoinBip32DerivationPathPtr => wire - ._rust_arc_decrement_strong_count_RustOpaque_bitcoinbip32DerivationPathPtr; - - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_KeysDescriptorPublicKeyPtr => wire - ._rust_arc_decrement_strong_count_RustOpaque_keysDescriptorPublicKeyPtr; - - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_KeysDescriptorSecretKeyPtr => wire - ._rust_arc_decrement_strong_count_RustOpaque_keysDescriptorSecretKeyPtr; - - CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_KeysKeyMapPtr => - wire._rust_arc_decrement_strong_count_RustOpaque_keysKeyMapPtr; - - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_KeysBip39MnemonicPtr => - wire._rust_arc_decrement_strong_count_RustOpaque_keysbip39MnemonicPtr; - - @protected - AnyBlockchain dco_decode_RustOpaque_AnyBlockchain(dynamic raw); - - @protected - ExtendedDescriptor dco_decode_RustOpaque_ExtendedDescriptor(dynamic raw); - - @protected - MutexPartiallySignedTransaction - dco_decode_RustOpaque_MutexPartiallySignedTransaction(dynamic raw); - - @protected - MutexBdkWalletAnyDatabase dco_decode_RustOpaque_MutexbdkWalletAnyDatabase( - dynamic raw); - - @protected - BdkBitcoinAddress dco_decode_RustOpaque_bdkbitcoinAddress(dynamic raw); - - @protected - BitcoinBip32DerivationPath dco_decode_RustOpaque_bitcoinbip32DerivationPath( - dynamic raw); - - @protected - KeysDescriptorPublicKey dco_decode_RustOpaque_keysDescriptorPublicKey( - dynamic raw); - - @protected - KeysDescriptorSecretKey dco_decode_RustOpaque_keysDescriptorSecretKey( - dynamic raw); - - @protected - KeysKeyMap dco_decode_RustOpaque_keysKeyMap(dynamic raw); - - @protected - KeysBip39Mnemonic dco_decode_RustOpaque_keysbip39Mnemonic(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 - 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 - 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 - 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 - PsbtSigHashType dco_decode_box_autoadd_psbt_sig_hash_type(dynamic raw); - - @protected - RbfValue dco_decode_box_autoadd_rbf_value(dynamic raw); - - @protected - (OutPoint, Input, int) 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 - int 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 - 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_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_prim_u_8_loose(dynamic raw); - - @protected - Uint8List dco_decode_list_prim_u_8_strict(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 - 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 - 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 - double? dco_decode_opt_box_autoadd_f_32(dynamic raw); - - @protected - FeeRate? dco_decode_opt_box_autoadd_fee_rate(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, int)? - 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 - int? 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 - 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 - (OutPoint, Input, int) dco_decode_record_out_point_input_usize(dynamic raw); - - @protected - RpcConfig dco_decode_rpc_config(dynamic raw); - - @protected - RpcSyncParams dco_decode_rpc_sync_params(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 - int 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 - int 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 - AnyBlockchain sse_decode_RustOpaque_AnyBlockchain( - SseDeserializer deserializer); - - @protected - ExtendedDescriptor sse_decode_RustOpaque_ExtendedDescriptor( - SseDeserializer deserializer); - - @protected - MutexPartiallySignedTransaction - sse_decode_RustOpaque_MutexPartiallySignedTransaction( - SseDeserializer deserializer); - - @protected - MutexBdkWalletAnyDatabase sse_decode_RustOpaque_MutexbdkWalletAnyDatabase( - SseDeserializer deserializer); - - @protected - BdkBitcoinAddress sse_decode_RustOpaque_bdkbitcoinAddress( - SseDeserializer deserializer); - - @protected - BitcoinBip32DerivationPath sse_decode_RustOpaque_bitcoinbip32DerivationPath( - SseDeserializer deserializer); - - @protected - KeysDescriptorPublicKey sse_decode_RustOpaque_keysDescriptorPublicKey( - SseDeserializer deserializer); - - @protected - KeysDescriptorSecretKey sse_decode_RustOpaque_keysDescriptorSecretKey( - SseDeserializer deserializer); - - @protected - KeysKeyMap sse_decode_RustOpaque_keysKeyMap(SseDeserializer deserializer); - - @protected - KeysBip39Mnemonic sse_decode_RustOpaque_keysbip39Mnemonic( - 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 - 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 - 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 - 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 - PsbtSigHashType sse_decode_box_autoadd_psbt_sig_hash_type( - SseDeserializer deserializer); - - @protected - RbfValue sse_decode_box_autoadd_rbf_value(SseDeserializer deserializer); - - @protected - (OutPoint, Input, int) 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 - int 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 - 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_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_prim_u_8_loose(SseDeserializer deserializer); - - @protected - Uint8List sse_decode_list_prim_u_8_strict(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 - 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 - 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 - double? sse_decode_opt_box_autoadd_f_32(SseDeserializer deserializer); - - @protected - FeeRate? sse_decode_opt_box_autoadd_fee_rate(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, int)? - 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 - int? 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 - 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 - (OutPoint, Input, int) sse_decode_record_out_point_input_usize( - SseDeserializer deserializer); - - @protected - RpcConfig sse_decode_rpc_config(SseDeserializer deserializer); - - @protected - RpcSyncParams sse_decode_rpc_sync_params(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 - int 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 - int 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_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_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_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_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, int) 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(int 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_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_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_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_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_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_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_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, int)? 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(int? 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(int raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw.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 - 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_AnyBlockchain(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_bitcoinbip32DerivationPath(apiObj.ptr); - } - - @protected - void cst_api_fill_to_wire_bdk_descriptor( - BdkDescriptor apiObj, wire_cst_bdk_descriptor wireObj) { - wireObj.extended_descriptor = - cst_encode_RustOpaque_ExtendedDescriptor(apiObj.extendedDescriptor); - wireObj.key_map = cst_encode_RustOpaque_keysKeyMap(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_keysDescriptorPublicKey(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_keysDescriptorSecretKey(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_Address) { - var pre_field0 = cst_encode_box_autoadd_address_error(apiObj.field0); - wireObj.tag = 2; - 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 = 3; - 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 = 4; - wireObj.kind.InvalidU32Bytes.field0 = pre_field0; - return; - } - if (apiObj is BdkError_Generic) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 5; - wireObj.kind.Generic.field0 = pre_field0; - return; - } - if (apiObj is BdkError_ScriptDoesntHaveAddressForm) { - wireObj.tag = 6; - return; - } - if (apiObj is BdkError_NoRecipients) { - wireObj.tag = 7; - return; - } - if (apiObj is BdkError_NoUtxosSelected) { - wireObj.tag = 8; - return; - } - if (apiObj is BdkError_OutputBelowDustLimit) { - var pre_field0 = cst_encode_usize(apiObj.field0); - wireObj.tag = 9; - 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 = 10; - wireObj.kind.InsufficientFunds.needed = pre_needed; - wireObj.kind.InsufficientFunds.available = pre_available; - return; - } - if (apiObj is BdkError_BnBTotalTriesExceeded) { - wireObj.tag = 11; - return; - } - if (apiObj is BdkError_BnBNoExactMatch) { - wireObj.tag = 12; - return; - } - if (apiObj is BdkError_UnknownUtxo) { - wireObj.tag = 13; - return; - } - if (apiObj is BdkError_TransactionNotFound) { - wireObj.tag = 14; - return; - } - if (apiObj is BdkError_TransactionConfirmed) { - wireObj.tag = 15; - return; - } - if (apiObj is BdkError_IrreplaceableTransaction) { - wireObj.tag = 16; - return; - } - if (apiObj is BdkError_FeeRateTooLow) { - var pre_needed = cst_encode_f_32(apiObj.needed); - wireObj.tag = 17; - wireObj.kind.FeeRateTooLow.needed = pre_needed; - return; - } - if (apiObj is BdkError_FeeTooLow) { - var pre_needed = cst_encode_u_64(apiObj.needed); - wireObj.tag = 18; - wireObj.kind.FeeTooLow.needed = pre_needed; - return; - } - if (apiObj is BdkError_FeeRateUnavailable) { - wireObj.tag = 19; - return; - } - if (apiObj is BdkError_MissingKeyOrigin) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 20; - wireObj.kind.MissingKeyOrigin.field0 = pre_field0; - return; - } - if (apiObj is BdkError_Key) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 21; - wireObj.kind.Key.field0 = pre_field0; - return; - } - if (apiObj is BdkError_ChecksumMismatch) { - wireObj.tag = 22; - return; - } - if (apiObj is BdkError_SpendingPolicyRequired) { - var pre_field0 = cst_encode_keychain_kind(apiObj.field0); - wireObj.tag = 23; - wireObj.kind.SpendingPolicyRequired.field0 = pre_field0; - return; - } - if (apiObj is BdkError_InvalidPolicyPathError) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 24; - wireObj.kind.InvalidPolicyPathError.field0 = pre_field0; - return; - } - if (apiObj is BdkError_Signer) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 25; - 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 = 26; - 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 = 27; - wireObj.kind.InvalidOutpoint.field0 = pre_field0; - return; - } - if (apiObj is BdkError_Encode) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 28; - wireObj.kind.Encode.field0 = pre_field0; - return; - } - if (apiObj is BdkError_Miniscript) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 29; - wireObj.kind.Miniscript.field0 = pre_field0; - return; - } - if (apiObj is BdkError_MiniscriptPsbt) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 30; - wireObj.kind.MiniscriptPsbt.field0 = pre_field0; - return; - } - if (apiObj is BdkError_Bip32) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 31; - wireObj.kind.Bip32.field0 = pre_field0; - return; - } - if (apiObj is BdkError_Bip39) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 32; - wireObj.kind.Bip39.field0 = pre_field0; - return; - } - if (apiObj is BdkError_Secp256k1) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 33; - wireObj.kind.Secp256k1.field0 = pre_field0; - return; - } - if (apiObj is BdkError_Json) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 34; - wireObj.kind.Json.field0 = pre_field0; - return; - } - if (apiObj is BdkError_Psbt) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 35; - wireObj.kind.Psbt.field0 = pre_field0; - return; - } - if (apiObj is BdkError_PsbtParse) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 36; - 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 = 37; - 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 = 38; - wireObj.kind.Electrum.field0 = pre_field0; - return; - } - if (apiObj is BdkError_Esplora) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 39; - wireObj.kind.Esplora.field0 = pre_field0; - return; - } - if (apiObj is BdkError_Sled) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 40; - wireObj.kind.Sled.field0 = pre_field0; - return; - } - if (apiObj is BdkError_Rpc) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 41; - wireObj.kind.Rpc.field0 = pre_field0; - return; - } - if (apiObj is BdkError_Rusqlite) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 42; - wireObj.kind.Rusqlite.field0 = pre_field0; - return; - } - if (apiObj is BdkError_InvalidInput) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 43; - wireObj.kind.InvalidInput.field0 = pre_field0; - return; - } - if (apiObj is BdkError_InvalidLockTime) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 44; - wireObj.kind.InvalidLockTime.field0 = pre_field0; - return; - } - if (apiObj is BdkError_InvalidTransaction) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 45; - 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_keysbip39Mnemonic(apiObj.ptr); - } - - @protected - void cst_api_fill_to_wire_bdk_psbt( - BdkPsbt apiObj, wire_cst_bdk_psbt wireObj) { - wireObj.ptr = - cst_encode_RustOpaque_MutexPartiallySignedTransaction(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.inner = cst_encode_String(apiObj.inner); - } - - @protected - void cst_api_fill_to_wire_bdk_wallet( - BdkWallet apiObj, wire_cst_bdk_wallet wireObj) { - wireObj.ptr = cst_encode_RustOpaque_MutexbdkWalletAnyDatabase(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_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_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_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, int) 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_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_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_out_point_input_usize( - (OutPoint, Input, int) 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_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_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.multi_sig = cst_encode_bool(apiObj.multiSig); - 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_AnyBlockchain(AnyBlockchain raw); - - @protected - int cst_encode_RustOpaque_ExtendedDescriptor(ExtendedDescriptor raw); - - @protected - int cst_encode_RustOpaque_MutexPartiallySignedTransaction( - MutexPartiallySignedTransaction raw); - - @protected - int cst_encode_RustOpaque_MutexbdkWalletAnyDatabase( - MutexBdkWalletAnyDatabase raw); - - @protected - int cst_encode_RustOpaque_bdkbitcoinAddress(BdkBitcoinAddress raw); - - @protected - int cst_encode_RustOpaque_bitcoinbip32DerivationPath( - BitcoinBip32DerivationPath raw); - - @protected - int cst_encode_RustOpaque_keysDescriptorPublicKey( - KeysDescriptorPublicKey raw); - - @protected - int cst_encode_RustOpaque_keysDescriptorSecretKey( - KeysDescriptorSecretKey raw); - - @protected - int cst_encode_RustOpaque_keysKeyMap(KeysKeyMap raw); - - @protected - int cst_encode_RustOpaque_keysbip39Mnemonic(KeysBip39Mnemonic 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_usize(int 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_RustOpaque_AnyBlockchain( - AnyBlockchain self, SseSerializer serializer); - - @protected - void sse_encode_RustOpaque_ExtendedDescriptor( - ExtendedDescriptor self, SseSerializer serializer); - - @protected - void sse_encode_RustOpaque_MutexPartiallySignedTransaction( - MutexPartiallySignedTransaction self, SseSerializer serializer); - - @protected - void sse_encode_RustOpaque_MutexbdkWalletAnyDatabase( - MutexBdkWalletAnyDatabase self, SseSerializer serializer); - - @protected - void sse_encode_RustOpaque_bdkbitcoinAddress( - BdkBitcoinAddress self, SseSerializer serializer); - - @protected - void sse_encode_RustOpaque_bitcoinbip32DerivationPath( - BitcoinBip32DerivationPath self, SseSerializer serializer); - - @protected - void sse_encode_RustOpaque_keysDescriptorPublicKey( - KeysDescriptorPublicKey self, SseSerializer serializer); - - @protected - void sse_encode_RustOpaque_keysDescriptorSecretKey( - KeysDescriptorSecretKey self, SseSerializer serializer); - - @protected - void sse_encode_RustOpaque_keysKeyMap( - KeysKeyMap self, SseSerializer serializer); - - @protected - void sse_encode_RustOpaque_keysbip39Mnemonic( - KeysBip39Mnemonic 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_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_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_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_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, int) 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(int 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_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_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_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_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_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_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_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_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, int)? 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(int? 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_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_out_point_input_usize( - (OutPoint, Input, int) 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_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(int 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(int 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 CApiWire implements BaseWire { - factory CApiWire.fromExternalLibrary(ExternalLibrary lib) => - CApiWire(lib.ffiDynamicLibrary); - - /// Holds the symbol lookup function. - final ffi.Pointer Function(String symbolName) - _lookup; - - /// The symbols are looked up in [dynamicLibrary]. - CApiWire(ffi.DynamicLibrary dynamicLibrary) : _lookup = dynamicLibrary.lookup; - - /// The symbols are looked up with [lookup]. - CApiWire.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_bdk_blockchain_broadcast( - int port_, - ffi.Pointer that, - ffi.Pointer transaction, - ) { - return _wire_bdk_blockchain_broadcast( - port_, - that, - transaction, - ); - } - - late final _wire_bdk_blockchain_broadcastPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_blockchain_broadcast'); - late final _wire_bdk_blockchain_broadcast = - _wire_bdk_blockchain_broadcastPtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); - - void wire_bdk_blockchain_estimate_fee( - int port_, - ffi.Pointer that, - int target, - ) { - return _wire_bdk_blockchain_estimate_fee( - port_, - that, - target, - ); - } - - late final _wire_bdk_blockchain_estimate_feePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer, - ffi.Uint64)>>( - 'frbgen_bdk_flutter_wire_bdk_blockchain_estimate_fee'); - late final _wire_bdk_blockchain_estimate_fee = - _wire_bdk_blockchain_estimate_feePtr.asFunction< - void Function(int, ffi.Pointer, int)>(); - - void wire_bdk_blockchain_get_block_hash( - int port_, - ffi.Pointer that, - int height, - ) { - return _wire_bdk_blockchain_get_block_hash( - port_, - that, - height, - ); - } - - late final _wire_bdk_blockchain_get_block_hashPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer, - ffi.Uint32)>>( - 'frbgen_bdk_flutter_wire_bdk_blockchain_get_block_hash'); - late final _wire_bdk_blockchain_get_block_hash = - _wire_bdk_blockchain_get_block_hashPtr.asFunction< - void Function(int, ffi.Pointer, int)>(); - - void wire_bdk_blockchain_get_height( - int port_, - ffi.Pointer that, - ) { - return _wire_bdk_blockchain_get_height( - port_, - that, - ); - } - - late final _wire_bdk_blockchain_get_heightPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_blockchain_get_height'); - late final _wire_bdk_blockchain_get_height = - _wire_bdk_blockchain_get_heightPtr.asFunction< - void Function(int, ffi.Pointer)>(); - - void wire_bdk_blockchain_new( - int port_, - ffi.Pointer blockchain_config, - ) { - return _wire_bdk_blockchain_new( - port_, - blockchain_config, - ); - } - - late final _wire_bdk_blockchain_newPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_blockchain_new'); - late final _wire_bdk_blockchain_new = _wire_bdk_blockchain_newPtr.asFunction< - void Function(int, ffi.Pointer)>(); - - void wire_bdk_descriptor_as_string( - int port_, - ffi.Pointer that, - ) { - return _wire_bdk_descriptor_as_string( - port_, - that, - ); - } - - late final _wire_bdk_descriptor_as_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_descriptor_as_string'); - late final _wire_bdk_descriptor_as_string = _wire_bdk_descriptor_as_stringPtr - .asFunction)>(); - - void wire_bdk_descriptor_as_string_private( - int port_, - ffi.Pointer that, - ) { - return _wire_bdk_descriptor_as_string_private( - port_, - that, - ); - } - - late final _wire_bdk_descriptor_as_string_privatePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_descriptor_as_string_private'); - late final _wire_bdk_descriptor_as_string_private = - _wire_bdk_descriptor_as_string_privatePtr.asFunction< - void Function(int, ffi.Pointer)>(); - - void wire_bdk_descriptor_max_satisfaction_weight( - int port_, - ffi.Pointer that, - ) { - return _wire_bdk_descriptor_max_satisfaction_weight( - port_, - that, - ); - } - - late final _wire_bdk_descriptor_max_satisfaction_weightPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_descriptor_max_satisfaction_weight'); - late final _wire_bdk_descriptor_max_satisfaction_weight = - _wire_bdk_descriptor_max_satisfaction_weightPtr.asFunction< - void Function(int, ffi.Pointer)>(); - - void wire_bdk_descriptor_new( - int port_, - ffi.Pointer descriptor, - int network, - ) { - return _wire_bdk_descriptor_new( - port_, - descriptor, - network, - ); - } - - late final _wire_bdk_descriptor_newPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Int32)>>('frbgen_bdk_flutter_wire_bdk_descriptor_new'); - late final _wire_bdk_descriptor_new = _wire_bdk_descriptor_newPtr.asFunction< - void Function(int, ffi.Pointer, int)>(); - - void wire_bdk_descriptor_new_bip44( - int port_, - ffi.Pointer secret_key, - int keychain_kind, - int network, - ) { - return _wire_bdk_descriptor_new_bip44( - port_, - secret_key, - keychain_kind, - network, - ); - } - - late final _wire_bdk_descriptor_new_bip44Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Int32, - ffi.Int32)>>('frbgen_bdk_flutter_wire_bdk_descriptor_new_bip44'); - late final _wire_bdk_descriptor_new_bip44 = - _wire_bdk_descriptor_new_bip44Ptr.asFunction< - void Function(int, ffi.Pointer, - int, int)>(); - - void wire_bdk_descriptor_new_bip44_public( - int port_, - ffi.Pointer public_key, - ffi.Pointer fingerprint, - int keychain_kind, - int network, - ) { - return _wire_bdk_descriptor_new_bip44_public( - port_, - public_key, - fingerprint, - keychain_kind, - network, - ); - } - - late final _wire_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_bdk_descriptor_new_bip44_public'); - late final _wire_bdk_descriptor_new_bip44_public = - _wire_bdk_descriptor_new_bip44_publicPtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer, int, int)>(); - - void wire_bdk_descriptor_new_bip49( - int port_, - ffi.Pointer secret_key, - int keychain_kind, - int network, - ) { - return _wire_bdk_descriptor_new_bip49( - port_, - secret_key, - keychain_kind, - network, - ); - } - - late final _wire_bdk_descriptor_new_bip49Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Int32, - ffi.Int32)>>('frbgen_bdk_flutter_wire_bdk_descriptor_new_bip49'); - late final _wire_bdk_descriptor_new_bip49 = - _wire_bdk_descriptor_new_bip49Ptr.asFunction< - void Function(int, ffi.Pointer, - int, int)>(); - - void wire_bdk_descriptor_new_bip49_public( - int port_, - ffi.Pointer public_key, - ffi.Pointer fingerprint, - int keychain_kind, - int network, - ) { - return _wire_bdk_descriptor_new_bip49_public( - port_, - public_key, - fingerprint, - keychain_kind, - network, - ); - } - - late final _wire_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_bdk_descriptor_new_bip49_public'); - late final _wire_bdk_descriptor_new_bip49_public = - _wire_bdk_descriptor_new_bip49_publicPtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer, int, int)>(); - - void wire_bdk_descriptor_new_bip84( - int port_, - ffi.Pointer secret_key, - int keychain_kind, - int network, - ) { - return _wire_bdk_descriptor_new_bip84( - port_, - secret_key, - keychain_kind, - network, - ); - } - - late final _wire_bdk_descriptor_new_bip84Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Int32, - ffi.Int32)>>('frbgen_bdk_flutter_wire_bdk_descriptor_new_bip84'); - late final _wire_bdk_descriptor_new_bip84 = - _wire_bdk_descriptor_new_bip84Ptr.asFunction< - void Function(int, ffi.Pointer, - int, int)>(); - - void wire_bdk_descriptor_new_bip84_public( - int port_, - ffi.Pointer public_key, - ffi.Pointer fingerprint, - int keychain_kind, - int network, - ) { - return _wire_bdk_descriptor_new_bip84_public( - port_, - public_key, - fingerprint, - keychain_kind, - network, - ); - } - - late final _wire_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_bdk_descriptor_new_bip84_public'); - late final _wire_bdk_descriptor_new_bip84_public = - _wire_bdk_descriptor_new_bip84_publicPtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer, int, int)>(); - - void wire_bdk_descriptor_new_bip86( - int port_, - ffi.Pointer secret_key, - int keychain_kind, - int network, - ) { - return _wire_bdk_descriptor_new_bip86( - port_, - secret_key, - keychain_kind, - network, - ); - } - - late final _wire_bdk_descriptor_new_bip86Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Int32, - ffi.Int32)>>('frbgen_bdk_flutter_wire_bdk_descriptor_new_bip86'); - late final _wire_bdk_descriptor_new_bip86 = - _wire_bdk_descriptor_new_bip86Ptr.asFunction< - void Function(int, ffi.Pointer, - int, int)>(); - - void wire_bdk_descriptor_new_bip86_public( - int port_, - ffi.Pointer public_key, - ffi.Pointer fingerprint, - int keychain_kind, - int network, - ) { - return _wire_bdk_descriptor_new_bip86_public( - port_, - public_key, - fingerprint, - keychain_kind, - network, - ); - } - - late final _wire_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_bdk_descriptor_new_bip86_public'); - late final _wire_bdk_descriptor_new_bip86_public = - _wire_bdk_descriptor_new_bip86_publicPtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer, int, int)>(); - - void wire_bdk_derivation_path_from_string( - int port_, - ffi.Pointer path, - ) { - return _wire_bdk_derivation_path_from_string( - port_, - path, - ); - } - - late final _wire_bdk_derivation_path_from_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_derivation_path_from_string'); - late final _wire_bdk_derivation_path_from_string = - _wire_bdk_derivation_path_from_stringPtr.asFunction< - void Function(int, ffi.Pointer)>(); - - void wire_bdk_descriptor_public_key_as_string( - int port_, - ffi.Pointer that, - ) { - return _wire_bdk_descriptor_public_key_as_string( - port_, - that, - ); - } - - late final _wire_bdk_descriptor_public_key_as_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_descriptor_public_key_as_string'); - late final _wire_bdk_descriptor_public_key_as_string = - _wire_bdk_descriptor_public_key_as_stringPtr.asFunction< - void Function( - int, ffi.Pointer)>(); - - void wire_bdk_descriptor_public_key_derive( - int port_, - ffi.Pointer ptr, - ffi.Pointer path, - ) { - return _wire_bdk_descriptor_public_key_derive( - port_, - ptr, - path, - ); - } - - late final _wire_bdk_descriptor_public_key_derivePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_descriptor_public_key_derive'); - late final _wire_bdk_descriptor_public_key_derive = - _wire_bdk_descriptor_public_key_derivePtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); - - void wire_bdk_descriptor_public_key_extend( - int port_, - ffi.Pointer ptr, - ffi.Pointer path, - ) { - return _wire_bdk_descriptor_public_key_extend( - port_, - ptr, - path, - ); - } - - late final _wire_bdk_descriptor_public_key_extendPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_descriptor_public_key_extend'); - late final _wire_bdk_descriptor_public_key_extend = - _wire_bdk_descriptor_public_key_extendPtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); - - void wire_bdk_descriptor_public_key_from_string( - int port_, - ffi.Pointer public_key, - ) { - return _wire_bdk_descriptor_public_key_from_string( - port_, - public_key, - ); - } - - late final _wire_bdk_descriptor_public_key_from_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_descriptor_public_key_from_string'); - late final _wire_bdk_descriptor_public_key_from_string = - _wire_bdk_descriptor_public_key_from_stringPtr.asFunction< - void Function(int, ffi.Pointer)>(); - - void wire_bdk_descriptor_secret_key_as_public( - int port_, - ffi.Pointer ptr, - ) { - return _wire_bdk_descriptor_secret_key_as_public( - port_, - ptr, - ); - } - - late final _wire_bdk_descriptor_secret_key_as_publicPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_as_public'); - late final _wire_bdk_descriptor_secret_key_as_public = - _wire_bdk_descriptor_secret_key_as_publicPtr.asFunction< - void Function( - int, ffi.Pointer)>(); - - void wire_bdk_descriptor_secret_key_as_string( - int port_, - ffi.Pointer that, - ) { - return _wire_bdk_descriptor_secret_key_as_string( - port_, - that, - ); - } - - late final _wire_bdk_descriptor_secret_key_as_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_as_string'); - late final _wire_bdk_descriptor_secret_key_as_string = - _wire_bdk_descriptor_secret_key_as_stringPtr.asFunction< - void Function( - int, ffi.Pointer)>(); - - void wire_bdk_descriptor_secret_key_create( - int port_, - int network, - ffi.Pointer mnemonic, - ffi.Pointer password, - ) { - return _wire_bdk_descriptor_secret_key_create( - port_, - network, - mnemonic, - password, - ); - } - - late final _wire_bdk_descriptor_secret_key_createPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Int32, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_create'); - late final _wire_bdk_descriptor_secret_key_create = - _wire_bdk_descriptor_secret_key_createPtr.asFunction< - void Function(int, int, ffi.Pointer, - ffi.Pointer)>(); - - void wire_bdk_descriptor_secret_key_derive( - int port_, - ffi.Pointer ptr, - ffi.Pointer path, - ) { - return _wire_bdk_descriptor_secret_key_derive( - port_, - ptr, - path, - ); - } - - late final _wire_bdk_descriptor_secret_key_derivePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_derive'); - late final _wire_bdk_descriptor_secret_key_derive = - _wire_bdk_descriptor_secret_key_derivePtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); - - void wire_bdk_descriptor_secret_key_extend( - int port_, - ffi.Pointer ptr, - ffi.Pointer path, - ) { - return _wire_bdk_descriptor_secret_key_extend( - port_, - ptr, - path, - ); - } - - late final _wire_bdk_descriptor_secret_key_extendPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_extend'); - late final _wire_bdk_descriptor_secret_key_extend = - _wire_bdk_descriptor_secret_key_extendPtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); - - void wire_bdk_descriptor_secret_key_from_string( - int port_, - ffi.Pointer secret_key, - ) { - return _wire_bdk_descriptor_secret_key_from_string( - port_, - secret_key, - ); - } - - late final _wire_bdk_descriptor_secret_key_from_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_from_string'); - late final _wire_bdk_descriptor_secret_key_from_string = - _wire_bdk_descriptor_secret_key_from_stringPtr.asFunction< - void Function(int, ffi.Pointer)>(); - - void wire_bdk_descriptor_secret_key_secret_bytes( - int port_, - ffi.Pointer that, - ) { - return _wire_bdk_descriptor_secret_key_secret_bytes( - port_, - that, - ); - } - - late final _wire_bdk_descriptor_secret_key_secret_bytesPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_secret_bytes'); - late final _wire_bdk_descriptor_secret_key_secret_bytes = - _wire_bdk_descriptor_secret_key_secret_bytesPtr.asFunction< - void Function( - int, ffi.Pointer)>(); - - void wire_bdk_mnemonic_as_string( - int port_, - ffi.Pointer that, - ) { - return _wire_bdk_mnemonic_as_string( - port_, - that, - ); - } - - late final _wire_bdk_mnemonic_as_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_mnemonic_as_string'); - late final _wire_bdk_mnemonic_as_string = _wire_bdk_mnemonic_as_stringPtr - .asFunction)>(); - - void wire_bdk_mnemonic_from_entropy( - int port_, - ffi.Pointer entropy, - ) { - return _wire_bdk_mnemonic_from_entropy( - port_, - entropy, - ); - } - - late final _wire_bdk_mnemonic_from_entropyPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_mnemonic_from_entropy'); - late final _wire_bdk_mnemonic_from_entropy = - _wire_bdk_mnemonic_from_entropyPtr.asFunction< - void Function(int, ffi.Pointer)>(); - - void wire_bdk_mnemonic_from_string( - int port_, - ffi.Pointer mnemonic, - ) { - return _wire_bdk_mnemonic_from_string( - port_, - mnemonic, - ); - } - - late final _wire_bdk_mnemonic_from_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_mnemonic_from_string'); - late final _wire_bdk_mnemonic_from_string = - _wire_bdk_mnemonic_from_stringPtr.asFunction< - void Function(int, ffi.Pointer)>(); - - void wire_bdk_mnemonic_new( - int port_, - int word_count, - ) { - return _wire_bdk_mnemonic_new( - port_, - word_count, - ); - } - - late final _wire_bdk_mnemonic_newPtr = - _lookup>( - 'frbgen_bdk_flutter_wire_bdk_mnemonic_new'); - late final _wire_bdk_mnemonic_new = - _wire_bdk_mnemonic_newPtr.asFunction(); - - void wire_bdk_psbt_combine( - int port_, - ffi.Pointer ptr, - ffi.Pointer other, - ) { - return _wire_bdk_psbt_combine( - port_, - ptr, - other, - ); - } - - late final _wire_bdk_psbt_combinePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_psbt_combine'); - late final _wire_bdk_psbt_combine = _wire_bdk_psbt_combinePtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); - - void wire_bdk_psbt_extract_tx( - int port_, - ffi.Pointer ptr, - ) { - return _wire_bdk_psbt_extract_tx( - port_, - ptr, - ); - } - - late final _wire_bdk_psbt_extract_txPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_psbt_extract_tx'); - late final _wire_bdk_psbt_extract_tx = _wire_bdk_psbt_extract_txPtr - .asFunction)>(); - - void wire_bdk_psbt_fee_amount( - int port_, - ffi.Pointer that, - ) { - return _wire_bdk_psbt_fee_amount( - port_, - that, - ); - } - - late final _wire_bdk_psbt_fee_amountPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_psbt_fee_amount'); - late final _wire_bdk_psbt_fee_amount = _wire_bdk_psbt_fee_amountPtr - .asFunction)>(); - - void wire_bdk_psbt_fee_rate( - int port_, - ffi.Pointer that, - ) { - return _wire_bdk_psbt_fee_rate( - port_, - that, - ); - } - - late final _wire_bdk_psbt_fee_ratePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_psbt_fee_rate'); - late final _wire_bdk_psbt_fee_rate = _wire_bdk_psbt_fee_ratePtr - .asFunction)>(); - - void wire_bdk_psbt_from_str( - int port_, - ffi.Pointer psbt_base64, - ) { - return _wire_bdk_psbt_from_str( - port_, - psbt_base64, - ); - } - - late final _wire_bdk_psbt_from_strPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_psbt_from_str'); - late final _wire_bdk_psbt_from_str = _wire_bdk_psbt_from_strPtr.asFunction< - void Function(int, ffi.Pointer)>(); - - void wire_bdk_psbt_json_serialize( - int port_, - ffi.Pointer that, - ) { - return _wire_bdk_psbt_json_serialize( - port_, - that, - ); - } - - late final _wire_bdk_psbt_json_serializePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_psbt_json_serialize'); - late final _wire_bdk_psbt_json_serialize = _wire_bdk_psbt_json_serializePtr - .asFunction)>(); - - void wire_bdk_psbt_serialize( - int port_, - ffi.Pointer that, - ) { - return _wire_bdk_psbt_serialize( - port_, - that, - ); - } - - late final _wire_bdk_psbt_serializePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_psbt_serialize'); - late final _wire_bdk_psbt_serialize = _wire_bdk_psbt_serializePtr - .asFunction)>(); - - void wire_bdk_psbt_txid( - int port_, - ffi.Pointer that, - ) { - return _wire_bdk_psbt_txid( - port_, - that, - ); - } - - late final _wire_bdk_psbt_txidPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_psbt_txid'); - late final _wire_bdk_psbt_txid = _wire_bdk_psbt_txidPtr - .asFunction)>(); - - void wire_bdk_address_as_string( - int port_, - ffi.Pointer that, - ) { - return _wire_bdk_address_as_string( - port_, - that, - ); - } - - late final _wire_bdk_address_as_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_address_as_string'); - late final _wire_bdk_address_as_string = _wire_bdk_address_as_stringPtr - .asFunction)>(); - - void wire_bdk_address_from_script( - int port_, - ffi.Pointer script, - int network, - ) { - return _wire_bdk_address_from_script( - port_, - script, - network, - ); - } - - late final _wire_bdk_address_from_scriptPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer, - ffi.Int32)>>('frbgen_bdk_flutter_wire_bdk_address_from_script'); - late final _wire_bdk_address_from_script = - _wire_bdk_address_from_scriptPtr.asFunction< - void Function(int, ffi.Pointer, int)>(); - - void wire_bdk_address_from_string( - int port_, - ffi.Pointer address, - int network, - ) { - return _wire_bdk_address_from_string( - port_, - address, - network, - ); - } - - late final _wire_bdk_address_from_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Int32)>>('frbgen_bdk_flutter_wire_bdk_address_from_string'); - late final _wire_bdk_address_from_string = - _wire_bdk_address_from_stringPtr.asFunction< - void Function( - int, ffi.Pointer, int)>(); - - void wire_bdk_address_is_valid_for_network( - int port_, - ffi.Pointer that, - int network, - ) { - return _wire_bdk_address_is_valid_for_network( - port_, - that, - network, - ); - } - - late final _wire_bdk_address_is_valid_for_networkPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer, ffi.Int32)>>( - 'frbgen_bdk_flutter_wire_bdk_address_is_valid_for_network'); - late final _wire_bdk_address_is_valid_for_network = - _wire_bdk_address_is_valid_for_networkPtr.asFunction< - void Function(int, ffi.Pointer, int)>(); - - void wire_bdk_address_network( - int port_, - ffi.Pointer that, - ) { - return _wire_bdk_address_network( - port_, - that, - ); - } - - late final _wire_bdk_address_networkPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_address_network'); - late final _wire_bdk_address_network = _wire_bdk_address_networkPtr - .asFunction)>(); - - void wire_bdk_address_payload( - int port_, - ffi.Pointer that, - ) { - return _wire_bdk_address_payload( - port_, - that, - ); - } - - late final _wire_bdk_address_payloadPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_address_payload'); - late final _wire_bdk_address_payload = _wire_bdk_address_payloadPtr - .asFunction)>(); - - void wire_bdk_address_script( - int port_, - ffi.Pointer ptr, - ) { - return _wire_bdk_address_script( - port_, - ptr, - ); - } - - late final _wire_bdk_address_scriptPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_address_script'); - late final _wire_bdk_address_script = _wire_bdk_address_scriptPtr - .asFunction)>(); - - void wire_bdk_address_to_qr_uri( - int port_, - ffi.Pointer that, - ) { - return _wire_bdk_address_to_qr_uri( - port_, - that, - ); - } - - late final _wire_bdk_address_to_qr_uriPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_address_to_qr_uri'); - late final _wire_bdk_address_to_qr_uri = _wire_bdk_address_to_qr_uriPtr - .asFunction)>(); - - void wire_bdk_script_buf_empty( - int port_, - ) { - return _wire_bdk_script_buf_empty( - port_, - ); - } - - late final _wire_bdk_script_buf_emptyPtr = - _lookup>( - 'frbgen_bdk_flutter_wire_bdk_script_buf_empty'); - late final _wire_bdk_script_buf_empty = - _wire_bdk_script_buf_emptyPtr.asFunction(); - - void wire_bdk_script_buf_from_hex( - int port_, - ffi.Pointer s, - ) { - return _wire_bdk_script_buf_from_hex( - port_, - s, - ); - } - - late final _wire_bdk_script_buf_from_hexPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_script_buf_from_hex'); - late final _wire_bdk_script_buf_from_hex = - _wire_bdk_script_buf_from_hexPtr.asFunction< - void Function(int, ffi.Pointer)>(); - - void wire_bdk_script_buf_with_capacity( - int port_, - int capacity, - ) { - return _wire_bdk_script_buf_with_capacity( - port_, - capacity, - ); - } - - late final _wire_bdk_script_buf_with_capacityPtr = - _lookup>( - 'frbgen_bdk_flutter_wire_bdk_script_buf_with_capacity'); - late final _wire_bdk_script_buf_with_capacity = - _wire_bdk_script_buf_with_capacityPtr - .asFunction(); - - void wire_bdk_transaction_from_bytes( - int port_, - ffi.Pointer transaction_bytes, - ) { - return _wire_bdk_transaction_from_bytes( - port_, - transaction_bytes, - ); - } - - late final _wire_bdk_transaction_from_bytesPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_transaction_from_bytes'); - late final _wire_bdk_transaction_from_bytes = - _wire_bdk_transaction_from_bytesPtr.asFunction< - void Function(int, ffi.Pointer)>(); - - void wire_bdk_transaction_input( - int port_, - ffi.Pointer that, - ) { - return _wire_bdk_transaction_input( - port_, - that, - ); - } - - late final _wire_bdk_transaction_inputPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_transaction_input'); - late final _wire_bdk_transaction_input = _wire_bdk_transaction_inputPtr - .asFunction)>(); - - void wire_bdk_transaction_is_coin_base( - int port_, - ffi.Pointer that, - ) { - return _wire_bdk_transaction_is_coin_base( - port_, - that, - ); - } - - late final _wire_bdk_transaction_is_coin_basePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_transaction_is_coin_base'); - late final _wire_bdk_transaction_is_coin_base = - _wire_bdk_transaction_is_coin_basePtr.asFunction< - void Function(int, ffi.Pointer)>(); - - void wire_bdk_transaction_is_explicitly_rbf( - int port_, - ffi.Pointer that, - ) { - return _wire_bdk_transaction_is_explicitly_rbf( - port_, - that, - ); - } - - late final _wire_bdk_transaction_is_explicitly_rbfPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_transaction_is_explicitly_rbf'); - late final _wire_bdk_transaction_is_explicitly_rbf = - _wire_bdk_transaction_is_explicitly_rbfPtr.asFunction< - void Function(int, ffi.Pointer)>(); - - void wire_bdk_transaction_is_lock_time_enabled( - int port_, - ffi.Pointer that, - ) { - return _wire_bdk_transaction_is_lock_time_enabled( - port_, - that, - ); - } - - late final _wire_bdk_transaction_is_lock_time_enabledPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_transaction_is_lock_time_enabled'); - late final _wire_bdk_transaction_is_lock_time_enabled = - _wire_bdk_transaction_is_lock_time_enabledPtr.asFunction< - void Function(int, ffi.Pointer)>(); - - void wire_bdk_transaction_lock_time( - int port_, - ffi.Pointer that, - ) { - return _wire_bdk_transaction_lock_time( - port_, - that, - ); - } - - late final _wire_bdk_transaction_lock_timePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_transaction_lock_time'); - late final _wire_bdk_transaction_lock_time = - _wire_bdk_transaction_lock_timePtr.asFunction< - void Function(int, ffi.Pointer)>(); - - void wire_bdk_transaction_new( - int port_, - int version, - ffi.Pointer lock_time, - ffi.Pointer input, - ffi.Pointer output, - ) { - return _wire_bdk_transaction_new( - port_, - version, - lock_time, - input, - output, - ); - } - - late final _wire_bdk_transaction_newPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_transaction_new'); - late final _wire_bdk_transaction_new = - _wire_bdk_transaction_newPtr.asFunction< - void Function( - int, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - void wire_bdk_transaction_output( - int port_, - ffi.Pointer that, - ) { - return _wire_bdk_transaction_output( - port_, - that, - ); - } - - late final _wire_bdk_transaction_outputPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_transaction_output'); - late final _wire_bdk_transaction_output = _wire_bdk_transaction_outputPtr - .asFunction)>(); - - void wire_bdk_transaction_serialize( - int port_, - ffi.Pointer that, - ) { - return _wire_bdk_transaction_serialize( - port_, - that, - ); - } - - late final _wire_bdk_transaction_serializePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_transaction_serialize'); - late final _wire_bdk_transaction_serialize = - _wire_bdk_transaction_serializePtr.asFunction< - void Function(int, ffi.Pointer)>(); - - void wire_bdk_transaction_size( - int port_, - ffi.Pointer that, - ) { - return _wire_bdk_transaction_size( - port_, - that, - ); - } - - late final _wire_bdk_transaction_sizePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_transaction_size'); - late final _wire_bdk_transaction_size = _wire_bdk_transaction_sizePtr - .asFunction)>(); - - void wire_bdk_transaction_txid( - int port_, - ffi.Pointer that, - ) { - return _wire_bdk_transaction_txid( - port_, - that, - ); - } - - late final _wire_bdk_transaction_txidPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_transaction_txid'); - late final _wire_bdk_transaction_txid = _wire_bdk_transaction_txidPtr - .asFunction)>(); - - void wire_bdk_transaction_version( - int port_, - ffi.Pointer that, - ) { - return _wire_bdk_transaction_version( - port_, - that, - ); - } - - late final _wire_bdk_transaction_versionPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_transaction_version'); - late final _wire_bdk_transaction_version = _wire_bdk_transaction_versionPtr - .asFunction)>(); - - void wire_bdk_transaction_vsize( - int port_, - ffi.Pointer that, - ) { - return _wire_bdk_transaction_vsize( - port_, - that, - ); - } - - late final _wire_bdk_transaction_vsizePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_transaction_vsize'); - late final _wire_bdk_transaction_vsize = _wire_bdk_transaction_vsizePtr - .asFunction)>(); - - void wire_bdk_transaction_weight( - int port_, - ffi.Pointer that, - ) { - return _wire_bdk_transaction_weight( - port_, - that, - ); - } - - late final _wire_bdk_transaction_weightPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_transaction_weight'); - late final _wire_bdk_transaction_weight = _wire_bdk_transaction_weightPtr - .asFunction)>(); - - void wire_bdk_wallet_get_address( - int port_, - ffi.Pointer ptr, - ffi.Pointer address_index, - ) { - return _wire_bdk_wallet_get_address( - port_, - ptr, - address_index, - ); - } - - late final _wire_bdk_wallet_get_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_wallet_get_address'); - late final _wire_bdk_wallet_get_address = - _wire_bdk_wallet_get_addressPtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); - - void wire_bdk_wallet_get_balance( - int port_, - ffi.Pointer that, - ) { - return _wire_bdk_wallet_get_balance( - port_, - that, - ); - } - - late final _wire_bdk_wallet_get_balancePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_wallet_get_balance'); - late final _wire_bdk_wallet_get_balance = _wire_bdk_wallet_get_balancePtr - .asFunction)>(); - - void wire_bdk_wallet_get_descriptor_for_keychain( - int port_, - ffi.Pointer ptr, - int keychain, - ) { - return _wire_bdk_wallet_get_descriptor_for_keychain( - port_, - ptr, - keychain, - ); - } - - late final _wire_bdk_wallet_get_descriptor_for_keychainPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer, ffi.Int32)>>( - 'frbgen_bdk_flutter_wire_bdk_wallet_get_descriptor_for_keychain'); - late final _wire_bdk_wallet_get_descriptor_for_keychain = - _wire_bdk_wallet_get_descriptor_for_keychainPtr.asFunction< - void Function(int, ffi.Pointer, int)>(); - - void wire_bdk_wallet_get_internal_address( - int port_, - ffi.Pointer ptr, - ffi.Pointer address_index, - ) { - return _wire_bdk_wallet_get_internal_address( - port_, - ptr, - address_index, - ); - } - - late final _wire_bdk_wallet_get_internal_addressPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_wallet_get_internal_address'); - late final _wire_bdk_wallet_get_internal_address = - _wire_bdk_wallet_get_internal_addressPtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); - - void wire_bdk_wallet_get_psbt_input( - int port_, - ffi.Pointer that, - ffi.Pointer utxo, - bool only_witness_utxo, - ffi.Pointer sighash_type, - ) { - return _wire_bdk_wallet_get_psbt_input( - port_, - that, - utxo, - only_witness_utxo, - sighash_type, - ); - } - - late final _wire_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_bdk_wallet_get_psbt_input'); - late final _wire_bdk_wallet_get_psbt_input = - _wire_bdk_wallet_get_psbt_inputPtr.asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>(); - - void wire_bdk_wallet_is_mine( - int port_, - ffi.Pointer that, - ffi.Pointer script, - ) { - return _wire_bdk_wallet_is_mine( - port_, - that, - script, - ); - } - - late final _wire_bdk_wallet_is_minePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_wallet_is_mine'); - late final _wire_bdk_wallet_is_mine = _wire_bdk_wallet_is_minePtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); - - void wire_bdk_wallet_list_transactions( - int port_, - ffi.Pointer that, - bool include_raw, - ) { - return _wire_bdk_wallet_list_transactions( - port_, - that, - include_raw, - ); - } - - late final _wire_bdk_wallet_list_transactionsPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer, ffi.Bool)>>( - 'frbgen_bdk_flutter_wire_bdk_wallet_list_transactions'); - late final _wire_bdk_wallet_list_transactions = - _wire_bdk_wallet_list_transactionsPtr.asFunction< - void Function(int, ffi.Pointer, bool)>(); - - void wire_bdk_wallet_list_unspent( - int port_, - ffi.Pointer that, - ) { - return _wire_bdk_wallet_list_unspent( - port_, - that, - ); - } - - late final _wire_bdk_wallet_list_unspentPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_wallet_list_unspent'); - late final _wire_bdk_wallet_list_unspent = _wire_bdk_wallet_list_unspentPtr - .asFunction)>(); - - void wire_bdk_wallet_network( - int port_, - ffi.Pointer that, - ) { - return _wire_bdk_wallet_network( - port_, - that, - ); - } - - late final _wire_bdk_wallet_networkPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_wallet_network'); - late final _wire_bdk_wallet_network = _wire_bdk_wallet_networkPtr - .asFunction)>(); - - void wire_bdk_wallet_new( - int port_, - ffi.Pointer descriptor, - ffi.Pointer change_descriptor, - int network, - ffi.Pointer database_config, - ) { - return _wire_bdk_wallet_new( - port_, - descriptor, - change_descriptor, - network, - database_config, - ); - } - - late final _wire_bdk_wallet_newPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_wallet_new'); - late final _wire_bdk_wallet_new = _wire_bdk_wallet_newPtr.asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); - - void wire_bdk_wallet_sign( - int port_, - ffi.Pointer ptr, - ffi.Pointer psbt, - ffi.Pointer sign_options, - ) { - return _wire_bdk_wallet_sign( - port_, - ptr, - psbt, - sign_options, - ); - } - - late final _wire_bdk_wallet_signPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_wallet_sign'); - late final _wire_bdk_wallet_sign = _wire_bdk_wallet_signPtr.asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - void wire_bdk_wallet_sync( - int port_, - ffi.Pointer ptr, - ffi.Pointer blockchain, - ) { - return _wire_bdk_wallet_sync( - port_, - ptr, - blockchain, - ); - } - - late final _wire_bdk_wallet_syncPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire_bdk_wallet_sync'); - late final _wire_bdk_wallet_sync = _wire_bdk_wallet_syncPtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); - - void wire_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_finish_bump_fee_tx_builder( - port_, - txid, - fee_rate, - allow_shrinking, - wallet, - enable_rbf, - n_sequence, - ); - } - - late final _wire_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_finish_bump_fee_tx_builder'); - late final _wire_finish_bump_fee_tx_builder = - _wire_finish_bump_fee_tx_builderPtr.asFunction< - void Function( - int, - ffi.Pointer, - double, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>(); - - void wire_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 data, - ) { - return _wire_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, - data, - ); - } - - late final _wire_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)>>( - 'frbgen_bdk_flutter_wire_tx_builder_finish'); - late final _wire_tx_builder_finish = _wire_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)>(); - - void rust_arc_increment_strong_count_RustOpaque_AnyBlockchain( - ffi.Pointer ptr, - ) { - return _rust_arc_increment_strong_count_RustOpaque_AnyBlockchain( - ptr, - ); - } - - late final _rust_arc_increment_strong_count_RustOpaque_AnyBlockchainPtr = - _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_AnyBlockchain'); - late final _rust_arc_increment_strong_count_RustOpaque_AnyBlockchain = - _rust_arc_increment_strong_count_RustOpaque_AnyBlockchainPtr - .asFunction)>(); - - void rust_arc_decrement_strong_count_RustOpaque_AnyBlockchain( - ffi.Pointer ptr, - ) { - return _rust_arc_decrement_strong_count_RustOpaque_AnyBlockchain( - ptr, - ); - } - - late final _rust_arc_decrement_strong_count_RustOpaque_AnyBlockchainPtr = - _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_AnyBlockchain'); - late final _rust_arc_decrement_strong_count_RustOpaque_AnyBlockchain = - _rust_arc_decrement_strong_count_RustOpaque_AnyBlockchainPtr - .asFunction)>(); - - void rust_arc_increment_strong_count_RustOpaque_ExtendedDescriptor( - ffi.Pointer ptr, - ) { - return _rust_arc_increment_strong_count_RustOpaque_ExtendedDescriptor( - ptr, - ); - } - - late final _rust_arc_increment_strong_count_RustOpaque_ExtendedDescriptorPtr = - _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_ExtendedDescriptor'); - late final _rust_arc_increment_strong_count_RustOpaque_ExtendedDescriptor = - _rust_arc_increment_strong_count_RustOpaque_ExtendedDescriptorPtr - .asFunction)>(); - - void rust_arc_decrement_strong_count_RustOpaque_ExtendedDescriptor( - ffi.Pointer ptr, - ) { - return _rust_arc_decrement_strong_count_RustOpaque_ExtendedDescriptor( - ptr, - ); - } - - late final _rust_arc_decrement_strong_count_RustOpaque_ExtendedDescriptorPtr = - _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_ExtendedDescriptor'); - late final _rust_arc_decrement_strong_count_RustOpaque_ExtendedDescriptor = - _rust_arc_decrement_strong_count_RustOpaque_ExtendedDescriptorPtr - .asFunction)>(); - - void - rust_arc_increment_strong_count_RustOpaque_MutexPartiallySignedTransaction( - ffi.Pointer ptr, - ) { - return _rust_arc_increment_strong_count_RustOpaque_MutexPartiallySignedTransaction( - ptr, - ); - } - - late final _rust_arc_increment_strong_count_RustOpaque_MutexPartiallySignedTransactionPtr = - _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_MutexPartiallySignedTransaction'); - late final _rust_arc_increment_strong_count_RustOpaque_MutexPartiallySignedTransaction = - _rust_arc_increment_strong_count_RustOpaque_MutexPartiallySignedTransactionPtr - .asFunction)>(); - - void - rust_arc_decrement_strong_count_RustOpaque_MutexPartiallySignedTransaction( - ffi.Pointer ptr, - ) { - return _rust_arc_decrement_strong_count_RustOpaque_MutexPartiallySignedTransaction( - ptr, - ); - } - - late final _rust_arc_decrement_strong_count_RustOpaque_MutexPartiallySignedTransactionPtr = - _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_MutexPartiallySignedTransaction'); - late final _rust_arc_decrement_strong_count_RustOpaque_MutexPartiallySignedTransaction = - _rust_arc_decrement_strong_count_RustOpaque_MutexPartiallySignedTransactionPtr - .asFunction)>(); - - void rust_arc_increment_strong_count_RustOpaque_MutexbdkWalletAnyDatabase( - ffi.Pointer ptr, - ) { - return _rust_arc_increment_strong_count_RustOpaque_MutexbdkWalletAnyDatabase( - ptr, - ); - } - - late final _rust_arc_increment_strong_count_RustOpaque_MutexbdkWalletAnyDatabasePtr = - _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_MutexbdkWalletAnyDatabase'); - late final _rust_arc_increment_strong_count_RustOpaque_MutexbdkWalletAnyDatabase = - _rust_arc_increment_strong_count_RustOpaque_MutexbdkWalletAnyDatabasePtr - .asFunction)>(); - - void rust_arc_decrement_strong_count_RustOpaque_MutexbdkWalletAnyDatabase( - ffi.Pointer ptr, - ) { - return _rust_arc_decrement_strong_count_RustOpaque_MutexbdkWalletAnyDatabase( - ptr, - ); - } - - late final _rust_arc_decrement_strong_count_RustOpaque_MutexbdkWalletAnyDatabasePtr = - _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_MutexbdkWalletAnyDatabase'); - late final _rust_arc_decrement_strong_count_RustOpaque_MutexbdkWalletAnyDatabase = - _rust_arc_decrement_strong_count_RustOpaque_MutexbdkWalletAnyDatabasePtr - .asFunction)>(); - - 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_bitcoinbip32DerivationPath( - ffi.Pointer ptr, - ) { - return _rust_arc_increment_strong_count_RustOpaque_bitcoinbip32DerivationPath( - ptr, - ); - } - - late final _rust_arc_increment_strong_count_RustOpaque_bitcoinbip32DerivationPathPtr = - _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bitcoinbip32DerivationPath'); - late final _rust_arc_increment_strong_count_RustOpaque_bitcoinbip32DerivationPath = - _rust_arc_increment_strong_count_RustOpaque_bitcoinbip32DerivationPathPtr - .asFunction)>(); - - void rust_arc_decrement_strong_count_RustOpaque_bitcoinbip32DerivationPath( - ffi.Pointer ptr, - ) { - return _rust_arc_decrement_strong_count_RustOpaque_bitcoinbip32DerivationPath( - ptr, - ); - } - - late final _rust_arc_decrement_strong_count_RustOpaque_bitcoinbip32DerivationPathPtr = - _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bitcoinbip32DerivationPath'); - late final _rust_arc_decrement_strong_count_RustOpaque_bitcoinbip32DerivationPath = - _rust_arc_decrement_strong_count_RustOpaque_bitcoinbip32DerivationPathPtr - .asFunction)>(); - - void rust_arc_increment_strong_count_RustOpaque_keysDescriptorPublicKey( - ffi.Pointer ptr, - ) { - return _rust_arc_increment_strong_count_RustOpaque_keysDescriptorPublicKey( - ptr, - ); - } - - late final _rust_arc_increment_strong_count_RustOpaque_keysDescriptorPublicKeyPtr = - _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysDescriptorPublicKey'); - late final _rust_arc_increment_strong_count_RustOpaque_keysDescriptorPublicKey = - _rust_arc_increment_strong_count_RustOpaque_keysDescriptorPublicKeyPtr - .asFunction)>(); - - void rust_arc_decrement_strong_count_RustOpaque_keysDescriptorPublicKey( - ffi.Pointer ptr, - ) { - return _rust_arc_decrement_strong_count_RustOpaque_keysDescriptorPublicKey( - ptr, - ); - } - - late final _rust_arc_decrement_strong_count_RustOpaque_keysDescriptorPublicKeyPtr = - _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysDescriptorPublicKey'); - late final _rust_arc_decrement_strong_count_RustOpaque_keysDescriptorPublicKey = - _rust_arc_decrement_strong_count_RustOpaque_keysDescriptorPublicKeyPtr - .asFunction)>(); - - void rust_arc_increment_strong_count_RustOpaque_keysDescriptorSecretKey( - ffi.Pointer ptr, - ) { - return _rust_arc_increment_strong_count_RustOpaque_keysDescriptorSecretKey( - ptr, - ); - } - - late final _rust_arc_increment_strong_count_RustOpaque_keysDescriptorSecretKeyPtr = - _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysDescriptorSecretKey'); - late final _rust_arc_increment_strong_count_RustOpaque_keysDescriptorSecretKey = - _rust_arc_increment_strong_count_RustOpaque_keysDescriptorSecretKeyPtr - .asFunction)>(); - - void rust_arc_decrement_strong_count_RustOpaque_keysDescriptorSecretKey( - ffi.Pointer ptr, - ) { - return _rust_arc_decrement_strong_count_RustOpaque_keysDescriptorSecretKey( - ptr, - ); - } - - late final _rust_arc_decrement_strong_count_RustOpaque_keysDescriptorSecretKeyPtr = - _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysDescriptorSecretKey'); - late final _rust_arc_decrement_strong_count_RustOpaque_keysDescriptorSecretKey = - _rust_arc_decrement_strong_count_RustOpaque_keysDescriptorSecretKeyPtr - .asFunction)>(); - - void rust_arc_increment_strong_count_RustOpaque_keysKeyMap( - ffi.Pointer ptr, - ) { - return _rust_arc_increment_strong_count_RustOpaque_keysKeyMap( - ptr, - ); - } - - late final _rust_arc_increment_strong_count_RustOpaque_keysKeyMapPtr = _lookup< - ffi.NativeFunction)>>( - 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysKeyMap'); - late final _rust_arc_increment_strong_count_RustOpaque_keysKeyMap = - _rust_arc_increment_strong_count_RustOpaque_keysKeyMapPtr - .asFunction)>(); - - void rust_arc_decrement_strong_count_RustOpaque_keysKeyMap( - ffi.Pointer ptr, - ) { - return _rust_arc_decrement_strong_count_RustOpaque_keysKeyMap( - ptr, - ); - } - - late final _rust_arc_decrement_strong_count_RustOpaque_keysKeyMapPtr = _lookup< - ffi.NativeFunction)>>( - 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysKeyMap'); - late final _rust_arc_decrement_strong_count_RustOpaque_keysKeyMap = - _rust_arc_decrement_strong_count_RustOpaque_keysKeyMapPtr - .asFunction)>(); - - void rust_arc_increment_strong_count_RustOpaque_keysbip39Mnemonic( - ffi.Pointer ptr, - ) { - return _rust_arc_increment_strong_count_RustOpaque_keysbip39Mnemonic( - ptr, - ); - } - - late final _rust_arc_increment_strong_count_RustOpaque_keysbip39MnemonicPtr = - _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysbip39Mnemonic'); - late final _rust_arc_increment_strong_count_RustOpaque_keysbip39Mnemonic = - _rust_arc_increment_strong_count_RustOpaque_keysbip39MnemonicPtr - .asFunction)>(); - - void rust_arc_decrement_strong_count_RustOpaque_keysbip39Mnemonic( - ffi.Pointer ptr, - ) { - return _rust_arc_decrement_strong_count_RustOpaque_keysbip39Mnemonic( - ptr, - ); - } - - late final _rust_arc_decrement_strong_count_RustOpaque_keysbip39MnemonicPtr = - _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysbip39Mnemonic'); - late final _rust_arc_decrement_strong_count_RustOpaque_keysbip39Mnemonic = - _rust_arc_decrement_strong_count_RustOpaque_keysbip39MnemonicPtr - .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_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_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_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_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_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_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< - ffi.NativeFunction< - ffi.Bool Function(DartPort port_id, ffi.Pointer message)>>; -typedef DartPort = ffi.Int64; - -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 inner; -} - -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_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 multi_sig; - - @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_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_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_list_local_utxo 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_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_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; -} diff --git a/lib/src/generated/frb_generated.web.dart b/lib/src/generated/frb_generated.web.dart deleted file mode 100644 index c30e669d..00000000 --- a/lib/src/generated/frb_generated.web.dart +++ /dev/null @@ -1,3380 +0,0 @@ -// This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31. - -// 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 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated_web.dart'; - -abstract class CApiApiImplPlatform extends BaseApiImpl { - CApiApiImplPlatform({ - required super.handler, - required super.wire, - required super.generalizedFrbRustBinding, - required super.portManager, - }); - - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_AnyBlockchainPtr => - wire.rust_arc_decrement_strong_count_RustOpaque_AnyBlockchain; - - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_ExtendedDescriptorPtr => - wire.rust_arc_decrement_strong_count_RustOpaque_ExtendedDescriptor; - - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_MutexPartiallySignedTransactionPtr => - wire.rust_arc_decrement_strong_count_RustOpaque_MutexPartiallySignedTransaction; - - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_MutexBdkWalletAnyDatabasePtr => wire - .rust_arc_decrement_strong_count_RustOpaque_MutexbdkWalletAnyDatabase; - - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_BdkBitcoinAddressPtr => - wire.rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress; - - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_BitcoinBip32DerivationPathPtr => wire - .rust_arc_decrement_strong_count_RustOpaque_bitcoinbip32DerivationPath; - - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_KeysDescriptorPublicKeyPtr => wire - .rust_arc_decrement_strong_count_RustOpaque_keysDescriptorPublicKey; - - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_KeysDescriptorSecretKeyPtr => wire - .rust_arc_decrement_strong_count_RustOpaque_keysDescriptorSecretKey; - - CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_KeysKeyMapPtr => - wire.rust_arc_decrement_strong_count_RustOpaque_keysKeyMap; - - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_KeysBip39MnemonicPtr => - wire.rust_arc_decrement_strong_count_RustOpaque_keysbip39Mnemonic; - - @protected - AnyBlockchain dco_decode_RustOpaque_AnyBlockchain(dynamic raw); - - @protected - ExtendedDescriptor dco_decode_RustOpaque_ExtendedDescriptor(dynamic raw); - - @protected - MutexPartiallySignedTransaction - dco_decode_RustOpaque_MutexPartiallySignedTransaction(dynamic raw); - - @protected - MutexBdkWalletAnyDatabase dco_decode_RustOpaque_MutexbdkWalletAnyDatabase( - dynamic raw); - - @protected - BdkBitcoinAddress dco_decode_RustOpaque_bdkbitcoinAddress(dynamic raw); - - @protected - BitcoinBip32DerivationPath dco_decode_RustOpaque_bitcoinbip32DerivationPath( - dynamic raw); - - @protected - KeysDescriptorPublicKey dco_decode_RustOpaque_keysDescriptorPublicKey( - dynamic raw); - - @protected - KeysDescriptorSecretKey dco_decode_RustOpaque_keysDescriptorSecretKey( - dynamic raw); - - @protected - KeysKeyMap dco_decode_RustOpaque_keysKeyMap(dynamic raw); - - @protected - KeysBip39Mnemonic dco_decode_RustOpaque_keysbip39Mnemonic(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 - 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 - 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 - 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 - PsbtSigHashType dco_decode_box_autoadd_psbt_sig_hash_type(dynamic raw); - - @protected - RbfValue dco_decode_box_autoadd_rbf_value(dynamic raw); - - @protected - (OutPoint, Input, int) 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 - int 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 - 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_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_prim_u_8_loose(dynamic raw); - - @protected - Uint8List dco_decode_list_prim_u_8_strict(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 - 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 - 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 - double? dco_decode_opt_box_autoadd_f_32(dynamic raw); - - @protected - FeeRate? dco_decode_opt_box_autoadd_fee_rate(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, int)? - 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 - int? 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 - 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 - (OutPoint, Input, int) dco_decode_record_out_point_input_usize(dynamic raw); - - @protected - RpcConfig dco_decode_rpc_config(dynamic raw); - - @protected - RpcSyncParams dco_decode_rpc_sync_params(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 - int 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 - int 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 - AnyBlockchain sse_decode_RustOpaque_AnyBlockchain( - SseDeserializer deserializer); - - @protected - ExtendedDescriptor sse_decode_RustOpaque_ExtendedDescriptor( - SseDeserializer deserializer); - - @protected - MutexPartiallySignedTransaction - sse_decode_RustOpaque_MutexPartiallySignedTransaction( - SseDeserializer deserializer); - - @protected - MutexBdkWalletAnyDatabase sse_decode_RustOpaque_MutexbdkWalletAnyDatabase( - SseDeserializer deserializer); - - @protected - BdkBitcoinAddress sse_decode_RustOpaque_bdkbitcoinAddress( - SseDeserializer deserializer); - - @protected - BitcoinBip32DerivationPath sse_decode_RustOpaque_bitcoinbip32DerivationPath( - SseDeserializer deserializer); - - @protected - KeysDescriptorPublicKey sse_decode_RustOpaque_keysDescriptorPublicKey( - SseDeserializer deserializer); - - @protected - KeysDescriptorSecretKey sse_decode_RustOpaque_keysDescriptorSecretKey( - SseDeserializer deserializer); - - @protected - KeysKeyMap sse_decode_RustOpaque_keysKeyMap(SseDeserializer deserializer); - - @protected - KeysBip39Mnemonic sse_decode_RustOpaque_keysbip39Mnemonic( - 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 - 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 - 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 - 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 - PsbtSigHashType sse_decode_box_autoadd_psbt_sig_hash_type( - SseDeserializer deserializer); - - @protected - RbfValue sse_decode_box_autoadd_rbf_value(SseDeserializer deserializer); - - @protected - (OutPoint, Input, int) 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 - int 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 - 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_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_prim_u_8_loose(SseDeserializer deserializer); - - @protected - Uint8List sse_decode_list_prim_u_8_strict(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 - 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 - 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 - double? sse_decode_opt_box_autoadd_f_32(SseDeserializer deserializer); - - @protected - FeeRate? sse_decode_opt_box_autoadd_fee_rate(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, int)? - 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 - int? 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 - 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 - (OutPoint, Input, int) sse_decode_record_out_point_input_usize( - SseDeserializer deserializer); - - @protected - RpcConfig sse_decode_rpc_config(SseDeserializer deserializer); - - @protected - RpcSyncParams sse_decode_rpc_sync_params(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 - int 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 - int 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 - String cst_encode_String(String raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw; - } - - @protected - List cst_encode_address_error(AddressError raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - if (raw is AddressError_Base58) { - return [0, cst_encode_String(raw.field0)]; - } - if (raw is AddressError_Bech32) { - return [1, cst_encode_String(raw.field0)]; - } - if (raw is AddressError_EmptyBech32Payload) { - return [2]; - } - if (raw is AddressError_InvalidBech32Variant) { - return [ - 3, - cst_encode_variant(raw.expected), - cst_encode_variant(raw.found) - ]; - } - if (raw is AddressError_InvalidWitnessVersion) { - return [4, cst_encode_u_8(raw.field0)]; - } - if (raw is AddressError_UnparsableWitnessVersion) { - return [5, cst_encode_String(raw.field0)]; - } - if (raw is AddressError_MalformedWitnessVersion) { - return [6]; - } - if (raw is AddressError_InvalidWitnessProgramLength) { - return [7, cst_encode_usize(raw.field0)]; - } - if (raw is AddressError_InvalidSegwitV0ProgramLength) { - return [8, cst_encode_usize(raw.field0)]; - } - if (raw is AddressError_UncompressedPubkey) { - return [9]; - } - if (raw is AddressError_ExcessiveScriptSize) { - return [10]; - } - if (raw is AddressError_UnrecognizedScript) { - return [11]; - } - if (raw is AddressError_UnknownAddressType) { - return [12, cst_encode_String(raw.field0)]; - } - if (raw is AddressError_NetworkValidation) { - return [ - 13, - cst_encode_network(raw.networkRequired), - cst_encode_network(raw.networkFound), - cst_encode_String(raw.address) - ]; - } - - throw Exception('unreachable'); - } - - @protected - List cst_encode_address_index(AddressIndex raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - if (raw is AddressIndex_Increase) { - return [0]; - } - if (raw is AddressIndex_LastUnused) { - return [1]; - } - if (raw is AddressIndex_Peek) { - return [2, cst_encode_u_32(raw.index)]; - } - if (raw is AddressIndex_Reset) { - return [3, cst_encode_u_32(raw.index)]; - } - - throw Exception('unreachable'); - } - - @protected - List cst_encode_auth(Auth raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - if (raw is Auth_None) { - return [0]; - } - if (raw is Auth_UserPass) { - return [ - 1, - cst_encode_String(raw.username), - cst_encode_String(raw.password) - ]; - } - if (raw is Auth_Cookie) { - return [2, cst_encode_String(raw.file)]; - } - - throw Exception('unreachable'); - } - - @protected - List cst_encode_balance(Balance raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [ - cst_encode_u_64(raw.immature), - cst_encode_u_64(raw.trustedPending), - cst_encode_u_64(raw.untrustedPending), - cst_encode_u_64(raw.confirmed), - cst_encode_u_64(raw.spendable), - cst_encode_u_64(raw.total) - ]; - } - - @protected - List cst_encode_bdk_address(BdkAddress raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_RustOpaque_bdkbitcoinAddress(raw.ptr)]; - } - - @protected - List cst_encode_bdk_blockchain(BdkBlockchain raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_RustOpaque_AnyBlockchain(raw.ptr)]; - } - - @protected - List cst_encode_bdk_derivation_path(BdkDerivationPath raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_RustOpaque_bitcoinbip32DerivationPath(raw.ptr)]; - } - - @protected - List cst_encode_bdk_descriptor(BdkDescriptor raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [ - cst_encode_RustOpaque_ExtendedDescriptor(raw.extendedDescriptor), - cst_encode_RustOpaque_keysKeyMap(raw.keyMap) - ]; - } - - @protected - List cst_encode_bdk_descriptor_public_key( - BdkDescriptorPublicKey raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_RustOpaque_keysDescriptorPublicKey(raw.ptr)]; - } - - @protected - List cst_encode_bdk_descriptor_secret_key( - BdkDescriptorSecretKey raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_RustOpaque_keysDescriptorSecretKey(raw.ptr)]; - } - - @protected - List cst_encode_bdk_error(BdkError raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - if (raw is BdkError_Hex) { - return [0, cst_encode_box_autoadd_hex_error(raw.field0)]; - } - if (raw is BdkError_Consensus) { - return [1, cst_encode_box_autoadd_consensus_error(raw.field0)]; - } - if (raw is BdkError_Address) { - return [2, cst_encode_box_autoadd_address_error(raw.field0)]; - } - if (raw is BdkError_Descriptor) { - return [3, cst_encode_box_autoadd_descriptor_error(raw.field0)]; - } - if (raw is BdkError_InvalidU32Bytes) { - return [4, cst_encode_list_prim_u_8_strict(raw.field0)]; - } - if (raw is BdkError_Generic) { - return [5, cst_encode_String(raw.field0)]; - } - if (raw is BdkError_ScriptDoesntHaveAddressForm) { - return [6]; - } - if (raw is BdkError_NoRecipients) { - return [7]; - } - if (raw is BdkError_NoUtxosSelected) { - return [8]; - } - if (raw is BdkError_OutputBelowDustLimit) { - return [9, cst_encode_usize(raw.field0)]; - } - if (raw is BdkError_InsufficientFunds) { - return [10, cst_encode_u_64(raw.needed), cst_encode_u_64(raw.available)]; - } - if (raw is BdkError_BnBTotalTriesExceeded) { - return [11]; - } - if (raw is BdkError_BnBNoExactMatch) { - return [12]; - } - if (raw is BdkError_UnknownUtxo) { - return [13]; - } - if (raw is BdkError_TransactionNotFound) { - return [14]; - } - if (raw is BdkError_TransactionConfirmed) { - return [15]; - } - if (raw is BdkError_IrreplaceableTransaction) { - return [16]; - } - if (raw is BdkError_FeeRateTooLow) { - return [17, cst_encode_f_32(raw.needed)]; - } - if (raw is BdkError_FeeTooLow) { - return [18, cst_encode_u_64(raw.needed)]; - } - if (raw is BdkError_FeeRateUnavailable) { - return [19]; - } - if (raw is BdkError_MissingKeyOrigin) { - return [20, cst_encode_String(raw.field0)]; - } - if (raw is BdkError_Key) { - return [21, cst_encode_String(raw.field0)]; - } - if (raw is BdkError_ChecksumMismatch) { - return [22]; - } - if (raw is BdkError_SpendingPolicyRequired) { - return [23, cst_encode_keychain_kind(raw.field0)]; - } - if (raw is BdkError_InvalidPolicyPathError) { - return [24, cst_encode_String(raw.field0)]; - } - if (raw is BdkError_Signer) { - return [25, cst_encode_String(raw.field0)]; - } - if (raw is BdkError_InvalidNetwork) { - return [ - 26, - cst_encode_network(raw.requested), - cst_encode_network(raw.found) - ]; - } - if (raw is BdkError_InvalidOutpoint) { - return [27, cst_encode_box_autoadd_out_point(raw.field0)]; - } - if (raw is BdkError_Encode) { - return [28, cst_encode_String(raw.field0)]; - } - if (raw is BdkError_Miniscript) { - return [29, cst_encode_String(raw.field0)]; - } - if (raw is BdkError_MiniscriptPsbt) { - return [30, cst_encode_String(raw.field0)]; - } - if (raw is BdkError_Bip32) { - return [31, cst_encode_String(raw.field0)]; - } - if (raw is BdkError_Bip39) { - return [32, cst_encode_String(raw.field0)]; - } - if (raw is BdkError_Secp256k1) { - return [33, cst_encode_String(raw.field0)]; - } - if (raw is BdkError_Json) { - return [34, cst_encode_String(raw.field0)]; - } - if (raw is BdkError_Psbt) { - return [35, cst_encode_String(raw.field0)]; - } - if (raw is BdkError_PsbtParse) { - return [36, cst_encode_String(raw.field0)]; - } - if (raw is BdkError_MissingCachedScripts) { - return [37, cst_encode_usize(raw.field0), cst_encode_usize(raw.field1)]; - } - if (raw is BdkError_Electrum) { - return [38, cst_encode_String(raw.field0)]; - } - if (raw is BdkError_Esplora) { - return [39, cst_encode_String(raw.field0)]; - } - if (raw is BdkError_Sled) { - return [40, cst_encode_String(raw.field0)]; - } - if (raw is BdkError_Rpc) { - return [41, cst_encode_String(raw.field0)]; - } - if (raw is BdkError_Rusqlite) { - return [42, cst_encode_String(raw.field0)]; - } - if (raw is BdkError_InvalidInput) { - return [43, cst_encode_String(raw.field0)]; - } - if (raw is BdkError_InvalidLockTime) { - return [44, cst_encode_String(raw.field0)]; - } - if (raw is BdkError_InvalidTransaction) { - return [45, cst_encode_String(raw.field0)]; - } - - throw Exception('unreachable'); - } - - @protected - List cst_encode_bdk_mnemonic(BdkMnemonic raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_RustOpaque_keysbip39Mnemonic(raw.ptr)]; - } - - @protected - List cst_encode_bdk_psbt(BdkPsbt raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_RustOpaque_MutexPartiallySignedTransaction(raw.ptr)]; - } - - @protected - List cst_encode_bdk_script_buf(BdkScriptBuf raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_list_prim_u_8_strict(raw.bytes)]; - } - - @protected - List cst_encode_bdk_transaction(BdkTransaction raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_String(raw.inner)]; - } - - @protected - List cst_encode_bdk_wallet(BdkWallet raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_RustOpaque_MutexbdkWalletAnyDatabase(raw.ptr)]; - } - - @protected - List cst_encode_block_time(BlockTime raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_u_32(raw.height), cst_encode_u_64(raw.timestamp)]; - } - - @protected - List cst_encode_blockchain_config(BlockchainConfig raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - if (raw is BlockchainConfig_Electrum) { - return [0, cst_encode_box_autoadd_electrum_config(raw.config)]; - } - if (raw is BlockchainConfig_Esplora) { - return [1, cst_encode_box_autoadd_esplora_config(raw.config)]; - } - if (raw is BlockchainConfig_Rpc) { - return [2, cst_encode_box_autoadd_rpc_config(raw.config)]; - } - - throw Exception('unreachable'); - } - - @protected - List cst_encode_box_autoadd_address_error(AddressError raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_address_error(raw); - } - - @protected - List cst_encode_box_autoadd_address_index(AddressIndex raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_address_index(raw); - } - - @protected - List cst_encode_box_autoadd_bdk_address(BdkAddress raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_bdk_address(raw); - } - - @protected - List cst_encode_box_autoadd_bdk_blockchain(BdkBlockchain raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_bdk_blockchain(raw); - } - - @protected - List cst_encode_box_autoadd_bdk_derivation_path( - BdkDerivationPath raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_bdk_derivation_path(raw); - } - - @protected - List cst_encode_box_autoadd_bdk_descriptor(BdkDescriptor raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_bdk_descriptor(raw); - } - - @protected - List cst_encode_box_autoadd_bdk_descriptor_public_key( - BdkDescriptorPublicKey raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_bdk_descriptor_public_key(raw); - } - - @protected - List cst_encode_box_autoadd_bdk_descriptor_secret_key( - BdkDescriptorSecretKey raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_bdk_descriptor_secret_key(raw); - } - - @protected - List cst_encode_box_autoadd_bdk_mnemonic(BdkMnemonic raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_bdk_mnemonic(raw); - } - - @protected - List cst_encode_box_autoadd_bdk_psbt(BdkPsbt raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_bdk_psbt(raw); - } - - @protected - List cst_encode_box_autoadd_bdk_script_buf(BdkScriptBuf raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_bdk_script_buf(raw); - } - - @protected - List cst_encode_box_autoadd_bdk_transaction(BdkTransaction raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_bdk_transaction(raw); - } - - @protected - List cst_encode_box_autoadd_bdk_wallet(BdkWallet raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_bdk_wallet(raw); - } - - @protected - List cst_encode_box_autoadd_block_time(BlockTime raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_block_time(raw); - } - - @protected - List cst_encode_box_autoadd_blockchain_config(BlockchainConfig raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_blockchain_config(raw); - } - - @protected - List cst_encode_box_autoadd_consensus_error(ConsensusError raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_consensus_error(raw); - } - - @protected - List cst_encode_box_autoadd_database_config(DatabaseConfig raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_database_config(raw); - } - - @protected - List cst_encode_box_autoadd_descriptor_error(DescriptorError raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_descriptor_error(raw); - } - - @protected - List cst_encode_box_autoadd_electrum_config(ElectrumConfig raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_electrum_config(raw); - } - - @protected - List cst_encode_box_autoadd_esplora_config(EsploraConfig raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_esplora_config(raw); - } - - @protected - double cst_encode_box_autoadd_f_32(double raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_f_32(raw); - } - - @protected - List cst_encode_box_autoadd_fee_rate(FeeRate raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_fee_rate(raw); - } - - @protected - List cst_encode_box_autoadd_hex_error(HexError raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_hex_error(raw); - } - - @protected - List cst_encode_box_autoadd_local_utxo(LocalUtxo raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_local_utxo(raw); - } - - @protected - List cst_encode_box_autoadd_lock_time(LockTime raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_lock_time(raw); - } - - @protected - List cst_encode_box_autoadd_out_point(OutPoint raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_out_point(raw); - } - - @protected - List cst_encode_box_autoadd_psbt_sig_hash_type(PsbtSigHashType raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_psbt_sig_hash_type(raw); - } - - @protected - List cst_encode_box_autoadd_rbf_value(RbfValue raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_rbf_value(raw); - } - - @protected - List cst_encode_box_autoadd_record_out_point_input_usize( - (OutPoint, Input, int) raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_record_out_point_input_usize(raw); - } - - @protected - List cst_encode_box_autoadd_rpc_config(RpcConfig raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_rpc_config(raw); - } - - @protected - List cst_encode_box_autoadd_rpc_sync_params(RpcSyncParams raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_rpc_sync_params(raw); - } - - @protected - List cst_encode_box_autoadd_sign_options(SignOptions raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_sign_options(raw); - } - - @protected - List cst_encode_box_autoadd_sled_db_configuration( - SledDbConfiguration raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_sled_db_configuration(raw); - } - - @protected - List cst_encode_box_autoadd_sqlite_db_configuration( - SqliteDbConfiguration raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_sqlite_db_configuration(raw); - } - - @protected - int cst_encode_box_autoadd_u_32(int raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_u_32(raw); - } - - @protected - Object cst_encode_box_autoadd_u_64(int raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_u_64(raw); - } - - @protected - int cst_encode_box_autoadd_u_8(int raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_u_8(raw); - } - - @protected - List cst_encode_consensus_error(ConsensusError raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - if (raw is ConsensusError_Io) { - return [0, cst_encode_String(raw.field0)]; - } - if (raw is ConsensusError_OversizedVectorAllocation) { - return [1, cst_encode_usize(raw.requested), cst_encode_usize(raw.max)]; - } - if (raw is ConsensusError_InvalidChecksum) { - return [ - 2, - cst_encode_u_8_array_4(raw.expected), - cst_encode_u_8_array_4(raw.actual) - ]; - } - if (raw is ConsensusError_NonMinimalVarInt) { - return [3]; - } - if (raw is ConsensusError_ParseFailed) { - return [4, cst_encode_String(raw.field0)]; - } - if (raw is ConsensusError_UnsupportedSegwitFlag) { - return [5, cst_encode_u_8(raw.field0)]; - } - - throw Exception('unreachable'); - } - - @protected - List cst_encode_database_config(DatabaseConfig raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - if (raw is DatabaseConfig_Memory) { - return [0]; - } - if (raw is DatabaseConfig_Sqlite) { - return [1, cst_encode_box_autoadd_sqlite_db_configuration(raw.config)]; - } - if (raw is DatabaseConfig_Sled) { - return [2, cst_encode_box_autoadd_sled_db_configuration(raw.config)]; - } - - throw Exception('unreachable'); - } - - @protected - List cst_encode_descriptor_error(DescriptorError raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - if (raw is DescriptorError_InvalidHdKeyPath) { - return [0]; - } - if (raw is DescriptorError_InvalidDescriptorChecksum) { - return [1]; - } - if (raw is DescriptorError_HardenedDerivationXpub) { - return [2]; - } - if (raw is DescriptorError_MultiPath) { - return [3]; - } - if (raw is DescriptorError_Key) { - return [4, cst_encode_String(raw.field0)]; - } - if (raw is DescriptorError_Policy) { - return [5, cst_encode_String(raw.field0)]; - } - if (raw is DescriptorError_InvalidDescriptorCharacter) { - return [6, cst_encode_u_8(raw.field0)]; - } - if (raw is DescriptorError_Bip32) { - return [7, cst_encode_String(raw.field0)]; - } - if (raw is DescriptorError_Base58) { - return [8, cst_encode_String(raw.field0)]; - } - if (raw is DescriptorError_Pk) { - return [9, cst_encode_String(raw.field0)]; - } - if (raw is DescriptorError_Miniscript) { - return [10, cst_encode_String(raw.field0)]; - } - if (raw is DescriptorError_Hex) { - return [11, cst_encode_String(raw.field0)]; - } - - throw Exception('unreachable'); - } - - @protected - List cst_encode_electrum_config(ElectrumConfig raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [ - cst_encode_String(raw.url), - cst_encode_opt_String(raw.socks5), - cst_encode_u_8(raw.retry), - cst_encode_opt_box_autoadd_u_8(raw.timeout), - cst_encode_u_64(raw.stopGap), - cst_encode_bool(raw.validateDomain) - ]; - } - - @protected - List cst_encode_esplora_config(EsploraConfig raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [ - cst_encode_String(raw.baseUrl), - cst_encode_opt_String(raw.proxy), - cst_encode_opt_box_autoadd_u_8(raw.concurrency), - cst_encode_u_64(raw.stopGap), - cst_encode_opt_box_autoadd_u_64(raw.timeout) - ]; - } - - @protected - List cst_encode_fee_rate(FeeRate raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_f_32(raw.satPerVb)]; - } - - @protected - List cst_encode_hex_error(HexError raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - if (raw is HexError_InvalidChar) { - return [0, cst_encode_u_8(raw.field0)]; - } - if (raw is HexError_OddLengthString) { - return [1, cst_encode_usize(raw.field0)]; - } - if (raw is HexError_InvalidLength) { - return [2, cst_encode_usize(raw.field0), cst_encode_usize(raw.field1)]; - } - - throw Exception('unreachable'); - } - - @protected - List cst_encode_input(Input raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_String(raw.s)]; - } - - @protected - List cst_encode_list_list_prim_u_8_strict(List raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw.map(cst_encode_list_prim_u_8_strict).toList(); - } - - @protected - List cst_encode_list_local_utxo(List raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw.map(cst_encode_local_utxo).toList(); - } - - @protected - List cst_encode_list_out_point(List raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw.map(cst_encode_out_point).toList(); - } - - @protected - List cst_encode_list_prim_u_8_loose(List raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw; - } - - @protected - Uint8List cst_encode_list_prim_u_8_strict(Uint8List raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw; - } - - @protected - List cst_encode_list_script_amount(List raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw.map(cst_encode_script_amount).toList(); - } - - @protected - List cst_encode_list_transaction_details( - List raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw.map(cst_encode_transaction_details).toList(); - } - - @protected - List cst_encode_list_tx_in(List raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw.map(cst_encode_tx_in).toList(); - } - - @protected - List cst_encode_list_tx_out(List raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw.map(cst_encode_tx_out).toList(); - } - - @protected - List cst_encode_local_utxo(LocalUtxo raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [ - cst_encode_out_point(raw.outpoint), - cst_encode_tx_out(raw.txout), - cst_encode_keychain_kind(raw.keychain), - cst_encode_bool(raw.isSpent) - ]; - } - - @protected - List cst_encode_lock_time(LockTime raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - if (raw is LockTime_Blocks) { - return [0, cst_encode_u_32(raw.field0)]; - } - if (raw is LockTime_Seconds) { - return [1, cst_encode_u_32(raw.field0)]; - } - - throw Exception('unreachable'); - } - - @protected - String? cst_encode_opt_String(String? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null ? null : cst_encode_String(raw); - } - - @protected - List? cst_encode_opt_box_autoadd_bdk_address(BdkAddress? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null ? null : cst_encode_box_autoadd_bdk_address(raw); - } - - @protected - List? cst_encode_opt_box_autoadd_bdk_descriptor(BdkDescriptor? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null ? null : cst_encode_box_autoadd_bdk_descriptor(raw); - } - - @protected - List? cst_encode_opt_box_autoadd_bdk_script_buf(BdkScriptBuf? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null ? null : cst_encode_box_autoadd_bdk_script_buf(raw); - } - - @protected - List? cst_encode_opt_box_autoadd_bdk_transaction( - BdkTransaction? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null ? null : cst_encode_box_autoadd_bdk_transaction(raw); - } - - @protected - List? cst_encode_opt_box_autoadd_block_time(BlockTime? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null ? null : cst_encode_box_autoadd_block_time(raw); - } - - @protected - double? cst_encode_opt_box_autoadd_f_32(double? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null ? null : cst_encode_box_autoadd_f_32(raw); - } - - @protected - List? cst_encode_opt_box_autoadd_fee_rate(FeeRate? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null ? null : cst_encode_box_autoadd_fee_rate(raw); - } - - @protected - List? 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 ? null : cst_encode_box_autoadd_psbt_sig_hash_type(raw); - } - - @protected - List? cst_encode_opt_box_autoadd_rbf_value(RbfValue? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null ? null : cst_encode_box_autoadd_rbf_value(raw); - } - - @protected - List? cst_encode_opt_box_autoadd_record_out_point_input_usize( - (OutPoint, Input, int)? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null - ? null - : cst_encode_box_autoadd_record_out_point_input_usize(raw); - } - - @protected - List? cst_encode_opt_box_autoadd_rpc_sync_params( - RpcSyncParams? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null ? null : cst_encode_box_autoadd_rpc_sync_params(raw); - } - - @protected - List? cst_encode_opt_box_autoadd_sign_options(SignOptions? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null ? null : cst_encode_box_autoadd_sign_options(raw); - } - - @protected - int? cst_encode_opt_box_autoadd_u_32(int? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null ? null : cst_encode_box_autoadd_u_32(raw); - } - - @protected - Object? cst_encode_opt_box_autoadd_u_64(int? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null ? null : cst_encode_box_autoadd_u_64(raw); - } - - @protected - int? cst_encode_opt_box_autoadd_u_8(int? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null ? null : cst_encode_box_autoadd_u_8(raw); - } - - @protected - List cst_encode_out_point(OutPoint raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_String(raw.txid), cst_encode_u_32(raw.vout)]; - } - - @protected - List cst_encode_payload(Payload raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - if (raw is Payload_PubkeyHash) { - return [0, cst_encode_String(raw.pubkeyHash)]; - } - if (raw is Payload_ScriptHash) { - return [1, cst_encode_String(raw.scriptHash)]; - } - if (raw is Payload_WitnessProgram) { - return [ - 2, - cst_encode_witness_version(raw.version), - cst_encode_list_prim_u_8_strict(raw.program) - ]; - } - - throw Exception('unreachable'); - } - - @protected - List cst_encode_psbt_sig_hash_type(PsbtSigHashType raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_u_32(raw.inner)]; - } - - @protected - List cst_encode_rbf_value(RbfValue raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - if (raw is RbfValue_RbfDefault) { - return [0]; - } - if (raw is RbfValue_Value) { - return [1, cst_encode_u_32(raw.field0)]; - } - - throw Exception('unreachable'); - } - - @protected - List cst_encode_record_bdk_address_u_32((BdkAddress, int) raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_bdk_address(raw.$1), cst_encode_u_32(raw.$2)]; - } - - @protected - List cst_encode_record_bdk_psbt_transaction_details( - (BdkPsbt, TransactionDetails) raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [ - cst_encode_bdk_psbt(raw.$1), - cst_encode_transaction_details(raw.$2) - ]; - } - - @protected - List cst_encode_record_out_point_input_usize( - (OutPoint, Input, int) raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [ - cst_encode_out_point(raw.$1), - cst_encode_input(raw.$2), - cst_encode_usize(raw.$3) - ]; - } - - @protected - List cst_encode_rpc_config(RpcConfig raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [ - cst_encode_String(raw.url), - cst_encode_auth(raw.auth), - cst_encode_network(raw.network), - cst_encode_String(raw.walletName), - cst_encode_opt_box_autoadd_rpc_sync_params(raw.syncParams) - ]; - } - - @protected - List cst_encode_rpc_sync_params(RpcSyncParams raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [ - cst_encode_u_64(raw.startScriptCount), - cst_encode_u_64(raw.startTime), - cst_encode_bool(raw.forceStartTime), - cst_encode_u_64(raw.pollRateSec) - ]; - } - - @protected - List cst_encode_script_amount(ScriptAmount raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_bdk_script_buf(raw.script), cst_encode_u_64(raw.amount)]; - } - - @protected - List cst_encode_sign_options(SignOptions raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [ - cst_encode_bool(raw.multiSig), - cst_encode_bool(raw.trustWitnessUtxo), - cst_encode_opt_box_autoadd_u_32(raw.assumeHeight), - cst_encode_bool(raw.allowAllSighashes), - cst_encode_bool(raw.removePartialSigs), - cst_encode_bool(raw.tryFinalize), - cst_encode_bool(raw.signWithTapInternalKey), - cst_encode_bool(raw.allowGrinding) - ]; - } - - @protected - List cst_encode_sled_db_configuration(SledDbConfiguration raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_String(raw.path), cst_encode_String(raw.treeName)]; - } - - @protected - List cst_encode_sqlite_db_configuration(SqliteDbConfiguration raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [cst_encode_String(raw.path)]; - } - - @protected - List cst_encode_transaction_details(TransactionDetails raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [ - cst_encode_opt_box_autoadd_bdk_transaction(raw.transaction), - cst_encode_String(raw.txid), - cst_encode_u_64(raw.received), - cst_encode_u_64(raw.sent), - cst_encode_opt_box_autoadd_u_64(raw.fee), - cst_encode_opt_box_autoadd_block_time(raw.confirmationTime) - ]; - } - - @protected - List cst_encode_tx_in(TxIn raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [ - cst_encode_out_point(raw.previousOutput), - cst_encode_bdk_script_buf(raw.scriptSig), - cst_encode_u_32(raw.sequence), - cst_encode_list_list_prim_u_8_strict(raw.witness) - ]; - } - - @protected - List cst_encode_tx_out(TxOut raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return [ - cst_encode_u_64(raw.value), - cst_encode_bdk_script_buf(raw.scriptPubkey) - ]; - } - - @protected - Object cst_encode_u_64(int raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return castNativeBigInt(raw); - } - - @protected - Uint8List cst_encode_u_8_array_4(U8Array4 raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return Uint8List.fromList(raw); - } - - @protected - int cst_encode_RustOpaque_AnyBlockchain(AnyBlockchain raw); - - @protected - int cst_encode_RustOpaque_ExtendedDescriptor(ExtendedDescriptor raw); - - @protected - int cst_encode_RustOpaque_MutexPartiallySignedTransaction( - MutexPartiallySignedTransaction raw); - - @protected - int cst_encode_RustOpaque_MutexbdkWalletAnyDatabase( - MutexBdkWalletAnyDatabase raw); - - @protected - int cst_encode_RustOpaque_bdkbitcoinAddress(BdkBitcoinAddress raw); - - @protected - int cst_encode_RustOpaque_bitcoinbip32DerivationPath( - BitcoinBip32DerivationPath raw); - - @protected - int cst_encode_RustOpaque_keysDescriptorPublicKey( - KeysDescriptorPublicKey raw); - - @protected - int cst_encode_RustOpaque_keysDescriptorSecretKey( - KeysDescriptorSecretKey raw); - - @protected - int cst_encode_RustOpaque_keysKeyMap(KeysKeyMap raw); - - @protected - int cst_encode_RustOpaque_keysbip39Mnemonic(KeysBip39Mnemonic 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_usize(int 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_RustOpaque_AnyBlockchain( - AnyBlockchain self, SseSerializer serializer); - - @protected - void sse_encode_RustOpaque_ExtendedDescriptor( - ExtendedDescriptor self, SseSerializer serializer); - - @protected - void sse_encode_RustOpaque_MutexPartiallySignedTransaction( - MutexPartiallySignedTransaction self, SseSerializer serializer); - - @protected - void sse_encode_RustOpaque_MutexbdkWalletAnyDatabase( - MutexBdkWalletAnyDatabase self, SseSerializer serializer); - - @protected - void sse_encode_RustOpaque_bdkbitcoinAddress( - BdkBitcoinAddress self, SseSerializer serializer); - - @protected - void sse_encode_RustOpaque_bitcoinbip32DerivationPath( - BitcoinBip32DerivationPath self, SseSerializer serializer); - - @protected - void sse_encode_RustOpaque_keysDescriptorPublicKey( - KeysDescriptorPublicKey self, SseSerializer serializer); - - @protected - void sse_encode_RustOpaque_keysDescriptorSecretKey( - KeysDescriptorSecretKey self, SseSerializer serializer); - - @protected - void sse_encode_RustOpaque_keysKeyMap( - KeysKeyMap self, SseSerializer serializer); - - @protected - void sse_encode_RustOpaque_keysbip39Mnemonic( - KeysBip39Mnemonic 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_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_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_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_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, int) 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(int 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_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_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_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_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_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_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_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_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, int)? 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(int? 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_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_out_point_input_usize( - (OutPoint, Input, int) 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_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(int 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(int 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 - -class CApiWire implements BaseWire { - CApiWire.fromExternalLibrary(ExternalLibrary lib); - - void wire_bdk_blockchain_broadcast(NativePortType port_, List that, - List transaction) => - wasmModule.wire_bdk_blockchain_broadcast(port_, that, transaction); - - void wire_bdk_blockchain_estimate_fee( - NativePortType port_, List that, Object target) => - wasmModule.wire_bdk_blockchain_estimate_fee(port_, that, target); - - void wire_bdk_blockchain_get_block_hash( - NativePortType port_, List that, int height) => - wasmModule.wire_bdk_blockchain_get_block_hash(port_, that, height); - - void wire_bdk_blockchain_get_height( - NativePortType port_, List that) => - wasmModule.wire_bdk_blockchain_get_height(port_, that); - - void wire_bdk_blockchain_new( - NativePortType port_, List blockchain_config) => - wasmModule.wire_bdk_blockchain_new(port_, blockchain_config); - - void wire_bdk_descriptor_as_string( - NativePortType port_, List that) => - wasmModule.wire_bdk_descriptor_as_string(port_, that); - - void wire_bdk_descriptor_as_string_private( - NativePortType port_, List that) => - wasmModule.wire_bdk_descriptor_as_string_private(port_, that); - - void wire_bdk_descriptor_max_satisfaction_weight( - NativePortType port_, List that) => - wasmModule.wire_bdk_descriptor_max_satisfaction_weight(port_, that); - - void wire_bdk_descriptor_new( - NativePortType port_, String descriptor, int network) => - wasmModule.wire_bdk_descriptor_new(port_, descriptor, network); - - void wire_bdk_descriptor_new_bip44(NativePortType port_, - List secret_key, int keychain_kind, int network) => - wasmModule.wire_bdk_descriptor_new_bip44( - port_, secret_key, keychain_kind, network); - - void wire_bdk_descriptor_new_bip44_public( - NativePortType port_, - List public_key, - String fingerprint, - int keychain_kind, - int network) => - wasmModule.wire_bdk_descriptor_new_bip44_public( - port_, public_key, fingerprint, keychain_kind, network); - - void wire_bdk_descriptor_new_bip49(NativePortType port_, - List secret_key, int keychain_kind, int network) => - wasmModule.wire_bdk_descriptor_new_bip49( - port_, secret_key, keychain_kind, network); - - void wire_bdk_descriptor_new_bip49_public( - NativePortType port_, - List public_key, - String fingerprint, - int keychain_kind, - int network) => - wasmModule.wire_bdk_descriptor_new_bip49_public( - port_, public_key, fingerprint, keychain_kind, network); - - void wire_bdk_descriptor_new_bip84(NativePortType port_, - List secret_key, int keychain_kind, int network) => - wasmModule.wire_bdk_descriptor_new_bip84( - port_, secret_key, keychain_kind, network); - - void wire_bdk_descriptor_new_bip84_public( - NativePortType port_, - List public_key, - String fingerprint, - int keychain_kind, - int network) => - wasmModule.wire_bdk_descriptor_new_bip84_public( - port_, public_key, fingerprint, keychain_kind, network); - - void wire_bdk_descriptor_new_bip86(NativePortType port_, - List secret_key, int keychain_kind, int network) => - wasmModule.wire_bdk_descriptor_new_bip86( - port_, secret_key, keychain_kind, network); - - void wire_bdk_descriptor_new_bip86_public( - NativePortType port_, - List public_key, - String fingerprint, - int keychain_kind, - int network) => - wasmModule.wire_bdk_descriptor_new_bip86_public( - port_, public_key, fingerprint, keychain_kind, network); - - void wire_bdk_derivation_path_from_string( - NativePortType port_, String path) => - wasmModule.wire_bdk_derivation_path_from_string(port_, path); - - void wire_bdk_descriptor_public_key_as_string( - NativePortType port_, List that) => - wasmModule.wire_bdk_descriptor_public_key_as_string(port_, that); - - void wire_bdk_descriptor_public_key_derive( - NativePortType port_, List ptr, List path) => - wasmModule.wire_bdk_descriptor_public_key_derive(port_, ptr, path); - - void wire_bdk_descriptor_public_key_extend( - NativePortType port_, List ptr, List path) => - wasmModule.wire_bdk_descriptor_public_key_extend(port_, ptr, path); - - void wire_bdk_descriptor_public_key_from_string( - NativePortType port_, String public_key) => - wasmModule.wire_bdk_descriptor_public_key_from_string(port_, public_key); - - void wire_bdk_descriptor_secret_key_as_public( - NativePortType port_, List ptr) => - wasmModule.wire_bdk_descriptor_secret_key_as_public(port_, ptr); - - void wire_bdk_descriptor_secret_key_as_string( - NativePortType port_, List that) => - wasmModule.wire_bdk_descriptor_secret_key_as_string(port_, that); - - void wire_bdk_descriptor_secret_key_create(NativePortType port_, int network, - List mnemonic, String? password) => - wasmModule.wire_bdk_descriptor_secret_key_create( - port_, network, mnemonic, password); - - void wire_bdk_descriptor_secret_key_derive( - NativePortType port_, List ptr, List path) => - wasmModule.wire_bdk_descriptor_secret_key_derive(port_, ptr, path); - - void wire_bdk_descriptor_secret_key_extend( - NativePortType port_, List ptr, List path) => - wasmModule.wire_bdk_descriptor_secret_key_extend(port_, ptr, path); - - void wire_bdk_descriptor_secret_key_from_string( - NativePortType port_, String secret_key) => - wasmModule.wire_bdk_descriptor_secret_key_from_string(port_, secret_key); - - void wire_bdk_descriptor_secret_key_secret_bytes( - NativePortType port_, List that) => - wasmModule.wire_bdk_descriptor_secret_key_secret_bytes(port_, that); - - void wire_bdk_mnemonic_as_string(NativePortType port_, List that) => - wasmModule.wire_bdk_mnemonic_as_string(port_, that); - - void wire_bdk_mnemonic_from_entropy( - NativePortType port_, List entropy) => - wasmModule.wire_bdk_mnemonic_from_entropy(port_, entropy); - - void wire_bdk_mnemonic_from_string(NativePortType port_, String mnemonic) => - wasmModule.wire_bdk_mnemonic_from_string(port_, mnemonic); - - void wire_bdk_mnemonic_new(NativePortType port_, int word_count) => - wasmModule.wire_bdk_mnemonic_new(port_, word_count); - - void wire_bdk_psbt_combine( - NativePortType port_, List ptr, List other) => - wasmModule.wire_bdk_psbt_combine(port_, ptr, other); - - void wire_bdk_psbt_extract_tx(NativePortType port_, List ptr) => - wasmModule.wire_bdk_psbt_extract_tx(port_, ptr); - - void wire_bdk_psbt_fee_amount(NativePortType port_, List that) => - wasmModule.wire_bdk_psbt_fee_amount(port_, that); - - void wire_bdk_psbt_fee_rate(NativePortType port_, List that) => - wasmModule.wire_bdk_psbt_fee_rate(port_, that); - - void wire_bdk_psbt_from_str(NativePortType port_, String psbt_base64) => - wasmModule.wire_bdk_psbt_from_str(port_, psbt_base64); - - void wire_bdk_psbt_json_serialize(NativePortType port_, List that) => - wasmModule.wire_bdk_psbt_json_serialize(port_, that); - - void wire_bdk_psbt_serialize(NativePortType port_, List that) => - wasmModule.wire_bdk_psbt_serialize(port_, that); - - void wire_bdk_psbt_txid(NativePortType port_, List that) => - wasmModule.wire_bdk_psbt_txid(port_, that); - - void wire_bdk_address_as_string(NativePortType port_, List that) => - wasmModule.wire_bdk_address_as_string(port_, that); - - void wire_bdk_address_from_script( - NativePortType port_, List script, int network) => - wasmModule.wire_bdk_address_from_script(port_, script, network); - - void wire_bdk_address_from_string( - NativePortType port_, String address, int network) => - wasmModule.wire_bdk_address_from_string(port_, address, network); - - void wire_bdk_address_is_valid_for_network( - NativePortType port_, List that, int network) => - wasmModule.wire_bdk_address_is_valid_for_network(port_, that, network); - - void wire_bdk_address_network(NativePortType port_, List that) => - wasmModule.wire_bdk_address_network(port_, that); - - void wire_bdk_address_payload(NativePortType port_, List that) => - wasmModule.wire_bdk_address_payload(port_, that); - - void wire_bdk_address_script(NativePortType port_, List ptr) => - wasmModule.wire_bdk_address_script(port_, ptr); - - void wire_bdk_address_to_qr_uri(NativePortType port_, List that) => - wasmModule.wire_bdk_address_to_qr_uri(port_, that); - - void wire_bdk_script_buf_empty(NativePortType port_) => - wasmModule.wire_bdk_script_buf_empty(port_); - - void wire_bdk_script_buf_from_hex(NativePortType port_, String s) => - wasmModule.wire_bdk_script_buf_from_hex(port_, s); - - void wire_bdk_script_buf_with_capacity(NativePortType port_, int capacity) => - wasmModule.wire_bdk_script_buf_with_capacity(port_, capacity); - - void wire_bdk_transaction_from_bytes( - NativePortType port_, List transaction_bytes) => - wasmModule.wire_bdk_transaction_from_bytes(port_, transaction_bytes); - - void wire_bdk_transaction_input(NativePortType port_, List that) => - wasmModule.wire_bdk_transaction_input(port_, that); - - void wire_bdk_transaction_is_coin_base( - NativePortType port_, List that) => - wasmModule.wire_bdk_transaction_is_coin_base(port_, that); - - void wire_bdk_transaction_is_explicitly_rbf( - NativePortType port_, List that) => - wasmModule.wire_bdk_transaction_is_explicitly_rbf(port_, that); - - void wire_bdk_transaction_is_lock_time_enabled( - NativePortType port_, List that) => - wasmModule.wire_bdk_transaction_is_lock_time_enabled(port_, that); - - void wire_bdk_transaction_lock_time( - NativePortType port_, List that) => - wasmModule.wire_bdk_transaction_lock_time(port_, that); - - void wire_bdk_transaction_new(NativePortType port_, int version, - List lock_time, List input, List output) => - wasmModule.wire_bdk_transaction_new( - port_, version, lock_time, input, output); - - void wire_bdk_transaction_output(NativePortType port_, List that) => - wasmModule.wire_bdk_transaction_output(port_, that); - - void wire_bdk_transaction_serialize( - NativePortType port_, List that) => - wasmModule.wire_bdk_transaction_serialize(port_, that); - - void wire_bdk_transaction_size(NativePortType port_, List that) => - wasmModule.wire_bdk_transaction_size(port_, that); - - void wire_bdk_transaction_txid(NativePortType port_, List that) => - wasmModule.wire_bdk_transaction_txid(port_, that); - - void wire_bdk_transaction_version(NativePortType port_, List that) => - wasmModule.wire_bdk_transaction_version(port_, that); - - void wire_bdk_transaction_vsize(NativePortType port_, List that) => - wasmModule.wire_bdk_transaction_vsize(port_, that); - - void wire_bdk_transaction_weight(NativePortType port_, List that) => - wasmModule.wire_bdk_transaction_weight(port_, that); - - void wire_bdk_wallet_get_address(NativePortType port_, List ptr, - List address_index) => - wasmModule.wire_bdk_wallet_get_address(port_, ptr, address_index); - - void wire_bdk_wallet_get_balance(NativePortType port_, List that) => - wasmModule.wire_bdk_wallet_get_balance(port_, that); - - void wire_bdk_wallet_get_descriptor_for_keychain( - NativePortType port_, List ptr, int keychain) => - wasmModule.wire_bdk_wallet_get_descriptor_for_keychain( - port_, ptr, keychain); - - void wire_bdk_wallet_get_internal_address(NativePortType port_, - List ptr, List address_index) => - wasmModule.wire_bdk_wallet_get_internal_address( - port_, ptr, address_index); - - void wire_bdk_wallet_get_psbt_input( - NativePortType port_, - List that, - List utxo, - bool only_witness_utxo, - List? sighash_type) => - wasmModule.wire_bdk_wallet_get_psbt_input( - port_, that, utxo, only_witness_utxo, sighash_type); - - void wire_bdk_wallet_is_mine( - NativePortType port_, List that, List script) => - wasmModule.wire_bdk_wallet_is_mine(port_, that, script); - - void wire_bdk_wallet_list_transactions( - NativePortType port_, List that, bool include_raw) => - wasmModule.wire_bdk_wallet_list_transactions(port_, that, include_raw); - - void wire_bdk_wallet_list_unspent(NativePortType port_, List that) => - wasmModule.wire_bdk_wallet_list_unspent(port_, that); - - void wire_bdk_wallet_network(NativePortType port_, List that) => - wasmModule.wire_bdk_wallet_network(port_, that); - - void wire_bdk_wallet_new( - NativePortType port_, - List descriptor, - List? change_descriptor, - int network, - List database_config) => - wasmModule.wire_bdk_wallet_new( - port_, descriptor, change_descriptor, network, database_config); - - void wire_bdk_wallet_sign(NativePortType port_, List ptr, - List psbt, List? sign_options) => - wasmModule.wire_bdk_wallet_sign(port_, ptr, psbt, sign_options); - - void wire_bdk_wallet_sync( - NativePortType port_, List ptr, List blockchain) => - wasmModule.wire_bdk_wallet_sync(port_, ptr, blockchain); - - void wire_finish_bump_fee_tx_builder( - NativePortType port_, - String txid, - double fee_rate, - List? allow_shrinking, - List wallet, - bool enable_rbf, - int? n_sequence) => - wasmModule.wire_finish_bump_fee_tx_builder(port_, txid, fee_rate, - allow_shrinking, wallet, enable_rbf, n_sequence); - - void wire_tx_builder_finish( - NativePortType port_, - List wallet, - List recipients, - List utxos, - List? foreign_utxo, - List un_spendable, - int change_policy, - bool manually_selected_only, - double? fee_rate, - Object? fee_absolute, - bool drain_wallet, - List? drain_to, - List? rbf, - List data) => - wasmModule.wire_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, - data); - - void rust_arc_increment_strong_count_RustOpaque_AnyBlockchain(dynamic ptr) => - wasmModule.rust_arc_increment_strong_count_RustOpaque_AnyBlockchain(ptr); - - void rust_arc_decrement_strong_count_RustOpaque_AnyBlockchain(dynamic ptr) => - wasmModule.rust_arc_decrement_strong_count_RustOpaque_AnyBlockchain(ptr); - - void rust_arc_increment_strong_count_RustOpaque_ExtendedDescriptor( - dynamic ptr) => - wasmModule - .rust_arc_increment_strong_count_RustOpaque_ExtendedDescriptor(ptr); - - void rust_arc_decrement_strong_count_RustOpaque_ExtendedDescriptor( - dynamic ptr) => - wasmModule - .rust_arc_decrement_strong_count_RustOpaque_ExtendedDescriptor(ptr); - - void rust_arc_increment_strong_count_RustOpaque_MutexPartiallySignedTransaction( - dynamic ptr) => - wasmModule - .rust_arc_increment_strong_count_RustOpaque_MutexPartiallySignedTransaction( - ptr); - - void rust_arc_decrement_strong_count_RustOpaque_MutexPartiallySignedTransaction( - dynamic ptr) => - wasmModule - .rust_arc_decrement_strong_count_RustOpaque_MutexPartiallySignedTransaction( - ptr); - - void rust_arc_increment_strong_count_RustOpaque_MutexbdkWalletAnyDatabase( - dynamic ptr) => - wasmModule - .rust_arc_increment_strong_count_RustOpaque_MutexbdkWalletAnyDatabase( - ptr); - - void rust_arc_decrement_strong_count_RustOpaque_MutexbdkWalletAnyDatabase( - dynamic ptr) => - wasmModule - .rust_arc_decrement_strong_count_RustOpaque_MutexbdkWalletAnyDatabase( - ptr); - - void rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddress( - dynamic ptr) => - wasmModule - .rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddress(ptr); - - void rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress( - dynamic ptr) => - wasmModule - .rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress(ptr); - - void rust_arc_increment_strong_count_RustOpaque_bitcoinbip32DerivationPath( - dynamic ptr) => - wasmModule - .rust_arc_increment_strong_count_RustOpaque_bitcoinbip32DerivationPath( - ptr); - - void rust_arc_decrement_strong_count_RustOpaque_bitcoinbip32DerivationPath( - dynamic ptr) => - wasmModule - .rust_arc_decrement_strong_count_RustOpaque_bitcoinbip32DerivationPath( - ptr); - - void rust_arc_increment_strong_count_RustOpaque_keysDescriptorPublicKey( - dynamic ptr) => - wasmModule - .rust_arc_increment_strong_count_RustOpaque_keysDescriptorPublicKey( - ptr); - - void rust_arc_decrement_strong_count_RustOpaque_keysDescriptorPublicKey( - dynamic ptr) => - wasmModule - .rust_arc_decrement_strong_count_RustOpaque_keysDescriptorPublicKey( - ptr); - - void rust_arc_increment_strong_count_RustOpaque_keysDescriptorSecretKey( - dynamic ptr) => - wasmModule - .rust_arc_increment_strong_count_RustOpaque_keysDescriptorSecretKey( - ptr); - - void rust_arc_decrement_strong_count_RustOpaque_keysDescriptorSecretKey( - dynamic ptr) => - wasmModule - .rust_arc_decrement_strong_count_RustOpaque_keysDescriptorSecretKey( - ptr); - - void rust_arc_increment_strong_count_RustOpaque_keysKeyMap(dynamic ptr) => - wasmModule.rust_arc_increment_strong_count_RustOpaque_keysKeyMap(ptr); - - void rust_arc_decrement_strong_count_RustOpaque_keysKeyMap(dynamic ptr) => - wasmModule.rust_arc_decrement_strong_count_RustOpaque_keysKeyMap(ptr); - - void rust_arc_increment_strong_count_RustOpaque_keysbip39Mnemonic( - dynamic ptr) => - wasmModule - .rust_arc_increment_strong_count_RustOpaque_keysbip39Mnemonic(ptr); - - void rust_arc_decrement_strong_count_RustOpaque_keysbip39Mnemonic( - dynamic ptr) => - wasmModule - .rust_arc_decrement_strong_count_RustOpaque_keysbip39Mnemonic(ptr); -} - -@JS('wasm_bindgen') -external CApiWasmModule get wasmModule; - -@JS() -@anonymous -class CApiWasmModule implements WasmModule { - @override - external Object /* Promise */ call([String? moduleName]); - - @override - external CApiWasmModule bind(dynamic thisArg, String moduleName); - - external void wire_bdk_blockchain_broadcast( - NativePortType port_, List that, List transaction); - - external void wire_bdk_blockchain_estimate_fee( - NativePortType port_, List that, Object target); - - external void wire_bdk_blockchain_get_block_hash( - NativePortType port_, List that, int height); - - external void wire_bdk_blockchain_get_height( - NativePortType port_, List that); - - external void wire_bdk_blockchain_new( - NativePortType port_, List blockchain_config); - - external void wire_bdk_descriptor_as_string( - NativePortType port_, List that); - - external void wire_bdk_descriptor_as_string_private( - NativePortType port_, List that); - - external void wire_bdk_descriptor_max_satisfaction_weight( - NativePortType port_, List that); - - external void wire_bdk_descriptor_new( - NativePortType port_, String descriptor, int network); - - external void wire_bdk_descriptor_new_bip44(NativePortType port_, - List secret_key, int keychain_kind, int network); - - external void wire_bdk_descriptor_new_bip44_public( - NativePortType port_, - List public_key, - String fingerprint, - int keychain_kind, - int network); - - external void wire_bdk_descriptor_new_bip49(NativePortType port_, - List secret_key, int keychain_kind, int network); - - external void wire_bdk_descriptor_new_bip49_public( - NativePortType port_, - List public_key, - String fingerprint, - int keychain_kind, - int network); - - external void wire_bdk_descriptor_new_bip84(NativePortType port_, - List secret_key, int keychain_kind, int network); - - external void wire_bdk_descriptor_new_bip84_public( - NativePortType port_, - List public_key, - String fingerprint, - int keychain_kind, - int network); - - external void wire_bdk_descriptor_new_bip86(NativePortType port_, - List secret_key, int keychain_kind, int network); - - external void wire_bdk_descriptor_new_bip86_public( - NativePortType port_, - List public_key, - String fingerprint, - int keychain_kind, - int network); - - external void wire_bdk_derivation_path_from_string( - NativePortType port_, String path); - - external void wire_bdk_descriptor_public_key_as_string( - NativePortType port_, List that); - - external void wire_bdk_descriptor_public_key_derive( - NativePortType port_, List ptr, List path); - - external void wire_bdk_descriptor_public_key_extend( - NativePortType port_, List ptr, List path); - - external void wire_bdk_descriptor_public_key_from_string( - NativePortType port_, String public_key); - - external void wire_bdk_descriptor_secret_key_as_public( - NativePortType port_, List ptr); - - external void wire_bdk_descriptor_secret_key_as_string( - NativePortType port_, List that); - - external void wire_bdk_descriptor_secret_key_create(NativePortType port_, - int network, List mnemonic, String? password); - - external void wire_bdk_descriptor_secret_key_derive( - NativePortType port_, List ptr, List path); - - external void wire_bdk_descriptor_secret_key_extend( - NativePortType port_, List ptr, List path); - - external void wire_bdk_descriptor_secret_key_from_string( - NativePortType port_, String secret_key); - - external void wire_bdk_descriptor_secret_key_secret_bytes( - NativePortType port_, List that); - - external void wire_bdk_mnemonic_as_string( - NativePortType port_, List that); - - external void wire_bdk_mnemonic_from_entropy( - NativePortType port_, List entropy); - - external void wire_bdk_mnemonic_from_string( - NativePortType port_, String mnemonic); - - external void wire_bdk_mnemonic_new(NativePortType port_, int word_count); - - external void wire_bdk_psbt_combine( - NativePortType port_, List ptr, List other); - - external void wire_bdk_psbt_extract_tx( - NativePortType port_, List ptr); - - external void wire_bdk_psbt_fee_amount( - NativePortType port_, List that); - - external void wire_bdk_psbt_fee_rate( - NativePortType port_, List that); - - external void wire_bdk_psbt_from_str( - NativePortType port_, String psbt_base64); - - external void wire_bdk_psbt_json_serialize( - NativePortType port_, List that); - - external void wire_bdk_psbt_serialize( - NativePortType port_, List that); - - external void wire_bdk_psbt_txid(NativePortType port_, List that); - - external void wire_bdk_address_as_string( - NativePortType port_, List that); - - external void wire_bdk_address_from_script( - NativePortType port_, List script, int network); - - external void wire_bdk_address_from_string( - NativePortType port_, String address, int network); - - external void wire_bdk_address_is_valid_for_network( - NativePortType port_, List that, int network); - - external void wire_bdk_address_network( - NativePortType port_, List that); - - external void wire_bdk_address_payload( - NativePortType port_, List that); - - external void wire_bdk_address_script( - NativePortType port_, List ptr); - - external void wire_bdk_address_to_qr_uri( - NativePortType port_, List that); - - external void wire_bdk_script_buf_empty(NativePortType port_); - - external void wire_bdk_script_buf_from_hex(NativePortType port_, String s); - - external void wire_bdk_script_buf_with_capacity( - NativePortType port_, int capacity); - - external void wire_bdk_transaction_from_bytes( - NativePortType port_, List transaction_bytes); - - external void wire_bdk_transaction_input( - NativePortType port_, List that); - - external void wire_bdk_transaction_is_coin_base( - NativePortType port_, List that); - - external void wire_bdk_transaction_is_explicitly_rbf( - NativePortType port_, List that); - - external void wire_bdk_transaction_is_lock_time_enabled( - NativePortType port_, List that); - - external void wire_bdk_transaction_lock_time( - NativePortType port_, List that); - - external void wire_bdk_transaction_new(NativePortType port_, int version, - List lock_time, List input, List output); - - external void wire_bdk_transaction_output( - NativePortType port_, List that); - - external void wire_bdk_transaction_serialize( - NativePortType port_, List that); - - external void wire_bdk_transaction_size( - NativePortType port_, List that); - - external void wire_bdk_transaction_txid( - NativePortType port_, List that); - - external void wire_bdk_transaction_version( - NativePortType port_, List that); - - external void wire_bdk_transaction_vsize( - NativePortType port_, List that); - - external void wire_bdk_transaction_weight( - NativePortType port_, List that); - - external void wire_bdk_wallet_get_address( - NativePortType port_, List ptr, List address_index); - - external void wire_bdk_wallet_get_balance( - NativePortType port_, List that); - - external void wire_bdk_wallet_get_descriptor_for_keychain( - NativePortType port_, List ptr, int keychain); - - external void wire_bdk_wallet_get_internal_address( - NativePortType port_, List ptr, List address_index); - - external void wire_bdk_wallet_get_psbt_input( - NativePortType port_, - List that, - List utxo, - bool only_witness_utxo, - List? sighash_type); - - external void wire_bdk_wallet_is_mine( - NativePortType port_, List that, List script); - - external void wire_bdk_wallet_list_transactions( - NativePortType port_, List that, bool include_raw); - - external void wire_bdk_wallet_list_unspent( - NativePortType port_, List that); - - external void wire_bdk_wallet_network( - NativePortType port_, List that); - - external void wire_bdk_wallet_new( - NativePortType port_, - List descriptor, - List? change_descriptor, - int network, - List database_config); - - external void wire_bdk_wallet_sign(NativePortType port_, List ptr, - List psbt, List? sign_options); - - external void wire_bdk_wallet_sync( - NativePortType port_, List ptr, List blockchain); - - external void wire_finish_bump_fee_tx_builder( - NativePortType port_, - String txid, - double fee_rate, - List? allow_shrinking, - List wallet, - bool enable_rbf, - int? n_sequence); - - external void wire_tx_builder_finish( - NativePortType port_, - List wallet, - List recipients, - List utxos, - List? foreign_utxo, - List un_spendable, - int change_policy, - bool manually_selected_only, - double? fee_rate, - Object? fee_absolute, - bool drain_wallet, - List? drain_to, - List? rbf, - List data); - - external void rust_arc_increment_strong_count_RustOpaque_AnyBlockchain( - dynamic ptr); - - external void rust_arc_decrement_strong_count_RustOpaque_AnyBlockchain( - dynamic ptr); - - external void rust_arc_increment_strong_count_RustOpaque_ExtendedDescriptor( - dynamic ptr); - - external void rust_arc_decrement_strong_count_RustOpaque_ExtendedDescriptor( - dynamic ptr); - - external void - rust_arc_increment_strong_count_RustOpaque_MutexPartiallySignedTransaction( - dynamic ptr); - - external void - rust_arc_decrement_strong_count_RustOpaque_MutexPartiallySignedTransaction( - dynamic ptr); - - external void - rust_arc_increment_strong_count_RustOpaque_MutexbdkWalletAnyDatabase( - dynamic ptr); - - external void - rust_arc_decrement_strong_count_RustOpaque_MutexbdkWalletAnyDatabase( - dynamic ptr); - - external void rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddress( - dynamic ptr); - - external void rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress( - dynamic ptr); - - external void - rust_arc_increment_strong_count_RustOpaque_bitcoinbip32DerivationPath( - dynamic ptr); - - external void - rust_arc_decrement_strong_count_RustOpaque_bitcoinbip32DerivationPath( - dynamic ptr); - - external void - rust_arc_increment_strong_count_RustOpaque_keysDescriptorPublicKey( - dynamic ptr); - - external void - rust_arc_decrement_strong_count_RustOpaque_keysDescriptorPublicKey( - dynamic ptr); - - external void - rust_arc_increment_strong_count_RustOpaque_keysDescriptorSecretKey( - dynamic ptr); - - external void - rust_arc_decrement_strong_count_RustOpaque_keysDescriptorSecretKey( - dynamic ptr); - - external void rust_arc_increment_strong_count_RustOpaque_keysKeyMap( - dynamic ptr); - - external void rust_arc_decrement_strong_count_RustOpaque_keysKeyMap( - dynamic ptr); - - external void rust_arc_increment_strong_count_RustOpaque_keysbip39Mnemonic( - dynamic ptr); - - external void rust_arc_decrement_strong_count_RustOpaque_keysbip39Mnemonic( - dynamic ptr); -} diff --git a/lib/src/root.dart b/lib/src/root.dart deleted file mode 100644 index f835d94a..00000000 --- a/lib/src/root.dart +++ /dev/null @@ -1,1125 +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'; -import 'generated/api/wallet.dart'; - -///A Bitcoin address. -class Address extends BdkAddress { - Address._({required super.ptr}); - static Future
fromScript( - {required ScriptBuf script, required Network network}) async { - try { - await Api.initialize(); - final res = await BdkAddress.fromScript(script: script, network: network); - return Address._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapToException(e); - } - } - - static Future
fromString( - {required String s, required Network network}) async { - try { - await Api.initialize(); - final res = await BdkAddress.fromString(address: s, network: network); - return Address._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapToException(e); - } - } - - ///Generates a script pubkey spending to this address - Future scriptPubkey() async { - try { - final res = await BdkAddress.script(ptr: this); - return ScriptBuf(bytes: res.bytes); - } on BdkError catch (e) { - throw mapToException(e); - } - } -} - -/// 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.newInstance(blockchainConfig: config); - return Blockchain._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapToException(e); - } - } - - ///Estimate the fee rate required to confirm a transaction in a given target of blocks - @override - Future estimateFee({required int target, hint}) async { - try { - return super.estimateFee(target: target); - } on BdkError catch (e) { - throw mapToException(e); - } - } - - ///The function for broadcasting a transaction - @override - Future broadcast({required BdkTransaction transaction, hint}) async { - try { - return super.broadcast(transaction: transaction); - } on BdkError catch (e) { - throw mapToException(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 mapToException(e); - } - } - - ///The function for getting the current height of the blockchain. - @override - Future getHeight({hint}) { - try { - return super.getHeight(); - } on BdkError catch (e) { - throw mapToException(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), res.$2); - } on BdkError catch (e) { - throw mapToException(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 mapToException(e); - } - } -} - -///Script descriptor -class Descriptor extends BdkDescriptor { - Descriptor._({required super.extendedDescriptor, required super.keyMap}); - - /// [Descriptor] constructor - static Future create( - {required String descriptor, required 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 mapToException(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 Network network, - required 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 mapToException(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 Network network, - required 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 mapToException(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 Network network, - required 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 mapToException(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 Network network, - required 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 mapToException(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 Network network, - required 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 mapToException(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 Network network, - required 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 mapToException(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 Network network, - required 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 mapToException(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 Network network, - required 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 mapToException(e); - } - } - - ///Return the public version of the output descriptor. - @override - Future asString({hint}) async { - try { - return super.asString(); - } on BdkError catch (e) { - throw mapToException(e); - } - } - - ///Return the private version of the output descriptor if available, otherwise return the public version. - @override - Future asStringPrivate({hint}) async { - try { - return super.asStringPrivate(); - } on BdkError catch (e) { - throw mapToException(e); - } - } - - ///Computes an upper bound on the difference between a non-satisfied TxIn's segwit_weight and a satisfied TxIn's segwit_weight - @override - Future maxSatisfactionWeight({hint}) async { - try { - return super.maxSatisfactionWeight(); - } on BdkError catch (e) { - throw mapToException(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 mapToException(e); - } - } - - ///Get the public key as string. - @override - Future asString({hint}) async { - try { - return super.asString(); - } on BdkError catch (e) { - throw mapToException(e); - } - } - - ///Derive a public descriptor at a given path. - Future derive( - {required BdkDerivationPath path, hint}) async { - try { - final res = await BdkDescriptorPublicKey.derive(ptr: this, path: path); - return DescriptorPublicKey._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapToException(e); - } - } - - ///Extend the public descriptor with a custom path. - Future extend( - {required BdkDerivationPath path, hint}) async { - try { - final res = await BdkDescriptorPublicKey.extend(ptr: this, path: path); - return DescriptorPublicKey._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapToException(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 mapToException(e); - } - } - - /// [DescriptorSecretKey] constructor - static Future create( - {required 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 mapToException(e); - } - } - - ///Derived the XPrv using the derivation path - Future derive(BdkDerivationPath path) async { - try { - final res = await BdkDescriptorSecretKey.derive(ptr: this, path: path); - return DescriptorSecretKey._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapToException(e); - } - } - - ///Extends the XPrv using the derivation path - Future extend(BdkDerivationPath path) async { - try { - final res = await BdkDescriptorSecretKey.extend(ptr: this, path: path); - return DescriptorSecretKey._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapToException(e); - } - } - - ///Returns the public version of this key. - Future asPublic() async { - try { - final res = await BdkDescriptorSecretKey.asPublic(ptr: this); - return DescriptorPublicKey._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapToException(e); - } - } - - ///Get the private key as string. - @override - Future asString({hint}) { - try { - return super.asString(); - } on BdkError catch (e) { - throw mapToException(e); - } - } - - ///Get the private key as bytes. - @override - Future secretBytes({hint}) async { - try { - return super.secretBytes(); - } on BdkError catch (e) { - throw mapToException(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(WordCount wordCount) async { - try { - await Api.initialize(); - final res = await BdkMnemonic.newInstance(wordCount: wordCount); - return Mnemonic._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapToException(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 mapToException(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 mapToException(e); - } - } - - ///Returns Mnemonic as string - @override - Future asString({hint}) async { - try { - return super.asString(); - } on BdkError catch (e) { - throw mapToException(e); - } - } -} - -///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 mapToException(e); - } - } - - ///Return fee amount - @override - Future feeAmount({hint}) { - try { - return super.feeAmount(); - } on BdkError catch (e) { - throw mapToException(e); - } - } - - ///Return fee rate - @override - Future feeRate({hint}) { - try { - return super.feeRate(); - } on BdkError catch (e) { - throw mapToException(e); - } - } - - @override - Future jsonSerialize({hint}) { - try { - return super.jsonSerialize(); - } on BdkError catch (e) { - throw mapToException(e); - } - } - - ///Return psbt as string - @override - Future serialize({hint}) { - try { - return super.serialize(); - } on BdkError catch (e) { - throw mapToException(e); - } - } - - ///Return the transaction as bytes. - Future extractTx() async { - try { - final res = await BdkPsbt.extractTx(ptr: this); - return Transaction._(inner: res.inner); - } on BdkError catch (e) { - throw mapToException(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 mapToException(e); - } - } - - ///Returns the [PartiallySignedTransaction]'s transaction id - @override - Future txid({hint}) { - try { - return super.txid(); - } on BdkError catch (e) { - throw mapToException(e); - } - } -} - -///Bitcoin script. -class ScriptBuf extends BdkScriptBuf { - /// [ScriptBuf] constructor - ScriptBuf({required super.bytes}); - - ///Creates a new empty script. - static Future empty() async { - try { - await Api.initialize(); - final res = await BdkScriptBuf.empty(); - return ScriptBuf(bytes: res.bytes); - } on BdkError catch (e) { - throw mapToException(e); - } - } - - ///Creates a new empty script with pre-allocated capacity. - static Future withCapacity(int capacity) async { - try { - await Api.initialize(); - final res = await BdkScriptBuf.withCapacity(capacity: capacity); - return ScriptBuf(bytes: res.bytes); - } on BdkError catch (e) { - throw mapToException(e); - } - } - - ///Creates a ScriptBuf from a hex string. - static Future fromHex(String s) async { - try { - await Api.initialize(); - final res = await BdkScriptBuf.fromHex(s: s); - return ScriptBuf(bytes: res.bytes); - } on BdkError catch (e) { - throw mapToException(e); - } - } -} - -///A bitcoin transaction. -class Transaction extends BdkTransaction { - Transaction._({required super.inner}); - - /// [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 BdkTransaction.fromBytes(transactionBytes: transactionBytes); - return Transaction._(inner: res.inner); - } on BdkError catch (e) { - throw mapToException(e); - } - } - - @override - String toString() { - return inner; - } -} - -///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 = []; - (OutPoint, Input, int)? _foreignUtxo; - bool _manuallySelectedOnly = false; - double? _feeRate; - ChangeSpendPolicy _changeSpendPolicy = ChangeSpendPolicy.changeAllowed; - int? _feeAbsolute; - bool _drainWallet = false; - ScriptBuf? _drainTo; - RbfValue? _rbfValue; - List _data = []; - - ///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, int amount) { - _recipients.add(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(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( - Input psbtInput, OutPoint outPoint, int 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 = 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 = RbfValue.value(nSequence); - return this; - } - - ///Enable signaling RBF - /// - /// This will use the default nSequence value of 0xFFFFFFFD. - TxBuilder enableRbf() { - _rbfValue = RbfValue.rbfDefault(); - return this; - } - - ///Set an absolute fee - TxBuilder feeAbsolute(int 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 recipients) { - for (var e in _recipients) { - _recipients.add(e); - } - 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(OutPoint unSpendable) { - _unSpendable.add(unSpendable); - return this; - } - - ///Only spend change outputs - /// - /// This effectively adds all the non-change outputs to the “unspendable†list. - TxBuilder onlySpendChange() { - _changeSpendPolicy = 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, - rbf: _rbfValue, - drainTo: _drainTo, - feeAbsolute: _feeAbsolute, - feeRate: _feeRate, - data: _data, - changePolicy: _changeSpendPolicy); - - return (PartiallySignedTransaction._(ptr: res.$1.ptr), res.$2); - } on BdkError catch (e) { - throw mapToException(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 Network network, - required 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 mapToException(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. - Future getAddress( - {required AddressIndex addressIndex, hint}) async { - try { - final res = - await BdkWallet.getAddress(ptr: this, addressIndex: addressIndex); - return AddressInfo(res.$2, Address._(ptr: res.$1.ptr)); - } on BdkError catch (e) { - throw mapToException(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 - Future getBalance({hint}) { - try { - return super.getBalance(); - } on BdkError catch (e) { - throw mapToException(e); - } - } - - ///Returns the descriptor used to create addresses for a particular keychain. - Future getDescriptorForKeychain( - {required KeychainKind keychain, hint}) async { - try { - final res = await BdkWallet.getDescriptorForKeychain( - ptr: this, keychain: keychain); - return Descriptor._( - extendedDescriptor: res.extendedDescriptor, keyMap: res.keyMap); - } on BdkError catch (e) { - throw mapToException(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]. - - Future getInternalAddress( - {required AddressIndex addressIndex, hint}) async { - try { - final res = await BdkWallet.getInternalAddress( - ptr: this, addressIndex: addressIndex); - return AddressInfo(res.$2, Address._(ptr: res.$1.ptr)); - } on BdkError catch (e) { - throw mapToException(e); - } - } - - ///get the corresponding PSBT Input for a LocalUtxo - @override - Future getPsbtInput( - {required LocalUtxo utxo, - required bool onlyWitnessUtxo, - PsbtSigHashType? sighashType, - hint}) async { - try { - return super.getPsbtInput( - utxo: utxo, - onlyWitnessUtxo: onlyWitnessUtxo, - sighashType: sighashType); - } on BdkError catch (e) { - throw mapToException(e); - } - } - - /// Return whether or not a script is part of this wallet (either internal or external). - @override - Future isMine({required BdkScriptBuf script, hint}) async { - try { - return super.isMine(script: script); - } on BdkError catch (e) { - throw mapToException(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 - Future> listTransactions( - {required bool includeRaw, hint}) async { - try { - return super.listTransactions(includeRaw: includeRaw); - } on BdkError catch (e) { - throw mapToException(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 - Future> listUnspent({hint}) async { - try { - return super.listUnspent(); - } on BdkError catch (e) { - throw mapToException(e); - } - } - - /// Get the Bitcoin network the wallet is using. - @override - Future network({hint}) async { - try { - return super.network(); - } on BdkError catch (e) { - throw mapToException(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, - SignOptions? signOptions, - hint}) async { - try { - final res = await BdkWallet.sign(ptr: this, psbt: psbt); - return res; - } on BdkError catch (e) { - throw mapToException(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 mapToException(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); -} diff --git a/lib/src/utils/exceptions.dart b/lib/src/utils/exceptions.dart deleted file mode 100644 index 20ecbd44..00000000 --- a/lib/src/utils/exceptions.dart +++ /dev/null @@ -1,368 +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 ConsensusError extends BdkFfiException { - /// Constructs the [ConsensusError] - ConsensusError({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}); -} - -Exception mapToException(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. 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. 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) => DescriptorException(message: e.toString()), - 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) => HexException(message: e.toString()), - 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()), - //TODO; Map the following errors properly - consensus: (e) => ConsensusError(message: e.toString()), - address: (e) => AddressException(message: e.toString()), - bip39: (e) => Bip39Exception(message: e.toString()), - invalidInput: (e) => InvalidInputException(message: e), - invalidLockTime: (e) => InvalidLockTimeException(message: e), - invalidTransaction: (e) => InvalidTransactionException(message: e), - ); -} diff --git a/lib/src/utils/utils.dart b/lib/src/utils/utils.dart deleted file mode 100644 index 08e25d0e..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 (!CApi.instance.initialized) { - await CApi.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 c79716cb..00000000 --- a/macos/Classes/frb_generated.h +++ /dev/null @@ -1,1297 +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 *inner; -} 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_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 multi_sig; - 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_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_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_list_local_utxo { - struct wire_cst_local_utxo *ptr; - int32_t len; -} wire_cst_list_local_utxo; - -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_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_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; - -void frbgen_bdk_flutter_wire_bdk_blockchain_broadcast(int64_t port_, - struct wire_cst_bdk_blockchain *that, - struct wire_cst_bdk_transaction *transaction); - -void frbgen_bdk_flutter_wire_bdk_blockchain_estimate_fee(int64_t port_, - struct wire_cst_bdk_blockchain *that, - uint64_t target); - -void frbgen_bdk_flutter_wire_bdk_blockchain_get_block_hash(int64_t port_, - struct wire_cst_bdk_blockchain *that, - uint32_t height); - -void frbgen_bdk_flutter_wire_bdk_blockchain_get_height(int64_t port_, - struct wire_cst_bdk_blockchain *that); - -void frbgen_bdk_flutter_wire_bdk_blockchain_new(int64_t port_, - struct wire_cst_blockchain_config *blockchain_config); - -void frbgen_bdk_flutter_wire_bdk_descriptor_as_string(int64_t port_, - struct wire_cst_bdk_descriptor *that); - -void frbgen_bdk_flutter_wire_bdk_descriptor_as_string_private(int64_t port_, - struct wire_cst_bdk_descriptor *that); - -void frbgen_bdk_flutter_wire_bdk_descriptor_max_satisfaction_weight(int64_t port_, - struct wire_cst_bdk_descriptor *that); - -void frbgen_bdk_flutter_wire_bdk_descriptor_new(int64_t port_, - struct wire_cst_list_prim_u_8_strict *descriptor, - int32_t network); - -void frbgen_bdk_flutter_wire_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_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_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_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_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_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_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_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); - -void frbgen_bdk_flutter_wire_bdk_derivation_path_from_string(int64_t port_, - struct wire_cst_list_prim_u_8_strict *path); - -void frbgen_bdk_flutter_wire_bdk_descriptor_public_key_as_string(int64_t port_, - struct wire_cst_bdk_descriptor_public_key *that); - -void frbgen_bdk_flutter_wire_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_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_bdk_descriptor_public_key_from_string(int64_t port_, - struct wire_cst_list_prim_u_8_strict *public_key); - -void frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_as_public(int64_t port_, - struct wire_cst_bdk_descriptor_secret_key *ptr); - -void frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_as_string(int64_t port_, - struct wire_cst_bdk_descriptor_secret_key *that); - -void frbgen_bdk_flutter_wire_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_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_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_bdk_descriptor_secret_key_from_string(int64_t port_, - struct wire_cst_list_prim_u_8_strict *secret_key); - -void frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_secret_bytes(int64_t port_, - struct wire_cst_bdk_descriptor_secret_key *that); - -void frbgen_bdk_flutter_wire_bdk_mnemonic_as_string(int64_t port_, - struct wire_cst_bdk_mnemonic *that); - -void frbgen_bdk_flutter_wire_bdk_mnemonic_from_entropy(int64_t port_, - struct wire_cst_list_prim_u_8_loose *entropy); - -void frbgen_bdk_flutter_wire_bdk_mnemonic_from_string(int64_t port_, - struct wire_cst_list_prim_u_8_strict *mnemonic); - -void frbgen_bdk_flutter_wire_bdk_mnemonic_new(int64_t port_, int32_t word_count); - -void frbgen_bdk_flutter_wire_bdk_psbt_combine(int64_t port_, - struct wire_cst_bdk_psbt *ptr, - struct wire_cst_bdk_psbt *other); - -void frbgen_bdk_flutter_wire_bdk_psbt_extract_tx(int64_t port_, struct wire_cst_bdk_psbt *ptr); - -void frbgen_bdk_flutter_wire_bdk_psbt_fee_amount(int64_t port_, struct wire_cst_bdk_psbt *that); - -void frbgen_bdk_flutter_wire_bdk_psbt_fee_rate(int64_t port_, struct wire_cst_bdk_psbt *that); - -void frbgen_bdk_flutter_wire_bdk_psbt_from_str(int64_t port_, - struct wire_cst_list_prim_u_8_strict *psbt_base64); - -void frbgen_bdk_flutter_wire_bdk_psbt_json_serialize(int64_t port_, struct wire_cst_bdk_psbt *that); - -void frbgen_bdk_flutter_wire_bdk_psbt_serialize(int64_t port_, struct wire_cst_bdk_psbt *that); - -void frbgen_bdk_flutter_wire_bdk_psbt_txid(int64_t port_, struct wire_cst_bdk_psbt *that); - -void frbgen_bdk_flutter_wire_bdk_address_as_string(int64_t port_, - struct wire_cst_bdk_address *that); - -void frbgen_bdk_flutter_wire_bdk_address_from_script(int64_t port_, - struct wire_cst_bdk_script_buf *script, - int32_t network); - -void frbgen_bdk_flutter_wire_bdk_address_from_string(int64_t port_, - struct wire_cst_list_prim_u_8_strict *address, - int32_t network); - -void frbgen_bdk_flutter_wire_bdk_address_is_valid_for_network(int64_t port_, - struct wire_cst_bdk_address *that, - int32_t network); - -void frbgen_bdk_flutter_wire_bdk_address_network(int64_t port_, struct wire_cst_bdk_address *that); - -void frbgen_bdk_flutter_wire_bdk_address_payload(int64_t port_, struct wire_cst_bdk_address *that); - -void frbgen_bdk_flutter_wire_bdk_address_script(int64_t port_, struct wire_cst_bdk_address *ptr); - -void frbgen_bdk_flutter_wire_bdk_address_to_qr_uri(int64_t port_, - struct wire_cst_bdk_address *that); - -void frbgen_bdk_flutter_wire_bdk_script_buf_empty(int64_t port_); - -void frbgen_bdk_flutter_wire_bdk_script_buf_from_hex(int64_t port_, - struct wire_cst_list_prim_u_8_strict *s); - -void frbgen_bdk_flutter_wire_bdk_script_buf_with_capacity(int64_t port_, uintptr_t capacity); - -void frbgen_bdk_flutter_wire_bdk_transaction_from_bytes(int64_t port_, - struct wire_cst_list_prim_u_8_loose *transaction_bytes); - -void frbgen_bdk_flutter_wire_bdk_transaction_input(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire_bdk_transaction_is_coin_base(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire_bdk_transaction_is_explicitly_rbf(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire_bdk_transaction_is_lock_time_enabled(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire_bdk_transaction_lock_time(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire_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_bdk_transaction_output(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire_bdk_transaction_serialize(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire_bdk_transaction_size(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire_bdk_transaction_txid(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire_bdk_transaction_version(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire_bdk_transaction_vsize(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire_bdk_transaction_weight(int64_t port_, - struct wire_cst_bdk_transaction *that); - -void frbgen_bdk_flutter_wire_bdk_wallet_get_address(int64_t port_, - struct wire_cst_bdk_wallet *ptr, - struct wire_cst_address_index *address_index); - -void frbgen_bdk_flutter_wire_bdk_wallet_get_balance(int64_t port_, - struct wire_cst_bdk_wallet *that); - -void frbgen_bdk_flutter_wire_bdk_wallet_get_descriptor_for_keychain(int64_t port_, - struct wire_cst_bdk_wallet *ptr, - int32_t keychain); - -void frbgen_bdk_flutter_wire_bdk_wallet_get_internal_address(int64_t port_, - struct wire_cst_bdk_wallet *ptr, - struct wire_cst_address_index *address_index); - -void frbgen_bdk_flutter_wire_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); - -void frbgen_bdk_flutter_wire_bdk_wallet_is_mine(int64_t port_, - struct wire_cst_bdk_wallet *that, - struct wire_cst_bdk_script_buf *script); - -void frbgen_bdk_flutter_wire_bdk_wallet_list_transactions(int64_t port_, - struct wire_cst_bdk_wallet *that, - bool include_raw); - -void frbgen_bdk_flutter_wire_bdk_wallet_list_unspent(int64_t port_, - struct wire_cst_bdk_wallet *that); - -void frbgen_bdk_flutter_wire_bdk_wallet_network(int64_t port_, struct wire_cst_bdk_wallet *that); - -void frbgen_bdk_flutter_wire_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); - -void frbgen_bdk_flutter_wire_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_bdk_wallet_sync(int64_t port_, - struct wire_cst_bdk_wallet *ptr, - struct wire_cst_bdk_blockchain *blockchain); - -void frbgen_bdk_flutter_wire_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_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_prim_u_8_loose *data); - -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_AnyBlockchain(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_AnyBlockchain(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_ExtendedDescriptor(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_ExtendedDescriptor(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_MutexPartiallySignedTransaction(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_MutexPartiallySignedTransaction(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_MutexbdkWalletAnyDatabase(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_MutexbdkWalletAnyDatabase(const void *ptr); - -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_bitcoinbip32DerivationPath(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bitcoinbip32DerivationPath(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysDescriptorPublicKey(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysDescriptorPublicKey(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysDescriptorSecretKey(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysDescriptorSecretKey(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysKeyMap(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysKeyMap(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysbip39Mnemonic(const void *ptr); - -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysbip39Mnemonic(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_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); - -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_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_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_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_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_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_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_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_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_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_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_AnyBlockchain); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_ExtendedDescriptor); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_MutexPartiallySignedTransaction); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_MutexbdkWalletAnyDatabase); - 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_bitcoinbip32DerivationPath); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysDescriptorPublicKey); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysDescriptorSecretKey); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysKeyMap); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysbip39Mnemonic); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_AnyBlockchain); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_ExtendedDescriptor); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_MutexPartiallySignedTransaction); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_MutexbdkWalletAnyDatabase); - 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_bitcoinbip32DerivationPath); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysDescriptorPublicKey); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysDescriptorSecretKey); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysKeyMap); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysbip39Mnemonic); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_from_script); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_from_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_is_valid_for_network); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_network); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_payload); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_script); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_to_qr_uri); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_blockchain_broadcast); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_blockchain_estimate_fee); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_blockchain_get_block_hash); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_blockchain_get_height); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_blockchain_new); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_derivation_path_from_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_as_string_private); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_max_satisfaction_weight); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip44); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip44_public); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip49); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip49_public); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip84); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip84_public); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip86); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip86_public); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_public_key_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_public_key_derive); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_public_key_extend); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_public_key_from_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_as_public); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_create); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_derive); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_extend); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_from_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_secret_bytes); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_mnemonic_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_mnemonic_from_entropy); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_mnemonic_from_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_mnemonic_new); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_combine); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_extract_tx); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_fee_amount); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_fee_rate); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_from_str); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_json_serialize); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_serialize); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_txid); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_script_buf_empty); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_script_buf_from_hex); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_script_buf_with_capacity); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_from_bytes); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_input); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_is_coin_base); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_is_explicitly_rbf); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_is_lock_time_enabled); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_lock_time); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_new); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_output); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_serialize); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_size); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_txid); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_version); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_vsize); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_weight); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_get_address); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_get_balance); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_get_descriptor_for_keychain); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_get_internal_address); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_get_psbt_input); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_is_mine); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_list_transactions); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_list_unspent); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_network); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_new); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_sign); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_sync); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_finish_bump_fee_tx_builder); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_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 1fecb16e..00000000 --- a/macos/bdk_flutter.podspec +++ /dev/null @@ -1,34 +0,0 @@ -Pod::Spec.new do |s| - s.name = 'bdk_flutter' - s.version = "0.31.2-dev" - 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', - # 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/makefile b/makefile deleted file mode 100644 index 60b7bfe4..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@2.0.0-dev.31' -## : - -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 1cb8d5c0..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: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051 - url: "https://pub.dev" - source: hosted - version: "64.0.0" - analyzer: - dependency: transitive - description: - name: analyzer - sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893" - url: "https://pub.dev" - source: hosted - version: "6.2.0" - args: - dependency: transitive - 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" - 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: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" - url: "https://pub.dev" - source: hosted - version: "4.0.1" - 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: "581bacf68f89ec8792f5e5a0b2c4decd1c948e97ce659dc783688c8a88fbec21" - url: "https://pub.dev" - source: hosted - version: "2.4.8" - build_runner_core: - dependency: transitive - description: - name: build_runner_core - sha256: c9e32d21dd6626b5c163d48b037ce906bbe428bc23ab77bcd77bb21e593b6185 - url: "https://pub.dev" - source: hosted - version: "7.2.11" - 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: c9aabae0718ec394e5bc3c7272e6bb0dc0b32201a08fe185ec1d8401d3e39309 - url: "https://pub.dev" - source: hosted - version: "8.8.1" - 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: "40ae61a5d43feea6d24bd22c0537a6629db858963b99b4bc1c3db80676f32368" - url: "https://pub.dev" - source: hosted - version: "2.3.4" - 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: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" - url: "https://pub.dev" - source: hosted - version: "2.1.0" - ffigen: - dependency: "direct dev" - description: - name: ffigen - sha256: "3a80687577e7e51ba915114742f389a128e8aa241c52ce69a0f70aecb8e14365" - url: "https://pub.dev" - source: hosted - version: "9.0.1" - 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: e9a8716b1ad2fc81c434f3e4bf84b86c578578678c57e568b44aea7acf210102 - url: "https://pub.dev" - source: hosted - version: "2.0.0-dev.31" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - freezed: - dependency: "direct dev" - description: - name: freezed - sha256: "6c5031daae12c7072b3a87eff98983076434b4889ef2a44384d0cae3f82372ba" - url: "https://pub.dev" - source: hosted - version: "2.4.6" - freezed_annotation: - dependency: "direct main" - description: - name: freezed_annotation - sha256: c3fd9336eb55a38cc1bbd79ab17573113a8deccd0ecbbf926cca3c62803b5c2d - url: "https://pub.dev" - source: hosted - version: "2.4.1" - frontend_server_client: - dependency: transitive - description: - name: frontend_server_client - sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" - url: "https://pub.dev" - source: hosted - version: "3.2.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: 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" - leak_tracker: - dependency: transitive - description: - name: leak_tracker - sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" - url: "https://pub.dev" - source: hosted - version: "10.0.0" - leak_tracker_flutter_testing: - dependency: transitive - description: - name: leak_tracker_flutter_testing - sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 - url: "https://pub.dev" - source: hosted - version: "2.0.1" - leak_tracker_testing: - dependency: transitive - description: - name: leak_tracker_testing - sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 - url: "https://pub.dev" - source: hosted - version: "2.0.1" - lints: - dependency: "direct dev" - description: - name: lints - sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 - url: "https://pub.dev" - source: hosted - version: "3.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: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" - url: "https://pub.dev" - source: hosted - version: "0.8.0" - meta: - dependency: "direct main" - description: - name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 - url: "https://pub.dev" - source: hosted - version: "1.11.0" - mime: - dependency: transitive - description: - name: mime - sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e - url: "https://pub.dev" - source: hosted - version: "1.0.4" - 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: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367 - url: "https://pub.dev" - source: hosted - version: "1.2.3" - 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: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" - url: "https://pub.dev" - source: hosted - version: "1.0.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" - sprintf: - dependency: transitive - description: - name: sprintf - sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" - url: "https://pub.dev" - source: hosted - version: "7.0.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: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" - url: "https://pub.dev" - source: hosted - version: "0.6.1" - 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" - uuid: - dependency: "direct main" - description: - name: uuid - sha256: cd210a09f7c18cbe5a02511718e0334de6559871052c90a90c0cca46a4aa81c8 - url: "https://pub.dev" - source: hosted - version: "4.3.3" - 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: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 - url: "https://pub.dev" - source: hosted - version: "13.0.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" - 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: "1579d4a0340a83cf9e4d580ea51a16329c916973bffd5bd4b45e911b25d46bfd" - url: "https://pub.dev" - source: hosted - version: "2.1.1" -sdks: - dart: ">=3.2.0-0 <4.0.0" - flutter: ">=3.0.0" diff --git a/pubspec.yaml b/pubspec.yaml deleted file mode 100644 index 0e4a22c0..00000000 --- a/pubspec.yaml +++ /dev/null @@ -1,37 +0,0 @@ -name: bdk_flutter -description: A Flutter library for the Bitcoin Development Kit(bdk) (https://bitcoindevkit.org/) -version: 0.31.2-dev -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-dev.30 <= 2.0.0-dev.31" - ffi: ^2.0.1 - freezed_annotation: ^2.2.0 - mockito: ^5.4.0 - meta: ^1.10.0 - uuid: ^4.2.2 - collection: ^1.18.0 - -dev_dependencies: - flutter_test: - sdk: flutter - ffigen: ^9.0.1 - freezed: ^2.3.5 - build_runner: ^2.4.4 - lints: ^3.0.0 - -flutter: - plugin: - platforms: - android: - ffiPlugin: true - ios: - ffiPlugin: true - macos: - ffiPlugin: true \ No newline at end of file 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..6e594a23 --- /dev/null +++ b/run_build_tool.sh @@ -0,0 +1,94 @@ +#!/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/rust/Cargo.lock b/rust/Cargo.lock deleted file mode 100644 index 7a367368..00000000 --- a/rust/Cargo.lock +++ /dev/null @@ -1,2541 +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.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2f5a5fd28223e6f3cafb7d9cd685f51eafdd71d33ca1229f8316925d5957240" -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-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - -[[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 = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "anstream" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" - -[[package]] -name = "anstyle-parse" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" -dependencies = [ - "anstyle", - "windows-sys 0.52.0", -] - -[[package]] -name = "anyhow" -version = "1.0.82" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" -dependencies = [ - "backtrace", -] - -[[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 = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - -[[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.2-dev" -dependencies = [ - "anyhow", - "assert_matches", - "bdk", - "flutter_rust_bridge", - "flutter_rust_bridge_codegen", - "lazy_static", - "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 = "bitflags" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" - -[[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 = "camino" -version = "1.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo-platform" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo_metadata" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4acbb09d9ee8e23699b9634375c72795d095bf268439da88562cf9b501f181fa" -dependencies = [ - "camino", - "cargo-platform", - "semver", - "serde", - "serde_json", -] - -[[package]] -name = "cargo_toml" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "802b755090e39835a4b0440fb0bbee0df7495a8b337f63db21e616f7821c7e8c" -dependencies = [ - "serde", - "toml 0.8.12", -] - -[[package]] -name = "cbindgen" -version = "0.24.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b922faaf31122819ec80c4047cc684c6979a087366c069611e33649bf98e18d" -dependencies = [ - "heck 0.4.1", - "indexmap 1.9.3", - "log", - "proc-macro2", - "quote", - "serde", - "serde_json", - "syn 1.0.109", - "tempfile", - "toml 0.5.11", -] - -[[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 = "chrono" -version = "0.4.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" -dependencies = [ - "android-tzdata", - "iana-time-zone", - "js-sys", - "num-traits", - "wasm-bindgen", - "windows-targets 0.52.5", -] - -[[package]] -name = "clap" -version = "4.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" -dependencies = [ - "clap_builder", - "clap_derive", -] - -[[package]] -name = "clap_builder" -version = "4.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" -dependencies = [ - "anstream", - "anstyle", - "clap_lex", - "strsim", -] - -[[package]] -name = "clap_derive" -version = "4.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" -dependencies = [ - "heck 0.5.0", - "proc-macro2", - "quote", - "syn 2.0.59", -] - -[[package]] -name = "clap_lex" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" - -[[package]] -name = "colorchoice" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" - -[[package]] -name = "colored" -version = "1.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5f741c91823341bebf717d4c71bda820630ce065443b58bd1b7451af008355" -dependencies = [ - "is-terminal", - "lazy_static", - "winapi", -] - -[[package]] -name = "console" -version = "0.15.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" -dependencies = [ - "encode_unicode", - "lazy_static", - "libc", - "unicode-width", - "windows-sys 0.52.0", -] - -[[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 = "convert_case" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb4a24b1aaf0fd0ce8b45161144d6f42cd91677fd5940fd431183eb023b3a2b8" - -[[package]] -name = "core-foundation-sys" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" - -[[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-channel" -version = "0.5.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab3db02a9c5b5121e1e42fbdb1aeb65f5e02624cc58c43f2884c6ccac0b82f95" -dependencies = [ - "crossbeam-utils", -] - -[[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 = "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 = "dashmap" -version = "5.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" -dependencies = [ - "cfg-if", - "hashbrown 0.14.3", - "lock_api", - "once_cell", - "parking_lot_core 0.9.9", -] - -[[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 = "derivative" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "either" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" - -[[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 = "encode_unicode" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" - -[[package]] -name = "enum-iterator" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fd242f399be1da0a5354aa462d57b4ab2b4ee0683cc552f7c007d2d12d36e94" -dependencies = [ - "enum-iterator-derive", -] - -[[package]] -name = "enum-iterator-derive" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03cdc46ec28bd728e67540c528013c6a10eb69a02eb31078a1bda695438cbfb8" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.59", -] - -[[package]] -name = "enum_dispatch" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa18ce2bc66555b3218614519ac839ddb759a7d6720732f979ef8d13be147ecd" -dependencies = [ - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.59", -] - -[[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 = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "errno" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[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 = "fastrand" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" - -[[package]] -name = "fern" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9f0c14694cbd524c8720dd69b0e3179344f04ebb5f90f2e4a440c6ea3b2f1ee" -dependencies = [ - "chrono", - "colored", - "log", -] - -[[package]] -name = "filetime" -version = "0.2.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall 0.4.1", - "windows-sys 0.52.0", -] - -[[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-dev.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d9ceb6f8db0bf711a55e20151c6699132bb5975f846ecac2c3bc7d23cc0845d" -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_codegen" -version = "2.0.0-dev.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb089f0e86a6873eb9538ee5dea459e9bb029feeb6777ecf1f996c805451a507" -dependencies = [ - "anyhow", - "atty", - "cargo_metadata", - "cargo_toml", - "cbindgen", - "chrono", - "clap", - "convert_case", - "derivative", - "enum-iterator", - "enum_dispatch", - "fern", - "glob", - "hex", - "include_dir", - "indicatif", - "indicatif-log-bridge", - "itertools", - "lazy_static", - "log", - "notify", - "notify-debouncer-mini", - "paste", - "pathdiff", - "proc-macro2", - "quote", - "regex", - "serde", - "serde_json", - "serde_yaml", - "serial_test", - "strum", - "strum_macros", - "syn 2.0.59", - "tempfile", - "toml 0.5.11", - "topological-sort", -] - -[[package]] -name = "flutter_rust_bridge_macros" -version = "2.0.0-dev.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e02edfe56f04af804d3145b17dfe7820d46a6753b214160f227dbdfa1073f7cb" -dependencies = [ - "hex", - "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 = "fsevent-sys" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76ee7a02da4d231650c7cea31349b889be2f45ddb3ef3032d2ec8185f6313fd2" -dependencies = [ - "libc", -] - -[[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 = "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 = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - -[[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 0.14.3", -] - -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - -[[package]] -name = "heck" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" - -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - -[[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 = "iana-time-zone" -version = "0.1.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[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 = "include_dir" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18762faeff7122e89e0857b02f7ce6fcc0d101d5e9ad2ad7846cc01d61b7f19e" -dependencies = [ - "include_dir_macros", -] - -[[package]] -name = "include_dir_macros" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b139284b5cf57ecfa712bcc66950bb635b31aff41c188e8a4cfc758eca374a3f" -dependencies = [ - "proc-macro2", - "quote", -] - -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - -[[package]] -name = "indexmap" -version = "2.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" -dependencies = [ - "equivalent", - "hashbrown 0.14.3", -] - -[[package]] -name = "indicatif" -version = "0.17.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3" -dependencies = [ - "console", - "instant", - "number_prefix", - "portable-atomic", - "unicode-width", -] - -[[package]] -name = "indicatif-log-bridge" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2963046f28a204e3e3fd7e754fd90a6235da05b5378f24707ff0ec9513725ce3" -dependencies = [ - "indicatif", - "log", -] - -[[package]] -name = "inotify" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8069d3ec154eb856955c1c0fbffefbf5f3c40a104ec912d4797314c1801abff" -dependencies = [ - "bitflags 1.3.2", - "inotify-sys", - "libc", -] - -[[package]] -name = "inotify-sys" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e05c02b5e89bff3b946cedeca278abc628fe811e604f027c45a8aa3cf793d0eb" -dependencies = [ - "libc", -] - -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "is-terminal" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" -dependencies = [ - "hermit-abi 0.3.9", - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - -[[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 = "kqueue" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7447f1ca1b7b563588a205fe93dea8df60fd981423a768bc1c0ded35ed147d0c" -dependencies = [ - "kqueue-sys", - "libc", -] - -[[package]] -name = "kqueue-sys" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed9625ffda8729b85e45cf04090035ac368927b8cebc34898e7c120f52e4838b" -dependencies = [ - "bitflags 1.3.2", - "libc", -] - -[[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 = "linked-hash-map" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" - -[[package]] -name = "linux-raw-sys" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" - -[[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 = "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 = "mio" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" -dependencies = [ - "libc", - "log", - "wasi", - "windows-sys 0.48.0", -] - -[[package]] -name = "notify" -version = "6.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d" -dependencies = [ - "bitflags 2.5.0", - "crossbeam-channel", - "filetime", - "fsevent-sys", - "inotify", - "kqueue", - "libc", - "log", - "mio", - "walkdir", - "windows-sys 0.48.0", -] - -[[package]] -name = "notify-debouncer-mini" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d40b221972a1fc5ef4d858a2f671fb34c75983eb385463dff3780eeff6a9d43" -dependencies = [ - "crossbeam-channel", - "log", - "notify", -] - -[[package]] -name = "num-traits" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" -dependencies = [ - "autocfg", -] - -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi 0.3.9", - "libc", -] - -[[package]] -name = "number_prefix" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" - -[[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 4.0.2", - "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 0.8.6", -] - -[[package]] -name = "parking_lot" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" -dependencies = [ - "lock_api", - "parking_lot_core 0.9.9", -] - -[[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 0.2.16", - "smallvec", - "winapi", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall 0.4.1", - "smallvec", - "windows-targets 0.48.5", -] - -[[package]] -name = "paste" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" - -[[package]] -name = "pathdiff" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" - -[[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 = "portable-atomic" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" - -[[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 1.3.2", -] - -[[package]] -name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - -[[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 0.52.0", -] - -[[package]] -name = "rusqlite" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01e213bc3ecb39ac32e81e51ebe31fd888a940515173e3a18a35f8c6e896422a" -dependencies = [ - "bitflags 1.3.2", - "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 = "rustix" -version = "0.38.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" -dependencies = [ - "bitflags 2.5.0", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.52.0", -] - -[[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 = "rustversion" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80af6f9131f277a45a3fba6ce8e2258037bb0477a67e610d3c1fe046ab31de47" - -[[package]] -name = "ryu" -version = "1.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" - -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[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 = "semver" -version = "1.0.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" -dependencies = [ - "serde", -] - -[[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 = "serde_spanned" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_yaml" -version = "0.8.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b" -dependencies = [ - "indexmap 1.9.3", - "ryu", - "serde", - "yaml-rust", -] - -[[package]] -name = "serial_test" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e56dd856803e253c8f298af3f4d7eb0ae5e23a737252cd90bb4f3b435033b2d" -dependencies = [ - "dashmap 5.5.3", - "futures", - "lazy_static", - "log", - "parking_lot 0.12.1", - "serial_test_derive", -] - -[[package]] -name = "serial_test_derive" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.59", -] - -[[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 0.11.2", -] - -[[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 = "strsim" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" - -[[package]] -name = "strum" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" - -[[package]] -name = "strum_macros" -version = "0.24.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" -dependencies = [ - "heck 0.4.1", - "proc-macro2", - "quote", - "rustversion", - "syn 1.0.109", -] - -[[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 = "tempfile" -version = "3.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" -dependencies = [ - "cfg-if", - "fastrand", - "rustix", - "windows-sys 0.52.0", -] - -[[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 = "toml" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" -dependencies = [ - "serde", -] - -[[package]] -name = "toml" -version = "0.8.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit", -] - -[[package]] -name = "toml_datetime" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" -dependencies = [ - "serde", -] - -[[package]] -name = "toml_edit" -version = "0.22.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e40bb779c5187258fd7aad0eb68cb8706a0a81fa712fbea808ab43c4b8374c4" -dependencies = [ - "indexmap 2.2.6", - "serde", - "serde_spanned", - "toml_datetime", - "winnow", -] - -[[package]] -name = "topological-sort" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea68304e134ecd095ac6c3574494fc62b909f416c4fca77e440530221e549d3d" - -[[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 = "unicode-width" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" - -[[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 = "utf8parse" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" - -[[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 = "walkdir" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" -dependencies = [ - "same-file", - "winapi-util", -] - -[[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-util" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" -dependencies = [ - "winapi", -] - -[[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-core" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" -dependencies = [ - "windows-targets 0.52.5", -] - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.5", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - -[[package]] -name = "windows-targets" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" -dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", - "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[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.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[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.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[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.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[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.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[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.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[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.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" - -[[package]] -name = "winnow" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0c976aaaa0e1f90dbb21e9587cdaf1d9679a1cde8875c0d6bd83ab96a208352" -dependencies = [ - "memchr", -] - -[[package]] -name = "yaml-rust" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" -dependencies = [ - "linked-hash-map", -] - -[[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 cb8f3928..00000000 --- a/rust/Cargo.toml +++ /dev/null @@ -1,28 +0,0 @@ -[package] -name = "bdk_flutter" -version = "0.31.2-dev" -edition = "2021" - -[lib] -crate-type = ["staticlib", "cdylib"] -[dev-dependencies] -assert_matches = "1.5" - -[build-dependencies] -flutter_rust_bridge_codegen = { version = "= 2.0.0-dev.31" } -anyhow = "1.0.68" -[dependencies] -flutter_rust_bridge = "=2.0.0-dev.31" -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" -lazy_static = "1.4.0" - -[profile.release] -strip = true -opt-level = "z" -lto = true -codegen-units = 1 -panic = "abort" diff --git a/rust/cargokit.yaml b/rust/cargokit.yaml deleted file mode 100644 index f94f555f..00000000 --- a/rust/cargokit.yaml +++ /dev/null @@ -1,9 +0,0 @@ -cargo: - release: - toolchain: nightly - extra_flags: - - -Z - - build-std=panic_abort,std -precompiled_binaries: - url_prefix: https://github.com/LtbLightning/bdk-flutter/releases/download/precompiled_ - public_key: 0e43d5e8452d00db7f3000c18fb1ba796babfcb5dc6306bb0629eff24f8be85b diff --git a/rust/src/api/blockchain.rs b/rust/src/api/blockchain.rs deleted file mode 100644 index 178c4d40..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; -use bdk::blockchain::esplora::EsploraBlockchainConfig; - -pub use bdk::blockchain::{ - AnyBlockchain, AnyBlockchainConfig, ConfigurableBlockchain, ElectrumBlockchainConfig, - rpc, GetBlockHash, GetHeight,Blockchain -}; -use std::path::PathBuf; - -pub struct BdkBlockchain { - pub ptr: RustOpaque, -} - -impl From for BdkBlockchain { - fn from(value: AnyBlockchain) -> Self { - Self { - ptr: RustOpaque::new(value), - } - } -} -impl BdkBlockchain { - pub fn new(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: usize::try_from(config.stop_gap).unwrap(), - validate_domain: config.validate_domain, - }) - } - BlockchainConfig::Esplora { config } => { - AnyBlockchainConfig::Esplora(EsploraBlockchainConfig { - base_url: config.base_url, - proxy: config.proxy, - concurrency: config.concurrency, - stop_gap: usize::try_from(config.stop_gap).unwrap(), - timeout: config.timeout, - }) - } - BlockchainConfig::Rpc { config } => { - AnyBlockchainConfig::Rpc(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 = AnyBlockchain::from_config(&any_blockchain_config)?; - Ok(blockchain.into()) - } - pub(crate) fn get_blockchain(&self) -> RustOpaque { - self.ptr.clone() - } - - pub fn broadcast(&self, transaction: BdkTransaction) -> Result { - let tx: Transaction = (&transaction).try_into()?; - self.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 rpc::Auth { - fn from(auth: Auth) -> Self { - match auth { - Auth::None => blockchain::rpc::Auth::None, - Auth::UserPass { username, password } => { - blockchain::rpc::Auth::UserPass { username, password } - } - Auth::Cookie { file } => 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 blockchain::rpc::RpcSyncParams { - fn from(params: RpcSyncParams) -> Self { - 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 }, -} \ No newline at end of file diff --git a/rust/src/api/descriptor.rs b/rust/src/api/descriptor.rs deleted file mode 100644 index 236f2803..00000000 --- a/rust/src/api/descriptor.rs +++ /dev/null @@ -1,267 +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::{ExtendedDescriptor, IntoWalletDescriptor}; -pub use bdk::keys; -use bdk::template::{ - Bip44, Bip44Public, Bip49, Bip49Public, Bip84, Bip84Public, Bip86, Bip86Public, - DescriptorTemplate, -}; -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()).unwrap(); - 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()).unwrap(); - 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()).unwrap(); - 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()) - .unwrap(); - - 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()).unwrap(); - 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(), - )), - } - } - - pub fn as_string_private(&self) -> String { - let descriptor = &self.extended_descriptor; - let key_map = &(*self.key_map); - descriptor.to_string_with_secret(key_map) - } - - pub fn as_string(&self) -> String { - self.extended_descriptor.to_string() - } - pub fn max_satisfaction_weight(&self) -> Result { - self.extended_descriptor - .max_weight_to_satisfy() - .map_err(|e| e.into()) - } -} \ No newline at end of file diff --git a/rust/src/api/error.rs b/rust/src/api/error.rs deleted file mode 100644 index 57021f14..00000000 --- a/rust/src/api/error.rs +++ /dev/null @@ -1,357 +0,0 @@ -use crate::api::types::{KeychainKind, Network, OutPoint, Variant}; -use bdk::descriptor::error::Error as BdkDescriptorError; - -pub enum BdkError { - /// Hex decoding error - Hex(HexError), - /// Encoding error - Consensus(ConsensusError), - /// 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()), - } - } -} -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()), - } - } -} -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), - } - } -} - -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!(), - } - } -} -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()) - } -} \ No newline at end of file diff --git a/rust/src/api/key.rs b/rust/src/api/key.rs deleted file mode 100644 index 3f9eaf8f..00000000 --- a/rust/src/api/key.rs +++ /dev/null @@ -1,269 +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 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> = - keys::bip39::Mnemonic::generate((word_count.into(), Language::English)).unwrap(); - 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())) - } - - /// Returns Mnemonic as string - 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())) - } -} - -#[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().unwrap(); - let descriptor_secret_key = keys::DescriptorSecretKey::XPrv(DescriptorXKey { - origin: None, - xkey: xkey.into_xprv(network.into()).unwrap(), - 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(), - )), - } - } - pub fn as_public(ptr: BdkDescriptorSecretKey) -> Result { - let secp = Secp256k1::new(); - let descriptor_public_key = ptr.ptr.to_public(&secp).unwrap(); - Ok(descriptor_public_key.into()) - } - /// 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).unwrap(); - Ok(key.into()) - } - 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(), - )), - } - } - - pub fn as_string(&self) -> String { - self.ptr.to_string() - } -} \ No newline at end of file diff --git a/rust/src/api/mod.rs b/rust/src/api/mod.rs deleted file mode 100644 index 73e4799d..00000000 --- a/rust/src/api/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -pub mod blockchain; -pub mod descriptor; -pub mod error; -pub mod key; -pub mod psbt; -pub mod types; -pub mod wallet; diff --git a/rust/src/api/psbt.rs b/rust/src/api/psbt.rs deleted file mode 100644 index 78fcf0f5..00000000 --- a/rust/src/api/psbt.rs +++ /dev/null @@ -1,73 +0,0 @@ -use crate::api::error::BdkError; -use crate::api::types::{BdkTransaction, FeeRate}; -use crate::frb_generated::RustOpaque; -pub use bdk::bitcoin::psbt::PartiallySignedTransaction; -use bdk::psbt::PsbtUtils; -use std::ops::Deref; -use std::str::FromStr; -use std::sync::Mutex; - -#[derive(Debug)] -pub struct BdkPsbt { - pub ptr: RustOpaque>, -} - -impl From for BdkPsbt { - fn from(value: PartiallySignedTransaction) -> Self { - Self { - ptr: RustOpaque::new(Mutex::new(value)), - } - } -} -impl BdkPsbt { - pub fn from_str(psbt_base64: String) -> Result { - let psbt: PartiallySignedTransaction = PartiallySignedTransaction::from_str(&psbt_base64)?; - Ok(psbt.into()) - } - pub fn serialize(&self) -> String { - let psbt = self.ptr.lock().unwrap().clone(); - psbt.to_string() - } - - pub fn txid(&self) -> String { - let tx = self.ptr.lock().unwrap().clone().extract_tx(); - let txid = tx.txid(); - txid.to_string() - } - - /// Return the transaction. - pub fn extract_tx(ptr: BdkPsbt) -> Result { - let tx = ptr.ptr.lock().unwrap().clone().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().unwrap().clone(); - let mut original_psbt = ptr.ptr.lock().unwrap().clone(); - original_psbt.combine(other_psbt)?; - Ok(original_psbt.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. - pub fn fee_amount(&self) -> Option { - self.ptr.lock().unwrap().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. - pub fn fee_rate(&self) -> Option { - self.ptr.lock().unwrap().fee_rate().map(|e| e.into()) - } - - /// Serialize the PSBT data structure as a String of JSON. - pub fn json_serialize(&self) -> String { - let psbt = self.ptr.lock().unwrap(); - serde_json::to_string(psbt.deref()).unwrap() - } -} \ No newline at end of file diff --git a/rust/src/api/types.rs b/rust/src/api/types.rs deleted file mode 100644 index daecb73c..00000000 --- a/rust/src/api/types.rs +++ /dev/null @@ -1,908 +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 serde::{Deserialize, Serialize}; -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 { - ///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)), - }) - } -} -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)] -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()) - } - 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!(), - } - } - - ///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: - // write!(writer, "{:#}", address)?; - pub fn to_qr_uri(&self) -> String { - self.ptr.to_qr_uri() - } - ///The network on which this address is usable. - pub fn network(&self) -> Network { - self.ptr.network.into() - } - - pub fn script(ptr: BdkAddress) -> BdkScriptBuf { - ptr.ptr.script_pubkey().into() - } - - pub fn is_valid_for_network(&self, network: Network) -> bool { - let address_str = self.ptr.to_string(); - if let Ok(unchecked_address) = address_str - .parse::>() - { - unchecked_address.is_valid_for_network(network.into()) - } else { - false - } - } - - pub fn as_string(&self) -> String { - self.ptr.to_string() - } -} -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, - } - } -} -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 inner: 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 { - inner: 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.inner).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 { - pub multi_sig: bool, - /// 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()))?, - }) - } -} \ No newline at end of file diff --git a/rust/src/api/wallet.rs b/rust/src/api/wallet.rs deleted file mode 100644 index 022d9ca1..00000000 --- a/rust/src/api/wallet.rs +++ /dev/null @@ -1,279 +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::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::database::any::AnyDatabase; -use bdk::database::ConfigurableDatabase; -pub use std::sync::Mutex; -use std::sync::MutexGuard; - -#[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 = AnyDatabase::from_config(&database_config.into())?; - let descriptor: String = descriptor.as_string_private(); - let change_descriptor: Option = change_descriptor.map(|d| d.as_string_private()); - - let wallet = bdk::Wallet::new( - &descriptor, - change_descriptor.as_ref(), - network.into(), - database, - )?; - Ok(BdkWallet { - ptr: RustOpaque::new(Mutex::new(wallet)), - }) - } - fn get_wallet(&self) -> MutexGuard> { - self.ptr.lock().expect("") - } - - /// Get the Bitcoin network the wallet is using. - pub fn network(&self) -> Network { - self.get_wallet().network().into() - } - /// Return whether or not a script is part of this wallet (either internal or external). - pub fn is_mine(&self, script: BdkScriptBuf) -> Result { - self.get_wallet() - .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. - pub fn get_address( ptr: BdkWallet, address_index: AddressIndex) -> Result<(BdkAddress, u32), BdkError> { - ptr.get_wallet() - .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]. - pub fn get_internal_address( - ptr: BdkWallet, - address_index: AddressIndex, - ) -> Result<(BdkAddress, u32), BdkError> { - ptr.get_wallet() - .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. - pub fn get_balance(&self) -> Result { - self.get_wallet() - .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. - pub fn list_transactions( - &self, - include_raw: bool, - ) -> Result, BdkError> { - let mut transaction_details = vec![]; - for e in self - .get_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. - pub fn list_unspent(&self) -> Result, BdkError> { - let unspent: Vec = self.get_wallet().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().unwrap(); - ptr.get_wallet() - .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> { - let blockchain = blockchain.get_blockchain(); - ptr.get_wallet() - .sync(blockchain.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 { - let input = self.get_wallet().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. - pub fn get_descriptor_for_keychain( - ptr: BdkWallet, - keychain: KeychainKind, - ) -> anyhow::Result { - let wallet = ptr.get_wallet(); - let extended_descriptor = wallet.get_descriptor_for_keychain(keychain.into()); - BdkDescriptor::new(extended_descriptor.to_string(), wallet.network().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()).unwrap(); - let bdk_wallet = wallet.get_wallet(); - - let mut tx_builder = bdk_wallet.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).unwrap(); - } - 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, - data: Vec, -) -> anyhow::Result<(BdkPsbt, TransactionDetails), BdkError> { - let binding = wallet.get_wallet(); - - let mut tx_builder = binding.build_tx(); - - 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()), - }; -} \ No newline at end of file diff --git a/rust/src/frb_generated.io.rs b/rust/src/frb_generated.io.rs deleted file mode 100644 index d634557a..00000000 --- a/rust/src/frb_generated.io.rs +++ /dev/null @@ -1,3982 +0,0 @@ -// This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31. - -// Section: imports - -use super::*; -use crate::api::blockchain::*; -use crate::api::descriptor::*; -use crate::api::key::*; -use crate::api::psbt::*; -use crate::api::types::*; -use crate::api::wallet::*; -use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt}; -use flutter_rust_bridge::for_generated::transform_result_dco; -use flutter_rust_bridge::{Handler, IntoIntoDart}; - -// Section: boilerplate - -flutter_rust_bridge::frb_generated_boilerplate_io!(); - -// Section: dart2rust - -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.Address }; - crate::api::error::BdkError::Address(ans.field0.cst_decode()) - } - 3 => { - let ans = unsafe { self.kind.Descriptor }; - crate::api::error::BdkError::Descriptor(ans.field0.cst_decode()) - } - 4 => { - let ans = unsafe { self.kind.InvalidU32Bytes }; - crate::api::error::BdkError::InvalidU32Bytes(ans.field0.cst_decode()) - } - 5 => { - let ans = unsafe { self.kind.Generic }; - crate::api::error::BdkError::Generic(ans.field0.cst_decode()) - } - 6 => crate::api::error::BdkError::ScriptDoesntHaveAddressForm, - 7 => crate::api::error::BdkError::NoRecipients, - 8 => crate::api::error::BdkError::NoUtxosSelected, - 9 => { - let ans = unsafe { self.kind.OutputBelowDustLimit }; - crate::api::error::BdkError::OutputBelowDustLimit(ans.field0.cst_decode()) - } - 10 => { - let ans = unsafe { self.kind.InsufficientFunds }; - crate::api::error::BdkError::InsufficientFunds { - needed: ans.needed.cst_decode(), - available: ans.available.cst_decode(), - } - } - 11 => crate::api::error::BdkError::BnBTotalTriesExceeded, - 12 => crate::api::error::BdkError::BnBNoExactMatch, - 13 => crate::api::error::BdkError::UnknownUtxo, - 14 => crate::api::error::BdkError::TransactionNotFound, - 15 => crate::api::error::BdkError::TransactionConfirmed, - 16 => crate::api::error::BdkError::IrreplaceableTransaction, - 17 => { - let ans = unsafe { self.kind.FeeRateTooLow }; - crate::api::error::BdkError::FeeRateTooLow { - needed: ans.needed.cst_decode(), - } - } - 18 => { - let ans = unsafe { self.kind.FeeTooLow }; - crate::api::error::BdkError::FeeTooLow { - needed: ans.needed.cst_decode(), - } - } - 19 => crate::api::error::BdkError::FeeRateUnavailable, - 20 => { - let ans = unsafe { self.kind.MissingKeyOrigin }; - crate::api::error::BdkError::MissingKeyOrigin(ans.field0.cst_decode()) - } - 21 => { - let ans = unsafe { self.kind.Key }; - crate::api::error::BdkError::Key(ans.field0.cst_decode()) - } - 22 => crate::api::error::BdkError::ChecksumMismatch, - 23 => { - let ans = unsafe { self.kind.SpendingPolicyRequired }; - crate::api::error::BdkError::SpendingPolicyRequired(ans.field0.cst_decode()) - } - 24 => { - let ans = unsafe { self.kind.InvalidPolicyPathError }; - crate::api::error::BdkError::InvalidPolicyPathError(ans.field0.cst_decode()) - } - 25 => { - let ans = unsafe { self.kind.Signer }; - crate::api::error::BdkError::Signer(ans.field0.cst_decode()) - } - 26 => { - let ans = unsafe { self.kind.InvalidNetwork }; - crate::api::error::BdkError::InvalidNetwork { - requested: ans.requested.cst_decode(), - found: ans.found.cst_decode(), - } - } - 27 => { - let ans = unsafe { self.kind.InvalidOutpoint }; - crate::api::error::BdkError::InvalidOutpoint(ans.field0.cst_decode()) - } - 28 => { - let ans = unsafe { self.kind.Encode }; - crate::api::error::BdkError::Encode(ans.field0.cst_decode()) - } - 29 => { - let ans = unsafe { self.kind.Miniscript }; - crate::api::error::BdkError::Miniscript(ans.field0.cst_decode()) - } - 30 => { - let ans = unsafe { self.kind.MiniscriptPsbt }; - crate::api::error::BdkError::MiniscriptPsbt(ans.field0.cst_decode()) - } - 31 => { - let ans = unsafe { self.kind.Bip32 }; - crate::api::error::BdkError::Bip32(ans.field0.cst_decode()) - } - 32 => { - let ans = unsafe { self.kind.Bip39 }; - crate::api::error::BdkError::Bip39(ans.field0.cst_decode()) - } - 33 => { - let ans = unsafe { self.kind.Secp256k1 }; - crate::api::error::BdkError::Secp256k1(ans.field0.cst_decode()) - } - 34 => { - let ans = unsafe { self.kind.Json }; - crate::api::error::BdkError::Json(ans.field0.cst_decode()) - } - 35 => { - let ans = unsafe { self.kind.Psbt }; - crate::api::error::BdkError::Psbt(ans.field0.cst_decode()) - } - 36 => { - let ans = unsafe { self.kind.PsbtParse }; - crate::api::error::BdkError::PsbtParse(ans.field0.cst_decode()) - } - 37 => { - let ans = unsafe { self.kind.MissingCachedScripts }; - crate::api::error::BdkError::MissingCachedScripts( - ans.field0.cst_decode(), - ans.field1.cst_decode(), - ) - } - 38 => { - let ans = unsafe { self.kind.Electrum }; - crate::api::error::BdkError::Electrum(ans.field0.cst_decode()) - } - 39 => { - let ans = unsafe { self.kind.Esplora }; - crate::api::error::BdkError::Esplora(ans.field0.cst_decode()) - } - 40 => { - let ans = unsafe { self.kind.Sled }; - crate::api::error::BdkError::Sled(ans.field0.cst_decode()) - } - 41 => { - let ans = unsafe { self.kind.Rpc }; - crate::api::error::BdkError::Rpc(ans.field0.cst_decode()) - } - 42 => { - let ans = unsafe { self.kind.Rusqlite }; - crate::api::error::BdkError::Rusqlite(ans.field0.cst_decode()) - } - 43 => { - let ans = unsafe { self.kind.InvalidInput }; - crate::api::error::BdkError::InvalidInput(ans.field0.cst_decode()) - } - 44 => { - let ans = unsafe { self.kind.InvalidLockTime }; - crate::api::error::BdkError::InvalidLockTime(ans.field0.cst_decode()) - } - 45 => { - 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_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 { - inner: self.inner.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_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 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_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_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_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_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> 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_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<(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 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_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 { - multi_sig: self.multi_sig.cst_decode(), - 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_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 { - inner: 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_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_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_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_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_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 { - multi_sig: Default::default(), - 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_bdk_blockchain_broadcast( - port_: i64, - that: *mut wire_cst_bdk_blockchain, - transaction: *mut wire_cst_bdk_transaction, -) { - wire_bdk_blockchain_broadcast_impl(port_, that, transaction) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_blockchain_estimate_fee( - port_: i64, - that: *mut wire_cst_bdk_blockchain, - target: u64, -) { - wire_bdk_blockchain_estimate_fee_impl(port_, that, target) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_blockchain_get_block_hash( - port_: i64, - that: *mut wire_cst_bdk_blockchain, - height: u32, -) { - wire_bdk_blockchain_get_block_hash_impl(port_, that, height) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_blockchain_get_height( - port_: i64, - that: *mut wire_cst_bdk_blockchain, -) { - wire_bdk_blockchain_get_height_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_blockchain_new( - port_: i64, - blockchain_config: *mut wire_cst_blockchain_config, -) { - wire_bdk_blockchain_new_impl(port_, blockchain_config) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_as_string( - port_: i64, - that: *mut wire_cst_bdk_descriptor, -) { - wire_bdk_descriptor_as_string_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_as_string_private( - port_: i64, - that: *mut wire_cst_bdk_descriptor, -) { - wire_bdk_descriptor_as_string_private_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_max_satisfaction_weight( - port_: i64, - that: *mut wire_cst_bdk_descriptor, -) { - wire_bdk_descriptor_max_satisfaction_weight_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_new( - port_: i64, - descriptor: *mut wire_cst_list_prim_u_8_strict, - network: i32, -) { - wire_bdk_descriptor_new_impl(port_, descriptor, network) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_new_bip44( - port_: i64, - secret_key: *mut wire_cst_bdk_descriptor_secret_key, - keychain_kind: i32, - network: i32, -) { - wire_bdk_descriptor_new_bip44_impl(port_, secret_key, keychain_kind, network) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_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_bdk_descriptor_new_bip44_public_impl( - port_, - public_key, - fingerprint, - keychain_kind, - network, - ) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_new_bip49( - port_: i64, - secret_key: *mut wire_cst_bdk_descriptor_secret_key, - keychain_kind: i32, - network: i32, -) { - wire_bdk_descriptor_new_bip49_impl(port_, secret_key, keychain_kind, network) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_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_bdk_descriptor_new_bip49_public_impl( - port_, - public_key, - fingerprint, - keychain_kind, - network, - ) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_new_bip84( - port_: i64, - secret_key: *mut wire_cst_bdk_descriptor_secret_key, - keychain_kind: i32, - network: i32, -) { - wire_bdk_descriptor_new_bip84_impl(port_, secret_key, keychain_kind, network) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_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_bdk_descriptor_new_bip84_public_impl( - port_, - public_key, - fingerprint, - keychain_kind, - network, - ) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_new_bip86( - port_: i64, - secret_key: *mut wire_cst_bdk_descriptor_secret_key, - keychain_kind: i32, - network: i32, -) { - wire_bdk_descriptor_new_bip86_impl(port_, secret_key, keychain_kind, network) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_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_bdk_descriptor_new_bip86_public_impl( - port_, - public_key, - fingerprint, - keychain_kind, - network, - ) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_derivation_path_from_string( - port_: i64, - path: *mut wire_cst_list_prim_u_8_strict, -) { - wire_bdk_derivation_path_from_string_impl(port_, path) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_public_key_as_string( - port_: i64, - that: *mut wire_cst_bdk_descriptor_public_key, -) { - wire_bdk_descriptor_public_key_as_string_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_public_key_derive( - port_: i64, - ptr: *mut wire_cst_bdk_descriptor_public_key, - path: *mut wire_cst_bdk_derivation_path, -) { - wire_bdk_descriptor_public_key_derive_impl(port_, ptr, path) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_public_key_extend( - port_: i64, - ptr: *mut wire_cst_bdk_descriptor_public_key, - path: *mut wire_cst_bdk_derivation_path, -) { - wire_bdk_descriptor_public_key_extend_impl(port_, ptr, path) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_public_key_from_string( - port_: i64, - public_key: *mut wire_cst_list_prim_u_8_strict, -) { - wire_bdk_descriptor_public_key_from_string_impl(port_, public_key) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_as_public( - port_: i64, - ptr: *mut wire_cst_bdk_descriptor_secret_key, -) { - wire_bdk_descriptor_secret_key_as_public_impl(port_, ptr) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_as_string( - port_: i64, - that: *mut wire_cst_bdk_descriptor_secret_key, -) { - wire_bdk_descriptor_secret_key_as_string_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_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_bdk_descriptor_secret_key_create_impl(port_, network, mnemonic, password) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_derive( - port_: i64, - ptr: *mut wire_cst_bdk_descriptor_secret_key, - path: *mut wire_cst_bdk_derivation_path, -) { - wire_bdk_descriptor_secret_key_derive_impl(port_, ptr, path) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_extend( - port_: i64, - ptr: *mut wire_cst_bdk_descriptor_secret_key, - path: *mut wire_cst_bdk_derivation_path, -) { - wire_bdk_descriptor_secret_key_extend_impl(port_, ptr, path) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_from_string( - port_: i64, - secret_key: *mut wire_cst_list_prim_u_8_strict, -) { - wire_bdk_descriptor_secret_key_from_string_impl(port_, secret_key) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_secret_bytes( - port_: i64, - that: *mut wire_cst_bdk_descriptor_secret_key, -) { - wire_bdk_descriptor_secret_key_secret_bytes_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_mnemonic_as_string( - port_: i64, - that: *mut wire_cst_bdk_mnemonic, -) { - wire_bdk_mnemonic_as_string_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_mnemonic_from_entropy( - port_: i64, - entropy: *mut wire_cst_list_prim_u_8_loose, -) { - wire_bdk_mnemonic_from_entropy_impl(port_, entropy) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_mnemonic_from_string( - port_: i64, - mnemonic: *mut wire_cst_list_prim_u_8_strict, -) { - wire_bdk_mnemonic_from_string_impl(port_, mnemonic) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_mnemonic_new(port_: i64, word_count: i32) { - wire_bdk_mnemonic_new_impl(port_, word_count) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_psbt_combine( - port_: i64, - ptr: *mut wire_cst_bdk_psbt, - other: *mut wire_cst_bdk_psbt, -) { - wire_bdk_psbt_combine_impl(port_, ptr, other) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_psbt_extract_tx( - port_: i64, - ptr: *mut wire_cst_bdk_psbt, -) { - wire_bdk_psbt_extract_tx_impl(port_, ptr) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_psbt_fee_amount( - port_: i64, - that: *mut wire_cst_bdk_psbt, -) { - wire_bdk_psbt_fee_amount_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_psbt_fee_rate( - port_: i64, - that: *mut wire_cst_bdk_psbt, -) { - wire_bdk_psbt_fee_rate_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_psbt_from_str( - port_: i64, - psbt_base64: *mut wire_cst_list_prim_u_8_strict, -) { - wire_bdk_psbt_from_str_impl(port_, psbt_base64) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_psbt_json_serialize( - port_: i64, - that: *mut wire_cst_bdk_psbt, -) { - wire_bdk_psbt_json_serialize_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_psbt_serialize( - port_: i64, - that: *mut wire_cst_bdk_psbt, -) { - wire_bdk_psbt_serialize_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_psbt_txid(port_: i64, that: *mut wire_cst_bdk_psbt) { - wire_bdk_psbt_txid_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_address_as_string( - port_: i64, - that: *mut wire_cst_bdk_address, -) { - wire_bdk_address_as_string_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_address_from_script( - port_: i64, - script: *mut wire_cst_bdk_script_buf, - network: i32, -) { - wire_bdk_address_from_script_impl(port_, script, network) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_address_from_string( - port_: i64, - address: *mut wire_cst_list_prim_u_8_strict, - network: i32, -) { - wire_bdk_address_from_string_impl(port_, address, network) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_address_is_valid_for_network( - port_: i64, - that: *mut wire_cst_bdk_address, - network: i32, -) { - wire_bdk_address_is_valid_for_network_impl(port_, that, network) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_address_network( - port_: i64, - that: *mut wire_cst_bdk_address, -) { - wire_bdk_address_network_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_address_payload( - port_: i64, - that: *mut wire_cst_bdk_address, -) { - wire_bdk_address_payload_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_address_script( - port_: i64, - ptr: *mut wire_cst_bdk_address, -) { - wire_bdk_address_script_impl(port_, ptr) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_address_to_qr_uri( - port_: i64, - that: *mut wire_cst_bdk_address, -) { - wire_bdk_address_to_qr_uri_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_script_buf_empty(port_: i64) { - wire_bdk_script_buf_empty_impl(port_) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_script_buf_from_hex( - port_: i64, - s: *mut wire_cst_list_prim_u_8_strict, -) { - wire_bdk_script_buf_from_hex_impl(port_, s) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_script_buf_with_capacity( - port_: i64, - capacity: usize, -) { - wire_bdk_script_buf_with_capacity_impl(port_, capacity) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_transaction_from_bytes( - port_: i64, - transaction_bytes: *mut wire_cst_list_prim_u_8_loose, -) { - wire_bdk_transaction_from_bytes_impl(port_, transaction_bytes) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_transaction_input( - port_: i64, - that: *mut wire_cst_bdk_transaction, -) { - wire_bdk_transaction_input_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_transaction_is_coin_base( - port_: i64, - that: *mut wire_cst_bdk_transaction, -) { - wire_bdk_transaction_is_coin_base_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_transaction_is_explicitly_rbf( - port_: i64, - that: *mut wire_cst_bdk_transaction, -) { - wire_bdk_transaction_is_explicitly_rbf_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_transaction_is_lock_time_enabled( - port_: i64, - that: *mut wire_cst_bdk_transaction, -) { - wire_bdk_transaction_is_lock_time_enabled_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_transaction_lock_time( - port_: i64, - that: *mut wire_cst_bdk_transaction, -) { - wire_bdk_transaction_lock_time_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_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_bdk_transaction_new_impl(port_, version, lock_time, input, output) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_transaction_output( - port_: i64, - that: *mut wire_cst_bdk_transaction, -) { - wire_bdk_transaction_output_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_transaction_serialize( - port_: i64, - that: *mut wire_cst_bdk_transaction, -) { - wire_bdk_transaction_serialize_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_transaction_size( - port_: i64, - that: *mut wire_cst_bdk_transaction, -) { - wire_bdk_transaction_size_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_transaction_txid( - port_: i64, - that: *mut wire_cst_bdk_transaction, -) { - wire_bdk_transaction_txid_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_transaction_version( - port_: i64, - that: *mut wire_cst_bdk_transaction, -) { - wire_bdk_transaction_version_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_transaction_vsize( - port_: i64, - that: *mut wire_cst_bdk_transaction, -) { - wire_bdk_transaction_vsize_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_transaction_weight( - port_: i64, - that: *mut wire_cst_bdk_transaction, -) { - wire_bdk_transaction_weight_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_wallet_get_address( - port_: i64, - ptr: *mut wire_cst_bdk_wallet, - address_index: *mut wire_cst_address_index, -) { - wire_bdk_wallet_get_address_impl(port_, ptr, address_index) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_wallet_get_balance( - port_: i64, - that: *mut wire_cst_bdk_wallet, -) { - wire_bdk_wallet_get_balance_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_wallet_get_descriptor_for_keychain( - port_: i64, - ptr: *mut wire_cst_bdk_wallet, - keychain: i32, -) { - wire_bdk_wallet_get_descriptor_for_keychain_impl(port_, ptr, keychain) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_wallet_get_internal_address( - port_: i64, - ptr: *mut wire_cst_bdk_wallet, - address_index: *mut wire_cst_address_index, -) { - wire_bdk_wallet_get_internal_address_impl(port_, ptr, address_index) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_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_bdk_wallet_get_psbt_input_impl(port_, that, utxo, only_witness_utxo, sighash_type) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_wallet_is_mine( - port_: i64, - that: *mut wire_cst_bdk_wallet, - script: *mut wire_cst_bdk_script_buf, -) { - wire_bdk_wallet_is_mine_impl(port_, that, script) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_wallet_list_transactions( - port_: i64, - that: *mut wire_cst_bdk_wallet, - include_raw: bool, -) { - wire_bdk_wallet_list_transactions_impl(port_, that, include_raw) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_wallet_list_unspent( - port_: i64, - that: *mut wire_cst_bdk_wallet, -) { - wire_bdk_wallet_list_unspent_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_wallet_network( - port_: i64, - that: *mut wire_cst_bdk_wallet, -) { - wire_bdk_wallet_network_impl(port_, that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_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_bdk_wallet_new_impl( - port_, - descriptor, - change_descriptor, - network, - database_config, - ) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_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_bdk_wallet_sign_impl(port_, ptr, psbt, sign_options) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_bdk_wallet_sync( - port_: i64, - ptr: *mut wire_cst_bdk_wallet, - blockchain: *mut wire_cst_bdk_blockchain, -) { - wire_bdk_wallet_sync_impl(port_, ptr, blockchain) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire_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_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_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, - data: *mut wire_cst_list_prim_u_8_loose, -) { - wire_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, - data, - ) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_AnyBlockchain( - 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_AnyBlockchain( - 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_ExtendedDescriptor( - 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_ExtendedDescriptor( - 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_MutexPartiallySignedTransaction( - 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_MutexPartiallySignedTransaction( - 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_MutexbdkWalletAnyDatabase( - 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_MutexbdkWalletAnyDatabase( - 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_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_bitcoinbip32DerivationPath( - 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_bitcoinbip32DerivationPath( - 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_keysDescriptorPublicKey( - 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_keysDescriptorPublicKey( - 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_keysDescriptorSecretKey( - 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_keysDescriptorSecretKey( - 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_keysKeyMap( - 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_keysKeyMap( - 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_keysbip39Mnemonic( - 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_keysbip39Mnemonic( - 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_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_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_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_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_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_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, - 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_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_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 { - inner: *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_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_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_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_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_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_out_point_input_usize { - field0: wire_cst_out_point, - field1: wire_cst_input, - field2: usize, -} -#[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_script_amount { - script: wire_cst_bdk_script_buf, - amount: u64, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_sign_options { - multi_sig: bool, - 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 e351e8d3..00000000 --- a/rust/src/frb_generated.rs +++ /dev/null @@ -1,5947 +0,0 @@ -// This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31. - -#![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 -)] - -// Section: imports - -use crate::api::blockchain::*; -use crate::api::descriptor::*; -use crate::api::key::*; -use crate::api::psbt::*; -use crate::api::types::*; -use crate::api::wallet::*; -use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt}; -use flutter_rust_bridge::for_generated::transform_result_dco; -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-dev.31"; - -// Section: executor - -flutter_rust_bridge::frb_generated_default_handler!(); - -// Section: wire_funcs - -fn wire_bdk_blockchain_broadcast_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: 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_that = that.cst_decode(); - let api_transaction = transaction.cst_decode(); - move |context| { - transform_result_dco((move || { - crate::api::blockchain::BdkBlockchain::broadcast(&api_that, api_transaction) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::blockchain::BdkBlockchain::estimate_fee(&api_that, api_target) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::blockchain::BdkBlockchain::get_block_hash(&api_that, api_height) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::blockchain::BdkBlockchain::get_height(&api_that) - })()) - } - }, - ) -} -fn wire_bdk_blockchain_new_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_new", - 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((move || { - crate::api::blockchain::BdkBlockchain::new(api_blockchain_config) - })()) - } - }, - ) -} -fn wire_bdk_descriptor_as_string_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_descriptor_as_string", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_that = that.cst_decode(); - move |context| { - transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::descriptor::BdkDescriptor::as_string(&api_that)) - })()) - } - }, - ) -} -fn wire_bdk_descriptor_as_string_private_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_descriptor_as_string_private", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_that = that.cst_decode(); - move |context| { - transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::descriptor::BdkDescriptor::as_string_private( - &api_that, - )) - })()) - } - }, - ) -} -fn wire_bdk_descriptor_max_satisfaction_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_descriptor_max_satisfaction_weight", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_that = that.cst_decode(); - move |context| { - transform_result_dco((move || { - crate::api::descriptor::BdkDescriptor::max_satisfaction_weight(&api_that) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::descriptor::BdkDescriptor::new(api_descriptor, api_network) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::descriptor::BdkDescriptor::new_bip44( - api_secret_key, - api_keychain_kind, - api_network, - ) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::descriptor::BdkDescriptor::new_bip44_public( - api_public_key, - api_fingerprint, - api_keychain_kind, - api_network, - ) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::descriptor::BdkDescriptor::new_bip49( - api_secret_key, - api_keychain_kind, - api_network, - ) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::descriptor::BdkDescriptor::new_bip49_public( - api_public_key, - api_fingerprint, - api_keychain_kind, - api_network, - ) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::descriptor::BdkDescriptor::new_bip84( - api_secret_key, - api_keychain_kind, - api_network, - ) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::descriptor::BdkDescriptor::new_bip84_public( - api_public_key, - api_fingerprint, - api_keychain_kind, - api_network, - ) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::descriptor::BdkDescriptor::new_bip86( - api_secret_key, - api_keychain_kind, - api_network, - ) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::descriptor::BdkDescriptor::new_bip86_public( - api_public_key, - api_fingerprint, - api_keychain_kind, - api_network, - ) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::key::BdkDerivationPath::from_string(api_path) - })()) - } - }, - ) -} -fn wire_bdk_descriptor_public_key_as_string_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_descriptor_public_key_as_string", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_that = that.cst_decode(); - move |context| { - transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::key::BdkDescriptorPublicKey::as_string( - &api_that, - )) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::key::BdkDescriptorPublicKey::derive(api_ptr, api_path) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::key::BdkDescriptorPublicKey::extend(api_ptr, api_path) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::key::BdkDescriptorPublicKey::from_string(api_public_key) - })()) - } - }, - ) -} -fn wire_bdk_descriptor_secret_key_as_public_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_secret_key_as_public", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_ptr = ptr.cst_decode(); - move |context| { - transform_result_dco((move || { - crate::api::key::BdkDescriptorSecretKey::as_public(api_ptr) - })()) - } - }, - ) -} -fn wire_bdk_descriptor_secret_key_as_string_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_descriptor_secret_key_as_string", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_that = that.cst_decode(); - move |context| { - transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::key::BdkDescriptorSecretKey::as_string( - &api_that, - )) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::key::BdkDescriptorSecretKey::create( - api_network, - api_mnemonic, - api_password, - ) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::key::BdkDescriptorSecretKey::derive(api_ptr, api_path) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::key::BdkDescriptorSecretKey::extend(api_ptr, api_path) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::key::BdkDescriptorSecretKey::from_string(api_secret_key) - })()) - } - }, - ) -} -fn wire_bdk_descriptor_secret_key_secret_bytes_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_descriptor_secret_key_secret_bytes", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_that = that.cst_decode(); - move |context| { - transform_result_dco((move || { - crate::api::key::BdkDescriptorSecretKey::secret_bytes(&api_that) - })()) - } - }, - ) -} -fn wire_bdk_mnemonic_as_string_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_mnemonic_as_string", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_that = that.cst_decode(); - move |context| { - transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::key::BdkMnemonic::as_string(&api_that)) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::key::BdkMnemonic::from_entropy(api_entropy) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::key::BdkMnemonic::from_string(api_mnemonic) - })()) - } - }, - ) -} -fn wire_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((move || crate::api::key::BdkMnemonic::new(api_word_count))()) - } - }, - ) -} -fn wire_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((move || { - crate::api::psbt::BdkPsbt::combine(api_ptr, api_other) - })()) - } - }, - ) -} -fn wire_bdk_psbt_extract_tx_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_psbt_extract_tx", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_ptr = ptr.cst_decode(); - move |context| { - transform_result_dco((move || crate::api::psbt::BdkPsbt::extract_tx(api_ptr))()) - } - }, - ) -} -fn wire_bdk_psbt_fee_amount_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_psbt_fee_amount", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_that = that.cst_decode(); - move |context| { - transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::psbt::BdkPsbt::fee_amount(&api_that)) - })()) - } - }, - ) -} -fn wire_bdk_psbt_fee_rate_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_psbt_fee_rate", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_that = that.cst_decode(); - move |context| { - transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::psbt::BdkPsbt::fee_rate(&api_that)) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::psbt::BdkPsbt::from_str(api_psbt_base64) - })()) - } - }, - ) -} -fn wire_bdk_psbt_json_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_psbt_json_serialize", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_that = that.cst_decode(); - move |context| { - transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::psbt::BdkPsbt::json_serialize(&api_that)) - })()) - } - }, - ) -} -fn wire_bdk_psbt_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_psbt_serialize", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_that = that.cst_decode(); - move |context| { - transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::psbt::BdkPsbt::serialize(&api_that)) - })()) - } - }, - ) -} -fn wire_bdk_psbt_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_psbt_txid", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_that = that.cst_decode(); - move |context| { - transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::psbt::BdkPsbt::txid(&api_that)) - })()) - } - }, - ) -} -fn wire_bdk_address_as_string_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_address_as_string", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_that = that.cst_decode(); - move |context| { - transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::types::BdkAddress::as_string(&api_that)) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::types::BdkAddress::from_script(api_script, api_network) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::types::BdkAddress::from_string(api_address, api_network) - })()) - } - }, - ) -} -fn wire_bdk_address_is_valid_for_network_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, - network: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_address_is_valid_for_network", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_that = that.cst_decode(); - let api_network = network.cst_decode(); - move |context| { - transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::types::BdkAddress::is_valid_for_network( - &api_that, - api_network, - )) - })()) - } - }, - ) -} -fn wire_bdk_address_network_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_address_network", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_that = that.cst_decode(); - move |context| { - transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::types::BdkAddress::network(&api_that)) - })()) - } - }, - ) -} -fn wire_bdk_address_payload_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_address_payload", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_that = that.cst_decode(); - move |context| { - transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::types::BdkAddress::payload(&api_that)) - })()) - } - }, - ) -} -fn wire_bdk_address_script_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_address_script", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_ptr = ptr.cst_decode(); - move |context| { - transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::types::BdkAddress::script(api_ptr)) - })()) - } - }, - ) -} -fn wire_bdk_address_to_qr_uri_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_address_to_qr_uri", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_that = that.cst_decode(); - move |context| { - transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::types::BdkAddress::to_qr_uri(&api_that)) - })()) - } - }, - ) -} -fn wire_bdk_script_buf_empty_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_script_buf_empty", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - move |context| { - transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::types::BdkScriptBuf::empty()) - })()) - } - }, - ) -} -fn wire_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((move || crate::api::types::BdkScriptBuf::from_hex(api_s))()) - } - }, - ) -} -fn wire_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 || { - Result::<_, ()>::Ok(crate::api::types::BdkScriptBuf::with_capacity( - api_capacity, - )) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::types::BdkTransaction::from_bytes(api_transaction_bytes) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::types::BdkTransaction::input(&api_that) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::types::BdkTransaction::is_coin_base(&api_that) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::types::BdkTransaction::is_explicitly_rbf(&api_that) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::types::BdkTransaction::is_lock_time_enabled(&api_that) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::types::BdkTransaction::lock_time(&api_that) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::types::BdkTransaction::new( - api_version, - api_lock_time, - api_input, - api_output, - ) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::types::BdkTransaction::output(&api_that) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::types::BdkTransaction::serialize(&api_that) - })()) - } - }, - ) -} -fn wire_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((move || crate::api::types::BdkTransaction::size(&api_that))()) - } - }, - ) -} -fn wire_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((move || crate::api::types::BdkTransaction::txid(&api_that))()) - } - }, - ) -} -fn wire_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((move || { - crate::api::types::BdkTransaction::version(&api_that) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::types::BdkTransaction::vsize(&api_that) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::types::BdkTransaction::weight(&api_that) - })()) - } - }, - ) -} -fn wire_bdk_wallet_get_address_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: impl CstDecode, - address_index: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_wallet_get_address", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_ptr = ptr.cst_decode(); - let api_address_index = address_index.cst_decode(); - move |context| { - transform_result_dco((move || { - crate::api::wallet::BdkWallet::get_address(api_ptr, api_address_index) - })()) - } - }, - ) -} -fn wire_bdk_wallet_get_balance_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_wallet_get_balance", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_that = that.cst_decode(); - move |context| { - transform_result_dco((move || { - crate::api::wallet::BdkWallet::get_balance(&api_that) - })()) - } - }, - ) -} -fn wire_bdk_wallet_get_descriptor_for_keychain_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: impl CstDecode, - keychain: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_wallet_get_descriptor_for_keychain", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_ptr = ptr.cst_decode(); - let api_keychain = keychain.cst_decode(); - move |context| { - transform_result_dco((move || { - crate::api::wallet::BdkWallet::get_descriptor_for_keychain( - api_ptr, - api_keychain, - ) - })()) - } - }, - ) -} -fn wire_bdk_wallet_get_internal_address_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: impl CstDecode, - address_index: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_wallet_get_internal_address", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_ptr = ptr.cst_decode(); - let api_address_index = address_index.cst_decode(); - move |context| { - transform_result_dco((move || { - crate::api::wallet::BdkWallet::get_internal_address(api_ptr, api_address_index) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::wallet::BdkWallet::get_psbt_input( - &api_that, - api_utxo, - api_only_witness_utxo, - api_sighash_type, - ) - })()) - } - }, - ) -} -fn wire_bdk_wallet_is_mine_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, - script: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_wallet_is_mine", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_that = that.cst_decode(); - let api_script = script.cst_decode(); - move |context| { - transform_result_dco((move || { - crate::api::wallet::BdkWallet::is_mine(&api_that, api_script) - })()) - } - }, - ) -} -fn wire_bdk_wallet_list_transactions_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, - include_raw: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_wallet_list_transactions", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_that = that.cst_decode(); - let api_include_raw = include_raw.cst_decode(); - move |context| { - transform_result_dco((move || { - crate::api::wallet::BdkWallet::list_transactions(&api_that, api_include_raw) - })()) - } - }, - ) -} -fn wire_bdk_wallet_list_unspent_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_wallet_list_unspent", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_that = that.cst_decode(); - move |context| { - transform_result_dco((move || { - crate::api::wallet::BdkWallet::list_unspent(&api_that) - })()) - } - }, - ) -} -fn wire_bdk_wallet_network_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_wallet_network", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_that = that.cst_decode(); - move |context| { - transform_result_dco((move || { - Result::<_, ()>::Ok(crate::api::wallet::BdkWallet::network(&api_that)) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::wallet::BdkWallet::new( - api_descriptor, - api_change_descriptor, - api_network, - api_database_config, - ) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::wallet::BdkWallet::sign(api_ptr, api_psbt, api_sign_options) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::wallet::BdkWallet::sync(api_ptr, api_blockchain) - })()) - } - }, - ) -} -fn wire_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((move || { - crate::api::wallet::finish_bump_fee_tx_builder( - api_txid, - api_fee_rate, - api_allow_shrinking, - api_wallet, - api_enable_rbf, - api_n_sequence, - ) - })()) - } - }, - ) -} -fn wire_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>, - 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_data = data.cst_decode(); - move |context| { - transform_result_dco((move || { - 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_data, - ) - })()) - } - }, - ) -} - -// 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 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::Address(var_field0); - } - 3 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Descriptor(var_field0); - } - 4 => { - let mut var_field0 = >::sse_decode(deserializer); - return crate::api::error::BdkError::InvalidU32Bytes(var_field0); - } - 5 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Generic(var_field0); - } - 6 => { - return crate::api::error::BdkError::ScriptDoesntHaveAddressForm; - } - 7 => { - return crate::api::error::BdkError::NoRecipients; - } - 8 => { - return crate::api::error::BdkError::NoUtxosSelected; - } - 9 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::OutputBelowDustLimit(var_field0); - } - 10 => { - 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, - }; - } - 11 => { - return crate::api::error::BdkError::BnBTotalTriesExceeded; - } - 12 => { - return crate::api::error::BdkError::BnBNoExactMatch; - } - 13 => { - return crate::api::error::BdkError::UnknownUtxo; - } - 14 => { - return crate::api::error::BdkError::TransactionNotFound; - } - 15 => { - return crate::api::error::BdkError::TransactionConfirmed; - } - 16 => { - return crate::api::error::BdkError::IrreplaceableTransaction; - } - 17 => { - let mut var_needed = ::sse_decode(deserializer); - return crate::api::error::BdkError::FeeRateTooLow { needed: var_needed }; - } - 18 => { - let mut var_needed = ::sse_decode(deserializer); - return crate::api::error::BdkError::FeeTooLow { needed: var_needed }; - } - 19 => { - return crate::api::error::BdkError::FeeRateUnavailable; - } - 20 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::MissingKeyOrigin(var_field0); - } - 21 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Key(var_field0); - } - 22 => { - return crate::api::error::BdkError::ChecksumMismatch; - } - 23 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::SpendingPolicyRequired(var_field0); - } - 24 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::InvalidPolicyPathError(var_field0); - } - 25 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Signer(var_field0); - } - 26 => { - 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, - }; - } - 27 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::InvalidOutpoint(var_field0); - } - 28 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Encode(var_field0); - } - 29 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Miniscript(var_field0); - } - 30 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::MiniscriptPsbt(var_field0); - } - 31 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Bip32(var_field0); - } - 32 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Bip39(var_field0); - } - 33 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Secp256k1(var_field0); - } - 34 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Json(var_field0); - } - 35 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Psbt(var_field0); - } - 36 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::PsbtParse(var_field0); - } - 37 => { - let mut var_field0 = ::sse_decode(deserializer); - let mut var_field1 = ::sse_decode(deserializer); - return crate::api::error::BdkError::MissingCachedScripts(var_field0, var_field1); - } - 38 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Electrum(var_field0); - } - 39 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Esplora(var_field0); - } - 40 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Sled(var_field0); - } - 41 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Rpc(var_field0); - } - 42 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Rusqlite(var_field0); - } - 43 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::InvalidInput(var_field0); - } - 44 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::InvalidLockTime(var_field0); - } - 45 => { - 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::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_inner = ::sse_decode(deserializer); - return crate::api::types::BdkTransaction { inner: var_inner }; - } -} - -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::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 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<(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::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 (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 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::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_multiSig = ::sse_decode(deserializer); - 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 { - multi_sig: var_multiSig, - 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(), - } - } -} -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() - } - } - } -} -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() - } - } - } -} -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::Address(field0) => { - [2.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Descriptor(field0) => { - [3.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::InvalidU32Bytes(field0) => { - [4.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Generic(field0) => { - [5.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::ScriptDoesntHaveAddressForm => [6.into_dart()].into_dart(), - crate::api::error::BdkError::NoRecipients => [7.into_dart()].into_dart(), - crate::api::error::BdkError::NoUtxosSelected => [8.into_dart()].into_dart(), - crate::api::error::BdkError::OutputBelowDustLimit(field0) => { - [9.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::InsufficientFunds { needed, available } => [ - 10.into_dart(), - needed.into_into_dart().into_dart(), - available.into_into_dart().into_dart(), - ] - .into_dart(), - crate::api::error::BdkError::BnBTotalTriesExceeded => [11.into_dart()].into_dart(), - crate::api::error::BdkError::BnBNoExactMatch => [12.into_dart()].into_dart(), - crate::api::error::BdkError::UnknownUtxo => [13.into_dart()].into_dart(), - crate::api::error::BdkError::TransactionNotFound => [14.into_dart()].into_dart(), - crate::api::error::BdkError::TransactionConfirmed => [15.into_dart()].into_dart(), - crate::api::error::BdkError::IrreplaceableTransaction => [16.into_dart()].into_dart(), - crate::api::error::BdkError::FeeRateTooLow { needed } => { - [17.into_dart(), needed.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::FeeTooLow { needed } => { - [18.into_dart(), needed.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::FeeRateUnavailable => [19.into_dart()].into_dart(), - crate::api::error::BdkError::MissingKeyOrigin(field0) => { - [20.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Key(field0) => { - [21.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::ChecksumMismatch => [22.into_dart()].into_dart(), - crate::api::error::BdkError::SpendingPolicyRequired(field0) => { - [23.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::InvalidPolicyPathError(field0) => { - [24.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Signer(field0) => { - [25.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::InvalidNetwork { requested, found } => [ - 26.into_dart(), - requested.into_into_dart().into_dart(), - found.into_into_dart().into_dart(), - ] - .into_dart(), - crate::api::error::BdkError::InvalidOutpoint(field0) => { - [27.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Encode(field0) => { - [28.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Miniscript(field0) => { - [29.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::MiniscriptPsbt(field0) => { - [30.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Bip32(field0) => { - [31.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Bip39(field0) => { - [32.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Secp256k1(field0) => { - [33.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Json(field0) => { - [34.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Psbt(field0) => { - [35.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::PsbtParse(field0) => { - [36.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::MissingCachedScripts(field0, field1) => [ - 37.into_dart(), - field0.into_into_dart().into_dart(), - field1.into_into_dart().into_dart(), - ] - .into_dart(), - crate::api::error::BdkError::Electrum(field0) => { - [38.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Esplora(field0) => { - [39.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Sled(field0) => { - [40.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Rpc(field0) => { - [41.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Rusqlite(field0) => { - [42.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::InvalidInput(field0) => { - [43.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::InvalidLockTime(field0) => { - [44.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::InvalidTransaction(field0) => { - [45.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - } - } -} -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::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.inner.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() - } - } - } -} -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(), - } - } -} -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::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() - } - } - } -} -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() - } - } - } -} -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() - } - } - } -} -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(), - } - } -} -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(), - } - } -} -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() - } - } - } -} -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(), - } - } -} -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(), - } - } -} -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::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() - } - } - } -} -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::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.multi_sig.into_into_dart().into_dart(), - 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(), - } - } -} -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(), - } - } -} -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(), - } - } -} -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 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); - } - } - } -} - -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); - } - } - } -} - -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); - } - } - } -} - -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::Address(field0) => { - ::sse_encode(2, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::Descriptor(field0) => { - ::sse_encode(3, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::InvalidU32Bytes(field0) => { - ::sse_encode(4, serializer); - >::sse_encode(field0, serializer); - } - crate::api::error::BdkError::Generic(field0) => { - ::sse_encode(5, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::ScriptDoesntHaveAddressForm => { - ::sse_encode(6, serializer); - } - crate::api::error::BdkError::NoRecipients => { - ::sse_encode(7, serializer); - } - crate::api::error::BdkError::NoUtxosSelected => { - ::sse_encode(8, serializer); - } - crate::api::error::BdkError::OutputBelowDustLimit(field0) => { - ::sse_encode(9, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::InsufficientFunds { needed, available } => { - ::sse_encode(10, serializer); - ::sse_encode(needed, serializer); - ::sse_encode(available, serializer); - } - crate::api::error::BdkError::BnBTotalTriesExceeded => { - ::sse_encode(11, serializer); - } - crate::api::error::BdkError::BnBNoExactMatch => { - ::sse_encode(12, serializer); - } - crate::api::error::BdkError::UnknownUtxo => { - ::sse_encode(13, serializer); - } - crate::api::error::BdkError::TransactionNotFound => { - ::sse_encode(14, serializer); - } - crate::api::error::BdkError::TransactionConfirmed => { - ::sse_encode(15, serializer); - } - crate::api::error::BdkError::IrreplaceableTransaction => { - ::sse_encode(16, serializer); - } - crate::api::error::BdkError::FeeRateTooLow { needed } => { - ::sse_encode(17, serializer); - ::sse_encode(needed, serializer); - } - crate::api::error::BdkError::FeeTooLow { needed } => { - ::sse_encode(18, serializer); - ::sse_encode(needed, serializer); - } - crate::api::error::BdkError::FeeRateUnavailable => { - ::sse_encode(19, serializer); - } - crate::api::error::BdkError::MissingKeyOrigin(field0) => { - ::sse_encode(20, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::Key(field0) => { - ::sse_encode(21, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::ChecksumMismatch => { - ::sse_encode(22, serializer); - } - crate::api::error::BdkError::SpendingPolicyRequired(field0) => { - ::sse_encode(23, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::InvalidPolicyPathError(field0) => { - ::sse_encode(24, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::Signer(field0) => { - ::sse_encode(25, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::InvalidNetwork { requested, found } => { - ::sse_encode(26, serializer); - ::sse_encode(requested, serializer); - ::sse_encode(found, serializer); - } - crate::api::error::BdkError::InvalidOutpoint(field0) => { - ::sse_encode(27, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::Encode(field0) => { - ::sse_encode(28, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::Miniscript(field0) => { - ::sse_encode(29, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::MiniscriptPsbt(field0) => { - ::sse_encode(30, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::Bip32(field0) => { - ::sse_encode(31, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::Bip39(field0) => { - ::sse_encode(32, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::Secp256k1(field0) => { - ::sse_encode(33, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::Json(field0) => { - ::sse_encode(34, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::Psbt(field0) => { - ::sse_encode(35, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::PsbtParse(field0) => { - ::sse_encode(36, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::MissingCachedScripts(field0, field1) => { - ::sse_encode(37, serializer); - ::sse_encode(field0, serializer); - ::sse_encode(field1, serializer); - } - crate::api::error::BdkError::Electrum(field0) => { - ::sse_encode(38, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::Esplora(field0) => { - ::sse_encode(39, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::Sled(field0) => { - ::sse_encode(40, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::Rpc(field0) => { - ::sse_encode(41, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::Rusqlite(field0) => { - ::sse_encode(42, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::InvalidInput(field0) => { - ::sse_encode(43, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::InvalidLockTime(field0) => { - ::sse_encode(44, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::InvalidTransaction(field0) => { - ::sse_encode(45, serializer); - ::sse_encode(field0, serializer); - } - } - } -} - -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::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.inner, 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); - } - } - } -} - -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::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); - } - } - } -} - -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); - } - } - } -} - -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); - } - } - } -} - -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); - } - } - } -} - -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 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); - } - } - } -} - -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<(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); - } - } - } -} - -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); - } - } - } -} - -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 (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 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::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.multi_sig, serializer); - ::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::*; - -/// cbindgen:ignore -#[cfg(target_family = "wasm")] -#[path = "frb_generated.web.rs"] -mod web; -#[cfg(target_family = "wasm")] -pub use web::*; diff --git a/rust/src/frb_generated.web.rs b/rust/src/frb_generated.web.rs deleted file mode 100644 index 464492b5..00000000 --- a/rust/src/frb_generated.web.rs +++ /dev/null @@ -1,2241 +0,0 @@ -// This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31. - -// Section: imports - -use super::*; -use crate::api::blockchain::*; -use crate::api::descriptor::*; -use crate::api::key::*; -use crate::api::psbt::*; -use crate::api::types::*; -use crate::api::wallet::*; -use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt}; -use flutter_rust_bridge::for_generated::transform_result_dco; -use flutter_rust_bridge::for_generated::wasm_bindgen; -use flutter_rust_bridge::for_generated::wasm_bindgen::prelude::*; -use flutter_rust_bridge::{Handler, IntoIntoDart}; - -// Section: boilerplate - -flutter_rust_bridge::frb_generated_boilerplate_web!(); - -// Section: dart2rust - -impl CstDecode for String { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> String { - self - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::error::AddressError { - let self_ = self.unchecked_into::(); - match self_.get(0).unchecked_into_f64() as _ { - 0 => crate::api::error::AddressError::Base58(self_.get(1).cst_decode()), - 1 => crate::api::error::AddressError::Bech32(self_.get(1).cst_decode()), - 2 => crate::api::error::AddressError::EmptyBech32Payload, - 3 => crate::api::error::AddressError::InvalidBech32Variant { - expected: self_.get(1).cst_decode(), - found: self_.get(2).cst_decode(), - }, - 4 => crate::api::error::AddressError::InvalidWitnessVersion(self_.get(1).cst_decode()), - 5 => { - crate::api::error::AddressError::UnparsableWitnessVersion(self_.get(1).cst_decode()) - } - 6 => crate::api::error::AddressError::MalformedWitnessVersion, - 7 => crate::api::error::AddressError::InvalidWitnessProgramLength( - self_.get(1).cst_decode(), - ), - 8 => crate::api::error::AddressError::InvalidSegwitV0ProgramLength( - self_.get(1).cst_decode(), - ), - 9 => crate::api::error::AddressError::UncompressedPubkey, - 10 => crate::api::error::AddressError::ExcessiveScriptSize, - 11 => crate::api::error::AddressError::UnrecognizedScript, - 12 => crate::api::error::AddressError::UnknownAddressType(self_.get(1).cst_decode()), - 13 => crate::api::error::AddressError::NetworkValidation { - network_required: self_.get(1).cst_decode(), - network_found: self_.get(2).cst_decode(), - address: self_.get(3).cst_decode(), - }, - _ => unreachable!(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::AddressIndex { - let self_ = self.unchecked_into::(); - match self_.get(0).unchecked_into_f64() as _ { - 0 => crate::api::types::AddressIndex::Increase, - 1 => crate::api::types::AddressIndex::LastUnused, - 2 => crate::api::types::AddressIndex::Peek { - index: self_.get(1).cst_decode(), - }, - 3 => crate::api::types::AddressIndex::Reset { - index: self_.get(1).cst_decode(), - }, - _ => unreachable!(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::blockchain::Auth { - let self_ = self.unchecked_into::(); - match self_.get(0).unchecked_into_f64() as _ { - 0 => crate::api::blockchain::Auth::None, - 1 => crate::api::blockchain::Auth::UserPass { - username: self_.get(1).cst_decode(), - password: self_.get(2).cst_decode(), - }, - 2 => crate::api::blockchain::Auth::Cookie { - file: self_.get(1).cst_decode(), - }, - _ => unreachable!(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::Balance { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 6, - "Expected 6 elements, got {}", - self_.length() - ); - crate::api::types::Balance { - immature: self_.get(0).cst_decode(), - trusted_pending: self_.get(1).cst_decode(), - untrusted_pending: self_.get(2).cst_decode(), - confirmed: self_.get(3).cst_decode(), - spendable: self_.get(4).cst_decode(), - total: self_.get(5).cst_decode(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::BdkAddress { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::types::BdkAddress { - ptr: self_.get(0).cst_decode(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::blockchain::BdkBlockchain { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::blockchain::BdkBlockchain { - ptr: self_.get(0).cst_decode(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::key::BdkDerivationPath { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::key::BdkDerivationPath { - ptr: self_.get(0).cst_decode(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::descriptor::BdkDescriptor { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 2, - "Expected 2 elements, got {}", - self_.length() - ); - crate::api::descriptor::BdkDescriptor { - extended_descriptor: self_.get(0).cst_decode(), - key_map: self_.get(1).cst_decode(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::key::BdkDescriptorPublicKey { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::key::BdkDescriptorPublicKey { - ptr: self_.get(0).cst_decode(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::key::BdkDescriptorSecretKey { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::key::BdkDescriptorSecretKey { - ptr: self_.get(0).cst_decode(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::error::BdkError { - let self_ = self.unchecked_into::(); - match self_.get(0).unchecked_into_f64() as _ { - 0 => crate::api::error::BdkError::Hex(self_.get(1).cst_decode()), - 1 => crate::api::error::BdkError::Consensus(self_.get(1).cst_decode()), - 2 => crate::api::error::BdkError::Address(self_.get(1).cst_decode()), - 3 => crate::api::error::BdkError::Descriptor(self_.get(1).cst_decode()), - 4 => crate::api::error::BdkError::InvalidU32Bytes(self_.get(1).cst_decode()), - 5 => crate::api::error::BdkError::Generic(self_.get(1).cst_decode()), - 6 => crate::api::error::BdkError::ScriptDoesntHaveAddressForm, - 7 => crate::api::error::BdkError::NoRecipients, - 8 => crate::api::error::BdkError::NoUtxosSelected, - 9 => crate::api::error::BdkError::OutputBelowDustLimit(self_.get(1).cst_decode()), - 10 => crate::api::error::BdkError::InsufficientFunds { - needed: self_.get(1).cst_decode(), - available: self_.get(2).cst_decode(), - }, - 11 => crate::api::error::BdkError::BnBTotalTriesExceeded, - 12 => crate::api::error::BdkError::BnBNoExactMatch, - 13 => crate::api::error::BdkError::UnknownUtxo, - 14 => crate::api::error::BdkError::TransactionNotFound, - 15 => crate::api::error::BdkError::TransactionConfirmed, - 16 => crate::api::error::BdkError::IrreplaceableTransaction, - 17 => crate::api::error::BdkError::FeeRateTooLow { - needed: self_.get(1).cst_decode(), - }, - 18 => crate::api::error::BdkError::FeeTooLow { - needed: self_.get(1).cst_decode(), - }, - 19 => crate::api::error::BdkError::FeeRateUnavailable, - 20 => crate::api::error::BdkError::MissingKeyOrigin(self_.get(1).cst_decode()), - 21 => crate::api::error::BdkError::Key(self_.get(1).cst_decode()), - 22 => crate::api::error::BdkError::ChecksumMismatch, - 23 => crate::api::error::BdkError::SpendingPolicyRequired(self_.get(1).cst_decode()), - 24 => crate::api::error::BdkError::InvalidPolicyPathError(self_.get(1).cst_decode()), - 25 => crate::api::error::BdkError::Signer(self_.get(1).cst_decode()), - 26 => crate::api::error::BdkError::InvalidNetwork { - requested: self_.get(1).cst_decode(), - found: self_.get(2).cst_decode(), - }, - 27 => crate::api::error::BdkError::InvalidOutpoint(self_.get(1).cst_decode()), - 28 => crate::api::error::BdkError::Encode(self_.get(1).cst_decode()), - 29 => crate::api::error::BdkError::Miniscript(self_.get(1).cst_decode()), - 30 => crate::api::error::BdkError::MiniscriptPsbt(self_.get(1).cst_decode()), - 31 => crate::api::error::BdkError::Bip32(self_.get(1).cst_decode()), - 32 => crate::api::error::BdkError::Bip39(self_.get(1).cst_decode()), - 33 => crate::api::error::BdkError::Secp256k1(self_.get(1).cst_decode()), - 34 => crate::api::error::BdkError::Json(self_.get(1).cst_decode()), - 35 => crate::api::error::BdkError::Psbt(self_.get(1).cst_decode()), - 36 => crate::api::error::BdkError::PsbtParse(self_.get(1).cst_decode()), - 37 => crate::api::error::BdkError::MissingCachedScripts( - self_.get(1).cst_decode(), - self_.get(2).cst_decode(), - ), - 38 => crate::api::error::BdkError::Electrum(self_.get(1).cst_decode()), - 39 => crate::api::error::BdkError::Esplora(self_.get(1).cst_decode()), - 40 => crate::api::error::BdkError::Sled(self_.get(1).cst_decode()), - 41 => crate::api::error::BdkError::Rpc(self_.get(1).cst_decode()), - 42 => crate::api::error::BdkError::Rusqlite(self_.get(1).cst_decode()), - 43 => crate::api::error::BdkError::InvalidInput(self_.get(1).cst_decode()), - 44 => crate::api::error::BdkError::InvalidLockTime(self_.get(1).cst_decode()), - 45 => crate::api::error::BdkError::InvalidTransaction(self_.get(1).cst_decode()), - _ => unreachable!(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::key::BdkMnemonic { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::key::BdkMnemonic { - ptr: self_.get(0).cst_decode(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::psbt::BdkPsbt { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::psbt::BdkPsbt { - ptr: self_.get(0).cst_decode(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::BdkScriptBuf { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::types::BdkScriptBuf { - bytes: self_.get(0).cst_decode(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::BdkTransaction { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::types::BdkTransaction { - inner: self_.get(0).cst_decode(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::wallet::BdkWallet { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::wallet::BdkWallet { - ptr: self_.get(0).cst_decode(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::BlockTime { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 2, - "Expected 2 elements, got {}", - self_.length() - ); - crate::api::types::BlockTime { - height: self_.get(0).cst_decode(), - timestamp: self_.get(1).cst_decode(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::blockchain::BlockchainConfig { - let self_ = self.unchecked_into::(); - match self_.get(0).unchecked_into_f64() as _ { - 0 => crate::api::blockchain::BlockchainConfig::Electrum { - config: self_.get(1).cst_decode(), - }, - 1 => crate::api::blockchain::BlockchainConfig::Esplora { - config: self_.get(1).cst_decode(), - }, - 2 => crate::api::blockchain::BlockchainConfig::Rpc { - config: self_.get(1).cst_decode(), - }, - _ => unreachable!(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::error::ConsensusError { - let self_ = self.unchecked_into::(); - match self_.get(0).unchecked_into_f64() as _ { - 0 => crate::api::error::ConsensusError::Io(self_.get(1).cst_decode()), - 1 => crate::api::error::ConsensusError::OversizedVectorAllocation { - requested: self_.get(1).cst_decode(), - max: self_.get(2).cst_decode(), - }, - 2 => crate::api::error::ConsensusError::InvalidChecksum { - expected: self_.get(1).cst_decode(), - actual: self_.get(2).cst_decode(), - }, - 3 => crate::api::error::ConsensusError::NonMinimalVarInt, - 4 => crate::api::error::ConsensusError::ParseFailed(self_.get(1).cst_decode()), - 5 => { - crate::api::error::ConsensusError::UnsupportedSegwitFlag(self_.get(1).cst_decode()) - } - _ => unreachable!(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::DatabaseConfig { - let self_ = self.unchecked_into::(); - match self_.get(0).unchecked_into_f64() as _ { - 0 => crate::api::types::DatabaseConfig::Memory, - 1 => crate::api::types::DatabaseConfig::Sqlite { - config: self_.get(1).cst_decode(), - }, - 2 => crate::api::types::DatabaseConfig::Sled { - config: self_.get(1).cst_decode(), - }, - _ => unreachable!(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::error::DescriptorError { - let self_ = self.unchecked_into::(); - match self_.get(0).unchecked_into_f64() as _ { - 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 => crate::api::error::DescriptorError::Key(self_.get(1).cst_decode()), - 5 => crate::api::error::DescriptorError::Policy(self_.get(1).cst_decode()), - 6 => crate::api::error::DescriptorError::InvalidDescriptorCharacter( - self_.get(1).cst_decode(), - ), - 7 => crate::api::error::DescriptorError::Bip32(self_.get(1).cst_decode()), - 8 => crate::api::error::DescriptorError::Base58(self_.get(1).cst_decode()), - 9 => crate::api::error::DescriptorError::Pk(self_.get(1).cst_decode()), - 10 => crate::api::error::DescriptorError::Miniscript(self_.get(1).cst_decode()), - 11 => crate::api::error::DescriptorError::Hex(self_.get(1).cst_decode()), - _ => unreachable!(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::blockchain::ElectrumConfig { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 6, - "Expected 6 elements, got {}", - self_.length() - ); - crate::api::blockchain::ElectrumConfig { - url: self_.get(0).cst_decode(), - socks5: self_.get(1).cst_decode(), - retry: self_.get(2).cst_decode(), - timeout: self_.get(3).cst_decode(), - stop_gap: self_.get(4).cst_decode(), - validate_domain: self_.get(5).cst_decode(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::blockchain::EsploraConfig { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 5, - "Expected 5 elements, got {}", - self_.length() - ); - crate::api::blockchain::EsploraConfig { - base_url: self_.get(0).cst_decode(), - proxy: self_.get(1).cst_decode(), - concurrency: self_.get(2).cst_decode(), - stop_gap: self_.get(3).cst_decode(), - timeout: self_.get(4).cst_decode(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::FeeRate { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::types::FeeRate { - sat_per_vb: self_.get(0).cst_decode(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::error::HexError { - let self_ = self.unchecked_into::(); - match self_.get(0).unchecked_into_f64() as _ { - 0 => crate::api::error::HexError::InvalidChar(self_.get(1).cst_decode()), - 1 => crate::api::error::HexError::OddLengthString(self_.get(1).cst_decode()), - 2 => crate::api::error::HexError::InvalidLength( - self_.get(1).cst_decode(), - self_.get(2).cst_decode(), - ), - _ => unreachable!(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::Input { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::types::Input { - s: self_.get(0).cst_decode(), - } - } -} -impl CstDecode>> for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> Vec> { - self.dyn_into::() - .unwrap() - .iter() - .map(CstDecode::cst_decode) - .collect() - } -} -impl CstDecode> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> Vec { - self.dyn_into::() - .unwrap() - .iter() - .map(CstDecode::cst_decode) - .collect() - } -} -impl CstDecode> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> Vec { - self.dyn_into::() - .unwrap() - .iter() - .map(CstDecode::cst_decode) - .collect() - } -} -impl CstDecode> for Box<[u8]> { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> Vec { - self.into_vec() - } -} -impl CstDecode> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> Vec { - self.dyn_into::() - .unwrap() - .iter() - .map(CstDecode::cst_decode) - .collect() - } -} -impl CstDecode> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> Vec { - self.dyn_into::() - .unwrap() - .iter() - .map(CstDecode::cst_decode) - .collect() - } -} -impl CstDecode> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> Vec { - self.dyn_into::() - .unwrap() - .iter() - .map(CstDecode::cst_decode) - .collect() - } -} -impl CstDecode> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> Vec { - self.dyn_into::() - .unwrap() - .iter() - .map(CstDecode::cst_decode) - .collect() - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::LocalUtxo { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 4, - "Expected 4 elements, got {}", - self_.length() - ); - crate::api::types::LocalUtxo { - outpoint: self_.get(0).cst_decode(), - txout: self_.get(1).cst_decode(), - keychain: self_.get(2).cst_decode(), - is_spent: self_.get(3).cst_decode(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::LockTime { - let self_ = self.unchecked_into::(); - match self_.get(0).unchecked_into_f64() as _ { - 0 => crate::api::types::LockTime::Blocks(self_.get(1).cst_decode()), - 1 => crate::api::types::LockTime::Seconds(self_.get(1).cst_decode()), - _ => unreachable!(), - } - } -} -impl CstDecode> for Option { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> Option { - self.map(CstDecode::cst_decode) - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::OutPoint { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 2, - "Expected 2 elements, got {}", - self_.length() - ); - crate::api::types::OutPoint { - txid: self_.get(0).cst_decode(), - vout: self_.get(1).cst_decode(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::Payload { - let self_ = self.unchecked_into::(); - match self_.get(0).unchecked_into_f64() as _ { - 0 => crate::api::types::Payload::PubkeyHash { - pubkey_hash: self_.get(1).cst_decode(), - }, - 1 => crate::api::types::Payload::ScriptHash { - script_hash: self_.get(1).cst_decode(), - }, - 2 => crate::api::types::Payload::WitnessProgram { - version: self_.get(1).cst_decode(), - program: self_.get(2).cst_decode(), - }, - _ => unreachable!(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::PsbtSigHashType { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::types::PsbtSigHashType { - inner: self_.get(0).cst_decode(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::RbfValue { - let self_ = self.unchecked_into::(); - match self_.get(0).unchecked_into_f64() as _ { - 0 => crate::api::types::RbfValue::RbfDefault, - 1 => crate::api::types::RbfValue::Value(self_.get(1).cst_decode()), - _ => unreachable!(), - } - } -} -impl CstDecode<(crate::api::types::BdkAddress, u32)> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> (crate::api::types::BdkAddress, u32) { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 2, - "Expected 2 elements, got {}", - self_.length() - ); - (self_.get(0).cst_decode(), self_.get(1).cst_decode()) - } -} -impl - CstDecode<( - crate::api::psbt::BdkPsbt, - crate::api::types::TransactionDetails, - )> for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode( - self, - ) -> ( - crate::api::psbt::BdkPsbt, - crate::api::types::TransactionDetails, - ) { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 2, - "Expected 2 elements, got {}", - self_.length() - ); - (self_.get(0).cst_decode(), self_.get(1).cst_decode()) - } -} -impl CstDecode<(crate::api::types::OutPoint, crate::api::types::Input, usize)> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // 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 self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 3, - "Expected 3 elements, got {}", - self_.length() - ); - ( - self_.get(0).cst_decode(), - self_.get(1).cst_decode(), - self_.get(2).cst_decode(), - ) - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::blockchain::RpcConfig { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 5, - "Expected 5 elements, got {}", - self_.length() - ); - crate::api::blockchain::RpcConfig { - url: self_.get(0).cst_decode(), - auth: self_.get(1).cst_decode(), - network: self_.get(2).cst_decode(), - wallet_name: self_.get(3).cst_decode(), - sync_params: self_.get(4).cst_decode(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::blockchain::RpcSyncParams { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 4, - "Expected 4 elements, got {}", - self_.length() - ); - crate::api::blockchain::RpcSyncParams { - start_script_count: self_.get(0).cst_decode(), - start_time: self_.get(1).cst_decode(), - force_start_time: self_.get(2).cst_decode(), - poll_rate_sec: self_.get(3).cst_decode(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::ScriptAmount { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 2, - "Expected 2 elements, got {}", - self_.length() - ); - crate::api::types::ScriptAmount { - script: self_.get(0).cst_decode(), - amount: self_.get(1).cst_decode(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::SignOptions { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 8, - "Expected 8 elements, got {}", - self_.length() - ); - crate::api::types::SignOptions { - multi_sig: self_.get(0).cst_decode(), - trust_witness_utxo: self_.get(1).cst_decode(), - assume_height: self_.get(2).cst_decode(), - allow_all_sighashes: self_.get(3).cst_decode(), - remove_partial_sigs: self_.get(4).cst_decode(), - try_finalize: self_.get(5).cst_decode(), - sign_with_tap_internal_key: self_.get(6).cst_decode(), - allow_grinding: self_.get(7).cst_decode(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::SledDbConfiguration { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 2, - "Expected 2 elements, got {}", - self_.length() - ); - crate::api::types::SledDbConfiguration { - path: self_.get(0).cst_decode(), - tree_name: self_.get(1).cst_decode(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::SqliteDbConfiguration { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 1, - "Expected 1 elements, got {}", - self_.length() - ); - crate::api::types::SqliteDbConfiguration { - path: self_.get(0).cst_decode(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::TransactionDetails { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 6, - "Expected 6 elements, got {}", - self_.length() - ); - crate::api::types::TransactionDetails { - transaction: self_.get(0).cst_decode(), - txid: self_.get(1).cst_decode(), - received: self_.get(2).cst_decode(), - sent: self_.get(3).cst_decode(), - fee: self_.get(4).cst_decode(), - confirmation_time: self_.get(5).cst_decode(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::TxIn { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 4, - "Expected 4 elements, got {}", - self_.length() - ); - crate::api::types::TxIn { - previous_output: self_.get(0).cst_decode(), - script_sig: self_.get(1).cst_decode(), - sequence: self_.get(2).cst_decode(), - witness: self_.get(3).cst_decode(), - } - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::TxOut { - let self_ = self - .dyn_into::() - .unwrap(); - assert_eq!( - self_.length(), - 2, - "Expected 2 elements, got {}", - self_.length() - ); - crate::api::types::TxOut { - value: self_.get(0).cst_decode(), - script_pubkey: self_.get(1).cst_decode(), - } - } -} -impl CstDecode<[u8; 4]> for Box<[u8]> { - // 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 CstDecode> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom { - #[cfg(target_pointer_width = "64")] - { - compile_error!("64-bit pointers are not supported."); - } - unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } - } -} -impl CstDecode> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom { - #[cfg(target_pointer_width = "64")] - { - compile_error!("64-bit pointers are not supported."); - } - unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } - } -} -impl CstDecode>> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom> { - #[cfg(target_pointer_width = "64")] - { - compile_error!("64-bit pointers are not supported."); - } - unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } - } -} -impl CstDecode>>> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom>> { - #[cfg(target_pointer_width = "64")] - { - compile_error!("64-bit pointers are not supported."); - } - unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } - } -} -impl CstDecode> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom { - #[cfg(target_pointer_width = "64")] - { - compile_error!("64-bit pointers are not supported."); - } - unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } - } -} -impl CstDecode> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom { - #[cfg(target_pointer_width = "64")] - { - compile_error!("64-bit pointers are not supported."); - } - unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } - } -} -impl CstDecode> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom { - #[cfg(target_pointer_width = "64")] - { - compile_error!("64-bit pointers are not supported."); - } - unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } - } -} -impl CstDecode> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom { - #[cfg(target_pointer_width = "64")] - { - compile_error!("64-bit pointers are not supported."); - } - unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } - } -} -impl CstDecode> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom { - #[cfg(target_pointer_width = "64")] - { - compile_error!("64-bit pointers are not supported."); - } - unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } - } -} -impl CstDecode> - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom { - #[cfg(target_pointer_width = "64")] - { - compile_error!("64-bit pointers are not supported."); - } - unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } - } -} -impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> String { - self.as_string().expect("non-UTF-8 string, or not a string") - } -} -impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> bool { - self.is_truthy() - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::ChangeSpendPolicy { - (self.unchecked_into_f64() as i32).cst_decode() - } -} -impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> f32 { - self.unchecked_into_f64() as _ - } -} -impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> i32 { - self.unchecked_into_f64() as _ - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::KeychainKind { - (self.unchecked_into_f64() as i32).cst_decode() - } -} -impl CstDecode> for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> Vec { - self.unchecked_into::() - .to_vec() - .into() - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::Network { - (self.unchecked_into_f64() as i32).cst_decode() - } -} -impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> u32 { - self.unchecked_into_f64() as _ - } -} -impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> u64 { - ::std::convert::TryInto::try_into( - self.dyn_into::() - .unwrap(), - ) - .unwrap() - } -} -impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> u8 { - self.unchecked_into_f64() as _ - } -} -impl CstDecode<[u8; 4]> for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { - // 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 CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> usize { - self.unchecked_into_f64() as _ - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::Variant { - (self.unchecked_into_f64() as i32).cst_decode() - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::WitnessVersion { - (self.unchecked_into_f64() as i32).cst_decode() - } -} -impl CstDecode - for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::WordCount { - (self.unchecked_into_f64() as i32).cst_decode() - } -} - -#[wasm_bindgen] -pub fn wire_bdk_blockchain_broadcast( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - transaction: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_blockchain_broadcast_impl(port_, that, transaction) -} - -#[wasm_bindgen] -pub fn wire_bdk_blockchain_estimate_fee( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - target: u64, -) { - wire_bdk_blockchain_estimate_fee_impl(port_, that, target) -} - -#[wasm_bindgen] -pub fn wire_bdk_blockchain_get_block_hash( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - height: u32, -) { - wire_bdk_blockchain_get_block_hash_impl(port_, that, height) -} - -#[wasm_bindgen] -pub fn wire_bdk_blockchain_get_height( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_blockchain_get_height_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_bdk_blockchain_new( - port_: flutter_rust_bridge::for_generated::MessagePort, - blockchain_config: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_blockchain_new_impl(port_, blockchain_config) -} - -#[wasm_bindgen] -pub fn wire_bdk_descriptor_as_string( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_descriptor_as_string_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_bdk_descriptor_as_string_private( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_descriptor_as_string_private_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_bdk_descriptor_max_satisfaction_weight( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_descriptor_max_satisfaction_weight_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_bdk_descriptor_new( - port_: flutter_rust_bridge::for_generated::MessagePort, - descriptor: String, - network: i32, -) { - wire_bdk_descriptor_new_impl(port_, descriptor, network) -} - -#[wasm_bindgen] -pub fn wire_bdk_descriptor_new_bip44( - port_: flutter_rust_bridge::for_generated::MessagePort, - secret_key: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - keychain_kind: i32, - network: i32, -) { - wire_bdk_descriptor_new_bip44_impl(port_, secret_key, keychain_kind, network) -} - -#[wasm_bindgen] -pub fn wire_bdk_descriptor_new_bip44_public( - port_: flutter_rust_bridge::for_generated::MessagePort, - public_key: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - fingerprint: String, - keychain_kind: i32, - network: i32, -) { - wire_bdk_descriptor_new_bip44_public_impl( - port_, - public_key, - fingerprint, - keychain_kind, - network, - ) -} - -#[wasm_bindgen] -pub fn wire_bdk_descriptor_new_bip49( - port_: flutter_rust_bridge::for_generated::MessagePort, - secret_key: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - keychain_kind: i32, - network: i32, -) { - wire_bdk_descriptor_new_bip49_impl(port_, secret_key, keychain_kind, network) -} - -#[wasm_bindgen] -pub fn wire_bdk_descriptor_new_bip49_public( - port_: flutter_rust_bridge::for_generated::MessagePort, - public_key: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - fingerprint: String, - keychain_kind: i32, - network: i32, -) { - wire_bdk_descriptor_new_bip49_public_impl( - port_, - public_key, - fingerprint, - keychain_kind, - network, - ) -} - -#[wasm_bindgen] -pub fn wire_bdk_descriptor_new_bip84( - port_: flutter_rust_bridge::for_generated::MessagePort, - secret_key: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - keychain_kind: i32, - network: i32, -) { - wire_bdk_descriptor_new_bip84_impl(port_, secret_key, keychain_kind, network) -} - -#[wasm_bindgen] -pub fn wire_bdk_descriptor_new_bip84_public( - port_: flutter_rust_bridge::for_generated::MessagePort, - public_key: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - fingerprint: String, - keychain_kind: i32, - network: i32, -) { - wire_bdk_descriptor_new_bip84_public_impl( - port_, - public_key, - fingerprint, - keychain_kind, - network, - ) -} - -#[wasm_bindgen] -pub fn wire_bdk_descriptor_new_bip86( - port_: flutter_rust_bridge::for_generated::MessagePort, - secret_key: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - keychain_kind: i32, - network: i32, -) { - wire_bdk_descriptor_new_bip86_impl(port_, secret_key, keychain_kind, network) -} - -#[wasm_bindgen] -pub fn wire_bdk_descriptor_new_bip86_public( - port_: flutter_rust_bridge::for_generated::MessagePort, - public_key: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - fingerprint: String, - keychain_kind: i32, - network: i32, -) { - wire_bdk_descriptor_new_bip86_public_impl( - port_, - public_key, - fingerprint, - keychain_kind, - network, - ) -} - -#[wasm_bindgen] -pub fn wire_bdk_derivation_path_from_string( - port_: flutter_rust_bridge::for_generated::MessagePort, - path: String, -) { - wire_bdk_derivation_path_from_string_impl(port_, path) -} - -#[wasm_bindgen] -pub fn wire_bdk_descriptor_public_key_as_string( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_descriptor_public_key_as_string_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_bdk_descriptor_public_key_derive( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - path: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_descriptor_public_key_derive_impl(port_, ptr, path) -} - -#[wasm_bindgen] -pub fn wire_bdk_descriptor_public_key_extend( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - path: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_descriptor_public_key_extend_impl(port_, ptr, path) -} - -#[wasm_bindgen] -pub fn wire_bdk_descriptor_public_key_from_string( - port_: flutter_rust_bridge::for_generated::MessagePort, - public_key: String, -) { - wire_bdk_descriptor_public_key_from_string_impl(port_, public_key) -} - -#[wasm_bindgen] -pub fn wire_bdk_descriptor_secret_key_as_public( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_descriptor_secret_key_as_public_impl(port_, ptr) -} - -#[wasm_bindgen] -pub fn wire_bdk_descriptor_secret_key_as_string( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_descriptor_secret_key_as_string_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_bdk_descriptor_secret_key_create( - port_: flutter_rust_bridge::for_generated::MessagePort, - network: i32, - mnemonic: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - password: Option, -) { - wire_bdk_descriptor_secret_key_create_impl(port_, network, mnemonic, password) -} - -#[wasm_bindgen] -pub fn wire_bdk_descriptor_secret_key_derive( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - path: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_descriptor_secret_key_derive_impl(port_, ptr, path) -} - -#[wasm_bindgen] -pub fn wire_bdk_descriptor_secret_key_extend( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - path: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_descriptor_secret_key_extend_impl(port_, ptr, path) -} - -#[wasm_bindgen] -pub fn wire_bdk_descriptor_secret_key_from_string( - port_: flutter_rust_bridge::for_generated::MessagePort, - secret_key: String, -) { - wire_bdk_descriptor_secret_key_from_string_impl(port_, secret_key) -} - -#[wasm_bindgen] -pub fn wire_bdk_descriptor_secret_key_secret_bytes( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_descriptor_secret_key_secret_bytes_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_bdk_mnemonic_as_string( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_mnemonic_as_string_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_bdk_mnemonic_from_entropy( - port_: flutter_rust_bridge::for_generated::MessagePort, - entropy: Box<[u8]>, -) { - wire_bdk_mnemonic_from_entropy_impl(port_, entropy) -} - -#[wasm_bindgen] -pub fn wire_bdk_mnemonic_from_string( - port_: flutter_rust_bridge::for_generated::MessagePort, - mnemonic: String, -) { - wire_bdk_mnemonic_from_string_impl(port_, mnemonic) -} - -#[wasm_bindgen] -pub fn wire_bdk_mnemonic_new( - port_: flutter_rust_bridge::for_generated::MessagePort, - word_count: i32, -) { - wire_bdk_mnemonic_new_impl(port_, word_count) -} - -#[wasm_bindgen] -pub fn wire_bdk_psbt_combine( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - other: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_psbt_combine_impl(port_, ptr, other) -} - -#[wasm_bindgen] -pub fn wire_bdk_psbt_extract_tx( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_psbt_extract_tx_impl(port_, ptr) -} - -#[wasm_bindgen] -pub fn wire_bdk_psbt_fee_amount( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_psbt_fee_amount_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_bdk_psbt_fee_rate( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_psbt_fee_rate_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_bdk_psbt_from_str( - port_: flutter_rust_bridge::for_generated::MessagePort, - psbt_base64: String, -) { - wire_bdk_psbt_from_str_impl(port_, psbt_base64) -} - -#[wasm_bindgen] -pub fn wire_bdk_psbt_json_serialize( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_psbt_json_serialize_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_bdk_psbt_serialize( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_psbt_serialize_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_bdk_psbt_txid( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_psbt_txid_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_bdk_address_as_string( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_address_as_string_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_bdk_address_from_script( - port_: flutter_rust_bridge::for_generated::MessagePort, - script: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - network: i32, -) { - wire_bdk_address_from_script_impl(port_, script, network) -} - -#[wasm_bindgen] -pub fn wire_bdk_address_from_string( - port_: flutter_rust_bridge::for_generated::MessagePort, - address: String, - network: i32, -) { - wire_bdk_address_from_string_impl(port_, address, network) -} - -#[wasm_bindgen] -pub fn wire_bdk_address_is_valid_for_network( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - network: i32, -) { - wire_bdk_address_is_valid_for_network_impl(port_, that, network) -} - -#[wasm_bindgen] -pub fn wire_bdk_address_network( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_address_network_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_bdk_address_payload( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_address_payload_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_bdk_address_script( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_address_script_impl(port_, ptr) -} - -#[wasm_bindgen] -pub fn wire_bdk_address_to_qr_uri( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_address_to_qr_uri_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_bdk_script_buf_empty(port_: flutter_rust_bridge::for_generated::MessagePort) { - wire_bdk_script_buf_empty_impl(port_) -} - -#[wasm_bindgen] -pub fn wire_bdk_script_buf_from_hex( - port_: flutter_rust_bridge::for_generated::MessagePort, - s: String, -) { - wire_bdk_script_buf_from_hex_impl(port_, s) -} - -#[wasm_bindgen] -pub fn wire_bdk_script_buf_with_capacity( - port_: flutter_rust_bridge::for_generated::MessagePort, - capacity: usize, -) { - wire_bdk_script_buf_with_capacity_impl(port_, capacity) -} - -#[wasm_bindgen] -pub fn wire_bdk_transaction_from_bytes( - port_: flutter_rust_bridge::for_generated::MessagePort, - transaction_bytes: Box<[u8]>, -) { - wire_bdk_transaction_from_bytes_impl(port_, transaction_bytes) -} - -#[wasm_bindgen] -pub fn wire_bdk_transaction_input( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_transaction_input_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_bdk_transaction_is_coin_base( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_transaction_is_coin_base_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_bdk_transaction_is_explicitly_rbf( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_transaction_is_explicitly_rbf_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_bdk_transaction_is_lock_time_enabled( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_transaction_is_lock_time_enabled_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_bdk_transaction_lock_time( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_transaction_lock_time_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_bdk_transaction_new( - port_: flutter_rust_bridge::for_generated::MessagePort, - version: i32, - lock_time: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - input: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - output: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_transaction_new_impl(port_, version, lock_time, input, output) -} - -#[wasm_bindgen] -pub fn wire_bdk_transaction_output( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_transaction_output_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_bdk_transaction_serialize( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_transaction_serialize_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_bdk_transaction_size( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_transaction_size_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_bdk_transaction_txid( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_transaction_txid_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_bdk_transaction_version( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_transaction_version_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_bdk_transaction_vsize( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_transaction_vsize_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_bdk_transaction_weight( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_transaction_weight_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_bdk_wallet_get_address( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - address_index: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_wallet_get_address_impl(port_, ptr, address_index) -} - -#[wasm_bindgen] -pub fn wire_bdk_wallet_get_balance( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_wallet_get_balance_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_bdk_wallet_get_descriptor_for_keychain( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - keychain: i32, -) { - wire_bdk_wallet_get_descriptor_for_keychain_impl(port_, ptr, keychain) -} - -#[wasm_bindgen] -pub fn wire_bdk_wallet_get_internal_address( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - address_index: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_wallet_get_internal_address_impl(port_, ptr, address_index) -} - -#[wasm_bindgen] -pub fn wire_bdk_wallet_get_psbt_input( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - utxo: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - only_witness_utxo: bool, - sighash_type: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_wallet_get_psbt_input_impl(port_, that, utxo, only_witness_utxo, sighash_type) -} - -#[wasm_bindgen] -pub fn wire_bdk_wallet_is_mine( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - script: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_wallet_is_mine_impl(port_, that, script) -} - -#[wasm_bindgen] -pub fn wire_bdk_wallet_list_transactions( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - include_raw: bool, -) { - wire_bdk_wallet_list_transactions_impl(port_, that, include_raw) -} - -#[wasm_bindgen] -pub fn wire_bdk_wallet_list_unspent( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_wallet_list_unspent_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_bdk_wallet_network( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_wallet_network_impl(port_, that) -} - -#[wasm_bindgen] -pub fn wire_bdk_wallet_new( - port_: flutter_rust_bridge::for_generated::MessagePort, - descriptor: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - change_descriptor: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - network: i32, - database_config: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_wallet_new_impl( - port_, - descriptor, - change_descriptor, - network, - database_config, - ) -} - -#[wasm_bindgen] -pub fn wire_bdk_wallet_sign( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - psbt: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - sign_options: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_wallet_sign_impl(port_, ptr, psbt, sign_options) -} - -#[wasm_bindgen] -pub fn wire_bdk_wallet_sync( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - blockchain: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_bdk_wallet_sync_impl(port_, ptr, blockchain) -} - -#[wasm_bindgen] -pub fn wire_finish_bump_fee_tx_builder( - port_: flutter_rust_bridge::for_generated::MessagePort, - txid: String, - fee_rate: f32, - allow_shrinking: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - wallet: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - enable_rbf: bool, - n_sequence: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, -) { - wire_finish_bump_fee_tx_builder_impl( - port_, - txid, - fee_rate, - allow_shrinking, - wallet, - enable_rbf, - n_sequence, - ) -} - -#[wasm_bindgen] -pub fn wire_tx_builder_finish( - port_: flutter_rust_bridge::for_generated::MessagePort, - wallet: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - recipients: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - utxos: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - foreign_utxo: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - un_spendable: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - change_policy: i32, - manually_selected_only: bool, - fee_rate: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - fee_absolute: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - drain_wallet: bool, - drain_to: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - rbf: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, - data: Box<[u8]>, -) { - wire_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, - data, - ) -} - -#[wasm_bindgen] -pub fn rust_arc_increment_strong_count_RustOpaque_AnyBlockchain(ptr: *const std::ffi::c_void) { - unsafe { - StdArc::::increment_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_decrement_strong_count_RustOpaque_AnyBlockchain(ptr: *const std::ffi::c_void) { - unsafe { - StdArc::::decrement_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_increment_strong_count_RustOpaque_ExtendedDescriptor(ptr: *const std::ffi::c_void) { - unsafe { - StdArc::::increment_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_decrement_strong_count_RustOpaque_ExtendedDescriptor(ptr: *const std::ffi::c_void) { - unsafe { - StdArc::::decrement_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_increment_strong_count_RustOpaque_MutexPartiallySignedTransaction( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::increment_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_decrement_strong_count_RustOpaque_MutexPartiallySignedTransaction( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::decrement_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_increment_strong_count_RustOpaque_MutexbdkWalletAnyDatabase( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>>::increment_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_decrement_strong_count_RustOpaque_MutexbdkWalletAnyDatabase( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>>::decrement_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddress(ptr: *const std::ffi::c_void) { - unsafe { - StdArc::::increment_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress(ptr: *const std::ffi::c_void) { - unsafe { - StdArc::::decrement_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_increment_strong_count_RustOpaque_bitcoinbip32DerivationPath( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::::increment_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_decrement_strong_count_RustOpaque_bitcoinbip32DerivationPath( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::::decrement_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_increment_strong_count_RustOpaque_keysDescriptorPublicKey( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::::increment_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_decrement_strong_count_RustOpaque_keysDescriptorPublicKey( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::::decrement_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_increment_strong_count_RustOpaque_keysDescriptorSecretKey( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::::increment_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_decrement_strong_count_RustOpaque_keysDescriptorSecretKey( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::::decrement_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_increment_strong_count_RustOpaque_keysKeyMap(ptr: *const std::ffi::c_void) { - unsafe { - StdArc::::increment_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_decrement_strong_count_RustOpaque_keysKeyMap(ptr: *const std::ffi::c_void) { - unsafe { - StdArc::::decrement_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_increment_strong_count_RustOpaque_keysbip39Mnemonic(ptr: *const std::ffi::c_void) { - unsafe { - StdArc::::increment_strong_count(ptr as _); - } -} - -#[wasm_bindgen] -pub fn rust_arc_decrement_strong_count_RustOpaque_keysbip39Mnemonic(ptr: *const std::ffi::c_void) { - unsafe { - StdArc::::decrement_strong_count(ptr as _); - } -} 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 82fe0832..00000000 --- a/test/bdk_flutter_test.dart +++ /dev/null @@ -1,348 +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 = - await mockWallet.getAddress(addressIndex: AddressIndex.increase()); - expect(res, isA()); - }); - - test('Should return valid Balance object', () async { - final res = await mockWallet.getBalance(); - expect(res, isA()); - }); - test('Should return Network enum', () async { - final res = await mockWallet.network(); - expect(res, isA()); - }); - test('Should return list of LocalUtxo object', () async { - final res = await 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) async => List.empty()); - final res = await mockWallet.listTransactions(includeRaw: true); - expect(res, isA>()); - expect(res, List.empty()); - }); - test('verify function call order', () async { - await mockWallet.sync(blockchain: mockBlockchain); - await mockWallet.listTransactions(includeRaw: true); - verifyInOrder([ - await mockWallet.sync(blockchain: mockBlockchain), - await mockWallet.listTransactions(includeRaw: true) - ]); - }); - }); - group('DescriptorSecret', () { - final mockSDescriptorSecret = MockDescriptorSecretKey(); - - test('verify asPublic()', () async { - final res = await mockSDescriptorSecret.asPublic(); - 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((_) async => Future.value(mockScript)); - when(mockTxBuilder.addRecipient(mockScript, any)) - .thenReturn(mockTxBuilder); - when(mockTxBuilder.addForeignUtxo(input, outPoint, 0)) - .thenReturn(mockTxBuilder); - when(mockTxBuilder.finish(mockWallet)).thenAnswer((_) async => - Future.value( - (MockPartiallySignedTransaction(), MockTransactionDetails()))); - final script = await mockAddress.scriptPubkey(); - final txBuilder = mockTxBuilder - .addRecipient(script, 1200) - .addForeignUtxo(input, outPoint, 0); - 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((_) async => MockScriptBuf()); - when(mockTxBuilder.addRecipient(mockScript, any)) - .thenReturn(mockTxBuilder); - - when(mockAddress.scriptPubkey()) - .thenAnswer((_) async => Future.value(mockScript)); - when(mockTxBuilder.finish(mockWallet)).thenAnswer( - (_) async => Future.value((psbt, MockTransactionDetails()))); - final script = await mockAddress.scriptPubkey(); - final txBuilder = mockTxBuilder.addRecipient(script, 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()', () async { - final res = await mockAddress.network(); - expect(res, isA()); - }); - test('verify payload()', () async { - final res = await mockAddress.network(); - expect(res, isA()); - }); - test('verify scriptPubKey()', () async { - final res = await mockAddress.scriptPubkey(); - expect(res, isA()); - }); - }); - group('Script', () { - test('verify create', () async { - 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 c7704028..00000000 --- a/test/bdk_flutter_test.mocks.dart +++ /dev/null @@ -1,2190 +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 _i9; -import 'dart:typed_data' as _i11; - -import 'package:bdk_flutter/src/generated/api/blockchain.dart' as _i5; -import 'package:bdk_flutter/src/generated/api/descriptor.dart' as _i6; -import 'package:bdk_flutter/src/generated/api/key.dart' as _i8; -import 'package:bdk_flutter/src/generated/api/psbt.dart' as _i7; -import 'package:bdk_flutter/src/generated/api/types.dart' as _i4; -import 'package:bdk_flutter/src/generated/api/wallet.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 _i10; - -// 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 _FakeMutexBdkWalletAnyDatabase_0 extends _i1.SmartFake - implements _i2.MutexBdkWalletAnyDatabase { - _FakeMutexBdkWalletAnyDatabase_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 _i5.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 _FakeKeysDescriptorSecretKey_7 extends _i1.SmartFake - implements _i6.KeysDescriptorSecretKey { - _FakeKeysDescriptorSecretKey_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 _FakeKeysDescriptorPublicKey_10 extends _i1.SmartFake - implements _i6.KeysDescriptorPublicKey { - _FakeKeysDescriptorPublicKey_10( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeMutexPartiallySignedTransaction_11 extends _i1.SmartFake - implements _i7.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 _i4.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 _FakeBdkBitcoinAddress_17 extends _i1.SmartFake - implements _i4.BdkBitcoinAddress { - _FakeBdkBitcoinAddress_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 _FakeBitcoinBip32DerivationPath_19 extends _i1.SmartFake - implements _i8.BitcoinBip32DerivationPath { - _FakeBitcoinBip32DerivationPath_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.MutexBdkWalletAnyDatabase get ptr => (super.noSuchMethod( - Invocation.getter(#ptr), - returnValue: _FakeMutexBdkWalletAnyDatabase_0( - this, - Invocation.getter(#ptr), - ), - returnValueForMissingStub: _FakeMutexBdkWalletAnyDatabase_0( - this, - Invocation.getter(#ptr), - ), - ) as _i2.MutexBdkWalletAnyDatabase); - - @override - _i9.Future<_i3.AddressInfo> getAddress({ - required _i4.AddressIndex? addressIndex, - dynamic hint, - }) => - (super.noSuchMethod( - Invocation.method( - #getAddress, - [], - { - #addressIndex: addressIndex, - #hint: hint, - }, - ), - returnValue: _i9.Future<_i3.AddressInfo>.value(_FakeAddressInfo_1( - this, - Invocation.method( - #getAddress, - [], - { - #addressIndex: addressIndex, - #hint: hint, - }, - ), - )), - returnValueForMissingStub: - _i9.Future<_i3.AddressInfo>.value(_FakeAddressInfo_1( - this, - Invocation.method( - #getAddress, - [], - { - #addressIndex: addressIndex, - #hint: hint, - }, - ), - )), - ) as _i9.Future<_i3.AddressInfo>); - - @override - _i9.Future<_i4.Balance> getBalance({dynamic hint}) => (super.noSuchMethod( - Invocation.method( - #getBalance, - [], - {#hint: hint}, - ), - returnValue: _i9.Future<_i4.Balance>.value(_FakeBalance_2( - this, - Invocation.method( - #getBalance, - [], - {#hint: hint}, - ), - )), - returnValueForMissingStub: _i9.Future<_i4.Balance>.value(_FakeBalance_2( - this, - Invocation.method( - #getBalance, - [], - {#hint: hint}, - ), - )), - ) as _i9.Future<_i4.Balance>); - - @override - _i9.Future<_i3.Descriptor> getDescriptorForKeychain({ - required _i4.KeychainKind? keychain, - dynamic hint, - }) => - (super.noSuchMethod( - Invocation.method( - #getDescriptorForKeychain, - [], - { - #keychain: keychain, - #hint: hint, - }, - ), - returnValue: _i9.Future<_i3.Descriptor>.value(_FakeDescriptor_3( - this, - Invocation.method( - #getDescriptorForKeychain, - [], - { - #keychain: keychain, - #hint: hint, - }, - ), - )), - returnValueForMissingStub: - _i9.Future<_i3.Descriptor>.value(_FakeDescriptor_3( - this, - Invocation.method( - #getDescriptorForKeychain, - [], - { - #keychain: keychain, - #hint: hint, - }, - ), - )), - ) as _i9.Future<_i3.Descriptor>); - - @override - _i9.Future<_i3.AddressInfo> getInternalAddress({ - required _i4.AddressIndex? addressIndex, - dynamic hint, - }) => - (super.noSuchMethod( - Invocation.method( - #getInternalAddress, - [], - { - #addressIndex: addressIndex, - #hint: hint, - }, - ), - returnValue: _i9.Future<_i3.AddressInfo>.value(_FakeAddressInfo_1( - this, - Invocation.method( - #getInternalAddress, - [], - { - #addressIndex: addressIndex, - #hint: hint, - }, - ), - )), - returnValueForMissingStub: - _i9.Future<_i3.AddressInfo>.value(_FakeAddressInfo_1( - this, - Invocation.method( - #getInternalAddress, - [], - { - #addressIndex: addressIndex, - #hint: hint, - }, - ), - )), - ) as _i9.Future<_i3.AddressInfo>); - - @override - _i9.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: _i9.Future<_i4.Input>.value(_FakeInput_4( - this, - Invocation.method( - #getPsbtInput, - [], - { - #utxo: utxo, - #onlyWitnessUtxo: onlyWitnessUtxo, - #sighashType: sighashType, - #hint: hint, - }, - ), - )), - returnValueForMissingStub: _i9.Future<_i4.Input>.value(_FakeInput_4( - this, - Invocation.method( - #getPsbtInput, - [], - { - #utxo: utxo, - #onlyWitnessUtxo: onlyWitnessUtxo, - #sighashType: sighashType, - #hint: hint, - }, - ), - )), - ) as _i9.Future<_i4.Input>); - - @override - _i9.Future isMine({ - required _i4.BdkScriptBuf? script, - dynamic hint, - }) => - (super.noSuchMethod( - Invocation.method( - #isMine, - [], - { - #script: script, - #hint: hint, - }, - ), - returnValue: _i9.Future.value(false), - returnValueForMissingStub: _i9.Future.value(false), - ) as _i9.Future); - - @override - _i9.Future> listTransactions({ - required bool? includeRaw, - dynamic hint, - }) => - (super.noSuchMethod( - Invocation.method( - #listTransactions, - [], - { - #includeRaw: includeRaw, - #hint: hint, - }, - ), - returnValue: _i9.Future>.value( - <_i4.TransactionDetails>[]), - returnValueForMissingStub: - _i9.Future>.value( - <_i4.TransactionDetails>[]), - ) as _i9.Future>); - - @override - _i9.Future> listUnspent({dynamic hint}) => - (super.noSuchMethod( - Invocation.method( - #listUnspent, - [], - {#hint: hint}, - ), - returnValue: _i9.Future>.value(<_i4.LocalUtxo>[]), - returnValueForMissingStub: - _i9.Future>.value(<_i4.LocalUtxo>[]), - ) as _i9.Future>); - - @override - _i9.Future<_i4.Network> network({dynamic hint}) => (super.noSuchMethod( - Invocation.method( - #network, - [], - {#hint: hint}, - ), - returnValue: _i9.Future<_i4.Network>.value(_i4.Network.testnet), - returnValueForMissingStub: - _i9.Future<_i4.Network>.value(_i4.Network.testnet), - ) as _i9.Future<_i4.Network>); - - @override - _i9.Future sign({ - required _i3.PartiallySignedTransaction? psbt, - _i4.SignOptions? signOptions, - dynamic hint, - }) => - (super.noSuchMethod( - Invocation.method( - #sign, - [], - { - #psbt: psbt, - #signOptions: signOptions, - #hint: hint, - }, - ), - returnValue: _i9.Future.value(false), - returnValueForMissingStub: _i9.Future.value(false), - ) as _i9.Future); - - @override - _i9.Future sync({ - required _i3.Blockchain? blockchain, - dynamic hint, - }) => - (super.noSuchMethod( - Invocation.method( - #sync, - [], - { - #blockchain: blockchain, - #hint: hint, - }, - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); -} - -/// 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 inner => (super.noSuchMethod( - Invocation.getter(#inner), - returnValue: _i10.dummyValue( - this, - Invocation.getter(#inner), - ), - returnValueForMissingStub: _i10.dummyValue( - this, - Invocation.getter(#inner), - ), - ) as String); - - @override - _i9.Future> input({dynamic hint}) => (super.noSuchMethod( - Invocation.method( - #input, - [], - {#hint: hint}, - ), - returnValue: _i9.Future>.value(<_i4.TxIn>[]), - returnValueForMissingStub: - _i9.Future>.value(<_i4.TxIn>[]), - ) as _i9.Future>); - - @override - _i9.Future isCoinBase({dynamic hint}) => (super.noSuchMethod( - Invocation.method( - #isCoinBase, - [], - {#hint: hint}, - ), - returnValue: _i9.Future.value(false), - returnValueForMissingStub: _i9.Future.value(false), - ) as _i9.Future); - - @override - _i9.Future isExplicitlyRbf({dynamic hint}) => (super.noSuchMethod( - Invocation.method( - #isExplicitlyRbf, - [], - {#hint: hint}, - ), - returnValue: _i9.Future.value(false), - returnValueForMissingStub: _i9.Future.value(false), - ) as _i9.Future); - - @override - _i9.Future isLockTimeEnabled({dynamic hint}) => (super.noSuchMethod( - Invocation.method( - #isLockTimeEnabled, - [], - {#hint: hint}, - ), - returnValue: _i9.Future.value(false), - returnValueForMissingStub: _i9.Future.value(false), - ) as _i9.Future); - - @override - _i9.Future<_i4.LockTime> lockTime({dynamic hint}) => (super.noSuchMethod( - Invocation.method( - #lockTime, - [], - {#hint: hint}, - ), - returnValue: - _i9.Future<_i4.LockTime>.value(_i10.dummyValue<_i4.LockTime>( - this, - Invocation.method( - #lockTime, - [], - {#hint: hint}, - ), - )), - returnValueForMissingStub: - _i9.Future<_i4.LockTime>.value(_i10.dummyValue<_i4.LockTime>( - this, - Invocation.method( - #lockTime, - [], - {#hint: hint}, - ), - )), - ) as _i9.Future<_i4.LockTime>); - - @override - _i9.Future> output({dynamic hint}) => (super.noSuchMethod( - Invocation.method( - #output, - [], - {#hint: hint}, - ), - returnValue: _i9.Future>.value(<_i4.TxOut>[]), - returnValueForMissingStub: - _i9.Future>.value(<_i4.TxOut>[]), - ) as _i9.Future>); - - @override - _i9.Future<_i11.Uint8List> serialize({dynamic hint}) => (super.noSuchMethod( - Invocation.method( - #serialize, - [], - {#hint: hint}, - ), - returnValue: _i9.Future<_i11.Uint8List>.value(_i11.Uint8List(0)), - returnValueForMissingStub: - _i9.Future<_i11.Uint8List>.value(_i11.Uint8List(0)), - ) as _i9.Future<_i11.Uint8List>); - - @override - _i9.Future size({dynamic hint}) => (super.noSuchMethod( - Invocation.method( - #size, - [], - {#hint: hint}, - ), - returnValue: _i9.Future.value(0), - returnValueForMissingStub: _i9.Future.value(0), - ) as _i9.Future); - - @override - _i9.Future txid({dynamic hint}) => (super.noSuchMethod( - Invocation.method( - #txid, - [], - {#hint: hint}, - ), - returnValue: _i9.Future.value(_i10.dummyValue( - this, - Invocation.method( - #txid, - [], - {#hint: hint}, - ), - )), - returnValueForMissingStub: - _i9.Future.value(_i10.dummyValue( - this, - Invocation.method( - #txid, - [], - {#hint: hint}, - ), - )), - ) as _i9.Future); - - @override - _i9.Future version({dynamic hint}) => (super.noSuchMethod( - Invocation.method( - #version, - [], - {#hint: hint}, - ), - returnValue: _i9.Future.value(0), - returnValueForMissingStub: _i9.Future.value(0), - ) as _i9.Future); - - @override - _i9.Future vsize({dynamic hint}) => (super.noSuchMethod( - Invocation.method( - #vsize, - [], - {#hint: hint}, - ), - returnValue: _i9.Future.value(0), - returnValueForMissingStub: _i9.Future.value(0), - ) as _i9.Future); - - @override - _i9.Future weight({dynamic hint}) => (super.noSuchMethod( - Invocation.method( - #weight, - [], - {#hint: hint}, - ), - returnValue: _i9.Future.value(0), - returnValueForMissingStub: _i9.Future.value(0), - ) as _i9.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 - _i5.AnyBlockchain get ptr => (super.noSuchMethod( - Invocation.getter(#ptr), - returnValue: _FakeAnyBlockchain_5( - this, - Invocation.getter(#ptr), - ), - returnValueForMissingStub: _FakeAnyBlockchain_5( - this, - Invocation.getter(#ptr), - ), - ) as _i5.AnyBlockchain); - - @override - _i9.Future<_i4.FeeRate> estimateFee({ - required int? target, - dynamic hint, - }) => - (super.noSuchMethod( - Invocation.method( - #estimateFee, - [], - { - #target: target, - #hint: hint, - }, - ), - returnValue: _i9.Future<_i4.FeeRate>.value(_FakeFeeRate_6( - this, - Invocation.method( - #estimateFee, - [], - { - #target: target, - #hint: hint, - }, - ), - )), - returnValueForMissingStub: _i9.Future<_i4.FeeRate>.value(_FakeFeeRate_6( - this, - Invocation.method( - #estimateFee, - [], - { - #target: target, - #hint: hint, - }, - ), - )), - ) as _i9.Future<_i4.FeeRate>); - - @override - _i9.Future broadcast({ - required _i4.BdkTransaction? transaction, - dynamic hint, - }) => - (super.noSuchMethod( - Invocation.method( - #broadcast, - [], - { - #transaction: transaction, - #hint: hint, - }, - ), - returnValue: _i9.Future.value(_i10.dummyValue( - this, - Invocation.method( - #broadcast, - [], - { - #transaction: transaction, - #hint: hint, - }, - ), - )), - returnValueForMissingStub: - _i9.Future.value(_i10.dummyValue( - this, - Invocation.method( - #broadcast, - [], - { - #transaction: transaction, - #hint: hint, - }, - ), - )), - ) as _i9.Future); - - @override - _i9.Future getBlockHash({ - required int? height, - dynamic hint, - }) => - (super.noSuchMethod( - Invocation.method( - #getBlockHash, - [], - { - #height: height, - #hint: hint, - }, - ), - returnValue: _i9.Future.value(_i10.dummyValue( - this, - Invocation.method( - #getBlockHash, - [], - { - #height: height, - #hint: hint, - }, - ), - )), - returnValueForMissingStub: - _i9.Future.value(_i10.dummyValue( - this, - Invocation.method( - #getBlockHash, - [], - { - #height: height, - #hint: hint, - }, - ), - )), - ) as _i9.Future); - - @override - _i9.Future getHeight({dynamic hint}) => (super.noSuchMethod( - Invocation.method( - #getHeight, - [], - {#hint: hint}, - ), - returnValue: _i9.Future.value(0), - returnValueForMissingStub: _i9.Future.value(0), - ) as _i9.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 - _i6.KeysDescriptorSecretKey get ptr => (super.noSuchMethod( - Invocation.getter(#ptr), - returnValue: _FakeKeysDescriptorSecretKey_7( - this, - Invocation.getter(#ptr), - ), - returnValueForMissingStub: _FakeKeysDescriptorSecretKey_7( - this, - Invocation.getter(#ptr), - ), - ) as _i6.KeysDescriptorSecretKey); - - @override - _i9.Future<_i3.DescriptorSecretKey> derive(_i8.BdkDerivationPath? path) => - (super.noSuchMethod( - Invocation.method( - #derive, - [path], - ), - returnValue: _i9.Future<_i3.DescriptorSecretKey>.value( - _FakeDescriptorSecretKey_8( - this, - Invocation.method( - #derive, - [path], - ), - )), - returnValueForMissingStub: _i9.Future<_i3.DescriptorSecretKey>.value( - _FakeDescriptorSecretKey_8( - this, - Invocation.method( - #derive, - [path], - ), - )), - ) as _i9.Future<_i3.DescriptorSecretKey>); - - @override - _i9.Future<_i3.DescriptorSecretKey> extend(_i8.BdkDerivationPath? path) => - (super.noSuchMethod( - Invocation.method( - #extend, - [path], - ), - returnValue: _i9.Future<_i3.DescriptorSecretKey>.value( - _FakeDescriptorSecretKey_8( - this, - Invocation.method( - #extend, - [path], - ), - )), - returnValueForMissingStub: _i9.Future<_i3.DescriptorSecretKey>.value( - _FakeDescriptorSecretKey_8( - this, - Invocation.method( - #extend, - [path], - ), - )), - ) as _i9.Future<_i3.DescriptorSecretKey>); - - @override - _i9.Future<_i3.DescriptorPublicKey> asPublic() => (super.noSuchMethod( - Invocation.method( - #asPublic, - [], - ), - returnValue: _i9.Future<_i3.DescriptorPublicKey>.value( - _FakeDescriptorPublicKey_9( - this, - Invocation.method( - #asPublic, - [], - ), - )), - returnValueForMissingStub: _i9.Future<_i3.DescriptorPublicKey>.value( - _FakeDescriptorPublicKey_9( - this, - Invocation.method( - #asPublic, - [], - ), - )), - ) as _i9.Future<_i3.DescriptorPublicKey>); - - @override - _i9.Future asString({dynamic hint}) => (super.noSuchMethod( - Invocation.method( - #asString, - [], - {#hint: hint}, - ), - returnValue: _i9.Future.value(_i10.dummyValue( - this, - Invocation.method( - #asString, - [], - {#hint: hint}, - ), - )), - returnValueForMissingStub: - _i9.Future.value(_i10.dummyValue( - this, - Invocation.method( - #asString, - [], - {#hint: hint}, - ), - )), - ) as _i9.Future); - - @override - _i9.Future<_i11.Uint8List> secretBytes({dynamic hint}) => (super.noSuchMethod( - Invocation.method( - #secretBytes, - [], - {#hint: hint}, - ), - returnValue: _i9.Future<_i11.Uint8List>.value(_i11.Uint8List(0)), - returnValueForMissingStub: - _i9.Future<_i11.Uint8List>.value(_i11.Uint8List(0)), - ) as _i9.Future<_i11.Uint8List>); -} - -/// 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 - _i6.KeysDescriptorPublicKey get ptr => (super.noSuchMethod( - Invocation.getter(#ptr), - returnValue: _FakeKeysDescriptorPublicKey_10( - this, - Invocation.getter(#ptr), - ), - returnValueForMissingStub: _FakeKeysDescriptorPublicKey_10( - this, - Invocation.getter(#ptr), - ), - ) as _i6.KeysDescriptorPublicKey); - - @override - _i9.Future asString({dynamic hint}) => (super.noSuchMethod( - Invocation.method( - #asString, - [], - {#hint: hint}, - ), - returnValue: _i9.Future.value(_i10.dummyValue( - this, - Invocation.method( - #asString, - [], - {#hint: hint}, - ), - )), - returnValueForMissingStub: - _i9.Future.value(_i10.dummyValue( - this, - Invocation.method( - #asString, - [], - {#hint: hint}, - ), - )), - ) as _i9.Future); - - @override - _i9.Future<_i3.DescriptorPublicKey> derive({ - required _i8.BdkDerivationPath? path, - dynamic hint, - }) => - (super.noSuchMethod( - Invocation.method( - #derive, - [], - { - #path: path, - #hint: hint, - }, - ), - returnValue: _i9.Future<_i3.DescriptorPublicKey>.value( - _FakeDescriptorPublicKey_9( - this, - Invocation.method( - #derive, - [], - { - #path: path, - #hint: hint, - }, - ), - )), - returnValueForMissingStub: _i9.Future<_i3.DescriptorPublicKey>.value( - _FakeDescriptorPublicKey_9( - this, - Invocation.method( - #derive, - [], - { - #path: path, - #hint: hint, - }, - ), - )), - ) as _i9.Future<_i3.DescriptorPublicKey>); - - @override - _i9.Future<_i3.DescriptorPublicKey> extend({ - required _i8.BdkDerivationPath? path, - dynamic hint, - }) => - (super.noSuchMethod( - Invocation.method( - #extend, - [], - { - #path: path, - #hint: hint, - }, - ), - returnValue: _i9.Future<_i3.DescriptorPublicKey>.value( - _FakeDescriptorPublicKey_9( - this, - Invocation.method( - #extend, - [], - { - #path: path, - #hint: hint, - }, - ), - )), - returnValueForMissingStub: _i9.Future<_i3.DescriptorPublicKey>.value( - _FakeDescriptorPublicKey_9( - this, - Invocation.method( - #extend, - [], - { - #path: path, - #hint: hint, - }, - ), - )), - ) as _i9.Future<_i3.DescriptorPublicKey>); -} - -/// 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 - _i7.MutexPartiallySignedTransaction get ptr => (super.noSuchMethod( - Invocation.getter(#ptr), - returnValue: _FakeMutexPartiallySignedTransaction_11( - this, - Invocation.getter(#ptr), - ), - returnValueForMissingStub: _FakeMutexPartiallySignedTransaction_11( - this, - Invocation.getter(#ptr), - ), - ) as _i7.MutexPartiallySignedTransaction); - - @override - _i9.Future feeAmount({dynamic hint}) => (super.noSuchMethod( - Invocation.method( - #feeAmount, - [], - {#hint: hint}, - ), - returnValue: _i9.Future.value(), - returnValueForMissingStub: _i9.Future.value(), - ) as _i9.Future); - - @override - _i9.Future<_i4.FeeRate?> feeRate({dynamic hint}) => (super.noSuchMethod( - Invocation.method( - #feeRate, - [], - {#hint: hint}, - ), - returnValue: _i9.Future<_i4.FeeRate?>.value(), - returnValueForMissingStub: _i9.Future<_i4.FeeRate?>.value(), - ) as _i9.Future<_i4.FeeRate?>); - - @override - _i9.Future jsonSerialize({dynamic hint}) => (super.noSuchMethod( - Invocation.method( - #jsonSerialize, - [], - {#hint: hint}, - ), - returnValue: _i9.Future.value(_i10.dummyValue( - this, - Invocation.method( - #jsonSerialize, - [], - {#hint: hint}, - ), - )), - returnValueForMissingStub: - _i9.Future.value(_i10.dummyValue( - this, - Invocation.method( - #jsonSerialize, - [], - {#hint: hint}, - ), - )), - ) as _i9.Future); - - @override - _i9.Future serialize({dynamic hint}) => (super.noSuchMethod( - Invocation.method( - #serialize, - [], - {#hint: hint}, - ), - returnValue: _i9.Future.value(_i10.dummyValue( - this, - Invocation.method( - #serialize, - [], - {#hint: hint}, - ), - )), - returnValueForMissingStub: - _i9.Future.value(_i10.dummyValue( - this, - Invocation.method( - #serialize, - [], - {#hint: hint}, - ), - )), - ) as _i9.Future); - - @override - _i9.Future<_i3.Transaction> extractTx() => (super.noSuchMethod( - Invocation.method( - #extractTx, - [], - ), - returnValue: _i9.Future<_i3.Transaction>.value(_FakeTransaction_12( - this, - Invocation.method( - #extractTx, - [], - ), - )), - returnValueForMissingStub: - _i9.Future<_i3.Transaction>.value(_FakeTransaction_12( - this, - Invocation.method( - #extractTx, - [], - ), - )), - ) as _i9.Future<_i3.Transaction>); - - @override - _i9.Future<_i3.PartiallySignedTransaction> combine( - _i3.PartiallySignedTransaction? other) => - (super.noSuchMethod( - Invocation.method( - #combine, - [other], - ), - returnValue: _i9.Future<_i3.PartiallySignedTransaction>.value( - _FakePartiallySignedTransaction_13( - this, - Invocation.method( - #combine, - [other], - ), - )), - returnValueForMissingStub: - _i9.Future<_i3.PartiallySignedTransaction>.value( - _FakePartiallySignedTransaction_13( - this, - Invocation.method( - #combine, - [other], - ), - )), - ) as _i9.Future<_i3.PartiallySignedTransaction>); - - @override - _i9.Future txid({dynamic hint}) => (super.noSuchMethod( - Invocation.method( - #txid, - [], - {#hint: hint}, - ), - returnValue: _i9.Future.value(_i10.dummyValue( - this, - Invocation.method( - #txid, - [], - {#hint: hint}, - ), - )), - returnValueForMissingStub: - _i9.Future.value(_i10.dummyValue( - this, - Invocation.method( - #txid, - [], - {#hint: hint}, - ), - )), - ) as _i9.Future); -} - -/// 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, - int? 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, - int? 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(int? 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<_i4.ScriptAmount>? 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 onlySpendChange() => (super.noSuchMethod( - Invocation.method( - #onlySpendChange, - [], - ), - returnValue: _FakeTxBuilder_14( - this, - Invocation.method( - #onlySpendChange, - [], - ), - ), - returnValueForMissingStub: _FakeTxBuilder_14( - this, - Invocation.method( - #onlySpendChange, - [], - ), - ), - ) as _i3.TxBuilder); - - @override - _i9.Future<(_i3.PartiallySignedTransaction, _i4.TransactionDetails)> finish( - _i3.Wallet? wallet) => - (super.noSuchMethod( - Invocation.method( - #finish, - [wallet], - ), - returnValue: _i9.Future< - (_i3.PartiallySignedTransaction, _i4.TransactionDetails)>.value(( - _FakePartiallySignedTransaction_13( - this, - Invocation.method( - #finish, - [wallet], - ), - ), - _FakeTransactionDetails_15( - this, - Invocation.method( - #finish, - [wallet], - ), - ) - )), - returnValueForMissingStub: _i9.Future< - (_i3.PartiallySignedTransaction, _i4.TransactionDetails)>.value(( - _FakePartiallySignedTransaction_13( - this, - Invocation.method( - #finish, - [wallet], - ), - ), - _FakeTransactionDetails_15( - this, - Invocation.method( - #finish, - [wallet], - ), - ) - )), - ) as _i9 - .Future<(_i3.PartiallySignedTransaction, _i4.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: _i10.dummyValue( - this, - Invocation.getter(#txid), - ), - returnValueForMissingStub: _i10.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 - _i9.Future<(_i3.PartiallySignedTransaction, _i4.TransactionDetails)> finish( - _i3.Wallet? wallet) => - (super.noSuchMethod( - Invocation.method( - #finish, - [wallet], - ), - returnValue: _i9.Future< - (_i3.PartiallySignedTransaction, _i4.TransactionDetails)>.value(( - _FakePartiallySignedTransaction_13( - this, - Invocation.method( - #finish, - [wallet], - ), - ), - _FakeTransactionDetails_15( - this, - Invocation.method( - #finish, - [wallet], - ), - ) - )), - returnValueForMissingStub: _i9.Future< - (_i3.PartiallySignedTransaction, _i4.TransactionDetails)>.value(( - _FakePartiallySignedTransaction_13( - this, - Invocation.method( - #finish, - [wallet], - ), - ), - _FakeTransactionDetails_15( - this, - Invocation.method( - #finish, - [wallet], - ), - ) - )), - ) as _i9 - .Future<(_i3.PartiallySignedTransaction, _i4.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 - _i11.Uint8List get bytes => (super.noSuchMethod( - Invocation.getter(#bytes), - returnValue: _i11.Uint8List(0), - returnValueForMissingStub: _i11.Uint8List(0), - ) as _i11.Uint8List); -} - -/// 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 - _i4.BdkBitcoinAddress get ptr => (super.noSuchMethod( - Invocation.getter(#ptr), - returnValue: _FakeBdkBitcoinAddress_17( - this, - Invocation.getter(#ptr), - ), - returnValueForMissingStub: _FakeBdkBitcoinAddress_17( - this, - Invocation.getter(#ptr), - ), - ) as _i4.BdkBitcoinAddress); - - @override - _i9.Future<_i3.ScriptBuf> scriptPubkey() => (super.noSuchMethod( - Invocation.method( - #scriptPubkey, - [], - ), - returnValue: _i9.Future<_i3.ScriptBuf>.value(_FakeScriptBuf_18( - this, - Invocation.method( - #scriptPubkey, - [], - ), - )), - returnValueForMissingStub: - _i9.Future<_i3.ScriptBuf>.value(_FakeScriptBuf_18( - this, - Invocation.method( - #scriptPubkey, - [], - ), - )), - ) as _i9.Future<_i3.ScriptBuf>); - - @override - _i9.Future asString({dynamic hint}) => (super.noSuchMethod( - Invocation.method( - #asString, - [], - {#hint: hint}, - ), - returnValue: _i9.Future.value(_i10.dummyValue( - this, - Invocation.method( - #asString, - [], - {#hint: hint}, - ), - )), - returnValueForMissingStub: - _i9.Future.value(_i10.dummyValue( - this, - Invocation.method( - #asString, - [], - {#hint: hint}, - ), - )), - ) as _i9.Future); - - @override - _i9.Future isValidForNetwork({ - required _i4.Network? network, - dynamic hint, - }) => - (super.noSuchMethod( - Invocation.method( - #isValidForNetwork, - [], - { - #network: network, - #hint: hint, - }, - ), - returnValue: _i9.Future.value(false), - returnValueForMissingStub: _i9.Future.value(false), - ) as _i9.Future); - - @override - _i9.Future<_i4.Network> network({dynamic hint}) => (super.noSuchMethod( - Invocation.method( - #network, - [], - {#hint: hint}, - ), - returnValue: _i9.Future<_i4.Network>.value(_i4.Network.testnet), - returnValueForMissingStub: - _i9.Future<_i4.Network>.value(_i4.Network.testnet), - ) as _i9.Future<_i4.Network>); - - @override - _i9.Future<_i4.Payload> payload({dynamic hint}) => (super.noSuchMethod( - Invocation.method( - #payload, - [], - {#hint: hint}, - ), - returnValue: _i9.Future<_i4.Payload>.value(_i10.dummyValue<_i4.Payload>( - this, - Invocation.method( - #payload, - [], - {#hint: hint}, - ), - )), - returnValueForMissingStub: - _i9.Future<_i4.Payload>.value(_i10.dummyValue<_i4.Payload>( - this, - Invocation.method( - #payload, - [], - {#hint: hint}, - ), - )), - ) as _i9.Future<_i4.Payload>); - - @override - _i9.Future toQrUri({dynamic hint}) => (super.noSuchMethod( - Invocation.method( - #toQrUri, - [], - {#hint: hint}, - ), - returnValue: _i9.Future.value(_i10.dummyValue( - this, - Invocation.method( - #toQrUri, - [], - {#hint: hint}, - ), - )), - returnValueForMissingStub: - _i9.Future.value(_i10.dummyValue( - this, - Invocation.method( - #toQrUri, - [], - {#hint: hint}, - ), - )), - ) as _i9.Future); -} - -/// 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 - _i8.BitcoinBip32DerivationPath get ptr => (super.noSuchMethod( - Invocation.getter(#ptr), - returnValue: _FakeBitcoinBip32DerivationPath_19( - this, - Invocation.getter(#ptr), - ), - returnValueForMissingStub: _FakeBitcoinBip32DerivationPath_19( - this, - Invocation.getter(#ptr), - ), - ) as _i8.BitcoinBip32DerivationPath); -} - -/// 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 _i4.TransactionDetails { - @override - String get txid => (super.noSuchMethod( - Invocation.getter(#txid), - returnValue: _i10.dummyValue( - this, - Invocation.getter(#txid), - ), - returnValueForMissingStub: _i10.dummyValue( - this, - Invocation.getter(#txid), - ), - ) as String); - - @override - int get received => (super.noSuchMethod( - Invocation.getter(#received), - returnValue: 0, - returnValueForMissingStub: 0, - ) as int); - - @override - int get sent => (super.noSuchMethod( - Invocation.getter(#sent), - returnValue: 0, - returnValueForMissingStub: 0, - ) as int); -} From 0d9bc87b70b9773fafeb6aec7cdb151ec041b409 Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Sun, 14 Apr 2024 13:31:00 -0400 Subject: [PATCH 22/27] Merge commit '35efa2a2886ce02a6e9e9c6a1b73f9912d5ce8b6' as 'cargokit' --- .github/workflows/precompile_binaries.yml | 41 + .gitignore | 40 +- .metadata | 36 + CHANGELOG.md | 149 + LICENSE | 40 +- LICENSE-APACHE | 201 + README.md | 190 + 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/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 | 137 + example/lib/main.dart | 6 + example/lib/multi_sig_wallet.dart | 98 + example/lib/simple_wallet.dart | 330 + 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 + .../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 | 452 + example/pubspec.yaml | 83 + flutter_rust_bridge.yaml | 6 + ios/.gitignore | 41 + ios/Classes/EnforceBundling.swift | 4 + ios/Classes/bdk_flutter.c | 0 ios/Classes/frb_generated.h | 1297 + ios/bdk_flutter.podspec | 31 + lefthook.yml | 16 + lib/bdk_flutter.dart | 58 + lib/src/generated/api/blockchain.dart | 320 + lib/src/generated/api/blockchain.freezed.dart | 993 + lib/src/generated/api/descriptor.dart | 221 + lib/src/generated/api/error.dart | 357 + lib/src/generated/api/error.freezed.dart | 27433 ++++++++++++++++ lib/src/generated/api/key.dart | 206 + lib/src/generated/api/psbt.dart | 82 + lib/src/generated/api/types.dart | 846 + lib/src/generated/api/types.freezed.dart | 2258 ++ lib/src/generated/api/wallet.dart | 203 + lib/src/generated/frb_generated.dart | 7062 ++++ lib/src/generated/frb_generated.io.dart | 6735 ++++ lib/src/generated/frb_generated.web.dart | 3380 ++ lib/src/root.dart | 1125 + lib/src/utils/exceptions.dart | 368 + 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 | 1297 + macos/bdk_flutter.podspec | 34 + makefile | 29 + pubspec.lock | 621 + pubspec.yaml | 37 + rust/Cargo.lock | 2541 ++ rust/Cargo.toml | 28 + rust/cargokit.yaml | 9 + rust/src/api/blockchain.rs | 207 + rust/src/api/descriptor.rs | 267 + rust/src/api/error.rs | 357 + rust/src/api/key.rs | 269 + rust/src/api/mod.rs | 7 + rust/src/api/psbt.rs | 73 + rust/src/api/types.rs | 908 + rust/src/api/wallet.rs | 279 + rust/src/frb_generated.io.rs | 3982 +++ rust/src/frb_generated.rs | 5947 ++++ rust/src/frb_generated.web.rs | 2241 ++ rust/src/lib.rs | 5 + test/bdk_flutter_test.dart | 348 + test/bdk_flutter_test.mocks.dart | 2190 ++ 202 files changed, 79951 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/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/multi_sig_wallet.dart create mode 100644 example/lib/simple_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/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/frb_generated.web.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/frb_generated.web.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..ec2ea71e --- /dev/null +++ b/.github/workflows/precompile_binaries.yml @@ -0,0 +1,41 @@ +on: + push: + branches: [v0.31.2-dev, master, main] + +name: Precompile Binaries + +jobs: + Precompile: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: + - ubuntu-20.04 + - macOS-latest + steps: + - uses: actions/checkout@v4 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + - uses: dart-lang/setup-dart@v1 + - uses: subosito/flutter-action@v2 + with: + channel: 'stable' + - name: Precompile (with iOS) + if: (matrix.os == 'macOS-latest') + run: dart run build_tool precompile-binaries -v --manifest-dir=../../rust --repository=LtbLightning/bdk-flutter + working-directory: cargokit/build_tool + env: + GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} + PRIVATE_KEY: ${{ secrets.CARGOKIT_PRIVATE_KEY }} + - name: Precompile (with Android) + if: (matrix.os == 'ubuntu-20.04') + run: dart run build_tool precompile-binaries -v --manifest-dir=../../rust --repository=LtbLightning/bdk-flutter --android-sdk-location=/usr/local/lib/android/sdk --android-ndk-version=24.0.8215888 --android-min-sdk-version=23 + working-directory: cargokit/build_tool + env: + GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} + PRIVATE_KEY: ${{ secrets.CARGOKIT_PRIVATE_KEY }} 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..67db0054 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,149 @@ +## [0.31.2-dev] +Updated Rust and Flutter dependencies. +#### APIs added +- Add `InvalidInputException`, `InvalidLockTimeException` & `InvalidTransactionException` . +#### Fixed +- Thread `frb_workerpool` panic on `UnknownUtxo` and `InvalidPsbtInput`. + +## [0.31.1-dev] +#### Fixed +- Failed to load `.so` files in android. + +## [0.31.0-dev] +Updated Rust and Flutter dependencies. +#### APIs added +- Add sealed class `Auth` in `RpcConfig`. +- Made `PartiallySignedTransaction` class mutable. + +#### Changed +- Replace `AddressIndex`'s `new` with`increase`. +- Renamed `Address`'s create to `fromString`. +- `txBuilder.finish` returns a tuple. +- Added `cargokit` to handle rust binary build + +#### Fixed +- Functions hang indefinitely on iOS devices. +- Thread `frb_workerpool` panicked. + +## [0.30.0] +Updated Rust and Flutter dependencies. +MacOS support bug resolved +#### APIs added +- Add BIP-86 descriptor template + +## [0.29.2] +Support MacOS and unit testing. +Updated flutter dependencies. + +## [0.29.1] +Updated Rust and Flutter dependencies. +Exposed strongly-typed exceptions. + +## [0.29.0] +Support Dart 3. +Updated Rust and Flutter dependencies. +#### APIs added +- Add `isMine` method to `Wallet`. +- Expose script.toBytes() method. + +## [0.28.3] +### Fixed +- Multisig issue resolved by adding isMultiSig to signOptions. + +## [0.28.2] +#### APIs added +- Expose `Wallet` class's `getDescriptorForKeyChain` and `getPsbtInput` functions. +- Expose `TxBuilder` class's `addForeignUtxo` function. +- Add `Input` class. +- Expose `Descriptor` class's `maxSatisfactionWeight` function. + +## [0.28.1] +### Fixed +- Invalid UTF-8 error for txansaction.input(). + +## [0.28.0] +Updated Rust ( Bdk to latest version 0.28.0 ) and Flutter dependencies. +#### APIs added +- Expose `Address` class's `payload` and `network` functions +- Add `fromScript` constructor to `Address` class +- Add `SignOptions` to Wallet.sign() params. +- Add `jsonSerialize` function to `PartiallySignedTransaction`, to get the JSON serialized value of all PSBT fields. +- Expose `Transaction` class's `txid`, `weight`, `size`, `vsize`, `isCoinBase`, `isExplicitlyRbf`, `version`, `isLockTimeEnabled`, `lockTime`, `input` and `output` functions. + +## [0.27.2] +### API changed +- txBuilder.finish() & bumpFeeTxBuilder.finish() returns a `TxBuilderResult` instead of a `PartiallySignedTransaction`. + +## [0.27.1] +Updated Rust ( Bdk to latest version 0.27.1 ) and Flutter dependencies. +#### APIs added +- New `Transaction` class that can be created from or serialized to consensus encoded bytes. +- Add estimateFee(int Target) function for `Blockchain` +- Add getInternalAddress() function for `Wallet` +- Add AddressIndex.reset(int index) & AddressIndex.peek(int index) +#### APIs changed +- partiallySignedTransaction.extractTx() returns a `Transaction` instead of a the transaction bytes. +- blockchain.broadcast() takes a `Transaction` instead of a `PartiallySignedTransaction` + +## [0.3.2] +### Fixed +- iOS build issue when using flavors +- Added toString method for all objects + +## [0.3.1] +### Fixed +- Pub.dev analysis score +- Type mismatch for descriptorSecretKey + +## [0.3.0] +Updated Rust ( Bdk to latest version 0.26.0 ) and Flutter dependencies. +#### APIs changed +- The descriptor and changeDescriptor arguments on the wallet constructor now take a `Descriptor` instead of a String. +#### APIs added +- Added RpcConfig, BlockchainConfig.rpc +- Added Descriptor type with the following named constructors: +- Default `create` constructor, that requires a descriptor in String format and a Network +- newBip44 constructor returns a Descriptor with structure pkh(key/44'/{0,1}'/0'/{0,1}/*) +- newBip44Public constructor returns a Descriptor with structure pkh(key/{0,1}/*) +- newBip49 constructor returns a Descriptor with structure sh(wpkh(key/49'/{0,1}'/0'/{0,1}/*)) +- newBip49Public constructor returns a Descriptor with structure sh(wpkh(key/{0,1}/*)) +- newBip84 constructor returns a Descriptor with structure wpkh(key/84'/{0,1}'/0'/{0,1}/*) +- newBip84Public constructor returns a Descriptor with structure wpkh(key/{0,1}/*) +- asString returns the public version of the output descriptor in String format +- asPrivateString returns the private version of the output descriptor if available, otherwise, return the public version + +## [0.2.3] +### Fixed +- pub.dev analysis score + +## [0.2.2] +### Fixed +- pub.dev analysis score + +## [0.2.1] +### Fixed +- pub.dev static analysis warning +- removing internal helper functions from public api + +## [0.2.0] +Updated API to match bdk-ffi + +## [0.1.4] +#### Functionality Added +- Generate Mnemonic method +- Create Descriptors +- Create Extended Key +- Create XPriv +- Create XPub +- Create Wallet +- Get New Address +- Get Last Unused Address +- Get Balance +- Get Transactions +- Get Pending Transactions +- Get Confirmed Transactions +- Sync Wallet +- Create Transaction +- Sign Transaction +- Broadcast Transaction +- Quick Send 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..6aa8574d --- /dev/null +++ b/README.md @@ -0,0 +1,190 @@ +### 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.2-dev +``` + +### 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 externalPublicDescriptorStr = await externalDescriptor.asString(); +final externalPublicDescriptor = await Descriptor.( descriptor: externalPublicDescriptorStr, + 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..c2b7743f --- /dev/null +++ b/analysis_options.yaml @@ -0,0 +1,31 @@ +include: package:lints/recommended.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..0a24818b --- /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 + + 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 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 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..e59e280d --- /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..0ce09934 --- /dev/null +++ b/example/android/build.gradle @@ -0,0 +1,31 @@ +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() + } +} + +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/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..70693e4a --- /dev/null +++ b/example/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import UIKit +import Flutter + +@UIApplicationMain +@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 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 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-{l z-x3`7M}qzHsPV@$v#>H-TpjDh2UE$9g6sysUREDy_R(a)>=eHw-WAyfIN z*qb!_hW>G)Tu8nSw9yn#3wFMiLcfc4pY0ek1}8(NqkBR@t4{~oC>ryc-h_ByH(Cg5 z>ao-}771+xE3um9lWAY1FeQFxowa1(!J(;Jg*wrg!=6FdRX+t_<%z&d&?|Bn){>zm zZQj(aA_HeBY&OC^jj*)N`8fa^ePOU72VpInJoI1?`ty#lvlNzs(&MZX+R%2xS~5Kh zX*|AU4QE#~SgPzOXe9>tRj>hjU@c1k5Y_mW*Jp3fI;)1&g3j|zDgC+}2Q_v%YfDax z!?umcN^n}KYQ|a$Lr+51Nf9dkkYFSjZZjkma$0KOj+;aQ&721~t7QUKx61J3(P4P1 zstI~7-wOACnWP4=8oGOwz%vNDqD8w&Q`qcNGGrbbf&0s9L0De{4{mRS?o0MU+nR_! zrvshUau0G^DeMhM_v{5BuLjb#Hh@r23lDAk8oF(C+P0rsBpv85EP>4CVMx#04MOfG z;P%vktHcXwTj~+IE(~px)3*MY77e}p#|c>TD?sMatC0Tu4iKKJ0(X8jxQY*gYtxsC z(zYC$g|@+I+kY;dg_dE>scBf&bP1Nc@Hz<3R)V`=AGkc;8CXqdi=B4l2k|g;2%#m& z*jfX^%b!A8#bI!j9-0Fi0bOXl(-c^AB9|nQaE`*)Hw+o&jS9@7&Gov#HbD~#d{twV zXd^Tr^mWLfFh$@Dr$e;PBEz4(-2q1FF0}c;~B5sA}+Q>TOoP+t>wf)V9Iy=5ruQa;z)y zI9C9*oUga6=hxw6QasLPnee@3^Rr*M{CdaL5=R41nLs(AHk_=Y+A9$2&H(B7!_pURs&8aNw7?`&Z&xY_Ye z)~D5Bog^td-^QbUtkTirdyK^mTHAOuptDflut!#^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{ 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 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 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|DS{ng)j=2ux)_EzzJ773GmQ_Cic%3JJhC0t2cx>|v zJcVusIB!%F90{+}8hG3QU4KNeKmK%T>mN57NnCZ^56=0?&3@!j>a>B43pi{!u z7JyDj7`6d)qVp^R=%j>UIY6f+3`+qzIc!Y_=+uN^3BYV|o+$vGo-j-Wm<10%A=(Yk^beI{t%ld@yhKjq0iNjqN4XMGgQtbKubPM$JWBz}YA65k%dm*awtC^+f;a-x4+ddbH^7iDWGg&N0n#MW{kA|=8iMUiFYvMoDY@sPC#t$55gn6ykUTPAr`a@!(;np824>2xJthS z*ZdmT`g5-`BuJs`0LVhz+D9NNa3<=6m;cQLaF?tCv8)zcRSh66*Z|vXhG@$I%U~2l z?`Q zykI#*+rQ=z6Jm=Bui-SfpDYLA=|vzGE(dYm=OC8XM&MDo7ux4UF1~0J1+i%aCUpRe zt3L_uNyQ*cE(38Uy03H%I*)*Bh=Lb^Xj3?I^Hnbeq72(EOK^Y93CNp*uAA{5Lc=ky zx=~RKa4{iTm{_>_vSCm?$Ej=i6@=m%@VvAITnigVg{&@!7CDgs908761meDK5azA} z4?=NOH|PdvabgJ&fW2{Mo$Q0CcD8Qc84%{JPYt5EiG{MdLIAeX%T=D7NIP4%Hw}p9 zg)==!2Lbp#j{u_}hMiao9=!VSyx0gHbeCS`;q&vzeq|fs`y&^X-lso(Ls@-706qmA z7u*T5PMo_w3{se1t2`zWeO^hOvTsohG_;>J0wVqVe+n)AbQCx)yh9;w+J6?NF5Lmo zecS@ieAKL8%bVd@+-KT{yI|S}O>pYckUFs;ry9Ow$CD@ztz5K-*D$^{i(_1llhSh^ zEkL$}tsQt5>QA^;QgjgIfBDmcOgi5YDyu?t6vSnbp=1+@6D& z5MJ}B8q;bRlVoxasyhcUF1+)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 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)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@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 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 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=!tuIK8$Th2_((_h^+7;R|G{n06&O2#6%LK`a}n?h_fL18btz<@lFG za}xS}u?#DBMB> zw^b($1Z)`9G?eP95EKi&$eOy@K%h;ryrR3la%;>|o*>CgB(s>dDcNOXg}CK9SPmD? zmr-s{0wRmxUnbDrYfRvnZ@d z6johZ2sMX{YkGSKWd}m|@V7`Degt-43=2M?+jR%8{(H$&MLLmS;-|JxnX2pnz;el1jsvqQz}pGSF<`mqEXRQ5sC4#BbwnB_4` zc5bFE-Gb#JV3tox9fp-vVEN{(tOCpRse`S+@)?%pz+zVJXSooTrNCUg`R6`hxwb{) zC@{O6MKY8tfZ5@!yy=p5Y|#+myRL=^{tc(6YgAnkg3I(Cd!r5l;|;l-MQ8B`;*SCE z{u)uP^C$lOPM z5d~UhKhRRmvv{LIa^|oavk1$QiEApSrP@~Jjbg`<*dW4TO?4qG%a%sTPUFz(QtW5( zM)lA+5)0TvH~aBaOAs|}?u2FO;yc-CZ1gNM1dAxJ?%m?YsGR`}-xk2*dxC}r5j$d* zE!#Vtbo69h>V4V`BL%_&$} z+oJAo@jQ^Tk`;%xw-4G>hhb&)B?##U+(6Fi7nno`C<|#PVA%$Y{}N-?(Gc$1%tr4Pc}}hm~yY#fTOe!@v9s-ik$dX~|ygArPhByaXn8 zpI^FUjNWMsTFKTP3X7m?UK)3m zp6rI^_zxRYrx6_QmhoWoDR`fp4R7gu6;gdO)!KexaoO2D88F9x#TM1(9Bn7g;|?|o z)~$n&Lh#hCP6_LOPD>a)NmhW})LADx2kq=X7}7wYRj-0?dXr&bHaRWCfSqvzFa=sn z-8^gSyn-RmH=BZ{AJZ~!8n5621GbUJV7Qvs%JNv&$%Q17s_X%s-41vAPfIR>;x0Wlqr5?09S>x#%Qkt>?(&XjFRY}*L6BeQ3 z<6XEBh^S7>AbwGm@XP{RkeEKj6@_o%oV?hDuUpUJ+r#JZO?!IUc;r0R?>mi)*ZpQ) z#((dn=A#i_&EQn|hd)N$#A*fjBFuiHcYvo?@y1 z5|fV=a^a~d!c-%ZbMNqkMKiSzM{Yq=7_c&1H!mXk60Uv32dV;vMg&-kQ)Q{+PFtwc zj|-uQ;b^gts??J*9VxxOro}W~Q9j4Em|zSRv)(WSO9$F$s=Ydu%Q+5DOid~lwk&we zY%W(Z@ofdwPHncEZzZgmqS|!gTj3wQq9rxQy+^eNYKr1mj&?tm@wkO*9@UtnRMG>c aR{jt9+;fr}hV%pg00001^@s67{VYS000c7NklQEG_j zup^)eW&WUIApqy$=APz8jE@awGp)!bsTjDbrJO`$x^ZR^dr;>)LW>{ zs70vpsD38v)19rI=GNk1b(0?Js9~rjsQsu*K;@SD40RB-3^gKU-MYC7G!Bw{fZsqp zih4iIi;Hr_xZ033Iu{sQxLS=}yBXgLMn40d++>aQ0#%8D1EbGZp7+ z5=mK?t31BkVYbGOxE9`i748x`YgCMwL$qMsChbSGSE1`p{nSmadR zcQ#R)(?!~dmtD0+D2!K zR9%!Xp1oOJzm(vbLvT^$IKp@+W2=-}qTzTgVtQ!#Y7Gxz}stUIm<1;oBQ^Sh2X{F4ibaOOx;5ZGSNK z0maF^@(UtV$=p6DXLgRURwF95C=|U8?osGhgOED*b z7woJ_PWXBD>V-NjQAm{~T%sjyJ{5tn2f{G%?J!KRSrrGvQ1(^`YLA5B!~eycY(e5_ z*%aa{at13SxC(=7JT7$IQF~R3sy`Nn%EMv!$-8ZEAryB*yB1k&stni)=)8-ODo41g zkJu~roIgAih94tb=YsL%iH5@^b~kU9M-=aqgXIrbtxMpFy5mekFm#edF9z7RQ6V}R zBIhbXs~pMzt0VWy1Fi$^fh+1xxLDoK09&5&MJl(q#THjPm(0=z2H2Yfm^a&E)V+a5 zbi>08u;bJsDRUKR9(INSc7XyuWv(JsD+BB*0hS)FO&l&7MdViuur@-<-EHw>kHRGY zqoT}3fDv2-m{NhBG8X}+rgOEZ;amh*DqN?jEfQdqxdj08`Sr=C-KmT)qU1 z+9Cl)a1mgXxhQiHVB}l`m;-RpmKy?0*|yl?FXvJkFxuu!fKlcmz$kN(a}i*saM3nr z0!;a~_%Xqy24IxA2rz<+08=B-Q|2PT)O4;EaxP^6qixOv7-cRh?*T?zZU`{nIM-at zTKYWr9rJ=tppQ9I#Z#mLgINVB!pO-^FOcvFw6NhV0gztuO?g ztoA*C-52Q-Z-P#xB4HAY3KQVd%dz1S4PA3vHp0aa=zAO?FCt zC_GaTyVBg2F!bBr3U@Zy2iJgIAt>1sf$JWA9kh{;L+P*HfUBX1Zy{4MgNbDfBV_ly z!y#+753arsZUt@366jIC0klaC@ckuk!qu=pAyf7&QmiBUT^L1&tOHzsK)4n|pmrVT zs2($4=?s~VejTFHbFdDOwG;_58LkIj1Fh@{glkO#F1>a==ymJS$z;gdedT1zPx4Kj ztjS`y_C}%af-RtpehdQDt3a<=W5C4$)9W@QAse;WUry$WYmr51ml9lkeunUrE`-3e zmq1SgSOPNEE-Mf+AGJ$g0M;3@w!$Ej;hMh=v=I+Lpz^n%Pg^MgwyqOkNyu2c^of)C z1~ALor3}}+RiF*K4+4{(1%1j3pif1>sv0r^mTZ?5Jd-It!tfPfiG_p$AY*Vfak%FG z4z#;wLtw&E&?}w+eKG^=#jF7HQzr8rV0mY<1YAJ_uGz~$E13p?F^fPSzXSn$8UcI$ z8er9{5w5iv0qf8%70zV71T1IBB1N}R5Kp%NO0=5wJalZt8;xYp;b{1K) zHY>2wW-`Sl{=NpR%iu3(u6l&)rc%%cSA#aV7WCowfbFR4wcc{LQZv~o1u_`}EJA3>ki`?9CKYTA!rhO)if*zRdd}Kn zEPfYbhoVE~!FI_2YbC5qAj1kq;xP6%J8+?2PAs?`V3}nyFVD#sV3+uP`pi}{$l9U^ zSz}_M9f7RgnnRhaoIJgT8us!1aB&4!*vYF07Hp&}L zCRlop0oK4DL@ISz{2_BPlezc;xj2|I z23RlDNpi9LgTG_#(w%cMaS)%N`e>~1&a3<{Xy}>?WbF>OOLuO+j&hc^YohQ$4F&ze z+hwnro1puQjnKm;vFG~o>`kCeUIlkA-2tI?WBKCFLMBY=J{hpSsQ=PDtU$=duS_hq zHpymHt^uuV1q@uc4bFb{MdG*|VoW@15Osrqt2@8ll0qO=j*uOXn{M0UJX#SUztui9FN4)K3{9!y8PC-AHHvpVTU;x|-7P+taAtyglk#rjlH2 z5Gq8ik}BPaGiM{#Woyg;*&N9R2{J0V+WGB69cEtH7F?U~Kbi6ksi*`CFXsi931q7Y zGO82?whBhN%w1iDetv%~wM*Y;E^)@Vl?VDj-f*RX>{;o_=$fU!&KAXbuadYZ46Zbg z&6jMF=49$uL^73y;;N5jaHYv)BTyfh&`qVLYn?`o6BCA_z-0niZz=qPG!vonK3MW_ zo$V96zM!+kJRs{P-5-rQVse0VBH*n6A58)4uc&gfHMa{gIhV2fGf{st>E8sKyP-$8zp~wJX^A*@DI&-;8>gANXZj zU)R+Y)PB?=)a|Kj>8NXEu^S_h^7R`~Q&7*Kn!xyvzVv&^>?^iu;S~R2e-2fJx-oUb cX)(b1KSk$MOV07*qoM6N<$f&6$jw%VRuvdN2+38CZWny1cRtlsl+0_KtW)EU14Ei(F!UtWuj4IK+3{sK@>rh zs1Z;=(DD&U6+tlyL?UnHVN^&g6QhFi2#HS+*qz;(>63G(`|jRtW|nz$Pv7qTovP!^ zP_jES{mr@O-02w%!^a?^1ZP!_KmQiz0L~jZ=W@Qt`8wzOoclQsAS<5YdH;a(4bGLE zk8s}1If(PSIgVi!XE!5kA?~z*sobvNyohr;=Q_@h2@$6Flyej3J)D-6YfheRGl`HEcPk|~huT_2-U?PfL=4BPV)f1o!%rQ!NMt_MYw-5bUSwQ9Z&zC>u zOrl~UJglJNa%f50Ok}?WB{on`Ci`p^Y!xBA?m@rcJXLxtrE0FhRF3d*ir>yzO|BD$ z3V}HpFcCh6bTzY}Nt_(W%QYd3NG)jJ4<`F<1Od) zfQblTdC&h2lCz`>y?>|9o2CdvC8qZeIZt%jN;B7Hdn2l*k4M4MFEtq`q_#5?}c$b$pf_3y{Y!cRDafZBEj-*OD|gz#PBDeu3QoueOesLzB+O zxjf2wvf6Wwz>@AiOo2mO4=TkAV+g~%_n&R;)l#!cBxjuoD$aS-`IIJv7cdX%2{WT7 zOm%5rs(wqyPE^k5SIpUZ!&Lq4<~%{*>_Hu$2|~Xa;iX*tz8~G6O3uFOS?+)tWtdi| zV2b#;zRN!m@H&jd=!$7YY6_}|=!IU@=SjvGDFtL;aCtw06U;-v^0%k0FOyESt z1Wv$={b_H&8FiRV?MrzoHWd>%v6KTRU;-v^Miiz+@q`(BoT!+<37CKhoKb)|8!+RG z6BQFU^@fRW;s8!mOf2QViKQGk0TVER6EG1`#;Nm39Do^PoT!+<37AD!%oJe86(=et zZ~|sLzU>V-qYiU6V8$0GmU7_K8|Fd0B?+9Un1BhKAz#V~Fk^`mJtlCX#{^8^M8!me z8Yg;8-~>!e<-iG;h*0B1kBKm}hItVGY6WnjVpgnTTAC$rqQ^v)4KvOtpY|sIj@WYg zyw##ZZ5AC2IKNC;^hwg9BPk0wLStlmBr;E|$5GoAo$&Ui_;S9WY62n3)i49|T%C#i017z3J=$RF|KyZWnci*@lW4 z=AKhNN6+m`Q!V3Ye68|8y@%=am>YD0nG99M)NWc20%)gwO!96j7muR}Fr&54SxKP2 zP30S~lt=a*qDlbu3+Av57=9v&vr<6g0&`!8E2fq>I|EJGKs}t|{h7+KT@)LfIV-3K zK)r_fr2?}FFyn*MYoLC>oV-J~eavL2ho4a4^r{E-8m2hi>~hA?_vIG4a*KT;2eyl1 zh_hUvUJpNCFwBvRq5BI*srSle>c6%n`#VNsyC|MGa{(P&08p=C9+WUw9Hl<1o9T4M zdD=_C0F7#o8A_bRR?sFNmU0R6tW`ElnF8p53IdHo#S9(JoZCz}fHwJ6F<&?qrpVqE zte|m%89JQD+XwaPU#%#lVs-@-OL);|MdfINd6!XwP2h(eyafTUsoRkA%&@fe?9m@jw-v(yTTiV2(*fthQH9}SqmsRPVnwwbV$1E(_lkmo&S zF-truCU914_$jpqjr(>Ha4HkM4YMT>m~NosUu&UZ>zirfHo%N6PPs9^_o$WqPA0#5 z%tG>qFCL+b*0s?sZ;Sht0nE7Kl>OVXy=gjWxxK;OJ3yGd7-pZf7JYNcZo2*1SF`u6 zHJyRRxGw9mDlOiXqVMsNe#WX`fC`vrtjSQ%KmLcl(lC>ZOQzG^%iql2w-f_K@r?OE zwCICifM#L-HJyc7Gm>Ern?+Sk3&|Khmu4(~3qa$(m6Ub^U0E5RHq49za|XklN#?kP zl;EstdW?(_4D>kwjWy2f!LM)y?F94kyU3`W!6+AyId-89v}sXJpuic^NLL7GJItl~ zsiuB98AI-(#Mnm|=A-R6&2fwJ0JVSY#Q>&3$zFh|@;#%0qeF=j5Ajq@4i0tIIW z&}sk$&fGwoJpe&u-JeGLi^r?dO`m=y(QO{@h zQqAC7$rvz&5+mo3IqE?h=a~6m>%r5Quapvzq;{y~p zJpyXOBgD9VrW7@#p6l7O?o3feml(DtSL>D^R) zZUY%T2b0-vBAFN7VB;M88!~HuOXi4KcI6aRQ&h|XQ0A?m%j2=l1f0cGP}h(oVfJ`N zz#PpmFC*ieab)zJK<4?^k=g%OjPnkANzbAbmGZHoVRk*mTfm75s_cWVa`l*f$B@xu z5E*?&@seIo#*Y~1rBm!7sF9~~u6Wrj5oICUOuz}CS)jdNIznfzCA(stJ(7$c^e5wN z?lt>eYgbA!kvAR7zYSD&*r1$b|(@;9dcZ^67R0 zXAXJKa|5Sdmj!g578Nwt6d$sXuc&MWezA0Whd`94$h{{?1IwXP4)Tx4obDK%xoFZ_Z zjjHJ_P@R_e5blG@yEjnaJb`l;s%Lb2&=8$&Ct-fV`E^4CUs)=jTk!I}2d&n!f@)bm z@ z_4Dc86+3l2*p|~;o-Sb~oXb_RuLmoifDU^&Te$*FevycC0*nE3Xws8gsWp|Rj2>SM zns)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 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..dbe57859 --- /dev/null +++ b/example/lib/bdk_library.dart @@ -0,0 +1,137 @@ +import 'package:bdk_flutter/bdk_flutter.dart'; +import 'package:flutter/cupertino.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.testnet, + mnemonic: mnemonic, + ); + final descriptor = await Descriptor.newBip84( + secretKey: descriptorSecretKey, + network: Network.testnet, + keychain: KeychainKind.externalChain); + return descriptor; + } + + Future initializeBlockchain(bool isElectrumBlockchain) async { + if (isElectrumBlockchain) { + final blockchain = await Blockchain.create( + config: const BlockchainConfig.esplora( + config: EsploraConfig( + baseUrl: 'https://blockstream.info/testnet/api', + stopGap: 10))); + return blockchain; + } else { + final blockchain = await Blockchain.create( + config: const BlockchainConfig.electrum( + config: ElectrumConfig( + stopGap: 10, + timeout: 5, + retry: 5, + url: "ssl://electrum.blockstream.info:60002", + validateDomain: true))); + return blockchain; + } + } + + 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 aliceWallet) async { + try { + await aliceWallet.sync(blockchain: blockchain); + } on FormatException catch (e) { + debugPrint(e.message); + } + } + + Future getAddress(Wallet aliceWallet) async { + final address = await aliceWallet.getAddress( + addressIndex: const AddressIndex.increase()); + return address; + } + + Future getPsbtInput( + Wallet aliceWallet, LocalUtxo utxo, bool onlyWitnessUtxo) async { + final input = await aliceWallet.getPsbtInput( + utxo: utxo, onlyWitnessUtxo: onlyWitnessUtxo); + return input; + } + + Future> getUnConfirmedTransactions( + Wallet aliceWallet) async { + List unConfirmed = []; + final res = await aliceWallet.listTransactions(includeRaw: true); + for (var e in res) { + if (e.confirmationTime == null) unConfirmed.add(e); + } + return unConfirmed; + } + + Future> getConfirmedTransactions( + Wallet aliceWallet) async { + List confirmed = []; + final res = await aliceWallet.listTransactions(includeRaw: true); + + for (var e in res) { + if (e.confirmationTime != null) confirmed.add(e); + } + return confirmed; + } + + Future getBalance(Wallet aliceWallet) async { + final res = await aliceWallet.getBalance(); + return res; + } + + Future> listUnspend(Wallet aliceWallet) async { + final res = await aliceWallet.listUnspent(); + return res; + } + + Future estimateFeeRate( + int blocks, + Blockchain blockchain, + ) async { + final feeRate = await blockchain.estimateFee(target: blocks); + return feeRate; + } + + sendBitcoin( + Blockchain blockchain, Wallet aliceWallet, String addressStr) async { + try { + final txBuilder = TxBuilder(); + final address = await Address.fromString( + s: addressStr, network: (await aliceWallet.network())); + + final script = await address.scriptPubkey(); + final feeRate = await estimateFeeRate(25, blockchain); + final (psbt, _) = await txBuilder + .addRecipient(script, 750) + .feeRate(feeRate.satPerVb) + .finish(aliceWallet); + final isFinalized = await aliceWallet.sign(psbt: psbt); + if (isFinalized) { + final tx = await 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..4f12fa02 --- /dev/null +++ b/example/lib/main.dart @@ -0,0 +1,6 @@ +import 'package:bdk_flutter_example/simple_wallet.dart'; +import 'package:flutter/material.dart'; + +void main() { + runApp(const SimpleWallet()); +} diff --git a/example/lib/multi_sig_wallet.dart b/example/lib/multi_sig_wallet.dart new file mode 100644 index 00000000..395c74b8 --- /dev/null +++ b/example/lib/multi_sig_wallet.dart @@ -0,0 +1,98 @@ +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 = await secret.asPublic(); + 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 aliceWallet, Wallet bobWallet, + String addressStr) async { + try { + final txBuilder = TxBuilder(); + final address = await Address.fromString( + s: addressStr, network: (await aliceWallet.network())); + final script = await address.scriptPubkey(); + final feeRate = await blockchain.estimateFee(target: 25); + final (psbt, _) = await txBuilder + .addRecipient(script, 1000) + .feeRate(feeRate.satPerVb) + .finish(aliceWallet); + await aliceWallet.sign( + psbt: psbt, + signOptions: const SignOptions( + multiSig: true, + trustWitnessUtxo: false, + allowAllSighashes: true, + removePartialSigs: true, + tryFinalize: true, + signWithTapInternalKey: true, + allowGrinding: true)); + final isFinalized = await bobWallet.sign(psbt: psbt); + if (isFinalized) { + final tx = await 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/simple_wallet.dart new file mode 100644 index 00000000..02f1d0fd --- /dev/null +++ b/example/lib/simple_wallet.dart @@ -0,0 +1,330 @@ +import 'package:bdk_flutter/bdk_flutter.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; + +import 'bdk_library.dart'; + +class SimpleWallet extends StatefulWidget { + const SimpleWallet({super.key}); + + @override + State createState() => _SimpleWalletState(); +} + +class _SimpleWalletState extends State { + String displayText = ""; + int balance = 0; + late Wallet aliceWallet; + 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(await res.asString()); + } + } + + restoreWallet() async { + final aliceMnemonic = await Mnemonic.fromString( + 'certain sense kiss guide crumble hint transfer crime much stereo warm coral'); + final aliceDescriptor = await lib.createDescriptor(aliceMnemonic); + aliceWallet = await lib.restoreWallet(aliceDescriptor); + setState(() { + displayText = "Wallets restored"; + }); + } + + initBlockchain(bool isElectrumBlockchain) async { + blockchain = await lib.initializeBlockchain(isElectrumBlockchain); + } + + sync() async { + if (blockchain == null) { + await initBlockchain(false); + } + await lib.sync(blockchain!, aliceWallet); + } + + getNewAddress() async { + final res = (await lib.getAddress(aliceWallet)); + debugPrint(await res.address.asString()); + setState(() async { + displayText = + "Address: ${await res.address.asString()} \n Index: ${res.index}"; + }); + } + + getUnConfirmedTransactions() async { + final unConfirmed = await lib.getUnConfirmedTransactions(aliceWallet); + 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 = await lib.getConfirmedTransactions(aliceWallet); + 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(aliceWallet); + setState(() { + balance = alice.total; + displayText = + "Total Balance: ${alice.total} \n Immature Balance: ${alice.immature}"; + }); + } + + listUnspent() async { + final res = await lib.listUnspend(aliceWallet); + 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() async { + await lib.sendBitcoin( + blockchain!, aliceWallet, "mv4rnyY3Su5gjcDNzbMLKBQkBicCtHUtFB"); + } + + @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(), + 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/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..d53ef643 --- /dev/null +++ b/example/macos/Runner/AppDelegate.swift @@ -0,0 +1,9 @@ +import Cocoa +import FlutterMacOS + +@NSApplicationMain +class AppDelegate: FlutterAppDelegate { + override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { + return true + } +} diff --git a/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..a2ec33f1 --- /dev/null +++ b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,68 @@ +{ + "images" : [ + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_16.png", + "scale" : "1x" + }, + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "2x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "1x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_64.png", + "scale" : "2x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_128.png", + "scale" : "1x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "2x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "1x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "2x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "1x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_1024.png", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png new file mode 100644 index 0000000000000000000000000000000000000000..82b6f9d9a33e198f5747104729e1fcef999772a5 GIT binary patch literal 102994 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ⅅ8MglG&ER{i5lN315cO?EdHNLrg? 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 z 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 Pe7HEdAEg|=c=LY&YVNkY 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 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 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 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 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..f11ebe3f --- /dev/null +++ b/example/pubspec.lock @@ -0,0 +1,452 @@ +# 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" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893" + url: "https://pub.dev" + source: hosted + version: "6.2.0" + args: + dependency: transitive + 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" + bdk_flutter: + dependency: "direct main" + description: + path: ".." + relative: true + source: path + version: "0.31.2-dev" + 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: fedde275e0a6b798c3296963c5cd224e3e1b55d0e478d5b7e65e6b540f363a0e + url: "https://pub.dev" + source: hosted + version: "8.9.1" + 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: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d + url: "https://pub.dev" + source: hosted + version: "1.0.6" + 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: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + url: "https://pub.dev" + source: hosted + version: "2.1.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_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: e9a8716b1ad2fc81c434f3e4bf84b86c578578678c57e568b44aea7acf210102 + url: "https://pub.dev" + source: hosted + version: "2.0.0-dev.31" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + freezed_annotation: + dependency: transitive + description: + name: freezed_annotation + sha256: c3fd9336eb55a38cc1bbd79ab17573113a8deccd0ecbbf926cca3c62803b5c2d + url: "https://pub.dev" + source: hosted + version: "2.4.1" + glob: + dependency: transitive + description: + name: glob + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + 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: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 + url: "https://pub.dev" + source: hosted + version: "4.8.1" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + url: "https://pub.dev" + source: hosted + version: "10.0.0" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + url: "https://pub.dev" + source: hosted + version: "2.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: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + url: "https://pub.dev" + source: hosted + version: "0.8.0" + meta: + dependency: transitive + description: + name: meta + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + url: "https://pub.dev" + source: hosted + version: "1.11.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" + 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" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.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_api: + dependency: transitive + description: + name: test_api + sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + url: "https://pub.dev" + source: hosted + version: "0.6.1" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" + source: hosted + version: "1.3.2" + uuid: + dependency: transitive + description: + name: uuid + sha256: cd210a09f7c18cbe5a02511718e0334de6559871052c90a90c0cca46a4aa81c8 + url: "https://pub.dev" + source: hosted + version: "4.3.3" + 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: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + url: "https://pub.dev" + source: hosted + version: "13.0.0" + watcher: + dependency: transitive + description: + name: watcher + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + yaml: + dependency: transitive + description: + name: yaml + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + url: "https://pub.dev" + source: hosted + version: "3.1.2" +sdks: + dart: ">=3.2.0-0 <4.0.0" + flutter: ">=3.0.0" diff --git a/example/pubspec.yaml b/example/pubspec.yaml new file mode 100644 index 00000000..06bbff6a --- /dev/null +++ b/example/pubspec.yaml @@ -0,0 +1,83 @@ +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 + + # 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..b7fadedc --- /dev/null +++ b/flutter_rust_bridge.yaml @@ -0,0 +1,6 @@ +rust_input: rust/src/api/*.rs +dart_output: lib/src/generated/ +full_dep: true +c_output: ios/Classes/frb_generated.h +duplicated_c_output: [macos/Classes/frb_generated.h] +dart_entrypoint_class_name: CApi \ 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..c79716cb --- /dev/null +++ b/ios/Classes/frb_generated.h @@ -0,0 +1,1297 @@ +#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 *inner; +} 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_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 multi_sig; + 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_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_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_list_local_utxo { + struct wire_cst_local_utxo *ptr; + int32_t len; +} wire_cst_list_local_utxo; + +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_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_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; + +void frbgen_bdk_flutter_wire_bdk_blockchain_broadcast(int64_t port_, + struct wire_cst_bdk_blockchain *that, + struct wire_cst_bdk_transaction *transaction); + +void frbgen_bdk_flutter_wire_bdk_blockchain_estimate_fee(int64_t port_, + struct wire_cst_bdk_blockchain *that, + uint64_t target); + +void frbgen_bdk_flutter_wire_bdk_blockchain_get_block_hash(int64_t port_, + struct wire_cst_bdk_blockchain *that, + uint32_t height); + +void frbgen_bdk_flutter_wire_bdk_blockchain_get_height(int64_t port_, + struct wire_cst_bdk_blockchain *that); + +void frbgen_bdk_flutter_wire_bdk_blockchain_new(int64_t port_, + struct wire_cst_blockchain_config *blockchain_config); + +void frbgen_bdk_flutter_wire_bdk_descriptor_as_string(int64_t port_, + struct wire_cst_bdk_descriptor *that); + +void frbgen_bdk_flutter_wire_bdk_descriptor_as_string_private(int64_t port_, + struct wire_cst_bdk_descriptor *that); + +void frbgen_bdk_flutter_wire_bdk_descriptor_max_satisfaction_weight(int64_t port_, + struct wire_cst_bdk_descriptor *that); + +void frbgen_bdk_flutter_wire_bdk_descriptor_new(int64_t port_, + struct wire_cst_list_prim_u_8_strict *descriptor, + int32_t network); + +void frbgen_bdk_flutter_wire_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_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_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_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_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_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_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_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); + +void frbgen_bdk_flutter_wire_bdk_derivation_path_from_string(int64_t port_, + struct wire_cst_list_prim_u_8_strict *path); + +void frbgen_bdk_flutter_wire_bdk_descriptor_public_key_as_string(int64_t port_, + struct wire_cst_bdk_descriptor_public_key *that); + +void frbgen_bdk_flutter_wire_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_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_bdk_descriptor_public_key_from_string(int64_t port_, + struct wire_cst_list_prim_u_8_strict *public_key); + +void frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_as_public(int64_t port_, + struct wire_cst_bdk_descriptor_secret_key *ptr); + +void frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_as_string(int64_t port_, + struct wire_cst_bdk_descriptor_secret_key *that); + +void frbgen_bdk_flutter_wire_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_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_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_bdk_descriptor_secret_key_from_string(int64_t port_, + struct wire_cst_list_prim_u_8_strict *secret_key); + +void frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_secret_bytes(int64_t port_, + struct wire_cst_bdk_descriptor_secret_key *that); + +void frbgen_bdk_flutter_wire_bdk_mnemonic_as_string(int64_t port_, + struct wire_cst_bdk_mnemonic *that); + +void frbgen_bdk_flutter_wire_bdk_mnemonic_from_entropy(int64_t port_, + struct wire_cst_list_prim_u_8_loose *entropy); + +void frbgen_bdk_flutter_wire_bdk_mnemonic_from_string(int64_t port_, + struct wire_cst_list_prim_u_8_strict *mnemonic); + +void frbgen_bdk_flutter_wire_bdk_mnemonic_new(int64_t port_, int32_t word_count); + +void frbgen_bdk_flutter_wire_bdk_psbt_combine(int64_t port_, + struct wire_cst_bdk_psbt *ptr, + struct wire_cst_bdk_psbt *other); + +void frbgen_bdk_flutter_wire_bdk_psbt_extract_tx(int64_t port_, struct wire_cst_bdk_psbt *ptr); + +void frbgen_bdk_flutter_wire_bdk_psbt_fee_amount(int64_t port_, struct wire_cst_bdk_psbt *that); + +void frbgen_bdk_flutter_wire_bdk_psbt_fee_rate(int64_t port_, struct wire_cst_bdk_psbt *that); + +void frbgen_bdk_flutter_wire_bdk_psbt_from_str(int64_t port_, + struct wire_cst_list_prim_u_8_strict *psbt_base64); + +void frbgen_bdk_flutter_wire_bdk_psbt_json_serialize(int64_t port_, struct wire_cst_bdk_psbt *that); + +void frbgen_bdk_flutter_wire_bdk_psbt_serialize(int64_t port_, struct wire_cst_bdk_psbt *that); + +void frbgen_bdk_flutter_wire_bdk_psbt_txid(int64_t port_, struct wire_cst_bdk_psbt *that); + +void frbgen_bdk_flutter_wire_bdk_address_as_string(int64_t port_, + struct wire_cst_bdk_address *that); + +void frbgen_bdk_flutter_wire_bdk_address_from_script(int64_t port_, + struct wire_cst_bdk_script_buf *script, + int32_t network); + +void frbgen_bdk_flutter_wire_bdk_address_from_string(int64_t port_, + struct wire_cst_list_prim_u_8_strict *address, + int32_t network); + +void frbgen_bdk_flutter_wire_bdk_address_is_valid_for_network(int64_t port_, + struct wire_cst_bdk_address *that, + int32_t network); + +void frbgen_bdk_flutter_wire_bdk_address_network(int64_t port_, struct wire_cst_bdk_address *that); + +void frbgen_bdk_flutter_wire_bdk_address_payload(int64_t port_, struct wire_cst_bdk_address *that); + +void frbgen_bdk_flutter_wire_bdk_address_script(int64_t port_, struct wire_cst_bdk_address *ptr); + +void frbgen_bdk_flutter_wire_bdk_address_to_qr_uri(int64_t port_, + struct wire_cst_bdk_address *that); + +void frbgen_bdk_flutter_wire_bdk_script_buf_empty(int64_t port_); + +void frbgen_bdk_flutter_wire_bdk_script_buf_from_hex(int64_t port_, + struct wire_cst_list_prim_u_8_strict *s); + +void frbgen_bdk_flutter_wire_bdk_script_buf_with_capacity(int64_t port_, uintptr_t capacity); + +void frbgen_bdk_flutter_wire_bdk_transaction_from_bytes(int64_t port_, + struct wire_cst_list_prim_u_8_loose *transaction_bytes); + +void frbgen_bdk_flutter_wire_bdk_transaction_input(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire_bdk_transaction_is_coin_base(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire_bdk_transaction_is_explicitly_rbf(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire_bdk_transaction_is_lock_time_enabled(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire_bdk_transaction_lock_time(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire_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_bdk_transaction_output(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire_bdk_transaction_serialize(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire_bdk_transaction_size(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire_bdk_transaction_txid(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire_bdk_transaction_version(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire_bdk_transaction_vsize(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire_bdk_transaction_weight(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire_bdk_wallet_get_address(int64_t port_, + struct wire_cst_bdk_wallet *ptr, + struct wire_cst_address_index *address_index); + +void frbgen_bdk_flutter_wire_bdk_wallet_get_balance(int64_t port_, + struct wire_cst_bdk_wallet *that); + +void frbgen_bdk_flutter_wire_bdk_wallet_get_descriptor_for_keychain(int64_t port_, + struct wire_cst_bdk_wallet *ptr, + int32_t keychain); + +void frbgen_bdk_flutter_wire_bdk_wallet_get_internal_address(int64_t port_, + struct wire_cst_bdk_wallet *ptr, + struct wire_cst_address_index *address_index); + +void frbgen_bdk_flutter_wire_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); + +void frbgen_bdk_flutter_wire_bdk_wallet_is_mine(int64_t port_, + struct wire_cst_bdk_wallet *that, + struct wire_cst_bdk_script_buf *script); + +void frbgen_bdk_flutter_wire_bdk_wallet_list_transactions(int64_t port_, + struct wire_cst_bdk_wallet *that, + bool include_raw); + +void frbgen_bdk_flutter_wire_bdk_wallet_list_unspent(int64_t port_, + struct wire_cst_bdk_wallet *that); + +void frbgen_bdk_flutter_wire_bdk_wallet_network(int64_t port_, struct wire_cst_bdk_wallet *that); + +void frbgen_bdk_flutter_wire_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); + +void frbgen_bdk_flutter_wire_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_bdk_wallet_sync(int64_t port_, + struct wire_cst_bdk_wallet *ptr, + struct wire_cst_bdk_blockchain *blockchain); + +void frbgen_bdk_flutter_wire_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_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_prim_u_8_loose *data); + +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_AnyBlockchain(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_AnyBlockchain(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_ExtendedDescriptor(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_ExtendedDescriptor(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_MutexPartiallySignedTransaction(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_MutexPartiallySignedTransaction(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_MutexbdkWalletAnyDatabase(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_MutexbdkWalletAnyDatabase(const void *ptr); + +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_bitcoinbip32DerivationPath(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bitcoinbip32DerivationPath(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysDescriptorPublicKey(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysDescriptorPublicKey(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysDescriptorSecretKey(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysDescriptorSecretKey(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysKeyMap(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysKeyMap(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysbip39Mnemonic(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysbip39Mnemonic(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_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); + +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_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_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_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_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_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_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_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_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_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_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_AnyBlockchain); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_ExtendedDescriptor); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_MutexPartiallySignedTransaction); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_MutexbdkWalletAnyDatabase); + 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_bitcoinbip32DerivationPath); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysDescriptorPublicKey); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysDescriptorSecretKey); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysKeyMap); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysbip39Mnemonic); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_AnyBlockchain); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_ExtendedDescriptor); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_MutexPartiallySignedTransaction); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_MutexbdkWalletAnyDatabase); + 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_bitcoinbip32DerivationPath); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysDescriptorPublicKey); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysDescriptorSecretKey); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysKeyMap); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysbip39Mnemonic); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_from_script); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_from_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_is_valid_for_network); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_network); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_payload); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_script); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_to_qr_uri); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_blockchain_broadcast); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_blockchain_estimate_fee); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_blockchain_get_block_hash); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_blockchain_get_height); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_blockchain_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_derivation_path_from_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_as_string_private); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_max_satisfaction_weight); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip44); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip44_public); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip49); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip49_public); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip84); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip84_public); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip86); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip86_public); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_public_key_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_public_key_derive); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_public_key_extend); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_public_key_from_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_as_public); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_create); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_derive); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_extend); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_from_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_secret_bytes); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_mnemonic_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_mnemonic_from_entropy); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_mnemonic_from_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_mnemonic_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_combine); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_extract_tx); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_fee_amount); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_fee_rate); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_from_str); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_json_serialize); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_serialize); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_txid); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_script_buf_empty); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_script_buf_from_hex); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_script_buf_with_capacity); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_from_bytes); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_input); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_is_coin_base); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_is_explicitly_rbf); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_is_lock_time_enabled); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_lock_time); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_output); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_serialize); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_size); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_txid); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_version); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_vsize); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_weight); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_get_address); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_get_balance); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_get_descriptor_for_keychain); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_get_internal_address); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_get_psbt_input); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_is_mine); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_list_transactions); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_list_unspent); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_network); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_sign); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_sync); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_finish_bump_fee_tx_builder); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_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..06378f72 --- /dev/null +++ b/ios/bdk_flutter.podspec @@ -0,0 +1,31 @@ +Pod::Spec.new do |s| + s.name = 'bdk_flutter' + s.version = "0.31.2-dev" + 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..d7b86031 --- /dev/null +++ b/lib/bdk_flutter.dart @@ -0,0 +1,58 @@ +///A Flutter library for the [Bitcoin Development Kit](https://bitcoindevkit.org/). +library bdk_flutter; + +export './src/generated/api/blockchain.dart' + hide + BdkBlockchain, + BlockchainConfig_Electrum, + BlockchainConfig_Esplora, + AnyBlockchain, + Auth_Cookie, + Auth_UserPass, + Auth_None, + BlockchainConfig_Rpc; +export './src/generated/api/descriptor.dart' + hide + BdkDescriptor, + ExtendedDescriptor, + KeysDescriptorSecretKey, + KeysDescriptorPublicKey, + KeysKeyMap; +export './src/generated/api/key.dart' + hide + BdkDerivationPath, + BdkDescriptorPublicKey, + BdkDescriptorSecretKey, + BitcoinBip32DerivationPath, + KeysBip39Mnemonic, + BdkMnemonic; +export './src/generated/api/psbt.dart' + hide MutexPartiallySignedTransaction, BdkPsbt; +export './src/generated/api/types.dart' + hide + BdkBitcoinAddress, + 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; +export './src/generated/api/wallet.dart' + hide + MutexBdkWalletAnyDatabase, + BdkWallet, + finishBumpFeeTxBuilder, + txBuilderFinish; +export './src/root.dart'; +export 'src/utils/exceptions.dart' hide mapToException, BdkFfiException; diff --git a/lib/src/generated/api/blockchain.dart b/lib/src/generated/api/blockchain.dart new file mode 100644 index 00000000..d66bd784 --- /dev/null +++ b/lib/src/generated/api/blockchain.dart @@ -0,0 +1,320 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31. + +// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import + +import '../frb_generated.dart'; +import 'error.dart'; +import 'package:collection/collection.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'; + +// Rust type: RustOpaqueNom +@sealed +class AnyBlockchain extends RustOpaque { + AnyBlockchain.dcoDecode(List wire) + : super.dcoDecode(wire, _kStaticData); + + AnyBlockchain.sseDecode(int ptr, int externalSizeOnNative) + : super.sseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: + CApi.instance.api.rust_arc_increment_strong_count_AnyBlockchain, + rustArcDecrementStrongCount: + CApi.instance.api.rust_arc_decrement_strong_count_AnyBlockchain, + rustArcDecrementStrongCountPtr: + CApi.instance.api.rust_arc_decrement_strong_count_AnyBlockchainPtr, + ); +} + +@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, + }); + + Future broadcast( + {required BdkTransaction transaction, dynamic hint}) => + CApi.instance.api.bdkBlockchainBroadcast( + that: this, transaction: transaction, hint: hint); + + Future estimateFee({required int target, dynamic hint}) => + CApi.instance.api + .bdkBlockchainEstimateFee(that: this, target: target, hint: hint); + + Future getBlockHash({required int height, dynamic hint}) => + CApi.instance.api + .bdkBlockchainGetBlockHash(that: this, height: height, hint: hint); + + Future getHeight({dynamic hint}) => + CApi.instance.api.bdkBlockchainGetHeight(that: this, hint: hint); + + // HINT: Make it `#[frb(sync)]` to let it become the default constructor of Dart class. + static Future newInstance( + {required BlockchainConfig blockchainConfig, dynamic hint}) => + CApi.instance.api + .bdkBlockchainNew(blockchainConfig: blockchainConfig, hint: hint); + + @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 int 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 int stopGap; + + /// Socket timeout. + final int? 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 int startScriptCount; + + /// Time in unix seconds in which initial sync will start scanning from (0 to start from genesis). + final int startTime; + + /// Forces every sync to use `start_time` as import timestamp. + final bool forceStartTime; + + /// RPC poll rate (in seconds) to get state updates. + final int 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; +} + +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/generated/api/blockchain.freezed.dart b/lib/src/generated/api/blockchain.freezed.dart new file mode 100644 index 00000000..5fecef07 --- /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#custom-getters-and-methods'); + +/// @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..4691f4dc --- /dev/null +++ b/lib/src/generated/api/descriptor.dart @@ -0,0 +1,221 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31. + +// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import + +import '../frb_generated.dart'; +import 'blockchain.dart'; +import 'error.dart'; +import 'key.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; +import 'types.dart'; + +// Rust type: RustOpaqueNom +@sealed +class ExtendedDescriptor extends RustOpaque { + ExtendedDescriptor.dcoDecode(List wire) + : super.dcoDecode(wire, _kStaticData); + + ExtendedDescriptor.sseDecode(int ptr, int externalSizeOnNative) + : super.sseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: + CApi.instance.api.rust_arc_increment_strong_count_ExtendedDescriptor, + rustArcDecrementStrongCount: + CApi.instance.api.rust_arc_decrement_strong_count_ExtendedDescriptor, + rustArcDecrementStrongCountPtr: + CApi.instance.api.rust_arc_decrement_strong_count_ExtendedDescriptorPtr, + ); +} + +// Rust type: RustOpaqueNom +@sealed +class KeysDescriptorPublicKey extends RustOpaque { + KeysDescriptorPublicKey.dcoDecode(List wire) + : super.dcoDecode(wire, _kStaticData); + + KeysDescriptorPublicKey.sseDecode(int ptr, int externalSizeOnNative) + : super.sseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: CApi + .instance.api.rust_arc_increment_strong_count_KeysDescriptorPublicKey, + rustArcDecrementStrongCount: CApi + .instance.api.rust_arc_decrement_strong_count_KeysDescriptorPublicKey, + rustArcDecrementStrongCountPtr: CApi.instance.api + .rust_arc_decrement_strong_count_KeysDescriptorPublicKeyPtr, + ); +} + +// Rust type: RustOpaqueNom +@sealed +class KeysDescriptorSecretKey extends RustOpaque { + KeysDescriptorSecretKey.dcoDecode(List wire) + : super.dcoDecode(wire, _kStaticData); + + KeysDescriptorSecretKey.sseDecode(int ptr, int externalSizeOnNative) + : super.sseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: CApi + .instance.api.rust_arc_increment_strong_count_KeysDescriptorSecretKey, + rustArcDecrementStrongCount: CApi + .instance.api.rust_arc_decrement_strong_count_KeysDescriptorSecretKey, + rustArcDecrementStrongCountPtr: CApi.instance.api + .rust_arc_decrement_strong_count_KeysDescriptorSecretKeyPtr, + ); +} + +// Rust type: RustOpaqueNom +@sealed +class KeysKeyMap extends RustOpaque { + KeysKeyMap.dcoDecode(List wire) + : super.dcoDecode(wire, _kStaticData); + + KeysKeyMap.sseDecode(int ptr, int externalSizeOnNative) + : super.sseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: + CApi.instance.api.rust_arc_increment_strong_count_KeysKeyMap, + rustArcDecrementStrongCount: + CApi.instance.api.rust_arc_decrement_strong_count_KeysKeyMap, + rustArcDecrementStrongCountPtr: + CApi.instance.api.rust_arc_decrement_strong_count_KeysKeyMapPtr, + ); +} + +class BdkDescriptor { + final ExtendedDescriptor extendedDescriptor; + final KeysKeyMap keyMap; + + const BdkDescriptor({ + required this.extendedDescriptor, + required this.keyMap, + }); + + Future asString({dynamic hint}) => + CApi.instance.api.bdkDescriptorAsString(that: this, hint: hint); + + Future asStringPrivate({dynamic hint}) => + CApi.instance.api.bdkDescriptorAsStringPrivate(that: this, hint: hint); + + Future maxSatisfactionWeight({dynamic hint}) => CApi.instance.api + .bdkDescriptorMaxSatisfactionWeight(that: this, hint: hint); + + // HINT: Make it `#[frb(sync)]` to let it become the default constructor of Dart class. + static Future newInstance( + {required String descriptor, + required Network network, + dynamic hint}) => + CApi.instance.api.bdkDescriptorNew( + descriptor: descriptor, network: network, hint: hint); + + static Future newBip44( + {required BdkDescriptorSecretKey secretKey, + required KeychainKind keychainKind, + required Network network, + dynamic hint}) => + CApi.instance.api.bdkDescriptorNewBip44( + secretKey: secretKey, + keychainKind: keychainKind, + network: network, + hint: hint); + + static Future newBip44Public( + {required BdkDescriptorPublicKey publicKey, + required String fingerprint, + required KeychainKind keychainKind, + required Network network, + dynamic hint}) => + CApi.instance.api.bdkDescriptorNewBip44Public( + publicKey: publicKey, + fingerprint: fingerprint, + keychainKind: keychainKind, + network: network, + hint: hint); + + static Future newBip49( + {required BdkDescriptorSecretKey secretKey, + required KeychainKind keychainKind, + required Network network, + dynamic hint}) => + CApi.instance.api.bdkDescriptorNewBip49( + secretKey: secretKey, + keychainKind: keychainKind, + network: network, + hint: hint); + + static Future newBip49Public( + {required BdkDescriptorPublicKey publicKey, + required String fingerprint, + required KeychainKind keychainKind, + required Network network, + dynamic hint}) => + CApi.instance.api.bdkDescriptorNewBip49Public( + publicKey: publicKey, + fingerprint: fingerprint, + keychainKind: keychainKind, + network: network, + hint: hint); + + static Future newBip84( + {required BdkDescriptorSecretKey secretKey, + required KeychainKind keychainKind, + required Network network, + dynamic hint}) => + CApi.instance.api.bdkDescriptorNewBip84( + secretKey: secretKey, + keychainKind: keychainKind, + network: network, + hint: hint); + + static Future newBip84Public( + {required BdkDescriptorPublicKey publicKey, + required String fingerprint, + required KeychainKind keychainKind, + required Network network, + dynamic hint}) => + CApi.instance.api.bdkDescriptorNewBip84Public( + publicKey: publicKey, + fingerprint: fingerprint, + keychainKind: keychainKind, + network: network, + hint: hint); + + static Future newBip86( + {required BdkDescriptorSecretKey secretKey, + required KeychainKind keychainKind, + required Network network, + dynamic hint}) => + CApi.instance.api.bdkDescriptorNewBip86( + secretKey: secretKey, + keychainKind: keychainKind, + network: network, + hint: hint); + + static Future newBip86Public( + {required BdkDescriptorPublicKey publicKey, + required String fingerprint, + required KeychainKind keychainKind, + required Network network, + dynamic hint}) => + CApi.instance.api.bdkDescriptorNewBip86Public( + publicKey: publicKey, + fingerprint: fingerprint, + keychainKind: keychainKind, + network: network, + hint: hint); + + @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..c0cfe1a7 --- /dev/null +++ b/lib/src/generated/api/error.dart @@ -0,0 +1,357 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31. + +// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import + +import '../frb_generated.dart'; +import 'blockchain.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'; + +@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( + int field0, + ) = AddressError_InvalidWitnessProgramLength; + const factory AddressError.invalidSegwitV0ProgramLength( + int 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; + + /// 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( + int 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 int needed, + + /// Sats available for spending + required int 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 int 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( + int field0, + int 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 int requested, + required int 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( + int field0, + ) = HexError_OddLengthString; + const factory HexError.invalidLength( + int field0, + int 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..23895121 --- /dev/null +++ b/lib/src/generated/api/error.freezed.dart @@ -0,0 +1,27433 @@ +// 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#custom-getters-and-methods'); + +/// @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(int field0) invalidWitnessProgramLength, + required TResult Function(int 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(int field0)? invalidWitnessProgramLength, + TResult? Function(int 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(int field0)? invalidWitnessProgramLength, + TResult Function(int 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(int field0) invalidWitnessProgramLength, + required TResult Function(int 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(int field0)? invalidWitnessProgramLength, + TResult? Function(int 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(int field0)? invalidWitnessProgramLength, + TResult Function(int 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(int field0) invalidWitnessProgramLength, + required TResult Function(int 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(int field0)? invalidWitnessProgramLength, + TResult? Function(int 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(int field0)? invalidWitnessProgramLength, + TResult Function(int 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(int field0) invalidWitnessProgramLength, + required TResult Function(int 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(int field0)? invalidWitnessProgramLength, + TResult? Function(int 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(int field0)? invalidWitnessProgramLength, + TResult Function(int 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(int field0) invalidWitnessProgramLength, + required TResult Function(int 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(int field0)? invalidWitnessProgramLength, + TResult? Function(int 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(int field0)? invalidWitnessProgramLength, + TResult Function(int 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(int field0) invalidWitnessProgramLength, + required TResult Function(int 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(int field0)? invalidWitnessProgramLength, + TResult? Function(int 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(int field0)? invalidWitnessProgramLength, + TResult Function(int 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(int field0) invalidWitnessProgramLength, + required TResult Function(int 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(int field0)? invalidWitnessProgramLength, + TResult? Function(int 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(int field0)? invalidWitnessProgramLength, + TResult Function(int 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(int field0) invalidWitnessProgramLength, + required TResult Function(int 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(int field0)? invalidWitnessProgramLength, + TResult? Function(int 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(int field0)? invalidWitnessProgramLength, + TResult Function(int 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({int 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 int, + )); + } +} + +/// @nodoc + +class _$AddressError_InvalidWitnessProgramLengthImpl + extends AddressError_InvalidWitnessProgramLength { + const _$AddressError_InvalidWitnessProgramLengthImpl(this.field0) : super._(); + + @override + final int 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(int field0) invalidWitnessProgramLength, + required TResult Function(int 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(int field0)? invalidWitnessProgramLength, + TResult? Function(int 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(int field0)? invalidWitnessProgramLength, + TResult Function(int 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 int field0) = + _$AddressError_InvalidWitnessProgramLengthImpl; + const AddressError_InvalidWitnessProgramLength._() : super._(); + + int 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({int 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 int, + )); + } +} + +/// @nodoc + +class _$AddressError_InvalidSegwitV0ProgramLengthImpl + extends AddressError_InvalidSegwitV0ProgramLength { + const _$AddressError_InvalidSegwitV0ProgramLengthImpl(this.field0) + : super._(); + + @override + final int 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(int field0) invalidWitnessProgramLength, + required TResult Function(int 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(int field0)? invalidWitnessProgramLength, + TResult? Function(int 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(int field0)? invalidWitnessProgramLength, + TResult Function(int 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 int field0) = + _$AddressError_InvalidSegwitV0ProgramLengthImpl; + const AddressError_InvalidSegwitV0ProgramLength._() : super._(); + + int 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(int field0) invalidWitnessProgramLength, + required TResult Function(int 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(int field0)? invalidWitnessProgramLength, + TResult? Function(int 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(int field0)? invalidWitnessProgramLength, + TResult Function(int 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(int field0) invalidWitnessProgramLength, + required TResult Function(int 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(int field0)? invalidWitnessProgramLength, + TResult? Function(int 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(int field0)? invalidWitnessProgramLength, + TResult Function(int 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(int field0) invalidWitnessProgramLength, + required TResult Function(int 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(int field0)? invalidWitnessProgramLength, + TResult? Function(int 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(int field0)? invalidWitnessProgramLength, + TResult Function(int 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(int field0) invalidWitnessProgramLength, + required TResult Function(int 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(int field0)? invalidWitnessProgramLength, + TResult? Function(int 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(int field0)? invalidWitnessProgramLength, + TResult Function(int 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(int field0) invalidWitnessProgramLength, + required TResult Function(int 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(int field0)? invalidWitnessProgramLength, + TResult? Function(int 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(int field0)? invalidWitnessProgramLength, + TResult Function(int 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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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({int 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 int, + )); + } +} + +/// @nodoc + +class _$BdkError_OutputBelowDustLimitImpl + extends BdkError_OutputBelowDustLimit { + const _$BdkError_OutputBelowDustLimitImpl(this.field0) : super._(); + + @override + final int 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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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 int field0) = + _$BdkError_OutputBelowDustLimitImpl; + const BdkError_OutputBelowDustLimit._() : super._(); + + int 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({int needed, int 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 int, + available: null == available + ? _value.available + : available // ignore: cast_nullable_to_non_nullable + as int, + )); + } +} + +/// @nodoc + +class _$BdkError_InsufficientFundsImpl extends BdkError_InsufficientFunds { + const _$BdkError_InsufficientFundsImpl( + {required this.needed, required this.available}) + : super._(); + + /// Sats needed for some transaction + @override + final int needed; + + /// Sats available for spending + @override + final int 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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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 int needed, + required final int available}) = _$BdkError_InsufficientFundsImpl; + const BdkError_InsufficientFunds._() : super._(); + + /// Sats needed for some transaction + int get needed; + + /// Sats available for spending + int 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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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({int 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 int, + )); + } +} + +/// @nodoc + +class _$BdkError_FeeTooLowImpl extends BdkError_FeeTooLow { + const _$BdkError_FeeTooLowImpl({required this.needed}) : super._(); + + /// Required fee absolute value (satoshi) + @override + final int 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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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 int needed}) = + _$BdkError_FeeTooLowImpl; + const BdkError_FeeTooLow._() : super._(); + + /// Required fee absolute value (satoshi) + int 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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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({int field0, int 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 int, + null == field1 + ? _value.field1 + : field1 // ignore: cast_nullable_to_non_nullable + as int, + )); + } +} + +/// @nodoc + +class _$BdkError_MissingCachedScriptsImpl + extends BdkError_MissingCachedScripts { + const _$BdkError_MissingCachedScriptsImpl(this.field0, this.field1) + : super._(); + + @override + final int field0; + @override + final int 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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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 int field0, final int field1) = _$BdkError_MissingCachedScriptsImpl; + const BdkError_MissingCachedScripts._() : super._(); + + int get field0; + int 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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(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(int field0) outputBelowDustLimit, + required TResult Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult? Function(int needed, int 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(int 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(int field0, int 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(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(int field0)? outputBelowDustLimit, + TResult Function(int needed, int 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(int 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(int field0, int 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_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_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_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(int requested, int 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(int requested, int 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(int requested, int 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(int requested, int 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(int requested, int 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(int requested, int 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({int requested, int 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 int, + max: null == max + ? _value.max + : max // ignore: cast_nullable_to_non_nullable + as int, + )); + } +} + +/// @nodoc + +class _$ConsensusError_OversizedVectorAllocationImpl + extends ConsensusError_OversizedVectorAllocation { + const _$ConsensusError_OversizedVectorAllocationImpl( + {required this.requested, required this.max}) + : super._(); + + @override + final int requested; + @override + final int 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(int requested, int 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(int requested, int 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(int requested, int 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 int requested, + required final int max}) = _$ConsensusError_OversizedVectorAllocationImpl; + const ConsensusError_OversizedVectorAllocation._() : super._(); + + int get requested; + int 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(int requested, int 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(int requested, int 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(int requested, int 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(int requested, int 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(int requested, int 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(int requested, int 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(int requested, int 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(int requested, int 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(int requested, int 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(int requested, int 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(int requested, int 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(int requested, int 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 { + int get field0 => throw _privateConstructorUsedError; + @optionalTypeArgs + TResult when({ + required TResult Function(int field0) invalidChar, + required TResult Function(int field0) oddLengthString, + required TResult Function(int field0, int field1) invalidLength, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(int field0)? invalidChar, + TResult? Function(int field0)? oddLengthString, + TResult? Function(int field0, int field1)? invalidLength, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(int field0)? invalidChar, + TResult Function(int field0)? oddLengthString, + TResult Function(int field0, int 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; + + @JsonKey(ignore: true) + $HexErrorCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $HexErrorCopyWith<$Res> { + factory $HexErrorCopyWith(HexError value, $Res Function(HexError) then) = + _$HexErrorCopyWithImpl<$Res, HexError>; + @useResult + $Res call({int field0}); +} + +/// @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; + + @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 _$$HexError_InvalidCharImplCopyWith<$Res> + implements $HexErrorCopyWith<$Res> { + factory _$$HexError_InvalidCharImplCopyWith(_$HexError_InvalidCharImpl value, + $Res Function(_$HexError_InvalidCharImpl) then) = + __$$HexError_InvalidCharImplCopyWithImpl<$Res>; + @override + @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(int field0) oddLengthString, + required TResult Function(int field0, int field1) invalidLength, + }) { + return invalidChar(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(int field0)? invalidChar, + TResult? Function(int field0)? oddLengthString, + TResult? Function(int field0, int field1)? invalidLength, + }) { + return invalidChar?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(int field0)? invalidChar, + TResult Function(int field0)? oddLengthString, + TResult Function(int field0, int 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; + @override + @JsonKey(ignore: true) + _$$HexError_InvalidCharImplCopyWith<_$HexError_InvalidCharImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$HexError_OddLengthStringImplCopyWith<$Res> + implements $HexErrorCopyWith<$Res> { + factory _$$HexError_OddLengthStringImplCopyWith( + _$HexError_OddLengthStringImpl value, + $Res Function(_$HexError_OddLengthStringImpl) then) = + __$$HexError_OddLengthStringImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({int 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 int, + )); + } +} + +/// @nodoc + +class _$HexError_OddLengthStringImpl extends HexError_OddLengthString { + const _$HexError_OddLengthStringImpl(this.field0) : super._(); + + @override + final int 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(int field0) oddLengthString, + required TResult Function(int field0, int field1) invalidLength, + }) { + return oddLengthString(field0); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(int field0)? invalidChar, + TResult? Function(int field0)? oddLengthString, + TResult? Function(int field0, int field1)? invalidLength, + }) { + return oddLengthString?.call(field0); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(int field0)? invalidChar, + TResult Function(int field0)? oddLengthString, + TResult Function(int field0, int 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 int field0) = + _$HexError_OddLengthStringImpl; + const HexError_OddLengthString._() : super._(); + + @override + int get field0; + @override + @JsonKey(ignore: true) + _$$HexError_OddLengthStringImplCopyWith<_$HexError_OddLengthStringImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$HexError_InvalidLengthImplCopyWith<$Res> + implements $HexErrorCopyWith<$Res> { + factory _$$HexError_InvalidLengthImplCopyWith( + _$HexError_InvalidLengthImpl value, + $Res Function(_$HexError_InvalidLengthImpl) then) = + __$$HexError_InvalidLengthImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({int field0, int 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 int, + null == field1 + ? _value.field1 + : field1 // ignore: cast_nullable_to_non_nullable + as int, + )); + } +} + +/// @nodoc + +class _$HexError_InvalidLengthImpl extends HexError_InvalidLength { + const _$HexError_InvalidLengthImpl(this.field0, this.field1) : super._(); + + @override + final int field0; + @override + final int 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(int field0) oddLengthString, + required TResult Function(int field0, int field1) invalidLength, + }) { + return invalidLength(field0, field1); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(int field0)? invalidChar, + TResult? Function(int field0)? oddLengthString, + TResult? Function(int field0, int field1)? invalidLength, + }) { + return invalidLength?.call(field0, field1); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(int field0)? invalidChar, + TResult Function(int field0)? oddLengthString, + TResult Function(int field0, int 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 int field0, final int field1) = + _$HexError_InvalidLengthImpl; + const HexError_InvalidLength._() : super._(); + + @override + int get field0; + int get field1; + @override + @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..41cd51f9 --- /dev/null +++ b/lib/src/generated/api/key.dart @@ -0,0 +1,206 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31. + +// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import + +import '../frb_generated.dart'; +import 'blockchain.dart'; +import 'descriptor.dart'; +import 'error.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; +import 'types.dart'; + +// Rust type: RustOpaqueNom +@sealed +class BitcoinBip32DerivationPath extends RustOpaque { + BitcoinBip32DerivationPath.dcoDecode(List wire) + : super.dcoDecode(wire, _kStaticData); + + BitcoinBip32DerivationPath.sseDecode(int ptr, int externalSizeOnNative) + : super.sseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: CApi.instance.api + .rust_arc_increment_strong_count_BitcoinBip32DerivationPath, + rustArcDecrementStrongCount: CApi.instance.api + .rust_arc_decrement_strong_count_BitcoinBip32DerivationPath, + rustArcDecrementStrongCountPtr: CApi.instance.api + .rust_arc_decrement_strong_count_BitcoinBip32DerivationPathPtr, + ); +} + +// Rust type: RustOpaqueNom +@sealed +class KeysBip39Mnemonic extends RustOpaque { + KeysBip39Mnemonic.dcoDecode(List wire) + : super.dcoDecode(wire, _kStaticData); + + KeysBip39Mnemonic.sseDecode(int ptr, int externalSizeOnNative) + : super.sseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: + CApi.instance.api.rust_arc_increment_strong_count_KeysBip39Mnemonic, + rustArcDecrementStrongCount: + CApi.instance.api.rust_arc_decrement_strong_count_KeysBip39Mnemonic, + rustArcDecrementStrongCountPtr: + CApi.instance.api.rust_arc_decrement_strong_count_KeysBip39MnemonicPtr, + ); +} + +class BdkDerivationPath { + final BitcoinBip32DerivationPath ptr; + + const BdkDerivationPath({ + required this.ptr, + }); + + static Future fromString( + {required String path, dynamic hint}) => + CApi.instance.api.bdkDerivationPathFromString(path: path, hint: hint); + + @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 KeysDescriptorPublicKey ptr; + + const BdkDescriptorPublicKey({ + required this.ptr, + }); + + Future asString({dynamic hint}) => + CApi.instance.api.bdkDescriptorPublicKeyAsString(that: this, hint: hint); + + static Future derive( + {required BdkDescriptorPublicKey ptr, + required BdkDerivationPath path, + dynamic hint}) => + CApi.instance.api + .bdkDescriptorPublicKeyDerive(ptr: ptr, path: path, hint: hint); + + static Future extend( + {required BdkDescriptorPublicKey ptr, + required BdkDerivationPath path, + dynamic hint}) => + CApi.instance.api + .bdkDescriptorPublicKeyExtend(ptr: ptr, path: path, hint: hint); + + static Future fromString( + {required String publicKey, dynamic hint}) => + CApi.instance.api + .bdkDescriptorPublicKeyFromString(publicKey: publicKey, hint: hint); + + @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 KeysDescriptorSecretKey ptr; + + const BdkDescriptorSecretKey({ + required this.ptr, + }); + + static Future asPublic( + {required BdkDescriptorSecretKey ptr, dynamic hint}) => + CApi.instance.api.bdkDescriptorSecretKeyAsPublic(ptr: ptr, hint: hint); + + Future asString({dynamic hint}) => + CApi.instance.api.bdkDescriptorSecretKeyAsString(that: this, hint: hint); + + static Future create( + {required Network network, + required BdkMnemonic mnemonic, + String? password, + dynamic hint}) => + CApi.instance.api.bdkDescriptorSecretKeyCreate( + network: network, mnemonic: mnemonic, password: password, hint: hint); + + static Future derive( + {required BdkDescriptorSecretKey ptr, + required BdkDerivationPath path, + dynamic hint}) => + CApi.instance.api + .bdkDescriptorSecretKeyDerive(ptr: ptr, path: path, hint: hint); + + static Future extend( + {required BdkDescriptorSecretKey ptr, + required BdkDerivationPath path, + dynamic hint}) => + CApi.instance.api + .bdkDescriptorSecretKeyExtend(ptr: ptr, path: path, hint: hint); + + static Future fromString( + {required String secretKey, dynamic hint}) => + CApi.instance.api + .bdkDescriptorSecretKeyFromString(secretKey: secretKey, hint: hint); + + /// Get the private key as bytes. + Future secretBytes({dynamic hint}) => CApi.instance.api + .bdkDescriptorSecretKeySecretBytes(that: this, hint: hint); + + @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 KeysBip39Mnemonic ptr; + + const BdkMnemonic({ + required this.ptr, + }); + + /// Returns Mnemonic as string + Future asString({dynamic hint}) => + CApi.instance.api.bdkMnemonicAsString(that: this, hint: hint); + + /// 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, dynamic hint}) => + CApi.instance.api.bdkMnemonicFromEntropy(entropy: entropy, hint: hint); + + /// Parse a Mnemonic with given string + static Future fromString( + {required String mnemonic, dynamic hint}) => + CApi.instance.api.bdkMnemonicFromString(mnemonic: mnemonic, hint: hint); + + // 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, dynamic hint}) => + CApi.instance.api.bdkMnemonicNew(wordCount: wordCount, hint: hint); + + @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..67a75d30 --- /dev/null +++ b/lib/src/generated/api/psbt.dart @@ -0,0 +1,82 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31. + +// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import + +import '../frb_generated.dart'; +import 'blockchain.dart'; +import 'error.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; +import 'types.dart'; + +// Rust type: RustOpaqueNom> +@sealed +class MutexPartiallySignedTransaction extends RustOpaque { + MutexPartiallySignedTransaction.dcoDecode(List wire) + : super.dcoDecode(wire, _kStaticData); + + MutexPartiallySignedTransaction.sseDecode(int ptr, int externalSizeOnNative) + : super.sseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: CApi.instance.api + .rust_arc_increment_strong_count_MutexPartiallySignedTransaction, + rustArcDecrementStrongCount: CApi.instance.api + .rust_arc_decrement_strong_count_MutexPartiallySignedTransaction, + rustArcDecrementStrongCountPtr: CApi.instance.api + .rust_arc_decrement_strong_count_MutexPartiallySignedTransactionPtr, + ); +} + +class BdkPsbt { + final MutexPartiallySignedTransaction ptr; + + const BdkPsbt({ + required this.ptr, + }); + + /// 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, dynamic hint}) => + CApi.instance.api.bdkPsbtCombine(ptr: ptr, other: other, hint: hint); + + /// Return the transaction. + static Future extractTx( + {required BdkPsbt ptr, dynamic hint}) => + CApi.instance.api.bdkPsbtExtractTx(ptr: ptr, hint: hint); + + /// 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. + Future feeAmount({dynamic hint}) => + CApi.instance.api.bdkPsbtFeeAmount(that: this, hint: hint); + + /// 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. + Future feeRate({dynamic hint}) => + CApi.instance.api.bdkPsbtFeeRate(that: this, hint: hint); + + static Future fromStr({required String psbtBase64, dynamic hint}) => + CApi.instance.api.bdkPsbtFromStr(psbtBase64: psbtBase64, hint: hint); + + /// Serialize the PSBT data structure as a String of JSON. + Future jsonSerialize({dynamic hint}) => + CApi.instance.api.bdkPsbtJsonSerialize(that: this, hint: hint); + + Future serialize({dynamic hint}) => + CApi.instance.api.bdkPsbtSerialize(that: this, hint: hint); + + Future txid({dynamic hint}) => + CApi.instance.api.bdkPsbtTxid(that: this, hint: hint); + + @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..fe8e99f3 --- /dev/null +++ b/lib/src/generated/api/types.dart @@ -0,0 +1,846 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31. + +// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import + +import '../frb_generated.dart'; +import 'blockchain.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'; + +// Rust type: RustOpaqueNom +@sealed +class BdkBitcoinAddress extends RustOpaque { + BdkBitcoinAddress.dcoDecode(List wire) + : super.dcoDecode(wire, _kStaticData); + + BdkBitcoinAddress.sseDecode(int ptr, int externalSizeOnNative) + : super.sseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: + CApi.instance.api.rust_arc_increment_strong_count_BdkBitcoinAddress, + rustArcDecrementStrongCount: + CApi.instance.api.rust_arc_decrement_strong_count_BdkBitcoinAddress, + rustArcDecrementStrongCountPtr: + CApi.instance.api.rust_arc_decrement_strong_count_BdkBitcoinAddressPtr, + ); +} + +@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 int immature; + + /// Unconfirmed UTXOs generated by a wallet tx + final int trustedPending; + + /// Unconfirmed UTXOs received from an external wallet + final int untrustedPending; + + /// Confirmed and immediately spendable balance + final int confirmed; + + /// Get sum of trusted_pending and confirmed coins + final int spendable; + + /// Get the whole balance visible to the wallet + final int 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 BdkBitcoinAddress ptr; + + const BdkAddress({ + required this.ptr, + }); + + Future asString({dynamic hint}) => + CApi.instance.api.bdkAddressAsString(that: this, hint: hint); + + static Future fromScript( + {required BdkScriptBuf script, + required Network network, + dynamic hint}) => + CApi.instance.api + .bdkAddressFromScript(script: script, network: network, hint: hint); + + static Future fromString( + {required String address, required Network network, dynamic hint}) => + CApi.instance.api + .bdkAddressFromString(address: address, network: network, hint: hint); + + Future isValidForNetwork({required Network network, dynamic hint}) => + CApi.instance.api.bdkAddressIsValidForNetwork( + that: this, network: network, hint: hint); + + ///The network on which this address is usable. + Future network({dynamic hint}) => + CApi.instance.api.bdkAddressNetwork(that: this, hint: hint); + + Future payload({dynamic hint}) => + CApi.instance.api.bdkAddressPayload(that: this, hint: hint); + + static Future script({required BdkAddress ptr, dynamic hint}) => + CApi.instance.api.bdkAddressScript(ptr: ptr, hint: hint); + + ///Creates a URI string bitcoin:address optimized to be encoded in QR codes. + Future toQrUri({dynamic hint}) => + CApi.instance.api.bdkAddressToQrUri(that: this, hint: hint); + + @override + int get hashCode => ptr.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is BdkAddress && + runtimeType == other.runtimeType && + ptr == other.ptr; +} + +class BdkScriptBuf { + final Uint8List bytes; + + const BdkScriptBuf({ + required this.bytes, + }); + + ///Creates a new empty script. + static Future empty({dynamic hint}) => + CApi.instance.api.bdkScriptBufEmpty(hint: hint); + + static Future fromHex({required String s, dynamic hint}) => + CApi.instance.api.bdkScriptBufFromHex(s: s, hint: hint); + + ///Creates a new empty script with pre-allocated capacity. + static Future withCapacity( + {required int capacity, dynamic hint}) => + CApi.instance.api + .bdkScriptBufWithCapacity(capacity: capacity, hint: hint); + + @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 inner; + + const BdkTransaction({ + required this.inner, + }); + + static Future fromBytes( + {required List transactionBytes, dynamic hint}) => + CApi.instance.api.bdkTransactionFromBytes( + transactionBytes: transactionBytes, hint: hint); + + ///List of transaction inputs. + Future> input({dynamic hint}) => + CApi.instance.api.bdkTransactionInput(that: this, hint: hint); + + ///Is this a coin base transaction? + Future isCoinBase({dynamic hint}) => + CApi.instance.api.bdkTransactionIsCoinBase(that: this, hint: hint); + + ///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({dynamic hint}) => + CApi.instance.api.bdkTransactionIsExplicitlyRbf(that: this, hint: hint); + + ///Returns true if this transactions nLockTime is enabled (BIP-65 ). + Future isLockTimeEnabled({dynamic hint}) => + CApi.instance.api.bdkTransactionIsLockTimeEnabled(that: this, hint: hint); + + ///Block height or timestamp. Transaction cannot be included in a block until this height/time. + Future lockTime({dynamic hint}) => + CApi.instance.api.bdkTransactionLockTime(that: this, hint: hint); + + // 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, + dynamic hint}) => + CApi.instance.api.bdkTransactionNew( + version: version, + lockTime: lockTime, + input: input, + output: output, + hint: hint); + + ///List of transaction outputs. + Future> output({dynamic hint}) => + CApi.instance.api.bdkTransactionOutput(that: this, hint: hint); + + ///Encodes an object into a vector. + Future serialize({dynamic hint}) => + CApi.instance.api.bdkTransactionSerialize(that: this, hint: hint); + + ///Returns the regular byte-wise consensus-serialized size of this transaction. + Future size({dynamic hint}) => + CApi.instance.api.bdkTransactionSize(that: this, hint: hint); + + ///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({dynamic hint}) => + CApi.instance.api.bdkTransactionTxid(that: this, hint: hint); + + ///The protocol version, is currently expected to be 1 or 2 (BIP 68). + Future version({dynamic hint}) => + CApi.instance.api.bdkTransactionVersion(that: this, hint: hint); + + ///Returns the “virtual size†(vsize) of this transaction. + /// + Future vsize({dynamic hint}) => + CApi.instance.api.bdkTransactionVsize(that: this, hint: hint); + + ///Returns the regular byte-wise consensus-serialized size of this transaction. + Future weight({dynamic hint}) => + CApi.instance.api.bdkTransactionWeight(that: this, hint: hint); + + @override + int get hashCode => inner.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is BdkTransaction && + runtimeType == other.runtimeType && + inner == other.inner; +} + +///Block height and timestamp of a block +class BlockTime { + ///Confirmation block height + final int height; + + ///Confirmation block timestamp + final int 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, +} + +@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; +} + +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; +} + +/// A output script and an amount of satoshis. +class ScriptAmount { + final BdkScriptBuf script; + final int 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 { + final bool multiSig; + + /// 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.multiSig, + required this.trustWitnessUtxo, + this.assumeHeight, + required this.allowAllSighashes, + required this.removePartialSigs, + required this.tryFinalize, + required this.signWithTapInternalKey, + required this.allowGrinding, + }); + + @override + int get hashCode => + multiSig.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 && + multiSig == other.multiSig && + 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 int received; + + /// Sent value (sats) + /// Sum of owned inputs of this transaction. + final int 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 int? 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 int 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..6b9d7255 --- /dev/null +++ b/lib/src/generated/api/types.freezed.dart @@ -0,0 +1,2258 @@ +// 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#custom-getters-and-methods'); + +/// @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 _$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; +} diff --git a/lib/src/generated/api/wallet.dart b/lib/src/generated/api/wallet.dart new file mode 100644 index 00000000..51b15058 --- /dev/null +++ b/lib/src/generated/api/wallet.dart @@ -0,0 +1,203 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31. + +// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import + +import '../frb_generated.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'; + +Future<(BdkPsbt, TransactionDetails)> finishBumpFeeTxBuilder( + {required String txid, + required double feeRate, + BdkAddress? allowShrinking, + required BdkWallet wallet, + required bool enableRbf, + int? nSequence, + dynamic hint}) => + CApi.instance.api.finishBumpFeeTxBuilder( + txid: txid, + feeRate: feeRate, + allowShrinking: allowShrinking, + wallet: wallet, + enableRbf: enableRbf, + nSequence: nSequence, + hint: hint); + +Future<(BdkPsbt, TransactionDetails)> txBuilderFinish( + {required BdkWallet wallet, + required List recipients, + required List utxos, + (OutPoint, Input, int)? foreignUtxo, + required List unSpendable, + required ChangeSpendPolicy changePolicy, + required bool manuallySelectedOnly, + double? feeRate, + int? feeAbsolute, + required bool drainWallet, + BdkScriptBuf? drainTo, + RbfValue? rbf, + required List data, + dynamic hint}) => + CApi.instance.api.txBuilderFinish( + wallet: wallet, + recipients: recipients, + utxos: utxos, + foreignUtxo: foreignUtxo, + unSpendable: unSpendable, + changePolicy: changePolicy, + manuallySelectedOnly: manuallySelectedOnly, + feeRate: feeRate, + feeAbsolute: feeAbsolute, + drainWallet: drainWallet, + drainTo: drainTo, + rbf: rbf, + data: data, + hint: hint); + +// Rust type: RustOpaqueNom >> +@sealed +class MutexBdkWalletAnyDatabase extends RustOpaque { + MutexBdkWalletAnyDatabase.dcoDecode(List wire) + : super.dcoDecode(wire, _kStaticData); + + MutexBdkWalletAnyDatabase.sseDecode(int ptr, int externalSizeOnNative) + : super.sseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: CApi + .instance.api.rust_arc_increment_strong_count_MutexBdkWalletAnyDatabase, + rustArcDecrementStrongCount: CApi + .instance.api.rust_arc_decrement_strong_count_MutexBdkWalletAnyDatabase, + rustArcDecrementStrongCountPtr: CApi.instance.api + .rust_arc_decrement_strong_count_MutexBdkWalletAnyDatabasePtr, + ); +} + +class BdkWallet { + final MutexBdkWalletAnyDatabase 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 Future<(BdkAddress, int)> getAddress( + {required BdkWallet ptr, + required AddressIndex addressIndex, + dynamic hint}) => + CApi.instance.api.bdkWalletGetAddress( + ptr: ptr, addressIndex: addressIndex, hint: hint); + + /// 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. + Future getBalance({dynamic hint}) => + CApi.instance.api.bdkWalletGetBalance(that: this, hint: hint); + + ///Returns the descriptor used to create addresses for a particular keychain. + static Future getDescriptorForKeychain( + {required BdkWallet ptr, + required KeychainKind keychain, + dynamic hint}) => + CApi.instance.api.bdkWalletGetDescriptorForKeychain( + ptr: ptr, keychain: keychain, hint: hint); + + /// 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 Future<(BdkAddress, int)> getInternalAddress( + {required BdkWallet ptr, + required AddressIndex addressIndex, + dynamic hint}) => + CApi.instance.api.bdkWalletGetInternalAddress( + ptr: ptr, addressIndex: addressIndex, hint: hint); + + ///get the corresponding PSBT Input for a LocalUtxo + Future getPsbtInput( + {required LocalUtxo utxo, + required bool onlyWitnessUtxo, + PsbtSigHashType? sighashType, + dynamic hint}) => + CApi.instance.api.bdkWalletGetPsbtInput( + that: this, + utxo: utxo, + onlyWitnessUtxo: onlyWitnessUtxo, + sighashType: sighashType, + hint: hint); + + /// Return whether or not a script is part of this wallet (either internal or external). + Future isMine({required BdkScriptBuf script, dynamic hint}) => + CApi.instance.api.bdkWalletIsMine(that: this, script: script, hint: hint); + + /// 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. + Future> listTransactions( + {required bool includeRaw, dynamic hint}) => + CApi.instance.api.bdkWalletListTransactions( + that: this, includeRaw: includeRaw, hint: hint); + + /// 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. + Future> listUnspent({dynamic hint}) => + CApi.instance.api.bdkWalletListUnspent(that: this, hint: hint); + + /// Get the Bitcoin network the wallet is using. + Future network({dynamic hint}) => + CApi.instance.api.bdkWalletNetwork(that: this, hint: hint); + + // 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, + dynamic hint}) => + CApi.instance.api.bdkWalletNew( + descriptor: descriptor, + changeDescriptor: changeDescriptor, + network: network, + databaseConfig: databaseConfig, + hint: hint); + + /// 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, + dynamic hint}) => + CApi.instance.api.bdkWalletSign( + ptr: ptr, psbt: psbt, signOptions: signOptions, hint: hint); + + /// Sync the internal database with the blockchain. + static Future sync( + {required BdkWallet ptr, + required BdkBlockchain blockchain, + dynamic hint}) => + CApi.instance.api + .bdkWalletSync(ptr: ptr, blockchain: blockchain, hint: hint); + + @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..0b4c7516 --- /dev/null +++ b/lib/src/generated/frb_generated.dart @@ -0,0 +1,7062 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31. + +// 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.io.dart' if (dart.library.html) 'frb_generated.web.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; + +/// Main entrypoint of the Rust API +class CApi extends BaseEntrypoint { + @internal + static final instance = CApi._(); + + CApi._(); + + /// Initialize flutter_rust_bridge + static Future init({ + CApiApi? 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 => + CApiApiImpl.new; + + @override + WireConstructor get wireConstructor => CApiWire.fromExternalLibrary; + + @override + Future executeRustInitializers() async {} + + @override + ExternalLibraryLoaderConfig get defaultExternalLibraryLoaderConfig => + kDefaultExternalLibraryLoaderConfig; + + @override + String get codegenVersion => '2.0.0-dev.31'; + + static const kDefaultExternalLibraryLoaderConfig = + ExternalLibraryLoaderConfig( + stem: 'bdk_flutter', + ioDirectory: 'rust/target/release/', + webPrefix: 'pkg/', + ); +} + +abstract class CApiApi extends BaseApi { + Future bdkBlockchainBroadcast( + {required BdkBlockchain that, + required BdkTransaction transaction, + dynamic hint}); + + Future bdkBlockchainEstimateFee( + {required BdkBlockchain that, required int target, dynamic hint}); + + Future bdkBlockchainGetBlockHash( + {required BdkBlockchain that, required int height, dynamic hint}); + + Future bdkBlockchainGetHeight( + {required BdkBlockchain that, dynamic hint}); + + Future bdkBlockchainNew( + {required BlockchainConfig blockchainConfig, dynamic hint}); + + Future bdkDescriptorAsString( + {required BdkDescriptor that, dynamic hint}); + + Future bdkDescriptorAsStringPrivate( + {required BdkDescriptor that, dynamic hint}); + + Future bdkDescriptorMaxSatisfactionWeight( + {required BdkDescriptor that, dynamic hint}); + + Future bdkDescriptorNew( + {required String descriptor, required Network network, dynamic hint}); + + Future bdkDescriptorNewBip44( + {required BdkDescriptorSecretKey secretKey, + required KeychainKind keychainKind, + required Network network, + dynamic hint}); + + Future bdkDescriptorNewBip44Public( + {required BdkDescriptorPublicKey publicKey, + required String fingerprint, + required KeychainKind keychainKind, + required Network network, + dynamic hint}); + + Future bdkDescriptorNewBip49( + {required BdkDescriptorSecretKey secretKey, + required KeychainKind keychainKind, + required Network network, + dynamic hint}); + + Future bdkDescriptorNewBip49Public( + {required BdkDescriptorPublicKey publicKey, + required String fingerprint, + required KeychainKind keychainKind, + required Network network, + dynamic hint}); + + Future bdkDescriptorNewBip84( + {required BdkDescriptorSecretKey secretKey, + required KeychainKind keychainKind, + required Network network, + dynamic hint}); + + Future bdkDescriptorNewBip84Public( + {required BdkDescriptorPublicKey publicKey, + required String fingerprint, + required KeychainKind keychainKind, + required Network network, + dynamic hint}); + + Future bdkDescriptorNewBip86( + {required BdkDescriptorSecretKey secretKey, + required KeychainKind keychainKind, + required Network network, + dynamic hint}); + + Future bdkDescriptorNewBip86Public( + {required BdkDescriptorPublicKey publicKey, + required String fingerprint, + required KeychainKind keychainKind, + required Network network, + dynamic hint}); + + Future bdkDerivationPathFromString( + {required String path, dynamic hint}); + + Future bdkDescriptorPublicKeyAsString( + {required BdkDescriptorPublicKey that, dynamic hint}); + + Future bdkDescriptorPublicKeyDerive( + {required BdkDescriptorPublicKey ptr, + required BdkDerivationPath path, + dynamic hint}); + + Future bdkDescriptorPublicKeyExtend( + {required BdkDescriptorPublicKey ptr, + required BdkDerivationPath path, + dynamic hint}); + + Future bdkDescriptorPublicKeyFromString( + {required String publicKey, dynamic hint}); + + Future bdkDescriptorSecretKeyAsPublic( + {required BdkDescriptorSecretKey ptr, dynamic hint}); + + Future bdkDescriptorSecretKeyAsString( + {required BdkDescriptorSecretKey that, dynamic hint}); + + Future bdkDescriptorSecretKeyCreate( + {required Network network, + required BdkMnemonic mnemonic, + String? password, + dynamic hint}); + + Future bdkDescriptorSecretKeyDerive( + {required BdkDescriptorSecretKey ptr, + required BdkDerivationPath path, + dynamic hint}); + + Future bdkDescriptorSecretKeyExtend( + {required BdkDescriptorSecretKey ptr, + required BdkDerivationPath path, + dynamic hint}); + + Future bdkDescriptorSecretKeyFromString( + {required String secretKey, dynamic hint}); + + Future bdkDescriptorSecretKeySecretBytes( + {required BdkDescriptorSecretKey that, dynamic hint}); + + Future bdkMnemonicAsString({required BdkMnemonic that, dynamic hint}); + + Future bdkMnemonicFromEntropy( + {required List entropy, dynamic hint}); + + Future bdkMnemonicFromString( + {required String mnemonic, dynamic hint}); + + Future bdkMnemonicNew( + {required WordCount wordCount, dynamic hint}); + + Future bdkPsbtCombine( + {required BdkPsbt ptr, required BdkPsbt other, dynamic hint}); + + Future bdkPsbtExtractTx({required BdkPsbt ptr, dynamic hint}); + + Future bdkPsbtFeeAmount({required BdkPsbt that, dynamic hint}); + + Future bdkPsbtFeeRate({required BdkPsbt that, dynamic hint}); + + Future bdkPsbtFromStr({required String psbtBase64, dynamic hint}); + + Future bdkPsbtJsonSerialize({required BdkPsbt that, dynamic hint}); + + Future bdkPsbtSerialize({required BdkPsbt that, dynamic hint}); + + Future bdkPsbtTxid({required BdkPsbt that, dynamic hint}); + + Future bdkAddressAsString({required BdkAddress that, dynamic hint}); + + Future bdkAddressFromScript( + {required BdkScriptBuf script, required Network network, dynamic hint}); + + Future bdkAddressFromString( + {required String address, required Network network, dynamic hint}); + + Future bdkAddressIsValidForNetwork( + {required BdkAddress that, required Network network, dynamic hint}); + + Future bdkAddressNetwork({required BdkAddress that, dynamic hint}); + + Future bdkAddressPayload({required BdkAddress that, dynamic hint}); + + Future bdkAddressScript( + {required BdkAddress ptr, dynamic hint}); + + Future bdkAddressToQrUri({required BdkAddress that, dynamic hint}); + + Future bdkScriptBufEmpty({dynamic hint}); + + Future bdkScriptBufFromHex({required String s, dynamic hint}); + + Future bdkScriptBufWithCapacity( + {required int capacity, dynamic hint}); + + Future bdkTransactionFromBytes( + {required List transactionBytes, dynamic hint}); + + Future> bdkTransactionInput( + {required BdkTransaction that, dynamic hint}); + + Future bdkTransactionIsCoinBase( + {required BdkTransaction that, dynamic hint}); + + Future bdkTransactionIsExplicitlyRbf( + {required BdkTransaction that, dynamic hint}); + + Future bdkTransactionIsLockTimeEnabled( + {required BdkTransaction that, dynamic hint}); + + Future bdkTransactionLockTime( + {required BdkTransaction that, dynamic hint}); + + Future bdkTransactionNew( + {required int version, + required LockTime lockTime, + required List input, + required List output, + dynamic hint}); + + Future> bdkTransactionOutput( + {required BdkTransaction that, dynamic hint}); + + Future bdkTransactionSerialize( + {required BdkTransaction that, dynamic hint}); + + Future bdkTransactionSize({required BdkTransaction that, dynamic hint}); + + Future bdkTransactionTxid( + {required BdkTransaction that, dynamic hint}); + + Future bdkTransactionVersion( + {required BdkTransaction that, dynamic hint}); + + Future bdkTransactionVsize({required BdkTransaction that, dynamic hint}); + + Future bdkTransactionWeight( + {required BdkTransaction that, dynamic hint}); + + Future<(BdkAddress, int)> bdkWalletGetAddress( + {required BdkWallet ptr, + required AddressIndex addressIndex, + dynamic hint}); + + Future bdkWalletGetBalance({required BdkWallet that, dynamic hint}); + + Future bdkWalletGetDescriptorForKeychain( + {required BdkWallet ptr, required KeychainKind keychain, dynamic hint}); + + Future<(BdkAddress, int)> bdkWalletGetInternalAddress( + {required BdkWallet ptr, + required AddressIndex addressIndex, + dynamic hint}); + + Future bdkWalletGetPsbtInput( + {required BdkWallet that, + required LocalUtxo utxo, + required bool onlyWitnessUtxo, + PsbtSigHashType? sighashType, + dynamic hint}); + + Future bdkWalletIsMine( + {required BdkWallet that, required BdkScriptBuf script, dynamic hint}); + + Future> bdkWalletListTransactions( + {required BdkWallet that, required bool includeRaw, dynamic hint}); + + Future> bdkWalletListUnspent( + {required BdkWallet that, dynamic hint}); + + Future bdkWalletNetwork({required BdkWallet that, dynamic hint}); + + Future bdkWalletNew( + {required BdkDescriptor descriptor, + BdkDescriptor? changeDescriptor, + required Network network, + required DatabaseConfig databaseConfig, + dynamic hint}); + + Future bdkWalletSign( + {required BdkWallet ptr, + required BdkPsbt psbt, + SignOptions? signOptions, + dynamic hint}); + + Future bdkWalletSync( + {required BdkWallet ptr, + required BdkBlockchain blockchain, + dynamic hint}); + + Future<(BdkPsbt, TransactionDetails)> finishBumpFeeTxBuilder( + {required String txid, + required double feeRate, + BdkAddress? allowShrinking, + required BdkWallet wallet, + required bool enableRbf, + int? nSequence, + dynamic hint}); + + Future<(BdkPsbt, TransactionDetails)> txBuilderFinish( + {required BdkWallet wallet, + required List recipients, + required List utxos, + (OutPoint, Input, int)? foreignUtxo, + required List unSpendable, + required ChangeSpendPolicy changePolicy, + required bool manuallySelectedOnly, + double? feeRate, + int? feeAbsolute, + required bool drainWallet, + BdkScriptBuf? drainTo, + RbfValue? rbf, + required List data, + dynamic hint}); + + 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_MutexPartiallySignedTransaction; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_MutexPartiallySignedTransaction; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_MutexPartiallySignedTransactionPtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_MutexBdkWalletAnyDatabase; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_MutexBdkWalletAnyDatabase; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_MutexBdkWalletAnyDatabasePtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_BdkBitcoinAddress; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_BdkBitcoinAddress; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_BdkBitcoinAddressPtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_BitcoinBip32DerivationPath; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_BitcoinBip32DerivationPath; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_BitcoinBip32DerivationPathPtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_KeysDescriptorPublicKey; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_KeysDescriptorPublicKey; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_KeysDescriptorPublicKeyPtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_KeysDescriptorSecretKey; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_KeysDescriptorSecretKey; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_KeysDescriptorSecretKeyPtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_KeysKeyMap; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_KeysKeyMap; + + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_KeysKeyMapPtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_KeysBip39Mnemonic; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_KeysBip39Mnemonic; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_KeysBip39MnemonicPtr; +} + +class CApiApiImpl extends CApiApiImplPlatform implements CApiApi { + CApiApiImpl({ + required super.handler, + required super.wire, + required super.generalizedFrbRustBinding, + required super.portManager, + }); + + @override + Future bdkBlockchainBroadcast( + {required BdkBlockchain that, + required BdkTransaction transaction, + dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_blockchain(that); + var arg1 = cst_encode_box_autoadd_bdk_transaction(transaction); + return wire.wire_bdk_blockchain_broadcast(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkBlockchainBroadcastConstMeta, + argValues: [that, transaction], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkBlockchainBroadcastConstMeta => const TaskConstMeta( + debugName: "bdk_blockchain_broadcast", + argNames: ["that", "transaction"], + ); + + @override + Future bdkBlockchainEstimateFee( + {required BdkBlockchain that, required int target, dynamic hint}) { + 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_bdk_blockchain_estimate_fee(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_fee_rate, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkBlockchainEstimateFeeConstMeta, + argValues: [that, target], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkBlockchainEstimateFeeConstMeta => const TaskConstMeta( + debugName: "bdk_blockchain_estimate_fee", + argNames: ["that", "target"], + ); + + @override + Future bdkBlockchainGetBlockHash( + {required BdkBlockchain that, required int height, dynamic hint}) { + 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_bdk_blockchain_get_block_hash(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkBlockchainGetBlockHashConstMeta, + argValues: [that, height], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkBlockchainGetBlockHashConstMeta => const TaskConstMeta( + debugName: "bdk_blockchain_get_block_hash", + argNames: ["that", "height"], + ); + + @override + Future bdkBlockchainGetHeight( + {required BdkBlockchain that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_blockchain(that); + return wire.wire_bdk_blockchain_get_height(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_u_32, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkBlockchainGetHeightConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkBlockchainGetHeightConstMeta => const TaskConstMeta( + debugName: "bdk_blockchain_get_height", + argNames: ["that"], + ); + + @override + Future bdkBlockchainNew( + {required BlockchainConfig blockchainConfig, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_blockchain_config(blockchainConfig); + return wire.wire_bdk_blockchain_new(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_blockchain, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkBlockchainNewConstMeta, + argValues: [blockchainConfig], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkBlockchainNewConstMeta => const TaskConstMeta( + debugName: "bdk_blockchain_new", + argNames: ["blockchainConfig"], + ); + + @override + Future bdkDescriptorAsString( + {required BdkDescriptor that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_descriptor(that); + return wire.wire_bdk_descriptor_as_string(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: null, + ), + constMeta: kBdkDescriptorAsStringConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkDescriptorAsStringConstMeta => const TaskConstMeta( + debugName: "bdk_descriptor_as_string", + argNames: ["that"], + ); + + @override + Future bdkDescriptorAsStringPrivate( + {required BdkDescriptor that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_descriptor(that); + return wire.wire_bdk_descriptor_as_string_private(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: null, + ), + constMeta: kBdkDescriptorAsStringPrivateConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkDescriptorAsStringPrivateConstMeta => + const TaskConstMeta( + debugName: "bdk_descriptor_as_string_private", + argNames: ["that"], + ); + + @override + Future bdkDescriptorMaxSatisfactionWeight( + {required BdkDescriptor that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_descriptor(that); + return wire.wire_bdk_descriptor_max_satisfaction_weight(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_usize, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkDescriptorMaxSatisfactionWeightConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkDescriptorMaxSatisfactionWeightConstMeta => + const TaskConstMeta( + debugName: "bdk_descriptor_max_satisfaction_weight", + argNames: ["that"], + ); + + @override + Future bdkDescriptorNew( + {required String descriptor, required Network network, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(descriptor); + var arg1 = cst_encode_network(network); + return wire.wire_bdk_descriptor_new(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_descriptor, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkDescriptorNewConstMeta, + argValues: [descriptor, network], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkDescriptorNewConstMeta => const TaskConstMeta( + debugName: "bdk_descriptor_new", + argNames: ["descriptor", "network"], + ); + + @override + Future bdkDescriptorNewBip44( + {required BdkDescriptorSecretKey secretKey, + required KeychainKind keychainKind, + required Network network, + dynamic hint}) { + 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_bdk_descriptor_new_bip44(port_, arg0, arg1, arg2); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_descriptor, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkDescriptorNewBip44ConstMeta, + argValues: [secretKey, keychainKind, network], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkDescriptorNewBip44ConstMeta => const TaskConstMeta( + debugName: "bdk_descriptor_new_bip44", + argNames: ["secretKey", "keychainKind", "network"], + ); + + @override + Future bdkDescriptorNewBip44Public( + {required BdkDescriptorPublicKey publicKey, + required String fingerprint, + required KeychainKind keychainKind, + required Network network, + dynamic hint}) { + 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_bdk_descriptor_new_bip44_public( + port_, arg0, arg1, arg2, arg3); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_descriptor, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkDescriptorNewBip44PublicConstMeta, + argValues: [publicKey, fingerprint, keychainKind, network], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkDescriptorNewBip44PublicConstMeta => + const TaskConstMeta( + debugName: "bdk_descriptor_new_bip44_public", + argNames: ["publicKey", "fingerprint", "keychainKind", "network"], + ); + + @override + Future bdkDescriptorNewBip49( + {required BdkDescriptorSecretKey secretKey, + required KeychainKind keychainKind, + required Network network, + dynamic hint}) { + 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_bdk_descriptor_new_bip49(port_, arg0, arg1, arg2); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_descriptor, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkDescriptorNewBip49ConstMeta, + argValues: [secretKey, keychainKind, network], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkDescriptorNewBip49ConstMeta => const TaskConstMeta( + debugName: "bdk_descriptor_new_bip49", + argNames: ["secretKey", "keychainKind", "network"], + ); + + @override + Future bdkDescriptorNewBip49Public( + {required BdkDescriptorPublicKey publicKey, + required String fingerprint, + required KeychainKind keychainKind, + required Network network, + dynamic hint}) { + 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_bdk_descriptor_new_bip49_public( + port_, arg0, arg1, arg2, arg3); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_descriptor, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkDescriptorNewBip49PublicConstMeta, + argValues: [publicKey, fingerprint, keychainKind, network], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkDescriptorNewBip49PublicConstMeta => + const TaskConstMeta( + debugName: "bdk_descriptor_new_bip49_public", + argNames: ["publicKey", "fingerprint", "keychainKind", "network"], + ); + + @override + Future bdkDescriptorNewBip84( + {required BdkDescriptorSecretKey secretKey, + required KeychainKind keychainKind, + required Network network, + dynamic hint}) { + 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_bdk_descriptor_new_bip84(port_, arg0, arg1, arg2); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_descriptor, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkDescriptorNewBip84ConstMeta, + argValues: [secretKey, keychainKind, network], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkDescriptorNewBip84ConstMeta => const TaskConstMeta( + debugName: "bdk_descriptor_new_bip84", + argNames: ["secretKey", "keychainKind", "network"], + ); + + @override + Future bdkDescriptorNewBip84Public( + {required BdkDescriptorPublicKey publicKey, + required String fingerprint, + required KeychainKind keychainKind, + required Network network, + dynamic hint}) { + 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_bdk_descriptor_new_bip84_public( + port_, arg0, arg1, arg2, arg3); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_descriptor, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkDescriptorNewBip84PublicConstMeta, + argValues: [publicKey, fingerprint, keychainKind, network], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkDescriptorNewBip84PublicConstMeta => + const TaskConstMeta( + debugName: "bdk_descriptor_new_bip84_public", + argNames: ["publicKey", "fingerprint", "keychainKind", "network"], + ); + + @override + Future bdkDescriptorNewBip86( + {required BdkDescriptorSecretKey secretKey, + required KeychainKind keychainKind, + required Network network, + dynamic hint}) { + 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_bdk_descriptor_new_bip86(port_, arg0, arg1, arg2); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_descriptor, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkDescriptorNewBip86ConstMeta, + argValues: [secretKey, keychainKind, network], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkDescriptorNewBip86ConstMeta => const TaskConstMeta( + debugName: "bdk_descriptor_new_bip86", + argNames: ["secretKey", "keychainKind", "network"], + ); + + @override + Future bdkDescriptorNewBip86Public( + {required BdkDescriptorPublicKey publicKey, + required String fingerprint, + required KeychainKind keychainKind, + required Network network, + dynamic hint}) { + 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_bdk_descriptor_new_bip86_public( + port_, arg0, arg1, arg2, arg3); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_descriptor, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkDescriptorNewBip86PublicConstMeta, + argValues: [publicKey, fingerprint, keychainKind, network], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkDescriptorNewBip86PublicConstMeta => + const TaskConstMeta( + debugName: "bdk_descriptor_new_bip86_public", + argNames: ["publicKey", "fingerprint", "keychainKind", "network"], + ); + + @override + Future bdkDerivationPathFromString( + {required String path, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(path); + return wire.wire_bdk_derivation_path_from_string(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_derivation_path, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkDerivationPathFromStringConstMeta, + argValues: [path], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkDerivationPathFromStringConstMeta => + const TaskConstMeta( + debugName: "bdk_derivation_path_from_string", + argNames: ["path"], + ); + + @override + Future bdkDescriptorPublicKeyAsString( + {required BdkDescriptorPublicKey that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_descriptor_public_key(that); + return wire.wire_bdk_descriptor_public_key_as_string(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: null, + ), + constMeta: kBdkDescriptorPublicKeyAsStringConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkDescriptorPublicKeyAsStringConstMeta => + const TaskConstMeta( + debugName: "bdk_descriptor_public_key_as_string", + argNames: ["that"], + ); + + @override + Future bdkDescriptorPublicKeyDerive( + {required BdkDescriptorPublicKey ptr, + required BdkDerivationPath path, + dynamic hint}) { + 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_bdk_descriptor_public_key_derive(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_descriptor_public_key, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkDescriptorPublicKeyDeriveConstMeta, + argValues: [ptr, path], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkDescriptorPublicKeyDeriveConstMeta => + const TaskConstMeta( + debugName: "bdk_descriptor_public_key_derive", + argNames: ["ptr", "path"], + ); + + @override + Future bdkDescriptorPublicKeyExtend( + {required BdkDescriptorPublicKey ptr, + required BdkDerivationPath path, + dynamic hint}) { + 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_bdk_descriptor_public_key_extend(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_descriptor_public_key, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkDescriptorPublicKeyExtendConstMeta, + argValues: [ptr, path], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkDescriptorPublicKeyExtendConstMeta => + const TaskConstMeta( + debugName: "bdk_descriptor_public_key_extend", + argNames: ["ptr", "path"], + ); + + @override + Future bdkDescriptorPublicKeyFromString( + {required String publicKey, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(publicKey); + return wire.wire_bdk_descriptor_public_key_from_string(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_descriptor_public_key, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkDescriptorPublicKeyFromStringConstMeta, + argValues: [publicKey], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkDescriptorPublicKeyFromStringConstMeta => + const TaskConstMeta( + debugName: "bdk_descriptor_public_key_from_string", + argNames: ["publicKey"], + ); + + @override + Future bdkDescriptorSecretKeyAsPublic( + {required BdkDescriptorSecretKey ptr, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(ptr); + return wire.wire_bdk_descriptor_secret_key_as_public(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_descriptor_public_key, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkDescriptorSecretKeyAsPublicConstMeta, + argValues: [ptr], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkDescriptorSecretKeyAsPublicConstMeta => + const TaskConstMeta( + debugName: "bdk_descriptor_secret_key_as_public", + argNames: ["ptr"], + ); + + @override + Future bdkDescriptorSecretKeyAsString( + {required BdkDescriptorSecretKey that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(that); + return wire.wire_bdk_descriptor_secret_key_as_string(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: null, + ), + constMeta: kBdkDescriptorSecretKeyAsStringConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkDescriptorSecretKeyAsStringConstMeta => + const TaskConstMeta( + debugName: "bdk_descriptor_secret_key_as_string", + argNames: ["that"], + ); + + @override + Future bdkDescriptorSecretKeyCreate( + {required Network network, + required BdkMnemonic mnemonic, + String? password, + dynamic hint}) { + 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_bdk_descriptor_secret_key_create( + port_, arg0, arg1, arg2); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_descriptor_secret_key, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkDescriptorSecretKeyCreateConstMeta, + argValues: [network, mnemonic, password], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkDescriptorSecretKeyCreateConstMeta => + const TaskConstMeta( + debugName: "bdk_descriptor_secret_key_create", + argNames: ["network", "mnemonic", "password"], + ); + + @override + Future bdkDescriptorSecretKeyDerive( + {required BdkDescriptorSecretKey ptr, + required BdkDerivationPath path, + dynamic hint}) { + 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_bdk_descriptor_secret_key_derive(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_descriptor_secret_key, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkDescriptorSecretKeyDeriveConstMeta, + argValues: [ptr, path], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkDescriptorSecretKeyDeriveConstMeta => + const TaskConstMeta( + debugName: "bdk_descriptor_secret_key_derive", + argNames: ["ptr", "path"], + ); + + @override + Future bdkDescriptorSecretKeyExtend( + {required BdkDescriptorSecretKey ptr, + required BdkDerivationPath path, + dynamic hint}) { + 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_bdk_descriptor_secret_key_extend(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_descriptor_secret_key, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkDescriptorSecretKeyExtendConstMeta, + argValues: [ptr, path], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkDescriptorSecretKeyExtendConstMeta => + const TaskConstMeta( + debugName: "bdk_descriptor_secret_key_extend", + argNames: ["ptr", "path"], + ); + + @override + Future bdkDescriptorSecretKeyFromString( + {required String secretKey, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(secretKey); + return wire.wire_bdk_descriptor_secret_key_from_string(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_descriptor_secret_key, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkDescriptorSecretKeyFromStringConstMeta, + argValues: [secretKey], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkDescriptorSecretKeyFromStringConstMeta => + const TaskConstMeta( + debugName: "bdk_descriptor_secret_key_from_string", + argNames: ["secretKey"], + ); + + @override + Future bdkDescriptorSecretKeySecretBytes( + {required BdkDescriptorSecretKey that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(that); + return wire.wire_bdk_descriptor_secret_key_secret_bytes(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_prim_u_8_strict, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkDescriptorSecretKeySecretBytesConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkDescriptorSecretKeySecretBytesConstMeta => + const TaskConstMeta( + debugName: "bdk_descriptor_secret_key_secret_bytes", + argNames: ["that"], + ); + + @override + Future bdkMnemonicAsString( + {required BdkMnemonic that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_mnemonic(that); + return wire.wire_bdk_mnemonic_as_string(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: null, + ), + constMeta: kBdkMnemonicAsStringConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkMnemonicAsStringConstMeta => const TaskConstMeta( + debugName: "bdk_mnemonic_as_string", + argNames: ["that"], + ); + + @override + Future bdkMnemonicFromEntropy( + {required List entropy, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_list_prim_u_8_loose(entropy); + return wire.wire_bdk_mnemonic_from_entropy(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_mnemonic, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkMnemonicFromEntropyConstMeta, + argValues: [entropy], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkMnemonicFromEntropyConstMeta => const TaskConstMeta( + debugName: "bdk_mnemonic_from_entropy", + argNames: ["entropy"], + ); + + @override + Future bdkMnemonicFromString( + {required String mnemonic, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(mnemonic); + return wire.wire_bdk_mnemonic_from_string(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_mnemonic, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkMnemonicFromStringConstMeta, + argValues: [mnemonic], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkMnemonicFromStringConstMeta => const TaskConstMeta( + debugName: "bdk_mnemonic_from_string", + argNames: ["mnemonic"], + ); + + @override + Future bdkMnemonicNew( + {required WordCount wordCount, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_word_count(wordCount); + return wire.wire_bdk_mnemonic_new(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_mnemonic, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkMnemonicNewConstMeta, + argValues: [wordCount], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkMnemonicNewConstMeta => const TaskConstMeta( + debugName: "bdk_mnemonic_new", + argNames: ["wordCount"], + ); + + @override + Future bdkPsbtCombine( + {required BdkPsbt ptr, required BdkPsbt other, dynamic hint}) { + 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_bdk_psbt_combine(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_psbt, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkPsbtCombineConstMeta, + argValues: [ptr, other], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkPsbtCombineConstMeta => const TaskConstMeta( + debugName: "bdk_psbt_combine", + argNames: ["ptr", "other"], + ); + + @override + Future bdkPsbtExtractTx( + {required BdkPsbt ptr, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_psbt(ptr); + return wire.wire_bdk_psbt_extract_tx(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_transaction, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkPsbtExtractTxConstMeta, + argValues: [ptr], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkPsbtExtractTxConstMeta => const TaskConstMeta( + debugName: "bdk_psbt_extract_tx", + argNames: ["ptr"], + ); + + @override + Future bdkPsbtFeeAmount({required BdkPsbt that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_psbt(that); + return wire.wire_bdk_psbt_fee_amount(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_opt_box_autoadd_u_64, + decodeErrorData: null, + ), + constMeta: kBdkPsbtFeeAmountConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkPsbtFeeAmountConstMeta => const TaskConstMeta( + debugName: "bdk_psbt_fee_amount", + argNames: ["that"], + ); + + @override + Future bdkPsbtFeeRate({required BdkPsbt that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_psbt(that); + return wire.wire_bdk_psbt_fee_rate(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_opt_box_autoadd_fee_rate, + decodeErrorData: null, + ), + constMeta: kBdkPsbtFeeRateConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkPsbtFeeRateConstMeta => const TaskConstMeta( + debugName: "bdk_psbt_fee_rate", + argNames: ["that"], + ); + + @override + Future bdkPsbtFromStr({required String psbtBase64, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(psbtBase64); + return wire.wire_bdk_psbt_from_str(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_psbt, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkPsbtFromStrConstMeta, + argValues: [psbtBase64], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkPsbtFromStrConstMeta => const TaskConstMeta( + debugName: "bdk_psbt_from_str", + argNames: ["psbtBase64"], + ); + + @override + Future bdkPsbtJsonSerialize({required BdkPsbt that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_psbt(that); + return wire.wire_bdk_psbt_json_serialize(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: null, + ), + constMeta: kBdkPsbtJsonSerializeConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkPsbtJsonSerializeConstMeta => const TaskConstMeta( + debugName: "bdk_psbt_json_serialize", + argNames: ["that"], + ); + + @override + Future bdkPsbtSerialize({required BdkPsbt that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_psbt(that); + return wire.wire_bdk_psbt_serialize(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: null, + ), + constMeta: kBdkPsbtSerializeConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkPsbtSerializeConstMeta => const TaskConstMeta( + debugName: "bdk_psbt_serialize", + argNames: ["that"], + ); + + @override + Future bdkPsbtTxid({required BdkPsbt that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_psbt(that); + return wire.wire_bdk_psbt_txid(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: null, + ), + constMeta: kBdkPsbtTxidConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkPsbtTxidConstMeta => const TaskConstMeta( + debugName: "bdk_psbt_txid", + argNames: ["that"], + ); + + @override + Future bdkAddressAsString({required BdkAddress that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_address(that); + return wire.wire_bdk_address_as_string(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: null, + ), + constMeta: kBdkAddressAsStringConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkAddressAsStringConstMeta => const TaskConstMeta( + debugName: "bdk_address_as_string", + argNames: ["that"], + ); + + @override + Future bdkAddressFromScript( + {required BdkScriptBuf script, required Network network, dynamic hint}) { + 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_bdk_address_from_script(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_address, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkAddressFromScriptConstMeta, + argValues: [script, network], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkAddressFromScriptConstMeta => const TaskConstMeta( + debugName: "bdk_address_from_script", + argNames: ["script", "network"], + ); + + @override + Future bdkAddressFromString( + {required String address, required Network network, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(address); + var arg1 = cst_encode_network(network); + return wire.wire_bdk_address_from_string(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_address, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkAddressFromStringConstMeta, + argValues: [address, network], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkAddressFromStringConstMeta => const TaskConstMeta( + debugName: "bdk_address_from_string", + argNames: ["address", "network"], + ); + + @override + Future bdkAddressIsValidForNetwork( + {required BdkAddress that, required Network network, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_address(that); + var arg1 = cst_encode_network(network); + return wire.wire_bdk_address_is_valid_for_network(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bool, + decodeErrorData: null, + ), + constMeta: kBdkAddressIsValidForNetworkConstMeta, + argValues: [that, network], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkAddressIsValidForNetworkConstMeta => + const TaskConstMeta( + debugName: "bdk_address_is_valid_for_network", + argNames: ["that", "network"], + ); + + @override + Future bdkAddressNetwork({required BdkAddress that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_address(that); + return wire.wire_bdk_address_network(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_network, + decodeErrorData: null, + ), + constMeta: kBdkAddressNetworkConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkAddressNetworkConstMeta => const TaskConstMeta( + debugName: "bdk_address_network", + argNames: ["that"], + ); + + @override + Future bdkAddressPayload({required BdkAddress that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_address(that); + return wire.wire_bdk_address_payload(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_payload, + decodeErrorData: null, + ), + constMeta: kBdkAddressPayloadConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkAddressPayloadConstMeta => const TaskConstMeta( + debugName: "bdk_address_payload", + argNames: ["that"], + ); + + @override + Future bdkAddressScript( + {required BdkAddress ptr, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_address(ptr); + return wire.wire_bdk_address_script(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_script_buf, + decodeErrorData: null, + ), + constMeta: kBdkAddressScriptConstMeta, + argValues: [ptr], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkAddressScriptConstMeta => const TaskConstMeta( + debugName: "bdk_address_script", + argNames: ["ptr"], + ); + + @override + Future bdkAddressToQrUri({required BdkAddress that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_address(that); + return wire.wire_bdk_address_to_qr_uri(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: null, + ), + constMeta: kBdkAddressToQrUriConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkAddressToQrUriConstMeta => const TaskConstMeta( + debugName: "bdk_address_to_qr_uri", + argNames: ["that"], + ); + + @override + Future bdkScriptBufEmpty({dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + return wire.wire_bdk_script_buf_empty(port_); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_script_buf, + decodeErrorData: null, + ), + constMeta: kBdkScriptBufEmptyConstMeta, + argValues: [], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkScriptBufEmptyConstMeta => const TaskConstMeta( + debugName: "bdk_script_buf_empty", + argNames: [], + ); + + @override + Future bdkScriptBufFromHex({required String s, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(s); + return wire.wire_bdk_script_buf_from_hex(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_script_buf, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkScriptBufFromHexConstMeta, + argValues: [s], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkScriptBufFromHexConstMeta => const TaskConstMeta( + debugName: "bdk_script_buf_from_hex", + argNames: ["s"], + ); + + @override + Future bdkScriptBufWithCapacity( + {required int capacity, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_usize(capacity); + return wire.wire_bdk_script_buf_with_capacity(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_script_buf, + decodeErrorData: null, + ), + constMeta: kBdkScriptBufWithCapacityConstMeta, + argValues: [capacity], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkScriptBufWithCapacityConstMeta => const TaskConstMeta( + debugName: "bdk_script_buf_with_capacity", + argNames: ["capacity"], + ); + + @override + Future bdkTransactionFromBytes( + {required List transactionBytes, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_list_prim_u_8_loose(transactionBytes); + return wire.wire_bdk_transaction_from_bytes(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_transaction, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkTransactionFromBytesConstMeta, + argValues: [transactionBytes], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkTransactionFromBytesConstMeta => const TaskConstMeta( + debugName: "bdk_transaction_from_bytes", + argNames: ["transactionBytes"], + ); + + @override + Future> bdkTransactionInput( + {required BdkTransaction that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_transaction(that); + return wire.wire_bdk_transaction_input(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_tx_in, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkTransactionInputConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkTransactionInputConstMeta => const TaskConstMeta( + debugName: "bdk_transaction_input", + argNames: ["that"], + ); + + @override + Future bdkTransactionIsCoinBase( + {required BdkTransaction that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_transaction(that); + return wire.wire_bdk_transaction_is_coin_base(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bool, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkTransactionIsCoinBaseConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkTransactionIsCoinBaseConstMeta => const TaskConstMeta( + debugName: "bdk_transaction_is_coin_base", + argNames: ["that"], + ); + + @override + Future bdkTransactionIsExplicitlyRbf( + {required BdkTransaction that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_transaction(that); + return wire.wire_bdk_transaction_is_explicitly_rbf(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bool, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkTransactionIsExplicitlyRbfConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkTransactionIsExplicitlyRbfConstMeta => + const TaskConstMeta( + debugName: "bdk_transaction_is_explicitly_rbf", + argNames: ["that"], + ); + + @override + Future bdkTransactionIsLockTimeEnabled( + {required BdkTransaction that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_transaction(that); + return wire.wire_bdk_transaction_is_lock_time_enabled(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bool, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkTransactionIsLockTimeEnabledConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkTransactionIsLockTimeEnabledConstMeta => + const TaskConstMeta( + debugName: "bdk_transaction_is_lock_time_enabled", + argNames: ["that"], + ); + + @override + Future bdkTransactionLockTime( + {required BdkTransaction that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_transaction(that); + return wire.wire_bdk_transaction_lock_time(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_lock_time, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkTransactionLockTimeConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkTransactionLockTimeConstMeta => const TaskConstMeta( + debugName: "bdk_transaction_lock_time", + argNames: ["that"], + ); + + @override + Future bdkTransactionNew( + {required int version, + required LockTime lockTime, + required List input, + required List output, + dynamic hint}) { + 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_bdk_transaction_new(port_, arg0, arg1, arg2, arg3); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_transaction, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkTransactionNewConstMeta, + argValues: [version, lockTime, input, output], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkTransactionNewConstMeta => const TaskConstMeta( + debugName: "bdk_transaction_new", + argNames: ["version", "lockTime", "input", "output"], + ); + + @override + Future> bdkTransactionOutput( + {required BdkTransaction that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_transaction(that); + return wire.wire_bdk_transaction_output(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_tx_out, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkTransactionOutputConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkTransactionOutputConstMeta => const TaskConstMeta( + debugName: "bdk_transaction_output", + argNames: ["that"], + ); + + @override + Future bdkTransactionSerialize( + {required BdkTransaction that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_transaction(that); + return wire.wire_bdk_transaction_serialize(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_prim_u_8_strict, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkTransactionSerializeConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkTransactionSerializeConstMeta => const TaskConstMeta( + debugName: "bdk_transaction_serialize", + argNames: ["that"], + ); + + @override + Future bdkTransactionSize({required BdkTransaction that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_transaction(that); + return wire.wire_bdk_transaction_size(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_u_64, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkTransactionSizeConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkTransactionSizeConstMeta => const TaskConstMeta( + debugName: "bdk_transaction_size", + argNames: ["that"], + ); + + @override + Future bdkTransactionTxid( + {required BdkTransaction that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_transaction(that); + return wire.wire_bdk_transaction_txid(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkTransactionTxidConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkTransactionTxidConstMeta => const TaskConstMeta( + debugName: "bdk_transaction_txid", + argNames: ["that"], + ); + + @override + Future bdkTransactionVersion( + {required BdkTransaction that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_transaction(that); + return wire.wire_bdk_transaction_version(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_i_32, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkTransactionVersionConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkTransactionVersionConstMeta => const TaskConstMeta( + debugName: "bdk_transaction_version", + argNames: ["that"], + ); + + @override + Future bdkTransactionVsize( + {required BdkTransaction that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_transaction(that); + return wire.wire_bdk_transaction_vsize(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_u_64, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkTransactionVsizeConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkTransactionVsizeConstMeta => const TaskConstMeta( + debugName: "bdk_transaction_vsize", + argNames: ["that"], + ); + + @override + Future bdkTransactionWeight( + {required BdkTransaction that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_transaction(that); + return wire.wire_bdk_transaction_weight(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_u_64, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkTransactionWeightConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkTransactionWeightConstMeta => const TaskConstMeta( + debugName: "bdk_transaction_weight", + argNames: ["that"], + ); + + @override + Future<(BdkAddress, int)> bdkWalletGetAddress( + {required BdkWallet ptr, + required AddressIndex addressIndex, + dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_wallet(ptr); + var arg1 = cst_encode_box_autoadd_address_index(addressIndex); + return wire.wire_bdk_wallet_get_address(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_record_bdk_address_u_32, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkWalletGetAddressConstMeta, + argValues: [ptr, addressIndex], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkWalletGetAddressConstMeta => const TaskConstMeta( + debugName: "bdk_wallet_get_address", + argNames: ["ptr", "addressIndex"], + ); + + @override + Future bdkWalletGetBalance({required BdkWallet that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_wallet(that); + return wire.wire_bdk_wallet_get_balance(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_balance, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkWalletGetBalanceConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkWalletGetBalanceConstMeta => const TaskConstMeta( + debugName: "bdk_wallet_get_balance", + argNames: ["that"], + ); + + @override + Future bdkWalletGetDescriptorForKeychain( + {required BdkWallet ptr, required KeychainKind keychain, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_wallet(ptr); + var arg1 = cst_encode_keychain_kind(keychain); + return wire.wire_bdk_wallet_get_descriptor_for_keychain( + port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_descriptor, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkWalletGetDescriptorForKeychainConstMeta, + argValues: [ptr, keychain], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkWalletGetDescriptorForKeychainConstMeta => + const TaskConstMeta( + debugName: "bdk_wallet_get_descriptor_for_keychain", + argNames: ["ptr", "keychain"], + ); + + @override + Future<(BdkAddress, int)> bdkWalletGetInternalAddress( + {required BdkWallet ptr, + required AddressIndex addressIndex, + dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_wallet(ptr); + var arg1 = cst_encode_box_autoadd_address_index(addressIndex); + return wire.wire_bdk_wallet_get_internal_address(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_record_bdk_address_u_32, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkWalletGetInternalAddressConstMeta, + argValues: [ptr, addressIndex], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkWalletGetInternalAddressConstMeta => + const TaskConstMeta( + debugName: "bdk_wallet_get_internal_address", + argNames: ["ptr", "addressIndex"], + ); + + @override + Future bdkWalletGetPsbtInput( + {required BdkWallet that, + required LocalUtxo utxo, + required bool onlyWitnessUtxo, + PsbtSigHashType? sighashType, + dynamic hint}) { + 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_bdk_wallet_get_psbt_input( + port_, arg0, arg1, arg2, arg3); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_input, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkWalletGetPsbtInputConstMeta, + argValues: [that, utxo, onlyWitnessUtxo, sighashType], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkWalletGetPsbtInputConstMeta => const TaskConstMeta( + debugName: "bdk_wallet_get_psbt_input", + argNames: ["that", "utxo", "onlyWitnessUtxo", "sighashType"], + ); + + @override + Future bdkWalletIsMine( + {required BdkWallet that, required BdkScriptBuf script, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_wallet(that); + var arg1 = cst_encode_box_autoadd_bdk_script_buf(script); + return wire.wire_bdk_wallet_is_mine(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bool, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkWalletIsMineConstMeta, + argValues: [that, script], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkWalletIsMineConstMeta => const TaskConstMeta( + debugName: "bdk_wallet_is_mine", + argNames: ["that", "script"], + ); + + @override + Future> bdkWalletListTransactions( + {required BdkWallet that, required bool includeRaw, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_wallet(that); + var arg1 = cst_encode_bool(includeRaw); + return wire.wire_bdk_wallet_list_transactions(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_transaction_details, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkWalletListTransactionsConstMeta, + argValues: [that, includeRaw], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkWalletListTransactionsConstMeta => const TaskConstMeta( + debugName: "bdk_wallet_list_transactions", + argNames: ["that", "includeRaw"], + ); + + @override + Future> bdkWalletListUnspent( + {required BdkWallet that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_wallet(that); + return wire.wire_bdk_wallet_list_unspent(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_local_utxo, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkWalletListUnspentConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkWalletListUnspentConstMeta => const TaskConstMeta( + debugName: "bdk_wallet_list_unspent", + argNames: ["that"], + ); + + @override + Future bdkWalletNetwork({required BdkWallet that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_bdk_wallet(that); + return wire.wire_bdk_wallet_network(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_network, + decodeErrorData: null, + ), + constMeta: kBdkWalletNetworkConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkWalletNetworkConstMeta => const TaskConstMeta( + debugName: "bdk_wallet_network", + argNames: ["that"], + ); + + @override + Future bdkWalletNew( + {required BdkDescriptor descriptor, + BdkDescriptor? changeDescriptor, + required Network network, + required DatabaseConfig databaseConfig, + dynamic hint}) { + 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_bdk_wallet_new(port_, arg0, arg1, arg2, arg3); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bdk_wallet, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkWalletNewConstMeta, + argValues: [descriptor, changeDescriptor, network, databaseConfig], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkWalletNewConstMeta => const TaskConstMeta( + debugName: "bdk_wallet_new", + argNames: [ + "descriptor", + "changeDescriptor", + "network", + "databaseConfig" + ], + ); + + @override + Future bdkWalletSign( + {required BdkWallet ptr, + required BdkPsbt psbt, + SignOptions? signOptions, + dynamic hint}) { + 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_bdk_wallet_sign(port_, arg0, arg1, arg2); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bool, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkWalletSignConstMeta, + argValues: [ptr, psbt, signOptions], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkWalletSignConstMeta => const TaskConstMeta( + debugName: "bdk_wallet_sign", + argNames: ["ptr", "psbt", "signOptions"], + ); + + @override + Future bdkWalletSync( + {required BdkWallet ptr, + required BdkBlockchain blockchain, + dynamic hint}) { + 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_bdk_wallet_sync(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kBdkWalletSyncConstMeta, + argValues: [ptr, blockchain], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBdkWalletSyncConstMeta => const TaskConstMeta( + debugName: "bdk_wallet_sync", + argNames: ["ptr", "blockchain"], + ); + + @override + Future<(BdkPsbt, TransactionDetails)> finishBumpFeeTxBuilder( + {required String txid, + required double feeRate, + BdkAddress? allowShrinking, + required BdkWallet wallet, + required bool enableRbf, + int? nSequence, + dynamic hint}) { + 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_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: kFinishBumpFeeTxBuilderConstMeta, + argValues: [txid, feeRate, allowShrinking, wallet, enableRbf, nSequence], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kFinishBumpFeeTxBuilderConstMeta => const TaskConstMeta( + debugName: "finish_bump_fee_tx_builder", + argNames: [ + "txid", + "feeRate", + "allowShrinking", + "wallet", + "enableRbf", + "nSequence" + ], + ); + + @override + Future<(BdkPsbt, TransactionDetails)> txBuilderFinish( + {required BdkWallet wallet, + required List recipients, + required List utxos, + (OutPoint, Input, int)? foreignUtxo, + required List unSpendable, + required ChangeSpendPolicy changePolicy, + required bool manuallySelectedOnly, + double? feeRate, + int? feeAbsolute, + required bool drainWallet, + BdkScriptBuf? drainTo, + RbfValue? rbf, + required List data, + dynamic hint}) { + 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_list_prim_u_8_loose(data); + return wire.wire_tx_builder_finish(port_, arg0, arg1, arg2, arg3, arg4, + arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_record_bdk_psbt_transaction_details, + decodeErrorData: dco_decode_bdk_error, + ), + constMeta: kTxBuilderFinishConstMeta, + argValues: [ + wallet, + recipients, + utxos, + foreignUtxo, + unSpendable, + changePolicy, + manuallySelectedOnly, + feeRate, + feeAbsolute, + drainWallet, + drainTo, + rbf, + data + ], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kTxBuilderFinishConstMeta => const TaskConstMeta( + debugName: "tx_builder_finish", + argNames: [ + "wallet", + "recipients", + "utxos", + "foreignUtxo", + "unSpendable", + "changePolicy", + "manuallySelectedOnly", + "feeRate", + "feeAbsolute", + "drainWallet", + "drainTo", + "rbf", + "data" + ], + ); + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_AnyBlockchain => + wire.rust_arc_increment_strong_count_RustOpaque_AnyBlockchain; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_AnyBlockchain => + wire.rust_arc_decrement_strong_count_RustOpaque_AnyBlockchain; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_ExtendedDescriptor => + wire.rust_arc_increment_strong_count_RustOpaque_ExtendedDescriptor; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_ExtendedDescriptor => + wire.rust_arc_decrement_strong_count_RustOpaque_ExtendedDescriptor; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_MutexPartiallySignedTransaction => wire + .rust_arc_increment_strong_count_RustOpaque_MutexPartiallySignedTransaction; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_MutexPartiallySignedTransaction => wire + .rust_arc_decrement_strong_count_RustOpaque_MutexPartiallySignedTransaction; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_MutexBdkWalletAnyDatabase => wire + .rust_arc_increment_strong_count_RustOpaque_MutexbdkWalletAnyDatabase; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_MutexBdkWalletAnyDatabase => wire + .rust_arc_decrement_strong_count_RustOpaque_MutexbdkWalletAnyDatabase; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_BdkBitcoinAddress => + wire.rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddress; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_BdkBitcoinAddress => + wire.rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_BitcoinBip32DerivationPath => wire + .rust_arc_increment_strong_count_RustOpaque_bitcoinbip32DerivationPath; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_BitcoinBip32DerivationPath => wire + .rust_arc_decrement_strong_count_RustOpaque_bitcoinbip32DerivationPath; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_KeysDescriptorPublicKey => wire + .rust_arc_increment_strong_count_RustOpaque_keysDescriptorPublicKey; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_KeysDescriptorPublicKey => wire + .rust_arc_decrement_strong_count_RustOpaque_keysDescriptorPublicKey; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_KeysDescriptorSecretKey => wire + .rust_arc_increment_strong_count_RustOpaque_keysDescriptorSecretKey; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_KeysDescriptorSecretKey => wire + .rust_arc_decrement_strong_count_RustOpaque_keysDescriptorSecretKey; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_KeysKeyMap => + wire.rust_arc_increment_strong_count_RustOpaque_keysKeyMap; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_KeysKeyMap => + wire.rust_arc_decrement_strong_count_RustOpaque_keysKeyMap; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_KeysBip39Mnemonic => + wire.rust_arc_increment_strong_count_RustOpaque_keysbip39Mnemonic; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_KeysBip39Mnemonic => + wire.rust_arc_decrement_strong_count_RustOpaque_keysbip39Mnemonic; + + @protected + AnyBlockchain dco_decode_RustOpaque_AnyBlockchain(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return AnyBlockchain.dcoDecode(raw as List); + } + + @protected + ExtendedDescriptor dco_decode_RustOpaque_ExtendedDescriptor(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return ExtendedDescriptor.dcoDecode(raw as List); + } + + @protected + MutexPartiallySignedTransaction + dco_decode_RustOpaque_MutexPartiallySignedTransaction(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return MutexPartiallySignedTransaction.dcoDecode(raw as List); + } + + @protected + MutexBdkWalletAnyDatabase dco_decode_RustOpaque_MutexbdkWalletAnyDatabase( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return MutexBdkWalletAnyDatabase.dcoDecode(raw as List); + } + + @protected + BdkBitcoinAddress dco_decode_RustOpaque_bdkbitcoinAddress(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return BdkBitcoinAddress.dcoDecode(raw as List); + } + + @protected + BitcoinBip32DerivationPath dco_decode_RustOpaque_bitcoinbip32DerivationPath( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return BitcoinBip32DerivationPath.dcoDecode(raw as List); + } + + @protected + KeysDescriptorPublicKey dco_decode_RustOpaque_keysDescriptorPublicKey( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return KeysDescriptorPublicKey.dcoDecode(raw as List); + } + + @protected + KeysDescriptorSecretKey dco_decode_RustOpaque_keysDescriptorSecretKey( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return KeysDescriptorSecretKey.dcoDecode(raw as List); + } + + @protected + KeysKeyMap dco_decode_RustOpaque_keysKeyMap(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return KeysKeyMap.dcoDecode(raw as List); + } + + @protected + KeysBip39Mnemonic dco_decode_RustOpaque_keysbip39Mnemonic(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return KeysBip39Mnemonic.dcoDecode(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_AnyBlockchain(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_bitcoinbip32DerivationPath(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_ExtendedDescriptor(arr[0]), + keyMap: dco_decode_RustOpaque_keysKeyMap(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_keysDescriptorPublicKey(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_keysDescriptorSecretKey(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_Address( + dco_decode_box_autoadd_address_error(raw[1]), + ); + case 3: + return BdkError_Descriptor( + dco_decode_box_autoadd_descriptor_error(raw[1]), + ); + case 4: + return BdkError_InvalidU32Bytes( + dco_decode_list_prim_u_8_strict(raw[1]), + ); + case 5: + return BdkError_Generic( + dco_decode_String(raw[1]), + ); + case 6: + return BdkError_ScriptDoesntHaveAddressForm(); + case 7: + return BdkError_NoRecipients(); + case 8: + return BdkError_NoUtxosSelected(); + case 9: + return BdkError_OutputBelowDustLimit( + dco_decode_usize(raw[1]), + ); + case 10: + return BdkError_InsufficientFunds( + needed: dco_decode_u_64(raw[1]), + available: dco_decode_u_64(raw[2]), + ); + case 11: + return BdkError_BnBTotalTriesExceeded(); + case 12: + return BdkError_BnBNoExactMatch(); + case 13: + return BdkError_UnknownUtxo(); + case 14: + return BdkError_TransactionNotFound(); + case 15: + return BdkError_TransactionConfirmed(); + case 16: + return BdkError_IrreplaceableTransaction(); + case 17: + return BdkError_FeeRateTooLow( + needed: dco_decode_f_32(raw[1]), + ); + case 18: + return BdkError_FeeTooLow( + needed: dco_decode_u_64(raw[1]), + ); + case 19: + return BdkError_FeeRateUnavailable(); + case 20: + return BdkError_MissingKeyOrigin( + dco_decode_String(raw[1]), + ); + case 21: + return BdkError_Key( + dco_decode_String(raw[1]), + ); + case 22: + return BdkError_ChecksumMismatch(); + case 23: + return BdkError_SpendingPolicyRequired( + dco_decode_keychain_kind(raw[1]), + ); + case 24: + return BdkError_InvalidPolicyPathError( + dco_decode_String(raw[1]), + ); + case 25: + return BdkError_Signer( + dco_decode_String(raw[1]), + ); + case 26: + return BdkError_InvalidNetwork( + requested: dco_decode_network(raw[1]), + found: dco_decode_network(raw[2]), + ); + case 27: + return BdkError_InvalidOutpoint( + dco_decode_box_autoadd_out_point(raw[1]), + ); + case 28: + return BdkError_Encode( + dco_decode_String(raw[1]), + ); + case 29: + return BdkError_Miniscript( + dco_decode_String(raw[1]), + ); + case 30: + return BdkError_MiniscriptPsbt( + dco_decode_String(raw[1]), + ); + case 31: + return BdkError_Bip32( + dco_decode_String(raw[1]), + ); + case 32: + return BdkError_Bip39( + dco_decode_String(raw[1]), + ); + case 33: + return BdkError_Secp256k1( + dco_decode_String(raw[1]), + ); + case 34: + return BdkError_Json( + dco_decode_String(raw[1]), + ); + case 35: + return BdkError_Psbt( + dco_decode_String(raw[1]), + ); + case 36: + return BdkError_PsbtParse( + dco_decode_String(raw[1]), + ); + case 37: + return BdkError_MissingCachedScripts( + dco_decode_usize(raw[1]), + dco_decode_usize(raw[2]), + ); + case 38: + return BdkError_Electrum( + dco_decode_String(raw[1]), + ); + case 39: + return BdkError_Esplora( + dco_decode_String(raw[1]), + ); + case 40: + return BdkError_Sled( + dco_decode_String(raw[1]), + ); + case 41: + return BdkError_Rpc( + dco_decode_String(raw[1]), + ); + case 42: + return BdkError_Rusqlite( + dco_decode_String(raw[1]), + ); + case 43: + return BdkError_InvalidInput( + dco_decode_String(raw[1]), + ); + case 44: + return BdkError_InvalidLockTime( + dco_decode_String(raw[1]), + ); + case 45: + 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_keysbip39Mnemonic(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_MutexPartiallySignedTransaction(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( + inner: 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_MutexbdkWalletAnyDatabase(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 + 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 + 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 + 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, int) 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, int); + } + + @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 + int 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 + 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_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_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 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 + 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 + 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 + 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 + 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, int)? + 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 + int? 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 + 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 + (OutPoint, Input, int) 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 + 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 + 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 != 8) + throw Exception('unexpected arr length: expect 8 but see ${arr.length}'); + return SignOptions( + multiSig: dco_decode_bool(arr[0]), + trustWitnessUtxo: dco_decode_bool(arr[1]), + assumeHeight: dco_decode_opt_box_autoadd_u_32(arr[2]), + allowAllSighashes: dco_decode_bool(arr[3]), + removePartialSigs: dco_decode_bool(arr[4]), + tryFinalize: dco_decode_bool(arr[5]), + signWithTapInternalKey: dco_decode_bool(arr[6]), + allowGrinding: dco_decode_bool(arr[7]), + ); + } + + @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 + int dco_decode_u_64(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dcoDecodeI64OrU64(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 + int dco_decode_usize(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dcoDecodeI64OrU64(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 + AnyBlockchain sse_decode_RustOpaque_AnyBlockchain( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return AnyBlockchain.sseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + + @protected + ExtendedDescriptor sse_decode_RustOpaque_ExtendedDescriptor( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return ExtendedDescriptor.sseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + + @protected + MutexPartiallySignedTransaction + sse_decode_RustOpaque_MutexPartiallySignedTransaction( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return MutexPartiallySignedTransaction.sseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + + @protected + MutexBdkWalletAnyDatabase sse_decode_RustOpaque_MutexbdkWalletAnyDatabase( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return MutexBdkWalletAnyDatabase.sseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + + @protected + BdkBitcoinAddress sse_decode_RustOpaque_bdkbitcoinAddress( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return BdkBitcoinAddress.sseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + + @protected + BitcoinBip32DerivationPath sse_decode_RustOpaque_bitcoinbip32DerivationPath( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return BitcoinBip32DerivationPath.sseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + + @protected + KeysDescriptorPublicKey sse_decode_RustOpaque_keysDescriptorPublicKey( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return KeysDescriptorPublicKey.sseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + + @protected + KeysDescriptorSecretKey sse_decode_RustOpaque_keysDescriptorSecretKey( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return KeysDescriptorSecretKey.sseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + + @protected + KeysKeyMap sse_decode_RustOpaque_keysKeyMap(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return KeysKeyMap.sseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + + @protected + KeysBip39Mnemonic sse_decode_RustOpaque_keysbip39Mnemonic( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return KeysBip39Mnemonic.sseDecode( + 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_AnyBlockchain(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_bitcoinbip32DerivationPath(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_ExtendedDescriptor(deserializer); + var var_keyMap = sse_decode_RustOpaque_keysKeyMap(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_keysDescriptorPublicKey(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_keysDescriptorSecretKey(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_box_autoadd_address_error(deserializer); + return BdkError_Address(var_field0); + case 3: + var var_field0 = sse_decode_box_autoadd_descriptor_error(deserializer); + return BdkError_Descriptor(var_field0); + case 4: + var var_field0 = sse_decode_list_prim_u_8_strict(deserializer); + return BdkError_InvalidU32Bytes(var_field0); + case 5: + var var_field0 = sse_decode_String(deserializer); + return BdkError_Generic(var_field0); + case 6: + return BdkError_ScriptDoesntHaveAddressForm(); + case 7: + return BdkError_NoRecipients(); + case 8: + return BdkError_NoUtxosSelected(); + case 9: + var var_field0 = sse_decode_usize(deserializer); + return BdkError_OutputBelowDustLimit(var_field0); + case 10: + 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 11: + return BdkError_BnBTotalTriesExceeded(); + case 12: + return BdkError_BnBNoExactMatch(); + case 13: + return BdkError_UnknownUtxo(); + case 14: + return BdkError_TransactionNotFound(); + case 15: + return BdkError_TransactionConfirmed(); + case 16: + return BdkError_IrreplaceableTransaction(); + case 17: + var var_needed = sse_decode_f_32(deserializer); + return BdkError_FeeRateTooLow(needed: var_needed); + case 18: + var var_needed = sse_decode_u_64(deserializer); + return BdkError_FeeTooLow(needed: var_needed); + case 19: + return BdkError_FeeRateUnavailable(); + case 20: + var var_field0 = sse_decode_String(deserializer); + return BdkError_MissingKeyOrigin(var_field0); + case 21: + var var_field0 = sse_decode_String(deserializer); + return BdkError_Key(var_field0); + case 22: + return BdkError_ChecksumMismatch(); + case 23: + var var_field0 = sse_decode_keychain_kind(deserializer); + return BdkError_SpendingPolicyRequired(var_field0); + case 24: + var var_field0 = sse_decode_String(deserializer); + return BdkError_InvalidPolicyPathError(var_field0); + case 25: + var var_field0 = sse_decode_String(deserializer); + return BdkError_Signer(var_field0); + case 26: + var var_requested = sse_decode_network(deserializer); + var var_found = sse_decode_network(deserializer); + return BdkError_InvalidNetwork( + requested: var_requested, found: var_found); + case 27: + var var_field0 = sse_decode_box_autoadd_out_point(deserializer); + return BdkError_InvalidOutpoint(var_field0); + case 28: + var var_field0 = sse_decode_String(deserializer); + return BdkError_Encode(var_field0); + case 29: + var var_field0 = sse_decode_String(deserializer); + return BdkError_Miniscript(var_field0); + case 30: + var var_field0 = sse_decode_String(deserializer); + return BdkError_MiniscriptPsbt(var_field0); + case 31: + var var_field0 = sse_decode_String(deserializer); + return BdkError_Bip32(var_field0); + case 32: + var var_field0 = sse_decode_String(deserializer); + return BdkError_Bip39(var_field0); + case 33: + var var_field0 = sse_decode_String(deserializer); + return BdkError_Secp256k1(var_field0); + case 34: + var var_field0 = sse_decode_String(deserializer); + return BdkError_Json(var_field0); + case 35: + var var_field0 = sse_decode_String(deserializer); + return BdkError_Psbt(var_field0); + case 36: + var var_field0 = sse_decode_String(deserializer); + return BdkError_PsbtParse(var_field0); + case 37: + var var_field0 = sse_decode_usize(deserializer); + var var_field1 = sse_decode_usize(deserializer); + return BdkError_MissingCachedScripts(var_field0, var_field1); + case 38: + var var_field0 = sse_decode_String(deserializer); + return BdkError_Electrum(var_field0); + case 39: + var var_field0 = sse_decode_String(deserializer); + return BdkError_Esplora(var_field0); + case 40: + var var_field0 = sse_decode_String(deserializer); + return BdkError_Sled(var_field0); + case 41: + var var_field0 = sse_decode_String(deserializer); + return BdkError_Rpc(var_field0); + case 42: + var var_field0 = sse_decode_String(deserializer); + return BdkError_Rusqlite(var_field0); + case 43: + var var_field0 = sse_decode_String(deserializer); + return BdkError_InvalidInput(var_field0); + case 44: + var var_field0 = sse_decode_String(deserializer); + return BdkError_InvalidLockTime(var_field0); + case 45: + 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_keysbip39Mnemonic(deserializer); + return BdkMnemonic(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_MutexPartiallySignedTransaction(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_inner = sse_decode_String(deserializer); + return BdkTransaction(inner: var_inner); + } + + @protected + BdkWallet sse_decode_bdk_wallet(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_ptr = sse_decode_RustOpaque_MutexbdkWalletAnyDatabase(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 + 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 + 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 + 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, int) 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 + int 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 + 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_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_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 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 + 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 + 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 + 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 + 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, int)? + 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 + int? 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 + 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 + (OutPoint, Input, int) 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 + 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 + 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_multiSig = sse_decode_bool(deserializer); + 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( + multiSig: var_multiSig, + 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 + int sse_decode_u_64(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return deserializer.buffer.getUint64(); + } + + @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 + int sse_decode_usize(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return deserializer.buffer.getUint64(); + } + + @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_AnyBlockchain(AnyBlockchain raw) { + // Codec=Cst (C-struct based), see doc to use other codecs +// ignore: invalid_use_of_internal_member + return raw.cstEncode(); + } + + @protected + int cst_encode_RustOpaque_ExtendedDescriptor(ExtendedDescriptor raw) { + // Codec=Cst (C-struct based), see doc to use other codecs +// ignore: invalid_use_of_internal_member + return raw.cstEncode(); + } + + @protected + int cst_encode_RustOpaque_MutexPartiallySignedTransaction( + MutexPartiallySignedTransaction raw) { + // Codec=Cst (C-struct based), see doc to use other codecs +// ignore: invalid_use_of_internal_member + return raw.cstEncode(); + } + + @protected + int cst_encode_RustOpaque_MutexbdkWalletAnyDatabase( + MutexBdkWalletAnyDatabase raw) { + // Codec=Cst (C-struct based), see doc to use other codecs +// ignore: invalid_use_of_internal_member + return raw.cstEncode(); + } + + @protected + int cst_encode_RustOpaque_bdkbitcoinAddress(BdkBitcoinAddress raw) { + // Codec=Cst (C-struct based), see doc to use other codecs +// ignore: invalid_use_of_internal_member + return raw.cstEncode(); + } + + @protected + int cst_encode_RustOpaque_bitcoinbip32DerivationPath( + BitcoinBip32DerivationPath raw) { + // Codec=Cst (C-struct based), see doc to use other codecs +// ignore: invalid_use_of_internal_member + return raw.cstEncode(); + } + + @protected + int cst_encode_RustOpaque_keysDescriptorPublicKey( + KeysDescriptorPublicKey raw) { + // Codec=Cst (C-struct based), see doc to use other codecs +// ignore: invalid_use_of_internal_member + return raw.cstEncode(); + } + + @protected + int cst_encode_RustOpaque_keysDescriptorSecretKey( + KeysDescriptorSecretKey raw) { + // Codec=Cst (C-struct based), see doc to use other codecs +// ignore: invalid_use_of_internal_member + return raw.cstEncode(); + } + + @protected + int cst_encode_RustOpaque_keysKeyMap(KeysKeyMap raw) { + // Codec=Cst (C-struct based), see doc to use other codecs +// ignore: invalid_use_of_internal_member + return raw.cstEncode(); + } + + @protected + int cst_encode_RustOpaque_keysbip39Mnemonic(KeysBip39Mnemonic raw) { + // Codec=Cst (C-struct based), see doc to use other codecs +// ignore: invalid_use_of_internal_member + return raw.cstEncode(); + } + + @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_usize(int 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_RustOpaque_AnyBlockchain( + AnyBlockchain self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize(self.sseEncode(move: null), serializer); + } + + @protected + void sse_encode_RustOpaque_ExtendedDescriptor( + ExtendedDescriptor self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize(self.sseEncode(move: null), serializer); + } + + @protected + void sse_encode_RustOpaque_MutexPartiallySignedTransaction( + MutexPartiallySignedTransaction self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize(self.sseEncode(move: null), serializer); + } + + @protected + void sse_encode_RustOpaque_MutexbdkWalletAnyDatabase( + MutexBdkWalletAnyDatabase self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize(self.sseEncode(move: null), serializer); + } + + @protected + void sse_encode_RustOpaque_bdkbitcoinAddress( + BdkBitcoinAddress self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize(self.sseEncode(move: null), serializer); + } + + @protected + void sse_encode_RustOpaque_bitcoinbip32DerivationPath( + BitcoinBip32DerivationPath self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize(self.sseEncode(move: null), serializer); + } + + @protected + void sse_encode_RustOpaque_keysDescriptorPublicKey( + KeysDescriptorPublicKey self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize(self.sseEncode(move: null), serializer); + } + + @protected + void sse_encode_RustOpaque_keysDescriptorSecretKey( + KeysDescriptorSecretKey self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize(self.sseEncode(move: null), serializer); + } + + @protected + void sse_encode_RustOpaque_keysKeyMap( + KeysKeyMap self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize(self.sseEncode(move: null), serializer); + } + + @protected + void sse_encode_RustOpaque_keysbip39Mnemonic( + KeysBip39Mnemonic self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize(self.sseEncode(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); + } + } + + @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); + } + } + + @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); + } + } + + @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_AnyBlockchain(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_bitcoinbip32DerivationPath(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_ExtendedDescriptor( + self.extendedDescriptor, serializer); + sse_encode_RustOpaque_keysKeyMap(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_keysDescriptorPublicKey(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_keysDescriptorSecretKey(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_Address(field0: final field0): + sse_encode_i_32(2, serializer); + sse_encode_box_autoadd_address_error(field0, serializer); + case BdkError_Descriptor(field0: final field0): + sse_encode_i_32(3, serializer); + sse_encode_box_autoadd_descriptor_error(field0, serializer); + case BdkError_InvalidU32Bytes(field0: final field0): + sse_encode_i_32(4, serializer); + sse_encode_list_prim_u_8_strict(field0, serializer); + case BdkError_Generic(field0: final field0): + sse_encode_i_32(5, serializer); + sse_encode_String(field0, serializer); + case BdkError_ScriptDoesntHaveAddressForm(): + sse_encode_i_32(6, serializer); + case BdkError_NoRecipients(): + sse_encode_i_32(7, serializer); + case BdkError_NoUtxosSelected(): + sse_encode_i_32(8, serializer); + case BdkError_OutputBelowDustLimit(field0: final field0): + sse_encode_i_32(9, serializer); + sse_encode_usize(field0, serializer); + case BdkError_InsufficientFunds( + needed: final needed, + available: final available + ): + sse_encode_i_32(10, serializer); + sse_encode_u_64(needed, serializer); + sse_encode_u_64(available, serializer); + case BdkError_BnBTotalTriesExceeded(): + sse_encode_i_32(11, serializer); + case BdkError_BnBNoExactMatch(): + sse_encode_i_32(12, serializer); + case BdkError_UnknownUtxo(): + sse_encode_i_32(13, serializer); + case BdkError_TransactionNotFound(): + sse_encode_i_32(14, serializer); + case BdkError_TransactionConfirmed(): + sse_encode_i_32(15, serializer); + case BdkError_IrreplaceableTransaction(): + sse_encode_i_32(16, serializer); + case BdkError_FeeRateTooLow(needed: final needed): + sse_encode_i_32(17, serializer); + sse_encode_f_32(needed, serializer); + case BdkError_FeeTooLow(needed: final needed): + sse_encode_i_32(18, serializer); + sse_encode_u_64(needed, serializer); + case BdkError_FeeRateUnavailable(): + sse_encode_i_32(19, serializer); + case BdkError_MissingKeyOrigin(field0: final field0): + sse_encode_i_32(20, serializer); + sse_encode_String(field0, serializer); + case BdkError_Key(field0: final field0): + sse_encode_i_32(21, serializer); + sse_encode_String(field0, serializer); + case BdkError_ChecksumMismatch(): + sse_encode_i_32(22, serializer); + case BdkError_SpendingPolicyRequired(field0: final field0): + sse_encode_i_32(23, serializer); + sse_encode_keychain_kind(field0, serializer); + case BdkError_InvalidPolicyPathError(field0: final field0): + sse_encode_i_32(24, serializer); + sse_encode_String(field0, serializer); + case BdkError_Signer(field0: final field0): + sse_encode_i_32(25, serializer); + sse_encode_String(field0, serializer); + case BdkError_InvalidNetwork( + requested: final requested, + found: final found + ): + sse_encode_i_32(26, serializer); + sse_encode_network(requested, serializer); + sse_encode_network(found, serializer); + case BdkError_InvalidOutpoint(field0: final field0): + sse_encode_i_32(27, serializer); + sse_encode_box_autoadd_out_point(field0, serializer); + case BdkError_Encode(field0: final field0): + sse_encode_i_32(28, serializer); + sse_encode_String(field0, serializer); + case BdkError_Miniscript(field0: final field0): + sse_encode_i_32(29, serializer); + sse_encode_String(field0, serializer); + case BdkError_MiniscriptPsbt(field0: final field0): + sse_encode_i_32(30, serializer); + sse_encode_String(field0, serializer); + case BdkError_Bip32(field0: final field0): + sse_encode_i_32(31, serializer); + sse_encode_String(field0, serializer); + case BdkError_Bip39(field0: final field0): + sse_encode_i_32(32, serializer); + sse_encode_String(field0, serializer); + case BdkError_Secp256k1(field0: final field0): + sse_encode_i_32(33, serializer); + sse_encode_String(field0, serializer); + case BdkError_Json(field0: final field0): + sse_encode_i_32(34, serializer); + sse_encode_String(field0, serializer); + case BdkError_Psbt(field0: final field0): + sse_encode_i_32(35, serializer); + sse_encode_String(field0, serializer); + case BdkError_PsbtParse(field0: final field0): + sse_encode_i_32(36, serializer); + sse_encode_String(field0, serializer); + case BdkError_MissingCachedScripts( + field0: final field0, + field1: final field1 + ): + sse_encode_i_32(37, serializer); + sse_encode_usize(field0, serializer); + sse_encode_usize(field1, serializer); + case BdkError_Electrum(field0: final field0): + sse_encode_i_32(38, serializer); + sse_encode_String(field0, serializer); + case BdkError_Esplora(field0: final field0): + sse_encode_i_32(39, serializer); + sse_encode_String(field0, serializer); + case BdkError_Sled(field0: final field0): + sse_encode_i_32(40, serializer); + sse_encode_String(field0, serializer); + case BdkError_Rpc(field0: final field0): + sse_encode_i_32(41, serializer); + sse_encode_String(field0, serializer); + case BdkError_Rusqlite(field0: final field0): + sse_encode_i_32(42, serializer); + sse_encode_String(field0, serializer); + case BdkError_InvalidInput(field0: final field0): + sse_encode_i_32(43, serializer); + sse_encode_String(field0, serializer); + case BdkError_InvalidLockTime(field0: final field0): + sse_encode_i_32(44, serializer); + sse_encode_String(field0, serializer); + case BdkError_InvalidTransaction(field0: final field0): + sse_encode_i_32(45, serializer); + sse_encode_String(field0, serializer); + } + } + + @protected + void sse_encode_bdk_mnemonic(BdkMnemonic self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_RustOpaque_keysbip39Mnemonic(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_MutexPartiallySignedTransaction(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.inner, serializer); + } + + @protected + void sse_encode_bdk_wallet(BdkWallet self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_RustOpaque_MutexbdkWalletAnyDatabase(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); + } + } + + @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_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_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_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, int) 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(int 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_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); + } + } + + @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); + } + } + + @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); + } + } + + @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); + } + } + + @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_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_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_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); + } + } + + @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_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_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_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_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, 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_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(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_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); + } + } + + @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); + } + } + + @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_out_point_input_usize( + (OutPoint, Input, int) 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_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_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.multiSig, serializer); + 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(int self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + serializer.buffer.putUint64(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(int self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + serializer.buffer.putUint64(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); + } +} diff --git a/lib/src/generated/frb_generated.io.dart b/lib/src/generated/frb_generated.io.dart new file mode 100644 index 00000000..c9af61fe --- /dev/null +++ b/lib/src/generated/frb_generated.io.dart @@ -0,0 +1,6735 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31. + +// 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 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated_io.dart'; + +abstract class CApiApiImplPlatform extends BaseApiImpl { + CApiApiImplPlatform({ + required super.handler, + required super.wire, + required super.generalizedFrbRustBinding, + required super.portManager, + }); + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_AnyBlockchainPtr => + wire._rust_arc_decrement_strong_count_RustOpaque_AnyBlockchainPtr; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ExtendedDescriptorPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_ExtendedDescriptorPtr; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_MutexPartiallySignedTransactionPtr => + wire._rust_arc_decrement_strong_count_RustOpaque_MutexPartiallySignedTransactionPtr; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_MutexBdkWalletAnyDatabasePtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_MutexbdkWalletAnyDatabasePtr; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_BdkBitcoinAddressPtr => + wire._rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddressPtr; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_BitcoinBip32DerivationPathPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_bitcoinbip32DerivationPathPtr; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_KeysDescriptorPublicKeyPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_keysDescriptorPublicKeyPtr; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_KeysDescriptorSecretKeyPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_keysDescriptorSecretKeyPtr; + + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_KeysKeyMapPtr => + wire._rust_arc_decrement_strong_count_RustOpaque_keysKeyMapPtr; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_KeysBip39MnemonicPtr => + wire._rust_arc_decrement_strong_count_RustOpaque_keysbip39MnemonicPtr; + + @protected + AnyBlockchain dco_decode_RustOpaque_AnyBlockchain(dynamic raw); + + @protected + ExtendedDescriptor dco_decode_RustOpaque_ExtendedDescriptor(dynamic raw); + + @protected + MutexPartiallySignedTransaction + dco_decode_RustOpaque_MutexPartiallySignedTransaction(dynamic raw); + + @protected + MutexBdkWalletAnyDatabase dco_decode_RustOpaque_MutexbdkWalletAnyDatabase( + dynamic raw); + + @protected + BdkBitcoinAddress dco_decode_RustOpaque_bdkbitcoinAddress(dynamic raw); + + @protected + BitcoinBip32DerivationPath dco_decode_RustOpaque_bitcoinbip32DerivationPath( + dynamic raw); + + @protected + KeysDescriptorPublicKey dco_decode_RustOpaque_keysDescriptorPublicKey( + dynamic raw); + + @protected + KeysDescriptorSecretKey dco_decode_RustOpaque_keysDescriptorSecretKey( + dynamic raw); + + @protected + KeysKeyMap dco_decode_RustOpaque_keysKeyMap(dynamic raw); + + @protected + KeysBip39Mnemonic dco_decode_RustOpaque_keysbip39Mnemonic(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 + 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 + 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 + 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 + PsbtSigHashType dco_decode_box_autoadd_psbt_sig_hash_type(dynamic raw); + + @protected + RbfValue dco_decode_box_autoadd_rbf_value(dynamic raw); + + @protected + (OutPoint, Input, int) 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 + int 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 + 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_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_prim_u_8_loose(dynamic raw); + + @protected + Uint8List dco_decode_list_prim_u_8_strict(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 + 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 + 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 + double? dco_decode_opt_box_autoadd_f_32(dynamic raw); + + @protected + FeeRate? dco_decode_opt_box_autoadd_fee_rate(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, int)? + 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 + int? 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 + 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 + (OutPoint, Input, int) dco_decode_record_out_point_input_usize(dynamic raw); + + @protected + RpcConfig dco_decode_rpc_config(dynamic raw); + + @protected + RpcSyncParams dco_decode_rpc_sync_params(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 + int 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 + int 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 + AnyBlockchain sse_decode_RustOpaque_AnyBlockchain( + SseDeserializer deserializer); + + @protected + ExtendedDescriptor sse_decode_RustOpaque_ExtendedDescriptor( + SseDeserializer deserializer); + + @protected + MutexPartiallySignedTransaction + sse_decode_RustOpaque_MutexPartiallySignedTransaction( + SseDeserializer deserializer); + + @protected + MutexBdkWalletAnyDatabase sse_decode_RustOpaque_MutexbdkWalletAnyDatabase( + SseDeserializer deserializer); + + @protected + BdkBitcoinAddress sse_decode_RustOpaque_bdkbitcoinAddress( + SseDeserializer deserializer); + + @protected + BitcoinBip32DerivationPath sse_decode_RustOpaque_bitcoinbip32DerivationPath( + SseDeserializer deserializer); + + @protected + KeysDescriptorPublicKey sse_decode_RustOpaque_keysDescriptorPublicKey( + SseDeserializer deserializer); + + @protected + KeysDescriptorSecretKey sse_decode_RustOpaque_keysDescriptorSecretKey( + SseDeserializer deserializer); + + @protected + KeysKeyMap sse_decode_RustOpaque_keysKeyMap(SseDeserializer deserializer); + + @protected + KeysBip39Mnemonic sse_decode_RustOpaque_keysbip39Mnemonic( + 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 + 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 + 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 + 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 + PsbtSigHashType sse_decode_box_autoadd_psbt_sig_hash_type( + SseDeserializer deserializer); + + @protected + RbfValue sse_decode_box_autoadd_rbf_value(SseDeserializer deserializer); + + @protected + (OutPoint, Input, int) 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 + int 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 + 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_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_prim_u_8_loose(SseDeserializer deserializer); + + @protected + Uint8List sse_decode_list_prim_u_8_strict(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 + 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 + 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 + double? sse_decode_opt_box_autoadd_f_32(SseDeserializer deserializer); + + @protected + FeeRate? sse_decode_opt_box_autoadd_fee_rate(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, int)? + 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 + int? 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 + 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 + (OutPoint, Input, int) sse_decode_record_out_point_input_usize( + SseDeserializer deserializer); + + @protected + RpcConfig sse_decode_rpc_config(SseDeserializer deserializer); + + @protected + RpcSyncParams sse_decode_rpc_sync_params(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 + int 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 + int 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_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_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_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_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, int) 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(int 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_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_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_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_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_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_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_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, int)? 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(int? 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(int raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw.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 + 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_AnyBlockchain(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_bitcoinbip32DerivationPath(apiObj.ptr); + } + + @protected + void cst_api_fill_to_wire_bdk_descriptor( + BdkDescriptor apiObj, wire_cst_bdk_descriptor wireObj) { + wireObj.extended_descriptor = + cst_encode_RustOpaque_ExtendedDescriptor(apiObj.extendedDescriptor); + wireObj.key_map = cst_encode_RustOpaque_keysKeyMap(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_keysDescriptorPublicKey(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_keysDescriptorSecretKey(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_Address) { + var pre_field0 = cst_encode_box_autoadd_address_error(apiObj.field0); + wireObj.tag = 2; + 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 = 3; + 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 = 4; + wireObj.kind.InvalidU32Bytes.field0 = pre_field0; + return; + } + if (apiObj is BdkError_Generic) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 5; + wireObj.kind.Generic.field0 = pre_field0; + return; + } + if (apiObj is BdkError_ScriptDoesntHaveAddressForm) { + wireObj.tag = 6; + return; + } + if (apiObj is BdkError_NoRecipients) { + wireObj.tag = 7; + return; + } + if (apiObj is BdkError_NoUtxosSelected) { + wireObj.tag = 8; + return; + } + if (apiObj is BdkError_OutputBelowDustLimit) { + var pre_field0 = cst_encode_usize(apiObj.field0); + wireObj.tag = 9; + 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 = 10; + wireObj.kind.InsufficientFunds.needed = pre_needed; + wireObj.kind.InsufficientFunds.available = pre_available; + return; + } + if (apiObj is BdkError_BnBTotalTriesExceeded) { + wireObj.tag = 11; + return; + } + if (apiObj is BdkError_BnBNoExactMatch) { + wireObj.tag = 12; + return; + } + if (apiObj is BdkError_UnknownUtxo) { + wireObj.tag = 13; + return; + } + if (apiObj is BdkError_TransactionNotFound) { + wireObj.tag = 14; + return; + } + if (apiObj is BdkError_TransactionConfirmed) { + wireObj.tag = 15; + return; + } + if (apiObj is BdkError_IrreplaceableTransaction) { + wireObj.tag = 16; + return; + } + if (apiObj is BdkError_FeeRateTooLow) { + var pre_needed = cst_encode_f_32(apiObj.needed); + wireObj.tag = 17; + wireObj.kind.FeeRateTooLow.needed = pre_needed; + return; + } + if (apiObj is BdkError_FeeTooLow) { + var pre_needed = cst_encode_u_64(apiObj.needed); + wireObj.tag = 18; + wireObj.kind.FeeTooLow.needed = pre_needed; + return; + } + if (apiObj is BdkError_FeeRateUnavailable) { + wireObj.tag = 19; + return; + } + if (apiObj is BdkError_MissingKeyOrigin) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 20; + wireObj.kind.MissingKeyOrigin.field0 = pre_field0; + return; + } + if (apiObj is BdkError_Key) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 21; + wireObj.kind.Key.field0 = pre_field0; + return; + } + if (apiObj is BdkError_ChecksumMismatch) { + wireObj.tag = 22; + return; + } + if (apiObj is BdkError_SpendingPolicyRequired) { + var pre_field0 = cst_encode_keychain_kind(apiObj.field0); + wireObj.tag = 23; + wireObj.kind.SpendingPolicyRequired.field0 = pre_field0; + return; + } + if (apiObj is BdkError_InvalidPolicyPathError) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 24; + wireObj.kind.InvalidPolicyPathError.field0 = pre_field0; + return; + } + if (apiObj is BdkError_Signer) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 25; + 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 = 26; + 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 = 27; + wireObj.kind.InvalidOutpoint.field0 = pre_field0; + return; + } + if (apiObj is BdkError_Encode) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 28; + wireObj.kind.Encode.field0 = pre_field0; + return; + } + if (apiObj is BdkError_Miniscript) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 29; + wireObj.kind.Miniscript.field0 = pre_field0; + return; + } + if (apiObj is BdkError_MiniscriptPsbt) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 30; + wireObj.kind.MiniscriptPsbt.field0 = pre_field0; + return; + } + if (apiObj is BdkError_Bip32) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 31; + wireObj.kind.Bip32.field0 = pre_field0; + return; + } + if (apiObj is BdkError_Bip39) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 32; + wireObj.kind.Bip39.field0 = pre_field0; + return; + } + if (apiObj is BdkError_Secp256k1) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 33; + wireObj.kind.Secp256k1.field0 = pre_field0; + return; + } + if (apiObj is BdkError_Json) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 34; + wireObj.kind.Json.field0 = pre_field0; + return; + } + if (apiObj is BdkError_Psbt) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 35; + wireObj.kind.Psbt.field0 = pre_field0; + return; + } + if (apiObj is BdkError_PsbtParse) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 36; + 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 = 37; + 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 = 38; + wireObj.kind.Electrum.field0 = pre_field0; + return; + } + if (apiObj is BdkError_Esplora) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 39; + wireObj.kind.Esplora.field0 = pre_field0; + return; + } + if (apiObj is BdkError_Sled) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 40; + wireObj.kind.Sled.field0 = pre_field0; + return; + } + if (apiObj is BdkError_Rpc) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 41; + wireObj.kind.Rpc.field0 = pre_field0; + return; + } + if (apiObj is BdkError_Rusqlite) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 42; + wireObj.kind.Rusqlite.field0 = pre_field0; + return; + } + if (apiObj is BdkError_InvalidInput) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 43; + wireObj.kind.InvalidInput.field0 = pre_field0; + return; + } + if (apiObj is BdkError_InvalidLockTime) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 44; + wireObj.kind.InvalidLockTime.field0 = pre_field0; + return; + } + if (apiObj is BdkError_InvalidTransaction) { + var pre_field0 = cst_encode_String(apiObj.field0); + wireObj.tag = 45; + 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_keysbip39Mnemonic(apiObj.ptr); + } + + @protected + void cst_api_fill_to_wire_bdk_psbt( + BdkPsbt apiObj, wire_cst_bdk_psbt wireObj) { + wireObj.ptr = + cst_encode_RustOpaque_MutexPartiallySignedTransaction(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.inner = cst_encode_String(apiObj.inner); + } + + @protected + void cst_api_fill_to_wire_bdk_wallet( + BdkWallet apiObj, wire_cst_bdk_wallet wireObj) { + wireObj.ptr = cst_encode_RustOpaque_MutexbdkWalletAnyDatabase(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_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_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_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, int) 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_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_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_out_point_input_usize( + (OutPoint, Input, int) 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_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_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.multi_sig = cst_encode_bool(apiObj.multiSig); + 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_AnyBlockchain(AnyBlockchain raw); + + @protected + int cst_encode_RustOpaque_ExtendedDescriptor(ExtendedDescriptor raw); + + @protected + int cst_encode_RustOpaque_MutexPartiallySignedTransaction( + MutexPartiallySignedTransaction raw); + + @protected + int cst_encode_RustOpaque_MutexbdkWalletAnyDatabase( + MutexBdkWalletAnyDatabase raw); + + @protected + int cst_encode_RustOpaque_bdkbitcoinAddress(BdkBitcoinAddress raw); + + @protected + int cst_encode_RustOpaque_bitcoinbip32DerivationPath( + BitcoinBip32DerivationPath raw); + + @protected + int cst_encode_RustOpaque_keysDescriptorPublicKey( + KeysDescriptorPublicKey raw); + + @protected + int cst_encode_RustOpaque_keysDescriptorSecretKey( + KeysDescriptorSecretKey raw); + + @protected + int cst_encode_RustOpaque_keysKeyMap(KeysKeyMap raw); + + @protected + int cst_encode_RustOpaque_keysbip39Mnemonic(KeysBip39Mnemonic 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_usize(int 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_RustOpaque_AnyBlockchain( + AnyBlockchain self, SseSerializer serializer); + + @protected + void sse_encode_RustOpaque_ExtendedDescriptor( + ExtendedDescriptor self, SseSerializer serializer); + + @protected + void sse_encode_RustOpaque_MutexPartiallySignedTransaction( + MutexPartiallySignedTransaction self, SseSerializer serializer); + + @protected + void sse_encode_RustOpaque_MutexbdkWalletAnyDatabase( + MutexBdkWalletAnyDatabase self, SseSerializer serializer); + + @protected + void sse_encode_RustOpaque_bdkbitcoinAddress( + BdkBitcoinAddress self, SseSerializer serializer); + + @protected + void sse_encode_RustOpaque_bitcoinbip32DerivationPath( + BitcoinBip32DerivationPath self, SseSerializer serializer); + + @protected + void sse_encode_RustOpaque_keysDescriptorPublicKey( + KeysDescriptorPublicKey self, SseSerializer serializer); + + @protected + void sse_encode_RustOpaque_keysDescriptorSecretKey( + KeysDescriptorSecretKey self, SseSerializer serializer); + + @protected + void sse_encode_RustOpaque_keysKeyMap( + KeysKeyMap self, SseSerializer serializer); + + @protected + void sse_encode_RustOpaque_keysbip39Mnemonic( + KeysBip39Mnemonic 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_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_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_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_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, int) 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(int 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_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_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_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_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_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_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_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_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, int)? 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(int? 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_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_out_point_input_usize( + (OutPoint, Input, int) 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_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(int 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(int 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 CApiWire implements BaseWire { + factory CApiWire.fromExternalLibrary(ExternalLibrary lib) => + CApiWire(lib.ffiDynamicLibrary); + + /// Holds the symbol lookup function. + final ffi.Pointer Function(String symbolName) + _lookup; + + /// The symbols are looked up in [dynamicLibrary]. + CApiWire(ffi.DynamicLibrary dynamicLibrary) : _lookup = dynamicLibrary.lookup; + + /// The symbols are looked up with [lookup]. + CApiWire.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_bdk_blockchain_broadcast( + int port_, + ffi.Pointer that, + ffi.Pointer transaction, + ) { + return _wire_bdk_blockchain_broadcast( + port_, + that, + transaction, + ); + } + + late final _wire_bdk_blockchain_broadcastPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_blockchain_broadcast'); + late final _wire_bdk_blockchain_broadcast = + _wire_bdk_blockchain_broadcastPtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer)>(); + + void wire_bdk_blockchain_estimate_fee( + int port_, + ffi.Pointer that, + int target, + ) { + return _wire_bdk_blockchain_estimate_fee( + port_, + that, + target, + ); + } + + late final _wire_bdk_blockchain_estimate_feePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer, + ffi.Uint64)>>( + 'frbgen_bdk_flutter_wire_bdk_blockchain_estimate_fee'); + late final _wire_bdk_blockchain_estimate_fee = + _wire_bdk_blockchain_estimate_feePtr.asFunction< + void Function(int, ffi.Pointer, int)>(); + + void wire_bdk_blockchain_get_block_hash( + int port_, + ffi.Pointer that, + int height, + ) { + return _wire_bdk_blockchain_get_block_hash( + port_, + that, + height, + ); + } + + late final _wire_bdk_blockchain_get_block_hashPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer, + ffi.Uint32)>>( + 'frbgen_bdk_flutter_wire_bdk_blockchain_get_block_hash'); + late final _wire_bdk_blockchain_get_block_hash = + _wire_bdk_blockchain_get_block_hashPtr.asFunction< + void Function(int, ffi.Pointer, int)>(); + + void wire_bdk_blockchain_get_height( + int port_, + ffi.Pointer that, + ) { + return _wire_bdk_blockchain_get_height( + port_, + that, + ); + } + + late final _wire_bdk_blockchain_get_heightPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_blockchain_get_height'); + late final _wire_bdk_blockchain_get_height = + _wire_bdk_blockchain_get_heightPtr.asFunction< + void Function(int, ffi.Pointer)>(); + + void wire_bdk_blockchain_new( + int port_, + ffi.Pointer blockchain_config, + ) { + return _wire_bdk_blockchain_new( + port_, + blockchain_config, + ); + } + + late final _wire_bdk_blockchain_newPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_blockchain_new'); + late final _wire_bdk_blockchain_new = _wire_bdk_blockchain_newPtr.asFunction< + void Function(int, ffi.Pointer)>(); + + void wire_bdk_descriptor_as_string( + int port_, + ffi.Pointer that, + ) { + return _wire_bdk_descriptor_as_string( + port_, + that, + ); + } + + late final _wire_bdk_descriptor_as_stringPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_descriptor_as_string'); + late final _wire_bdk_descriptor_as_string = _wire_bdk_descriptor_as_stringPtr + .asFunction)>(); + + void wire_bdk_descriptor_as_string_private( + int port_, + ffi.Pointer that, + ) { + return _wire_bdk_descriptor_as_string_private( + port_, + that, + ); + } + + late final _wire_bdk_descriptor_as_string_privatePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_descriptor_as_string_private'); + late final _wire_bdk_descriptor_as_string_private = + _wire_bdk_descriptor_as_string_privatePtr.asFunction< + void Function(int, ffi.Pointer)>(); + + void wire_bdk_descriptor_max_satisfaction_weight( + int port_, + ffi.Pointer that, + ) { + return _wire_bdk_descriptor_max_satisfaction_weight( + port_, + that, + ); + } + + late final _wire_bdk_descriptor_max_satisfaction_weightPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_descriptor_max_satisfaction_weight'); + late final _wire_bdk_descriptor_max_satisfaction_weight = + _wire_bdk_descriptor_max_satisfaction_weightPtr.asFunction< + void Function(int, ffi.Pointer)>(); + + void wire_bdk_descriptor_new( + int port_, + ffi.Pointer descriptor, + int network, + ) { + return _wire_bdk_descriptor_new( + port_, + descriptor, + network, + ); + } + + late final _wire_bdk_descriptor_newPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Int32)>>('frbgen_bdk_flutter_wire_bdk_descriptor_new'); + late final _wire_bdk_descriptor_new = _wire_bdk_descriptor_newPtr.asFunction< + void Function(int, ffi.Pointer, int)>(); + + void wire_bdk_descriptor_new_bip44( + int port_, + ffi.Pointer secret_key, + int keychain_kind, + int network, + ) { + return _wire_bdk_descriptor_new_bip44( + port_, + secret_key, + keychain_kind, + network, + ); + } + + late final _wire_bdk_descriptor_new_bip44Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Int32, + ffi.Int32)>>('frbgen_bdk_flutter_wire_bdk_descriptor_new_bip44'); + late final _wire_bdk_descriptor_new_bip44 = + _wire_bdk_descriptor_new_bip44Ptr.asFunction< + void Function(int, ffi.Pointer, + int, int)>(); + + void wire_bdk_descriptor_new_bip44_public( + int port_, + ffi.Pointer public_key, + ffi.Pointer fingerprint, + int keychain_kind, + int network, + ) { + return _wire_bdk_descriptor_new_bip44_public( + port_, + public_key, + fingerprint, + keychain_kind, + network, + ); + } + + late final _wire_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_bdk_descriptor_new_bip44_public'); + late final _wire_bdk_descriptor_new_bip44_public = + _wire_bdk_descriptor_new_bip44_publicPtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer, int, int)>(); + + void wire_bdk_descriptor_new_bip49( + int port_, + ffi.Pointer secret_key, + int keychain_kind, + int network, + ) { + return _wire_bdk_descriptor_new_bip49( + port_, + secret_key, + keychain_kind, + network, + ); + } + + late final _wire_bdk_descriptor_new_bip49Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Int32, + ffi.Int32)>>('frbgen_bdk_flutter_wire_bdk_descriptor_new_bip49'); + late final _wire_bdk_descriptor_new_bip49 = + _wire_bdk_descriptor_new_bip49Ptr.asFunction< + void Function(int, ffi.Pointer, + int, int)>(); + + void wire_bdk_descriptor_new_bip49_public( + int port_, + ffi.Pointer public_key, + ffi.Pointer fingerprint, + int keychain_kind, + int network, + ) { + return _wire_bdk_descriptor_new_bip49_public( + port_, + public_key, + fingerprint, + keychain_kind, + network, + ); + } + + late final _wire_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_bdk_descriptor_new_bip49_public'); + late final _wire_bdk_descriptor_new_bip49_public = + _wire_bdk_descriptor_new_bip49_publicPtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer, int, int)>(); + + void wire_bdk_descriptor_new_bip84( + int port_, + ffi.Pointer secret_key, + int keychain_kind, + int network, + ) { + return _wire_bdk_descriptor_new_bip84( + port_, + secret_key, + keychain_kind, + network, + ); + } + + late final _wire_bdk_descriptor_new_bip84Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Int32, + ffi.Int32)>>('frbgen_bdk_flutter_wire_bdk_descriptor_new_bip84'); + late final _wire_bdk_descriptor_new_bip84 = + _wire_bdk_descriptor_new_bip84Ptr.asFunction< + void Function(int, ffi.Pointer, + int, int)>(); + + void wire_bdk_descriptor_new_bip84_public( + int port_, + ffi.Pointer public_key, + ffi.Pointer fingerprint, + int keychain_kind, + int network, + ) { + return _wire_bdk_descriptor_new_bip84_public( + port_, + public_key, + fingerprint, + keychain_kind, + network, + ); + } + + late final _wire_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_bdk_descriptor_new_bip84_public'); + late final _wire_bdk_descriptor_new_bip84_public = + _wire_bdk_descriptor_new_bip84_publicPtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer, int, int)>(); + + void wire_bdk_descriptor_new_bip86( + int port_, + ffi.Pointer secret_key, + int keychain_kind, + int network, + ) { + return _wire_bdk_descriptor_new_bip86( + port_, + secret_key, + keychain_kind, + network, + ); + } + + late final _wire_bdk_descriptor_new_bip86Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Int32, + ffi.Int32)>>('frbgen_bdk_flutter_wire_bdk_descriptor_new_bip86'); + late final _wire_bdk_descriptor_new_bip86 = + _wire_bdk_descriptor_new_bip86Ptr.asFunction< + void Function(int, ffi.Pointer, + int, int)>(); + + void wire_bdk_descriptor_new_bip86_public( + int port_, + ffi.Pointer public_key, + ffi.Pointer fingerprint, + int keychain_kind, + int network, + ) { + return _wire_bdk_descriptor_new_bip86_public( + port_, + public_key, + fingerprint, + keychain_kind, + network, + ); + } + + late final _wire_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_bdk_descriptor_new_bip86_public'); + late final _wire_bdk_descriptor_new_bip86_public = + _wire_bdk_descriptor_new_bip86_publicPtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer, int, int)>(); + + void wire_bdk_derivation_path_from_string( + int port_, + ffi.Pointer path, + ) { + return _wire_bdk_derivation_path_from_string( + port_, + path, + ); + } + + late final _wire_bdk_derivation_path_from_stringPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_derivation_path_from_string'); + late final _wire_bdk_derivation_path_from_string = + _wire_bdk_derivation_path_from_stringPtr.asFunction< + void Function(int, ffi.Pointer)>(); + + void wire_bdk_descriptor_public_key_as_string( + int port_, + ffi.Pointer that, + ) { + return _wire_bdk_descriptor_public_key_as_string( + port_, + that, + ); + } + + late final _wire_bdk_descriptor_public_key_as_stringPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_descriptor_public_key_as_string'); + late final _wire_bdk_descriptor_public_key_as_string = + _wire_bdk_descriptor_public_key_as_stringPtr.asFunction< + void Function( + int, ffi.Pointer)>(); + + void wire_bdk_descriptor_public_key_derive( + int port_, + ffi.Pointer ptr, + ffi.Pointer path, + ) { + return _wire_bdk_descriptor_public_key_derive( + port_, + ptr, + path, + ); + } + + late final _wire_bdk_descriptor_public_key_derivePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_descriptor_public_key_derive'); + late final _wire_bdk_descriptor_public_key_derive = + _wire_bdk_descriptor_public_key_derivePtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer)>(); + + void wire_bdk_descriptor_public_key_extend( + int port_, + ffi.Pointer ptr, + ffi.Pointer path, + ) { + return _wire_bdk_descriptor_public_key_extend( + port_, + ptr, + path, + ); + } + + late final _wire_bdk_descriptor_public_key_extendPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_descriptor_public_key_extend'); + late final _wire_bdk_descriptor_public_key_extend = + _wire_bdk_descriptor_public_key_extendPtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer)>(); + + void wire_bdk_descriptor_public_key_from_string( + int port_, + ffi.Pointer public_key, + ) { + return _wire_bdk_descriptor_public_key_from_string( + port_, + public_key, + ); + } + + late final _wire_bdk_descriptor_public_key_from_stringPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_descriptor_public_key_from_string'); + late final _wire_bdk_descriptor_public_key_from_string = + _wire_bdk_descriptor_public_key_from_stringPtr.asFunction< + void Function(int, ffi.Pointer)>(); + + void wire_bdk_descriptor_secret_key_as_public( + int port_, + ffi.Pointer ptr, + ) { + return _wire_bdk_descriptor_secret_key_as_public( + port_, + ptr, + ); + } + + late final _wire_bdk_descriptor_secret_key_as_publicPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_as_public'); + late final _wire_bdk_descriptor_secret_key_as_public = + _wire_bdk_descriptor_secret_key_as_publicPtr.asFunction< + void Function( + int, ffi.Pointer)>(); + + void wire_bdk_descriptor_secret_key_as_string( + int port_, + ffi.Pointer that, + ) { + return _wire_bdk_descriptor_secret_key_as_string( + port_, + that, + ); + } + + late final _wire_bdk_descriptor_secret_key_as_stringPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_as_string'); + late final _wire_bdk_descriptor_secret_key_as_string = + _wire_bdk_descriptor_secret_key_as_stringPtr.asFunction< + void Function( + int, ffi.Pointer)>(); + + void wire_bdk_descriptor_secret_key_create( + int port_, + int network, + ffi.Pointer mnemonic, + ffi.Pointer password, + ) { + return _wire_bdk_descriptor_secret_key_create( + port_, + network, + mnemonic, + password, + ); + } + + late final _wire_bdk_descriptor_secret_key_createPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Int32, + ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_create'); + late final _wire_bdk_descriptor_secret_key_create = + _wire_bdk_descriptor_secret_key_createPtr.asFunction< + void Function(int, int, ffi.Pointer, + ffi.Pointer)>(); + + void wire_bdk_descriptor_secret_key_derive( + int port_, + ffi.Pointer ptr, + ffi.Pointer path, + ) { + return _wire_bdk_descriptor_secret_key_derive( + port_, + ptr, + path, + ); + } + + late final _wire_bdk_descriptor_secret_key_derivePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_derive'); + late final _wire_bdk_descriptor_secret_key_derive = + _wire_bdk_descriptor_secret_key_derivePtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer)>(); + + void wire_bdk_descriptor_secret_key_extend( + int port_, + ffi.Pointer ptr, + ffi.Pointer path, + ) { + return _wire_bdk_descriptor_secret_key_extend( + port_, + ptr, + path, + ); + } + + late final _wire_bdk_descriptor_secret_key_extendPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_extend'); + late final _wire_bdk_descriptor_secret_key_extend = + _wire_bdk_descriptor_secret_key_extendPtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer)>(); + + void wire_bdk_descriptor_secret_key_from_string( + int port_, + ffi.Pointer secret_key, + ) { + return _wire_bdk_descriptor_secret_key_from_string( + port_, + secret_key, + ); + } + + late final _wire_bdk_descriptor_secret_key_from_stringPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_from_string'); + late final _wire_bdk_descriptor_secret_key_from_string = + _wire_bdk_descriptor_secret_key_from_stringPtr.asFunction< + void Function(int, ffi.Pointer)>(); + + void wire_bdk_descriptor_secret_key_secret_bytes( + int port_, + ffi.Pointer that, + ) { + return _wire_bdk_descriptor_secret_key_secret_bytes( + port_, + that, + ); + } + + late final _wire_bdk_descriptor_secret_key_secret_bytesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_secret_bytes'); + late final _wire_bdk_descriptor_secret_key_secret_bytes = + _wire_bdk_descriptor_secret_key_secret_bytesPtr.asFunction< + void Function( + int, ffi.Pointer)>(); + + void wire_bdk_mnemonic_as_string( + int port_, + ffi.Pointer that, + ) { + return _wire_bdk_mnemonic_as_string( + port_, + that, + ); + } + + late final _wire_bdk_mnemonic_as_stringPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_mnemonic_as_string'); + late final _wire_bdk_mnemonic_as_string = _wire_bdk_mnemonic_as_stringPtr + .asFunction)>(); + + void wire_bdk_mnemonic_from_entropy( + int port_, + ffi.Pointer entropy, + ) { + return _wire_bdk_mnemonic_from_entropy( + port_, + entropy, + ); + } + + late final _wire_bdk_mnemonic_from_entropyPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_mnemonic_from_entropy'); + late final _wire_bdk_mnemonic_from_entropy = + _wire_bdk_mnemonic_from_entropyPtr.asFunction< + void Function(int, ffi.Pointer)>(); + + void wire_bdk_mnemonic_from_string( + int port_, + ffi.Pointer mnemonic, + ) { + return _wire_bdk_mnemonic_from_string( + port_, + mnemonic, + ); + } + + late final _wire_bdk_mnemonic_from_stringPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_mnemonic_from_string'); + late final _wire_bdk_mnemonic_from_string = + _wire_bdk_mnemonic_from_stringPtr.asFunction< + void Function(int, ffi.Pointer)>(); + + void wire_bdk_mnemonic_new( + int port_, + int word_count, + ) { + return _wire_bdk_mnemonic_new( + port_, + word_count, + ); + } + + late final _wire_bdk_mnemonic_newPtr = + _lookup>( + 'frbgen_bdk_flutter_wire_bdk_mnemonic_new'); + late final _wire_bdk_mnemonic_new = + _wire_bdk_mnemonic_newPtr.asFunction(); + + void wire_bdk_psbt_combine( + int port_, + ffi.Pointer ptr, + ffi.Pointer other, + ) { + return _wire_bdk_psbt_combine( + port_, + ptr, + other, + ); + } + + late final _wire_bdk_psbt_combinePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_psbt_combine'); + late final _wire_bdk_psbt_combine = _wire_bdk_psbt_combinePtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer)>(); + + void wire_bdk_psbt_extract_tx( + int port_, + ffi.Pointer ptr, + ) { + return _wire_bdk_psbt_extract_tx( + port_, + ptr, + ); + } + + late final _wire_bdk_psbt_extract_txPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_psbt_extract_tx'); + late final _wire_bdk_psbt_extract_tx = _wire_bdk_psbt_extract_txPtr + .asFunction)>(); + + void wire_bdk_psbt_fee_amount( + int port_, + ffi.Pointer that, + ) { + return _wire_bdk_psbt_fee_amount( + port_, + that, + ); + } + + late final _wire_bdk_psbt_fee_amountPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_psbt_fee_amount'); + late final _wire_bdk_psbt_fee_amount = _wire_bdk_psbt_fee_amountPtr + .asFunction)>(); + + void wire_bdk_psbt_fee_rate( + int port_, + ffi.Pointer that, + ) { + return _wire_bdk_psbt_fee_rate( + port_, + that, + ); + } + + late final _wire_bdk_psbt_fee_ratePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_psbt_fee_rate'); + late final _wire_bdk_psbt_fee_rate = _wire_bdk_psbt_fee_ratePtr + .asFunction)>(); + + void wire_bdk_psbt_from_str( + int port_, + ffi.Pointer psbt_base64, + ) { + return _wire_bdk_psbt_from_str( + port_, + psbt_base64, + ); + } + + late final _wire_bdk_psbt_from_strPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_psbt_from_str'); + late final _wire_bdk_psbt_from_str = _wire_bdk_psbt_from_strPtr.asFunction< + void Function(int, ffi.Pointer)>(); + + void wire_bdk_psbt_json_serialize( + int port_, + ffi.Pointer that, + ) { + return _wire_bdk_psbt_json_serialize( + port_, + that, + ); + } + + late final _wire_bdk_psbt_json_serializePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_psbt_json_serialize'); + late final _wire_bdk_psbt_json_serialize = _wire_bdk_psbt_json_serializePtr + .asFunction)>(); + + void wire_bdk_psbt_serialize( + int port_, + ffi.Pointer that, + ) { + return _wire_bdk_psbt_serialize( + port_, + that, + ); + } + + late final _wire_bdk_psbt_serializePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_psbt_serialize'); + late final _wire_bdk_psbt_serialize = _wire_bdk_psbt_serializePtr + .asFunction)>(); + + void wire_bdk_psbt_txid( + int port_, + ffi.Pointer that, + ) { + return _wire_bdk_psbt_txid( + port_, + that, + ); + } + + late final _wire_bdk_psbt_txidPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_psbt_txid'); + late final _wire_bdk_psbt_txid = _wire_bdk_psbt_txidPtr + .asFunction)>(); + + void wire_bdk_address_as_string( + int port_, + ffi.Pointer that, + ) { + return _wire_bdk_address_as_string( + port_, + that, + ); + } + + late final _wire_bdk_address_as_stringPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_address_as_string'); + late final _wire_bdk_address_as_string = _wire_bdk_address_as_stringPtr + .asFunction)>(); + + void wire_bdk_address_from_script( + int port_, + ffi.Pointer script, + int network, + ) { + return _wire_bdk_address_from_script( + port_, + script, + network, + ); + } + + late final _wire_bdk_address_from_scriptPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer, + ffi.Int32)>>('frbgen_bdk_flutter_wire_bdk_address_from_script'); + late final _wire_bdk_address_from_script = + _wire_bdk_address_from_scriptPtr.asFunction< + void Function(int, ffi.Pointer, int)>(); + + void wire_bdk_address_from_string( + int port_, + ffi.Pointer address, + int network, + ) { + return _wire_bdk_address_from_string( + port_, + address, + network, + ); + } + + late final _wire_bdk_address_from_stringPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Int32)>>('frbgen_bdk_flutter_wire_bdk_address_from_string'); + late final _wire_bdk_address_from_string = + _wire_bdk_address_from_stringPtr.asFunction< + void Function( + int, ffi.Pointer, int)>(); + + void wire_bdk_address_is_valid_for_network( + int port_, + ffi.Pointer that, + int network, + ) { + return _wire_bdk_address_is_valid_for_network( + port_, + that, + network, + ); + } + + late final _wire_bdk_address_is_valid_for_networkPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer, ffi.Int32)>>( + 'frbgen_bdk_flutter_wire_bdk_address_is_valid_for_network'); + late final _wire_bdk_address_is_valid_for_network = + _wire_bdk_address_is_valid_for_networkPtr.asFunction< + void Function(int, ffi.Pointer, int)>(); + + void wire_bdk_address_network( + int port_, + ffi.Pointer that, + ) { + return _wire_bdk_address_network( + port_, + that, + ); + } + + late final _wire_bdk_address_networkPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_address_network'); + late final _wire_bdk_address_network = _wire_bdk_address_networkPtr + .asFunction)>(); + + void wire_bdk_address_payload( + int port_, + ffi.Pointer that, + ) { + return _wire_bdk_address_payload( + port_, + that, + ); + } + + late final _wire_bdk_address_payloadPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_address_payload'); + late final _wire_bdk_address_payload = _wire_bdk_address_payloadPtr + .asFunction)>(); + + void wire_bdk_address_script( + int port_, + ffi.Pointer ptr, + ) { + return _wire_bdk_address_script( + port_, + ptr, + ); + } + + late final _wire_bdk_address_scriptPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_address_script'); + late final _wire_bdk_address_script = _wire_bdk_address_scriptPtr + .asFunction)>(); + + void wire_bdk_address_to_qr_uri( + int port_, + ffi.Pointer that, + ) { + return _wire_bdk_address_to_qr_uri( + port_, + that, + ); + } + + late final _wire_bdk_address_to_qr_uriPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_address_to_qr_uri'); + late final _wire_bdk_address_to_qr_uri = _wire_bdk_address_to_qr_uriPtr + .asFunction)>(); + + void wire_bdk_script_buf_empty( + int port_, + ) { + return _wire_bdk_script_buf_empty( + port_, + ); + } + + late final _wire_bdk_script_buf_emptyPtr = + _lookup>( + 'frbgen_bdk_flutter_wire_bdk_script_buf_empty'); + late final _wire_bdk_script_buf_empty = + _wire_bdk_script_buf_emptyPtr.asFunction(); + + void wire_bdk_script_buf_from_hex( + int port_, + ffi.Pointer s, + ) { + return _wire_bdk_script_buf_from_hex( + port_, + s, + ); + } + + late final _wire_bdk_script_buf_from_hexPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_script_buf_from_hex'); + late final _wire_bdk_script_buf_from_hex = + _wire_bdk_script_buf_from_hexPtr.asFunction< + void Function(int, ffi.Pointer)>(); + + void wire_bdk_script_buf_with_capacity( + int port_, + int capacity, + ) { + return _wire_bdk_script_buf_with_capacity( + port_, + capacity, + ); + } + + late final _wire_bdk_script_buf_with_capacityPtr = + _lookup>( + 'frbgen_bdk_flutter_wire_bdk_script_buf_with_capacity'); + late final _wire_bdk_script_buf_with_capacity = + _wire_bdk_script_buf_with_capacityPtr + .asFunction(); + + void wire_bdk_transaction_from_bytes( + int port_, + ffi.Pointer transaction_bytes, + ) { + return _wire_bdk_transaction_from_bytes( + port_, + transaction_bytes, + ); + } + + late final _wire_bdk_transaction_from_bytesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_transaction_from_bytes'); + late final _wire_bdk_transaction_from_bytes = + _wire_bdk_transaction_from_bytesPtr.asFunction< + void Function(int, ffi.Pointer)>(); + + void wire_bdk_transaction_input( + int port_, + ffi.Pointer that, + ) { + return _wire_bdk_transaction_input( + port_, + that, + ); + } + + late final _wire_bdk_transaction_inputPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_transaction_input'); + late final _wire_bdk_transaction_input = _wire_bdk_transaction_inputPtr + .asFunction)>(); + + void wire_bdk_transaction_is_coin_base( + int port_, + ffi.Pointer that, + ) { + return _wire_bdk_transaction_is_coin_base( + port_, + that, + ); + } + + late final _wire_bdk_transaction_is_coin_basePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_transaction_is_coin_base'); + late final _wire_bdk_transaction_is_coin_base = + _wire_bdk_transaction_is_coin_basePtr.asFunction< + void Function(int, ffi.Pointer)>(); + + void wire_bdk_transaction_is_explicitly_rbf( + int port_, + ffi.Pointer that, + ) { + return _wire_bdk_transaction_is_explicitly_rbf( + port_, + that, + ); + } + + late final _wire_bdk_transaction_is_explicitly_rbfPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_transaction_is_explicitly_rbf'); + late final _wire_bdk_transaction_is_explicitly_rbf = + _wire_bdk_transaction_is_explicitly_rbfPtr.asFunction< + void Function(int, ffi.Pointer)>(); + + void wire_bdk_transaction_is_lock_time_enabled( + int port_, + ffi.Pointer that, + ) { + return _wire_bdk_transaction_is_lock_time_enabled( + port_, + that, + ); + } + + late final _wire_bdk_transaction_is_lock_time_enabledPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_transaction_is_lock_time_enabled'); + late final _wire_bdk_transaction_is_lock_time_enabled = + _wire_bdk_transaction_is_lock_time_enabledPtr.asFunction< + void Function(int, ffi.Pointer)>(); + + void wire_bdk_transaction_lock_time( + int port_, + ffi.Pointer that, + ) { + return _wire_bdk_transaction_lock_time( + port_, + that, + ); + } + + late final _wire_bdk_transaction_lock_timePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_transaction_lock_time'); + late final _wire_bdk_transaction_lock_time = + _wire_bdk_transaction_lock_timePtr.asFunction< + void Function(int, ffi.Pointer)>(); + + void wire_bdk_transaction_new( + int port_, + int version, + ffi.Pointer lock_time, + ffi.Pointer input, + ffi.Pointer output, + ) { + return _wire_bdk_transaction_new( + port_, + version, + lock_time, + input, + output, + ); + } + + late final _wire_bdk_transaction_newPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Int32, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_transaction_new'); + late final _wire_bdk_transaction_new = + _wire_bdk_transaction_newPtr.asFunction< + void Function( + int, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + void wire_bdk_transaction_output( + int port_, + ffi.Pointer that, + ) { + return _wire_bdk_transaction_output( + port_, + that, + ); + } + + late final _wire_bdk_transaction_outputPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_transaction_output'); + late final _wire_bdk_transaction_output = _wire_bdk_transaction_outputPtr + .asFunction)>(); + + void wire_bdk_transaction_serialize( + int port_, + ffi.Pointer that, + ) { + return _wire_bdk_transaction_serialize( + port_, + that, + ); + } + + late final _wire_bdk_transaction_serializePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_transaction_serialize'); + late final _wire_bdk_transaction_serialize = + _wire_bdk_transaction_serializePtr.asFunction< + void Function(int, ffi.Pointer)>(); + + void wire_bdk_transaction_size( + int port_, + ffi.Pointer that, + ) { + return _wire_bdk_transaction_size( + port_, + that, + ); + } + + late final _wire_bdk_transaction_sizePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_transaction_size'); + late final _wire_bdk_transaction_size = _wire_bdk_transaction_sizePtr + .asFunction)>(); + + void wire_bdk_transaction_txid( + int port_, + ffi.Pointer that, + ) { + return _wire_bdk_transaction_txid( + port_, + that, + ); + } + + late final _wire_bdk_transaction_txidPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_transaction_txid'); + late final _wire_bdk_transaction_txid = _wire_bdk_transaction_txidPtr + .asFunction)>(); + + void wire_bdk_transaction_version( + int port_, + ffi.Pointer that, + ) { + return _wire_bdk_transaction_version( + port_, + that, + ); + } + + late final _wire_bdk_transaction_versionPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_transaction_version'); + late final _wire_bdk_transaction_version = _wire_bdk_transaction_versionPtr + .asFunction)>(); + + void wire_bdk_transaction_vsize( + int port_, + ffi.Pointer that, + ) { + return _wire_bdk_transaction_vsize( + port_, + that, + ); + } + + late final _wire_bdk_transaction_vsizePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_transaction_vsize'); + late final _wire_bdk_transaction_vsize = _wire_bdk_transaction_vsizePtr + .asFunction)>(); + + void wire_bdk_transaction_weight( + int port_, + ffi.Pointer that, + ) { + return _wire_bdk_transaction_weight( + port_, + that, + ); + } + + late final _wire_bdk_transaction_weightPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_transaction_weight'); + late final _wire_bdk_transaction_weight = _wire_bdk_transaction_weightPtr + .asFunction)>(); + + void wire_bdk_wallet_get_address( + int port_, + ffi.Pointer ptr, + ffi.Pointer address_index, + ) { + return _wire_bdk_wallet_get_address( + port_, + ptr, + address_index, + ); + } + + late final _wire_bdk_wallet_get_addressPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_wallet_get_address'); + late final _wire_bdk_wallet_get_address = + _wire_bdk_wallet_get_addressPtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer)>(); + + void wire_bdk_wallet_get_balance( + int port_, + ffi.Pointer that, + ) { + return _wire_bdk_wallet_get_balance( + port_, + that, + ); + } + + late final _wire_bdk_wallet_get_balancePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_wallet_get_balance'); + late final _wire_bdk_wallet_get_balance = _wire_bdk_wallet_get_balancePtr + .asFunction)>(); + + void wire_bdk_wallet_get_descriptor_for_keychain( + int port_, + ffi.Pointer ptr, + int keychain, + ) { + return _wire_bdk_wallet_get_descriptor_for_keychain( + port_, + ptr, + keychain, + ); + } + + late final _wire_bdk_wallet_get_descriptor_for_keychainPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer, ffi.Int32)>>( + 'frbgen_bdk_flutter_wire_bdk_wallet_get_descriptor_for_keychain'); + late final _wire_bdk_wallet_get_descriptor_for_keychain = + _wire_bdk_wallet_get_descriptor_for_keychainPtr.asFunction< + void Function(int, ffi.Pointer, int)>(); + + void wire_bdk_wallet_get_internal_address( + int port_, + ffi.Pointer ptr, + ffi.Pointer address_index, + ) { + return _wire_bdk_wallet_get_internal_address( + port_, + ptr, + address_index, + ); + } + + late final _wire_bdk_wallet_get_internal_addressPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_wallet_get_internal_address'); + late final _wire_bdk_wallet_get_internal_address = + _wire_bdk_wallet_get_internal_addressPtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer)>(); + + void wire_bdk_wallet_get_psbt_input( + int port_, + ffi.Pointer that, + ffi.Pointer utxo, + bool only_witness_utxo, + ffi.Pointer sighash_type, + ) { + return _wire_bdk_wallet_get_psbt_input( + port_, + that, + utxo, + only_witness_utxo, + sighash_type, + ); + } + + late final _wire_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_bdk_wallet_get_psbt_input'); + late final _wire_bdk_wallet_get_psbt_input = + _wire_bdk_wallet_get_psbt_inputPtr.asFunction< + void Function( + int, + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer)>(); + + void wire_bdk_wallet_is_mine( + int port_, + ffi.Pointer that, + ffi.Pointer script, + ) { + return _wire_bdk_wallet_is_mine( + port_, + that, + script, + ); + } + + late final _wire_bdk_wallet_is_minePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_wallet_is_mine'); + late final _wire_bdk_wallet_is_mine = _wire_bdk_wallet_is_minePtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer)>(); + + void wire_bdk_wallet_list_transactions( + int port_, + ffi.Pointer that, + bool include_raw, + ) { + return _wire_bdk_wallet_list_transactions( + port_, + that, + include_raw, + ); + } + + late final _wire_bdk_wallet_list_transactionsPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer, ffi.Bool)>>( + 'frbgen_bdk_flutter_wire_bdk_wallet_list_transactions'); + late final _wire_bdk_wallet_list_transactions = + _wire_bdk_wallet_list_transactionsPtr.asFunction< + void Function(int, ffi.Pointer, bool)>(); + + void wire_bdk_wallet_list_unspent( + int port_, + ffi.Pointer that, + ) { + return _wire_bdk_wallet_list_unspent( + port_, + that, + ); + } + + late final _wire_bdk_wallet_list_unspentPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_wallet_list_unspent'); + late final _wire_bdk_wallet_list_unspent = _wire_bdk_wallet_list_unspentPtr + .asFunction)>(); + + void wire_bdk_wallet_network( + int port_, + ffi.Pointer that, + ) { + return _wire_bdk_wallet_network( + port_, + that, + ); + } + + late final _wire_bdk_wallet_networkPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_wallet_network'); + late final _wire_bdk_wallet_network = _wire_bdk_wallet_networkPtr + .asFunction)>(); + + void wire_bdk_wallet_new( + int port_, + ffi.Pointer descriptor, + ffi.Pointer change_descriptor, + int network, + ffi.Pointer database_config, + ) { + return _wire_bdk_wallet_new( + port_, + descriptor, + change_descriptor, + network, + database_config, + ); + } + + late final _wire_bdk_wallet_newPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_wallet_new'); + late final _wire_bdk_wallet_new = _wire_bdk_wallet_newPtr.asFunction< + void Function( + int, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); + + void wire_bdk_wallet_sign( + int port_, + ffi.Pointer ptr, + ffi.Pointer psbt, + ffi.Pointer sign_options, + ) { + return _wire_bdk_wallet_sign( + port_, + ptr, + psbt, + sign_options, + ); + } + + late final _wire_bdk_wallet_signPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_wallet_sign'); + late final _wire_bdk_wallet_sign = _wire_bdk_wallet_signPtr.asFunction< + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + void wire_bdk_wallet_sync( + int port_, + ffi.Pointer ptr, + ffi.Pointer blockchain, + ) { + return _wire_bdk_wallet_sync( + port_, + ptr, + blockchain, + ); + } + + late final _wire_bdk_wallet_syncPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire_bdk_wallet_sync'); + late final _wire_bdk_wallet_sync = _wire_bdk_wallet_syncPtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer)>(); + + void wire_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_finish_bump_fee_tx_builder( + port_, + txid, + fee_rate, + allow_shrinking, + wallet, + enable_rbf, + n_sequence, + ); + } + + late final _wire_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_finish_bump_fee_tx_builder'); + late final _wire_finish_bump_fee_tx_builder = + _wire_finish_bump_fee_tx_builderPtr.asFunction< + void Function( + int, + ffi.Pointer, + double, + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer)>(); + + void wire_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 data, + ) { + return _wire_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, + data, + ); + } + + late final _wire_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)>>( + 'frbgen_bdk_flutter_wire_tx_builder_finish'); + late final _wire_tx_builder_finish = _wire_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)>(); + + void rust_arc_increment_strong_count_RustOpaque_AnyBlockchain( + ffi.Pointer ptr, + ) { + return _rust_arc_increment_strong_count_RustOpaque_AnyBlockchain( + ptr, + ); + } + + late final _rust_arc_increment_strong_count_RustOpaque_AnyBlockchainPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_AnyBlockchain'); + late final _rust_arc_increment_strong_count_RustOpaque_AnyBlockchain = + _rust_arc_increment_strong_count_RustOpaque_AnyBlockchainPtr + .asFunction)>(); + + void rust_arc_decrement_strong_count_RustOpaque_AnyBlockchain( + ffi.Pointer ptr, + ) { + return _rust_arc_decrement_strong_count_RustOpaque_AnyBlockchain( + ptr, + ); + } + + late final _rust_arc_decrement_strong_count_RustOpaque_AnyBlockchainPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_AnyBlockchain'); + late final _rust_arc_decrement_strong_count_RustOpaque_AnyBlockchain = + _rust_arc_decrement_strong_count_RustOpaque_AnyBlockchainPtr + .asFunction)>(); + + void rust_arc_increment_strong_count_RustOpaque_ExtendedDescriptor( + ffi.Pointer ptr, + ) { + return _rust_arc_increment_strong_count_RustOpaque_ExtendedDescriptor( + ptr, + ); + } + + late final _rust_arc_increment_strong_count_RustOpaque_ExtendedDescriptorPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_ExtendedDescriptor'); + late final _rust_arc_increment_strong_count_RustOpaque_ExtendedDescriptor = + _rust_arc_increment_strong_count_RustOpaque_ExtendedDescriptorPtr + .asFunction)>(); + + void rust_arc_decrement_strong_count_RustOpaque_ExtendedDescriptor( + ffi.Pointer ptr, + ) { + return _rust_arc_decrement_strong_count_RustOpaque_ExtendedDescriptor( + ptr, + ); + } + + late final _rust_arc_decrement_strong_count_RustOpaque_ExtendedDescriptorPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_ExtendedDescriptor'); + late final _rust_arc_decrement_strong_count_RustOpaque_ExtendedDescriptor = + _rust_arc_decrement_strong_count_RustOpaque_ExtendedDescriptorPtr + .asFunction)>(); + + void + rust_arc_increment_strong_count_RustOpaque_MutexPartiallySignedTransaction( + ffi.Pointer ptr, + ) { + return _rust_arc_increment_strong_count_RustOpaque_MutexPartiallySignedTransaction( + ptr, + ); + } + + late final _rust_arc_increment_strong_count_RustOpaque_MutexPartiallySignedTransactionPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_MutexPartiallySignedTransaction'); + late final _rust_arc_increment_strong_count_RustOpaque_MutexPartiallySignedTransaction = + _rust_arc_increment_strong_count_RustOpaque_MutexPartiallySignedTransactionPtr + .asFunction)>(); + + void + rust_arc_decrement_strong_count_RustOpaque_MutexPartiallySignedTransaction( + ffi.Pointer ptr, + ) { + return _rust_arc_decrement_strong_count_RustOpaque_MutexPartiallySignedTransaction( + ptr, + ); + } + + late final _rust_arc_decrement_strong_count_RustOpaque_MutexPartiallySignedTransactionPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_MutexPartiallySignedTransaction'); + late final _rust_arc_decrement_strong_count_RustOpaque_MutexPartiallySignedTransaction = + _rust_arc_decrement_strong_count_RustOpaque_MutexPartiallySignedTransactionPtr + .asFunction)>(); + + void rust_arc_increment_strong_count_RustOpaque_MutexbdkWalletAnyDatabase( + ffi.Pointer ptr, + ) { + return _rust_arc_increment_strong_count_RustOpaque_MutexbdkWalletAnyDatabase( + ptr, + ); + } + + late final _rust_arc_increment_strong_count_RustOpaque_MutexbdkWalletAnyDatabasePtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_MutexbdkWalletAnyDatabase'); + late final _rust_arc_increment_strong_count_RustOpaque_MutexbdkWalletAnyDatabase = + _rust_arc_increment_strong_count_RustOpaque_MutexbdkWalletAnyDatabasePtr + .asFunction)>(); + + void rust_arc_decrement_strong_count_RustOpaque_MutexbdkWalletAnyDatabase( + ffi.Pointer ptr, + ) { + return _rust_arc_decrement_strong_count_RustOpaque_MutexbdkWalletAnyDatabase( + ptr, + ); + } + + late final _rust_arc_decrement_strong_count_RustOpaque_MutexbdkWalletAnyDatabasePtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_MutexbdkWalletAnyDatabase'); + late final _rust_arc_decrement_strong_count_RustOpaque_MutexbdkWalletAnyDatabase = + _rust_arc_decrement_strong_count_RustOpaque_MutexbdkWalletAnyDatabasePtr + .asFunction)>(); + + 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_bitcoinbip32DerivationPath( + ffi.Pointer ptr, + ) { + return _rust_arc_increment_strong_count_RustOpaque_bitcoinbip32DerivationPath( + ptr, + ); + } + + late final _rust_arc_increment_strong_count_RustOpaque_bitcoinbip32DerivationPathPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bitcoinbip32DerivationPath'); + late final _rust_arc_increment_strong_count_RustOpaque_bitcoinbip32DerivationPath = + _rust_arc_increment_strong_count_RustOpaque_bitcoinbip32DerivationPathPtr + .asFunction)>(); + + void rust_arc_decrement_strong_count_RustOpaque_bitcoinbip32DerivationPath( + ffi.Pointer ptr, + ) { + return _rust_arc_decrement_strong_count_RustOpaque_bitcoinbip32DerivationPath( + ptr, + ); + } + + late final _rust_arc_decrement_strong_count_RustOpaque_bitcoinbip32DerivationPathPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bitcoinbip32DerivationPath'); + late final _rust_arc_decrement_strong_count_RustOpaque_bitcoinbip32DerivationPath = + _rust_arc_decrement_strong_count_RustOpaque_bitcoinbip32DerivationPathPtr + .asFunction)>(); + + void rust_arc_increment_strong_count_RustOpaque_keysDescriptorPublicKey( + ffi.Pointer ptr, + ) { + return _rust_arc_increment_strong_count_RustOpaque_keysDescriptorPublicKey( + ptr, + ); + } + + late final _rust_arc_increment_strong_count_RustOpaque_keysDescriptorPublicKeyPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysDescriptorPublicKey'); + late final _rust_arc_increment_strong_count_RustOpaque_keysDescriptorPublicKey = + _rust_arc_increment_strong_count_RustOpaque_keysDescriptorPublicKeyPtr + .asFunction)>(); + + void rust_arc_decrement_strong_count_RustOpaque_keysDescriptorPublicKey( + ffi.Pointer ptr, + ) { + return _rust_arc_decrement_strong_count_RustOpaque_keysDescriptorPublicKey( + ptr, + ); + } + + late final _rust_arc_decrement_strong_count_RustOpaque_keysDescriptorPublicKeyPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysDescriptorPublicKey'); + late final _rust_arc_decrement_strong_count_RustOpaque_keysDescriptorPublicKey = + _rust_arc_decrement_strong_count_RustOpaque_keysDescriptorPublicKeyPtr + .asFunction)>(); + + void rust_arc_increment_strong_count_RustOpaque_keysDescriptorSecretKey( + ffi.Pointer ptr, + ) { + return _rust_arc_increment_strong_count_RustOpaque_keysDescriptorSecretKey( + ptr, + ); + } + + late final _rust_arc_increment_strong_count_RustOpaque_keysDescriptorSecretKeyPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysDescriptorSecretKey'); + late final _rust_arc_increment_strong_count_RustOpaque_keysDescriptorSecretKey = + _rust_arc_increment_strong_count_RustOpaque_keysDescriptorSecretKeyPtr + .asFunction)>(); + + void rust_arc_decrement_strong_count_RustOpaque_keysDescriptorSecretKey( + ffi.Pointer ptr, + ) { + return _rust_arc_decrement_strong_count_RustOpaque_keysDescriptorSecretKey( + ptr, + ); + } + + late final _rust_arc_decrement_strong_count_RustOpaque_keysDescriptorSecretKeyPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysDescriptorSecretKey'); + late final _rust_arc_decrement_strong_count_RustOpaque_keysDescriptorSecretKey = + _rust_arc_decrement_strong_count_RustOpaque_keysDescriptorSecretKeyPtr + .asFunction)>(); + + void rust_arc_increment_strong_count_RustOpaque_keysKeyMap( + ffi.Pointer ptr, + ) { + return _rust_arc_increment_strong_count_RustOpaque_keysKeyMap( + ptr, + ); + } + + late final _rust_arc_increment_strong_count_RustOpaque_keysKeyMapPtr = _lookup< + ffi.NativeFunction)>>( + 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysKeyMap'); + late final _rust_arc_increment_strong_count_RustOpaque_keysKeyMap = + _rust_arc_increment_strong_count_RustOpaque_keysKeyMapPtr + .asFunction)>(); + + void rust_arc_decrement_strong_count_RustOpaque_keysKeyMap( + ffi.Pointer ptr, + ) { + return _rust_arc_decrement_strong_count_RustOpaque_keysKeyMap( + ptr, + ); + } + + late final _rust_arc_decrement_strong_count_RustOpaque_keysKeyMapPtr = _lookup< + ffi.NativeFunction)>>( + 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysKeyMap'); + late final _rust_arc_decrement_strong_count_RustOpaque_keysKeyMap = + _rust_arc_decrement_strong_count_RustOpaque_keysKeyMapPtr + .asFunction)>(); + + void rust_arc_increment_strong_count_RustOpaque_keysbip39Mnemonic( + ffi.Pointer ptr, + ) { + return _rust_arc_increment_strong_count_RustOpaque_keysbip39Mnemonic( + ptr, + ); + } + + late final _rust_arc_increment_strong_count_RustOpaque_keysbip39MnemonicPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysbip39Mnemonic'); + late final _rust_arc_increment_strong_count_RustOpaque_keysbip39Mnemonic = + _rust_arc_increment_strong_count_RustOpaque_keysbip39MnemonicPtr + .asFunction)>(); + + void rust_arc_decrement_strong_count_RustOpaque_keysbip39Mnemonic( + ffi.Pointer ptr, + ) { + return _rust_arc_decrement_strong_count_RustOpaque_keysbip39Mnemonic( + ptr, + ); + } + + late final _rust_arc_decrement_strong_count_RustOpaque_keysbip39MnemonicPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysbip39Mnemonic'); + late final _rust_arc_decrement_strong_count_RustOpaque_keysbip39Mnemonic = + _rust_arc_decrement_strong_count_RustOpaque_keysbip39MnemonicPtr + .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_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_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_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_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_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_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< + ffi.NativeFunction< + ffi.Bool Function(DartPort port_id, ffi.Pointer message)>>; +typedef DartPort = ffi.Int64; + +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 inner; +} + +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_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 multi_sig; + + @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_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_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_list_local_utxo 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_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_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; +} diff --git a/lib/src/generated/frb_generated.web.dart b/lib/src/generated/frb_generated.web.dart new file mode 100644 index 00000000..c30e669d --- /dev/null +++ b/lib/src/generated/frb_generated.web.dart @@ -0,0 +1,3380 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31. + +// 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 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated_web.dart'; + +abstract class CApiApiImplPlatform extends BaseApiImpl { + CApiApiImplPlatform({ + required super.handler, + required super.wire, + required super.generalizedFrbRustBinding, + required super.portManager, + }); + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_AnyBlockchainPtr => + wire.rust_arc_decrement_strong_count_RustOpaque_AnyBlockchain; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_ExtendedDescriptorPtr => + wire.rust_arc_decrement_strong_count_RustOpaque_ExtendedDescriptor; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_MutexPartiallySignedTransactionPtr => + wire.rust_arc_decrement_strong_count_RustOpaque_MutexPartiallySignedTransaction; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_MutexBdkWalletAnyDatabasePtr => wire + .rust_arc_decrement_strong_count_RustOpaque_MutexbdkWalletAnyDatabase; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_BdkBitcoinAddressPtr => + wire.rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_BitcoinBip32DerivationPathPtr => wire + .rust_arc_decrement_strong_count_RustOpaque_bitcoinbip32DerivationPath; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_KeysDescriptorPublicKeyPtr => wire + .rust_arc_decrement_strong_count_RustOpaque_keysDescriptorPublicKey; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_KeysDescriptorSecretKeyPtr => wire + .rust_arc_decrement_strong_count_RustOpaque_keysDescriptorSecretKey; + + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_KeysKeyMapPtr => + wire.rust_arc_decrement_strong_count_RustOpaque_keysKeyMap; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_KeysBip39MnemonicPtr => + wire.rust_arc_decrement_strong_count_RustOpaque_keysbip39Mnemonic; + + @protected + AnyBlockchain dco_decode_RustOpaque_AnyBlockchain(dynamic raw); + + @protected + ExtendedDescriptor dco_decode_RustOpaque_ExtendedDescriptor(dynamic raw); + + @protected + MutexPartiallySignedTransaction + dco_decode_RustOpaque_MutexPartiallySignedTransaction(dynamic raw); + + @protected + MutexBdkWalletAnyDatabase dco_decode_RustOpaque_MutexbdkWalletAnyDatabase( + dynamic raw); + + @protected + BdkBitcoinAddress dco_decode_RustOpaque_bdkbitcoinAddress(dynamic raw); + + @protected + BitcoinBip32DerivationPath dco_decode_RustOpaque_bitcoinbip32DerivationPath( + dynamic raw); + + @protected + KeysDescriptorPublicKey dco_decode_RustOpaque_keysDescriptorPublicKey( + dynamic raw); + + @protected + KeysDescriptorSecretKey dco_decode_RustOpaque_keysDescriptorSecretKey( + dynamic raw); + + @protected + KeysKeyMap dco_decode_RustOpaque_keysKeyMap(dynamic raw); + + @protected + KeysBip39Mnemonic dco_decode_RustOpaque_keysbip39Mnemonic(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 + 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 + 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 + 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 + PsbtSigHashType dco_decode_box_autoadd_psbt_sig_hash_type(dynamic raw); + + @protected + RbfValue dco_decode_box_autoadd_rbf_value(dynamic raw); + + @protected + (OutPoint, Input, int) 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 + int 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 + 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_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_prim_u_8_loose(dynamic raw); + + @protected + Uint8List dco_decode_list_prim_u_8_strict(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 + 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 + 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 + double? dco_decode_opt_box_autoadd_f_32(dynamic raw); + + @protected + FeeRate? dco_decode_opt_box_autoadd_fee_rate(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, int)? + 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 + int? 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 + 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 + (OutPoint, Input, int) dco_decode_record_out_point_input_usize(dynamic raw); + + @protected + RpcConfig dco_decode_rpc_config(dynamic raw); + + @protected + RpcSyncParams dco_decode_rpc_sync_params(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 + int 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 + int 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 + AnyBlockchain sse_decode_RustOpaque_AnyBlockchain( + SseDeserializer deserializer); + + @protected + ExtendedDescriptor sse_decode_RustOpaque_ExtendedDescriptor( + SseDeserializer deserializer); + + @protected + MutexPartiallySignedTransaction + sse_decode_RustOpaque_MutexPartiallySignedTransaction( + SseDeserializer deserializer); + + @protected + MutexBdkWalletAnyDatabase sse_decode_RustOpaque_MutexbdkWalletAnyDatabase( + SseDeserializer deserializer); + + @protected + BdkBitcoinAddress sse_decode_RustOpaque_bdkbitcoinAddress( + SseDeserializer deserializer); + + @protected + BitcoinBip32DerivationPath sse_decode_RustOpaque_bitcoinbip32DerivationPath( + SseDeserializer deserializer); + + @protected + KeysDescriptorPublicKey sse_decode_RustOpaque_keysDescriptorPublicKey( + SseDeserializer deserializer); + + @protected + KeysDescriptorSecretKey sse_decode_RustOpaque_keysDescriptorSecretKey( + SseDeserializer deserializer); + + @protected + KeysKeyMap sse_decode_RustOpaque_keysKeyMap(SseDeserializer deserializer); + + @protected + KeysBip39Mnemonic sse_decode_RustOpaque_keysbip39Mnemonic( + 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 + 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 + 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 + 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 + PsbtSigHashType sse_decode_box_autoadd_psbt_sig_hash_type( + SseDeserializer deserializer); + + @protected + RbfValue sse_decode_box_autoadd_rbf_value(SseDeserializer deserializer); + + @protected + (OutPoint, Input, int) 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 + int 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 + 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_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_prim_u_8_loose(SseDeserializer deserializer); + + @protected + Uint8List sse_decode_list_prim_u_8_strict(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 + 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 + 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 + double? sse_decode_opt_box_autoadd_f_32(SseDeserializer deserializer); + + @protected + FeeRate? sse_decode_opt_box_autoadd_fee_rate(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, int)? + 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 + int? 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 + 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 + (OutPoint, Input, int) sse_decode_record_out_point_input_usize( + SseDeserializer deserializer); + + @protected + RpcConfig sse_decode_rpc_config(SseDeserializer deserializer); + + @protected + RpcSyncParams sse_decode_rpc_sync_params(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 + int 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 + int 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 + String cst_encode_String(String raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw; + } + + @protected + List cst_encode_address_error(AddressError raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + if (raw is AddressError_Base58) { + return [0, cst_encode_String(raw.field0)]; + } + if (raw is AddressError_Bech32) { + return [1, cst_encode_String(raw.field0)]; + } + if (raw is AddressError_EmptyBech32Payload) { + return [2]; + } + if (raw is AddressError_InvalidBech32Variant) { + return [ + 3, + cst_encode_variant(raw.expected), + cst_encode_variant(raw.found) + ]; + } + if (raw is AddressError_InvalidWitnessVersion) { + return [4, cst_encode_u_8(raw.field0)]; + } + if (raw is AddressError_UnparsableWitnessVersion) { + return [5, cst_encode_String(raw.field0)]; + } + if (raw is AddressError_MalformedWitnessVersion) { + return [6]; + } + if (raw is AddressError_InvalidWitnessProgramLength) { + return [7, cst_encode_usize(raw.field0)]; + } + if (raw is AddressError_InvalidSegwitV0ProgramLength) { + return [8, cst_encode_usize(raw.field0)]; + } + if (raw is AddressError_UncompressedPubkey) { + return [9]; + } + if (raw is AddressError_ExcessiveScriptSize) { + return [10]; + } + if (raw is AddressError_UnrecognizedScript) { + return [11]; + } + if (raw is AddressError_UnknownAddressType) { + return [12, cst_encode_String(raw.field0)]; + } + if (raw is AddressError_NetworkValidation) { + return [ + 13, + cst_encode_network(raw.networkRequired), + cst_encode_network(raw.networkFound), + cst_encode_String(raw.address) + ]; + } + + throw Exception('unreachable'); + } + + @protected + List cst_encode_address_index(AddressIndex raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + if (raw is AddressIndex_Increase) { + return [0]; + } + if (raw is AddressIndex_LastUnused) { + return [1]; + } + if (raw is AddressIndex_Peek) { + return [2, cst_encode_u_32(raw.index)]; + } + if (raw is AddressIndex_Reset) { + return [3, cst_encode_u_32(raw.index)]; + } + + throw Exception('unreachable'); + } + + @protected + List cst_encode_auth(Auth raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + if (raw is Auth_None) { + return [0]; + } + if (raw is Auth_UserPass) { + return [ + 1, + cst_encode_String(raw.username), + cst_encode_String(raw.password) + ]; + } + if (raw is Auth_Cookie) { + return [2, cst_encode_String(raw.file)]; + } + + throw Exception('unreachable'); + } + + @protected + List cst_encode_balance(Balance raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [ + cst_encode_u_64(raw.immature), + cst_encode_u_64(raw.trustedPending), + cst_encode_u_64(raw.untrustedPending), + cst_encode_u_64(raw.confirmed), + cst_encode_u_64(raw.spendable), + cst_encode_u_64(raw.total) + ]; + } + + @protected + List cst_encode_bdk_address(BdkAddress raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [cst_encode_RustOpaque_bdkbitcoinAddress(raw.ptr)]; + } + + @protected + List cst_encode_bdk_blockchain(BdkBlockchain raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [cst_encode_RustOpaque_AnyBlockchain(raw.ptr)]; + } + + @protected + List cst_encode_bdk_derivation_path(BdkDerivationPath raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [cst_encode_RustOpaque_bitcoinbip32DerivationPath(raw.ptr)]; + } + + @protected + List cst_encode_bdk_descriptor(BdkDescriptor raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [ + cst_encode_RustOpaque_ExtendedDescriptor(raw.extendedDescriptor), + cst_encode_RustOpaque_keysKeyMap(raw.keyMap) + ]; + } + + @protected + List cst_encode_bdk_descriptor_public_key( + BdkDescriptorPublicKey raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [cst_encode_RustOpaque_keysDescriptorPublicKey(raw.ptr)]; + } + + @protected + List cst_encode_bdk_descriptor_secret_key( + BdkDescriptorSecretKey raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [cst_encode_RustOpaque_keysDescriptorSecretKey(raw.ptr)]; + } + + @protected + List cst_encode_bdk_error(BdkError raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + if (raw is BdkError_Hex) { + return [0, cst_encode_box_autoadd_hex_error(raw.field0)]; + } + if (raw is BdkError_Consensus) { + return [1, cst_encode_box_autoadd_consensus_error(raw.field0)]; + } + if (raw is BdkError_Address) { + return [2, cst_encode_box_autoadd_address_error(raw.field0)]; + } + if (raw is BdkError_Descriptor) { + return [3, cst_encode_box_autoadd_descriptor_error(raw.field0)]; + } + if (raw is BdkError_InvalidU32Bytes) { + return [4, cst_encode_list_prim_u_8_strict(raw.field0)]; + } + if (raw is BdkError_Generic) { + return [5, cst_encode_String(raw.field0)]; + } + if (raw is BdkError_ScriptDoesntHaveAddressForm) { + return [6]; + } + if (raw is BdkError_NoRecipients) { + return [7]; + } + if (raw is BdkError_NoUtxosSelected) { + return [8]; + } + if (raw is BdkError_OutputBelowDustLimit) { + return [9, cst_encode_usize(raw.field0)]; + } + if (raw is BdkError_InsufficientFunds) { + return [10, cst_encode_u_64(raw.needed), cst_encode_u_64(raw.available)]; + } + if (raw is BdkError_BnBTotalTriesExceeded) { + return [11]; + } + if (raw is BdkError_BnBNoExactMatch) { + return [12]; + } + if (raw is BdkError_UnknownUtxo) { + return [13]; + } + if (raw is BdkError_TransactionNotFound) { + return [14]; + } + if (raw is BdkError_TransactionConfirmed) { + return [15]; + } + if (raw is BdkError_IrreplaceableTransaction) { + return [16]; + } + if (raw is BdkError_FeeRateTooLow) { + return [17, cst_encode_f_32(raw.needed)]; + } + if (raw is BdkError_FeeTooLow) { + return [18, cst_encode_u_64(raw.needed)]; + } + if (raw is BdkError_FeeRateUnavailable) { + return [19]; + } + if (raw is BdkError_MissingKeyOrigin) { + return [20, cst_encode_String(raw.field0)]; + } + if (raw is BdkError_Key) { + return [21, cst_encode_String(raw.field0)]; + } + if (raw is BdkError_ChecksumMismatch) { + return [22]; + } + if (raw is BdkError_SpendingPolicyRequired) { + return [23, cst_encode_keychain_kind(raw.field0)]; + } + if (raw is BdkError_InvalidPolicyPathError) { + return [24, cst_encode_String(raw.field0)]; + } + if (raw is BdkError_Signer) { + return [25, cst_encode_String(raw.field0)]; + } + if (raw is BdkError_InvalidNetwork) { + return [ + 26, + cst_encode_network(raw.requested), + cst_encode_network(raw.found) + ]; + } + if (raw is BdkError_InvalidOutpoint) { + return [27, cst_encode_box_autoadd_out_point(raw.field0)]; + } + if (raw is BdkError_Encode) { + return [28, cst_encode_String(raw.field0)]; + } + if (raw is BdkError_Miniscript) { + return [29, cst_encode_String(raw.field0)]; + } + if (raw is BdkError_MiniscriptPsbt) { + return [30, cst_encode_String(raw.field0)]; + } + if (raw is BdkError_Bip32) { + return [31, cst_encode_String(raw.field0)]; + } + if (raw is BdkError_Bip39) { + return [32, cst_encode_String(raw.field0)]; + } + if (raw is BdkError_Secp256k1) { + return [33, cst_encode_String(raw.field0)]; + } + if (raw is BdkError_Json) { + return [34, cst_encode_String(raw.field0)]; + } + if (raw is BdkError_Psbt) { + return [35, cst_encode_String(raw.field0)]; + } + if (raw is BdkError_PsbtParse) { + return [36, cst_encode_String(raw.field0)]; + } + if (raw is BdkError_MissingCachedScripts) { + return [37, cst_encode_usize(raw.field0), cst_encode_usize(raw.field1)]; + } + if (raw is BdkError_Electrum) { + return [38, cst_encode_String(raw.field0)]; + } + if (raw is BdkError_Esplora) { + return [39, cst_encode_String(raw.field0)]; + } + if (raw is BdkError_Sled) { + return [40, cst_encode_String(raw.field0)]; + } + if (raw is BdkError_Rpc) { + return [41, cst_encode_String(raw.field0)]; + } + if (raw is BdkError_Rusqlite) { + return [42, cst_encode_String(raw.field0)]; + } + if (raw is BdkError_InvalidInput) { + return [43, cst_encode_String(raw.field0)]; + } + if (raw is BdkError_InvalidLockTime) { + return [44, cst_encode_String(raw.field0)]; + } + if (raw is BdkError_InvalidTransaction) { + return [45, cst_encode_String(raw.field0)]; + } + + throw Exception('unreachable'); + } + + @protected + List cst_encode_bdk_mnemonic(BdkMnemonic raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [cst_encode_RustOpaque_keysbip39Mnemonic(raw.ptr)]; + } + + @protected + List cst_encode_bdk_psbt(BdkPsbt raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [cst_encode_RustOpaque_MutexPartiallySignedTransaction(raw.ptr)]; + } + + @protected + List cst_encode_bdk_script_buf(BdkScriptBuf raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [cst_encode_list_prim_u_8_strict(raw.bytes)]; + } + + @protected + List cst_encode_bdk_transaction(BdkTransaction raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [cst_encode_String(raw.inner)]; + } + + @protected + List cst_encode_bdk_wallet(BdkWallet raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [cst_encode_RustOpaque_MutexbdkWalletAnyDatabase(raw.ptr)]; + } + + @protected + List cst_encode_block_time(BlockTime raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [cst_encode_u_32(raw.height), cst_encode_u_64(raw.timestamp)]; + } + + @protected + List cst_encode_blockchain_config(BlockchainConfig raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + if (raw is BlockchainConfig_Electrum) { + return [0, cst_encode_box_autoadd_electrum_config(raw.config)]; + } + if (raw is BlockchainConfig_Esplora) { + return [1, cst_encode_box_autoadd_esplora_config(raw.config)]; + } + if (raw is BlockchainConfig_Rpc) { + return [2, cst_encode_box_autoadd_rpc_config(raw.config)]; + } + + throw Exception('unreachable'); + } + + @protected + List cst_encode_box_autoadd_address_error(AddressError raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_address_error(raw); + } + + @protected + List cst_encode_box_autoadd_address_index(AddressIndex raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_address_index(raw); + } + + @protected + List cst_encode_box_autoadd_bdk_address(BdkAddress raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_bdk_address(raw); + } + + @protected + List cst_encode_box_autoadd_bdk_blockchain(BdkBlockchain raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_bdk_blockchain(raw); + } + + @protected + List cst_encode_box_autoadd_bdk_derivation_path( + BdkDerivationPath raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_bdk_derivation_path(raw); + } + + @protected + List cst_encode_box_autoadd_bdk_descriptor(BdkDescriptor raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_bdk_descriptor(raw); + } + + @protected + List cst_encode_box_autoadd_bdk_descriptor_public_key( + BdkDescriptorPublicKey raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_bdk_descriptor_public_key(raw); + } + + @protected + List cst_encode_box_autoadd_bdk_descriptor_secret_key( + BdkDescriptorSecretKey raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_bdk_descriptor_secret_key(raw); + } + + @protected + List cst_encode_box_autoadd_bdk_mnemonic(BdkMnemonic raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_bdk_mnemonic(raw); + } + + @protected + List cst_encode_box_autoadd_bdk_psbt(BdkPsbt raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_bdk_psbt(raw); + } + + @protected + List cst_encode_box_autoadd_bdk_script_buf(BdkScriptBuf raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_bdk_script_buf(raw); + } + + @protected + List cst_encode_box_autoadd_bdk_transaction(BdkTransaction raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_bdk_transaction(raw); + } + + @protected + List cst_encode_box_autoadd_bdk_wallet(BdkWallet raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_bdk_wallet(raw); + } + + @protected + List cst_encode_box_autoadd_block_time(BlockTime raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_block_time(raw); + } + + @protected + List cst_encode_box_autoadd_blockchain_config(BlockchainConfig raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_blockchain_config(raw); + } + + @protected + List cst_encode_box_autoadd_consensus_error(ConsensusError raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_consensus_error(raw); + } + + @protected + List cst_encode_box_autoadd_database_config(DatabaseConfig raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_database_config(raw); + } + + @protected + List cst_encode_box_autoadd_descriptor_error(DescriptorError raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_descriptor_error(raw); + } + + @protected + List cst_encode_box_autoadd_electrum_config(ElectrumConfig raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_electrum_config(raw); + } + + @protected + List cst_encode_box_autoadd_esplora_config(EsploraConfig raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_esplora_config(raw); + } + + @protected + double cst_encode_box_autoadd_f_32(double raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_f_32(raw); + } + + @protected + List cst_encode_box_autoadd_fee_rate(FeeRate raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_fee_rate(raw); + } + + @protected + List cst_encode_box_autoadd_hex_error(HexError raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_hex_error(raw); + } + + @protected + List cst_encode_box_autoadd_local_utxo(LocalUtxo raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_local_utxo(raw); + } + + @protected + List cst_encode_box_autoadd_lock_time(LockTime raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_lock_time(raw); + } + + @protected + List cst_encode_box_autoadd_out_point(OutPoint raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_out_point(raw); + } + + @protected + List cst_encode_box_autoadd_psbt_sig_hash_type(PsbtSigHashType raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_psbt_sig_hash_type(raw); + } + + @protected + List cst_encode_box_autoadd_rbf_value(RbfValue raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_rbf_value(raw); + } + + @protected + List cst_encode_box_autoadd_record_out_point_input_usize( + (OutPoint, Input, int) raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_record_out_point_input_usize(raw); + } + + @protected + List cst_encode_box_autoadd_rpc_config(RpcConfig raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_rpc_config(raw); + } + + @protected + List cst_encode_box_autoadd_rpc_sync_params(RpcSyncParams raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_rpc_sync_params(raw); + } + + @protected + List cst_encode_box_autoadd_sign_options(SignOptions raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_sign_options(raw); + } + + @protected + List cst_encode_box_autoadd_sled_db_configuration( + SledDbConfiguration raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_sled_db_configuration(raw); + } + + @protected + List cst_encode_box_autoadd_sqlite_db_configuration( + SqliteDbConfiguration raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_sqlite_db_configuration(raw); + } + + @protected + int cst_encode_box_autoadd_u_32(int raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_u_32(raw); + } + + @protected + Object cst_encode_box_autoadd_u_64(int raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_u_64(raw); + } + + @protected + int cst_encode_box_autoadd_u_8(int raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_u_8(raw); + } + + @protected + List cst_encode_consensus_error(ConsensusError raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + if (raw is ConsensusError_Io) { + return [0, cst_encode_String(raw.field0)]; + } + if (raw is ConsensusError_OversizedVectorAllocation) { + return [1, cst_encode_usize(raw.requested), cst_encode_usize(raw.max)]; + } + if (raw is ConsensusError_InvalidChecksum) { + return [ + 2, + cst_encode_u_8_array_4(raw.expected), + cst_encode_u_8_array_4(raw.actual) + ]; + } + if (raw is ConsensusError_NonMinimalVarInt) { + return [3]; + } + if (raw is ConsensusError_ParseFailed) { + return [4, cst_encode_String(raw.field0)]; + } + if (raw is ConsensusError_UnsupportedSegwitFlag) { + return [5, cst_encode_u_8(raw.field0)]; + } + + throw Exception('unreachable'); + } + + @protected + List cst_encode_database_config(DatabaseConfig raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + if (raw is DatabaseConfig_Memory) { + return [0]; + } + if (raw is DatabaseConfig_Sqlite) { + return [1, cst_encode_box_autoadd_sqlite_db_configuration(raw.config)]; + } + if (raw is DatabaseConfig_Sled) { + return [2, cst_encode_box_autoadd_sled_db_configuration(raw.config)]; + } + + throw Exception('unreachable'); + } + + @protected + List cst_encode_descriptor_error(DescriptorError raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + if (raw is DescriptorError_InvalidHdKeyPath) { + return [0]; + } + if (raw is DescriptorError_InvalidDescriptorChecksum) { + return [1]; + } + if (raw is DescriptorError_HardenedDerivationXpub) { + return [2]; + } + if (raw is DescriptorError_MultiPath) { + return [3]; + } + if (raw is DescriptorError_Key) { + return [4, cst_encode_String(raw.field0)]; + } + if (raw is DescriptorError_Policy) { + return [5, cst_encode_String(raw.field0)]; + } + if (raw is DescriptorError_InvalidDescriptorCharacter) { + return [6, cst_encode_u_8(raw.field0)]; + } + if (raw is DescriptorError_Bip32) { + return [7, cst_encode_String(raw.field0)]; + } + if (raw is DescriptorError_Base58) { + return [8, cst_encode_String(raw.field0)]; + } + if (raw is DescriptorError_Pk) { + return [9, cst_encode_String(raw.field0)]; + } + if (raw is DescriptorError_Miniscript) { + return [10, cst_encode_String(raw.field0)]; + } + if (raw is DescriptorError_Hex) { + return [11, cst_encode_String(raw.field0)]; + } + + throw Exception('unreachable'); + } + + @protected + List cst_encode_electrum_config(ElectrumConfig raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [ + cst_encode_String(raw.url), + cst_encode_opt_String(raw.socks5), + cst_encode_u_8(raw.retry), + cst_encode_opt_box_autoadd_u_8(raw.timeout), + cst_encode_u_64(raw.stopGap), + cst_encode_bool(raw.validateDomain) + ]; + } + + @protected + List cst_encode_esplora_config(EsploraConfig raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [ + cst_encode_String(raw.baseUrl), + cst_encode_opt_String(raw.proxy), + cst_encode_opt_box_autoadd_u_8(raw.concurrency), + cst_encode_u_64(raw.stopGap), + cst_encode_opt_box_autoadd_u_64(raw.timeout) + ]; + } + + @protected + List cst_encode_fee_rate(FeeRate raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [cst_encode_f_32(raw.satPerVb)]; + } + + @protected + List cst_encode_hex_error(HexError raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + if (raw is HexError_InvalidChar) { + return [0, cst_encode_u_8(raw.field0)]; + } + if (raw is HexError_OddLengthString) { + return [1, cst_encode_usize(raw.field0)]; + } + if (raw is HexError_InvalidLength) { + return [2, cst_encode_usize(raw.field0), cst_encode_usize(raw.field1)]; + } + + throw Exception('unreachable'); + } + + @protected + List cst_encode_input(Input raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [cst_encode_String(raw.s)]; + } + + @protected + List cst_encode_list_list_prim_u_8_strict(List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw.map(cst_encode_list_prim_u_8_strict).toList(); + } + + @protected + List cst_encode_list_local_utxo(List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw.map(cst_encode_local_utxo).toList(); + } + + @protected + List cst_encode_list_out_point(List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw.map(cst_encode_out_point).toList(); + } + + @protected + List cst_encode_list_prim_u_8_loose(List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw; + } + + @protected + Uint8List cst_encode_list_prim_u_8_strict(Uint8List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw; + } + + @protected + List cst_encode_list_script_amount(List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw.map(cst_encode_script_amount).toList(); + } + + @protected + List cst_encode_list_transaction_details( + List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw.map(cst_encode_transaction_details).toList(); + } + + @protected + List cst_encode_list_tx_in(List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw.map(cst_encode_tx_in).toList(); + } + + @protected + List cst_encode_list_tx_out(List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw.map(cst_encode_tx_out).toList(); + } + + @protected + List cst_encode_local_utxo(LocalUtxo raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [ + cst_encode_out_point(raw.outpoint), + cst_encode_tx_out(raw.txout), + cst_encode_keychain_kind(raw.keychain), + cst_encode_bool(raw.isSpent) + ]; + } + + @protected + List cst_encode_lock_time(LockTime raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + if (raw is LockTime_Blocks) { + return [0, cst_encode_u_32(raw.field0)]; + } + if (raw is LockTime_Seconds) { + return [1, cst_encode_u_32(raw.field0)]; + } + + throw Exception('unreachable'); + } + + @protected + String? cst_encode_opt_String(String? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? null : cst_encode_String(raw); + } + + @protected + List? cst_encode_opt_box_autoadd_bdk_address(BdkAddress? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? null : cst_encode_box_autoadd_bdk_address(raw); + } + + @protected + List? cst_encode_opt_box_autoadd_bdk_descriptor(BdkDescriptor? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? null : cst_encode_box_autoadd_bdk_descriptor(raw); + } + + @protected + List? cst_encode_opt_box_autoadd_bdk_script_buf(BdkScriptBuf? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? null : cst_encode_box_autoadd_bdk_script_buf(raw); + } + + @protected + List? cst_encode_opt_box_autoadd_bdk_transaction( + BdkTransaction? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? null : cst_encode_box_autoadd_bdk_transaction(raw); + } + + @protected + List? cst_encode_opt_box_autoadd_block_time(BlockTime? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? null : cst_encode_box_autoadd_block_time(raw); + } + + @protected + double? cst_encode_opt_box_autoadd_f_32(double? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? null : cst_encode_box_autoadd_f_32(raw); + } + + @protected + List? cst_encode_opt_box_autoadd_fee_rate(FeeRate? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? null : cst_encode_box_autoadd_fee_rate(raw); + } + + @protected + List? 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 ? null : cst_encode_box_autoadd_psbt_sig_hash_type(raw); + } + + @protected + List? cst_encode_opt_box_autoadd_rbf_value(RbfValue? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? null : cst_encode_box_autoadd_rbf_value(raw); + } + + @protected + List? cst_encode_opt_box_autoadd_record_out_point_input_usize( + (OutPoint, Input, int)? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null + ? null + : cst_encode_box_autoadd_record_out_point_input_usize(raw); + } + + @protected + List? cst_encode_opt_box_autoadd_rpc_sync_params( + RpcSyncParams? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? null : cst_encode_box_autoadd_rpc_sync_params(raw); + } + + @protected + List? cst_encode_opt_box_autoadd_sign_options(SignOptions? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? null : cst_encode_box_autoadd_sign_options(raw); + } + + @protected + int? cst_encode_opt_box_autoadd_u_32(int? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? null : cst_encode_box_autoadd_u_32(raw); + } + + @protected + Object? cst_encode_opt_box_autoadd_u_64(int? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? null : cst_encode_box_autoadd_u_64(raw); + } + + @protected + int? cst_encode_opt_box_autoadd_u_8(int? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? null : cst_encode_box_autoadd_u_8(raw); + } + + @protected + List cst_encode_out_point(OutPoint raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [cst_encode_String(raw.txid), cst_encode_u_32(raw.vout)]; + } + + @protected + List cst_encode_payload(Payload raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + if (raw is Payload_PubkeyHash) { + return [0, cst_encode_String(raw.pubkeyHash)]; + } + if (raw is Payload_ScriptHash) { + return [1, cst_encode_String(raw.scriptHash)]; + } + if (raw is Payload_WitnessProgram) { + return [ + 2, + cst_encode_witness_version(raw.version), + cst_encode_list_prim_u_8_strict(raw.program) + ]; + } + + throw Exception('unreachable'); + } + + @protected + List cst_encode_psbt_sig_hash_type(PsbtSigHashType raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [cst_encode_u_32(raw.inner)]; + } + + @protected + List cst_encode_rbf_value(RbfValue raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + if (raw is RbfValue_RbfDefault) { + return [0]; + } + if (raw is RbfValue_Value) { + return [1, cst_encode_u_32(raw.field0)]; + } + + throw Exception('unreachable'); + } + + @protected + List cst_encode_record_bdk_address_u_32((BdkAddress, int) raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [cst_encode_bdk_address(raw.$1), cst_encode_u_32(raw.$2)]; + } + + @protected + List cst_encode_record_bdk_psbt_transaction_details( + (BdkPsbt, TransactionDetails) raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [ + cst_encode_bdk_psbt(raw.$1), + cst_encode_transaction_details(raw.$2) + ]; + } + + @protected + List cst_encode_record_out_point_input_usize( + (OutPoint, Input, int) raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [ + cst_encode_out_point(raw.$1), + cst_encode_input(raw.$2), + cst_encode_usize(raw.$3) + ]; + } + + @protected + List cst_encode_rpc_config(RpcConfig raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [ + cst_encode_String(raw.url), + cst_encode_auth(raw.auth), + cst_encode_network(raw.network), + cst_encode_String(raw.walletName), + cst_encode_opt_box_autoadd_rpc_sync_params(raw.syncParams) + ]; + } + + @protected + List cst_encode_rpc_sync_params(RpcSyncParams raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [ + cst_encode_u_64(raw.startScriptCount), + cst_encode_u_64(raw.startTime), + cst_encode_bool(raw.forceStartTime), + cst_encode_u_64(raw.pollRateSec) + ]; + } + + @protected + List cst_encode_script_amount(ScriptAmount raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [cst_encode_bdk_script_buf(raw.script), cst_encode_u_64(raw.amount)]; + } + + @protected + List cst_encode_sign_options(SignOptions raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [ + cst_encode_bool(raw.multiSig), + cst_encode_bool(raw.trustWitnessUtxo), + cst_encode_opt_box_autoadd_u_32(raw.assumeHeight), + cst_encode_bool(raw.allowAllSighashes), + cst_encode_bool(raw.removePartialSigs), + cst_encode_bool(raw.tryFinalize), + cst_encode_bool(raw.signWithTapInternalKey), + cst_encode_bool(raw.allowGrinding) + ]; + } + + @protected + List cst_encode_sled_db_configuration(SledDbConfiguration raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [cst_encode_String(raw.path), cst_encode_String(raw.treeName)]; + } + + @protected + List cst_encode_sqlite_db_configuration(SqliteDbConfiguration raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [cst_encode_String(raw.path)]; + } + + @protected + List cst_encode_transaction_details(TransactionDetails raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [ + cst_encode_opt_box_autoadd_bdk_transaction(raw.transaction), + cst_encode_String(raw.txid), + cst_encode_u_64(raw.received), + cst_encode_u_64(raw.sent), + cst_encode_opt_box_autoadd_u_64(raw.fee), + cst_encode_opt_box_autoadd_block_time(raw.confirmationTime) + ]; + } + + @protected + List cst_encode_tx_in(TxIn raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [ + cst_encode_out_point(raw.previousOutput), + cst_encode_bdk_script_buf(raw.scriptSig), + cst_encode_u_32(raw.sequence), + cst_encode_list_list_prim_u_8_strict(raw.witness) + ]; + } + + @protected + List cst_encode_tx_out(TxOut raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return [ + cst_encode_u_64(raw.value), + cst_encode_bdk_script_buf(raw.scriptPubkey) + ]; + } + + @protected + Object cst_encode_u_64(int raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return castNativeBigInt(raw); + } + + @protected + Uint8List cst_encode_u_8_array_4(U8Array4 raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return Uint8List.fromList(raw); + } + + @protected + int cst_encode_RustOpaque_AnyBlockchain(AnyBlockchain raw); + + @protected + int cst_encode_RustOpaque_ExtendedDescriptor(ExtendedDescriptor raw); + + @protected + int cst_encode_RustOpaque_MutexPartiallySignedTransaction( + MutexPartiallySignedTransaction raw); + + @protected + int cst_encode_RustOpaque_MutexbdkWalletAnyDatabase( + MutexBdkWalletAnyDatabase raw); + + @protected + int cst_encode_RustOpaque_bdkbitcoinAddress(BdkBitcoinAddress raw); + + @protected + int cst_encode_RustOpaque_bitcoinbip32DerivationPath( + BitcoinBip32DerivationPath raw); + + @protected + int cst_encode_RustOpaque_keysDescriptorPublicKey( + KeysDescriptorPublicKey raw); + + @protected + int cst_encode_RustOpaque_keysDescriptorSecretKey( + KeysDescriptorSecretKey raw); + + @protected + int cst_encode_RustOpaque_keysKeyMap(KeysKeyMap raw); + + @protected + int cst_encode_RustOpaque_keysbip39Mnemonic(KeysBip39Mnemonic 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_usize(int 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_RustOpaque_AnyBlockchain( + AnyBlockchain self, SseSerializer serializer); + + @protected + void sse_encode_RustOpaque_ExtendedDescriptor( + ExtendedDescriptor self, SseSerializer serializer); + + @protected + void sse_encode_RustOpaque_MutexPartiallySignedTransaction( + MutexPartiallySignedTransaction self, SseSerializer serializer); + + @protected + void sse_encode_RustOpaque_MutexbdkWalletAnyDatabase( + MutexBdkWalletAnyDatabase self, SseSerializer serializer); + + @protected + void sse_encode_RustOpaque_bdkbitcoinAddress( + BdkBitcoinAddress self, SseSerializer serializer); + + @protected + void sse_encode_RustOpaque_bitcoinbip32DerivationPath( + BitcoinBip32DerivationPath self, SseSerializer serializer); + + @protected + void sse_encode_RustOpaque_keysDescriptorPublicKey( + KeysDescriptorPublicKey self, SseSerializer serializer); + + @protected + void sse_encode_RustOpaque_keysDescriptorSecretKey( + KeysDescriptorSecretKey self, SseSerializer serializer); + + @protected + void sse_encode_RustOpaque_keysKeyMap( + KeysKeyMap self, SseSerializer serializer); + + @protected + void sse_encode_RustOpaque_keysbip39Mnemonic( + KeysBip39Mnemonic 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_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_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_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_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, int) 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(int 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_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_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_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_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_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_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_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_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, int)? 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(int? 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_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_out_point_input_usize( + (OutPoint, Input, int) 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_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(int 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(int 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 + +class CApiWire implements BaseWire { + CApiWire.fromExternalLibrary(ExternalLibrary lib); + + void wire_bdk_blockchain_broadcast(NativePortType port_, List that, + List transaction) => + wasmModule.wire_bdk_blockchain_broadcast(port_, that, transaction); + + void wire_bdk_blockchain_estimate_fee( + NativePortType port_, List that, Object target) => + wasmModule.wire_bdk_blockchain_estimate_fee(port_, that, target); + + void wire_bdk_blockchain_get_block_hash( + NativePortType port_, List that, int height) => + wasmModule.wire_bdk_blockchain_get_block_hash(port_, that, height); + + void wire_bdk_blockchain_get_height( + NativePortType port_, List that) => + wasmModule.wire_bdk_blockchain_get_height(port_, that); + + void wire_bdk_blockchain_new( + NativePortType port_, List blockchain_config) => + wasmModule.wire_bdk_blockchain_new(port_, blockchain_config); + + void wire_bdk_descriptor_as_string( + NativePortType port_, List that) => + wasmModule.wire_bdk_descriptor_as_string(port_, that); + + void wire_bdk_descriptor_as_string_private( + NativePortType port_, List that) => + wasmModule.wire_bdk_descriptor_as_string_private(port_, that); + + void wire_bdk_descriptor_max_satisfaction_weight( + NativePortType port_, List that) => + wasmModule.wire_bdk_descriptor_max_satisfaction_weight(port_, that); + + void wire_bdk_descriptor_new( + NativePortType port_, String descriptor, int network) => + wasmModule.wire_bdk_descriptor_new(port_, descriptor, network); + + void wire_bdk_descriptor_new_bip44(NativePortType port_, + List secret_key, int keychain_kind, int network) => + wasmModule.wire_bdk_descriptor_new_bip44( + port_, secret_key, keychain_kind, network); + + void wire_bdk_descriptor_new_bip44_public( + NativePortType port_, + List public_key, + String fingerprint, + int keychain_kind, + int network) => + wasmModule.wire_bdk_descriptor_new_bip44_public( + port_, public_key, fingerprint, keychain_kind, network); + + void wire_bdk_descriptor_new_bip49(NativePortType port_, + List secret_key, int keychain_kind, int network) => + wasmModule.wire_bdk_descriptor_new_bip49( + port_, secret_key, keychain_kind, network); + + void wire_bdk_descriptor_new_bip49_public( + NativePortType port_, + List public_key, + String fingerprint, + int keychain_kind, + int network) => + wasmModule.wire_bdk_descriptor_new_bip49_public( + port_, public_key, fingerprint, keychain_kind, network); + + void wire_bdk_descriptor_new_bip84(NativePortType port_, + List secret_key, int keychain_kind, int network) => + wasmModule.wire_bdk_descriptor_new_bip84( + port_, secret_key, keychain_kind, network); + + void wire_bdk_descriptor_new_bip84_public( + NativePortType port_, + List public_key, + String fingerprint, + int keychain_kind, + int network) => + wasmModule.wire_bdk_descriptor_new_bip84_public( + port_, public_key, fingerprint, keychain_kind, network); + + void wire_bdk_descriptor_new_bip86(NativePortType port_, + List secret_key, int keychain_kind, int network) => + wasmModule.wire_bdk_descriptor_new_bip86( + port_, secret_key, keychain_kind, network); + + void wire_bdk_descriptor_new_bip86_public( + NativePortType port_, + List public_key, + String fingerprint, + int keychain_kind, + int network) => + wasmModule.wire_bdk_descriptor_new_bip86_public( + port_, public_key, fingerprint, keychain_kind, network); + + void wire_bdk_derivation_path_from_string( + NativePortType port_, String path) => + wasmModule.wire_bdk_derivation_path_from_string(port_, path); + + void wire_bdk_descriptor_public_key_as_string( + NativePortType port_, List that) => + wasmModule.wire_bdk_descriptor_public_key_as_string(port_, that); + + void wire_bdk_descriptor_public_key_derive( + NativePortType port_, List ptr, List path) => + wasmModule.wire_bdk_descriptor_public_key_derive(port_, ptr, path); + + void wire_bdk_descriptor_public_key_extend( + NativePortType port_, List ptr, List path) => + wasmModule.wire_bdk_descriptor_public_key_extend(port_, ptr, path); + + void wire_bdk_descriptor_public_key_from_string( + NativePortType port_, String public_key) => + wasmModule.wire_bdk_descriptor_public_key_from_string(port_, public_key); + + void wire_bdk_descriptor_secret_key_as_public( + NativePortType port_, List ptr) => + wasmModule.wire_bdk_descriptor_secret_key_as_public(port_, ptr); + + void wire_bdk_descriptor_secret_key_as_string( + NativePortType port_, List that) => + wasmModule.wire_bdk_descriptor_secret_key_as_string(port_, that); + + void wire_bdk_descriptor_secret_key_create(NativePortType port_, int network, + List mnemonic, String? password) => + wasmModule.wire_bdk_descriptor_secret_key_create( + port_, network, mnemonic, password); + + void wire_bdk_descriptor_secret_key_derive( + NativePortType port_, List ptr, List path) => + wasmModule.wire_bdk_descriptor_secret_key_derive(port_, ptr, path); + + void wire_bdk_descriptor_secret_key_extend( + NativePortType port_, List ptr, List path) => + wasmModule.wire_bdk_descriptor_secret_key_extend(port_, ptr, path); + + void wire_bdk_descriptor_secret_key_from_string( + NativePortType port_, String secret_key) => + wasmModule.wire_bdk_descriptor_secret_key_from_string(port_, secret_key); + + void wire_bdk_descriptor_secret_key_secret_bytes( + NativePortType port_, List that) => + wasmModule.wire_bdk_descriptor_secret_key_secret_bytes(port_, that); + + void wire_bdk_mnemonic_as_string(NativePortType port_, List that) => + wasmModule.wire_bdk_mnemonic_as_string(port_, that); + + void wire_bdk_mnemonic_from_entropy( + NativePortType port_, List entropy) => + wasmModule.wire_bdk_mnemonic_from_entropy(port_, entropy); + + void wire_bdk_mnemonic_from_string(NativePortType port_, String mnemonic) => + wasmModule.wire_bdk_mnemonic_from_string(port_, mnemonic); + + void wire_bdk_mnemonic_new(NativePortType port_, int word_count) => + wasmModule.wire_bdk_mnemonic_new(port_, word_count); + + void wire_bdk_psbt_combine( + NativePortType port_, List ptr, List other) => + wasmModule.wire_bdk_psbt_combine(port_, ptr, other); + + void wire_bdk_psbt_extract_tx(NativePortType port_, List ptr) => + wasmModule.wire_bdk_psbt_extract_tx(port_, ptr); + + void wire_bdk_psbt_fee_amount(NativePortType port_, List that) => + wasmModule.wire_bdk_psbt_fee_amount(port_, that); + + void wire_bdk_psbt_fee_rate(NativePortType port_, List that) => + wasmModule.wire_bdk_psbt_fee_rate(port_, that); + + void wire_bdk_psbt_from_str(NativePortType port_, String psbt_base64) => + wasmModule.wire_bdk_psbt_from_str(port_, psbt_base64); + + void wire_bdk_psbt_json_serialize(NativePortType port_, List that) => + wasmModule.wire_bdk_psbt_json_serialize(port_, that); + + void wire_bdk_psbt_serialize(NativePortType port_, List that) => + wasmModule.wire_bdk_psbt_serialize(port_, that); + + void wire_bdk_psbt_txid(NativePortType port_, List that) => + wasmModule.wire_bdk_psbt_txid(port_, that); + + void wire_bdk_address_as_string(NativePortType port_, List that) => + wasmModule.wire_bdk_address_as_string(port_, that); + + void wire_bdk_address_from_script( + NativePortType port_, List script, int network) => + wasmModule.wire_bdk_address_from_script(port_, script, network); + + void wire_bdk_address_from_string( + NativePortType port_, String address, int network) => + wasmModule.wire_bdk_address_from_string(port_, address, network); + + void wire_bdk_address_is_valid_for_network( + NativePortType port_, List that, int network) => + wasmModule.wire_bdk_address_is_valid_for_network(port_, that, network); + + void wire_bdk_address_network(NativePortType port_, List that) => + wasmModule.wire_bdk_address_network(port_, that); + + void wire_bdk_address_payload(NativePortType port_, List that) => + wasmModule.wire_bdk_address_payload(port_, that); + + void wire_bdk_address_script(NativePortType port_, List ptr) => + wasmModule.wire_bdk_address_script(port_, ptr); + + void wire_bdk_address_to_qr_uri(NativePortType port_, List that) => + wasmModule.wire_bdk_address_to_qr_uri(port_, that); + + void wire_bdk_script_buf_empty(NativePortType port_) => + wasmModule.wire_bdk_script_buf_empty(port_); + + void wire_bdk_script_buf_from_hex(NativePortType port_, String s) => + wasmModule.wire_bdk_script_buf_from_hex(port_, s); + + void wire_bdk_script_buf_with_capacity(NativePortType port_, int capacity) => + wasmModule.wire_bdk_script_buf_with_capacity(port_, capacity); + + void wire_bdk_transaction_from_bytes( + NativePortType port_, List transaction_bytes) => + wasmModule.wire_bdk_transaction_from_bytes(port_, transaction_bytes); + + void wire_bdk_transaction_input(NativePortType port_, List that) => + wasmModule.wire_bdk_transaction_input(port_, that); + + void wire_bdk_transaction_is_coin_base( + NativePortType port_, List that) => + wasmModule.wire_bdk_transaction_is_coin_base(port_, that); + + void wire_bdk_transaction_is_explicitly_rbf( + NativePortType port_, List that) => + wasmModule.wire_bdk_transaction_is_explicitly_rbf(port_, that); + + void wire_bdk_transaction_is_lock_time_enabled( + NativePortType port_, List that) => + wasmModule.wire_bdk_transaction_is_lock_time_enabled(port_, that); + + void wire_bdk_transaction_lock_time( + NativePortType port_, List that) => + wasmModule.wire_bdk_transaction_lock_time(port_, that); + + void wire_bdk_transaction_new(NativePortType port_, int version, + List lock_time, List input, List output) => + wasmModule.wire_bdk_transaction_new( + port_, version, lock_time, input, output); + + void wire_bdk_transaction_output(NativePortType port_, List that) => + wasmModule.wire_bdk_transaction_output(port_, that); + + void wire_bdk_transaction_serialize( + NativePortType port_, List that) => + wasmModule.wire_bdk_transaction_serialize(port_, that); + + void wire_bdk_transaction_size(NativePortType port_, List that) => + wasmModule.wire_bdk_transaction_size(port_, that); + + void wire_bdk_transaction_txid(NativePortType port_, List that) => + wasmModule.wire_bdk_transaction_txid(port_, that); + + void wire_bdk_transaction_version(NativePortType port_, List that) => + wasmModule.wire_bdk_transaction_version(port_, that); + + void wire_bdk_transaction_vsize(NativePortType port_, List that) => + wasmModule.wire_bdk_transaction_vsize(port_, that); + + void wire_bdk_transaction_weight(NativePortType port_, List that) => + wasmModule.wire_bdk_transaction_weight(port_, that); + + void wire_bdk_wallet_get_address(NativePortType port_, List ptr, + List address_index) => + wasmModule.wire_bdk_wallet_get_address(port_, ptr, address_index); + + void wire_bdk_wallet_get_balance(NativePortType port_, List that) => + wasmModule.wire_bdk_wallet_get_balance(port_, that); + + void wire_bdk_wallet_get_descriptor_for_keychain( + NativePortType port_, List ptr, int keychain) => + wasmModule.wire_bdk_wallet_get_descriptor_for_keychain( + port_, ptr, keychain); + + void wire_bdk_wallet_get_internal_address(NativePortType port_, + List ptr, List address_index) => + wasmModule.wire_bdk_wallet_get_internal_address( + port_, ptr, address_index); + + void wire_bdk_wallet_get_psbt_input( + NativePortType port_, + List that, + List utxo, + bool only_witness_utxo, + List? sighash_type) => + wasmModule.wire_bdk_wallet_get_psbt_input( + port_, that, utxo, only_witness_utxo, sighash_type); + + void wire_bdk_wallet_is_mine( + NativePortType port_, List that, List script) => + wasmModule.wire_bdk_wallet_is_mine(port_, that, script); + + void wire_bdk_wallet_list_transactions( + NativePortType port_, List that, bool include_raw) => + wasmModule.wire_bdk_wallet_list_transactions(port_, that, include_raw); + + void wire_bdk_wallet_list_unspent(NativePortType port_, List that) => + wasmModule.wire_bdk_wallet_list_unspent(port_, that); + + void wire_bdk_wallet_network(NativePortType port_, List that) => + wasmModule.wire_bdk_wallet_network(port_, that); + + void wire_bdk_wallet_new( + NativePortType port_, + List descriptor, + List? change_descriptor, + int network, + List database_config) => + wasmModule.wire_bdk_wallet_new( + port_, descriptor, change_descriptor, network, database_config); + + void wire_bdk_wallet_sign(NativePortType port_, List ptr, + List psbt, List? sign_options) => + wasmModule.wire_bdk_wallet_sign(port_, ptr, psbt, sign_options); + + void wire_bdk_wallet_sync( + NativePortType port_, List ptr, List blockchain) => + wasmModule.wire_bdk_wallet_sync(port_, ptr, blockchain); + + void wire_finish_bump_fee_tx_builder( + NativePortType port_, + String txid, + double fee_rate, + List? allow_shrinking, + List wallet, + bool enable_rbf, + int? n_sequence) => + wasmModule.wire_finish_bump_fee_tx_builder(port_, txid, fee_rate, + allow_shrinking, wallet, enable_rbf, n_sequence); + + void wire_tx_builder_finish( + NativePortType port_, + List wallet, + List recipients, + List utxos, + List? foreign_utxo, + List un_spendable, + int change_policy, + bool manually_selected_only, + double? fee_rate, + Object? fee_absolute, + bool drain_wallet, + List? drain_to, + List? rbf, + List data) => + wasmModule.wire_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, + data); + + void rust_arc_increment_strong_count_RustOpaque_AnyBlockchain(dynamic ptr) => + wasmModule.rust_arc_increment_strong_count_RustOpaque_AnyBlockchain(ptr); + + void rust_arc_decrement_strong_count_RustOpaque_AnyBlockchain(dynamic ptr) => + wasmModule.rust_arc_decrement_strong_count_RustOpaque_AnyBlockchain(ptr); + + void rust_arc_increment_strong_count_RustOpaque_ExtendedDescriptor( + dynamic ptr) => + wasmModule + .rust_arc_increment_strong_count_RustOpaque_ExtendedDescriptor(ptr); + + void rust_arc_decrement_strong_count_RustOpaque_ExtendedDescriptor( + dynamic ptr) => + wasmModule + .rust_arc_decrement_strong_count_RustOpaque_ExtendedDescriptor(ptr); + + void rust_arc_increment_strong_count_RustOpaque_MutexPartiallySignedTransaction( + dynamic ptr) => + wasmModule + .rust_arc_increment_strong_count_RustOpaque_MutexPartiallySignedTransaction( + ptr); + + void rust_arc_decrement_strong_count_RustOpaque_MutexPartiallySignedTransaction( + dynamic ptr) => + wasmModule + .rust_arc_decrement_strong_count_RustOpaque_MutexPartiallySignedTransaction( + ptr); + + void rust_arc_increment_strong_count_RustOpaque_MutexbdkWalletAnyDatabase( + dynamic ptr) => + wasmModule + .rust_arc_increment_strong_count_RustOpaque_MutexbdkWalletAnyDatabase( + ptr); + + void rust_arc_decrement_strong_count_RustOpaque_MutexbdkWalletAnyDatabase( + dynamic ptr) => + wasmModule + .rust_arc_decrement_strong_count_RustOpaque_MutexbdkWalletAnyDatabase( + ptr); + + void rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddress( + dynamic ptr) => + wasmModule + .rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddress(ptr); + + void rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress( + dynamic ptr) => + wasmModule + .rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress(ptr); + + void rust_arc_increment_strong_count_RustOpaque_bitcoinbip32DerivationPath( + dynamic ptr) => + wasmModule + .rust_arc_increment_strong_count_RustOpaque_bitcoinbip32DerivationPath( + ptr); + + void rust_arc_decrement_strong_count_RustOpaque_bitcoinbip32DerivationPath( + dynamic ptr) => + wasmModule + .rust_arc_decrement_strong_count_RustOpaque_bitcoinbip32DerivationPath( + ptr); + + void rust_arc_increment_strong_count_RustOpaque_keysDescriptorPublicKey( + dynamic ptr) => + wasmModule + .rust_arc_increment_strong_count_RustOpaque_keysDescriptorPublicKey( + ptr); + + void rust_arc_decrement_strong_count_RustOpaque_keysDescriptorPublicKey( + dynamic ptr) => + wasmModule + .rust_arc_decrement_strong_count_RustOpaque_keysDescriptorPublicKey( + ptr); + + void rust_arc_increment_strong_count_RustOpaque_keysDescriptorSecretKey( + dynamic ptr) => + wasmModule + .rust_arc_increment_strong_count_RustOpaque_keysDescriptorSecretKey( + ptr); + + void rust_arc_decrement_strong_count_RustOpaque_keysDescriptorSecretKey( + dynamic ptr) => + wasmModule + .rust_arc_decrement_strong_count_RustOpaque_keysDescriptorSecretKey( + ptr); + + void rust_arc_increment_strong_count_RustOpaque_keysKeyMap(dynamic ptr) => + wasmModule.rust_arc_increment_strong_count_RustOpaque_keysKeyMap(ptr); + + void rust_arc_decrement_strong_count_RustOpaque_keysKeyMap(dynamic ptr) => + wasmModule.rust_arc_decrement_strong_count_RustOpaque_keysKeyMap(ptr); + + void rust_arc_increment_strong_count_RustOpaque_keysbip39Mnemonic( + dynamic ptr) => + wasmModule + .rust_arc_increment_strong_count_RustOpaque_keysbip39Mnemonic(ptr); + + void rust_arc_decrement_strong_count_RustOpaque_keysbip39Mnemonic( + dynamic ptr) => + wasmModule + .rust_arc_decrement_strong_count_RustOpaque_keysbip39Mnemonic(ptr); +} + +@JS('wasm_bindgen') +external CApiWasmModule get wasmModule; + +@JS() +@anonymous +class CApiWasmModule implements WasmModule { + @override + external Object /* Promise */ call([String? moduleName]); + + @override + external CApiWasmModule bind(dynamic thisArg, String moduleName); + + external void wire_bdk_blockchain_broadcast( + NativePortType port_, List that, List transaction); + + external void wire_bdk_blockchain_estimate_fee( + NativePortType port_, List that, Object target); + + external void wire_bdk_blockchain_get_block_hash( + NativePortType port_, List that, int height); + + external void wire_bdk_blockchain_get_height( + NativePortType port_, List that); + + external void wire_bdk_blockchain_new( + NativePortType port_, List blockchain_config); + + external void wire_bdk_descriptor_as_string( + NativePortType port_, List that); + + external void wire_bdk_descriptor_as_string_private( + NativePortType port_, List that); + + external void wire_bdk_descriptor_max_satisfaction_weight( + NativePortType port_, List that); + + external void wire_bdk_descriptor_new( + NativePortType port_, String descriptor, int network); + + external void wire_bdk_descriptor_new_bip44(NativePortType port_, + List secret_key, int keychain_kind, int network); + + external void wire_bdk_descriptor_new_bip44_public( + NativePortType port_, + List public_key, + String fingerprint, + int keychain_kind, + int network); + + external void wire_bdk_descriptor_new_bip49(NativePortType port_, + List secret_key, int keychain_kind, int network); + + external void wire_bdk_descriptor_new_bip49_public( + NativePortType port_, + List public_key, + String fingerprint, + int keychain_kind, + int network); + + external void wire_bdk_descriptor_new_bip84(NativePortType port_, + List secret_key, int keychain_kind, int network); + + external void wire_bdk_descriptor_new_bip84_public( + NativePortType port_, + List public_key, + String fingerprint, + int keychain_kind, + int network); + + external void wire_bdk_descriptor_new_bip86(NativePortType port_, + List secret_key, int keychain_kind, int network); + + external void wire_bdk_descriptor_new_bip86_public( + NativePortType port_, + List public_key, + String fingerprint, + int keychain_kind, + int network); + + external void wire_bdk_derivation_path_from_string( + NativePortType port_, String path); + + external void wire_bdk_descriptor_public_key_as_string( + NativePortType port_, List that); + + external void wire_bdk_descriptor_public_key_derive( + NativePortType port_, List ptr, List path); + + external void wire_bdk_descriptor_public_key_extend( + NativePortType port_, List ptr, List path); + + external void wire_bdk_descriptor_public_key_from_string( + NativePortType port_, String public_key); + + external void wire_bdk_descriptor_secret_key_as_public( + NativePortType port_, List ptr); + + external void wire_bdk_descriptor_secret_key_as_string( + NativePortType port_, List that); + + external void wire_bdk_descriptor_secret_key_create(NativePortType port_, + int network, List mnemonic, String? password); + + external void wire_bdk_descriptor_secret_key_derive( + NativePortType port_, List ptr, List path); + + external void wire_bdk_descriptor_secret_key_extend( + NativePortType port_, List ptr, List path); + + external void wire_bdk_descriptor_secret_key_from_string( + NativePortType port_, String secret_key); + + external void wire_bdk_descriptor_secret_key_secret_bytes( + NativePortType port_, List that); + + external void wire_bdk_mnemonic_as_string( + NativePortType port_, List that); + + external void wire_bdk_mnemonic_from_entropy( + NativePortType port_, List entropy); + + external void wire_bdk_mnemonic_from_string( + NativePortType port_, String mnemonic); + + external void wire_bdk_mnemonic_new(NativePortType port_, int word_count); + + external void wire_bdk_psbt_combine( + NativePortType port_, List ptr, List other); + + external void wire_bdk_psbt_extract_tx( + NativePortType port_, List ptr); + + external void wire_bdk_psbt_fee_amount( + NativePortType port_, List that); + + external void wire_bdk_psbt_fee_rate( + NativePortType port_, List that); + + external void wire_bdk_psbt_from_str( + NativePortType port_, String psbt_base64); + + external void wire_bdk_psbt_json_serialize( + NativePortType port_, List that); + + external void wire_bdk_psbt_serialize( + NativePortType port_, List that); + + external void wire_bdk_psbt_txid(NativePortType port_, List that); + + external void wire_bdk_address_as_string( + NativePortType port_, List that); + + external void wire_bdk_address_from_script( + NativePortType port_, List script, int network); + + external void wire_bdk_address_from_string( + NativePortType port_, String address, int network); + + external void wire_bdk_address_is_valid_for_network( + NativePortType port_, List that, int network); + + external void wire_bdk_address_network( + NativePortType port_, List that); + + external void wire_bdk_address_payload( + NativePortType port_, List that); + + external void wire_bdk_address_script( + NativePortType port_, List ptr); + + external void wire_bdk_address_to_qr_uri( + NativePortType port_, List that); + + external void wire_bdk_script_buf_empty(NativePortType port_); + + external void wire_bdk_script_buf_from_hex(NativePortType port_, String s); + + external void wire_bdk_script_buf_with_capacity( + NativePortType port_, int capacity); + + external void wire_bdk_transaction_from_bytes( + NativePortType port_, List transaction_bytes); + + external void wire_bdk_transaction_input( + NativePortType port_, List that); + + external void wire_bdk_transaction_is_coin_base( + NativePortType port_, List that); + + external void wire_bdk_transaction_is_explicitly_rbf( + NativePortType port_, List that); + + external void wire_bdk_transaction_is_lock_time_enabled( + NativePortType port_, List that); + + external void wire_bdk_transaction_lock_time( + NativePortType port_, List that); + + external void wire_bdk_transaction_new(NativePortType port_, int version, + List lock_time, List input, List output); + + external void wire_bdk_transaction_output( + NativePortType port_, List that); + + external void wire_bdk_transaction_serialize( + NativePortType port_, List that); + + external void wire_bdk_transaction_size( + NativePortType port_, List that); + + external void wire_bdk_transaction_txid( + NativePortType port_, List that); + + external void wire_bdk_transaction_version( + NativePortType port_, List that); + + external void wire_bdk_transaction_vsize( + NativePortType port_, List that); + + external void wire_bdk_transaction_weight( + NativePortType port_, List that); + + external void wire_bdk_wallet_get_address( + NativePortType port_, List ptr, List address_index); + + external void wire_bdk_wallet_get_balance( + NativePortType port_, List that); + + external void wire_bdk_wallet_get_descriptor_for_keychain( + NativePortType port_, List ptr, int keychain); + + external void wire_bdk_wallet_get_internal_address( + NativePortType port_, List ptr, List address_index); + + external void wire_bdk_wallet_get_psbt_input( + NativePortType port_, + List that, + List utxo, + bool only_witness_utxo, + List? sighash_type); + + external void wire_bdk_wallet_is_mine( + NativePortType port_, List that, List script); + + external void wire_bdk_wallet_list_transactions( + NativePortType port_, List that, bool include_raw); + + external void wire_bdk_wallet_list_unspent( + NativePortType port_, List that); + + external void wire_bdk_wallet_network( + NativePortType port_, List that); + + external void wire_bdk_wallet_new( + NativePortType port_, + List descriptor, + List? change_descriptor, + int network, + List database_config); + + external void wire_bdk_wallet_sign(NativePortType port_, List ptr, + List psbt, List? sign_options); + + external void wire_bdk_wallet_sync( + NativePortType port_, List ptr, List blockchain); + + external void wire_finish_bump_fee_tx_builder( + NativePortType port_, + String txid, + double fee_rate, + List? allow_shrinking, + List wallet, + bool enable_rbf, + int? n_sequence); + + external void wire_tx_builder_finish( + NativePortType port_, + List wallet, + List recipients, + List utxos, + List? foreign_utxo, + List un_spendable, + int change_policy, + bool manually_selected_only, + double? fee_rate, + Object? fee_absolute, + bool drain_wallet, + List? drain_to, + List? rbf, + List data); + + external void rust_arc_increment_strong_count_RustOpaque_AnyBlockchain( + dynamic ptr); + + external void rust_arc_decrement_strong_count_RustOpaque_AnyBlockchain( + dynamic ptr); + + external void rust_arc_increment_strong_count_RustOpaque_ExtendedDescriptor( + dynamic ptr); + + external void rust_arc_decrement_strong_count_RustOpaque_ExtendedDescriptor( + dynamic ptr); + + external void + rust_arc_increment_strong_count_RustOpaque_MutexPartiallySignedTransaction( + dynamic ptr); + + external void + rust_arc_decrement_strong_count_RustOpaque_MutexPartiallySignedTransaction( + dynamic ptr); + + external void + rust_arc_increment_strong_count_RustOpaque_MutexbdkWalletAnyDatabase( + dynamic ptr); + + external void + rust_arc_decrement_strong_count_RustOpaque_MutexbdkWalletAnyDatabase( + dynamic ptr); + + external void rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddress( + dynamic ptr); + + external void rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress( + dynamic ptr); + + external void + rust_arc_increment_strong_count_RustOpaque_bitcoinbip32DerivationPath( + dynamic ptr); + + external void + rust_arc_decrement_strong_count_RustOpaque_bitcoinbip32DerivationPath( + dynamic ptr); + + external void + rust_arc_increment_strong_count_RustOpaque_keysDescriptorPublicKey( + dynamic ptr); + + external void + rust_arc_decrement_strong_count_RustOpaque_keysDescriptorPublicKey( + dynamic ptr); + + external void + rust_arc_increment_strong_count_RustOpaque_keysDescriptorSecretKey( + dynamic ptr); + + external void + rust_arc_decrement_strong_count_RustOpaque_keysDescriptorSecretKey( + dynamic ptr); + + external void rust_arc_increment_strong_count_RustOpaque_keysKeyMap( + dynamic ptr); + + external void rust_arc_decrement_strong_count_RustOpaque_keysKeyMap( + dynamic ptr); + + external void rust_arc_increment_strong_count_RustOpaque_keysbip39Mnemonic( + dynamic ptr); + + external void rust_arc_decrement_strong_count_RustOpaque_keysbip39Mnemonic( + dynamic ptr); +} diff --git a/lib/src/root.dart b/lib/src/root.dart new file mode 100644 index 00000000..f835d94a --- /dev/null +++ b/lib/src/root.dart @@ -0,0 +1,1125 @@ +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'; +import 'generated/api/wallet.dart'; + +///A Bitcoin address. +class Address extends BdkAddress { + Address._({required super.ptr}); + static Future
fromScript( + {required ScriptBuf script, required Network network}) async { + try { + await Api.initialize(); + final res = await BdkAddress.fromScript(script: script, network: network); + return Address._(ptr: res.ptr); + } on BdkError catch (e) { + throw mapToException(e); + } + } + + static Future
fromString( + {required String s, required Network network}) async { + try { + await Api.initialize(); + final res = await BdkAddress.fromString(address: s, network: network); + return Address._(ptr: res.ptr); + } on BdkError catch (e) { + throw mapToException(e); + } + } + + ///Generates a script pubkey spending to this address + Future scriptPubkey() async { + try { + final res = await BdkAddress.script(ptr: this); + return ScriptBuf(bytes: res.bytes); + } on BdkError catch (e) { + throw mapToException(e); + } + } +} + +/// 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.newInstance(blockchainConfig: config); + return Blockchain._(ptr: res.ptr); + } on BdkError catch (e) { + throw mapToException(e); + } + } + + ///Estimate the fee rate required to confirm a transaction in a given target of blocks + @override + Future estimateFee({required int target, hint}) async { + try { + return super.estimateFee(target: target); + } on BdkError catch (e) { + throw mapToException(e); + } + } + + ///The function for broadcasting a transaction + @override + Future broadcast({required BdkTransaction transaction, hint}) async { + try { + return super.broadcast(transaction: transaction); + } on BdkError catch (e) { + throw mapToException(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 mapToException(e); + } + } + + ///The function for getting the current height of the blockchain. + @override + Future getHeight({hint}) { + try { + return super.getHeight(); + } on BdkError catch (e) { + throw mapToException(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), res.$2); + } on BdkError catch (e) { + throw mapToException(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 mapToException(e); + } + } +} + +///Script descriptor +class Descriptor extends BdkDescriptor { + Descriptor._({required super.extendedDescriptor, required super.keyMap}); + + /// [Descriptor] constructor + static Future create( + {required String descriptor, required 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 mapToException(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 Network network, + required 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 mapToException(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 Network network, + required 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 mapToException(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 Network network, + required 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 mapToException(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 Network network, + required 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 mapToException(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 Network network, + required 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 mapToException(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 Network network, + required 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 mapToException(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 Network network, + required 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 mapToException(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 Network network, + required 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 mapToException(e); + } + } + + ///Return the public version of the output descriptor. + @override + Future asString({hint}) async { + try { + return super.asString(); + } on BdkError catch (e) { + throw mapToException(e); + } + } + + ///Return the private version of the output descriptor if available, otherwise return the public version. + @override + Future asStringPrivate({hint}) async { + try { + return super.asStringPrivate(); + } on BdkError catch (e) { + throw mapToException(e); + } + } + + ///Computes an upper bound on the difference between a non-satisfied TxIn's segwit_weight and a satisfied TxIn's segwit_weight + @override + Future maxSatisfactionWeight({hint}) async { + try { + return super.maxSatisfactionWeight(); + } on BdkError catch (e) { + throw mapToException(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 mapToException(e); + } + } + + ///Get the public key as string. + @override + Future asString({hint}) async { + try { + return super.asString(); + } on BdkError catch (e) { + throw mapToException(e); + } + } + + ///Derive a public descriptor at a given path. + Future derive( + {required BdkDerivationPath path, hint}) async { + try { + final res = await BdkDescriptorPublicKey.derive(ptr: this, path: path); + return DescriptorPublicKey._(ptr: res.ptr); + } on BdkError catch (e) { + throw mapToException(e); + } + } + + ///Extend the public descriptor with a custom path. + Future extend( + {required BdkDerivationPath path, hint}) async { + try { + final res = await BdkDescriptorPublicKey.extend(ptr: this, path: path); + return DescriptorPublicKey._(ptr: res.ptr); + } on BdkError catch (e) { + throw mapToException(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 mapToException(e); + } + } + + /// [DescriptorSecretKey] constructor + static Future create( + {required 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 mapToException(e); + } + } + + ///Derived the XPrv using the derivation path + Future derive(BdkDerivationPath path) async { + try { + final res = await BdkDescriptorSecretKey.derive(ptr: this, path: path); + return DescriptorSecretKey._(ptr: res.ptr); + } on BdkError catch (e) { + throw mapToException(e); + } + } + + ///Extends the XPrv using the derivation path + Future extend(BdkDerivationPath path) async { + try { + final res = await BdkDescriptorSecretKey.extend(ptr: this, path: path); + return DescriptorSecretKey._(ptr: res.ptr); + } on BdkError catch (e) { + throw mapToException(e); + } + } + + ///Returns the public version of this key. + Future asPublic() async { + try { + final res = await BdkDescriptorSecretKey.asPublic(ptr: this); + return DescriptorPublicKey._(ptr: res.ptr); + } on BdkError catch (e) { + throw mapToException(e); + } + } + + ///Get the private key as string. + @override + Future asString({hint}) { + try { + return super.asString(); + } on BdkError catch (e) { + throw mapToException(e); + } + } + + ///Get the private key as bytes. + @override + Future secretBytes({hint}) async { + try { + return super.secretBytes(); + } on BdkError catch (e) { + throw mapToException(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(WordCount wordCount) async { + try { + await Api.initialize(); + final res = await BdkMnemonic.newInstance(wordCount: wordCount); + return Mnemonic._(ptr: res.ptr); + } on BdkError catch (e) { + throw mapToException(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 mapToException(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 mapToException(e); + } + } + + ///Returns Mnemonic as string + @override + Future asString({hint}) async { + try { + return super.asString(); + } on BdkError catch (e) { + throw mapToException(e); + } + } +} + +///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 mapToException(e); + } + } + + ///Return fee amount + @override + Future feeAmount({hint}) { + try { + return super.feeAmount(); + } on BdkError catch (e) { + throw mapToException(e); + } + } + + ///Return fee rate + @override + Future feeRate({hint}) { + try { + return super.feeRate(); + } on BdkError catch (e) { + throw mapToException(e); + } + } + + @override + Future jsonSerialize({hint}) { + try { + return super.jsonSerialize(); + } on BdkError catch (e) { + throw mapToException(e); + } + } + + ///Return psbt as string + @override + Future serialize({hint}) { + try { + return super.serialize(); + } on BdkError catch (e) { + throw mapToException(e); + } + } + + ///Return the transaction as bytes. + Future extractTx() async { + try { + final res = await BdkPsbt.extractTx(ptr: this); + return Transaction._(inner: res.inner); + } on BdkError catch (e) { + throw mapToException(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 mapToException(e); + } + } + + ///Returns the [PartiallySignedTransaction]'s transaction id + @override + Future txid({hint}) { + try { + return super.txid(); + } on BdkError catch (e) { + throw mapToException(e); + } + } +} + +///Bitcoin script. +class ScriptBuf extends BdkScriptBuf { + /// [ScriptBuf] constructor + ScriptBuf({required super.bytes}); + + ///Creates a new empty script. + static Future empty() async { + try { + await Api.initialize(); + final res = await BdkScriptBuf.empty(); + return ScriptBuf(bytes: res.bytes); + } on BdkError catch (e) { + throw mapToException(e); + } + } + + ///Creates a new empty script with pre-allocated capacity. + static Future withCapacity(int capacity) async { + try { + await Api.initialize(); + final res = await BdkScriptBuf.withCapacity(capacity: capacity); + return ScriptBuf(bytes: res.bytes); + } on BdkError catch (e) { + throw mapToException(e); + } + } + + ///Creates a ScriptBuf from a hex string. + static Future fromHex(String s) async { + try { + await Api.initialize(); + final res = await BdkScriptBuf.fromHex(s: s); + return ScriptBuf(bytes: res.bytes); + } on BdkError catch (e) { + throw mapToException(e); + } + } +} + +///A bitcoin transaction. +class Transaction extends BdkTransaction { + Transaction._({required super.inner}); + + /// [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 BdkTransaction.fromBytes(transactionBytes: transactionBytes); + return Transaction._(inner: res.inner); + } on BdkError catch (e) { + throw mapToException(e); + } + } + + @override + String toString() { + return inner; + } +} + +///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 = []; + (OutPoint, Input, int)? _foreignUtxo; + bool _manuallySelectedOnly = false; + double? _feeRate; + ChangeSpendPolicy _changeSpendPolicy = ChangeSpendPolicy.changeAllowed; + int? _feeAbsolute; + bool _drainWallet = false; + ScriptBuf? _drainTo; + RbfValue? _rbfValue; + List _data = []; + + ///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, int amount) { + _recipients.add(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(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( + Input psbtInput, OutPoint outPoint, int 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 = 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 = RbfValue.value(nSequence); + return this; + } + + ///Enable signaling RBF + /// + /// This will use the default nSequence value of 0xFFFFFFFD. + TxBuilder enableRbf() { + _rbfValue = RbfValue.rbfDefault(); + return this; + } + + ///Set an absolute fee + TxBuilder feeAbsolute(int 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 recipients) { + for (var e in _recipients) { + _recipients.add(e); + } + 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(OutPoint unSpendable) { + _unSpendable.add(unSpendable); + return this; + } + + ///Only spend change outputs + /// + /// This effectively adds all the non-change outputs to the “unspendable†list. + TxBuilder onlySpendChange() { + _changeSpendPolicy = 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, + rbf: _rbfValue, + drainTo: _drainTo, + feeAbsolute: _feeAbsolute, + feeRate: _feeRate, + data: _data, + changePolicy: _changeSpendPolicy); + + return (PartiallySignedTransaction._(ptr: res.$1.ptr), res.$2); + } on BdkError catch (e) { + throw mapToException(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 Network network, + required 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 mapToException(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. + Future getAddress( + {required AddressIndex addressIndex, hint}) async { + try { + final res = + await BdkWallet.getAddress(ptr: this, addressIndex: addressIndex); + return AddressInfo(res.$2, Address._(ptr: res.$1.ptr)); + } on BdkError catch (e) { + throw mapToException(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 + Future getBalance({hint}) { + try { + return super.getBalance(); + } on BdkError catch (e) { + throw mapToException(e); + } + } + + ///Returns the descriptor used to create addresses for a particular keychain. + Future getDescriptorForKeychain( + {required KeychainKind keychain, hint}) async { + try { + final res = await BdkWallet.getDescriptorForKeychain( + ptr: this, keychain: keychain); + return Descriptor._( + extendedDescriptor: res.extendedDescriptor, keyMap: res.keyMap); + } on BdkError catch (e) { + throw mapToException(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]. + + Future getInternalAddress( + {required AddressIndex addressIndex, hint}) async { + try { + final res = await BdkWallet.getInternalAddress( + ptr: this, addressIndex: addressIndex); + return AddressInfo(res.$2, Address._(ptr: res.$1.ptr)); + } on BdkError catch (e) { + throw mapToException(e); + } + } + + ///get the corresponding PSBT Input for a LocalUtxo + @override + Future getPsbtInput( + {required LocalUtxo utxo, + required bool onlyWitnessUtxo, + PsbtSigHashType? sighashType, + hint}) async { + try { + return super.getPsbtInput( + utxo: utxo, + onlyWitnessUtxo: onlyWitnessUtxo, + sighashType: sighashType); + } on BdkError catch (e) { + throw mapToException(e); + } + } + + /// Return whether or not a script is part of this wallet (either internal or external). + @override + Future isMine({required BdkScriptBuf script, hint}) async { + try { + return super.isMine(script: script); + } on BdkError catch (e) { + throw mapToException(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 + Future> listTransactions( + {required bool includeRaw, hint}) async { + try { + return super.listTransactions(includeRaw: includeRaw); + } on BdkError catch (e) { + throw mapToException(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 + Future> listUnspent({hint}) async { + try { + return super.listUnspent(); + } on BdkError catch (e) { + throw mapToException(e); + } + } + + /// Get the Bitcoin network the wallet is using. + @override + Future network({hint}) async { + try { + return super.network(); + } on BdkError catch (e) { + throw mapToException(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, + SignOptions? signOptions, + hint}) async { + try { + final res = await BdkWallet.sign(ptr: this, psbt: psbt); + return res; + } on BdkError catch (e) { + throw mapToException(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 mapToException(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); +} diff --git a/lib/src/utils/exceptions.dart b/lib/src/utils/exceptions.dart new file mode 100644 index 00000000..20ecbd44 --- /dev/null +++ b/lib/src/utils/exceptions.dart @@ -0,0 +1,368 @@ +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 ConsensusError extends BdkFfiException { + /// Constructs the [ConsensusError] + ConsensusError({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}); +} + +Exception mapToException(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. 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. 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) => DescriptorException(message: e.toString()), + 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) => HexException(message: e.toString()), + 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()), + //TODO; Map the following errors properly + consensus: (e) => ConsensusError(message: e.toString()), + address: (e) => AddressException(message: e.toString()), + bip39: (e) => Bip39Exception(message: e.toString()), + invalidInput: (e) => InvalidInputException(message: e), + invalidLockTime: (e) => InvalidLockTimeException(message: e), + invalidTransaction: (e) => InvalidTransactionException(message: e), + ); +} diff --git a/lib/src/utils/utils.dart b/lib/src/utils/utils.dart new file mode 100644 index 00000000..08e25d0e --- /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 (!CApi.instance.initialized) { + await CApi.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..c79716cb --- /dev/null +++ b/macos/Classes/frb_generated.h @@ -0,0 +1,1297 @@ +#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 *inner; +} 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_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 multi_sig; + 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_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_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_list_local_utxo { + struct wire_cst_local_utxo *ptr; + int32_t len; +} wire_cst_list_local_utxo; + +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_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_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; + +void frbgen_bdk_flutter_wire_bdk_blockchain_broadcast(int64_t port_, + struct wire_cst_bdk_blockchain *that, + struct wire_cst_bdk_transaction *transaction); + +void frbgen_bdk_flutter_wire_bdk_blockchain_estimate_fee(int64_t port_, + struct wire_cst_bdk_blockchain *that, + uint64_t target); + +void frbgen_bdk_flutter_wire_bdk_blockchain_get_block_hash(int64_t port_, + struct wire_cst_bdk_blockchain *that, + uint32_t height); + +void frbgen_bdk_flutter_wire_bdk_blockchain_get_height(int64_t port_, + struct wire_cst_bdk_blockchain *that); + +void frbgen_bdk_flutter_wire_bdk_blockchain_new(int64_t port_, + struct wire_cst_blockchain_config *blockchain_config); + +void frbgen_bdk_flutter_wire_bdk_descriptor_as_string(int64_t port_, + struct wire_cst_bdk_descriptor *that); + +void frbgen_bdk_flutter_wire_bdk_descriptor_as_string_private(int64_t port_, + struct wire_cst_bdk_descriptor *that); + +void frbgen_bdk_flutter_wire_bdk_descriptor_max_satisfaction_weight(int64_t port_, + struct wire_cst_bdk_descriptor *that); + +void frbgen_bdk_flutter_wire_bdk_descriptor_new(int64_t port_, + struct wire_cst_list_prim_u_8_strict *descriptor, + int32_t network); + +void frbgen_bdk_flutter_wire_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_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_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_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_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_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_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_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); + +void frbgen_bdk_flutter_wire_bdk_derivation_path_from_string(int64_t port_, + struct wire_cst_list_prim_u_8_strict *path); + +void frbgen_bdk_flutter_wire_bdk_descriptor_public_key_as_string(int64_t port_, + struct wire_cst_bdk_descriptor_public_key *that); + +void frbgen_bdk_flutter_wire_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_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_bdk_descriptor_public_key_from_string(int64_t port_, + struct wire_cst_list_prim_u_8_strict *public_key); + +void frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_as_public(int64_t port_, + struct wire_cst_bdk_descriptor_secret_key *ptr); + +void frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_as_string(int64_t port_, + struct wire_cst_bdk_descriptor_secret_key *that); + +void frbgen_bdk_flutter_wire_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_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_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_bdk_descriptor_secret_key_from_string(int64_t port_, + struct wire_cst_list_prim_u_8_strict *secret_key); + +void frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_secret_bytes(int64_t port_, + struct wire_cst_bdk_descriptor_secret_key *that); + +void frbgen_bdk_flutter_wire_bdk_mnemonic_as_string(int64_t port_, + struct wire_cst_bdk_mnemonic *that); + +void frbgen_bdk_flutter_wire_bdk_mnemonic_from_entropy(int64_t port_, + struct wire_cst_list_prim_u_8_loose *entropy); + +void frbgen_bdk_flutter_wire_bdk_mnemonic_from_string(int64_t port_, + struct wire_cst_list_prim_u_8_strict *mnemonic); + +void frbgen_bdk_flutter_wire_bdk_mnemonic_new(int64_t port_, int32_t word_count); + +void frbgen_bdk_flutter_wire_bdk_psbt_combine(int64_t port_, + struct wire_cst_bdk_psbt *ptr, + struct wire_cst_bdk_psbt *other); + +void frbgen_bdk_flutter_wire_bdk_psbt_extract_tx(int64_t port_, struct wire_cst_bdk_psbt *ptr); + +void frbgen_bdk_flutter_wire_bdk_psbt_fee_amount(int64_t port_, struct wire_cst_bdk_psbt *that); + +void frbgen_bdk_flutter_wire_bdk_psbt_fee_rate(int64_t port_, struct wire_cst_bdk_psbt *that); + +void frbgen_bdk_flutter_wire_bdk_psbt_from_str(int64_t port_, + struct wire_cst_list_prim_u_8_strict *psbt_base64); + +void frbgen_bdk_flutter_wire_bdk_psbt_json_serialize(int64_t port_, struct wire_cst_bdk_psbt *that); + +void frbgen_bdk_flutter_wire_bdk_psbt_serialize(int64_t port_, struct wire_cst_bdk_psbt *that); + +void frbgen_bdk_flutter_wire_bdk_psbt_txid(int64_t port_, struct wire_cst_bdk_psbt *that); + +void frbgen_bdk_flutter_wire_bdk_address_as_string(int64_t port_, + struct wire_cst_bdk_address *that); + +void frbgen_bdk_flutter_wire_bdk_address_from_script(int64_t port_, + struct wire_cst_bdk_script_buf *script, + int32_t network); + +void frbgen_bdk_flutter_wire_bdk_address_from_string(int64_t port_, + struct wire_cst_list_prim_u_8_strict *address, + int32_t network); + +void frbgen_bdk_flutter_wire_bdk_address_is_valid_for_network(int64_t port_, + struct wire_cst_bdk_address *that, + int32_t network); + +void frbgen_bdk_flutter_wire_bdk_address_network(int64_t port_, struct wire_cst_bdk_address *that); + +void frbgen_bdk_flutter_wire_bdk_address_payload(int64_t port_, struct wire_cst_bdk_address *that); + +void frbgen_bdk_flutter_wire_bdk_address_script(int64_t port_, struct wire_cst_bdk_address *ptr); + +void frbgen_bdk_flutter_wire_bdk_address_to_qr_uri(int64_t port_, + struct wire_cst_bdk_address *that); + +void frbgen_bdk_flutter_wire_bdk_script_buf_empty(int64_t port_); + +void frbgen_bdk_flutter_wire_bdk_script_buf_from_hex(int64_t port_, + struct wire_cst_list_prim_u_8_strict *s); + +void frbgen_bdk_flutter_wire_bdk_script_buf_with_capacity(int64_t port_, uintptr_t capacity); + +void frbgen_bdk_flutter_wire_bdk_transaction_from_bytes(int64_t port_, + struct wire_cst_list_prim_u_8_loose *transaction_bytes); + +void frbgen_bdk_flutter_wire_bdk_transaction_input(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire_bdk_transaction_is_coin_base(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire_bdk_transaction_is_explicitly_rbf(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire_bdk_transaction_is_lock_time_enabled(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire_bdk_transaction_lock_time(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire_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_bdk_transaction_output(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire_bdk_transaction_serialize(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire_bdk_transaction_size(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire_bdk_transaction_txid(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire_bdk_transaction_version(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire_bdk_transaction_vsize(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire_bdk_transaction_weight(int64_t port_, + struct wire_cst_bdk_transaction *that); + +void frbgen_bdk_flutter_wire_bdk_wallet_get_address(int64_t port_, + struct wire_cst_bdk_wallet *ptr, + struct wire_cst_address_index *address_index); + +void frbgen_bdk_flutter_wire_bdk_wallet_get_balance(int64_t port_, + struct wire_cst_bdk_wallet *that); + +void frbgen_bdk_flutter_wire_bdk_wallet_get_descriptor_for_keychain(int64_t port_, + struct wire_cst_bdk_wallet *ptr, + int32_t keychain); + +void frbgen_bdk_flutter_wire_bdk_wallet_get_internal_address(int64_t port_, + struct wire_cst_bdk_wallet *ptr, + struct wire_cst_address_index *address_index); + +void frbgen_bdk_flutter_wire_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); + +void frbgen_bdk_flutter_wire_bdk_wallet_is_mine(int64_t port_, + struct wire_cst_bdk_wallet *that, + struct wire_cst_bdk_script_buf *script); + +void frbgen_bdk_flutter_wire_bdk_wallet_list_transactions(int64_t port_, + struct wire_cst_bdk_wallet *that, + bool include_raw); + +void frbgen_bdk_flutter_wire_bdk_wallet_list_unspent(int64_t port_, + struct wire_cst_bdk_wallet *that); + +void frbgen_bdk_flutter_wire_bdk_wallet_network(int64_t port_, struct wire_cst_bdk_wallet *that); + +void frbgen_bdk_flutter_wire_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); + +void frbgen_bdk_flutter_wire_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_bdk_wallet_sync(int64_t port_, + struct wire_cst_bdk_wallet *ptr, + struct wire_cst_bdk_blockchain *blockchain); + +void frbgen_bdk_flutter_wire_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_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_prim_u_8_loose *data); + +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_AnyBlockchain(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_AnyBlockchain(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_ExtendedDescriptor(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_ExtendedDescriptor(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_MutexPartiallySignedTransaction(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_MutexPartiallySignedTransaction(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_MutexbdkWalletAnyDatabase(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_MutexbdkWalletAnyDatabase(const void *ptr); + +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_bitcoinbip32DerivationPath(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bitcoinbip32DerivationPath(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysDescriptorPublicKey(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysDescriptorPublicKey(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysDescriptorSecretKey(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysDescriptorSecretKey(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysKeyMap(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysKeyMap(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysbip39Mnemonic(const void *ptr); + +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysbip39Mnemonic(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_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); + +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_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_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_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_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_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_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_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_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_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_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_AnyBlockchain); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_ExtendedDescriptor); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_MutexPartiallySignedTransaction); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_MutexbdkWalletAnyDatabase); + 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_bitcoinbip32DerivationPath); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysDescriptorPublicKey); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysDescriptorSecretKey); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysKeyMap); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_keysbip39Mnemonic); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_AnyBlockchain); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_ExtendedDescriptor); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_MutexPartiallySignedTransaction); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_MutexbdkWalletAnyDatabase); + 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_bitcoinbip32DerivationPath); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysDescriptorPublicKey); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysDescriptorSecretKey); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysKeyMap); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_keysbip39Mnemonic); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_from_script); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_from_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_is_valid_for_network); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_network); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_payload); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_script); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_address_to_qr_uri); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_blockchain_broadcast); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_blockchain_estimate_fee); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_blockchain_get_block_hash); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_blockchain_get_height); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_blockchain_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_derivation_path_from_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_as_string_private); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_max_satisfaction_weight); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip44); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip44_public); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip49); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip49_public); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip84); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip84_public); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip86); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_new_bip86_public); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_public_key_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_public_key_derive); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_public_key_extend); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_public_key_from_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_as_public); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_create); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_derive); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_extend); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_from_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_secret_bytes); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_mnemonic_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_mnemonic_from_entropy); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_mnemonic_from_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_mnemonic_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_combine); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_extract_tx); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_fee_amount); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_fee_rate); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_from_str); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_json_serialize); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_serialize); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_psbt_txid); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_script_buf_empty); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_script_buf_from_hex); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_script_buf_with_capacity); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_from_bytes); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_input); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_is_coin_base); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_is_explicitly_rbf); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_is_lock_time_enabled); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_lock_time); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_output); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_serialize); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_size); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_txid); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_version); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_vsize); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_transaction_weight); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_get_address); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_get_balance); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_get_descriptor_for_keychain); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_get_internal_address); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_get_psbt_input); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_is_mine); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_list_transactions); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_list_unspent); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_network); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_sign); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_bdk_wallet_sync); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_finish_bump_fee_tx_builder); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire_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..1fecb16e --- /dev/null +++ b/macos/bdk_flutter.podspec @@ -0,0 +1,34 @@ +Pod::Spec.new do |s| + s.name = 'bdk_flutter' + s.version = "0.31.2-dev" + 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', + # 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/makefile b/makefile new file mode 100644 index 00000000..60b7bfe4 --- /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@2.0.0-dev.31' +## : + +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..1cb8d5c0 --- /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: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051 + url: "https://pub.dev" + source: hosted + version: "64.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893" + url: "https://pub.dev" + source: hosted + version: "6.2.0" + args: + dependency: transitive + 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" + 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: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" + url: "https://pub.dev" + source: hosted + version: "4.0.1" + 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: "581bacf68f89ec8792f5e5a0b2c4decd1c948e97ce659dc783688c8a88fbec21" + url: "https://pub.dev" + source: hosted + version: "2.4.8" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + sha256: c9e32d21dd6626b5c163d48b037ce906bbe428bc23ab77bcd77bb21e593b6185 + url: "https://pub.dev" + source: hosted + version: "7.2.11" + 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: c9aabae0718ec394e5bc3c7272e6bb0dc0b32201a08fe185ec1d8401d3e39309 + url: "https://pub.dev" + source: hosted + version: "8.8.1" + 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: "40ae61a5d43feea6d24bd22c0537a6629db858963b99b4bc1c3db80676f32368" + url: "https://pub.dev" + source: hosted + version: "2.3.4" + 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: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + ffigen: + dependency: "direct dev" + description: + name: ffigen + sha256: "3a80687577e7e51ba915114742f389a128e8aa241c52ce69a0f70aecb8e14365" + url: "https://pub.dev" + source: hosted + version: "9.0.1" + 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: e9a8716b1ad2fc81c434f3e4bf84b86c578578678c57e568b44aea7acf210102 + url: "https://pub.dev" + source: hosted + version: "2.0.0-dev.31" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + freezed: + dependency: "direct dev" + description: + name: freezed + sha256: "6c5031daae12c7072b3a87eff98983076434b4889ef2a44384d0cae3f82372ba" + url: "https://pub.dev" + source: hosted + version: "2.4.6" + freezed_annotation: + dependency: "direct main" + description: + name: freezed_annotation + sha256: c3fd9336eb55a38cc1bbd79ab17573113a8deccd0ecbbf926cca3c62803b5c2d + url: "https://pub.dev" + source: hosted + version: "2.4.1" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + url: "https://pub.dev" + source: hosted + version: "3.2.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: 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" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + url: "https://pub.dev" + source: hosted + version: "10.0.0" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + lints: + dependency: "direct dev" + description: + name: lints + sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 + url: "https://pub.dev" + source: hosted + version: "3.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: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + url: "https://pub.dev" + source: hosted + version: "0.8.0" + meta: + dependency: "direct main" + description: + name: meta + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + url: "https://pub.dev" + source: hosted + version: "1.11.0" + mime: + dependency: transitive + description: + name: mime + sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + url: "https://pub.dev" + source: hosted + version: "1.0.4" + 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: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367 + url: "https://pub.dev" + source: hosted + version: "1.2.3" + 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: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + url: "https://pub.dev" + source: hosted + version: "1.0.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" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.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: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + url: "https://pub.dev" + source: hosted + version: "0.6.1" + 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" + uuid: + dependency: "direct main" + description: + name: uuid + sha256: cd210a09f7c18cbe5a02511718e0334de6559871052c90a90c0cca46a4aa81c8 + url: "https://pub.dev" + source: hosted + version: "4.3.3" + 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: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + url: "https://pub.dev" + source: hosted + version: "13.0.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" + 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: "1579d4a0340a83cf9e4d580ea51a16329c916973bffd5bd4b45e911b25d46bfd" + url: "https://pub.dev" + source: hosted + version: "2.1.1" +sdks: + dart: ">=3.2.0-0 <4.0.0" + flutter: ">=3.0.0" diff --git a/pubspec.yaml b/pubspec.yaml new file mode 100644 index 00000000..0e4a22c0 --- /dev/null +++ b/pubspec.yaml @@ -0,0 +1,37 @@ +name: bdk_flutter +description: A Flutter library for the Bitcoin Development Kit(bdk) (https://bitcoindevkit.org/) +version: 0.31.2-dev +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-dev.30 <= 2.0.0-dev.31" + ffi: ^2.0.1 + freezed_annotation: ^2.2.0 + mockito: ^5.4.0 + meta: ^1.10.0 + uuid: ^4.2.2 + collection: ^1.18.0 + +dev_dependencies: + flutter_test: + sdk: flutter + ffigen: ^9.0.1 + freezed: ^2.3.5 + build_runner: ^2.4.4 + lints: ^3.0.0 + +flutter: + plugin: + platforms: + android: + ffiPlugin: true + ios: + ffiPlugin: true + macos: + ffiPlugin: true \ No newline at end of file diff --git a/rust/Cargo.lock b/rust/Cargo.lock new file mode 100644 index 00000000..7a367368 --- /dev/null +++ b/rust/Cargo.lock @@ -0,0 +1,2541 @@ +# 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.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f5a5fd28223e6f3cafb7d9cd685f51eafdd71d33ca1229f8316925d5957240" +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-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[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 = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anstream" +version = "0.6.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" + +[[package]] +name = "anstyle-parse" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", +] + +[[package]] +name = "anyhow" +version = "1.0.82" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" +dependencies = [ + "backtrace", +] + +[[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 = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi 0.1.19", + "libc", + "winapi", +] + +[[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.2-dev" +dependencies = [ + "anyhow", + "assert_matches", + "bdk", + "flutter_rust_bridge", + "flutter_rust_bridge_codegen", + "lazy_static", + "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 = "bitflags" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" + +[[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 = "camino" +version = "1.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-platform" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4acbb09d9ee8e23699b9634375c72795d095bf268439da88562cf9b501f181fa" +dependencies = [ + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", +] + +[[package]] +name = "cargo_toml" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "802b755090e39835a4b0440fb0bbee0df7495a8b337f63db21e616f7821c7e8c" +dependencies = [ + "serde", + "toml 0.8.12", +] + +[[package]] +name = "cbindgen" +version = "0.24.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b922faaf31122819ec80c4047cc684c6979a087366c069611e33649bf98e18d" +dependencies = [ + "heck 0.4.1", + "indexmap 1.9.3", + "log", + "proc-macro2", + "quote", + "serde", + "serde_json", + "syn 1.0.109", + "tempfile", + "toml 0.5.11", +] + +[[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 = "chrono" +version = "0.4.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "js-sys", + "num-traits", + "wasm-bindgen", + "windows-targets 0.52.5", +] + +[[package]] +name = "clap" +version = "4.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.59", +] + +[[package]] +name = "clap_lex" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" + +[[package]] +name = "colorchoice" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + +[[package]] +name = "colored" +version = "1.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a5f741c91823341bebf717d4c71bda820630ce065443b58bd1b7451af008355" +dependencies = [ + "is-terminal", + "lazy_static", + "winapi", +] + +[[package]] +name = "console" +version = "0.15.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" +dependencies = [ + "encode_unicode", + "lazy_static", + "libc", + "unicode-width", + "windows-sys 0.52.0", +] + +[[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 = "convert_case" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb4a24b1aaf0fd0ce8b45161144d6f42cd91677fd5940fd431183eb023b3a2b8" + +[[package]] +name = "core-foundation-sys" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" + +[[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-channel" +version = "0.5.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab3db02a9c5b5121e1e42fbdb1aeb65f5e02624cc58c43f2884c6ccac0b82f95" +dependencies = [ + "crossbeam-utils", +] + +[[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 = "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 = "dashmap" +version = "5.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" +dependencies = [ + "cfg-if", + "hashbrown 0.14.3", + "lock_api", + "once_cell", + "parking_lot_core 0.9.9", +] + +[[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 = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "either" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" + +[[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 = "encode_unicode" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" + +[[package]] +name = "enum-iterator" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fd242f399be1da0a5354aa462d57b4ab2b4ee0683cc552f7c007d2d12d36e94" +dependencies = [ + "enum-iterator-derive", +] + +[[package]] +name = "enum-iterator-derive" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03cdc46ec28bd728e67540c528013c6a10eb69a02eb31078a1bda695438cbfb8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.59", +] + +[[package]] +name = "enum_dispatch" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa18ce2bc66555b3218614519ac839ddb759a7d6720732f979ef8d13be147ecd" +dependencies = [ + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.59", +] + +[[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 = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[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 = "fastrand" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" + +[[package]] +name = "fern" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9f0c14694cbd524c8720dd69b0e3179344f04ebb5f90f2e4a440c6ea3b2f1ee" +dependencies = [ + "chrono", + "colored", + "log", +] + +[[package]] +name = "filetime" +version = "0.2.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.4.1", + "windows-sys 0.52.0", +] + +[[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-dev.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d9ceb6f8db0bf711a55e20151c6699132bb5975f846ecac2c3bc7d23cc0845d" +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_codegen" +version = "2.0.0-dev.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb089f0e86a6873eb9538ee5dea459e9bb029feeb6777ecf1f996c805451a507" +dependencies = [ + "anyhow", + "atty", + "cargo_metadata", + "cargo_toml", + "cbindgen", + "chrono", + "clap", + "convert_case", + "derivative", + "enum-iterator", + "enum_dispatch", + "fern", + "glob", + "hex", + "include_dir", + "indicatif", + "indicatif-log-bridge", + "itertools", + "lazy_static", + "log", + "notify", + "notify-debouncer-mini", + "paste", + "pathdiff", + "proc-macro2", + "quote", + "regex", + "serde", + "serde_json", + "serde_yaml", + "serial_test", + "strum", + "strum_macros", + "syn 2.0.59", + "tempfile", + "toml 0.5.11", + "topological-sort", +] + +[[package]] +name = "flutter_rust_bridge_macros" +version = "2.0.0-dev.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e02edfe56f04af804d3145b17dfe7820d46a6753b214160f227dbdfa1073f7cb" +dependencies = [ + "hex", + "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 = "fsevent-sys" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76ee7a02da4d231650c7cea31349b889be2f45ddb3ef3032d2ec8185f6313fd2" +dependencies = [ + "libc", +] + +[[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 = "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 = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[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 0.14.3", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[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 = "iana-time-zone" +version = "0.1.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[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 = "include_dir" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18762faeff7122e89e0857b02f7ce6fcc0d101d5e9ad2ad7846cc01d61b7f19e" +dependencies = [ + "include_dir_macros", +] + +[[package]] +name = "include_dir_macros" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b139284b5cf57ecfa712bcc66950bb635b31aff41c188e8a4cfc758eca374a3f" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +dependencies = [ + "equivalent", + "hashbrown 0.14.3", +] + +[[package]] +name = "indicatif" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3" +dependencies = [ + "console", + "instant", + "number_prefix", + "portable-atomic", + "unicode-width", +] + +[[package]] +name = "indicatif-log-bridge" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2963046f28a204e3e3fd7e754fd90a6235da05b5378f24707ff0ec9513725ce3" +dependencies = [ + "indicatif", + "log", +] + +[[package]] +name = "inotify" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8069d3ec154eb856955c1c0fbffefbf5f3c40a104ec912d4797314c1801abff" +dependencies = [ + "bitflags 1.3.2", + "inotify-sys", + "libc", +] + +[[package]] +name = "inotify-sys" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e05c02b5e89bff3b946cedeca278abc628fe811e604f027c45a8aa3cf793d0eb" +dependencies = [ + "libc", +] + +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "is-terminal" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +dependencies = [ + "hermit-abi 0.3.9", + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[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 = "kqueue" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7447f1ca1b7b563588a205fe93dea8df60fd981423a768bc1c0ded35ed147d0c" +dependencies = [ + "kqueue-sys", + "libc", +] + +[[package]] +name = "kqueue-sys" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed9625ffda8729b85e45cf04090035ac368927b8cebc34898e7c120f52e4838b" +dependencies = [ + "bitflags 1.3.2", + "libc", +] + +[[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 = "linked-hash-map" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" + +[[package]] +name = "linux-raw-sys" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" + +[[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 = "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 = "mio" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +dependencies = [ + "libc", + "log", + "wasi", + "windows-sys 0.48.0", +] + +[[package]] +name = "notify" +version = "6.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d" +dependencies = [ + "bitflags 2.5.0", + "crossbeam-channel", + "filetime", + "fsevent-sys", + "inotify", + "kqueue", + "libc", + "log", + "mio", + "walkdir", + "windows-sys 0.48.0", +] + +[[package]] +name = "notify-debouncer-mini" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d40b221972a1fc5ef4d858a2f671fb34c75983eb385463dff3780eeff6a9d43" +dependencies = [ + "crossbeam-channel", + "log", + "notify", +] + +[[package]] +name = "num-traits" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi 0.3.9", + "libc", +] + +[[package]] +name = "number_prefix" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" + +[[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 4.0.2", + "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 0.8.6", +] + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core 0.9.9", +] + +[[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 0.2.16", + "smallvec", + "winapi", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.4.1", + "smallvec", + "windows-targets 0.48.5", +] + +[[package]] +name = "paste" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + +[[package]] +name = "pathdiff" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" + +[[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 = "portable-atomic" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" + +[[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 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + +[[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 0.52.0", +] + +[[package]] +name = "rusqlite" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01e213bc3ecb39ac32e81e51ebe31fd888a940515173e3a18a35f8c6e896422a" +dependencies = [ + "bitflags 1.3.2", + "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 = "rustix" +version = "0.38.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" +dependencies = [ + "bitflags 2.5.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + +[[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 = "rustversion" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80af6f9131f277a45a3fba6ce8e2258037bb0477a67e610d3c1fe046ab31de47" + +[[package]] +name = "ryu" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[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 = "semver" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" +dependencies = [ + "serde", +] + +[[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 = "serde_spanned" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_yaml" +version = "0.8.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b" +dependencies = [ + "indexmap 1.9.3", + "ryu", + "serde", + "yaml-rust", +] + +[[package]] +name = "serial_test" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e56dd856803e253c8f298af3f4d7eb0ae5e23a737252cd90bb4f3b435033b2d" +dependencies = [ + "dashmap 5.5.3", + "futures", + "lazy_static", + "log", + "parking_lot 0.12.1", + "serial_test_derive", +] + +[[package]] +name = "serial_test_derive" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.59", +] + +[[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 0.11.2", +] + +[[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 = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "strum" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" + +[[package]] +name = "strum_macros" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "quote", + "rustversion", + "syn 1.0.109", +] + +[[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 = "tempfile" +version = "3.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +dependencies = [ + "cfg-if", + "fastrand", + "rustix", + "windows-sys 0.52.0", +] + +[[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 = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "serde", +] + +[[package]] +name = "toml" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.22.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e40bb779c5187258fd7aad0eb68cb8706a0a81fa712fbea808ab43c4b8374c4" +dependencies = [ + "indexmap 2.2.6", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + +[[package]] +name = "topological-sort" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea68304e134ecd095ac6c3574494fc62b909f416c4fca77e440530221e549d3d" + +[[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 = "unicode-width" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" + +[[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 = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + +[[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 = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[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-util" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +dependencies = [ + "winapi", +] + +[[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-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.5", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.5", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +dependencies = [ + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[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.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[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.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[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.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[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.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[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.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[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.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" + +[[package]] +name = "winnow" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0c976aaaa0e1f90dbb21e9587cdaf1d9679a1cde8875c0d6bd83ab96a208352" +dependencies = [ + "memchr", +] + +[[package]] +name = "yaml-rust" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" +dependencies = [ + "linked-hash-map", +] + +[[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..cb8f3928 --- /dev/null +++ b/rust/Cargo.toml @@ -0,0 +1,28 @@ +[package] +name = "bdk_flutter" +version = "0.31.2-dev" +edition = "2021" + +[lib] +crate-type = ["staticlib", "cdylib"] +[dev-dependencies] +assert_matches = "1.5" + +[build-dependencies] +flutter_rust_bridge_codegen = { version = "= 2.0.0-dev.31" } +anyhow = "1.0.68" +[dependencies] +flutter_rust_bridge = "=2.0.0-dev.31" +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" +lazy_static = "1.4.0" + +[profile.release] +strip = true +opt-level = "z" +lto = true +codegen-units = 1 +panic = "abort" diff --git a/rust/cargokit.yaml b/rust/cargokit.yaml new file mode 100644 index 00000000..f94f555f --- /dev/null +++ b/rust/cargokit.yaml @@ -0,0 +1,9 @@ +cargo: + release: + toolchain: nightly + extra_flags: + - -Z + - build-std=panic_abort,std +precompiled_binaries: + url_prefix: https://github.com/LtbLightning/bdk-flutter/releases/download/precompiled_ + public_key: 0e43d5e8452d00db7f3000c18fb1ba796babfcb5dc6306bb0629eff24f8be85b diff --git a/rust/src/api/blockchain.rs b/rust/src/api/blockchain.rs new file mode 100644 index 00000000..178c4d40 --- /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; +use bdk::blockchain::esplora::EsploraBlockchainConfig; + +pub use bdk::blockchain::{ + AnyBlockchain, AnyBlockchainConfig, ConfigurableBlockchain, ElectrumBlockchainConfig, + rpc, GetBlockHash, GetHeight,Blockchain +}; +use std::path::PathBuf; + +pub struct BdkBlockchain { + pub ptr: RustOpaque, +} + +impl From for BdkBlockchain { + fn from(value: AnyBlockchain) -> Self { + Self { + ptr: RustOpaque::new(value), + } + } +} +impl BdkBlockchain { + pub fn new(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: usize::try_from(config.stop_gap).unwrap(), + validate_domain: config.validate_domain, + }) + } + BlockchainConfig::Esplora { config } => { + AnyBlockchainConfig::Esplora(EsploraBlockchainConfig { + base_url: config.base_url, + proxy: config.proxy, + concurrency: config.concurrency, + stop_gap: usize::try_from(config.stop_gap).unwrap(), + timeout: config.timeout, + }) + } + BlockchainConfig::Rpc { config } => { + AnyBlockchainConfig::Rpc(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 = AnyBlockchain::from_config(&any_blockchain_config)?; + Ok(blockchain.into()) + } + pub(crate) fn get_blockchain(&self) -> RustOpaque { + self.ptr.clone() + } + + pub fn broadcast(&self, transaction: BdkTransaction) -> Result { + let tx: Transaction = (&transaction).try_into()?; + self.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 rpc::Auth { + fn from(auth: Auth) -> Self { + match auth { + Auth::None => blockchain::rpc::Auth::None, + Auth::UserPass { username, password } => { + blockchain::rpc::Auth::UserPass { username, password } + } + Auth::Cookie { file } => 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 blockchain::rpc::RpcSyncParams { + fn from(params: RpcSyncParams) -> Self { + 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 }, +} \ No newline at end of file diff --git a/rust/src/api/descriptor.rs b/rust/src/api/descriptor.rs new file mode 100644 index 00000000..236f2803 --- /dev/null +++ b/rust/src/api/descriptor.rs @@ -0,0 +1,267 @@ +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::{ExtendedDescriptor, IntoWalletDescriptor}; +pub use bdk::keys; +use bdk::template::{ + Bip44, Bip44Public, Bip49, Bip49Public, Bip84, Bip84Public, Bip86, Bip86Public, + DescriptorTemplate, +}; +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()).unwrap(); + 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()).unwrap(); + 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()).unwrap(); + 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()) + .unwrap(); + + 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()).unwrap(); + 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(), + )), + } + } + + pub fn as_string_private(&self) -> String { + let descriptor = &self.extended_descriptor; + let key_map = &(*self.key_map); + descriptor.to_string_with_secret(key_map) + } + + pub fn as_string(&self) -> String { + self.extended_descriptor.to_string() + } + pub fn max_satisfaction_weight(&self) -> Result { + self.extended_descriptor + .max_weight_to_satisfy() + .map_err(|e| e.into()) + } +} \ No newline at end of file diff --git a/rust/src/api/error.rs b/rust/src/api/error.rs new file mode 100644 index 00000000..57021f14 --- /dev/null +++ b/rust/src/api/error.rs @@ -0,0 +1,357 @@ +use crate::api::types::{KeychainKind, Network, OutPoint, Variant}; +use bdk::descriptor::error::Error as BdkDescriptorError; + +pub enum BdkError { + /// Hex decoding error + Hex(HexError), + /// Encoding error + Consensus(ConsensusError), + /// 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()), + } + } +} +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()), + } + } +} +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), + } + } +} + +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!(), + } + } +} +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()) + } +} \ No newline at end of file diff --git a/rust/src/api/key.rs b/rust/src/api/key.rs new file mode 100644 index 00000000..3f9eaf8f --- /dev/null +++ b/rust/src/api/key.rs @@ -0,0 +1,269 @@ +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 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> = + keys::bip39::Mnemonic::generate((word_count.into(), Language::English)).unwrap(); + 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())) + } + + /// Returns Mnemonic as string + 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())) + } +} + +#[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().unwrap(); + let descriptor_secret_key = keys::DescriptorSecretKey::XPrv(DescriptorXKey { + origin: None, + xkey: xkey.into_xprv(network.into()).unwrap(), + 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(), + )), + } + } + pub fn as_public(ptr: BdkDescriptorSecretKey) -> Result { + let secp = Secp256k1::new(); + let descriptor_public_key = ptr.ptr.to_public(&secp).unwrap(); + Ok(descriptor_public_key.into()) + } + /// 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).unwrap(); + Ok(key.into()) + } + 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(), + )), + } + } + + pub fn as_string(&self) -> String { + self.ptr.to_string() + } +} \ No newline at end of file diff --git a/rust/src/api/mod.rs b/rust/src/api/mod.rs new file mode 100644 index 00000000..73e4799d --- /dev/null +++ b/rust/src/api/mod.rs @@ -0,0 +1,7 @@ +pub mod blockchain; +pub mod descriptor; +pub mod error; +pub mod key; +pub mod psbt; +pub mod types; +pub mod wallet; diff --git a/rust/src/api/psbt.rs b/rust/src/api/psbt.rs new file mode 100644 index 00000000..78fcf0f5 --- /dev/null +++ b/rust/src/api/psbt.rs @@ -0,0 +1,73 @@ +use crate::api::error::BdkError; +use crate::api::types::{BdkTransaction, FeeRate}; +use crate::frb_generated::RustOpaque; +pub use bdk::bitcoin::psbt::PartiallySignedTransaction; +use bdk::psbt::PsbtUtils; +use std::ops::Deref; +use std::str::FromStr; +use std::sync::Mutex; + +#[derive(Debug)] +pub struct BdkPsbt { + pub ptr: RustOpaque>, +} + +impl From for BdkPsbt { + fn from(value: PartiallySignedTransaction) -> Self { + Self { + ptr: RustOpaque::new(Mutex::new(value)), + } + } +} +impl BdkPsbt { + pub fn from_str(psbt_base64: String) -> Result { + let psbt: PartiallySignedTransaction = PartiallySignedTransaction::from_str(&psbt_base64)?; + Ok(psbt.into()) + } + pub fn serialize(&self) -> String { + let psbt = self.ptr.lock().unwrap().clone(); + psbt.to_string() + } + + pub fn txid(&self) -> String { + let tx = self.ptr.lock().unwrap().clone().extract_tx(); + let txid = tx.txid(); + txid.to_string() + } + + /// Return the transaction. + pub fn extract_tx(ptr: BdkPsbt) -> Result { + let tx = ptr.ptr.lock().unwrap().clone().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().unwrap().clone(); + let mut original_psbt = ptr.ptr.lock().unwrap().clone(); + original_psbt.combine(other_psbt)?; + Ok(original_psbt.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. + pub fn fee_amount(&self) -> Option { + self.ptr.lock().unwrap().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. + pub fn fee_rate(&self) -> Option { + self.ptr.lock().unwrap().fee_rate().map(|e| e.into()) + } + + /// Serialize the PSBT data structure as a String of JSON. + pub fn json_serialize(&self) -> String { + let psbt = self.ptr.lock().unwrap(); + serde_json::to_string(psbt.deref()).unwrap() + } +} \ No newline at end of file diff --git a/rust/src/api/types.rs b/rust/src/api/types.rs new file mode 100644 index 00000000..daecb73c --- /dev/null +++ b/rust/src/api/types.rs @@ -0,0 +1,908 @@ +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 serde::{Deserialize, Serialize}; +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 { + ///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)), + }) + } +} +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)] +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()) + } + 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!(), + } + } + + ///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: + // write!(writer, "{:#}", address)?; + pub fn to_qr_uri(&self) -> String { + self.ptr.to_qr_uri() + } + ///The network on which this address is usable. + pub fn network(&self) -> Network { + self.ptr.network.into() + } + + pub fn script(ptr: BdkAddress) -> BdkScriptBuf { + ptr.ptr.script_pubkey().into() + } + + pub fn is_valid_for_network(&self, network: Network) -> bool { + let address_str = self.ptr.to_string(); + if let Ok(unchecked_address) = address_str + .parse::>() + { + unchecked_address.is_valid_for_network(network.into()) + } else { + false + } + } + + pub fn as_string(&self) -> String { + self.ptr.to_string() + } +} +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, + } + } +} +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 inner: 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 { + inner: 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.inner).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 { + pub multi_sig: bool, + /// 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()))?, + }) + } +} \ No newline at end of file diff --git a/rust/src/api/wallet.rs b/rust/src/api/wallet.rs new file mode 100644 index 00000000..022d9ca1 --- /dev/null +++ b/rust/src/api/wallet.rs @@ -0,0 +1,279 @@ +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::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::database::any::AnyDatabase; +use bdk::database::ConfigurableDatabase; +pub use std::sync::Mutex; +use std::sync::MutexGuard; + +#[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 = AnyDatabase::from_config(&database_config.into())?; + let descriptor: String = descriptor.as_string_private(); + let change_descriptor: Option = change_descriptor.map(|d| d.as_string_private()); + + let wallet = bdk::Wallet::new( + &descriptor, + change_descriptor.as_ref(), + network.into(), + database, + )?; + Ok(BdkWallet { + ptr: RustOpaque::new(Mutex::new(wallet)), + }) + } + fn get_wallet(&self) -> MutexGuard> { + self.ptr.lock().expect("") + } + + /// Get the Bitcoin network the wallet is using. + pub fn network(&self) -> Network { + self.get_wallet().network().into() + } + /// Return whether or not a script is part of this wallet (either internal or external). + pub fn is_mine(&self, script: BdkScriptBuf) -> Result { + self.get_wallet() + .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. + pub fn get_address( ptr: BdkWallet, address_index: AddressIndex) -> Result<(BdkAddress, u32), BdkError> { + ptr.get_wallet() + .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]. + pub fn get_internal_address( + ptr: BdkWallet, + address_index: AddressIndex, + ) -> Result<(BdkAddress, u32), BdkError> { + ptr.get_wallet() + .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. + pub fn get_balance(&self) -> Result { + self.get_wallet() + .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. + pub fn list_transactions( + &self, + include_raw: bool, + ) -> Result, BdkError> { + let mut transaction_details = vec![]; + for e in self + .get_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. + pub fn list_unspent(&self) -> Result, BdkError> { + let unspent: Vec = self.get_wallet().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().unwrap(); + ptr.get_wallet() + .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> { + let blockchain = blockchain.get_blockchain(); + ptr.get_wallet() + .sync(blockchain.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 { + let input = self.get_wallet().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. + pub fn get_descriptor_for_keychain( + ptr: BdkWallet, + keychain: KeychainKind, + ) -> anyhow::Result { + let wallet = ptr.get_wallet(); + let extended_descriptor = wallet.get_descriptor_for_keychain(keychain.into()); + BdkDescriptor::new(extended_descriptor.to_string(), wallet.network().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()).unwrap(); + let bdk_wallet = wallet.get_wallet(); + + let mut tx_builder = bdk_wallet.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).unwrap(); + } + 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, + data: Vec, +) -> anyhow::Result<(BdkPsbt, TransactionDetails), BdkError> { + let binding = wallet.get_wallet(); + + let mut tx_builder = binding.build_tx(); + + 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()), + }; +} \ No newline at end of file diff --git a/rust/src/frb_generated.io.rs b/rust/src/frb_generated.io.rs new file mode 100644 index 00000000..d634557a --- /dev/null +++ b/rust/src/frb_generated.io.rs @@ -0,0 +1,3982 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31. + +// Section: imports + +use super::*; +use crate::api::blockchain::*; +use crate::api::descriptor::*; +use crate::api::key::*; +use crate::api::psbt::*; +use crate::api::types::*; +use crate::api::wallet::*; +use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt}; +use flutter_rust_bridge::for_generated::transform_result_dco; +use flutter_rust_bridge::{Handler, IntoIntoDart}; + +// Section: boilerplate + +flutter_rust_bridge::frb_generated_boilerplate_io!(); + +// Section: dart2rust + +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.Address }; + crate::api::error::BdkError::Address(ans.field0.cst_decode()) + } + 3 => { + let ans = unsafe { self.kind.Descriptor }; + crate::api::error::BdkError::Descriptor(ans.field0.cst_decode()) + } + 4 => { + let ans = unsafe { self.kind.InvalidU32Bytes }; + crate::api::error::BdkError::InvalidU32Bytes(ans.field0.cst_decode()) + } + 5 => { + let ans = unsafe { self.kind.Generic }; + crate::api::error::BdkError::Generic(ans.field0.cst_decode()) + } + 6 => crate::api::error::BdkError::ScriptDoesntHaveAddressForm, + 7 => crate::api::error::BdkError::NoRecipients, + 8 => crate::api::error::BdkError::NoUtxosSelected, + 9 => { + let ans = unsafe { self.kind.OutputBelowDustLimit }; + crate::api::error::BdkError::OutputBelowDustLimit(ans.field0.cst_decode()) + } + 10 => { + let ans = unsafe { self.kind.InsufficientFunds }; + crate::api::error::BdkError::InsufficientFunds { + needed: ans.needed.cst_decode(), + available: ans.available.cst_decode(), + } + } + 11 => crate::api::error::BdkError::BnBTotalTriesExceeded, + 12 => crate::api::error::BdkError::BnBNoExactMatch, + 13 => crate::api::error::BdkError::UnknownUtxo, + 14 => crate::api::error::BdkError::TransactionNotFound, + 15 => crate::api::error::BdkError::TransactionConfirmed, + 16 => crate::api::error::BdkError::IrreplaceableTransaction, + 17 => { + let ans = unsafe { self.kind.FeeRateTooLow }; + crate::api::error::BdkError::FeeRateTooLow { + needed: ans.needed.cst_decode(), + } + } + 18 => { + let ans = unsafe { self.kind.FeeTooLow }; + crate::api::error::BdkError::FeeTooLow { + needed: ans.needed.cst_decode(), + } + } + 19 => crate::api::error::BdkError::FeeRateUnavailable, + 20 => { + let ans = unsafe { self.kind.MissingKeyOrigin }; + crate::api::error::BdkError::MissingKeyOrigin(ans.field0.cst_decode()) + } + 21 => { + let ans = unsafe { self.kind.Key }; + crate::api::error::BdkError::Key(ans.field0.cst_decode()) + } + 22 => crate::api::error::BdkError::ChecksumMismatch, + 23 => { + let ans = unsafe { self.kind.SpendingPolicyRequired }; + crate::api::error::BdkError::SpendingPolicyRequired(ans.field0.cst_decode()) + } + 24 => { + let ans = unsafe { self.kind.InvalidPolicyPathError }; + crate::api::error::BdkError::InvalidPolicyPathError(ans.field0.cst_decode()) + } + 25 => { + let ans = unsafe { self.kind.Signer }; + crate::api::error::BdkError::Signer(ans.field0.cst_decode()) + } + 26 => { + let ans = unsafe { self.kind.InvalidNetwork }; + crate::api::error::BdkError::InvalidNetwork { + requested: ans.requested.cst_decode(), + found: ans.found.cst_decode(), + } + } + 27 => { + let ans = unsafe { self.kind.InvalidOutpoint }; + crate::api::error::BdkError::InvalidOutpoint(ans.field0.cst_decode()) + } + 28 => { + let ans = unsafe { self.kind.Encode }; + crate::api::error::BdkError::Encode(ans.field0.cst_decode()) + } + 29 => { + let ans = unsafe { self.kind.Miniscript }; + crate::api::error::BdkError::Miniscript(ans.field0.cst_decode()) + } + 30 => { + let ans = unsafe { self.kind.MiniscriptPsbt }; + crate::api::error::BdkError::MiniscriptPsbt(ans.field0.cst_decode()) + } + 31 => { + let ans = unsafe { self.kind.Bip32 }; + crate::api::error::BdkError::Bip32(ans.field0.cst_decode()) + } + 32 => { + let ans = unsafe { self.kind.Bip39 }; + crate::api::error::BdkError::Bip39(ans.field0.cst_decode()) + } + 33 => { + let ans = unsafe { self.kind.Secp256k1 }; + crate::api::error::BdkError::Secp256k1(ans.field0.cst_decode()) + } + 34 => { + let ans = unsafe { self.kind.Json }; + crate::api::error::BdkError::Json(ans.field0.cst_decode()) + } + 35 => { + let ans = unsafe { self.kind.Psbt }; + crate::api::error::BdkError::Psbt(ans.field0.cst_decode()) + } + 36 => { + let ans = unsafe { self.kind.PsbtParse }; + crate::api::error::BdkError::PsbtParse(ans.field0.cst_decode()) + } + 37 => { + let ans = unsafe { self.kind.MissingCachedScripts }; + crate::api::error::BdkError::MissingCachedScripts( + ans.field0.cst_decode(), + ans.field1.cst_decode(), + ) + } + 38 => { + let ans = unsafe { self.kind.Electrum }; + crate::api::error::BdkError::Electrum(ans.field0.cst_decode()) + } + 39 => { + let ans = unsafe { self.kind.Esplora }; + crate::api::error::BdkError::Esplora(ans.field0.cst_decode()) + } + 40 => { + let ans = unsafe { self.kind.Sled }; + crate::api::error::BdkError::Sled(ans.field0.cst_decode()) + } + 41 => { + let ans = unsafe { self.kind.Rpc }; + crate::api::error::BdkError::Rpc(ans.field0.cst_decode()) + } + 42 => { + let ans = unsafe { self.kind.Rusqlite }; + crate::api::error::BdkError::Rusqlite(ans.field0.cst_decode()) + } + 43 => { + let ans = unsafe { self.kind.InvalidInput }; + crate::api::error::BdkError::InvalidInput(ans.field0.cst_decode()) + } + 44 => { + let ans = unsafe { self.kind.InvalidLockTime }; + crate::api::error::BdkError::InvalidLockTime(ans.field0.cst_decode()) + } + 45 => { + 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_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 { + inner: self.inner.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_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 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_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_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_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_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> 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_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<(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 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_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 { + multi_sig: self.multi_sig.cst_decode(), + 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_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 { + inner: 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_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_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_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_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_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 { + multi_sig: Default::default(), + 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_bdk_blockchain_broadcast( + port_: i64, + that: *mut wire_cst_bdk_blockchain, + transaction: *mut wire_cst_bdk_transaction, +) { + wire_bdk_blockchain_broadcast_impl(port_, that, transaction) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_blockchain_estimate_fee( + port_: i64, + that: *mut wire_cst_bdk_blockchain, + target: u64, +) { + wire_bdk_blockchain_estimate_fee_impl(port_, that, target) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_blockchain_get_block_hash( + port_: i64, + that: *mut wire_cst_bdk_blockchain, + height: u32, +) { + wire_bdk_blockchain_get_block_hash_impl(port_, that, height) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_blockchain_get_height( + port_: i64, + that: *mut wire_cst_bdk_blockchain, +) { + wire_bdk_blockchain_get_height_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_blockchain_new( + port_: i64, + blockchain_config: *mut wire_cst_blockchain_config, +) { + wire_bdk_blockchain_new_impl(port_, blockchain_config) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_as_string( + port_: i64, + that: *mut wire_cst_bdk_descriptor, +) { + wire_bdk_descriptor_as_string_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_as_string_private( + port_: i64, + that: *mut wire_cst_bdk_descriptor, +) { + wire_bdk_descriptor_as_string_private_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_max_satisfaction_weight( + port_: i64, + that: *mut wire_cst_bdk_descriptor, +) { + wire_bdk_descriptor_max_satisfaction_weight_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_new( + port_: i64, + descriptor: *mut wire_cst_list_prim_u_8_strict, + network: i32, +) { + wire_bdk_descriptor_new_impl(port_, descriptor, network) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_new_bip44( + port_: i64, + secret_key: *mut wire_cst_bdk_descriptor_secret_key, + keychain_kind: i32, + network: i32, +) { + wire_bdk_descriptor_new_bip44_impl(port_, secret_key, keychain_kind, network) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_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_bdk_descriptor_new_bip44_public_impl( + port_, + public_key, + fingerprint, + keychain_kind, + network, + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_new_bip49( + port_: i64, + secret_key: *mut wire_cst_bdk_descriptor_secret_key, + keychain_kind: i32, + network: i32, +) { + wire_bdk_descriptor_new_bip49_impl(port_, secret_key, keychain_kind, network) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_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_bdk_descriptor_new_bip49_public_impl( + port_, + public_key, + fingerprint, + keychain_kind, + network, + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_new_bip84( + port_: i64, + secret_key: *mut wire_cst_bdk_descriptor_secret_key, + keychain_kind: i32, + network: i32, +) { + wire_bdk_descriptor_new_bip84_impl(port_, secret_key, keychain_kind, network) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_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_bdk_descriptor_new_bip84_public_impl( + port_, + public_key, + fingerprint, + keychain_kind, + network, + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_new_bip86( + port_: i64, + secret_key: *mut wire_cst_bdk_descriptor_secret_key, + keychain_kind: i32, + network: i32, +) { + wire_bdk_descriptor_new_bip86_impl(port_, secret_key, keychain_kind, network) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_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_bdk_descriptor_new_bip86_public_impl( + port_, + public_key, + fingerprint, + keychain_kind, + network, + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_derivation_path_from_string( + port_: i64, + path: *mut wire_cst_list_prim_u_8_strict, +) { + wire_bdk_derivation_path_from_string_impl(port_, path) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_public_key_as_string( + port_: i64, + that: *mut wire_cst_bdk_descriptor_public_key, +) { + wire_bdk_descriptor_public_key_as_string_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_public_key_derive( + port_: i64, + ptr: *mut wire_cst_bdk_descriptor_public_key, + path: *mut wire_cst_bdk_derivation_path, +) { + wire_bdk_descriptor_public_key_derive_impl(port_, ptr, path) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_public_key_extend( + port_: i64, + ptr: *mut wire_cst_bdk_descriptor_public_key, + path: *mut wire_cst_bdk_derivation_path, +) { + wire_bdk_descriptor_public_key_extend_impl(port_, ptr, path) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_public_key_from_string( + port_: i64, + public_key: *mut wire_cst_list_prim_u_8_strict, +) { + wire_bdk_descriptor_public_key_from_string_impl(port_, public_key) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_as_public( + port_: i64, + ptr: *mut wire_cst_bdk_descriptor_secret_key, +) { + wire_bdk_descriptor_secret_key_as_public_impl(port_, ptr) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_as_string( + port_: i64, + that: *mut wire_cst_bdk_descriptor_secret_key, +) { + wire_bdk_descriptor_secret_key_as_string_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_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_bdk_descriptor_secret_key_create_impl(port_, network, mnemonic, password) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_derive( + port_: i64, + ptr: *mut wire_cst_bdk_descriptor_secret_key, + path: *mut wire_cst_bdk_derivation_path, +) { + wire_bdk_descriptor_secret_key_derive_impl(port_, ptr, path) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_extend( + port_: i64, + ptr: *mut wire_cst_bdk_descriptor_secret_key, + path: *mut wire_cst_bdk_derivation_path, +) { + wire_bdk_descriptor_secret_key_extend_impl(port_, ptr, path) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_from_string( + port_: i64, + secret_key: *mut wire_cst_list_prim_u_8_strict, +) { + wire_bdk_descriptor_secret_key_from_string_impl(port_, secret_key) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_descriptor_secret_key_secret_bytes( + port_: i64, + that: *mut wire_cst_bdk_descriptor_secret_key, +) { + wire_bdk_descriptor_secret_key_secret_bytes_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_mnemonic_as_string( + port_: i64, + that: *mut wire_cst_bdk_mnemonic, +) { + wire_bdk_mnemonic_as_string_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_mnemonic_from_entropy( + port_: i64, + entropy: *mut wire_cst_list_prim_u_8_loose, +) { + wire_bdk_mnemonic_from_entropy_impl(port_, entropy) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_mnemonic_from_string( + port_: i64, + mnemonic: *mut wire_cst_list_prim_u_8_strict, +) { + wire_bdk_mnemonic_from_string_impl(port_, mnemonic) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_mnemonic_new(port_: i64, word_count: i32) { + wire_bdk_mnemonic_new_impl(port_, word_count) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_psbt_combine( + port_: i64, + ptr: *mut wire_cst_bdk_psbt, + other: *mut wire_cst_bdk_psbt, +) { + wire_bdk_psbt_combine_impl(port_, ptr, other) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_psbt_extract_tx( + port_: i64, + ptr: *mut wire_cst_bdk_psbt, +) { + wire_bdk_psbt_extract_tx_impl(port_, ptr) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_psbt_fee_amount( + port_: i64, + that: *mut wire_cst_bdk_psbt, +) { + wire_bdk_psbt_fee_amount_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_psbt_fee_rate( + port_: i64, + that: *mut wire_cst_bdk_psbt, +) { + wire_bdk_psbt_fee_rate_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_psbt_from_str( + port_: i64, + psbt_base64: *mut wire_cst_list_prim_u_8_strict, +) { + wire_bdk_psbt_from_str_impl(port_, psbt_base64) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_psbt_json_serialize( + port_: i64, + that: *mut wire_cst_bdk_psbt, +) { + wire_bdk_psbt_json_serialize_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_psbt_serialize( + port_: i64, + that: *mut wire_cst_bdk_psbt, +) { + wire_bdk_psbt_serialize_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_psbt_txid(port_: i64, that: *mut wire_cst_bdk_psbt) { + wire_bdk_psbt_txid_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_address_as_string( + port_: i64, + that: *mut wire_cst_bdk_address, +) { + wire_bdk_address_as_string_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_address_from_script( + port_: i64, + script: *mut wire_cst_bdk_script_buf, + network: i32, +) { + wire_bdk_address_from_script_impl(port_, script, network) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_address_from_string( + port_: i64, + address: *mut wire_cst_list_prim_u_8_strict, + network: i32, +) { + wire_bdk_address_from_string_impl(port_, address, network) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_address_is_valid_for_network( + port_: i64, + that: *mut wire_cst_bdk_address, + network: i32, +) { + wire_bdk_address_is_valid_for_network_impl(port_, that, network) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_address_network( + port_: i64, + that: *mut wire_cst_bdk_address, +) { + wire_bdk_address_network_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_address_payload( + port_: i64, + that: *mut wire_cst_bdk_address, +) { + wire_bdk_address_payload_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_address_script( + port_: i64, + ptr: *mut wire_cst_bdk_address, +) { + wire_bdk_address_script_impl(port_, ptr) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_address_to_qr_uri( + port_: i64, + that: *mut wire_cst_bdk_address, +) { + wire_bdk_address_to_qr_uri_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_script_buf_empty(port_: i64) { + wire_bdk_script_buf_empty_impl(port_) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_script_buf_from_hex( + port_: i64, + s: *mut wire_cst_list_prim_u_8_strict, +) { + wire_bdk_script_buf_from_hex_impl(port_, s) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_script_buf_with_capacity( + port_: i64, + capacity: usize, +) { + wire_bdk_script_buf_with_capacity_impl(port_, capacity) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_transaction_from_bytes( + port_: i64, + transaction_bytes: *mut wire_cst_list_prim_u_8_loose, +) { + wire_bdk_transaction_from_bytes_impl(port_, transaction_bytes) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_transaction_input( + port_: i64, + that: *mut wire_cst_bdk_transaction, +) { + wire_bdk_transaction_input_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_transaction_is_coin_base( + port_: i64, + that: *mut wire_cst_bdk_transaction, +) { + wire_bdk_transaction_is_coin_base_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_transaction_is_explicitly_rbf( + port_: i64, + that: *mut wire_cst_bdk_transaction, +) { + wire_bdk_transaction_is_explicitly_rbf_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_transaction_is_lock_time_enabled( + port_: i64, + that: *mut wire_cst_bdk_transaction, +) { + wire_bdk_transaction_is_lock_time_enabled_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_transaction_lock_time( + port_: i64, + that: *mut wire_cst_bdk_transaction, +) { + wire_bdk_transaction_lock_time_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_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_bdk_transaction_new_impl(port_, version, lock_time, input, output) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_transaction_output( + port_: i64, + that: *mut wire_cst_bdk_transaction, +) { + wire_bdk_transaction_output_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_transaction_serialize( + port_: i64, + that: *mut wire_cst_bdk_transaction, +) { + wire_bdk_transaction_serialize_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_transaction_size( + port_: i64, + that: *mut wire_cst_bdk_transaction, +) { + wire_bdk_transaction_size_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_transaction_txid( + port_: i64, + that: *mut wire_cst_bdk_transaction, +) { + wire_bdk_transaction_txid_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_transaction_version( + port_: i64, + that: *mut wire_cst_bdk_transaction, +) { + wire_bdk_transaction_version_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_transaction_vsize( + port_: i64, + that: *mut wire_cst_bdk_transaction, +) { + wire_bdk_transaction_vsize_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_transaction_weight( + port_: i64, + that: *mut wire_cst_bdk_transaction, +) { + wire_bdk_transaction_weight_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_wallet_get_address( + port_: i64, + ptr: *mut wire_cst_bdk_wallet, + address_index: *mut wire_cst_address_index, +) { + wire_bdk_wallet_get_address_impl(port_, ptr, address_index) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_wallet_get_balance( + port_: i64, + that: *mut wire_cst_bdk_wallet, +) { + wire_bdk_wallet_get_balance_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_wallet_get_descriptor_for_keychain( + port_: i64, + ptr: *mut wire_cst_bdk_wallet, + keychain: i32, +) { + wire_bdk_wallet_get_descriptor_for_keychain_impl(port_, ptr, keychain) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_wallet_get_internal_address( + port_: i64, + ptr: *mut wire_cst_bdk_wallet, + address_index: *mut wire_cst_address_index, +) { + wire_bdk_wallet_get_internal_address_impl(port_, ptr, address_index) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_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_bdk_wallet_get_psbt_input_impl(port_, that, utxo, only_witness_utxo, sighash_type) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_wallet_is_mine( + port_: i64, + that: *mut wire_cst_bdk_wallet, + script: *mut wire_cst_bdk_script_buf, +) { + wire_bdk_wallet_is_mine_impl(port_, that, script) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_wallet_list_transactions( + port_: i64, + that: *mut wire_cst_bdk_wallet, + include_raw: bool, +) { + wire_bdk_wallet_list_transactions_impl(port_, that, include_raw) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_wallet_list_unspent( + port_: i64, + that: *mut wire_cst_bdk_wallet, +) { + wire_bdk_wallet_list_unspent_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_wallet_network( + port_: i64, + that: *mut wire_cst_bdk_wallet, +) { + wire_bdk_wallet_network_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_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_bdk_wallet_new_impl( + port_, + descriptor, + change_descriptor, + network, + database_config, + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_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_bdk_wallet_sign_impl(port_, ptr, psbt, sign_options) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_bdk_wallet_sync( + port_: i64, + ptr: *mut wire_cst_bdk_wallet, + blockchain: *mut wire_cst_bdk_blockchain, +) { + wire_bdk_wallet_sync_impl(port_, ptr, blockchain) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_wire_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_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_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, + data: *mut wire_cst_list_prim_u_8_loose, +) { + wire_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, + data, + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_AnyBlockchain( + 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_AnyBlockchain( + 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_ExtendedDescriptor( + 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_ExtendedDescriptor( + 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_MutexPartiallySignedTransaction( + 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_MutexPartiallySignedTransaction( + 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_MutexbdkWalletAnyDatabase( + 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_MutexbdkWalletAnyDatabase( + 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_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_bitcoinbip32DerivationPath( + 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_bitcoinbip32DerivationPath( + 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_keysDescriptorPublicKey( + 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_keysDescriptorPublicKey( + 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_keysDescriptorSecretKey( + 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_keysDescriptorSecretKey( + 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_keysKeyMap( + 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_keysKeyMap( + 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_keysbip39Mnemonic( + 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_keysbip39Mnemonic( + 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_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_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_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_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_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_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, + 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_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_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 { + inner: *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_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_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_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_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_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_out_point_input_usize { + field0: wire_cst_out_point, + field1: wire_cst_input, + field2: usize, +} +#[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_script_amount { + script: wire_cst_bdk_script_buf, + amount: u64, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_sign_options { + multi_sig: bool, + 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..e351e8d3 --- /dev/null +++ b/rust/src/frb_generated.rs @@ -0,0 +1,5947 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31. + +#![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 +)] + +// Section: imports + +use crate::api::blockchain::*; +use crate::api::descriptor::*; +use crate::api::key::*; +use crate::api::psbt::*; +use crate::api::types::*; +use crate::api::wallet::*; +use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt}; +use flutter_rust_bridge::for_generated::transform_result_dco; +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-dev.31"; + +// Section: executor + +flutter_rust_bridge::frb_generated_default_handler!(); + +// Section: wire_funcs + +fn wire_bdk_blockchain_broadcast_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: 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_that = that.cst_decode(); + let api_transaction = transaction.cst_decode(); + move |context| { + transform_result_dco((move || { + crate::api::blockchain::BdkBlockchain::broadcast(&api_that, api_transaction) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::blockchain::BdkBlockchain::estimate_fee(&api_that, api_target) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::blockchain::BdkBlockchain::get_block_hash(&api_that, api_height) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::blockchain::BdkBlockchain::get_height(&api_that) + })()) + } + }, + ) +} +fn wire_bdk_blockchain_new_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_new", + 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((move || { + crate::api::blockchain::BdkBlockchain::new(api_blockchain_config) + })()) + } + }, + ) +} +fn wire_bdk_descriptor_as_string_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_descriptor_as_string", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_that = that.cst_decode(); + move |context| { + transform_result_dco((move || { + Result::<_, ()>::Ok(crate::api::descriptor::BdkDescriptor::as_string(&api_that)) + })()) + } + }, + ) +} +fn wire_bdk_descriptor_as_string_private_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_descriptor_as_string_private", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_that = that.cst_decode(); + move |context| { + transform_result_dco((move || { + Result::<_, ()>::Ok(crate::api::descriptor::BdkDescriptor::as_string_private( + &api_that, + )) + })()) + } + }, + ) +} +fn wire_bdk_descriptor_max_satisfaction_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_descriptor_max_satisfaction_weight", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_that = that.cst_decode(); + move |context| { + transform_result_dco((move || { + crate::api::descriptor::BdkDescriptor::max_satisfaction_weight(&api_that) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::descriptor::BdkDescriptor::new(api_descriptor, api_network) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::descriptor::BdkDescriptor::new_bip44( + api_secret_key, + api_keychain_kind, + api_network, + ) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::descriptor::BdkDescriptor::new_bip44_public( + api_public_key, + api_fingerprint, + api_keychain_kind, + api_network, + ) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::descriptor::BdkDescriptor::new_bip49( + api_secret_key, + api_keychain_kind, + api_network, + ) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::descriptor::BdkDescriptor::new_bip49_public( + api_public_key, + api_fingerprint, + api_keychain_kind, + api_network, + ) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::descriptor::BdkDescriptor::new_bip84( + api_secret_key, + api_keychain_kind, + api_network, + ) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::descriptor::BdkDescriptor::new_bip84_public( + api_public_key, + api_fingerprint, + api_keychain_kind, + api_network, + ) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::descriptor::BdkDescriptor::new_bip86( + api_secret_key, + api_keychain_kind, + api_network, + ) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::descriptor::BdkDescriptor::new_bip86_public( + api_public_key, + api_fingerprint, + api_keychain_kind, + api_network, + ) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::key::BdkDerivationPath::from_string(api_path) + })()) + } + }, + ) +} +fn wire_bdk_descriptor_public_key_as_string_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_descriptor_public_key_as_string", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_that = that.cst_decode(); + move |context| { + transform_result_dco((move || { + Result::<_, ()>::Ok(crate::api::key::BdkDescriptorPublicKey::as_string( + &api_that, + )) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::key::BdkDescriptorPublicKey::derive(api_ptr, api_path) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::key::BdkDescriptorPublicKey::extend(api_ptr, api_path) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::key::BdkDescriptorPublicKey::from_string(api_public_key) + })()) + } + }, + ) +} +fn wire_bdk_descriptor_secret_key_as_public_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_descriptor_secret_key_as_public", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_ptr = ptr.cst_decode(); + move |context| { + transform_result_dco((move || { + crate::api::key::BdkDescriptorSecretKey::as_public(api_ptr) + })()) + } + }, + ) +} +fn wire_bdk_descriptor_secret_key_as_string_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_descriptor_secret_key_as_string", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_that = that.cst_decode(); + move |context| { + transform_result_dco((move || { + Result::<_, ()>::Ok(crate::api::key::BdkDescriptorSecretKey::as_string( + &api_that, + )) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::key::BdkDescriptorSecretKey::create( + api_network, + api_mnemonic, + api_password, + ) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::key::BdkDescriptorSecretKey::derive(api_ptr, api_path) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::key::BdkDescriptorSecretKey::extend(api_ptr, api_path) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::key::BdkDescriptorSecretKey::from_string(api_secret_key) + })()) + } + }, + ) +} +fn wire_bdk_descriptor_secret_key_secret_bytes_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_descriptor_secret_key_secret_bytes", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_that = that.cst_decode(); + move |context| { + transform_result_dco((move || { + crate::api::key::BdkDescriptorSecretKey::secret_bytes(&api_that) + })()) + } + }, + ) +} +fn wire_bdk_mnemonic_as_string_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_mnemonic_as_string", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_that = that.cst_decode(); + move |context| { + transform_result_dco((move || { + Result::<_, ()>::Ok(crate::api::key::BdkMnemonic::as_string(&api_that)) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::key::BdkMnemonic::from_entropy(api_entropy) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::key::BdkMnemonic::from_string(api_mnemonic) + })()) + } + }, + ) +} +fn wire_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((move || crate::api::key::BdkMnemonic::new(api_word_count))()) + } + }, + ) +} +fn wire_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((move || { + crate::api::psbt::BdkPsbt::combine(api_ptr, api_other) + })()) + } + }, + ) +} +fn wire_bdk_psbt_extract_tx_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_psbt_extract_tx", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_ptr = ptr.cst_decode(); + move |context| { + transform_result_dco((move || crate::api::psbt::BdkPsbt::extract_tx(api_ptr))()) + } + }, + ) +} +fn wire_bdk_psbt_fee_amount_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_psbt_fee_amount", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_that = that.cst_decode(); + move |context| { + transform_result_dco((move || { + Result::<_, ()>::Ok(crate::api::psbt::BdkPsbt::fee_amount(&api_that)) + })()) + } + }, + ) +} +fn wire_bdk_psbt_fee_rate_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_psbt_fee_rate", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_that = that.cst_decode(); + move |context| { + transform_result_dco((move || { + Result::<_, ()>::Ok(crate::api::psbt::BdkPsbt::fee_rate(&api_that)) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::psbt::BdkPsbt::from_str(api_psbt_base64) + })()) + } + }, + ) +} +fn wire_bdk_psbt_json_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_psbt_json_serialize", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_that = that.cst_decode(); + move |context| { + transform_result_dco((move || { + Result::<_, ()>::Ok(crate::api::psbt::BdkPsbt::json_serialize(&api_that)) + })()) + } + }, + ) +} +fn wire_bdk_psbt_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_psbt_serialize", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_that = that.cst_decode(); + move |context| { + transform_result_dco((move || { + Result::<_, ()>::Ok(crate::api::psbt::BdkPsbt::serialize(&api_that)) + })()) + } + }, + ) +} +fn wire_bdk_psbt_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_psbt_txid", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_that = that.cst_decode(); + move |context| { + transform_result_dco((move || { + Result::<_, ()>::Ok(crate::api::psbt::BdkPsbt::txid(&api_that)) + })()) + } + }, + ) +} +fn wire_bdk_address_as_string_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_address_as_string", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_that = that.cst_decode(); + move |context| { + transform_result_dco((move || { + Result::<_, ()>::Ok(crate::api::types::BdkAddress::as_string(&api_that)) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::types::BdkAddress::from_script(api_script, api_network) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::types::BdkAddress::from_string(api_address, api_network) + })()) + } + }, + ) +} +fn wire_bdk_address_is_valid_for_network_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode, + network: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_address_is_valid_for_network", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_that = that.cst_decode(); + let api_network = network.cst_decode(); + move |context| { + transform_result_dco((move || { + Result::<_, ()>::Ok(crate::api::types::BdkAddress::is_valid_for_network( + &api_that, + api_network, + )) + })()) + } + }, + ) +} +fn wire_bdk_address_network_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_address_network", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_that = that.cst_decode(); + move |context| { + transform_result_dco((move || { + Result::<_, ()>::Ok(crate::api::types::BdkAddress::network(&api_that)) + })()) + } + }, + ) +} +fn wire_bdk_address_payload_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_address_payload", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_that = that.cst_decode(); + move |context| { + transform_result_dco((move || { + Result::<_, ()>::Ok(crate::api::types::BdkAddress::payload(&api_that)) + })()) + } + }, + ) +} +fn wire_bdk_address_script_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_address_script", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_ptr = ptr.cst_decode(); + move |context| { + transform_result_dco((move || { + Result::<_, ()>::Ok(crate::api::types::BdkAddress::script(api_ptr)) + })()) + } + }, + ) +} +fn wire_bdk_address_to_qr_uri_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_address_to_qr_uri", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_that = that.cst_decode(); + move |context| { + transform_result_dco((move || { + Result::<_, ()>::Ok(crate::api::types::BdkAddress::to_qr_uri(&api_that)) + })()) + } + }, + ) +} +fn wire_bdk_script_buf_empty_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_script_buf_empty", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + move |context| { + transform_result_dco((move || { + Result::<_, ()>::Ok(crate::api::types::BdkScriptBuf::empty()) + })()) + } + }, + ) +} +fn wire_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((move || crate::api::types::BdkScriptBuf::from_hex(api_s))()) + } + }, + ) +} +fn wire_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 || { + Result::<_, ()>::Ok(crate::api::types::BdkScriptBuf::with_capacity( + api_capacity, + )) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::types::BdkTransaction::from_bytes(api_transaction_bytes) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::types::BdkTransaction::input(&api_that) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::types::BdkTransaction::is_coin_base(&api_that) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::types::BdkTransaction::is_explicitly_rbf(&api_that) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::types::BdkTransaction::is_lock_time_enabled(&api_that) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::types::BdkTransaction::lock_time(&api_that) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::types::BdkTransaction::new( + api_version, + api_lock_time, + api_input, + api_output, + ) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::types::BdkTransaction::output(&api_that) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::types::BdkTransaction::serialize(&api_that) + })()) + } + }, + ) +} +fn wire_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((move || crate::api::types::BdkTransaction::size(&api_that))()) + } + }, + ) +} +fn wire_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((move || crate::api::types::BdkTransaction::txid(&api_that))()) + } + }, + ) +} +fn wire_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((move || { + crate::api::types::BdkTransaction::version(&api_that) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::types::BdkTransaction::vsize(&api_that) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::types::BdkTransaction::weight(&api_that) + })()) + } + }, + ) +} +fn wire_bdk_wallet_get_address_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr: impl CstDecode, + address_index: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_wallet_get_address", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_ptr = ptr.cst_decode(); + let api_address_index = address_index.cst_decode(); + move |context| { + transform_result_dco((move || { + crate::api::wallet::BdkWallet::get_address(api_ptr, api_address_index) + })()) + } + }, + ) +} +fn wire_bdk_wallet_get_balance_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_wallet_get_balance", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_that = that.cst_decode(); + move |context| { + transform_result_dco((move || { + crate::api::wallet::BdkWallet::get_balance(&api_that) + })()) + } + }, + ) +} +fn wire_bdk_wallet_get_descriptor_for_keychain_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr: impl CstDecode, + keychain: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_wallet_get_descriptor_for_keychain", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_ptr = ptr.cst_decode(); + let api_keychain = keychain.cst_decode(); + move |context| { + transform_result_dco((move || { + crate::api::wallet::BdkWallet::get_descriptor_for_keychain( + api_ptr, + api_keychain, + ) + })()) + } + }, + ) +} +fn wire_bdk_wallet_get_internal_address_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr: impl CstDecode, + address_index: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_wallet_get_internal_address", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_ptr = ptr.cst_decode(); + let api_address_index = address_index.cst_decode(); + move |context| { + transform_result_dco((move || { + crate::api::wallet::BdkWallet::get_internal_address(api_ptr, api_address_index) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::wallet::BdkWallet::get_psbt_input( + &api_that, + api_utxo, + api_only_witness_utxo, + api_sighash_type, + ) + })()) + } + }, + ) +} +fn wire_bdk_wallet_is_mine_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode, + script: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_wallet_is_mine", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_that = that.cst_decode(); + let api_script = script.cst_decode(); + move |context| { + transform_result_dco((move || { + crate::api::wallet::BdkWallet::is_mine(&api_that, api_script) + })()) + } + }, + ) +} +fn wire_bdk_wallet_list_transactions_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode, + include_raw: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "bdk_wallet_list_transactions", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_that = that.cst_decode(); + let api_include_raw = include_raw.cst_decode(); + move |context| { + transform_result_dco((move || { + crate::api::wallet::BdkWallet::list_transactions(&api_that, api_include_raw) + })()) + } + }, + ) +} +fn wire_bdk_wallet_list_unspent_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_wallet_list_unspent", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_that = that.cst_decode(); + move |context| { + transform_result_dco((move || { + crate::api::wallet::BdkWallet::list_unspent(&api_that) + })()) + } + }, + ) +} +fn wire_bdk_wallet_network_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_wallet_network", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_that = that.cst_decode(); + move |context| { + transform_result_dco((move || { + Result::<_, ()>::Ok(crate::api::wallet::BdkWallet::network(&api_that)) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::wallet::BdkWallet::new( + api_descriptor, + api_change_descriptor, + api_network, + api_database_config, + ) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::wallet::BdkWallet::sign(api_ptr, api_psbt, api_sign_options) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::wallet::BdkWallet::sync(api_ptr, api_blockchain) + })()) + } + }, + ) +} +fn wire_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((move || { + crate::api::wallet::finish_bump_fee_tx_builder( + api_txid, + api_fee_rate, + api_allow_shrinking, + api_wallet, + api_enable_rbf, + api_n_sequence, + ) + })()) + } + }, + ) +} +fn wire_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>, + 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_data = data.cst_decode(); + move |context| { + transform_result_dco((move || { + 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_data, + ) + })()) + } + }, + ) +} + +// 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 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::Address(var_field0); + } + 3 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::Descriptor(var_field0); + } + 4 => { + let mut var_field0 = >::sse_decode(deserializer); + return crate::api::error::BdkError::InvalidU32Bytes(var_field0); + } + 5 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::Generic(var_field0); + } + 6 => { + return crate::api::error::BdkError::ScriptDoesntHaveAddressForm; + } + 7 => { + return crate::api::error::BdkError::NoRecipients; + } + 8 => { + return crate::api::error::BdkError::NoUtxosSelected; + } + 9 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::OutputBelowDustLimit(var_field0); + } + 10 => { + 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, + }; + } + 11 => { + return crate::api::error::BdkError::BnBTotalTriesExceeded; + } + 12 => { + return crate::api::error::BdkError::BnBNoExactMatch; + } + 13 => { + return crate::api::error::BdkError::UnknownUtxo; + } + 14 => { + return crate::api::error::BdkError::TransactionNotFound; + } + 15 => { + return crate::api::error::BdkError::TransactionConfirmed; + } + 16 => { + return crate::api::error::BdkError::IrreplaceableTransaction; + } + 17 => { + let mut var_needed = ::sse_decode(deserializer); + return crate::api::error::BdkError::FeeRateTooLow { needed: var_needed }; + } + 18 => { + let mut var_needed = ::sse_decode(deserializer); + return crate::api::error::BdkError::FeeTooLow { needed: var_needed }; + } + 19 => { + return crate::api::error::BdkError::FeeRateUnavailable; + } + 20 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::MissingKeyOrigin(var_field0); + } + 21 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::Key(var_field0); + } + 22 => { + return crate::api::error::BdkError::ChecksumMismatch; + } + 23 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::SpendingPolicyRequired(var_field0); + } + 24 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::InvalidPolicyPathError(var_field0); + } + 25 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::Signer(var_field0); + } + 26 => { + 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, + }; + } + 27 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::InvalidOutpoint(var_field0); + } + 28 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::Encode(var_field0); + } + 29 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::Miniscript(var_field0); + } + 30 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::MiniscriptPsbt(var_field0); + } + 31 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::Bip32(var_field0); + } + 32 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::Bip39(var_field0); + } + 33 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::Secp256k1(var_field0); + } + 34 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::Json(var_field0); + } + 35 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::Psbt(var_field0); + } + 36 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::PsbtParse(var_field0); + } + 37 => { + let mut var_field0 = ::sse_decode(deserializer); + let mut var_field1 = ::sse_decode(deserializer); + return crate::api::error::BdkError::MissingCachedScripts(var_field0, var_field1); + } + 38 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::Electrum(var_field0); + } + 39 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::Esplora(var_field0); + } + 40 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::Sled(var_field0); + } + 41 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::Rpc(var_field0); + } + 42 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::Rusqlite(var_field0); + } + 43 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::InvalidInput(var_field0); + } + 44 => { + let mut var_field0 = ::sse_decode(deserializer); + return crate::api::error::BdkError::InvalidLockTime(var_field0); + } + 45 => { + 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::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_inner = ::sse_decode(deserializer); + return crate::api::types::BdkTransaction { inner: var_inner }; + } +} + +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::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 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<(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::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 (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 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::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_multiSig = ::sse_decode(deserializer); + 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 { + multi_sig: var_multiSig, + 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(), + } + } +} +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() + } + } + } +} +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() + } + } + } +} +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::Address(field0) => { + [2.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::Descriptor(field0) => { + [3.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::InvalidU32Bytes(field0) => { + [4.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::Generic(field0) => { + [5.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::ScriptDoesntHaveAddressForm => [6.into_dart()].into_dart(), + crate::api::error::BdkError::NoRecipients => [7.into_dart()].into_dart(), + crate::api::error::BdkError::NoUtxosSelected => [8.into_dart()].into_dart(), + crate::api::error::BdkError::OutputBelowDustLimit(field0) => { + [9.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::InsufficientFunds { needed, available } => [ + 10.into_dart(), + needed.into_into_dart().into_dart(), + available.into_into_dart().into_dart(), + ] + .into_dart(), + crate::api::error::BdkError::BnBTotalTriesExceeded => [11.into_dart()].into_dart(), + crate::api::error::BdkError::BnBNoExactMatch => [12.into_dart()].into_dart(), + crate::api::error::BdkError::UnknownUtxo => [13.into_dart()].into_dart(), + crate::api::error::BdkError::TransactionNotFound => [14.into_dart()].into_dart(), + crate::api::error::BdkError::TransactionConfirmed => [15.into_dart()].into_dart(), + crate::api::error::BdkError::IrreplaceableTransaction => [16.into_dart()].into_dart(), + crate::api::error::BdkError::FeeRateTooLow { needed } => { + [17.into_dart(), needed.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::FeeTooLow { needed } => { + [18.into_dart(), needed.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::FeeRateUnavailable => [19.into_dart()].into_dart(), + crate::api::error::BdkError::MissingKeyOrigin(field0) => { + [20.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::Key(field0) => { + [21.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::ChecksumMismatch => [22.into_dart()].into_dart(), + crate::api::error::BdkError::SpendingPolicyRequired(field0) => { + [23.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::InvalidPolicyPathError(field0) => { + [24.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::Signer(field0) => { + [25.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::InvalidNetwork { requested, found } => [ + 26.into_dart(), + requested.into_into_dart().into_dart(), + found.into_into_dart().into_dart(), + ] + .into_dart(), + crate::api::error::BdkError::InvalidOutpoint(field0) => { + [27.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::Encode(field0) => { + [28.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::Miniscript(field0) => { + [29.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::MiniscriptPsbt(field0) => { + [30.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::Bip32(field0) => { + [31.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::Bip39(field0) => { + [32.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::Secp256k1(field0) => { + [33.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::Json(field0) => { + [34.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::Psbt(field0) => { + [35.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::PsbtParse(field0) => { + [36.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::MissingCachedScripts(field0, field1) => [ + 37.into_dart(), + field0.into_into_dart().into_dart(), + field1.into_into_dart().into_dart(), + ] + .into_dart(), + crate::api::error::BdkError::Electrum(field0) => { + [38.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::Esplora(field0) => { + [39.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::Sled(field0) => { + [40.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::Rpc(field0) => { + [41.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::Rusqlite(field0) => { + [42.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::InvalidInput(field0) => { + [43.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::InvalidLockTime(field0) => { + [44.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::error::BdkError::InvalidTransaction(field0) => { + [45.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + } + } +} +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::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.inner.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() + } + } + } +} +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(), + } + } +} +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::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() + } + } + } +} +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() + } + } + } +} +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() + } + } + } +} +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(), + } + } +} +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(), + } + } +} +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() + } + } + } +} +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(), + } + } +} +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(), + } + } +} +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::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() + } + } + } +} +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::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.multi_sig.into_into_dart().into_dart(), + 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(), + } + } +} +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(), + } + } +} +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(), + } + } +} +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 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); + } + } + } +} + +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); + } + } + } +} + +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); + } + } + } +} + +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::Address(field0) => { + ::sse_encode(2, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::Descriptor(field0) => { + ::sse_encode(3, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::InvalidU32Bytes(field0) => { + ::sse_encode(4, serializer); + >::sse_encode(field0, serializer); + } + crate::api::error::BdkError::Generic(field0) => { + ::sse_encode(5, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::ScriptDoesntHaveAddressForm => { + ::sse_encode(6, serializer); + } + crate::api::error::BdkError::NoRecipients => { + ::sse_encode(7, serializer); + } + crate::api::error::BdkError::NoUtxosSelected => { + ::sse_encode(8, serializer); + } + crate::api::error::BdkError::OutputBelowDustLimit(field0) => { + ::sse_encode(9, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::InsufficientFunds { needed, available } => { + ::sse_encode(10, serializer); + ::sse_encode(needed, serializer); + ::sse_encode(available, serializer); + } + crate::api::error::BdkError::BnBTotalTriesExceeded => { + ::sse_encode(11, serializer); + } + crate::api::error::BdkError::BnBNoExactMatch => { + ::sse_encode(12, serializer); + } + crate::api::error::BdkError::UnknownUtxo => { + ::sse_encode(13, serializer); + } + crate::api::error::BdkError::TransactionNotFound => { + ::sse_encode(14, serializer); + } + crate::api::error::BdkError::TransactionConfirmed => { + ::sse_encode(15, serializer); + } + crate::api::error::BdkError::IrreplaceableTransaction => { + ::sse_encode(16, serializer); + } + crate::api::error::BdkError::FeeRateTooLow { needed } => { + ::sse_encode(17, serializer); + ::sse_encode(needed, serializer); + } + crate::api::error::BdkError::FeeTooLow { needed } => { + ::sse_encode(18, serializer); + ::sse_encode(needed, serializer); + } + crate::api::error::BdkError::FeeRateUnavailable => { + ::sse_encode(19, serializer); + } + crate::api::error::BdkError::MissingKeyOrigin(field0) => { + ::sse_encode(20, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::Key(field0) => { + ::sse_encode(21, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::ChecksumMismatch => { + ::sse_encode(22, serializer); + } + crate::api::error::BdkError::SpendingPolicyRequired(field0) => { + ::sse_encode(23, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::InvalidPolicyPathError(field0) => { + ::sse_encode(24, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::Signer(field0) => { + ::sse_encode(25, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::InvalidNetwork { requested, found } => { + ::sse_encode(26, serializer); + ::sse_encode(requested, serializer); + ::sse_encode(found, serializer); + } + crate::api::error::BdkError::InvalidOutpoint(field0) => { + ::sse_encode(27, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::Encode(field0) => { + ::sse_encode(28, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::Miniscript(field0) => { + ::sse_encode(29, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::MiniscriptPsbt(field0) => { + ::sse_encode(30, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::Bip32(field0) => { + ::sse_encode(31, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::Bip39(field0) => { + ::sse_encode(32, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::Secp256k1(field0) => { + ::sse_encode(33, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::Json(field0) => { + ::sse_encode(34, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::Psbt(field0) => { + ::sse_encode(35, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::PsbtParse(field0) => { + ::sse_encode(36, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::MissingCachedScripts(field0, field1) => { + ::sse_encode(37, serializer); + ::sse_encode(field0, serializer); + ::sse_encode(field1, serializer); + } + crate::api::error::BdkError::Electrum(field0) => { + ::sse_encode(38, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::Esplora(field0) => { + ::sse_encode(39, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::Sled(field0) => { + ::sse_encode(40, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::Rpc(field0) => { + ::sse_encode(41, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::Rusqlite(field0) => { + ::sse_encode(42, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::InvalidInput(field0) => { + ::sse_encode(43, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::InvalidLockTime(field0) => { + ::sse_encode(44, serializer); + ::sse_encode(field0, serializer); + } + crate::api::error::BdkError::InvalidTransaction(field0) => { + ::sse_encode(45, serializer); + ::sse_encode(field0, serializer); + } + } + } +} + +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::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.inner, 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); + } + } + } +} + +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::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); + } + } + } +} + +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); + } + } + } +} + +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); + } + } + } +} + +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); + } + } + } +} + +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 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); + } + } + } +} + +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<(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); + } + } + } +} + +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); + } + } + } +} + +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 (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 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::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.multi_sig, serializer); + ::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::*; + +/// cbindgen:ignore +#[cfg(target_family = "wasm")] +#[path = "frb_generated.web.rs"] +mod web; +#[cfg(target_family = "wasm")] +pub use web::*; diff --git a/rust/src/frb_generated.web.rs b/rust/src/frb_generated.web.rs new file mode 100644 index 00000000..464492b5 --- /dev/null +++ b/rust/src/frb_generated.web.rs @@ -0,0 +1,2241 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31. + +// Section: imports + +use super::*; +use crate::api::blockchain::*; +use crate::api::descriptor::*; +use crate::api::key::*; +use crate::api::psbt::*; +use crate::api::types::*; +use crate::api::wallet::*; +use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt}; +use flutter_rust_bridge::for_generated::transform_result_dco; +use flutter_rust_bridge::for_generated::wasm_bindgen; +use flutter_rust_bridge::for_generated::wasm_bindgen::prelude::*; +use flutter_rust_bridge::{Handler, IntoIntoDart}; + +// Section: boilerplate + +flutter_rust_bridge::frb_generated_boilerplate_web!(); + +// Section: dart2rust + +impl CstDecode for String { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> String { + self + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::error::AddressError { + let self_ = self.unchecked_into::(); + match self_.get(0).unchecked_into_f64() as _ { + 0 => crate::api::error::AddressError::Base58(self_.get(1).cst_decode()), + 1 => crate::api::error::AddressError::Bech32(self_.get(1).cst_decode()), + 2 => crate::api::error::AddressError::EmptyBech32Payload, + 3 => crate::api::error::AddressError::InvalidBech32Variant { + expected: self_.get(1).cst_decode(), + found: self_.get(2).cst_decode(), + }, + 4 => crate::api::error::AddressError::InvalidWitnessVersion(self_.get(1).cst_decode()), + 5 => { + crate::api::error::AddressError::UnparsableWitnessVersion(self_.get(1).cst_decode()) + } + 6 => crate::api::error::AddressError::MalformedWitnessVersion, + 7 => crate::api::error::AddressError::InvalidWitnessProgramLength( + self_.get(1).cst_decode(), + ), + 8 => crate::api::error::AddressError::InvalidSegwitV0ProgramLength( + self_.get(1).cst_decode(), + ), + 9 => crate::api::error::AddressError::UncompressedPubkey, + 10 => crate::api::error::AddressError::ExcessiveScriptSize, + 11 => crate::api::error::AddressError::UnrecognizedScript, + 12 => crate::api::error::AddressError::UnknownAddressType(self_.get(1).cst_decode()), + 13 => crate::api::error::AddressError::NetworkValidation { + network_required: self_.get(1).cst_decode(), + network_found: self_.get(2).cst_decode(), + address: self_.get(3).cst_decode(), + }, + _ => unreachable!(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::AddressIndex { + let self_ = self.unchecked_into::(); + match self_.get(0).unchecked_into_f64() as _ { + 0 => crate::api::types::AddressIndex::Increase, + 1 => crate::api::types::AddressIndex::LastUnused, + 2 => crate::api::types::AddressIndex::Peek { + index: self_.get(1).cst_decode(), + }, + 3 => crate::api::types::AddressIndex::Reset { + index: self_.get(1).cst_decode(), + }, + _ => unreachable!(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::blockchain::Auth { + let self_ = self.unchecked_into::(); + match self_.get(0).unchecked_into_f64() as _ { + 0 => crate::api::blockchain::Auth::None, + 1 => crate::api::blockchain::Auth::UserPass { + username: self_.get(1).cst_decode(), + password: self_.get(2).cst_decode(), + }, + 2 => crate::api::blockchain::Auth::Cookie { + file: self_.get(1).cst_decode(), + }, + _ => unreachable!(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::Balance { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 6, + "Expected 6 elements, got {}", + self_.length() + ); + crate::api::types::Balance { + immature: self_.get(0).cst_decode(), + trusted_pending: self_.get(1).cst_decode(), + untrusted_pending: self_.get(2).cst_decode(), + confirmed: self_.get(3).cst_decode(), + spendable: self_.get(4).cst_decode(), + total: self_.get(5).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::BdkAddress { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::api::types::BdkAddress { + ptr: self_.get(0).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::blockchain::BdkBlockchain { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::api::blockchain::BdkBlockchain { + ptr: self_.get(0).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::key::BdkDerivationPath { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::api::key::BdkDerivationPath { + ptr: self_.get(0).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::descriptor::BdkDescriptor { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 2, + "Expected 2 elements, got {}", + self_.length() + ); + crate::api::descriptor::BdkDescriptor { + extended_descriptor: self_.get(0).cst_decode(), + key_map: self_.get(1).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::key::BdkDescriptorPublicKey { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::api::key::BdkDescriptorPublicKey { + ptr: self_.get(0).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::key::BdkDescriptorSecretKey { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::api::key::BdkDescriptorSecretKey { + ptr: self_.get(0).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::error::BdkError { + let self_ = self.unchecked_into::(); + match self_.get(0).unchecked_into_f64() as _ { + 0 => crate::api::error::BdkError::Hex(self_.get(1).cst_decode()), + 1 => crate::api::error::BdkError::Consensus(self_.get(1).cst_decode()), + 2 => crate::api::error::BdkError::Address(self_.get(1).cst_decode()), + 3 => crate::api::error::BdkError::Descriptor(self_.get(1).cst_decode()), + 4 => crate::api::error::BdkError::InvalidU32Bytes(self_.get(1).cst_decode()), + 5 => crate::api::error::BdkError::Generic(self_.get(1).cst_decode()), + 6 => crate::api::error::BdkError::ScriptDoesntHaveAddressForm, + 7 => crate::api::error::BdkError::NoRecipients, + 8 => crate::api::error::BdkError::NoUtxosSelected, + 9 => crate::api::error::BdkError::OutputBelowDustLimit(self_.get(1).cst_decode()), + 10 => crate::api::error::BdkError::InsufficientFunds { + needed: self_.get(1).cst_decode(), + available: self_.get(2).cst_decode(), + }, + 11 => crate::api::error::BdkError::BnBTotalTriesExceeded, + 12 => crate::api::error::BdkError::BnBNoExactMatch, + 13 => crate::api::error::BdkError::UnknownUtxo, + 14 => crate::api::error::BdkError::TransactionNotFound, + 15 => crate::api::error::BdkError::TransactionConfirmed, + 16 => crate::api::error::BdkError::IrreplaceableTransaction, + 17 => crate::api::error::BdkError::FeeRateTooLow { + needed: self_.get(1).cst_decode(), + }, + 18 => crate::api::error::BdkError::FeeTooLow { + needed: self_.get(1).cst_decode(), + }, + 19 => crate::api::error::BdkError::FeeRateUnavailable, + 20 => crate::api::error::BdkError::MissingKeyOrigin(self_.get(1).cst_decode()), + 21 => crate::api::error::BdkError::Key(self_.get(1).cst_decode()), + 22 => crate::api::error::BdkError::ChecksumMismatch, + 23 => crate::api::error::BdkError::SpendingPolicyRequired(self_.get(1).cst_decode()), + 24 => crate::api::error::BdkError::InvalidPolicyPathError(self_.get(1).cst_decode()), + 25 => crate::api::error::BdkError::Signer(self_.get(1).cst_decode()), + 26 => crate::api::error::BdkError::InvalidNetwork { + requested: self_.get(1).cst_decode(), + found: self_.get(2).cst_decode(), + }, + 27 => crate::api::error::BdkError::InvalidOutpoint(self_.get(1).cst_decode()), + 28 => crate::api::error::BdkError::Encode(self_.get(1).cst_decode()), + 29 => crate::api::error::BdkError::Miniscript(self_.get(1).cst_decode()), + 30 => crate::api::error::BdkError::MiniscriptPsbt(self_.get(1).cst_decode()), + 31 => crate::api::error::BdkError::Bip32(self_.get(1).cst_decode()), + 32 => crate::api::error::BdkError::Bip39(self_.get(1).cst_decode()), + 33 => crate::api::error::BdkError::Secp256k1(self_.get(1).cst_decode()), + 34 => crate::api::error::BdkError::Json(self_.get(1).cst_decode()), + 35 => crate::api::error::BdkError::Psbt(self_.get(1).cst_decode()), + 36 => crate::api::error::BdkError::PsbtParse(self_.get(1).cst_decode()), + 37 => crate::api::error::BdkError::MissingCachedScripts( + self_.get(1).cst_decode(), + self_.get(2).cst_decode(), + ), + 38 => crate::api::error::BdkError::Electrum(self_.get(1).cst_decode()), + 39 => crate::api::error::BdkError::Esplora(self_.get(1).cst_decode()), + 40 => crate::api::error::BdkError::Sled(self_.get(1).cst_decode()), + 41 => crate::api::error::BdkError::Rpc(self_.get(1).cst_decode()), + 42 => crate::api::error::BdkError::Rusqlite(self_.get(1).cst_decode()), + 43 => crate::api::error::BdkError::InvalidInput(self_.get(1).cst_decode()), + 44 => crate::api::error::BdkError::InvalidLockTime(self_.get(1).cst_decode()), + 45 => crate::api::error::BdkError::InvalidTransaction(self_.get(1).cst_decode()), + _ => unreachable!(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::key::BdkMnemonic { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::api::key::BdkMnemonic { + ptr: self_.get(0).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::psbt::BdkPsbt { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::api::psbt::BdkPsbt { + ptr: self_.get(0).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::BdkScriptBuf { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::api::types::BdkScriptBuf { + bytes: self_.get(0).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::BdkTransaction { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::api::types::BdkTransaction { + inner: self_.get(0).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::wallet::BdkWallet { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::api::wallet::BdkWallet { + ptr: self_.get(0).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::BlockTime { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 2, + "Expected 2 elements, got {}", + self_.length() + ); + crate::api::types::BlockTime { + height: self_.get(0).cst_decode(), + timestamp: self_.get(1).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::blockchain::BlockchainConfig { + let self_ = self.unchecked_into::(); + match self_.get(0).unchecked_into_f64() as _ { + 0 => crate::api::blockchain::BlockchainConfig::Electrum { + config: self_.get(1).cst_decode(), + }, + 1 => crate::api::blockchain::BlockchainConfig::Esplora { + config: self_.get(1).cst_decode(), + }, + 2 => crate::api::blockchain::BlockchainConfig::Rpc { + config: self_.get(1).cst_decode(), + }, + _ => unreachable!(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::error::ConsensusError { + let self_ = self.unchecked_into::(); + match self_.get(0).unchecked_into_f64() as _ { + 0 => crate::api::error::ConsensusError::Io(self_.get(1).cst_decode()), + 1 => crate::api::error::ConsensusError::OversizedVectorAllocation { + requested: self_.get(1).cst_decode(), + max: self_.get(2).cst_decode(), + }, + 2 => crate::api::error::ConsensusError::InvalidChecksum { + expected: self_.get(1).cst_decode(), + actual: self_.get(2).cst_decode(), + }, + 3 => crate::api::error::ConsensusError::NonMinimalVarInt, + 4 => crate::api::error::ConsensusError::ParseFailed(self_.get(1).cst_decode()), + 5 => { + crate::api::error::ConsensusError::UnsupportedSegwitFlag(self_.get(1).cst_decode()) + } + _ => unreachable!(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::DatabaseConfig { + let self_ = self.unchecked_into::(); + match self_.get(0).unchecked_into_f64() as _ { + 0 => crate::api::types::DatabaseConfig::Memory, + 1 => crate::api::types::DatabaseConfig::Sqlite { + config: self_.get(1).cst_decode(), + }, + 2 => crate::api::types::DatabaseConfig::Sled { + config: self_.get(1).cst_decode(), + }, + _ => unreachable!(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::error::DescriptorError { + let self_ = self.unchecked_into::(); + match self_.get(0).unchecked_into_f64() as _ { + 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 => crate::api::error::DescriptorError::Key(self_.get(1).cst_decode()), + 5 => crate::api::error::DescriptorError::Policy(self_.get(1).cst_decode()), + 6 => crate::api::error::DescriptorError::InvalidDescriptorCharacter( + self_.get(1).cst_decode(), + ), + 7 => crate::api::error::DescriptorError::Bip32(self_.get(1).cst_decode()), + 8 => crate::api::error::DescriptorError::Base58(self_.get(1).cst_decode()), + 9 => crate::api::error::DescriptorError::Pk(self_.get(1).cst_decode()), + 10 => crate::api::error::DescriptorError::Miniscript(self_.get(1).cst_decode()), + 11 => crate::api::error::DescriptorError::Hex(self_.get(1).cst_decode()), + _ => unreachable!(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::blockchain::ElectrumConfig { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 6, + "Expected 6 elements, got {}", + self_.length() + ); + crate::api::blockchain::ElectrumConfig { + url: self_.get(0).cst_decode(), + socks5: self_.get(1).cst_decode(), + retry: self_.get(2).cst_decode(), + timeout: self_.get(3).cst_decode(), + stop_gap: self_.get(4).cst_decode(), + validate_domain: self_.get(5).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::blockchain::EsploraConfig { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 5, + "Expected 5 elements, got {}", + self_.length() + ); + crate::api::blockchain::EsploraConfig { + base_url: self_.get(0).cst_decode(), + proxy: self_.get(1).cst_decode(), + concurrency: self_.get(2).cst_decode(), + stop_gap: self_.get(3).cst_decode(), + timeout: self_.get(4).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::FeeRate { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::api::types::FeeRate { + sat_per_vb: self_.get(0).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::error::HexError { + let self_ = self.unchecked_into::(); + match self_.get(0).unchecked_into_f64() as _ { + 0 => crate::api::error::HexError::InvalidChar(self_.get(1).cst_decode()), + 1 => crate::api::error::HexError::OddLengthString(self_.get(1).cst_decode()), + 2 => crate::api::error::HexError::InvalidLength( + self_.get(1).cst_decode(), + self_.get(2).cst_decode(), + ), + _ => unreachable!(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::Input { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::api::types::Input { + s: self_.get(0).cst_decode(), + } + } +} +impl CstDecode>> for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec> { + self.dyn_into::() + .unwrap() + .iter() + .map(CstDecode::cst_decode) + .collect() + } +} +impl CstDecode> + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + self.dyn_into::() + .unwrap() + .iter() + .map(CstDecode::cst_decode) + .collect() + } +} +impl CstDecode> + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + self.dyn_into::() + .unwrap() + .iter() + .map(CstDecode::cst_decode) + .collect() + } +} +impl CstDecode> for Box<[u8]> { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + self.into_vec() + } +} +impl CstDecode> + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + self.dyn_into::() + .unwrap() + .iter() + .map(CstDecode::cst_decode) + .collect() + } +} +impl CstDecode> + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + self.dyn_into::() + .unwrap() + .iter() + .map(CstDecode::cst_decode) + .collect() + } +} +impl CstDecode> + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + self.dyn_into::() + .unwrap() + .iter() + .map(CstDecode::cst_decode) + .collect() + } +} +impl CstDecode> + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + self.dyn_into::() + .unwrap() + .iter() + .map(CstDecode::cst_decode) + .collect() + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::LocalUtxo { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 4, + "Expected 4 elements, got {}", + self_.length() + ); + crate::api::types::LocalUtxo { + outpoint: self_.get(0).cst_decode(), + txout: self_.get(1).cst_decode(), + keychain: self_.get(2).cst_decode(), + is_spent: self_.get(3).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::LockTime { + let self_ = self.unchecked_into::(); + match self_.get(0).unchecked_into_f64() as _ { + 0 => crate::api::types::LockTime::Blocks(self_.get(1).cst_decode()), + 1 => crate::api::types::LockTime::Seconds(self_.get(1).cst_decode()), + _ => unreachable!(), + } + } +} +impl CstDecode> for Option { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Option { + self.map(CstDecode::cst_decode) + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::OutPoint { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 2, + "Expected 2 elements, got {}", + self_.length() + ); + crate::api::types::OutPoint { + txid: self_.get(0).cst_decode(), + vout: self_.get(1).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::Payload { + let self_ = self.unchecked_into::(); + match self_.get(0).unchecked_into_f64() as _ { + 0 => crate::api::types::Payload::PubkeyHash { + pubkey_hash: self_.get(1).cst_decode(), + }, + 1 => crate::api::types::Payload::ScriptHash { + script_hash: self_.get(1).cst_decode(), + }, + 2 => crate::api::types::Payload::WitnessProgram { + version: self_.get(1).cst_decode(), + program: self_.get(2).cst_decode(), + }, + _ => unreachable!(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::PsbtSigHashType { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::api::types::PsbtSigHashType { + inner: self_.get(0).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::RbfValue { + let self_ = self.unchecked_into::(); + match self_.get(0).unchecked_into_f64() as _ { + 0 => crate::api::types::RbfValue::RbfDefault, + 1 => crate::api::types::RbfValue::Value(self_.get(1).cst_decode()), + _ => unreachable!(), + } + } +} +impl CstDecode<(crate::api::types::BdkAddress, u32)> + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> (crate::api::types::BdkAddress, u32) { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 2, + "Expected 2 elements, got {}", + self_.length() + ); + (self_.get(0).cst_decode(), self_.get(1).cst_decode()) + } +} +impl + CstDecode<( + crate::api::psbt::BdkPsbt, + crate::api::types::TransactionDetails, + )> for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode( + self, + ) -> ( + crate::api::psbt::BdkPsbt, + crate::api::types::TransactionDetails, + ) { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 2, + "Expected 2 elements, got {}", + self_.length() + ); + (self_.get(0).cst_decode(), self_.get(1).cst_decode()) + } +} +impl CstDecode<(crate::api::types::OutPoint, crate::api::types::Input, usize)> + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // 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 self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 3, + "Expected 3 elements, got {}", + self_.length() + ); + ( + self_.get(0).cst_decode(), + self_.get(1).cst_decode(), + self_.get(2).cst_decode(), + ) + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::blockchain::RpcConfig { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 5, + "Expected 5 elements, got {}", + self_.length() + ); + crate::api::blockchain::RpcConfig { + url: self_.get(0).cst_decode(), + auth: self_.get(1).cst_decode(), + network: self_.get(2).cst_decode(), + wallet_name: self_.get(3).cst_decode(), + sync_params: self_.get(4).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::blockchain::RpcSyncParams { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 4, + "Expected 4 elements, got {}", + self_.length() + ); + crate::api::blockchain::RpcSyncParams { + start_script_count: self_.get(0).cst_decode(), + start_time: self_.get(1).cst_decode(), + force_start_time: self_.get(2).cst_decode(), + poll_rate_sec: self_.get(3).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::ScriptAmount { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 2, + "Expected 2 elements, got {}", + self_.length() + ); + crate::api::types::ScriptAmount { + script: self_.get(0).cst_decode(), + amount: self_.get(1).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::SignOptions { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 8, + "Expected 8 elements, got {}", + self_.length() + ); + crate::api::types::SignOptions { + multi_sig: self_.get(0).cst_decode(), + trust_witness_utxo: self_.get(1).cst_decode(), + assume_height: self_.get(2).cst_decode(), + allow_all_sighashes: self_.get(3).cst_decode(), + remove_partial_sigs: self_.get(4).cst_decode(), + try_finalize: self_.get(5).cst_decode(), + sign_with_tap_internal_key: self_.get(6).cst_decode(), + allow_grinding: self_.get(7).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::SledDbConfiguration { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 2, + "Expected 2 elements, got {}", + self_.length() + ); + crate::api::types::SledDbConfiguration { + path: self_.get(0).cst_decode(), + tree_name: self_.get(1).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::SqliteDbConfiguration { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::api::types::SqliteDbConfiguration { + path: self_.get(0).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::TransactionDetails { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 6, + "Expected 6 elements, got {}", + self_.length() + ); + crate::api::types::TransactionDetails { + transaction: self_.get(0).cst_decode(), + txid: self_.get(1).cst_decode(), + received: self_.get(2).cst_decode(), + sent: self_.get(3).cst_decode(), + fee: self_.get(4).cst_decode(), + confirmation_time: self_.get(5).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::TxIn { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 4, + "Expected 4 elements, got {}", + self_.length() + ); + crate::api::types::TxIn { + previous_output: self_.get(0).cst_decode(), + script_sig: self_.get(1).cst_decode(), + sequence: self_.get(2).cst_decode(), + witness: self_.get(3).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::TxOut { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 2, + "Expected 2 elements, got {}", + self_.length() + ); + crate::api::types::TxOut { + value: self_.get(0).cst_decode(), + script_pubkey: self_.get(1).cst_decode(), + } + } +} +impl CstDecode<[u8; 4]> for Box<[u8]> { + // 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 CstDecode> + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> RustOpaqueNom { + #[cfg(target_pointer_width = "64")] + { + compile_error!("64-bit pointers are not supported."); + } + unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } + } +} +impl CstDecode> + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> RustOpaqueNom { + #[cfg(target_pointer_width = "64")] + { + compile_error!("64-bit pointers are not supported."); + } + unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } + } +} +impl CstDecode>> + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> RustOpaqueNom> { + #[cfg(target_pointer_width = "64")] + { + compile_error!("64-bit pointers are not supported."); + } + unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } + } +} +impl CstDecode>>> + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> RustOpaqueNom>> { + #[cfg(target_pointer_width = "64")] + { + compile_error!("64-bit pointers are not supported."); + } + unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } + } +} +impl CstDecode> + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> RustOpaqueNom { + #[cfg(target_pointer_width = "64")] + { + compile_error!("64-bit pointers are not supported."); + } + unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } + } +} +impl CstDecode> + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> RustOpaqueNom { + #[cfg(target_pointer_width = "64")] + { + compile_error!("64-bit pointers are not supported."); + } + unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } + } +} +impl CstDecode> + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> RustOpaqueNom { + #[cfg(target_pointer_width = "64")] + { + compile_error!("64-bit pointers are not supported."); + } + unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } + } +} +impl CstDecode> + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> RustOpaqueNom { + #[cfg(target_pointer_width = "64")] + { + compile_error!("64-bit pointers are not supported."); + } + unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } + } +} +impl CstDecode> + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> RustOpaqueNom { + #[cfg(target_pointer_width = "64")] + { + compile_error!("64-bit pointers are not supported."); + } + unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } + } +} +impl CstDecode> + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> RustOpaqueNom { + #[cfg(target_pointer_width = "64")] + { + compile_error!("64-bit pointers are not supported."); + } + unsafe { decode_rust_opaque_nom((self.as_f64().unwrap() as usize) as _) } + } +} +impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> String { + self.as_string().expect("non-UTF-8 string, or not a string") + } +} +impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> bool { + self.is_truthy() + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::ChangeSpendPolicy { + (self.unchecked_into_f64() as i32).cst_decode() + } +} +impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> f32 { + self.unchecked_into_f64() as _ + } +} +impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> i32 { + self.unchecked_into_f64() as _ + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::KeychainKind { + (self.unchecked_into_f64() as i32).cst_decode() + } +} +impl CstDecode> for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + self.unchecked_into::() + .to_vec() + .into() + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::Network { + (self.unchecked_into_f64() as i32).cst_decode() + } +} +impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> u32 { + self.unchecked_into_f64() as _ + } +} +impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> u64 { + ::std::convert::TryInto::try_into( + self.dyn_into::() + .unwrap(), + ) + .unwrap() + } +} +impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> u8 { + self.unchecked_into_f64() as _ + } +} +impl CstDecode<[u8; 4]> for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { + // 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 CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> usize { + self.unchecked_into_f64() as _ + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::Variant { + (self.unchecked_into_f64() as i32).cst_decode() + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::WitnessVersion { + (self.unchecked_into_f64() as i32).cst_decode() + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::WordCount { + (self.unchecked_into_f64() as i32).cst_decode() + } +} + +#[wasm_bindgen] +pub fn wire_bdk_blockchain_broadcast( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + transaction: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_blockchain_broadcast_impl(port_, that, transaction) +} + +#[wasm_bindgen] +pub fn wire_bdk_blockchain_estimate_fee( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + target: u64, +) { + wire_bdk_blockchain_estimate_fee_impl(port_, that, target) +} + +#[wasm_bindgen] +pub fn wire_bdk_blockchain_get_block_hash( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + height: u32, +) { + wire_bdk_blockchain_get_block_hash_impl(port_, that, height) +} + +#[wasm_bindgen] +pub fn wire_bdk_blockchain_get_height( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_blockchain_get_height_impl(port_, that) +} + +#[wasm_bindgen] +pub fn wire_bdk_blockchain_new( + port_: flutter_rust_bridge::for_generated::MessagePort, + blockchain_config: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_blockchain_new_impl(port_, blockchain_config) +} + +#[wasm_bindgen] +pub fn wire_bdk_descriptor_as_string( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_descriptor_as_string_impl(port_, that) +} + +#[wasm_bindgen] +pub fn wire_bdk_descriptor_as_string_private( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_descriptor_as_string_private_impl(port_, that) +} + +#[wasm_bindgen] +pub fn wire_bdk_descriptor_max_satisfaction_weight( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_descriptor_max_satisfaction_weight_impl(port_, that) +} + +#[wasm_bindgen] +pub fn wire_bdk_descriptor_new( + port_: flutter_rust_bridge::for_generated::MessagePort, + descriptor: String, + network: i32, +) { + wire_bdk_descriptor_new_impl(port_, descriptor, network) +} + +#[wasm_bindgen] +pub fn wire_bdk_descriptor_new_bip44( + port_: flutter_rust_bridge::for_generated::MessagePort, + secret_key: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + keychain_kind: i32, + network: i32, +) { + wire_bdk_descriptor_new_bip44_impl(port_, secret_key, keychain_kind, network) +} + +#[wasm_bindgen] +pub fn wire_bdk_descriptor_new_bip44_public( + port_: flutter_rust_bridge::for_generated::MessagePort, + public_key: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + fingerprint: String, + keychain_kind: i32, + network: i32, +) { + wire_bdk_descriptor_new_bip44_public_impl( + port_, + public_key, + fingerprint, + keychain_kind, + network, + ) +} + +#[wasm_bindgen] +pub fn wire_bdk_descriptor_new_bip49( + port_: flutter_rust_bridge::for_generated::MessagePort, + secret_key: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + keychain_kind: i32, + network: i32, +) { + wire_bdk_descriptor_new_bip49_impl(port_, secret_key, keychain_kind, network) +} + +#[wasm_bindgen] +pub fn wire_bdk_descriptor_new_bip49_public( + port_: flutter_rust_bridge::for_generated::MessagePort, + public_key: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + fingerprint: String, + keychain_kind: i32, + network: i32, +) { + wire_bdk_descriptor_new_bip49_public_impl( + port_, + public_key, + fingerprint, + keychain_kind, + network, + ) +} + +#[wasm_bindgen] +pub fn wire_bdk_descriptor_new_bip84( + port_: flutter_rust_bridge::for_generated::MessagePort, + secret_key: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + keychain_kind: i32, + network: i32, +) { + wire_bdk_descriptor_new_bip84_impl(port_, secret_key, keychain_kind, network) +} + +#[wasm_bindgen] +pub fn wire_bdk_descriptor_new_bip84_public( + port_: flutter_rust_bridge::for_generated::MessagePort, + public_key: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + fingerprint: String, + keychain_kind: i32, + network: i32, +) { + wire_bdk_descriptor_new_bip84_public_impl( + port_, + public_key, + fingerprint, + keychain_kind, + network, + ) +} + +#[wasm_bindgen] +pub fn wire_bdk_descriptor_new_bip86( + port_: flutter_rust_bridge::for_generated::MessagePort, + secret_key: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + keychain_kind: i32, + network: i32, +) { + wire_bdk_descriptor_new_bip86_impl(port_, secret_key, keychain_kind, network) +} + +#[wasm_bindgen] +pub fn wire_bdk_descriptor_new_bip86_public( + port_: flutter_rust_bridge::for_generated::MessagePort, + public_key: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + fingerprint: String, + keychain_kind: i32, + network: i32, +) { + wire_bdk_descriptor_new_bip86_public_impl( + port_, + public_key, + fingerprint, + keychain_kind, + network, + ) +} + +#[wasm_bindgen] +pub fn wire_bdk_derivation_path_from_string( + port_: flutter_rust_bridge::for_generated::MessagePort, + path: String, +) { + wire_bdk_derivation_path_from_string_impl(port_, path) +} + +#[wasm_bindgen] +pub fn wire_bdk_descriptor_public_key_as_string( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_descriptor_public_key_as_string_impl(port_, that) +} + +#[wasm_bindgen] +pub fn wire_bdk_descriptor_public_key_derive( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + path: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_descriptor_public_key_derive_impl(port_, ptr, path) +} + +#[wasm_bindgen] +pub fn wire_bdk_descriptor_public_key_extend( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + path: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_descriptor_public_key_extend_impl(port_, ptr, path) +} + +#[wasm_bindgen] +pub fn wire_bdk_descriptor_public_key_from_string( + port_: flutter_rust_bridge::for_generated::MessagePort, + public_key: String, +) { + wire_bdk_descriptor_public_key_from_string_impl(port_, public_key) +} + +#[wasm_bindgen] +pub fn wire_bdk_descriptor_secret_key_as_public( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_descriptor_secret_key_as_public_impl(port_, ptr) +} + +#[wasm_bindgen] +pub fn wire_bdk_descriptor_secret_key_as_string( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_descriptor_secret_key_as_string_impl(port_, that) +} + +#[wasm_bindgen] +pub fn wire_bdk_descriptor_secret_key_create( + port_: flutter_rust_bridge::for_generated::MessagePort, + network: i32, + mnemonic: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + password: Option, +) { + wire_bdk_descriptor_secret_key_create_impl(port_, network, mnemonic, password) +} + +#[wasm_bindgen] +pub fn wire_bdk_descriptor_secret_key_derive( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + path: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_descriptor_secret_key_derive_impl(port_, ptr, path) +} + +#[wasm_bindgen] +pub fn wire_bdk_descriptor_secret_key_extend( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + path: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_descriptor_secret_key_extend_impl(port_, ptr, path) +} + +#[wasm_bindgen] +pub fn wire_bdk_descriptor_secret_key_from_string( + port_: flutter_rust_bridge::for_generated::MessagePort, + secret_key: String, +) { + wire_bdk_descriptor_secret_key_from_string_impl(port_, secret_key) +} + +#[wasm_bindgen] +pub fn wire_bdk_descriptor_secret_key_secret_bytes( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_descriptor_secret_key_secret_bytes_impl(port_, that) +} + +#[wasm_bindgen] +pub fn wire_bdk_mnemonic_as_string( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_mnemonic_as_string_impl(port_, that) +} + +#[wasm_bindgen] +pub fn wire_bdk_mnemonic_from_entropy( + port_: flutter_rust_bridge::for_generated::MessagePort, + entropy: Box<[u8]>, +) { + wire_bdk_mnemonic_from_entropy_impl(port_, entropy) +} + +#[wasm_bindgen] +pub fn wire_bdk_mnemonic_from_string( + port_: flutter_rust_bridge::for_generated::MessagePort, + mnemonic: String, +) { + wire_bdk_mnemonic_from_string_impl(port_, mnemonic) +} + +#[wasm_bindgen] +pub fn wire_bdk_mnemonic_new( + port_: flutter_rust_bridge::for_generated::MessagePort, + word_count: i32, +) { + wire_bdk_mnemonic_new_impl(port_, word_count) +} + +#[wasm_bindgen] +pub fn wire_bdk_psbt_combine( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + other: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_psbt_combine_impl(port_, ptr, other) +} + +#[wasm_bindgen] +pub fn wire_bdk_psbt_extract_tx( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_psbt_extract_tx_impl(port_, ptr) +} + +#[wasm_bindgen] +pub fn wire_bdk_psbt_fee_amount( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_psbt_fee_amount_impl(port_, that) +} + +#[wasm_bindgen] +pub fn wire_bdk_psbt_fee_rate( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_psbt_fee_rate_impl(port_, that) +} + +#[wasm_bindgen] +pub fn wire_bdk_psbt_from_str( + port_: flutter_rust_bridge::for_generated::MessagePort, + psbt_base64: String, +) { + wire_bdk_psbt_from_str_impl(port_, psbt_base64) +} + +#[wasm_bindgen] +pub fn wire_bdk_psbt_json_serialize( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_psbt_json_serialize_impl(port_, that) +} + +#[wasm_bindgen] +pub fn wire_bdk_psbt_serialize( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_psbt_serialize_impl(port_, that) +} + +#[wasm_bindgen] +pub fn wire_bdk_psbt_txid( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_psbt_txid_impl(port_, that) +} + +#[wasm_bindgen] +pub fn wire_bdk_address_as_string( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_address_as_string_impl(port_, that) +} + +#[wasm_bindgen] +pub fn wire_bdk_address_from_script( + port_: flutter_rust_bridge::for_generated::MessagePort, + script: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + network: i32, +) { + wire_bdk_address_from_script_impl(port_, script, network) +} + +#[wasm_bindgen] +pub fn wire_bdk_address_from_string( + port_: flutter_rust_bridge::for_generated::MessagePort, + address: String, + network: i32, +) { + wire_bdk_address_from_string_impl(port_, address, network) +} + +#[wasm_bindgen] +pub fn wire_bdk_address_is_valid_for_network( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + network: i32, +) { + wire_bdk_address_is_valid_for_network_impl(port_, that, network) +} + +#[wasm_bindgen] +pub fn wire_bdk_address_network( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_address_network_impl(port_, that) +} + +#[wasm_bindgen] +pub fn wire_bdk_address_payload( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_address_payload_impl(port_, that) +} + +#[wasm_bindgen] +pub fn wire_bdk_address_script( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_address_script_impl(port_, ptr) +} + +#[wasm_bindgen] +pub fn wire_bdk_address_to_qr_uri( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_address_to_qr_uri_impl(port_, that) +} + +#[wasm_bindgen] +pub fn wire_bdk_script_buf_empty(port_: flutter_rust_bridge::for_generated::MessagePort) { + wire_bdk_script_buf_empty_impl(port_) +} + +#[wasm_bindgen] +pub fn wire_bdk_script_buf_from_hex( + port_: flutter_rust_bridge::for_generated::MessagePort, + s: String, +) { + wire_bdk_script_buf_from_hex_impl(port_, s) +} + +#[wasm_bindgen] +pub fn wire_bdk_script_buf_with_capacity( + port_: flutter_rust_bridge::for_generated::MessagePort, + capacity: usize, +) { + wire_bdk_script_buf_with_capacity_impl(port_, capacity) +} + +#[wasm_bindgen] +pub fn wire_bdk_transaction_from_bytes( + port_: flutter_rust_bridge::for_generated::MessagePort, + transaction_bytes: Box<[u8]>, +) { + wire_bdk_transaction_from_bytes_impl(port_, transaction_bytes) +} + +#[wasm_bindgen] +pub fn wire_bdk_transaction_input( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_transaction_input_impl(port_, that) +} + +#[wasm_bindgen] +pub fn wire_bdk_transaction_is_coin_base( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_transaction_is_coin_base_impl(port_, that) +} + +#[wasm_bindgen] +pub fn wire_bdk_transaction_is_explicitly_rbf( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_transaction_is_explicitly_rbf_impl(port_, that) +} + +#[wasm_bindgen] +pub fn wire_bdk_transaction_is_lock_time_enabled( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_transaction_is_lock_time_enabled_impl(port_, that) +} + +#[wasm_bindgen] +pub fn wire_bdk_transaction_lock_time( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_transaction_lock_time_impl(port_, that) +} + +#[wasm_bindgen] +pub fn wire_bdk_transaction_new( + port_: flutter_rust_bridge::for_generated::MessagePort, + version: i32, + lock_time: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + input: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + output: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_transaction_new_impl(port_, version, lock_time, input, output) +} + +#[wasm_bindgen] +pub fn wire_bdk_transaction_output( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_transaction_output_impl(port_, that) +} + +#[wasm_bindgen] +pub fn wire_bdk_transaction_serialize( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_transaction_serialize_impl(port_, that) +} + +#[wasm_bindgen] +pub fn wire_bdk_transaction_size( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_transaction_size_impl(port_, that) +} + +#[wasm_bindgen] +pub fn wire_bdk_transaction_txid( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_transaction_txid_impl(port_, that) +} + +#[wasm_bindgen] +pub fn wire_bdk_transaction_version( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_transaction_version_impl(port_, that) +} + +#[wasm_bindgen] +pub fn wire_bdk_transaction_vsize( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_transaction_vsize_impl(port_, that) +} + +#[wasm_bindgen] +pub fn wire_bdk_transaction_weight( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_transaction_weight_impl(port_, that) +} + +#[wasm_bindgen] +pub fn wire_bdk_wallet_get_address( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + address_index: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_wallet_get_address_impl(port_, ptr, address_index) +} + +#[wasm_bindgen] +pub fn wire_bdk_wallet_get_balance( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_wallet_get_balance_impl(port_, that) +} + +#[wasm_bindgen] +pub fn wire_bdk_wallet_get_descriptor_for_keychain( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + keychain: i32, +) { + wire_bdk_wallet_get_descriptor_for_keychain_impl(port_, ptr, keychain) +} + +#[wasm_bindgen] +pub fn wire_bdk_wallet_get_internal_address( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + address_index: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_wallet_get_internal_address_impl(port_, ptr, address_index) +} + +#[wasm_bindgen] +pub fn wire_bdk_wallet_get_psbt_input( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + utxo: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + only_witness_utxo: bool, + sighash_type: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_wallet_get_psbt_input_impl(port_, that, utxo, only_witness_utxo, sighash_type) +} + +#[wasm_bindgen] +pub fn wire_bdk_wallet_is_mine( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + script: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_wallet_is_mine_impl(port_, that, script) +} + +#[wasm_bindgen] +pub fn wire_bdk_wallet_list_transactions( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + include_raw: bool, +) { + wire_bdk_wallet_list_transactions_impl(port_, that, include_raw) +} + +#[wasm_bindgen] +pub fn wire_bdk_wallet_list_unspent( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_wallet_list_unspent_impl(port_, that) +} + +#[wasm_bindgen] +pub fn wire_bdk_wallet_network( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_wallet_network_impl(port_, that) +} + +#[wasm_bindgen] +pub fn wire_bdk_wallet_new( + port_: flutter_rust_bridge::for_generated::MessagePort, + descriptor: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + change_descriptor: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + network: i32, + database_config: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_wallet_new_impl( + port_, + descriptor, + change_descriptor, + network, + database_config, + ) +} + +#[wasm_bindgen] +pub fn wire_bdk_wallet_sign( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + psbt: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + sign_options: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_wallet_sign_impl(port_, ptr, psbt, sign_options) +} + +#[wasm_bindgen] +pub fn wire_bdk_wallet_sync( + port_: flutter_rust_bridge::for_generated::MessagePort, + ptr: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + blockchain: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_bdk_wallet_sync_impl(port_, ptr, blockchain) +} + +#[wasm_bindgen] +pub fn wire_finish_bump_fee_tx_builder( + port_: flutter_rust_bridge::for_generated::MessagePort, + txid: String, + fee_rate: f32, + allow_shrinking: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + wallet: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + enable_rbf: bool, + n_sequence: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_finish_bump_fee_tx_builder_impl( + port_, + txid, + fee_rate, + allow_shrinking, + wallet, + enable_rbf, + n_sequence, + ) +} + +#[wasm_bindgen] +pub fn wire_tx_builder_finish( + port_: flutter_rust_bridge::for_generated::MessagePort, + wallet: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + recipients: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + utxos: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + foreign_utxo: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + un_spendable: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + change_policy: i32, + manually_selected_only: bool, + fee_rate: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + fee_absolute: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + drain_wallet: bool, + drain_to: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + rbf: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, + data: Box<[u8]>, +) { + wire_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, + data, + ) +} + +#[wasm_bindgen] +pub fn rust_arc_increment_strong_count_RustOpaque_AnyBlockchain(ptr: *const std::ffi::c_void) { + unsafe { + StdArc::::increment_strong_count(ptr as _); + } +} + +#[wasm_bindgen] +pub fn rust_arc_decrement_strong_count_RustOpaque_AnyBlockchain(ptr: *const std::ffi::c_void) { + unsafe { + StdArc::::decrement_strong_count(ptr as _); + } +} + +#[wasm_bindgen] +pub fn rust_arc_increment_strong_count_RustOpaque_ExtendedDescriptor(ptr: *const std::ffi::c_void) { + unsafe { + StdArc::::increment_strong_count(ptr as _); + } +} + +#[wasm_bindgen] +pub fn rust_arc_decrement_strong_count_RustOpaque_ExtendedDescriptor(ptr: *const std::ffi::c_void) { + unsafe { + StdArc::::decrement_strong_count(ptr as _); + } +} + +#[wasm_bindgen] +pub fn rust_arc_increment_strong_count_RustOpaque_MutexPartiallySignedTransaction( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::>::increment_strong_count(ptr as _); + } +} + +#[wasm_bindgen] +pub fn rust_arc_decrement_strong_count_RustOpaque_MutexPartiallySignedTransaction( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::>::decrement_strong_count(ptr as _); + } +} + +#[wasm_bindgen] +pub fn rust_arc_increment_strong_count_RustOpaque_MutexbdkWalletAnyDatabase( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::>>::increment_strong_count(ptr as _); + } +} + +#[wasm_bindgen] +pub fn rust_arc_decrement_strong_count_RustOpaque_MutexbdkWalletAnyDatabase( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::>>::decrement_strong_count(ptr as _); + } +} + +#[wasm_bindgen] +pub fn rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddress(ptr: *const std::ffi::c_void) { + unsafe { + StdArc::::increment_strong_count(ptr as _); + } +} + +#[wasm_bindgen] +pub fn rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress(ptr: *const std::ffi::c_void) { + unsafe { + StdArc::::decrement_strong_count(ptr as _); + } +} + +#[wasm_bindgen] +pub fn rust_arc_increment_strong_count_RustOpaque_bitcoinbip32DerivationPath( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::::increment_strong_count(ptr as _); + } +} + +#[wasm_bindgen] +pub fn rust_arc_decrement_strong_count_RustOpaque_bitcoinbip32DerivationPath( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::::decrement_strong_count(ptr as _); + } +} + +#[wasm_bindgen] +pub fn rust_arc_increment_strong_count_RustOpaque_keysDescriptorPublicKey( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::::increment_strong_count(ptr as _); + } +} + +#[wasm_bindgen] +pub fn rust_arc_decrement_strong_count_RustOpaque_keysDescriptorPublicKey( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::::decrement_strong_count(ptr as _); + } +} + +#[wasm_bindgen] +pub fn rust_arc_increment_strong_count_RustOpaque_keysDescriptorSecretKey( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::::increment_strong_count(ptr as _); + } +} + +#[wasm_bindgen] +pub fn rust_arc_decrement_strong_count_RustOpaque_keysDescriptorSecretKey( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::::decrement_strong_count(ptr as _); + } +} + +#[wasm_bindgen] +pub fn rust_arc_increment_strong_count_RustOpaque_keysKeyMap(ptr: *const std::ffi::c_void) { + unsafe { + StdArc::::increment_strong_count(ptr as _); + } +} + +#[wasm_bindgen] +pub fn rust_arc_decrement_strong_count_RustOpaque_keysKeyMap(ptr: *const std::ffi::c_void) { + unsafe { + StdArc::::decrement_strong_count(ptr as _); + } +} + +#[wasm_bindgen] +pub fn rust_arc_increment_strong_count_RustOpaque_keysbip39Mnemonic(ptr: *const std::ffi::c_void) { + unsafe { + StdArc::::increment_strong_count(ptr as _); + } +} + +#[wasm_bindgen] +pub fn rust_arc_decrement_strong_count_RustOpaque_keysbip39Mnemonic(ptr: *const std::ffi::c_void) { + unsafe { + StdArc::::decrement_strong_count(ptr as _); + } +} 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..82fe0832 --- /dev/null +++ b/test/bdk_flutter_test.dart @@ -0,0 +1,348 @@ +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 = + await mockWallet.getAddress(addressIndex: AddressIndex.increase()); + expect(res, isA()); + }); + + test('Should return valid Balance object', () async { + final res = await mockWallet.getBalance(); + expect(res, isA()); + }); + test('Should return Network enum', () async { + final res = await mockWallet.network(); + expect(res, isA()); + }); + test('Should return list of LocalUtxo object', () async { + final res = await 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) async => List.empty()); + final res = await mockWallet.listTransactions(includeRaw: true); + expect(res, isA>()); + expect(res, List.empty()); + }); + test('verify function call order', () async { + await mockWallet.sync(blockchain: mockBlockchain); + await mockWallet.listTransactions(includeRaw: true); + verifyInOrder([ + await mockWallet.sync(blockchain: mockBlockchain), + await mockWallet.listTransactions(includeRaw: true) + ]); + }); + }); + group('DescriptorSecret', () { + final mockSDescriptorSecret = MockDescriptorSecretKey(); + + test('verify asPublic()', () async { + final res = await mockSDescriptorSecret.asPublic(); + 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((_) async => Future.value(mockScript)); + when(mockTxBuilder.addRecipient(mockScript, any)) + .thenReturn(mockTxBuilder); + when(mockTxBuilder.addForeignUtxo(input, outPoint, 0)) + .thenReturn(mockTxBuilder); + when(mockTxBuilder.finish(mockWallet)).thenAnswer((_) async => + Future.value( + (MockPartiallySignedTransaction(), MockTransactionDetails()))); + final script = await mockAddress.scriptPubkey(); + final txBuilder = mockTxBuilder + .addRecipient(script, 1200) + .addForeignUtxo(input, outPoint, 0); + 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((_) async => MockScriptBuf()); + when(mockTxBuilder.addRecipient(mockScript, any)) + .thenReturn(mockTxBuilder); + + when(mockAddress.scriptPubkey()) + .thenAnswer((_) async => Future.value(mockScript)); + when(mockTxBuilder.finish(mockWallet)).thenAnswer( + (_) async => Future.value((psbt, MockTransactionDetails()))); + final script = await mockAddress.scriptPubkey(); + final txBuilder = mockTxBuilder.addRecipient(script, 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()', () async { + final res = await mockAddress.network(); + expect(res, isA()); + }); + test('verify payload()', () async { + final res = await mockAddress.network(); + expect(res, isA()); + }); + test('verify scriptPubKey()', () async { + final res = await mockAddress.scriptPubkey(); + expect(res, isA()); + }); + }); + group('Script', () { + test('verify create', () async { + 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..c7704028 --- /dev/null +++ b/test/bdk_flutter_test.mocks.dart @@ -0,0 +1,2190 @@ +// 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 _i9; +import 'dart:typed_data' as _i11; + +import 'package:bdk_flutter/src/generated/api/blockchain.dart' as _i5; +import 'package:bdk_flutter/src/generated/api/descriptor.dart' as _i6; +import 'package:bdk_flutter/src/generated/api/key.dart' as _i8; +import 'package:bdk_flutter/src/generated/api/psbt.dart' as _i7; +import 'package:bdk_flutter/src/generated/api/types.dart' as _i4; +import 'package:bdk_flutter/src/generated/api/wallet.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 _i10; + +// 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 _FakeMutexBdkWalletAnyDatabase_0 extends _i1.SmartFake + implements _i2.MutexBdkWalletAnyDatabase { + _FakeMutexBdkWalletAnyDatabase_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 _i5.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 _FakeKeysDescriptorSecretKey_7 extends _i1.SmartFake + implements _i6.KeysDescriptorSecretKey { + _FakeKeysDescriptorSecretKey_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 _FakeKeysDescriptorPublicKey_10 extends _i1.SmartFake + implements _i6.KeysDescriptorPublicKey { + _FakeKeysDescriptorPublicKey_10( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeMutexPartiallySignedTransaction_11 extends _i1.SmartFake + implements _i7.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 _i4.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 _FakeBdkBitcoinAddress_17 extends _i1.SmartFake + implements _i4.BdkBitcoinAddress { + _FakeBdkBitcoinAddress_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 _FakeBitcoinBip32DerivationPath_19 extends _i1.SmartFake + implements _i8.BitcoinBip32DerivationPath { + _FakeBitcoinBip32DerivationPath_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.MutexBdkWalletAnyDatabase get ptr => (super.noSuchMethod( + Invocation.getter(#ptr), + returnValue: _FakeMutexBdkWalletAnyDatabase_0( + this, + Invocation.getter(#ptr), + ), + returnValueForMissingStub: _FakeMutexBdkWalletAnyDatabase_0( + this, + Invocation.getter(#ptr), + ), + ) as _i2.MutexBdkWalletAnyDatabase); + + @override + _i9.Future<_i3.AddressInfo> getAddress({ + required _i4.AddressIndex? addressIndex, + dynamic hint, + }) => + (super.noSuchMethod( + Invocation.method( + #getAddress, + [], + { + #addressIndex: addressIndex, + #hint: hint, + }, + ), + returnValue: _i9.Future<_i3.AddressInfo>.value(_FakeAddressInfo_1( + this, + Invocation.method( + #getAddress, + [], + { + #addressIndex: addressIndex, + #hint: hint, + }, + ), + )), + returnValueForMissingStub: + _i9.Future<_i3.AddressInfo>.value(_FakeAddressInfo_1( + this, + Invocation.method( + #getAddress, + [], + { + #addressIndex: addressIndex, + #hint: hint, + }, + ), + )), + ) as _i9.Future<_i3.AddressInfo>); + + @override + _i9.Future<_i4.Balance> getBalance({dynamic hint}) => (super.noSuchMethod( + Invocation.method( + #getBalance, + [], + {#hint: hint}, + ), + returnValue: _i9.Future<_i4.Balance>.value(_FakeBalance_2( + this, + Invocation.method( + #getBalance, + [], + {#hint: hint}, + ), + )), + returnValueForMissingStub: _i9.Future<_i4.Balance>.value(_FakeBalance_2( + this, + Invocation.method( + #getBalance, + [], + {#hint: hint}, + ), + )), + ) as _i9.Future<_i4.Balance>); + + @override + _i9.Future<_i3.Descriptor> getDescriptorForKeychain({ + required _i4.KeychainKind? keychain, + dynamic hint, + }) => + (super.noSuchMethod( + Invocation.method( + #getDescriptorForKeychain, + [], + { + #keychain: keychain, + #hint: hint, + }, + ), + returnValue: _i9.Future<_i3.Descriptor>.value(_FakeDescriptor_3( + this, + Invocation.method( + #getDescriptorForKeychain, + [], + { + #keychain: keychain, + #hint: hint, + }, + ), + )), + returnValueForMissingStub: + _i9.Future<_i3.Descriptor>.value(_FakeDescriptor_3( + this, + Invocation.method( + #getDescriptorForKeychain, + [], + { + #keychain: keychain, + #hint: hint, + }, + ), + )), + ) as _i9.Future<_i3.Descriptor>); + + @override + _i9.Future<_i3.AddressInfo> getInternalAddress({ + required _i4.AddressIndex? addressIndex, + dynamic hint, + }) => + (super.noSuchMethod( + Invocation.method( + #getInternalAddress, + [], + { + #addressIndex: addressIndex, + #hint: hint, + }, + ), + returnValue: _i9.Future<_i3.AddressInfo>.value(_FakeAddressInfo_1( + this, + Invocation.method( + #getInternalAddress, + [], + { + #addressIndex: addressIndex, + #hint: hint, + }, + ), + )), + returnValueForMissingStub: + _i9.Future<_i3.AddressInfo>.value(_FakeAddressInfo_1( + this, + Invocation.method( + #getInternalAddress, + [], + { + #addressIndex: addressIndex, + #hint: hint, + }, + ), + )), + ) as _i9.Future<_i3.AddressInfo>); + + @override + _i9.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: _i9.Future<_i4.Input>.value(_FakeInput_4( + this, + Invocation.method( + #getPsbtInput, + [], + { + #utxo: utxo, + #onlyWitnessUtxo: onlyWitnessUtxo, + #sighashType: sighashType, + #hint: hint, + }, + ), + )), + returnValueForMissingStub: _i9.Future<_i4.Input>.value(_FakeInput_4( + this, + Invocation.method( + #getPsbtInput, + [], + { + #utxo: utxo, + #onlyWitnessUtxo: onlyWitnessUtxo, + #sighashType: sighashType, + #hint: hint, + }, + ), + )), + ) as _i9.Future<_i4.Input>); + + @override + _i9.Future isMine({ + required _i4.BdkScriptBuf? script, + dynamic hint, + }) => + (super.noSuchMethod( + Invocation.method( + #isMine, + [], + { + #script: script, + #hint: hint, + }, + ), + returnValue: _i9.Future.value(false), + returnValueForMissingStub: _i9.Future.value(false), + ) as _i9.Future); + + @override + _i9.Future> listTransactions({ + required bool? includeRaw, + dynamic hint, + }) => + (super.noSuchMethod( + Invocation.method( + #listTransactions, + [], + { + #includeRaw: includeRaw, + #hint: hint, + }, + ), + returnValue: _i9.Future>.value( + <_i4.TransactionDetails>[]), + returnValueForMissingStub: + _i9.Future>.value( + <_i4.TransactionDetails>[]), + ) as _i9.Future>); + + @override + _i9.Future> listUnspent({dynamic hint}) => + (super.noSuchMethod( + Invocation.method( + #listUnspent, + [], + {#hint: hint}, + ), + returnValue: _i9.Future>.value(<_i4.LocalUtxo>[]), + returnValueForMissingStub: + _i9.Future>.value(<_i4.LocalUtxo>[]), + ) as _i9.Future>); + + @override + _i9.Future<_i4.Network> network({dynamic hint}) => (super.noSuchMethod( + Invocation.method( + #network, + [], + {#hint: hint}, + ), + returnValue: _i9.Future<_i4.Network>.value(_i4.Network.testnet), + returnValueForMissingStub: + _i9.Future<_i4.Network>.value(_i4.Network.testnet), + ) as _i9.Future<_i4.Network>); + + @override + _i9.Future sign({ + required _i3.PartiallySignedTransaction? psbt, + _i4.SignOptions? signOptions, + dynamic hint, + }) => + (super.noSuchMethod( + Invocation.method( + #sign, + [], + { + #psbt: psbt, + #signOptions: signOptions, + #hint: hint, + }, + ), + returnValue: _i9.Future.value(false), + returnValueForMissingStub: _i9.Future.value(false), + ) as _i9.Future); + + @override + _i9.Future sync({ + required _i3.Blockchain? blockchain, + dynamic hint, + }) => + (super.noSuchMethod( + Invocation.method( + #sync, + [], + { + #blockchain: blockchain, + #hint: hint, + }, + ), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); +} + +/// 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 inner => (super.noSuchMethod( + Invocation.getter(#inner), + returnValue: _i10.dummyValue( + this, + Invocation.getter(#inner), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.getter(#inner), + ), + ) as String); + + @override + _i9.Future> input({dynamic hint}) => (super.noSuchMethod( + Invocation.method( + #input, + [], + {#hint: hint}, + ), + returnValue: _i9.Future>.value(<_i4.TxIn>[]), + returnValueForMissingStub: + _i9.Future>.value(<_i4.TxIn>[]), + ) as _i9.Future>); + + @override + _i9.Future isCoinBase({dynamic hint}) => (super.noSuchMethod( + Invocation.method( + #isCoinBase, + [], + {#hint: hint}, + ), + returnValue: _i9.Future.value(false), + returnValueForMissingStub: _i9.Future.value(false), + ) as _i9.Future); + + @override + _i9.Future isExplicitlyRbf({dynamic hint}) => (super.noSuchMethod( + Invocation.method( + #isExplicitlyRbf, + [], + {#hint: hint}, + ), + returnValue: _i9.Future.value(false), + returnValueForMissingStub: _i9.Future.value(false), + ) as _i9.Future); + + @override + _i9.Future isLockTimeEnabled({dynamic hint}) => (super.noSuchMethod( + Invocation.method( + #isLockTimeEnabled, + [], + {#hint: hint}, + ), + returnValue: _i9.Future.value(false), + returnValueForMissingStub: _i9.Future.value(false), + ) as _i9.Future); + + @override + _i9.Future<_i4.LockTime> lockTime({dynamic hint}) => (super.noSuchMethod( + Invocation.method( + #lockTime, + [], + {#hint: hint}, + ), + returnValue: + _i9.Future<_i4.LockTime>.value(_i10.dummyValue<_i4.LockTime>( + this, + Invocation.method( + #lockTime, + [], + {#hint: hint}, + ), + )), + returnValueForMissingStub: + _i9.Future<_i4.LockTime>.value(_i10.dummyValue<_i4.LockTime>( + this, + Invocation.method( + #lockTime, + [], + {#hint: hint}, + ), + )), + ) as _i9.Future<_i4.LockTime>); + + @override + _i9.Future> output({dynamic hint}) => (super.noSuchMethod( + Invocation.method( + #output, + [], + {#hint: hint}, + ), + returnValue: _i9.Future>.value(<_i4.TxOut>[]), + returnValueForMissingStub: + _i9.Future>.value(<_i4.TxOut>[]), + ) as _i9.Future>); + + @override + _i9.Future<_i11.Uint8List> serialize({dynamic hint}) => (super.noSuchMethod( + Invocation.method( + #serialize, + [], + {#hint: hint}, + ), + returnValue: _i9.Future<_i11.Uint8List>.value(_i11.Uint8List(0)), + returnValueForMissingStub: + _i9.Future<_i11.Uint8List>.value(_i11.Uint8List(0)), + ) as _i9.Future<_i11.Uint8List>); + + @override + _i9.Future size({dynamic hint}) => (super.noSuchMethod( + Invocation.method( + #size, + [], + {#hint: hint}, + ), + returnValue: _i9.Future.value(0), + returnValueForMissingStub: _i9.Future.value(0), + ) as _i9.Future); + + @override + _i9.Future txid({dynamic hint}) => (super.noSuchMethod( + Invocation.method( + #txid, + [], + {#hint: hint}, + ), + returnValue: _i9.Future.value(_i10.dummyValue( + this, + Invocation.method( + #txid, + [], + {#hint: hint}, + ), + )), + returnValueForMissingStub: + _i9.Future.value(_i10.dummyValue( + this, + Invocation.method( + #txid, + [], + {#hint: hint}, + ), + )), + ) as _i9.Future); + + @override + _i9.Future version({dynamic hint}) => (super.noSuchMethod( + Invocation.method( + #version, + [], + {#hint: hint}, + ), + returnValue: _i9.Future.value(0), + returnValueForMissingStub: _i9.Future.value(0), + ) as _i9.Future); + + @override + _i9.Future vsize({dynamic hint}) => (super.noSuchMethod( + Invocation.method( + #vsize, + [], + {#hint: hint}, + ), + returnValue: _i9.Future.value(0), + returnValueForMissingStub: _i9.Future.value(0), + ) as _i9.Future); + + @override + _i9.Future weight({dynamic hint}) => (super.noSuchMethod( + Invocation.method( + #weight, + [], + {#hint: hint}, + ), + returnValue: _i9.Future.value(0), + returnValueForMissingStub: _i9.Future.value(0), + ) as _i9.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 + _i5.AnyBlockchain get ptr => (super.noSuchMethod( + Invocation.getter(#ptr), + returnValue: _FakeAnyBlockchain_5( + this, + Invocation.getter(#ptr), + ), + returnValueForMissingStub: _FakeAnyBlockchain_5( + this, + Invocation.getter(#ptr), + ), + ) as _i5.AnyBlockchain); + + @override + _i9.Future<_i4.FeeRate> estimateFee({ + required int? target, + dynamic hint, + }) => + (super.noSuchMethod( + Invocation.method( + #estimateFee, + [], + { + #target: target, + #hint: hint, + }, + ), + returnValue: _i9.Future<_i4.FeeRate>.value(_FakeFeeRate_6( + this, + Invocation.method( + #estimateFee, + [], + { + #target: target, + #hint: hint, + }, + ), + )), + returnValueForMissingStub: _i9.Future<_i4.FeeRate>.value(_FakeFeeRate_6( + this, + Invocation.method( + #estimateFee, + [], + { + #target: target, + #hint: hint, + }, + ), + )), + ) as _i9.Future<_i4.FeeRate>); + + @override + _i9.Future broadcast({ + required _i4.BdkTransaction? transaction, + dynamic hint, + }) => + (super.noSuchMethod( + Invocation.method( + #broadcast, + [], + { + #transaction: transaction, + #hint: hint, + }, + ), + returnValue: _i9.Future.value(_i10.dummyValue( + this, + Invocation.method( + #broadcast, + [], + { + #transaction: transaction, + #hint: hint, + }, + ), + )), + returnValueForMissingStub: + _i9.Future.value(_i10.dummyValue( + this, + Invocation.method( + #broadcast, + [], + { + #transaction: transaction, + #hint: hint, + }, + ), + )), + ) as _i9.Future); + + @override + _i9.Future getBlockHash({ + required int? height, + dynamic hint, + }) => + (super.noSuchMethod( + Invocation.method( + #getBlockHash, + [], + { + #height: height, + #hint: hint, + }, + ), + returnValue: _i9.Future.value(_i10.dummyValue( + this, + Invocation.method( + #getBlockHash, + [], + { + #height: height, + #hint: hint, + }, + ), + )), + returnValueForMissingStub: + _i9.Future.value(_i10.dummyValue( + this, + Invocation.method( + #getBlockHash, + [], + { + #height: height, + #hint: hint, + }, + ), + )), + ) as _i9.Future); + + @override + _i9.Future getHeight({dynamic hint}) => (super.noSuchMethod( + Invocation.method( + #getHeight, + [], + {#hint: hint}, + ), + returnValue: _i9.Future.value(0), + returnValueForMissingStub: _i9.Future.value(0), + ) as _i9.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 + _i6.KeysDescriptorSecretKey get ptr => (super.noSuchMethod( + Invocation.getter(#ptr), + returnValue: _FakeKeysDescriptorSecretKey_7( + this, + Invocation.getter(#ptr), + ), + returnValueForMissingStub: _FakeKeysDescriptorSecretKey_7( + this, + Invocation.getter(#ptr), + ), + ) as _i6.KeysDescriptorSecretKey); + + @override + _i9.Future<_i3.DescriptorSecretKey> derive(_i8.BdkDerivationPath? path) => + (super.noSuchMethod( + Invocation.method( + #derive, + [path], + ), + returnValue: _i9.Future<_i3.DescriptorSecretKey>.value( + _FakeDescriptorSecretKey_8( + this, + Invocation.method( + #derive, + [path], + ), + )), + returnValueForMissingStub: _i9.Future<_i3.DescriptorSecretKey>.value( + _FakeDescriptorSecretKey_8( + this, + Invocation.method( + #derive, + [path], + ), + )), + ) as _i9.Future<_i3.DescriptorSecretKey>); + + @override + _i9.Future<_i3.DescriptorSecretKey> extend(_i8.BdkDerivationPath? path) => + (super.noSuchMethod( + Invocation.method( + #extend, + [path], + ), + returnValue: _i9.Future<_i3.DescriptorSecretKey>.value( + _FakeDescriptorSecretKey_8( + this, + Invocation.method( + #extend, + [path], + ), + )), + returnValueForMissingStub: _i9.Future<_i3.DescriptorSecretKey>.value( + _FakeDescriptorSecretKey_8( + this, + Invocation.method( + #extend, + [path], + ), + )), + ) as _i9.Future<_i3.DescriptorSecretKey>); + + @override + _i9.Future<_i3.DescriptorPublicKey> asPublic() => (super.noSuchMethod( + Invocation.method( + #asPublic, + [], + ), + returnValue: _i9.Future<_i3.DescriptorPublicKey>.value( + _FakeDescriptorPublicKey_9( + this, + Invocation.method( + #asPublic, + [], + ), + )), + returnValueForMissingStub: _i9.Future<_i3.DescriptorPublicKey>.value( + _FakeDescriptorPublicKey_9( + this, + Invocation.method( + #asPublic, + [], + ), + )), + ) as _i9.Future<_i3.DescriptorPublicKey>); + + @override + _i9.Future asString({dynamic hint}) => (super.noSuchMethod( + Invocation.method( + #asString, + [], + {#hint: hint}, + ), + returnValue: _i9.Future.value(_i10.dummyValue( + this, + Invocation.method( + #asString, + [], + {#hint: hint}, + ), + )), + returnValueForMissingStub: + _i9.Future.value(_i10.dummyValue( + this, + Invocation.method( + #asString, + [], + {#hint: hint}, + ), + )), + ) as _i9.Future); + + @override + _i9.Future<_i11.Uint8List> secretBytes({dynamic hint}) => (super.noSuchMethod( + Invocation.method( + #secretBytes, + [], + {#hint: hint}, + ), + returnValue: _i9.Future<_i11.Uint8List>.value(_i11.Uint8List(0)), + returnValueForMissingStub: + _i9.Future<_i11.Uint8List>.value(_i11.Uint8List(0)), + ) as _i9.Future<_i11.Uint8List>); +} + +/// 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 + _i6.KeysDescriptorPublicKey get ptr => (super.noSuchMethod( + Invocation.getter(#ptr), + returnValue: _FakeKeysDescriptorPublicKey_10( + this, + Invocation.getter(#ptr), + ), + returnValueForMissingStub: _FakeKeysDescriptorPublicKey_10( + this, + Invocation.getter(#ptr), + ), + ) as _i6.KeysDescriptorPublicKey); + + @override + _i9.Future asString({dynamic hint}) => (super.noSuchMethod( + Invocation.method( + #asString, + [], + {#hint: hint}, + ), + returnValue: _i9.Future.value(_i10.dummyValue( + this, + Invocation.method( + #asString, + [], + {#hint: hint}, + ), + )), + returnValueForMissingStub: + _i9.Future.value(_i10.dummyValue( + this, + Invocation.method( + #asString, + [], + {#hint: hint}, + ), + )), + ) as _i9.Future); + + @override + _i9.Future<_i3.DescriptorPublicKey> derive({ + required _i8.BdkDerivationPath? path, + dynamic hint, + }) => + (super.noSuchMethod( + Invocation.method( + #derive, + [], + { + #path: path, + #hint: hint, + }, + ), + returnValue: _i9.Future<_i3.DescriptorPublicKey>.value( + _FakeDescriptorPublicKey_9( + this, + Invocation.method( + #derive, + [], + { + #path: path, + #hint: hint, + }, + ), + )), + returnValueForMissingStub: _i9.Future<_i3.DescriptorPublicKey>.value( + _FakeDescriptorPublicKey_9( + this, + Invocation.method( + #derive, + [], + { + #path: path, + #hint: hint, + }, + ), + )), + ) as _i9.Future<_i3.DescriptorPublicKey>); + + @override + _i9.Future<_i3.DescriptorPublicKey> extend({ + required _i8.BdkDerivationPath? path, + dynamic hint, + }) => + (super.noSuchMethod( + Invocation.method( + #extend, + [], + { + #path: path, + #hint: hint, + }, + ), + returnValue: _i9.Future<_i3.DescriptorPublicKey>.value( + _FakeDescriptorPublicKey_9( + this, + Invocation.method( + #extend, + [], + { + #path: path, + #hint: hint, + }, + ), + )), + returnValueForMissingStub: _i9.Future<_i3.DescriptorPublicKey>.value( + _FakeDescriptorPublicKey_9( + this, + Invocation.method( + #extend, + [], + { + #path: path, + #hint: hint, + }, + ), + )), + ) as _i9.Future<_i3.DescriptorPublicKey>); +} + +/// 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 + _i7.MutexPartiallySignedTransaction get ptr => (super.noSuchMethod( + Invocation.getter(#ptr), + returnValue: _FakeMutexPartiallySignedTransaction_11( + this, + Invocation.getter(#ptr), + ), + returnValueForMissingStub: _FakeMutexPartiallySignedTransaction_11( + this, + Invocation.getter(#ptr), + ), + ) as _i7.MutexPartiallySignedTransaction); + + @override + _i9.Future feeAmount({dynamic hint}) => (super.noSuchMethod( + Invocation.method( + #feeAmount, + [], + {#hint: hint}, + ), + returnValue: _i9.Future.value(), + returnValueForMissingStub: _i9.Future.value(), + ) as _i9.Future); + + @override + _i9.Future<_i4.FeeRate?> feeRate({dynamic hint}) => (super.noSuchMethod( + Invocation.method( + #feeRate, + [], + {#hint: hint}, + ), + returnValue: _i9.Future<_i4.FeeRate?>.value(), + returnValueForMissingStub: _i9.Future<_i4.FeeRate?>.value(), + ) as _i9.Future<_i4.FeeRate?>); + + @override + _i9.Future jsonSerialize({dynamic hint}) => (super.noSuchMethod( + Invocation.method( + #jsonSerialize, + [], + {#hint: hint}, + ), + returnValue: _i9.Future.value(_i10.dummyValue( + this, + Invocation.method( + #jsonSerialize, + [], + {#hint: hint}, + ), + )), + returnValueForMissingStub: + _i9.Future.value(_i10.dummyValue( + this, + Invocation.method( + #jsonSerialize, + [], + {#hint: hint}, + ), + )), + ) as _i9.Future); + + @override + _i9.Future serialize({dynamic hint}) => (super.noSuchMethod( + Invocation.method( + #serialize, + [], + {#hint: hint}, + ), + returnValue: _i9.Future.value(_i10.dummyValue( + this, + Invocation.method( + #serialize, + [], + {#hint: hint}, + ), + )), + returnValueForMissingStub: + _i9.Future.value(_i10.dummyValue( + this, + Invocation.method( + #serialize, + [], + {#hint: hint}, + ), + )), + ) as _i9.Future); + + @override + _i9.Future<_i3.Transaction> extractTx() => (super.noSuchMethod( + Invocation.method( + #extractTx, + [], + ), + returnValue: _i9.Future<_i3.Transaction>.value(_FakeTransaction_12( + this, + Invocation.method( + #extractTx, + [], + ), + )), + returnValueForMissingStub: + _i9.Future<_i3.Transaction>.value(_FakeTransaction_12( + this, + Invocation.method( + #extractTx, + [], + ), + )), + ) as _i9.Future<_i3.Transaction>); + + @override + _i9.Future<_i3.PartiallySignedTransaction> combine( + _i3.PartiallySignedTransaction? other) => + (super.noSuchMethod( + Invocation.method( + #combine, + [other], + ), + returnValue: _i9.Future<_i3.PartiallySignedTransaction>.value( + _FakePartiallySignedTransaction_13( + this, + Invocation.method( + #combine, + [other], + ), + )), + returnValueForMissingStub: + _i9.Future<_i3.PartiallySignedTransaction>.value( + _FakePartiallySignedTransaction_13( + this, + Invocation.method( + #combine, + [other], + ), + )), + ) as _i9.Future<_i3.PartiallySignedTransaction>); + + @override + _i9.Future txid({dynamic hint}) => (super.noSuchMethod( + Invocation.method( + #txid, + [], + {#hint: hint}, + ), + returnValue: _i9.Future.value(_i10.dummyValue( + this, + Invocation.method( + #txid, + [], + {#hint: hint}, + ), + )), + returnValueForMissingStub: + _i9.Future.value(_i10.dummyValue( + this, + Invocation.method( + #txid, + [], + {#hint: hint}, + ), + )), + ) as _i9.Future); +} + +/// 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, + int? 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, + int? 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(int? 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<_i4.ScriptAmount>? 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 onlySpendChange() => (super.noSuchMethod( + Invocation.method( + #onlySpendChange, + [], + ), + returnValue: _FakeTxBuilder_14( + this, + Invocation.method( + #onlySpendChange, + [], + ), + ), + returnValueForMissingStub: _FakeTxBuilder_14( + this, + Invocation.method( + #onlySpendChange, + [], + ), + ), + ) as _i3.TxBuilder); + + @override + _i9.Future<(_i3.PartiallySignedTransaction, _i4.TransactionDetails)> finish( + _i3.Wallet? wallet) => + (super.noSuchMethod( + Invocation.method( + #finish, + [wallet], + ), + returnValue: _i9.Future< + (_i3.PartiallySignedTransaction, _i4.TransactionDetails)>.value(( + _FakePartiallySignedTransaction_13( + this, + Invocation.method( + #finish, + [wallet], + ), + ), + _FakeTransactionDetails_15( + this, + Invocation.method( + #finish, + [wallet], + ), + ) + )), + returnValueForMissingStub: _i9.Future< + (_i3.PartiallySignedTransaction, _i4.TransactionDetails)>.value(( + _FakePartiallySignedTransaction_13( + this, + Invocation.method( + #finish, + [wallet], + ), + ), + _FakeTransactionDetails_15( + this, + Invocation.method( + #finish, + [wallet], + ), + ) + )), + ) as _i9 + .Future<(_i3.PartiallySignedTransaction, _i4.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: _i10.dummyValue( + this, + Invocation.getter(#txid), + ), + returnValueForMissingStub: _i10.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 + _i9.Future<(_i3.PartiallySignedTransaction, _i4.TransactionDetails)> finish( + _i3.Wallet? wallet) => + (super.noSuchMethod( + Invocation.method( + #finish, + [wallet], + ), + returnValue: _i9.Future< + (_i3.PartiallySignedTransaction, _i4.TransactionDetails)>.value(( + _FakePartiallySignedTransaction_13( + this, + Invocation.method( + #finish, + [wallet], + ), + ), + _FakeTransactionDetails_15( + this, + Invocation.method( + #finish, + [wallet], + ), + ) + )), + returnValueForMissingStub: _i9.Future< + (_i3.PartiallySignedTransaction, _i4.TransactionDetails)>.value(( + _FakePartiallySignedTransaction_13( + this, + Invocation.method( + #finish, + [wallet], + ), + ), + _FakeTransactionDetails_15( + this, + Invocation.method( + #finish, + [wallet], + ), + ) + )), + ) as _i9 + .Future<(_i3.PartiallySignedTransaction, _i4.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 + _i11.Uint8List get bytes => (super.noSuchMethod( + Invocation.getter(#bytes), + returnValue: _i11.Uint8List(0), + returnValueForMissingStub: _i11.Uint8List(0), + ) as _i11.Uint8List); +} + +/// 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 + _i4.BdkBitcoinAddress get ptr => (super.noSuchMethod( + Invocation.getter(#ptr), + returnValue: _FakeBdkBitcoinAddress_17( + this, + Invocation.getter(#ptr), + ), + returnValueForMissingStub: _FakeBdkBitcoinAddress_17( + this, + Invocation.getter(#ptr), + ), + ) as _i4.BdkBitcoinAddress); + + @override + _i9.Future<_i3.ScriptBuf> scriptPubkey() => (super.noSuchMethod( + Invocation.method( + #scriptPubkey, + [], + ), + returnValue: _i9.Future<_i3.ScriptBuf>.value(_FakeScriptBuf_18( + this, + Invocation.method( + #scriptPubkey, + [], + ), + )), + returnValueForMissingStub: + _i9.Future<_i3.ScriptBuf>.value(_FakeScriptBuf_18( + this, + Invocation.method( + #scriptPubkey, + [], + ), + )), + ) as _i9.Future<_i3.ScriptBuf>); + + @override + _i9.Future asString({dynamic hint}) => (super.noSuchMethod( + Invocation.method( + #asString, + [], + {#hint: hint}, + ), + returnValue: _i9.Future.value(_i10.dummyValue( + this, + Invocation.method( + #asString, + [], + {#hint: hint}, + ), + )), + returnValueForMissingStub: + _i9.Future.value(_i10.dummyValue( + this, + Invocation.method( + #asString, + [], + {#hint: hint}, + ), + )), + ) as _i9.Future); + + @override + _i9.Future isValidForNetwork({ + required _i4.Network? network, + dynamic hint, + }) => + (super.noSuchMethod( + Invocation.method( + #isValidForNetwork, + [], + { + #network: network, + #hint: hint, + }, + ), + returnValue: _i9.Future.value(false), + returnValueForMissingStub: _i9.Future.value(false), + ) as _i9.Future); + + @override + _i9.Future<_i4.Network> network({dynamic hint}) => (super.noSuchMethod( + Invocation.method( + #network, + [], + {#hint: hint}, + ), + returnValue: _i9.Future<_i4.Network>.value(_i4.Network.testnet), + returnValueForMissingStub: + _i9.Future<_i4.Network>.value(_i4.Network.testnet), + ) as _i9.Future<_i4.Network>); + + @override + _i9.Future<_i4.Payload> payload({dynamic hint}) => (super.noSuchMethod( + Invocation.method( + #payload, + [], + {#hint: hint}, + ), + returnValue: _i9.Future<_i4.Payload>.value(_i10.dummyValue<_i4.Payload>( + this, + Invocation.method( + #payload, + [], + {#hint: hint}, + ), + )), + returnValueForMissingStub: + _i9.Future<_i4.Payload>.value(_i10.dummyValue<_i4.Payload>( + this, + Invocation.method( + #payload, + [], + {#hint: hint}, + ), + )), + ) as _i9.Future<_i4.Payload>); + + @override + _i9.Future toQrUri({dynamic hint}) => (super.noSuchMethod( + Invocation.method( + #toQrUri, + [], + {#hint: hint}, + ), + returnValue: _i9.Future.value(_i10.dummyValue( + this, + Invocation.method( + #toQrUri, + [], + {#hint: hint}, + ), + )), + returnValueForMissingStub: + _i9.Future.value(_i10.dummyValue( + this, + Invocation.method( + #toQrUri, + [], + {#hint: hint}, + ), + )), + ) as _i9.Future); +} + +/// 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 + _i8.BitcoinBip32DerivationPath get ptr => (super.noSuchMethod( + Invocation.getter(#ptr), + returnValue: _FakeBitcoinBip32DerivationPath_19( + this, + Invocation.getter(#ptr), + ), + returnValueForMissingStub: _FakeBitcoinBip32DerivationPath_19( + this, + Invocation.getter(#ptr), + ), + ) as _i8.BitcoinBip32DerivationPath); +} + +/// 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 _i4.TransactionDetails { + @override + String get txid => (super.noSuchMethod( + Invocation.getter(#txid), + returnValue: _i10.dummyValue( + this, + Invocation.getter(#txid), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.getter(#txid), + ), + ) as String); + + @override + int get received => (super.noSuchMethod( + Invocation.getter(#received), + returnValue: 0, + returnValueForMissingStub: 0, + ) as int); + + @override + int get sent => (super.noSuchMethod( + Invocation.getter(#sent), + returnValue: 0, + returnValueForMissingStub: 0, + ) as int); +} From d6773dda30a6ad081669e9a91af1441fff860134 Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Mon, 15 Apr 2024 13:47:00 -0400 Subject: [PATCH 23/27] cargokit_options.yaml added --- cargokit_options.yaml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 cargokit_options.yaml diff --git a/cargokit_options.yaml b/cargokit_options.yaml new file mode 100644 index 00000000..01f175a0 --- /dev/null +++ b/cargokit_options.yaml @@ -0,0 +1,2 @@ +verbose_logging: false +use_precompiled_binaries: true \ No newline at end of file From 3e1fb1e53f4aace9ece0962ec41de386931ede4b Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Tue, 16 Apr 2024 23:25:00 -0400 Subject: [PATCH 24/27] rust toolchain updated to stable --- .github/workflows/precompile_binaries.yml | 11 +++++++++-- rust/cargokit.yaml | 7 ++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/precompile_binaries.yml b/.github/workflows/precompile_binaries.yml index ec2ea71e..572a15a5 100644 --- a/.github/workflows/precompile_binaries.yml +++ b/.github/workflows/precompile_binaries.yml @@ -20,7 +20,14 @@ jobs: 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: @@ -38,4 +45,4 @@ jobs: working-directory: cargokit/build_tool env: GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} - PRIVATE_KEY: ${{ secrets.CARGOKIT_PRIVATE_KEY }} + PRIVATE_KEY: ${{ secrets.CARGOKIT_PRIVATE_KEY }} \ No newline at end of file diff --git a/rust/cargokit.yaml b/rust/cargokit.yaml index f94f555f..4657395e 100644 --- a/rust/cargokit.yaml +++ b/rust/cargokit.yaml @@ -1,9 +1,6 @@ cargo: release: - toolchain: nightly - extra_flags: - - -Z - - build-std=panic_abort,std + toolchain: stable precompiled_binaries: url_prefix: https://github.com/LtbLightning/bdk-flutter/releases/download/precompiled_ - public_key: 0e43d5e8452d00db7f3000c18fb1ba796babfcb5dc6306bb0629eff24f8be85b + public_key: 0e43d5e8452d00db7f3000c18fb1ba796babfcb5dc6306bb0629eff24f8be85b \ No newline at end of file From 7c89f2b0bfd7b8380225d20f4e4994e544b7ff82 Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Wed, 17 Apr 2024 19:01:00 -0400 Subject: [PATCH 25/27] code cleanup --- example/macos/Podfile.lock | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 example/macos/Podfile.lock diff --git a/example/macos/Podfile.lock b/example/macos/Podfile.lock new file mode 100644 index 00000000..bf8febe7 --- /dev/null +++ b/example/macos/Podfile.lock @@ -0,0 +1,22 @@ +PODS: + - bdk_flutter (0.31.2-dev): + - 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: 8280f582b6b9b49deb843763027d4864b231c1d2 + FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 + +PODFILE CHECKSUM: 6acf97521436d16fc31cd5e1a02000905acdb3ae + +COCOAPODS: 1.14.3 From 7ec34440b768b0c11e914f700e50137b5e77677f Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Thu, 18 Apr 2024 21:57:00 -0400 Subject: [PATCH 26/27] updated usePrecompiledBinaries default to true --- 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 6be18e8a105e12533b443f535b669b821c0fba5d Mon Sep 17 00:00:00 2001 From: BitcoinZavior Date: Fri, 19 Apr 2024 19:44:00 -0400 Subject: [PATCH 27/27] code cleanup --- cargokit_options.yaml | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 cargokit_options.yaml diff --git a/cargokit_options.yaml b/cargokit_options.yaml deleted file mode 100644 index 01f175a0..00000000 --- a/cargokit_options.yaml +++ /dev/null @@ -1,2 +0,0 @@ -verbose_logging: false -use_precompiled_binaries: true \ No newline at end of file