diff --git a/.github/workflows/precompile_binaries.yml b/.github/workflows/precompile_binaries.yml index 6dfe7c50..0804c5b0 100644 --- a/.github/workflows/precompile_binaries.yml +++ b/.github/workflows/precompile_binaries.yml @@ -1,6 +1,6 @@ on: push: - branches: [0.31.2, master, main] + branches: '*' name: Precompile Binaries @@ -51,4 +51,4 @@ jobs: working-directory: cargokit/build_tool env: GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} - PRIVATE_KEY: ${{ secrets.CARGOKIT_PRIVATE_KEY }} \ No newline at end of file + PRIVATE_KEY: ${{ secrets.CARGOKIT_PRIVATE_KEY }} diff --git a/CHANGELOG.md b/CHANGELOG.md index c2f08588..c445dcf5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +## [1.0.0-alpha.11] + ## [0.31.2] Updated `flutter_rust_bridge` to `2.0.0`. #### APIs added @@ -6,6 +8,9 @@ Updated `flutter_rust_bridge` to `2.0.0`. - `PartiallySignedTransaction`, `ScriptBuf` & `Transaction`. #### Changed - `partiallySignedTransaction.serialize()` serialize the data as raw binary. +#### Fixed +- Thread `frb_workerpool` panicked on Sql database access. + ## [0.31.2-dev.2] #### Fixed diff --git a/README.md b/README.md index 0852f50e..99785c2a 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ To use the `bdk_flutter` package in your project, add it as a dependency in your ```dart dependencies: - bdk_flutter: ^0.31.2 + bdk_flutter: "1.0.0-alpha.11" ``` ### Examples diff --git a/example/integration_test/full_cycle_test.dart b/example/integration_test/full_cycle_test.dart new file mode 100644 index 00000000..07ed2cef --- /dev/null +++ b/example/integration_test/full_cycle_test.dart @@ -0,0 +1,48 @@ +import 'package:bdk_flutter/bdk_flutter.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:integration_test/integration_test.dart'; + +void main() { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + group('Descriptor & Keys', () { + setUp(() async {}); + testWidgets('Muti-sig wallet generation', (_) async { + final descriptor = await Descriptor.create( + descriptor: + "wsh(or_d(pk([24d87569/84'/1'/0'/0/0]tpubDHebJGZWZaZ3JkhwTx5DytaRpFhK9ffFaN9PMBm7m63bdkdxqKgXkSPMzYzfDAGStx8LWt4b2CgGm86BwtNuG6PdsxsLVmuf6EjREX3oHjL/0/0/*),and_v(v:older(12),pk([24d87569/84'/1'/0'/0/0]tpubDHebJGZWZaZ3JkhwTx5DytaRpFhK9ffFaN9PMBm7m63bdkdxqKgXkSPMzYzfDAGStx8LWt4b2CgGm86BwtNuG6PdsxsLVmuf6EjREX3oHjL/0/1/*))))", + network: Network.testnet); + final changeDescriptor = await Descriptor.create( + descriptor: + "wsh(or_d(pk([24d87569/84'/1'/0'/1/0]tpubDHebJGZWZaZ3JkhwTx5DytaRpFhK9ffFaN9PMBm7m63bdkdxqKgXkSPMzYzfDAGStx8LWt4b2CgGm86BwtNuG6PdsxsLVmuf6EjREX3oHjL/1/0/*),and_v(v:older(12),pk([24d87569/84'/1'/0'/1/0]tpubDHebJGZWZaZ3JkhwTx5DytaRpFhK9ffFaN9PMBm7m63bdkdxqKgXkSPMzYzfDAGStx8LWt4b2CgGm86BwtNuG6PdsxsLVmuf6EjREX3oHjL/1/1/*))))", + network: Network.testnet); + + final wallet = await Wallet.create( + descriptor: descriptor, + changeDescriptor: changeDescriptor, + network: Network.testnet, + connection: await Connection.createInMemory()); + debugPrint(wallet.network().toString()); + }); + testWidgets('Derive descriptorSecretKey Manually', (_) async { + final mnemonic = await Mnemonic.create(WordCount.words12); + final descriptorSecretKey = await DescriptorSecretKey.create( + network: Network.testnet, mnemonic: mnemonic); + debugPrint(descriptorSecretKey.toString()); + + for (var e in [0, 1]) { + final derivationPath = + await DerivationPath.create(path: "m/84'/1'/0'/$e"); + final derivedDescriptorSecretKey = + await descriptorSecretKey.derive(derivationPath); + debugPrint(derivedDescriptorSecretKey.toString()); + debugPrint(derivedDescriptorSecretKey.toPublic().toString()); + final descriptor = await Descriptor.create( + descriptor: "wpkh($derivedDescriptorSecretKey)", + network: Network.testnet); + + debugPrint(descriptor.toString()); + } + }); + }); +} diff --git a/example/ios/Runner/AppDelegate.swift b/example/ios/Runner/AppDelegate.swift index 70693e4a..b6363034 100644 --- a/example/ios/Runner/AppDelegate.swift +++ b/example/ios/Runner/AppDelegate.swift @@ -1,7 +1,7 @@ import UIKit import Flutter -@UIApplicationMain +@main @objc class AppDelegate: FlutterAppDelegate { override func application( _ application: UIApplication, diff --git a/example/lib/bdk_library.dart b/example/lib/bdk_library.dart index db4ecce9..03275a7a 100644 --- a/example/lib/bdk_library.dart +++ b/example/lib/bdk_library.dart @@ -7,70 +7,105 @@ class BdkLibrary { return res; } - Future createDescriptor(Mnemonic mnemonic) async { + Future> createDescriptor(Mnemonic mnemonic) async { final descriptorSecretKey = await DescriptorSecretKey.create( network: Network.signet, mnemonic: mnemonic, ); - if (kDebugMode) { - print(descriptorSecretKey.toPublic()); - print(descriptorSecretKey.secretBytes()); - print(descriptorSecretKey); - } - final descriptor = await Descriptor.newBip84( secretKey: descriptorSecretKey, network: Network.signet, keychain: KeychainKind.externalChain); - return descriptor; - } - - Future initializeBlockchain() async { - return Blockchain.createMutinynet(); + final changeDescriptor = await Descriptor.newBip84( + secretKey: descriptorSecretKey, + network: Network.signet, + keychain: KeychainKind.internalChain); + return [descriptor, changeDescriptor]; } - Future restoreWallet(Descriptor descriptor) async { - final wallet = await Wallet.create( - descriptor: descriptor, - network: Network.testnet, - databaseConfig: const DatabaseConfig.memory()); - return wallet; + Future initializeBlockchain() async { + return EsploraClient.createMutinynet(); } - Future sync(Blockchain blockchain, Wallet wallet) async { + Future crateOrLoadWallet(Descriptor descriptor, + Descriptor changeDescriptor, Connection connection) async { try { - await wallet.sync(blockchain: blockchain); - } on FormatException catch (e) { - debugPrint(e.message); + final wallet = await Wallet.create( + descriptor: descriptor, + changeDescriptor: changeDescriptor, + network: Network.signet, + connection: connection); + return wallet; + } on CreateWithPersistException catch (e) { + if (e.code == "DatabaseExists") { + final res = await Wallet.load( + descriptor: descriptor, + changeDescriptor: changeDescriptor, + connection: connection); + return res; + } else { + rethrow; + } } } - AddressInfo getAddressInfo(Wallet wallet) { - return wallet.getAddress(addressIndex: const AddressIndex.increase()); + Future sync( + EsploraClient esploraClient, Wallet wallet, bool fullScan) async { + try { + if (fullScan) { + final fullScanRequestBuilder = await wallet.startFullScan(); + final fullScanRequest = await (await fullScanRequestBuilder + .inspectSpksForAllKeychains(inspector: (e, f, g) { + debugPrint( + "Syncing: index: ${f.toString()}, script: ${g.toString()}"); + })) + .build(); + final update = await esploraClient.fullScan( + request: fullScanRequest, + stopGap: BigInt.from(1), + parallelRequests: BigInt.from(1)); + await wallet.applyUpdate(update: update); + } else { + final syncRequestBuilder = await wallet.startSyncWithRevealedSpks(); + final syncRequest = await (await syncRequestBuilder.inspectSpks( + inspector: (script, progress) { + debugPrint( + "syncing spk: ${(progress.spksConsumed / (progress.spksConsumed + progress.spksRemaining)) * 100} %"); + })) + .build(); + final update = await esploraClient.sync( + request: syncRequest, parallelRequests: BigInt.from(1)); + await wallet.applyUpdate(update: update); + } + } on Exception catch (e) { + debugPrint(e.toString()); + } } - Future getPsbtInput( - Wallet wallet, LocalUtxo utxo, bool onlyWitnessUtxo) async { - final input = - await wallet.getPsbtInput(utxo: utxo, onlyWitnessUtxo: onlyWitnessUtxo); - return input; + AddressInfo revealNextAddress(Wallet wallet) { + return wallet.revealNextAddress(keychainKind: KeychainKind.externalChain); } - List getUnConfirmedTransactions(Wallet wallet) { - List unConfirmed = []; - final res = wallet.listTransactions(includeRaw: true); + List getUnConfirmedTransactions(Wallet wallet) { + List unConfirmed = []; + final res = wallet.transactions(); for (var e in res) { - if (e.confirmationTime == null) unConfirmed.add(e); + if (e.chainPosition + .maybeMap(orElse: () => false, unconfirmed: (_) => true)) { + unConfirmed.add(e); + } } return unConfirmed; } - List getConfirmedTransactions(Wallet wallet) { - List confirmed = []; - final res = wallet.listTransactions(includeRaw: true); - + List getConfirmedTransactions(Wallet wallet) { + List confirmed = []; + final res = wallet.transactions(); for (var e in res) { - if (e.confirmationTime != null) confirmed.add(e); + if (e.chainPosition + .maybeMap(orElse: () => false, confirmed: (_) => true)) { + confirmed.add(e); + } } return confirmed; } @@ -79,39 +114,30 @@ class BdkLibrary { return wallet.getBalance(); } - List listUnspent(Wallet wallet) { + List listUnspent(Wallet wallet) { return wallet.listUnspent(); } - Future estimateFeeRate( - int blocks, - Blockchain blockchain, - ) async { - final feeRate = await blockchain.estimateFee(target: BigInt.from(blocks)); - return feeRate; - } - - sendBitcoin(Blockchain blockchain, Wallet wallet, String receiverAddress, + sendBitcoin(EsploraClient blockchain, Wallet wallet, String receiverAddress, int amountSat) async { try { final txBuilder = TxBuilder(); final address = await Address.fromString( s: receiverAddress, network: wallet.network()); - final script = address.scriptPubkey(); - final feeRate = await estimateFeeRate(25, blockchain); - final (psbt, _) = await txBuilder - .addRecipient(script, BigInt.from(amountSat)) - .feeRate(feeRate.satPerVb) + final unspentUtxo = + wallet.listUnspent().firstWhere((e) => e.isSpent == false); + final psbt = await txBuilder + .addRecipient(address.script(), BigInt.from(amountSat)) + .addUtxo(unspentUtxo.outpoint) .finish(wallet); final isFinalized = await wallet.sign(psbt: psbt); if (isFinalized) { final tx = psbt.extractTx(); - final res = await blockchain.broadcast(transaction: tx); - debugPrint(res); + await blockchain.broadcast(transaction: tx); + debugPrint(tx.computeTxid()); } else { debugPrint("psbt not finalized!"); } - // Isolate.run(() async => {}); } on Exception catch (_) { rethrow; } diff --git a/example/lib/main.dart b/example/lib/main.dart index 4f12fa02..f24b7b21 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,6 +1,6 @@ -import 'package:bdk_flutter_example/simple_wallet.dart'; +import 'package:bdk_flutter_example/wallet.dart'; import 'package:flutter/material.dart'; void main() { - runApp(const SimpleWallet()); + runApp(const BdkWallet()); } diff --git a/example/lib/multi_sig_wallet.dart b/example/lib/multi_sig_wallet.dart deleted file mode 100644 index 44f78346..00000000 --- a/example/lib/multi_sig_wallet.dart +++ /dev/null @@ -1,97 +0,0 @@ -import 'package:bdk_flutter/bdk_flutter.dart'; -import 'package:flutter/foundation.dart'; - -class MultiSigWallet { - Future> init2Of3Descriptors(List mnemonics) async { - final List descriptorInfos = []; - for (var e in mnemonics) { - final secret = await DescriptorSecretKey.create( - network: Network.testnet, mnemonic: e); - final public = secret.toPublic(); - descriptorInfos.add(DescriptorKeyInfo(secret, public)); - } - final alice = - "wsh(sortedmulti(2,${descriptorInfos[0].xprv},${descriptorInfos[1].xpub},${descriptorInfos[2].xpub}))"; - final bob = - "wsh(sortedmulti(2,${descriptorInfos[1].xprv},${descriptorInfos[2].xpub},${descriptorInfos[0].xpub}))"; - final dave = - "wsh(sortedmulti(2,${descriptorInfos[2].xprv},${descriptorInfos[0].xpub},${descriptorInfos[1].xpub}))"; - final List descriptors = []; - final parsedDes = [alice, bob, dave]; - for (var e in parsedDes) { - final res = - await Descriptor.create(descriptor: e, network: Network.testnet); - descriptors.add(res); - } - return descriptors; - } - - Future> createDescriptors() async { - final alice = await Mnemonic.fromString( - 'thumb member wage display inherit music elevator need side setup tube panther broom giant auction banner split potato'); - final bob = await Mnemonic.fromString( - 'tired shine hat tired hover timber reward bridge verb aerobic safe economy'); - final dave = await Mnemonic.fromString( - 'lawsuit upper gospel minimum cinnamon common boss wage benefit betray ribbon hour'); - final descriptors = await init2Of3Descriptors([alice, bob, dave]); - return descriptors; - } - - Future> init20f3Wallets() async { - final descriptors = await createDescriptors(); - final alice = await Wallet.create( - descriptor: descriptors[0], - network: Network.testnet, - databaseConfig: const DatabaseConfig.memory()); - final bob = await Wallet.create( - descriptor: descriptors[1], - network: Network.testnet, - databaseConfig: const DatabaseConfig.memory()); - final dave = await Wallet.create( - descriptor: descriptors[2], - network: Network.testnet, - databaseConfig: const DatabaseConfig.memory()); - return [alice, bob, dave]; - } - - sendBitcoin(Blockchain blockchain, Wallet wallet, Wallet bobWallet, - String addressStr) async { - try { - final txBuilder = TxBuilder(); - final address = - await Address.fromString(s: addressStr, network: wallet.network()); - final script = address.scriptPubkey(); - final feeRate = await blockchain.estimateFee(target: BigInt.from(25)); - final (psbt, _) = await txBuilder - .addRecipient(script, BigInt.from(1200)) - .feeRate(feeRate.satPerVb) - .finish(wallet); - await wallet.sign( - psbt: psbt, - signOptions: const SignOptions( - trustWitnessUtxo: false, - allowAllSighashes: true, - removePartialSigs: true, - tryFinalize: true, - signWithTapInternalKey: true, - allowGrinding: true)); - final isFinalized = await bobWallet.sign(psbt: psbt); - if (isFinalized) { - final tx = psbt.extractTx(); - await blockchain.broadcast(transaction: tx); - } else { - debugPrint("Psbt not finalized!"); - } - } on FormatException catch (e) { - if (kDebugMode) { - print(e.message); - } - } - } -} - -class DescriptorKeyInfo { - final DescriptorSecretKey xprv; - final DescriptorPublicKey xpub; - DescriptorKeyInfo(this.xprv, this.xpub); -} diff --git a/example/lib/simple_wallet.dart b/example/lib/wallet.dart similarity index 83% rename from example/lib/simple_wallet.dart rename to example/lib/wallet.dart index c0af426e..e6c422dd 100644 --- a/example/lib/simple_wallet.dart +++ b/example/lib/wallet.dart @@ -4,18 +4,19 @@ import 'package:flutter/material.dart'; import 'bdk_library.dart'; -class SimpleWallet extends StatefulWidget { - const SimpleWallet({super.key}); +class BdkWallet extends StatefulWidget { + const BdkWallet({super.key}); @override - State createState() => _SimpleWalletState(); + State createState() => _BdkWalletState(); } -class _SimpleWalletState extends State { +class _BdkWalletState extends State { String displayText = ""; BigInt balance = BigInt.zero; late Wallet wallet; - Blockchain? blockchain; + EsploraClient? blockchain; + Connection? connection; BdkLibrary lib = BdkLibrary(); @override void initState() { @@ -37,19 +38,26 @@ class _SimpleWalletState extends State { final aliceMnemonic = await Mnemonic.fromString( 'give rate trigger race embrace dream wish column upon steel wrist rice'); final aliceDescriptor = await lib.createDescriptor(aliceMnemonic); - wallet = await lib.restoreWallet(aliceDescriptor); + final connection = await Connection.createInMemory(); + wallet = await lib.crateOrLoadWallet( + aliceDescriptor[0], aliceDescriptor[1], connection); setState(() { displayText = "Wallets restored"; }); + await sync(fullScan: true); + setState(() { + displayText = "Full scan complete "; + }); + await getBalance(); } - sync() async { + sync({required bool fullScan}) async { blockchain ??= await lib.initializeBlockchain(); - await lib.sync(blockchain!, wallet); + await lib.sync(blockchain!, wallet, fullScan); } getNewAddress() async { - final addressInfo = lib.getAddressInfo(wallet); + final addressInfo = lib.revealNextAddress(wallet); debugPrint(addressInfo.address.toString()); setState(() { @@ -64,12 +72,10 @@ class _SimpleWalletState extends State { displayText = "You have ${unConfirmed.length} unConfirmed transactions"; }); for (var e in unConfirmed) { - final txOut = await e.transaction!.output(); + final txOut = e.transaction.output(); + final tx = e.transaction; if (kDebugMode) { - print(" txid: ${e.txid}"); - print(" fee: ${e.fee}"); - print(" received: ${e.received}"); - print(" send: ${e.sent}"); + print(" txid: ${tx.computeTxid()}"); print(" output address: ${txOut.last.scriptPubkey.bytes}"); print("==========================="); } @@ -83,11 +89,9 @@ class _SimpleWalletState extends State { }); 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(" txid: ${e.transaction.computeTxid()}"); + final txIn = e.transaction.input(); + final txOut = e.transaction.output(); print("=============TxIn=============="); for (var e in txIn) { print(" previousOutout Txid: ${e.previousOutput.txid}"); @@ -131,28 +135,6 @@ class _SimpleWalletState extends State { } } - Future getBlockHeight() async { - final res = await blockchain!.getHeight(); - if (kDebugMode) { - print(res); - } - setState(() { - displayText = "Height: $res"; - }); - return res; - } - - getBlockHash() async { - final height = await getBlockHeight(); - final blockHash = await blockchain!.getBlockHash(height: height); - setState(() { - displayText = "BlockHash: $blockHash"; - }); - if (kDebugMode) { - print(blockHash); - } - } - sendBit(int amountSat) async { await lib.sendBitcoin(blockchain!, wallet, "tb1qyhssajdx5vfxuatt082m9tsfmxrxludgqwe52f", amountSat); @@ -236,7 +218,7 @@ class _SimpleWalletState extends State { )), TextButton( onPressed: () async { - await sync(); + await sync(fullScan: false); }, child: const Text( 'Press to sync', @@ -296,16 +278,6 @@ class _SimpleWalletState extends State { 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( diff --git a/example/macos/Podfile.lock b/example/macos/Podfile.lock index 2d921409..2788babd 100644 --- a/example/macos/Podfile.lock +++ b/example/macos/Podfile.lock @@ -1,5 +1,5 @@ PODS: - - bdk_flutter (0.31.2): + - bdk_flutter (1.0.0-alpha.11): - FlutterMacOS - FlutterMacOS (1.0.0) diff --git a/example/pubspec.lock b/example/pubspec.lock index 42f35cef..518b5235 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -39,7 +39,7 @@ packages: path: ".." relative: true source: path - version: "0.31.2" + version: "1.0.0-alpha.11" boolean_selector: dependency: transitive description: @@ -181,6 +181,11 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_driver: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" flutter_lints: dependency: "direct dev" description: @@ -193,10 +198,10 @@ packages: dependency: transitive description: name: flutter_rust_bridge - sha256: f703c4b50e253e53efc604d50281bbaefe82d615856f8ae1e7625518ae252e98 + sha256: a43a6649385b853bc836ef2bc1b056c264d476c35e131d2d69c38219b5e799f1 url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.4.0" flutter_test: dependency: "direct dev" description: flutter @@ -210,6 +215,11 @@ packages: url: "https://pub.dev" source: hosted version: "2.4.2" + fuchsia_remote_debug_protocol: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" glob: dependency: transitive description: @@ -218,6 +228,11 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.2" + integration_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" json_annotation: dependency: transitive description: @@ -230,18 +245,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" url: "https://pub.dev" source: hosted - version: "10.0.4" + version: "10.0.5" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.5" leak_tracker_testing: dependency: transitive description: @@ -278,18 +293,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.12.0" + version: "1.15.0" mockito: dependency: transitive description: @@ -314,6 +329,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.9.0" + platform: + dependency: transitive + description: + name: platform + sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" + url: "https://pub.dev" + source: hosted + version: "3.1.5" + process: + dependency: transitive + description: + name: process + sha256: "21e54fd2faf1b5bdd5102afd25012184a6793927648ea81eea80552ac9405b32" + url: "https://pub.dev" + source: hosted + version: "5.0.2" pub_semver: dependency: transitive description: @@ -375,6 +406,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.0" + sync_http: + dependency: transitive + description: + name: sync_http + sha256: "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961" + url: "https://pub.dev" + source: hosted + version: "0.3.1" term_glyph: dependency: transitive description: @@ -387,10 +426,10 @@ packages: dependency: transitive description: name: test_api - sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.7.0" + version: "0.7.2" typed_data: dependency: transitive description: @@ -419,10 +458,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" url: "https://pub.dev" source: hosted - version: "14.2.1" + version: "14.2.5" watcher: dependency: transitive description: @@ -439,6 +478,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.5.1" + webdriver: + dependency: transitive + description: + name: webdriver + sha256: "003d7da9519e1e5f329422b36c4dcdf18d7d2978d1ba099ea4e45ba490ed845e" + url: "https://pub.dev" + source: hosted + version: "3.0.3" yaml: dependency: transitive description: diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 06bbff6a..c4eb3132 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -32,6 +32,10 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter + integration_test: + sdk: flutter + flutter_driver: + sdk: flutter # The "flutter_lints" package below contains a set of recommended lints to # encourage good coding practices. The lint set provided by the package is diff --git a/flutter_rust_bridge.yaml b/flutter_rust_bridge.yaml index 0a112455..2a13e379 100644 --- a/flutter_rust_bridge.yaml +++ b/flutter_rust_bridge.yaml @@ -7,4 +7,5 @@ dart3: true enable_lifetime: true c_output: ios/Classes/frb_generated.h duplicated_c_output: [macos/Classes/frb_generated.h] -dart_entrypoint_class_name: core \ No newline at end of file +dart_entrypoint_class_name: core +stop_on_error: true \ No newline at end of file diff --git a/ios/Classes/frb_generated.h b/ios/Classes/frb_generated.h index 45bed664..601a7c4d 100644 --- a/ios/Classes/frb_generated.h +++ b/ios/Classes/frb_generated.h @@ -14,131 +14,32 @@ 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_ffi_address { + uintptr_t field0; +} wire_cst_ffi_address; typedef struct wire_cst_list_prim_u_8_strict { uint8_t *ptr; int32_t len; } wire_cst_list_prim_u_8_strict; -typedef struct wire_cst_bdk_transaction { - struct wire_cst_list_prim_u_8_strict *s; -} wire_cst_bdk_transaction; - -typedef struct wire_cst_electrum_config { - struct wire_cst_list_prim_u_8_strict *url; - struct wire_cst_list_prim_u_8_strict *socks5; - uint8_t retry; - uint8_t *timeout; - uint64_t stop_gap; - bool validate_domain; -} wire_cst_electrum_config; - -typedef struct wire_cst_BlockchainConfig_Electrum { - struct wire_cst_electrum_config *config; -} wire_cst_BlockchainConfig_Electrum; - -typedef struct wire_cst_esplora_config { - struct wire_cst_list_prim_u_8_strict *base_url; - struct wire_cst_list_prim_u_8_strict *proxy; - uint8_t *concurrency; - uint64_t stop_gap; - uint64_t *timeout; -} wire_cst_esplora_config; - -typedef struct wire_cst_BlockchainConfig_Esplora { - struct wire_cst_esplora_config *config; -} wire_cst_BlockchainConfig_Esplora; - -typedef struct wire_cst_Auth_UserPass { - struct wire_cst_list_prim_u_8_strict *username; - struct wire_cst_list_prim_u_8_strict *password; -} wire_cst_Auth_UserPass; - -typedef struct wire_cst_Auth_Cookie { - struct wire_cst_list_prim_u_8_strict *file; -} wire_cst_Auth_Cookie; - -typedef union AuthKind { - struct wire_cst_Auth_UserPass UserPass; - struct wire_cst_Auth_Cookie Cookie; -} AuthKind; - -typedef struct wire_cst_auth { - int32_t tag; - union AuthKind kind; -} wire_cst_auth; - -typedef struct wire_cst_rpc_sync_params { - uint64_t start_script_count; - uint64_t start_time; - bool force_start_time; - uint64_t poll_rate_sec; -} wire_cst_rpc_sync_params; - -typedef struct wire_cst_rpc_config { - struct wire_cst_list_prim_u_8_strict *url; - struct wire_cst_auth auth; - int32_t network; - struct wire_cst_list_prim_u_8_strict *wallet_name; - struct wire_cst_rpc_sync_params *sync_params; -} wire_cst_rpc_config; - -typedef struct wire_cst_BlockchainConfig_Rpc { - struct wire_cst_rpc_config *config; -} wire_cst_BlockchainConfig_Rpc; - -typedef union BlockchainConfigKind { - struct wire_cst_BlockchainConfig_Electrum Electrum; - struct wire_cst_BlockchainConfig_Esplora Esplora; - struct wire_cst_BlockchainConfig_Rpc Rpc; -} BlockchainConfigKind; - -typedef struct wire_cst_blockchain_config { - int32_t tag; - union BlockchainConfigKind kind; -} wire_cst_blockchain_config; - -typedef struct wire_cst_bdk_descriptor { - uintptr_t extended_descriptor; - uintptr_t key_map; -} wire_cst_bdk_descriptor; - -typedef struct wire_cst_bdk_descriptor_secret_key { - uintptr_t ptr; -} wire_cst_bdk_descriptor_secret_key; - -typedef struct wire_cst_bdk_descriptor_public_key { - uintptr_t ptr; -} wire_cst_bdk_descriptor_public_key; +typedef struct wire_cst_ffi_script_buf { + struct wire_cst_list_prim_u_8_strict *bytes; +} wire_cst_ffi_script_buf; -typedef struct wire_cst_bdk_derivation_path { - uintptr_t ptr; -} wire_cst_bdk_derivation_path; +typedef struct wire_cst_ffi_psbt { + uintptr_t opaque; +} wire_cst_ffi_psbt; -typedef struct wire_cst_bdk_mnemonic { - uintptr_t ptr; -} wire_cst_bdk_mnemonic; +typedef struct wire_cst_ffi_transaction { + uintptr_t opaque; +} wire_cst_ffi_transaction; 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; @@ -169,7 +70,7 @@ typedef struct 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; + struct wire_cst_ffi_script_buf script_sig; uint32_t sequence; struct wire_cst_list_list_prim_u_8_strict *witness; } wire_cst_tx_in; @@ -181,7 +82,7 @@ typedef struct wire_cst_list_tx_in { typedef struct wire_cst_tx_out { uint64_t value; - struct wire_cst_bdk_script_buf script_pubkey; + struct wire_cst_ffi_script_buf script_pubkey; } wire_cst_tx_out; typedef struct wire_cst_list_tx_out { @@ -189,100 +90,85 @@ typedef struct wire_cst_list_tx_out { 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_ffi_descriptor { + uintptr_t extended_descriptor; + uintptr_t key_map; +} wire_cst_ffi_descriptor; -typedef struct wire_cst_address_index { - int32_t tag; - union AddressIndexKind kind; -} wire_cst_address_index; +typedef struct wire_cst_ffi_descriptor_secret_key { + uintptr_t opaque; +} wire_cst_ffi_descriptor_secret_key; -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_ffi_descriptor_public_key { + uintptr_t opaque; +} wire_cst_ffi_descriptor_public_key; -typedef struct wire_cst_psbt_sig_hash_type { - uint32_t inner; -} wire_cst_psbt_sig_hash_type; +typedef struct wire_cst_ffi_electrum_client { + uintptr_t opaque; +} wire_cst_ffi_electrum_client; -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_ffi_full_scan_request { + uintptr_t field0; +} wire_cst_ffi_full_scan_request; -typedef struct wire_cst_DatabaseConfig_Sqlite { - struct wire_cst_sqlite_db_configuration *config; -} wire_cst_DatabaseConfig_Sqlite; +typedef struct wire_cst_ffi_sync_request { + uintptr_t field0; +} wire_cst_ffi_sync_request; -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_ffi_esplora_client { + uintptr_t opaque; +} wire_cst_ffi_esplora_client; -typedef struct wire_cst_DatabaseConfig_Sled { - struct wire_cst_sled_db_configuration *config; -} wire_cst_DatabaseConfig_Sled; +typedef struct wire_cst_ffi_derivation_path { + uintptr_t opaque; +} wire_cst_ffi_derivation_path; -typedef union DatabaseConfigKind { - struct wire_cst_DatabaseConfig_Sqlite Sqlite; - struct wire_cst_DatabaseConfig_Sled Sled; -} DatabaseConfigKind; +typedef struct wire_cst_ffi_mnemonic { + uintptr_t opaque; +} wire_cst_ffi_mnemonic; -typedef struct wire_cst_database_config { - int32_t tag; - union DatabaseConfigKind kind; -} wire_cst_database_config; +typedef struct wire_cst_fee_rate { + uint64_t sat_kwu; +} wire_cst_fee_rate; -typedef struct wire_cst_sign_options { - bool trust_witness_utxo; - uint32_t *assume_height; - bool allow_all_sighashes; - bool remove_partial_sigs; - bool try_finalize; - bool sign_with_tap_internal_key; - bool allow_grinding; -} wire_cst_sign_options; +typedef struct wire_cst_ffi_wallet { + uintptr_t opaque; +} wire_cst_ffi_wallet; -typedef struct wire_cst_script_amount { - struct wire_cst_bdk_script_buf script; - uint64_t amount; -} wire_cst_script_amount; +typedef struct wire_cst_record_ffi_script_buf_u_64 { + struct wire_cst_ffi_script_buf field0; + uint64_t field1; +} wire_cst_record_ffi_script_buf_u_64; -typedef struct wire_cst_list_script_amount { - struct wire_cst_script_amount *ptr; +typedef struct wire_cst_list_record_ffi_script_buf_u_64 { + struct wire_cst_record_ffi_script_buf_u_64 *ptr; int32_t len; -} wire_cst_list_script_amount; +} wire_cst_list_record_ffi_script_buf_u_64; 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_list_prim_usize_strict { + uintptr_t *ptr; + int32_t len; +} wire_cst_list_prim_usize_strict; -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_record_string_list_prim_usize_strict { + struct wire_cst_list_prim_u_8_strict *field0; + struct wire_cst_list_prim_usize_strict *field1; +} wire_cst_record_string_list_prim_usize_strict; + +typedef struct wire_cst_list_record_string_list_prim_usize_strict { + struct wire_cst_record_string_list_prim_usize_strict *ptr; + int32_t len; +} wire_cst_list_record_string_list_prim_usize_strict; + +typedef struct wire_cst_record_map_string_list_prim_usize_strict_keychain_kind { + struct wire_cst_list_record_string_list_prim_usize_strict *field0; + int32_t field1; +} wire_cst_record_map_string_list_prim_usize_strict_keychain_kind; typedef struct wire_cst_RbfValue_Value { uint32_t field0; @@ -297,136 +183,398 @@ typedef struct wire_cst_rbf_value { 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_ffi_full_scan_request_builder { + uintptr_t field0; +} wire_cst_ffi_full_scan_request_builder; -typedef struct wire_cst_AddressError_InvalidWitnessVersion { - uint8_t field0; -} wire_cst_AddressError_InvalidWitnessVersion; +typedef struct wire_cst_ffi_policy { + uintptr_t opaque; +} wire_cst_ffi_policy; -typedef struct wire_cst_AddressError_UnparsableWitnessVersion { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_AddressError_UnparsableWitnessVersion; +typedef struct wire_cst_ffi_sync_request_builder { + uintptr_t field0; +} wire_cst_ffi_sync_request_builder; -typedef struct wire_cst_AddressError_InvalidWitnessProgramLength { +typedef struct wire_cst_ffi_update { uintptr_t field0; -} wire_cst_AddressError_InvalidWitnessProgramLength; +} wire_cst_ffi_update; -typedef struct wire_cst_AddressError_InvalidSegwitV0ProgramLength { +typedef struct wire_cst_ffi_connection { uintptr_t field0; -} wire_cst_AddressError_InvalidSegwitV0ProgramLength; +} wire_cst_ffi_connection; -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_sign_options { + bool trust_witness_utxo; + uint32_t *assume_height; + bool allow_all_sighashes; + bool try_finalize; + bool sign_with_tap_internal_key; + bool allow_grinding; +} wire_cst_sign_options; -typedef struct wire_cst_block_time { +typedef struct wire_cst_block_id { uint32_t height; + struct wire_cst_list_prim_u_8_strict *hash; +} wire_cst_block_id; + +typedef struct wire_cst_confirmation_block_time { + struct wire_cst_block_id block_id; + uint64_t confirmation_time; +} wire_cst_confirmation_block_time; + +typedef struct wire_cst_ChainPosition_Confirmed { + struct wire_cst_confirmation_block_time *confirmation_block_time; +} wire_cst_ChainPosition_Confirmed; + +typedef struct wire_cst_ChainPosition_Unconfirmed { uint64_t timestamp; -} wire_cst_block_time; +} wire_cst_ChainPosition_Unconfirmed; -typedef struct wire_cst_ConsensusError_Io { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_ConsensusError_Io; +typedef union ChainPositionKind { + struct wire_cst_ChainPosition_Confirmed Confirmed; + struct wire_cst_ChainPosition_Unconfirmed Unconfirmed; +} ChainPositionKind; -typedef struct wire_cst_ConsensusError_OversizedVectorAllocation { - uintptr_t requested; - uintptr_t max; -} wire_cst_ConsensusError_OversizedVectorAllocation; +typedef struct wire_cst_chain_position { + int32_t tag; + union ChainPositionKind kind; +} wire_cst_chain_position; -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_ffi_canonical_tx { + struct wire_cst_ffi_transaction transaction; + struct wire_cst_chain_position chain_position; +} wire_cst_ffi_canonical_tx; -typedef struct wire_cst_ConsensusError_ParseFailed { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_ConsensusError_ParseFailed; +typedef struct wire_cst_list_ffi_canonical_tx { + struct wire_cst_ffi_canonical_tx *ptr; + int32_t len; +} wire_cst_list_ffi_canonical_tx; + +typedef struct wire_cst_local_output { + struct wire_cst_out_point outpoint; + struct wire_cst_tx_out txout; + int32_t keychain; + bool is_spent; +} wire_cst_local_output; + +typedef struct wire_cst_list_local_output { + struct wire_cst_local_output *ptr; + int32_t len; +} wire_cst_list_local_output; + +typedef struct wire_cst_address_info { + uint32_t index; + struct wire_cst_ffi_address address; + int32_t keychain; +} wire_cst_address_info; + +typedef struct wire_cst_AddressParseError_WitnessVersion { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_AddressParseError_WitnessVersion; + +typedef struct wire_cst_AddressParseError_WitnessProgram { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_AddressParseError_WitnessProgram; + +typedef union AddressParseErrorKind { + struct wire_cst_AddressParseError_WitnessVersion WitnessVersion; + struct wire_cst_AddressParseError_WitnessProgram WitnessProgram; +} AddressParseErrorKind; + +typedef struct wire_cst_address_parse_error { + int32_t tag; + union AddressParseErrorKind kind; +} wire_cst_address_parse_error; + +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_ConsensusError_UnsupportedSegwitFlag { - uint8_t field0; -} wire_cst_ConsensusError_UnsupportedSegwitFlag; +typedef struct wire_cst_Bip32Error_Secp256k1 { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_Bip32Error_Secp256k1; + +typedef struct wire_cst_Bip32Error_InvalidChildNumber { + uint32_t child_number; +} wire_cst_Bip32Error_InvalidChildNumber; + +typedef struct wire_cst_Bip32Error_UnknownVersion { + struct wire_cst_list_prim_u_8_strict *version; +} wire_cst_Bip32Error_UnknownVersion; + +typedef struct wire_cst_Bip32Error_WrongExtendedKeyLength { + uint32_t length; +} wire_cst_Bip32Error_WrongExtendedKeyLength; + +typedef struct wire_cst_Bip32Error_Base58 { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_Bip32Error_Base58; + +typedef struct wire_cst_Bip32Error_Hex { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_Bip32Error_Hex; + +typedef struct wire_cst_Bip32Error_InvalidPublicKeyHexLength { + uint32_t length; +} wire_cst_Bip32Error_InvalidPublicKeyHexLength; + +typedef struct wire_cst_Bip32Error_UnknownError { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_Bip32Error_UnknownError; + +typedef union Bip32ErrorKind { + struct wire_cst_Bip32Error_Secp256k1 Secp256k1; + struct wire_cst_Bip32Error_InvalidChildNumber InvalidChildNumber; + struct wire_cst_Bip32Error_UnknownVersion UnknownVersion; + struct wire_cst_Bip32Error_WrongExtendedKeyLength WrongExtendedKeyLength; + struct wire_cst_Bip32Error_Base58 Base58; + struct wire_cst_Bip32Error_Hex Hex; + struct wire_cst_Bip32Error_InvalidPublicKeyHexLength InvalidPublicKeyHexLength; + struct wire_cst_Bip32Error_UnknownError UnknownError; +} Bip32ErrorKind; + +typedef struct wire_cst_bip_32_error { + int32_t tag; + union Bip32ErrorKind kind; +} wire_cst_bip_32_error; + +typedef struct wire_cst_Bip39Error_BadWordCount { + uint64_t word_count; +} wire_cst_Bip39Error_BadWordCount; + +typedef struct wire_cst_Bip39Error_UnknownWord { + uint64_t index; +} wire_cst_Bip39Error_UnknownWord; + +typedef struct wire_cst_Bip39Error_BadEntropyBitCount { + uint64_t bit_count; +} wire_cst_Bip39Error_BadEntropyBitCount; + +typedef struct wire_cst_Bip39Error_AmbiguousLanguages { + struct wire_cst_list_prim_u_8_strict *languages; +} wire_cst_Bip39Error_AmbiguousLanguages; + +typedef struct wire_cst_Bip39Error_Generic { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_Bip39Error_Generic; + +typedef union Bip39ErrorKind { + struct wire_cst_Bip39Error_BadWordCount BadWordCount; + struct wire_cst_Bip39Error_UnknownWord UnknownWord; + struct wire_cst_Bip39Error_BadEntropyBitCount BadEntropyBitCount; + struct wire_cst_Bip39Error_AmbiguousLanguages AmbiguousLanguages; + struct wire_cst_Bip39Error_Generic Generic; +} Bip39ErrorKind; + +typedef struct wire_cst_bip_39_error { + int32_t tag; + union Bip39ErrorKind kind; +} wire_cst_bip_39_error; -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_CalculateFeeError_Generic { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_CalculateFeeError_Generic; -typedef struct wire_cst_consensus_error { +typedef struct wire_cst_CalculateFeeError_MissingTxOut { + struct wire_cst_list_out_point *out_points; +} wire_cst_CalculateFeeError_MissingTxOut; + +typedef struct wire_cst_CalculateFeeError_NegativeFee { + struct wire_cst_list_prim_u_8_strict *amount; +} wire_cst_CalculateFeeError_NegativeFee; + +typedef union CalculateFeeErrorKind { + struct wire_cst_CalculateFeeError_Generic Generic; + struct wire_cst_CalculateFeeError_MissingTxOut MissingTxOut; + struct wire_cst_CalculateFeeError_NegativeFee NegativeFee; +} CalculateFeeErrorKind; + +typedef struct wire_cst_calculate_fee_error { int32_t tag; - union ConsensusErrorKind kind; -} wire_cst_consensus_error; + union CalculateFeeErrorKind kind; +} wire_cst_calculate_fee_error; + +typedef struct wire_cst_CannotConnectError_Include { + uint32_t height; +} wire_cst_CannotConnectError_Include; + +typedef union CannotConnectErrorKind { + struct wire_cst_CannotConnectError_Include Include; +} CannotConnectErrorKind; + +typedef struct wire_cst_cannot_connect_error { + int32_t tag; + union CannotConnectErrorKind kind; +} wire_cst_cannot_connect_error; + +typedef struct wire_cst_CreateTxError_TransactionNotFound { + struct wire_cst_list_prim_u_8_strict *txid; +} wire_cst_CreateTxError_TransactionNotFound; + +typedef struct wire_cst_CreateTxError_TransactionConfirmed { + struct wire_cst_list_prim_u_8_strict *txid; +} wire_cst_CreateTxError_TransactionConfirmed; + +typedef struct wire_cst_CreateTxError_IrreplaceableTransaction { + struct wire_cst_list_prim_u_8_strict *txid; +} wire_cst_CreateTxError_IrreplaceableTransaction; + +typedef struct wire_cst_CreateTxError_Generic { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_CreateTxError_Generic; + +typedef struct wire_cst_CreateTxError_Descriptor { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_CreateTxError_Descriptor; + +typedef struct wire_cst_CreateTxError_Policy { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_CreateTxError_Policy; + +typedef struct wire_cst_CreateTxError_SpendingPolicyRequired { + struct wire_cst_list_prim_u_8_strict *kind; +} wire_cst_CreateTxError_SpendingPolicyRequired; + +typedef struct wire_cst_CreateTxError_LockTime { + struct wire_cst_list_prim_u_8_strict *requested_time; + struct wire_cst_list_prim_u_8_strict *required_time; +} wire_cst_CreateTxError_LockTime; + +typedef struct wire_cst_CreateTxError_RbfSequenceCsv { + struct wire_cst_list_prim_u_8_strict *rbf; + struct wire_cst_list_prim_u_8_strict *csv; +} wire_cst_CreateTxError_RbfSequenceCsv; + +typedef struct wire_cst_CreateTxError_FeeTooLow { + struct wire_cst_list_prim_u_8_strict *fee_required; +} wire_cst_CreateTxError_FeeTooLow; + +typedef struct wire_cst_CreateTxError_FeeRateTooLow { + struct wire_cst_list_prim_u_8_strict *fee_rate_required; +} wire_cst_CreateTxError_FeeRateTooLow; + +typedef struct wire_cst_CreateTxError_OutputBelowDustLimit { + uint64_t index; +} wire_cst_CreateTxError_OutputBelowDustLimit; + +typedef struct wire_cst_CreateTxError_CoinSelection { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_CreateTxError_CoinSelection; + +typedef struct wire_cst_CreateTxError_InsufficientFunds { + uint64_t needed; + uint64_t available; +} wire_cst_CreateTxError_InsufficientFunds; + +typedef struct wire_cst_CreateTxError_Psbt { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_CreateTxError_Psbt; + +typedef struct wire_cst_CreateTxError_MissingKeyOrigin { + struct wire_cst_list_prim_u_8_strict *key; +} wire_cst_CreateTxError_MissingKeyOrigin; + +typedef struct wire_cst_CreateTxError_UnknownUtxo { + struct wire_cst_list_prim_u_8_strict *outpoint; +} wire_cst_CreateTxError_UnknownUtxo; + +typedef struct wire_cst_CreateTxError_MissingNonWitnessUtxo { + struct wire_cst_list_prim_u_8_strict *outpoint; +} wire_cst_CreateTxError_MissingNonWitnessUtxo; + +typedef struct wire_cst_CreateTxError_MiniscriptPsbt { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_CreateTxError_MiniscriptPsbt; + +typedef union CreateTxErrorKind { + struct wire_cst_CreateTxError_TransactionNotFound TransactionNotFound; + struct wire_cst_CreateTxError_TransactionConfirmed TransactionConfirmed; + struct wire_cst_CreateTxError_IrreplaceableTransaction IrreplaceableTransaction; + struct wire_cst_CreateTxError_Generic Generic; + struct wire_cst_CreateTxError_Descriptor Descriptor; + struct wire_cst_CreateTxError_Policy Policy; + struct wire_cst_CreateTxError_SpendingPolicyRequired SpendingPolicyRequired; + struct wire_cst_CreateTxError_LockTime LockTime; + struct wire_cst_CreateTxError_RbfSequenceCsv RbfSequenceCsv; + struct wire_cst_CreateTxError_FeeTooLow FeeTooLow; + struct wire_cst_CreateTxError_FeeRateTooLow FeeRateTooLow; + struct wire_cst_CreateTxError_OutputBelowDustLimit OutputBelowDustLimit; + struct wire_cst_CreateTxError_CoinSelection CoinSelection; + struct wire_cst_CreateTxError_InsufficientFunds InsufficientFunds; + struct wire_cst_CreateTxError_Psbt Psbt; + struct wire_cst_CreateTxError_MissingKeyOrigin MissingKeyOrigin; + struct wire_cst_CreateTxError_UnknownUtxo UnknownUtxo; + struct wire_cst_CreateTxError_MissingNonWitnessUtxo MissingNonWitnessUtxo; + struct wire_cst_CreateTxError_MiniscriptPsbt MiniscriptPsbt; +} CreateTxErrorKind; + +typedef struct wire_cst_create_tx_error { + int32_t tag; + union CreateTxErrorKind kind; +} wire_cst_create_tx_error; + +typedef struct wire_cst_CreateWithPersistError_Persist { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_CreateWithPersistError_Persist; + +typedef struct wire_cst_CreateWithPersistError_Descriptor { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_CreateWithPersistError_Descriptor; + +typedef union CreateWithPersistErrorKind { + struct wire_cst_CreateWithPersistError_Persist Persist; + struct wire_cst_CreateWithPersistError_Descriptor Descriptor; +} CreateWithPersistErrorKind; + +typedef struct wire_cst_create_with_persist_error { + int32_t tag; + union CreateWithPersistErrorKind kind; +} wire_cst_create_with_persist_error; typedef struct wire_cst_DescriptorError_Key { - struct wire_cst_list_prim_u_8_strict *field0; + struct wire_cst_list_prim_u_8_strict *error_message; } wire_cst_DescriptorError_Key; +typedef struct wire_cst_DescriptorError_Generic { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_DescriptorError_Generic; + typedef struct wire_cst_DescriptorError_Policy { - struct wire_cst_list_prim_u_8_strict *field0; + struct wire_cst_list_prim_u_8_strict *error_message; } wire_cst_DescriptorError_Policy; typedef struct wire_cst_DescriptorError_InvalidDescriptorCharacter { - uint8_t field0; + struct wire_cst_list_prim_u_8_strict *charector; } wire_cst_DescriptorError_InvalidDescriptorCharacter; typedef struct wire_cst_DescriptorError_Bip32 { - struct wire_cst_list_prim_u_8_strict *field0; + struct wire_cst_list_prim_u_8_strict *error_message; } wire_cst_DescriptorError_Bip32; typedef struct wire_cst_DescriptorError_Base58 { - struct wire_cst_list_prim_u_8_strict *field0; + struct wire_cst_list_prim_u_8_strict *error_message; } wire_cst_DescriptorError_Base58; typedef struct wire_cst_DescriptorError_Pk { - struct wire_cst_list_prim_u_8_strict *field0; + struct wire_cst_list_prim_u_8_strict *error_message; } wire_cst_DescriptorError_Pk; typedef struct wire_cst_DescriptorError_Miniscript { - struct wire_cst_list_prim_u_8_strict *field0; + struct wire_cst_list_prim_u_8_strict *error_message; } wire_cst_DescriptorError_Miniscript; typedef struct wire_cst_DescriptorError_Hex { - struct wire_cst_list_prim_u_8_strict *field0; + struct wire_cst_list_prim_u_8_strict *error_message; } wire_cst_DescriptorError_Hex; typedef union DescriptorErrorKind { struct wire_cst_DescriptorError_Key Key; + struct wire_cst_DescriptorError_Generic Generic; struct wire_cst_DescriptorError_Policy Policy; struct wire_cst_DescriptorError_InvalidDescriptorCharacter InvalidDescriptorCharacter; struct wire_cst_DescriptorError_Bip32 Bip32; @@ -441,688 +589,834 @@ typedef struct wire_cst_descriptor_error { 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_DescriptorKeyError_Parse { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_DescriptorKeyError_Parse; -typedef struct wire_cst_HexError_InvalidChar { - uint8_t field0; -} wire_cst_HexError_InvalidChar; +typedef struct wire_cst_DescriptorKeyError_Bip32 { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_DescriptorKeyError_Bip32; -typedef struct wire_cst_HexError_OddLengthString { - uintptr_t field0; -} wire_cst_HexError_OddLengthString; +typedef union DescriptorKeyErrorKind { + struct wire_cst_DescriptorKeyError_Parse Parse; + struct wire_cst_DescriptorKeyError_Bip32 Bip32; +} DescriptorKeyErrorKind; -typedef struct wire_cst_HexError_InvalidLength { - uintptr_t field0; - uintptr_t field1; -} wire_cst_HexError_InvalidLength; +typedef struct wire_cst_descriptor_key_error { + int32_t tag; + union DescriptorKeyErrorKind kind; +} wire_cst_descriptor_key_error; + +typedef struct wire_cst_ElectrumError_IOError { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_ElectrumError_IOError; + +typedef struct wire_cst_ElectrumError_Json { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_ElectrumError_Json; + +typedef struct wire_cst_ElectrumError_Hex { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_ElectrumError_Hex; + +typedef struct wire_cst_ElectrumError_Protocol { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_ElectrumError_Protocol; + +typedef struct wire_cst_ElectrumError_Bitcoin { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_ElectrumError_Bitcoin; + +typedef struct wire_cst_ElectrumError_InvalidResponse { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_ElectrumError_InvalidResponse; + +typedef struct wire_cst_ElectrumError_Message { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_ElectrumError_Message; + +typedef struct wire_cst_ElectrumError_InvalidDNSNameError { + struct wire_cst_list_prim_u_8_strict *domain; +} wire_cst_ElectrumError_InvalidDNSNameError; + +typedef struct wire_cst_ElectrumError_SharedIOError { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_ElectrumError_SharedIOError; + +typedef struct wire_cst_ElectrumError_CouldNotCreateConnection { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_ElectrumError_CouldNotCreateConnection; + +typedef union ElectrumErrorKind { + struct wire_cst_ElectrumError_IOError IOError; + struct wire_cst_ElectrumError_Json Json; + struct wire_cst_ElectrumError_Hex Hex; + struct wire_cst_ElectrumError_Protocol Protocol; + struct wire_cst_ElectrumError_Bitcoin Bitcoin; + struct wire_cst_ElectrumError_InvalidResponse InvalidResponse; + struct wire_cst_ElectrumError_Message Message; + struct wire_cst_ElectrumError_InvalidDNSNameError InvalidDNSNameError; + struct wire_cst_ElectrumError_SharedIOError SharedIOError; + struct wire_cst_ElectrumError_CouldNotCreateConnection CouldNotCreateConnection; +} ElectrumErrorKind; + +typedef struct wire_cst_electrum_error { + int32_t tag; + union ElectrumErrorKind kind; +} wire_cst_electrum_error; + +typedef struct wire_cst_EsploraError_Minreq { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_EsploraError_Minreq; + +typedef struct wire_cst_EsploraError_HttpResponse { + uint16_t status; + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_EsploraError_HttpResponse; + +typedef struct wire_cst_EsploraError_Parsing { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_EsploraError_Parsing; -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_EsploraError_StatusCode { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_EsploraError_StatusCode; -typedef struct wire_cst_hex_error { +typedef struct wire_cst_EsploraError_BitcoinEncoding { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_EsploraError_BitcoinEncoding; + +typedef struct wire_cst_EsploraError_HexToArray { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_EsploraError_HexToArray; + +typedef struct wire_cst_EsploraError_HexToBytes { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_EsploraError_HexToBytes; + +typedef struct wire_cst_EsploraError_HeaderHeightNotFound { + uint32_t height; +} wire_cst_EsploraError_HeaderHeightNotFound; + +typedef struct wire_cst_EsploraError_InvalidHttpHeaderName { + struct wire_cst_list_prim_u_8_strict *name; +} wire_cst_EsploraError_InvalidHttpHeaderName; + +typedef struct wire_cst_EsploraError_InvalidHttpHeaderValue { + struct wire_cst_list_prim_u_8_strict *value; +} wire_cst_EsploraError_InvalidHttpHeaderValue; + +typedef union EsploraErrorKind { + struct wire_cst_EsploraError_Minreq Minreq; + struct wire_cst_EsploraError_HttpResponse HttpResponse; + struct wire_cst_EsploraError_Parsing Parsing; + struct wire_cst_EsploraError_StatusCode StatusCode; + struct wire_cst_EsploraError_BitcoinEncoding BitcoinEncoding; + struct wire_cst_EsploraError_HexToArray HexToArray; + struct wire_cst_EsploraError_HexToBytes HexToBytes; + struct wire_cst_EsploraError_HeaderHeightNotFound HeaderHeightNotFound; + struct wire_cst_EsploraError_InvalidHttpHeaderName InvalidHttpHeaderName; + struct wire_cst_EsploraError_InvalidHttpHeaderValue InvalidHttpHeaderValue; +} EsploraErrorKind; + +typedef struct wire_cst_esplora_error { int32_t tag; - union HexErrorKind kind; -} wire_cst_hex_error; + union EsploraErrorKind kind; +} wire_cst_esplora_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_ExtractTxError_AbsurdFeeRate { + uint64_t fee_rate; +} wire_cst_ExtractTxError_AbsurdFeeRate; -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 union ExtractTxErrorKind { + struct wire_cst_ExtractTxError_AbsurdFeeRate AbsurdFeeRate; +} ExtractTxErrorKind; -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_extract_tx_error { + int32_t tag; + union ExtractTxErrorKind kind; +} wire_cst_extract_tx_error; -typedef struct wire_cst_BdkError_Hex { - struct wire_cst_hex_error *field0; -} wire_cst_BdkError_Hex; +typedef struct wire_cst_FromScriptError_WitnessProgram { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_FromScriptError_WitnessProgram; -typedef struct wire_cst_BdkError_Consensus { - struct wire_cst_consensus_error *field0; -} wire_cst_BdkError_Consensus; +typedef struct wire_cst_FromScriptError_WitnessVersion { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_FromScriptError_WitnessVersion; -typedef struct wire_cst_BdkError_VerifyTransaction { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_VerifyTransaction; +typedef union FromScriptErrorKind { + struct wire_cst_FromScriptError_WitnessProgram WitnessProgram; + struct wire_cst_FromScriptError_WitnessVersion WitnessVersion; +} FromScriptErrorKind; -typedef struct wire_cst_BdkError_Address { - struct wire_cst_address_error *field0; -} wire_cst_BdkError_Address; +typedef struct wire_cst_from_script_error { + int32_t tag; + union FromScriptErrorKind kind; +} wire_cst_from_script_error; -typedef struct wire_cst_BdkError_Descriptor { - struct wire_cst_descriptor_error *field0; -} wire_cst_BdkError_Descriptor; +typedef struct wire_cst_LoadWithPersistError_Persist { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_LoadWithPersistError_Persist; -typedef struct wire_cst_BdkError_InvalidU32Bytes { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_InvalidU32Bytes; +typedef struct wire_cst_LoadWithPersistError_InvalidChangeSet { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_LoadWithPersistError_InvalidChangeSet; -typedef struct wire_cst_BdkError_Generic { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Generic; +typedef union LoadWithPersistErrorKind { + struct wire_cst_LoadWithPersistError_Persist Persist; + struct wire_cst_LoadWithPersistError_InvalidChangeSet InvalidChangeSet; +} LoadWithPersistErrorKind; -typedef struct wire_cst_BdkError_OutputBelowDustLimit { - uintptr_t field0; -} wire_cst_BdkError_OutputBelowDustLimit; +typedef struct wire_cst_load_with_persist_error { + int32_t tag; + union LoadWithPersistErrorKind kind; +} wire_cst_load_with_persist_error; + +typedef struct wire_cst_PsbtError_InvalidKey { + struct wire_cst_list_prim_u_8_strict *key; +} wire_cst_PsbtError_InvalidKey; + +typedef struct wire_cst_PsbtError_DuplicateKey { + struct wire_cst_list_prim_u_8_strict *key; +} wire_cst_PsbtError_DuplicateKey; + +typedef struct wire_cst_PsbtError_NonStandardSighashType { + uint32_t sighash; +} wire_cst_PsbtError_NonStandardSighashType; + +typedef struct wire_cst_PsbtError_InvalidHash { + struct wire_cst_list_prim_u_8_strict *hash; +} wire_cst_PsbtError_InvalidHash; + +typedef struct wire_cst_PsbtError_CombineInconsistentKeySources { + struct wire_cst_list_prim_u_8_strict *xpub; +} wire_cst_PsbtError_CombineInconsistentKeySources; + +typedef struct wire_cst_PsbtError_ConsensusEncoding { + struct wire_cst_list_prim_u_8_strict *encoding_error; +} wire_cst_PsbtError_ConsensusEncoding; + +typedef struct wire_cst_PsbtError_InvalidPublicKey { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_PsbtError_InvalidPublicKey; + +typedef struct wire_cst_PsbtError_InvalidSecp256k1PublicKey { + struct wire_cst_list_prim_u_8_strict *secp256k1_error; +} wire_cst_PsbtError_InvalidSecp256k1PublicKey; + +typedef struct wire_cst_PsbtError_InvalidEcdsaSignature { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_PsbtError_InvalidEcdsaSignature; + +typedef struct wire_cst_PsbtError_InvalidTaprootSignature { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_PsbtError_InvalidTaprootSignature; + +typedef struct wire_cst_PsbtError_TapTree { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_PsbtError_TapTree; + +typedef struct wire_cst_PsbtError_Version { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_PsbtError_Version; + +typedef struct wire_cst_PsbtError_Io { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_PsbtError_Io; + +typedef union PsbtErrorKind { + struct wire_cst_PsbtError_InvalidKey InvalidKey; + struct wire_cst_PsbtError_DuplicateKey DuplicateKey; + struct wire_cst_PsbtError_NonStandardSighashType NonStandardSighashType; + struct wire_cst_PsbtError_InvalidHash InvalidHash; + struct wire_cst_PsbtError_CombineInconsistentKeySources CombineInconsistentKeySources; + struct wire_cst_PsbtError_ConsensusEncoding ConsensusEncoding; + struct wire_cst_PsbtError_InvalidPublicKey InvalidPublicKey; + struct wire_cst_PsbtError_InvalidSecp256k1PublicKey InvalidSecp256k1PublicKey; + struct wire_cst_PsbtError_InvalidEcdsaSignature InvalidEcdsaSignature; + struct wire_cst_PsbtError_InvalidTaprootSignature InvalidTaprootSignature; + struct wire_cst_PsbtError_TapTree TapTree; + struct wire_cst_PsbtError_Version Version; + struct wire_cst_PsbtError_Io Io; +} PsbtErrorKind; + +typedef struct wire_cst_psbt_error { + int32_t tag; + union PsbtErrorKind kind; +} wire_cst_psbt_error; -typedef struct wire_cst_BdkError_InsufficientFunds { - uint64_t needed; - uint64_t available; -} wire_cst_BdkError_InsufficientFunds; +typedef struct wire_cst_PsbtParseError_PsbtEncoding { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_PsbtParseError_PsbtEncoding; -typedef struct wire_cst_BdkError_FeeRateTooLow { - float needed; -} wire_cst_BdkError_FeeRateTooLow; +typedef struct wire_cst_PsbtParseError_Base64Encoding { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_PsbtParseError_Base64Encoding; -typedef struct wire_cst_BdkError_FeeTooLow { - uint64_t needed; -} wire_cst_BdkError_FeeTooLow; +typedef union PsbtParseErrorKind { + struct wire_cst_PsbtParseError_PsbtEncoding PsbtEncoding; + struct wire_cst_PsbtParseError_Base64Encoding Base64Encoding; +} PsbtParseErrorKind; -typedef struct wire_cst_BdkError_MissingKeyOrigin { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_MissingKeyOrigin; +typedef struct wire_cst_psbt_parse_error { + int32_t tag; + union PsbtParseErrorKind kind; +} wire_cst_psbt_parse_error; + +typedef struct wire_cst_SignerError_SighashP2wpkh { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_SignerError_SighashP2wpkh; + +typedef struct wire_cst_SignerError_SighashTaproot { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_SignerError_SighashTaproot; + +typedef struct wire_cst_SignerError_TxInputsIndexError { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_SignerError_TxInputsIndexError; + +typedef struct wire_cst_SignerError_MiniscriptPsbt { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_SignerError_MiniscriptPsbt; + +typedef struct wire_cst_SignerError_External { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_SignerError_External; + +typedef struct wire_cst_SignerError_Psbt { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_SignerError_Psbt; + +typedef union SignerErrorKind { + struct wire_cst_SignerError_SighashP2wpkh SighashP2wpkh; + struct wire_cst_SignerError_SighashTaproot SighashTaproot; + struct wire_cst_SignerError_TxInputsIndexError TxInputsIndexError; + struct wire_cst_SignerError_MiniscriptPsbt MiniscriptPsbt; + struct wire_cst_SignerError_External External; + struct wire_cst_SignerError_Psbt Psbt; +} SignerErrorKind; + +typedef struct wire_cst_signer_error { + int32_t tag; + union SignerErrorKind kind; +} wire_cst_signer_error; -typedef struct wire_cst_BdkError_Key { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Key; +typedef struct wire_cst_SqliteError_Sqlite { + struct wire_cst_list_prim_u_8_strict *rusqlite_error; +} wire_cst_SqliteError_Sqlite; -typedef struct wire_cst_BdkError_SpendingPolicyRequired { - int32_t field0; -} wire_cst_BdkError_SpendingPolicyRequired; +typedef union SqliteErrorKind { + struct wire_cst_SqliteError_Sqlite Sqlite; +} SqliteErrorKind; -typedef struct wire_cst_BdkError_InvalidPolicyPathError { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_InvalidPolicyPathError; +typedef struct wire_cst_sqlite_error { + int32_t tag; + union SqliteErrorKind kind; +} wire_cst_sqlite_error; + +typedef struct wire_cst_sync_progress { + uint64_t spks_consumed; + uint64_t spks_remaining; + uint64_t txids_consumed; + uint64_t txids_remaining; + uint64_t outpoints_consumed; + uint64_t outpoints_remaining; +} wire_cst_sync_progress; + +typedef struct wire_cst_TransactionError_InvalidChecksum { + struct wire_cst_list_prim_u_8_strict *expected; + struct wire_cst_list_prim_u_8_strict *actual; +} wire_cst_TransactionError_InvalidChecksum; -typedef struct wire_cst_BdkError_Signer { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Signer; +typedef struct wire_cst_TransactionError_UnsupportedSegwitFlag { + uint8_t flag; +} wire_cst_TransactionError_UnsupportedSegwitFlag; -typedef struct wire_cst_BdkError_InvalidNetwork { - int32_t requested; - int32_t found; -} wire_cst_BdkError_InvalidNetwork; +typedef union TransactionErrorKind { + struct wire_cst_TransactionError_InvalidChecksum InvalidChecksum; + struct wire_cst_TransactionError_UnsupportedSegwitFlag UnsupportedSegwitFlag; +} TransactionErrorKind; -typedef struct wire_cst_BdkError_InvalidOutpoint { - struct wire_cst_out_point *field0; -} wire_cst_BdkError_InvalidOutpoint; +typedef struct wire_cst_transaction_error { + int32_t tag; + union TransactionErrorKind kind; +} wire_cst_transaction_error; -typedef struct wire_cst_BdkError_Encode { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Encode; +typedef struct wire_cst_TxidParseError_InvalidTxid { + struct wire_cst_list_prim_u_8_strict *txid; +} wire_cst_TxidParseError_InvalidTxid; -typedef struct wire_cst_BdkError_Miniscript { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Miniscript; +typedef union TxidParseErrorKind { + struct wire_cst_TxidParseError_InvalidTxid InvalidTxid; +} TxidParseErrorKind; -typedef struct wire_cst_BdkError_MiniscriptPsbt { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_MiniscriptPsbt; +typedef struct wire_cst_txid_parse_error { + int32_t tag; + union TxidParseErrorKind kind; +} wire_cst_txid_parse_error; -typedef struct wire_cst_BdkError_Bip32 { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Bip32; +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_as_string(struct wire_cst_ffi_address *that); -typedef struct wire_cst_BdkError_Bip39 { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Bip39; +void frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_from_script(int64_t port_, + struct wire_cst_ffi_script_buf *script, + int32_t network); -typedef struct wire_cst_BdkError_Secp256k1 { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Secp256k1; +void frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_from_string(int64_t port_, + struct wire_cst_list_prim_u_8_strict *address, + int32_t network); -typedef struct wire_cst_BdkError_Json { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Json; +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_is_valid_for_network(struct wire_cst_ffi_address *that, + int32_t network); -typedef struct wire_cst_BdkError_Psbt { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Psbt; +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_script(struct wire_cst_ffi_address *opaque); -typedef struct wire_cst_BdkError_PsbtParse { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_PsbtParse; +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_to_qr_uri(struct wire_cst_ffi_address *that); -typedef struct wire_cst_BdkError_MissingCachedScripts { - uintptr_t field0; - uintptr_t field1; -} wire_cst_BdkError_MissingCachedScripts; +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_as_string(struct wire_cst_ffi_psbt *that); -typedef struct wire_cst_BdkError_Electrum { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Electrum; +void frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_combine(int64_t port_, + struct wire_cst_ffi_psbt *opaque, + struct wire_cst_ffi_psbt *other); -typedef struct wire_cst_BdkError_Esplora { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Esplora; +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_extract_tx(struct wire_cst_ffi_psbt *opaque); -typedef struct wire_cst_BdkError_Sled { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Sled; +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_fee_amount(struct wire_cst_ffi_psbt *that); -typedef struct wire_cst_BdkError_Rpc { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Rpc; +void frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_from_str(int64_t port_, + struct wire_cst_list_prim_u_8_strict *psbt_base64); -typedef struct wire_cst_BdkError_Rusqlite { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Rusqlite; +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_json_serialize(struct wire_cst_ffi_psbt *that); -typedef struct wire_cst_BdkError_InvalidInput { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_InvalidInput; +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_serialize(struct wire_cst_ffi_psbt *that); -typedef struct wire_cst_BdkError_InvalidLockTime { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_InvalidLockTime; +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_script_buf_as_string(struct wire_cst_ffi_script_buf *that); -typedef struct wire_cst_BdkError_InvalidTransaction { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_InvalidTransaction; - -typedef union BdkErrorKind { - struct wire_cst_BdkError_Hex Hex; - struct wire_cst_BdkError_Consensus Consensus; - struct wire_cst_BdkError_VerifyTransaction VerifyTransaction; - struct wire_cst_BdkError_Address Address; - struct wire_cst_BdkError_Descriptor Descriptor; - struct wire_cst_BdkError_InvalidU32Bytes InvalidU32Bytes; - struct wire_cst_BdkError_Generic Generic; - struct wire_cst_BdkError_OutputBelowDustLimit OutputBelowDustLimit; - struct wire_cst_BdkError_InsufficientFunds InsufficientFunds; - struct wire_cst_BdkError_FeeRateTooLow FeeRateTooLow; - struct wire_cst_BdkError_FeeTooLow FeeTooLow; - struct wire_cst_BdkError_MissingKeyOrigin MissingKeyOrigin; - struct wire_cst_BdkError_Key Key; - struct wire_cst_BdkError_SpendingPolicyRequired SpendingPolicyRequired; - struct wire_cst_BdkError_InvalidPolicyPathError InvalidPolicyPathError; - struct wire_cst_BdkError_Signer Signer; - struct wire_cst_BdkError_InvalidNetwork InvalidNetwork; - struct wire_cst_BdkError_InvalidOutpoint InvalidOutpoint; - struct wire_cst_BdkError_Encode Encode; - struct wire_cst_BdkError_Miniscript Miniscript; - struct wire_cst_BdkError_MiniscriptPsbt MiniscriptPsbt; - struct wire_cst_BdkError_Bip32 Bip32; - struct wire_cst_BdkError_Bip39 Bip39; - struct wire_cst_BdkError_Secp256k1 Secp256k1; - struct wire_cst_BdkError_Json Json; - struct wire_cst_BdkError_Psbt Psbt; - struct wire_cst_BdkError_PsbtParse PsbtParse; - struct wire_cst_BdkError_MissingCachedScripts MissingCachedScripts; - struct wire_cst_BdkError_Electrum Electrum; - struct wire_cst_BdkError_Esplora Esplora; - struct wire_cst_BdkError_Sled Sled; - struct wire_cst_BdkError_Rpc Rpc; - struct wire_cst_BdkError_Rusqlite Rusqlite; - struct wire_cst_BdkError_InvalidInput InvalidInput; - struct wire_cst_BdkError_InvalidLockTime InvalidLockTime; - struct wire_cst_BdkError_InvalidTransaction InvalidTransaction; -} BdkErrorKind; - -typedef struct wire_cst_bdk_error { - int32_t tag; - union BdkErrorKind kind; -} wire_cst_bdk_error; +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_script_buf_empty(void); -typedef struct wire_cst_Payload_PubkeyHash { - struct wire_cst_list_prim_u_8_strict *pubkey_hash; -} wire_cst_Payload_PubkeyHash; +void frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_script_buf_with_capacity(int64_t port_, + uintptr_t capacity); -typedef struct wire_cst_Payload_ScriptHash { - struct wire_cst_list_prim_u_8_strict *script_hash; -} wire_cst_Payload_ScriptHash; +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_compute_txid(struct wire_cst_ffi_transaction *that); -typedef struct wire_cst_Payload_WitnessProgram { - int32_t version; - struct wire_cst_list_prim_u_8_strict *program; -} wire_cst_Payload_WitnessProgram; +void frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_from_bytes(int64_t port_, + struct wire_cst_list_prim_u_8_loose *transaction_bytes); -typedef union PayloadKind { - struct wire_cst_Payload_PubkeyHash PubkeyHash; - struct wire_cst_Payload_ScriptHash ScriptHash; - struct wire_cst_Payload_WitnessProgram WitnessProgram; -} PayloadKind; +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_input(struct wire_cst_ffi_transaction *that); -typedef struct wire_cst_payload { - int32_t tag; - union PayloadKind kind; -} wire_cst_payload; +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_is_coinbase(struct wire_cst_ffi_transaction *that); -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; +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_is_explicitly_rbf(struct wire_cst_ffi_transaction *that); -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; +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_is_lock_time_enabled(struct wire_cst_ffi_transaction *that); -void frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_broadcast(int64_t port_, - struct wire_cst_bdk_blockchain *that, - struct wire_cst_bdk_transaction *transaction); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_lock_time(struct wire_cst_ffi_transaction *that); -void frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_create(int64_t port_, - struct wire_cst_blockchain_config *blockchain_config); +void frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_new(int64_t port_, + int32_t version, + struct wire_cst_lock_time *lock_time, + struct wire_cst_list_tx_in *input, + struct wire_cst_list_tx_out *output); -void frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_estimate_fee(int64_t port_, - struct wire_cst_bdk_blockchain *that, - uint64_t target); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_output(struct wire_cst_ffi_transaction *that); -void frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_get_block_hash(int64_t port_, - struct wire_cst_bdk_blockchain *that, - uint32_t height); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_serialize(struct wire_cst_ffi_transaction *that); -void frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_get_height(int64_t port_, - struct wire_cst_bdk_blockchain *that); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_version(struct wire_cst_ffi_transaction *that); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_as_string(struct wire_cst_bdk_descriptor *that); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_vsize(struct wire_cst_ffi_transaction *that); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weight(struct wire_cst_bdk_descriptor *that); +void frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_weight(int64_t port_, + struct wire_cst_ffi_transaction *that); -void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new(int64_t port_, +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_as_string(struct wire_cst_ffi_descriptor *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_max_satisfaction_weight(struct wire_cst_ffi_descriptor *that); + +void frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new(int64_t port_, struct wire_cst_list_prim_u_8_strict *descriptor, int32_t network); -void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44(int64_t port_, - struct wire_cst_bdk_descriptor_secret_key *secret_key, +void frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip44(int64_t port_, + struct wire_cst_ffi_descriptor_secret_key *secret_key, int32_t keychain_kind, int32_t network); -void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44_public(int64_t port_, - struct wire_cst_bdk_descriptor_public_key *public_key, +void frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip44_public(int64_t port_, + struct wire_cst_ffi_descriptor_public_key *public_key, struct wire_cst_list_prim_u_8_strict *fingerprint, int32_t keychain_kind, int32_t network); -void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip49(int64_t port_, - struct wire_cst_bdk_descriptor_secret_key *secret_key, +void frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip49(int64_t port_, + struct wire_cst_ffi_descriptor_secret_key *secret_key, int32_t keychain_kind, int32_t network); -void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip49_public(int64_t port_, - struct wire_cst_bdk_descriptor_public_key *public_key, +void frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip49_public(int64_t port_, + struct wire_cst_ffi_descriptor_public_key *public_key, struct wire_cst_list_prim_u_8_strict *fingerprint, int32_t keychain_kind, int32_t network); -void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip84(int64_t port_, - struct wire_cst_bdk_descriptor_secret_key *secret_key, +void frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip84(int64_t port_, + struct wire_cst_ffi_descriptor_secret_key *secret_key, int32_t keychain_kind, int32_t network); -void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip84_public(int64_t port_, - struct wire_cst_bdk_descriptor_public_key *public_key, +void frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip84_public(int64_t port_, + struct wire_cst_ffi_descriptor_public_key *public_key, struct wire_cst_list_prim_u_8_strict *fingerprint, int32_t keychain_kind, int32_t network); -void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip86(int64_t port_, - struct wire_cst_bdk_descriptor_secret_key *secret_key, +void frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip86(int64_t port_, + struct wire_cst_ffi_descriptor_secret_key *secret_key, int32_t keychain_kind, int32_t network); -void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip86_public(int64_t port_, - struct wire_cst_bdk_descriptor_public_key *public_key, +void frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip86_public(int64_t port_, + struct wire_cst_ffi_descriptor_public_key *public_key, struct wire_cst_list_prim_u_8_strict *fingerprint, int32_t keychain_kind, int32_t network); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_to_string_private(struct wire_cst_bdk_descriptor *that); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_to_string_with_secret(struct wire_cst_ffi_descriptor *that); + +void frbgen_bdk_flutter_wire__crate__api__electrum__ffi_electrum_client_broadcast(int64_t port_, + struct wire_cst_ffi_electrum_client *opaque, + struct wire_cst_ffi_transaction *transaction); + +void frbgen_bdk_flutter_wire__crate__api__electrum__ffi_electrum_client_full_scan(int64_t port_, + struct wire_cst_ffi_electrum_client *opaque, + struct wire_cst_ffi_full_scan_request *request, + uint64_t stop_gap, + uint64_t batch_size, + bool fetch_prev_txouts); + +void frbgen_bdk_flutter_wire__crate__api__electrum__ffi_electrum_client_new(int64_t port_, + struct wire_cst_list_prim_u_8_strict *url); + +void frbgen_bdk_flutter_wire__crate__api__electrum__ffi_electrum_client_sync(int64_t port_, + struct wire_cst_ffi_electrum_client *opaque, + struct wire_cst_ffi_sync_request *request, + uint64_t batch_size, + bool fetch_prev_txouts); + +void frbgen_bdk_flutter_wire__crate__api__esplora__ffi_esplora_client_broadcast(int64_t port_, + struct wire_cst_ffi_esplora_client *opaque, + struct wire_cst_ffi_transaction *transaction); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_derivation_path_as_string(struct wire_cst_bdk_derivation_path *that); +void frbgen_bdk_flutter_wire__crate__api__esplora__ffi_esplora_client_full_scan(int64_t port_, + struct wire_cst_ffi_esplora_client *opaque, + struct wire_cst_ffi_full_scan_request *request, + uint64_t stop_gap, + uint64_t parallel_requests); -void frbgen_bdk_flutter_wire__crate__api__key__bdk_derivation_path_from_string(int64_t port_, +void frbgen_bdk_flutter_wire__crate__api__esplora__ffi_esplora_client_new(int64_t port_, + struct wire_cst_list_prim_u_8_strict *url); + +void frbgen_bdk_flutter_wire__crate__api__esplora__ffi_esplora_client_sync(int64_t port_, + struct wire_cst_ffi_esplora_client *opaque, + struct wire_cst_ffi_sync_request *request, + uint64_t parallel_requests); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__ffi_derivation_path_as_string(struct wire_cst_ffi_derivation_path *that); + +void frbgen_bdk_flutter_wire__crate__api__key__ffi_derivation_path_from_string(int64_t port_, struct wire_cst_list_prim_u_8_strict *path); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_as_string(struct wire_cst_bdk_descriptor_public_key *that); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_public_key_as_string(struct wire_cst_ffi_descriptor_public_key *that); -void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_derive(int64_t port_, - struct wire_cst_bdk_descriptor_public_key *ptr, - struct wire_cst_bdk_derivation_path *path); +void frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_public_key_derive(int64_t port_, + struct wire_cst_ffi_descriptor_public_key *opaque, + struct wire_cst_ffi_derivation_path *path); -void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_extend(int64_t port_, - struct wire_cst_bdk_descriptor_public_key *ptr, - struct wire_cst_bdk_derivation_path *path); +void frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_public_key_extend(int64_t port_, + struct wire_cst_ffi_descriptor_public_key *opaque, + struct wire_cst_ffi_derivation_path *path); -void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_from_string(int64_t port_, +void frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_public_key_from_string(int64_t port_, struct wire_cst_list_prim_u_8_strict *public_key); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_as_public(struct wire_cst_bdk_descriptor_secret_key *ptr); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_as_public(struct wire_cst_ffi_descriptor_secret_key *opaque); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_as_string(struct wire_cst_bdk_descriptor_secret_key *that); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_as_string(struct wire_cst_ffi_descriptor_secret_key *that); -void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_create(int64_t port_, +void frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_create(int64_t port_, int32_t network, - struct wire_cst_bdk_mnemonic *mnemonic, + struct wire_cst_ffi_mnemonic *mnemonic, struct wire_cst_list_prim_u_8_strict *password); -void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_derive(int64_t port_, - struct wire_cst_bdk_descriptor_secret_key *ptr, - struct wire_cst_bdk_derivation_path *path); +void frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_derive(int64_t port_, + struct wire_cst_ffi_descriptor_secret_key *opaque, + struct wire_cst_ffi_derivation_path *path); -void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_extend(int64_t port_, - struct wire_cst_bdk_descriptor_secret_key *ptr, - struct wire_cst_bdk_derivation_path *path); +void frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_extend(int64_t port_, + struct wire_cst_ffi_descriptor_secret_key *opaque, + struct wire_cst_ffi_derivation_path *path); -void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_from_string(int64_t port_, +void frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_from_string(int64_t port_, struct wire_cst_list_prim_u_8_strict *secret_key); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_secret_bytes(struct wire_cst_bdk_descriptor_secret_key *that); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_secret_bytes(struct wire_cst_ffi_descriptor_secret_key *that); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_as_string(struct wire_cst_bdk_mnemonic *that); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__ffi_mnemonic_as_string(struct wire_cst_ffi_mnemonic *that); -void frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_entropy(int64_t port_, +void frbgen_bdk_flutter_wire__crate__api__key__ffi_mnemonic_from_entropy(int64_t port_, struct wire_cst_list_prim_u_8_loose *entropy); -void frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_string(int64_t port_, +void frbgen_bdk_flutter_wire__crate__api__key__ffi_mnemonic_from_string(int64_t port_, struct wire_cst_list_prim_u_8_strict *mnemonic); -void frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_new(int64_t port_, int32_t word_count); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_as_string(struct wire_cst_bdk_psbt *that); +void frbgen_bdk_flutter_wire__crate__api__key__ffi_mnemonic_new(int64_t port_, int32_t word_count); -void frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_combine(int64_t port_, - struct wire_cst_bdk_psbt *ptr, - struct wire_cst_bdk_psbt *other); +void frbgen_bdk_flutter_wire__crate__api__store__ffi_connection_new(int64_t port_, + struct wire_cst_list_prim_u_8_strict *path); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_extract_tx(struct wire_cst_bdk_psbt *ptr); +void frbgen_bdk_flutter_wire__crate__api__store__ffi_connection_new_in_memory(int64_t port_); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_fee_amount(struct wire_cst_bdk_psbt *that); +void frbgen_bdk_flutter_wire__crate__api__tx_builder__finish_bump_fee_tx_builder(int64_t port_, + struct wire_cst_list_prim_u_8_strict *txid, + struct wire_cst_fee_rate *fee_rate, + struct wire_cst_ffi_wallet *wallet, + bool enable_rbf, + uint32_t *n_sequence); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_fee_rate(struct wire_cst_bdk_psbt *that); +void frbgen_bdk_flutter_wire__crate__api__tx_builder__tx_builder_finish(int64_t port_, + struct wire_cst_ffi_wallet *wallet, + struct wire_cst_list_record_ffi_script_buf_u_64 *recipients, + struct wire_cst_list_out_point *utxos, + struct wire_cst_list_out_point *un_spendable, + int32_t change_policy, + bool manually_selected_only, + struct wire_cst_fee_rate *fee_rate, + uint64_t *fee_absolute, + bool drain_wallet, + struct wire_cst_record_map_string_list_prim_usize_strict_keychain_kind *policy_path, + struct wire_cst_ffi_script_buf *drain_to, + struct wire_cst_rbf_value *rbf, + struct wire_cst_list_prim_u_8_loose *data); -void frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_from_str(int64_t port_, - struct wire_cst_list_prim_u_8_strict *psbt_base64); +void frbgen_bdk_flutter_wire__crate__api__types__change_spend_policy_default(int64_t port_); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_json_serialize(struct wire_cst_bdk_psbt *that); +void frbgen_bdk_flutter_wire__crate__api__types__ffi_full_scan_request_builder_build(int64_t port_, + struct wire_cst_ffi_full_scan_request_builder *that); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_serialize(struct wire_cst_bdk_psbt *that); +void frbgen_bdk_flutter_wire__crate__api__types__ffi_full_scan_request_builder_inspect_spks_for_all_keychains(int64_t port_, + struct wire_cst_ffi_full_scan_request_builder *that, + const void *inspector); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_txid(struct wire_cst_bdk_psbt *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_address_as_string(struct wire_cst_bdk_address *that); - -void frbgen_bdk_flutter_wire__crate__api__types__bdk_address_from_script(int64_t port_, - struct wire_cst_bdk_script_buf *script, - int32_t network); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__ffi_policy_id(struct wire_cst_ffi_policy *that); -void frbgen_bdk_flutter_wire__crate__api__types__bdk_address_from_string(int64_t port_, - struct wire_cst_list_prim_u_8_strict *address, - int32_t network); +void frbgen_bdk_flutter_wire__crate__api__types__ffi_sync_request_builder_build(int64_t port_, + struct wire_cst_ffi_sync_request_builder *that); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_address_is_valid_for_network(struct wire_cst_bdk_address *that, - int32_t network); +void frbgen_bdk_flutter_wire__crate__api__types__ffi_sync_request_builder_inspect_spks(int64_t port_, + struct wire_cst_ffi_sync_request_builder *that, + const void *inspector); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_address_network(struct wire_cst_bdk_address *that); +void frbgen_bdk_flutter_wire__crate__api__types__network_default(int64_t port_); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_address_payload(struct wire_cst_bdk_address *that); +void frbgen_bdk_flutter_wire__crate__api__types__sign_options_default(int64_t port_); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_address_script(struct wire_cst_bdk_address *ptr); +void frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_apply_update(int64_t port_, + struct wire_cst_ffi_wallet *that, + struct wire_cst_ffi_update *update); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_address_to_qr_uri(struct wire_cst_bdk_address *that); +void frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_calculate_fee(int64_t port_, + struct wire_cst_ffi_wallet *opaque, + struct wire_cst_ffi_transaction *tx); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_as_string(struct wire_cst_bdk_script_buf *that); +void frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_calculate_fee_rate(int64_t port_, + struct wire_cst_ffi_wallet *opaque, + struct wire_cst_ffi_transaction *tx); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_empty(void); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_get_balance(struct wire_cst_ffi_wallet *that); -void frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_from_hex(int64_t port_, - struct wire_cst_list_prim_u_8_strict *s); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_get_tx(struct wire_cst_ffi_wallet *that, + struct wire_cst_list_prim_u_8_strict *txid); -void frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_with_capacity(int64_t port_, - uintptr_t capacity); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_is_mine(struct wire_cst_ffi_wallet *that, + struct wire_cst_ffi_script_buf *script); -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_from_bytes(int64_t port_, - struct wire_cst_list_prim_u_8_loose *transaction_bytes); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_list_output(struct wire_cst_ffi_wallet *that); -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_input(int64_t port_, - struct wire_cst_bdk_transaction *that); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_list_unspent(struct wire_cst_ffi_wallet *that); -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_coin_base(int64_t port_, - struct wire_cst_bdk_transaction *that); +void frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_load(int64_t port_, + struct wire_cst_ffi_descriptor *descriptor, + struct wire_cst_ffi_descriptor *change_descriptor, + struct wire_cst_ffi_connection *connection); -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_explicitly_rbf(int64_t port_, - struct wire_cst_bdk_transaction *that); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_network(struct wire_cst_ffi_wallet *that); -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_lock_time_enabled(int64_t port_, - struct wire_cst_bdk_transaction *that); +void frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_new(int64_t port_, + struct wire_cst_ffi_descriptor *descriptor, + struct wire_cst_ffi_descriptor *change_descriptor, + int32_t network, + struct wire_cst_ffi_connection *connection); -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_lock_time(int64_t port_, - struct wire_cst_bdk_transaction *that); +void frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_persist(int64_t port_, + struct wire_cst_ffi_wallet *opaque, + struct wire_cst_ffi_connection *connection); -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_new(int64_t port_, - int32_t version, - struct wire_cst_lock_time *lock_time, - struct wire_cst_list_tx_in *input, - struct wire_cst_list_tx_out *output); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_policies(struct wire_cst_ffi_wallet *opaque, + int32_t keychain_kind); -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_output(int64_t port_, - struct wire_cst_bdk_transaction *that); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_reveal_next_address(struct wire_cst_ffi_wallet *opaque, + int32_t keychain_kind); -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_serialize(int64_t port_, - struct wire_cst_bdk_transaction *that); +void frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_sign(int64_t port_, + struct wire_cst_ffi_wallet *opaque, + struct wire_cst_ffi_psbt *psbt, + struct wire_cst_sign_options *sign_options); -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_size(int64_t port_, - struct wire_cst_bdk_transaction *that); +void frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_start_full_scan(int64_t port_, + struct wire_cst_ffi_wallet *that); -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_txid(int64_t port_, - struct wire_cst_bdk_transaction *that); +void frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_start_sync_with_revealed_spks(int64_t port_, + struct wire_cst_ffi_wallet *that); -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_version(int64_t port_, - struct wire_cst_bdk_transaction *that); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_transactions(struct wire_cst_ffi_wallet *that); -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_vsize(int64_t port_, - struct wire_cst_bdk_transaction *that); +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_corebitcoinAddress(const void *ptr); -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_weight(int64_t port_, - struct wire_cst_bdk_transaction *that); +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_corebitcoinAddress(const void *ptr); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_address(struct wire_cst_bdk_wallet *ptr, - struct wire_cst_address_index *address_index); +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_corebitcoinTransaction(const void *ptr); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_balance(struct wire_cst_bdk_wallet *that); +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_corebitcoinTransaction(const void *ptr); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychain(struct wire_cst_bdk_wallet *ptr, - int32_t keychain); +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_electrumBdkElectrumClientbdk_electrumelectrum_clientClient(const void *ptr); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_internal_address(struct wire_cst_bdk_wallet *ptr, - struct wire_cst_address_index *address_index); +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_electrumBdkElectrumClientbdk_electrumelectrum_clientClient(const void *ptr); -void frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_psbt_input(int64_t port_, - struct wire_cst_bdk_wallet *that, - struct wire_cst_local_utxo *utxo, - bool only_witness_utxo, - struct wire_cst_psbt_sig_hash_type *sighash_type); +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_esploraesplora_clientBlockingClient(const void *ptr); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_is_mine(struct wire_cst_bdk_wallet *that, - struct wire_cst_bdk_script_buf *script); +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_esploraesplora_clientBlockingClient(const void *ptr); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_list_transactions(struct wire_cst_bdk_wallet *that, - bool include_raw); +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletUpdate(const void *ptr); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_list_unspent(struct wire_cst_bdk_wallet *that); +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletUpdate(const void *ptr); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_network(struct wire_cst_bdk_wallet *that); +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletbitcoinbip32DerivationPath(const void *ptr); -void frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_new(int64_t port_, - struct wire_cst_bdk_descriptor *descriptor, - struct wire_cst_bdk_descriptor *change_descriptor, - int32_t network, - struct wire_cst_database_config *database_config); +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletbitcoinbip32DerivationPath(const void *ptr); -void frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sign(int64_t port_, - struct wire_cst_bdk_wallet *ptr, - struct wire_cst_bdk_psbt *psbt, - struct wire_cst_sign_options *sign_options); +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletdescriptorExtendedDescriptor(const void *ptr); -void frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sync(int64_t port_, - struct wire_cst_bdk_wallet *ptr, - struct wire_cst_bdk_blockchain *blockchain); +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletdescriptorExtendedDescriptor(const void *ptr); -void frbgen_bdk_flutter_wire__crate__api__wallet__finish_bump_fee_tx_builder(int64_t port_, - struct wire_cst_list_prim_u_8_strict *txid, - float fee_rate, - struct wire_cst_bdk_address *allow_shrinking, - struct wire_cst_bdk_wallet *wallet, - bool enable_rbf, - uint32_t *n_sequence); +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletdescriptorPolicy(const void *ptr); -void frbgen_bdk_flutter_wire__crate__api__wallet__tx_builder_finish(int64_t port_, - struct wire_cst_bdk_wallet *wallet, - struct wire_cst_list_script_amount *recipients, - struct wire_cst_list_out_point *utxos, - struct wire_cst_record_out_point_input_usize *foreign_utxo, - struct wire_cst_list_out_point *un_spendable, - int32_t change_policy, - bool manually_selected_only, - float *fee_rate, - uint64_t *fee_absolute, - bool drain_wallet, - struct wire_cst_bdk_script_buf *drain_to, - struct wire_cst_rbf_value *rbf, - struct wire_cst_list_prim_u_8_loose *data); +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletdescriptorPolicy(const void *ptr); -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddress(const void *ptr); +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysDescriptorPublicKey(const void *ptr); -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress(const void *ptr); +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysDescriptorPublicKey(const void *ptr); -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath(const void *ptr); +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysDescriptorSecretKey(const void *ptr); -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath(const void *ptr); +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysDescriptorSecretKey(const void *ptr); -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkblockchainAnyBlockchain(const void *ptr); +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysKeyMap(const void *ptr); -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkblockchainAnyBlockchain(const void *ptr); +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysKeyMap(const void *ptr); -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor(const void *ptr); +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysbip39Mnemonic(const void *ptr); -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor(const void *ptr); +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysbip39Mnemonic(const void *ptr); -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorPublicKey(const void *ptr); +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestBuilderbdk_walletKeychainKind(const void *ptr); -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorPublicKey(const void *ptr); +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestBuilderbdk_walletKeychainKind(const void *ptr); -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorSecretKey(const void *ptr); +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestbdk_walletKeychainKind(const void *ptr); -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorSecretKey(const void *ptr); +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestbdk_walletKeychainKind(const void *ptr); -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysKeyMap(const void *ptr); +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestBuilderbdk_walletKeychainKindu32(const void *ptr); -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysKeyMap(const void *ptr); +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestBuilderbdk_walletKeychainKindu32(const void *ptr); -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysbip39Mnemonic(const void *ptr); +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestbdk_walletKeychainKindu32(const void *ptr); -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysbip39Mnemonic(const void *ptr); +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestbdk_walletKeychainKindu32(const void *ptr); -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase(const void *ptr); +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdk_corebitcoinpsbtPsbt(const void *ptr); -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase(const void *ptr); +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_corebitcoinpsbtPsbt(const void *ptr); -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction(const void *ptr); +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdk_walletPersistedWalletbdk_walletrusqliteConnection(const void *ptr); -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction(const void *ptr); +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_walletPersistedWalletbdk_walletrusqliteConnection(const void *ptr); -struct wire_cst_address_error *frbgen_bdk_flutter_cst_new_box_autoadd_address_error(void); +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdk_walletrusqliteConnection(const void *ptr); -struct wire_cst_address_index *frbgen_bdk_flutter_cst_new_box_autoadd_address_index(void); +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_walletrusqliteConnection(const void *ptr); -struct wire_cst_bdk_address *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_address(void); +struct wire_cst_confirmation_block_time *frbgen_bdk_flutter_cst_new_box_autoadd_confirmation_block_time(void); -struct wire_cst_bdk_blockchain *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_blockchain(void); +struct wire_cst_fee_rate *frbgen_bdk_flutter_cst_new_box_autoadd_fee_rate(void); -struct wire_cst_bdk_derivation_path *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_derivation_path(void); +struct wire_cst_ffi_address *frbgen_bdk_flutter_cst_new_box_autoadd_ffi_address(void); -struct wire_cst_bdk_descriptor *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor(void); +struct wire_cst_ffi_canonical_tx *frbgen_bdk_flutter_cst_new_box_autoadd_ffi_canonical_tx(void); -struct wire_cst_bdk_descriptor_public_key *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor_public_key(void); +struct wire_cst_ffi_connection *frbgen_bdk_flutter_cst_new_box_autoadd_ffi_connection(void); -struct wire_cst_bdk_descriptor_secret_key *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor_secret_key(void); +struct wire_cst_ffi_derivation_path *frbgen_bdk_flutter_cst_new_box_autoadd_ffi_derivation_path(void); -struct wire_cst_bdk_mnemonic *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_mnemonic(void); +struct wire_cst_ffi_descriptor *frbgen_bdk_flutter_cst_new_box_autoadd_ffi_descriptor(void); -struct wire_cst_bdk_psbt *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_psbt(void); +struct wire_cst_ffi_descriptor_public_key *frbgen_bdk_flutter_cst_new_box_autoadd_ffi_descriptor_public_key(void); -struct wire_cst_bdk_script_buf *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_script_buf(void); +struct wire_cst_ffi_descriptor_secret_key *frbgen_bdk_flutter_cst_new_box_autoadd_ffi_descriptor_secret_key(void); -struct wire_cst_bdk_transaction *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_transaction(void); +struct wire_cst_ffi_electrum_client *frbgen_bdk_flutter_cst_new_box_autoadd_ffi_electrum_client(void); -struct wire_cst_bdk_wallet *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_wallet(void); +struct wire_cst_ffi_esplora_client *frbgen_bdk_flutter_cst_new_box_autoadd_ffi_esplora_client(void); -struct wire_cst_block_time *frbgen_bdk_flutter_cst_new_box_autoadd_block_time(void); +struct wire_cst_ffi_full_scan_request *frbgen_bdk_flutter_cst_new_box_autoadd_ffi_full_scan_request(void); -struct wire_cst_blockchain_config *frbgen_bdk_flutter_cst_new_box_autoadd_blockchain_config(void); +struct wire_cst_ffi_full_scan_request_builder *frbgen_bdk_flutter_cst_new_box_autoadd_ffi_full_scan_request_builder(void); -struct wire_cst_consensus_error *frbgen_bdk_flutter_cst_new_box_autoadd_consensus_error(void); +struct wire_cst_ffi_mnemonic *frbgen_bdk_flutter_cst_new_box_autoadd_ffi_mnemonic(void); -struct wire_cst_database_config *frbgen_bdk_flutter_cst_new_box_autoadd_database_config(void); +struct wire_cst_ffi_policy *frbgen_bdk_flutter_cst_new_box_autoadd_ffi_policy(void); -struct wire_cst_descriptor_error *frbgen_bdk_flutter_cst_new_box_autoadd_descriptor_error(void); +struct wire_cst_ffi_psbt *frbgen_bdk_flutter_cst_new_box_autoadd_ffi_psbt(void); -struct wire_cst_electrum_config *frbgen_bdk_flutter_cst_new_box_autoadd_electrum_config(void); +struct wire_cst_ffi_script_buf *frbgen_bdk_flutter_cst_new_box_autoadd_ffi_script_buf(void); -struct wire_cst_esplora_config *frbgen_bdk_flutter_cst_new_box_autoadd_esplora_config(void); +struct wire_cst_ffi_sync_request *frbgen_bdk_flutter_cst_new_box_autoadd_ffi_sync_request(void); -float *frbgen_bdk_flutter_cst_new_box_autoadd_f_32(float value); +struct wire_cst_ffi_sync_request_builder *frbgen_bdk_flutter_cst_new_box_autoadd_ffi_sync_request_builder(void); -struct wire_cst_fee_rate *frbgen_bdk_flutter_cst_new_box_autoadd_fee_rate(void); +struct wire_cst_ffi_transaction *frbgen_bdk_flutter_cst_new_box_autoadd_ffi_transaction(void); -struct wire_cst_hex_error *frbgen_bdk_flutter_cst_new_box_autoadd_hex_error(void); +struct wire_cst_ffi_update *frbgen_bdk_flutter_cst_new_box_autoadd_ffi_update(void); -struct wire_cst_local_utxo *frbgen_bdk_flutter_cst_new_box_autoadd_local_utxo(void); +struct wire_cst_ffi_wallet *frbgen_bdk_flutter_cst_new_box_autoadd_ffi_wallet(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_record_map_string_list_prim_usize_strict_keychain_kind *frbgen_bdk_flutter_cst_new_box_autoadd_record_map_string_list_prim_usize_strict_keychain_kind(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_ffi_canonical_tx *frbgen_bdk_flutter_cst_new_list_ffi_canonical_tx(int32_t len); struct wire_cst_list_list_prim_u_8_strict *frbgen_bdk_flutter_cst_new_list_list_prim_u_8_strict(int32_t len); -struct wire_cst_list_local_utxo *frbgen_bdk_flutter_cst_new_list_local_utxo(int32_t len); +struct wire_cst_list_local_output *frbgen_bdk_flutter_cst_new_list_local_output(int32_t len); struct wire_cst_list_out_point *frbgen_bdk_flutter_cst_new_list_out_point(int32_t len); @@ -1130,164 +1424,190 @@ struct wire_cst_list_prim_u_8_loose *frbgen_bdk_flutter_cst_new_list_prim_u_8_lo 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_prim_usize_strict *frbgen_bdk_flutter_cst_new_list_prim_usize_strict(int32_t len); + +struct wire_cst_list_record_ffi_script_buf_u_64 *frbgen_bdk_flutter_cst_new_list_record_ffi_script_buf_u_64(int32_t len); -struct wire_cst_list_transaction_details *frbgen_bdk_flutter_cst_new_list_transaction_details(int32_t len); +struct wire_cst_list_record_string_list_prim_usize_strict *frbgen_bdk_flutter_cst_new_list_record_string_list_prim_usize_strict(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_confirmation_block_time); 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_ffi_address); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_ffi_canonical_tx); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_ffi_connection); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_ffi_derivation_path); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_ffi_descriptor); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_ffi_descriptor_public_key); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_ffi_descriptor_secret_key); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_ffi_electrum_client); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_ffi_esplora_client); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_ffi_full_scan_request); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_ffi_full_scan_request_builder); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_ffi_mnemonic); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_ffi_policy); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_ffi_psbt); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_ffi_script_buf); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_ffi_sync_request); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_ffi_sync_request_builder); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_ffi_transaction); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_ffi_update); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_ffi_wallet); 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_record_map_string_list_prim_usize_strict_keychain_kind); 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_ffi_canonical_tx); 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_local_output); 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_prim_usize_strict); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_record_ffi_script_buf_u_64); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_record_string_list_prim_usize_strict); dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_tx_in); dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_tx_out); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkblockchainAnyBlockchain); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorPublicKey); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorSecretKey); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysKeyMap); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysbip39Mnemonic); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddress); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkblockchainAnyBlockchain); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorPublicKey); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorSecretKey); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysKeyMap); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysbip39Mnemonic); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_broadcast); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_create); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_estimate_fee); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_get_block_hash); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_get_height); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weight); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44_public); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip49); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip49_public); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip84); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip84_public); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip86); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip86_public); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_to_string_private); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_derivation_path_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_derivation_path_from_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_derive); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_extend); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_from_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_as_public); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_create); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_derive); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_extend); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_from_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_secret_bytes); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_entropy); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_new); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_combine); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_extract_tx); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_fee_amount); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_fee_rate); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_from_str); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_json_serialize); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_serialize); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_txid); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_from_script); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_from_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_is_valid_for_network); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_network); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_payload); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_script); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_to_qr_uri); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_empty); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_from_hex); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_with_capacity); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_from_bytes); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_input); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_coin_base); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_explicitly_rbf); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_lock_time_enabled); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_lock_time); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_new); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_output); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_serialize); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_size); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_txid); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_version); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_vsize); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_weight); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_address); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_balance); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychain); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_internal_address); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_psbt_input); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_is_mine); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_list_transactions); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_list_unspent); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_network); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_new); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sign); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sync); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__finish_bump_fee_tx_builder); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__tx_builder_finish); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_corebitcoinAddress); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_corebitcoinTransaction); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_electrumBdkElectrumClientbdk_electrumelectrum_clientClient); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_esploraesplora_clientBlockingClient); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletUpdate); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletbitcoinbip32DerivationPath); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletdescriptorExtendedDescriptor); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletdescriptorPolicy); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysDescriptorPublicKey); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysDescriptorSecretKey); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysKeyMap); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysbip39Mnemonic); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestBuilderbdk_walletKeychainKind); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestbdk_walletKeychainKind); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestBuilderbdk_walletKeychainKindu32); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestbdk_walletKeychainKindu32); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_corebitcoinpsbtPsbt); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_walletPersistedWalletbdk_walletrusqliteConnection); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_walletrusqliteConnection); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_corebitcoinAddress); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_corebitcoinTransaction); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_electrumBdkElectrumClientbdk_electrumelectrum_clientClient); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_esploraesplora_clientBlockingClient); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletUpdate); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletbitcoinbip32DerivationPath); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletdescriptorExtendedDescriptor); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletdescriptorPolicy); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysDescriptorPublicKey); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysDescriptorSecretKey); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysKeyMap); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysbip39Mnemonic); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestBuilderbdk_walletKeychainKind); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestbdk_walletKeychainKind); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestBuilderbdk_walletKeychainKindu32); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestbdk_walletKeychainKindu32); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdk_corebitcoinpsbtPsbt); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdk_walletPersistedWalletbdk_walletrusqliteConnection); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdk_walletrusqliteConnection); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_from_script); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_from_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_is_valid_for_network); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_script); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_to_qr_uri); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_combine); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_extract_tx); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_fee_amount); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_from_str); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_json_serialize); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_serialize); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_script_buf_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_script_buf_empty); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_script_buf_with_capacity); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_compute_txid); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_from_bytes); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_input); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_is_coinbase); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_is_explicitly_rbf); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_is_lock_time_enabled); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_lock_time); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_output); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_serialize); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_version); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_vsize); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_weight); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_max_satisfaction_weight); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip44); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip44_public); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip49); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip49_public); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip84); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip84_public); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip86); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip86_public); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_to_string_with_secret); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__electrum__ffi_electrum_client_broadcast); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__electrum__ffi_electrum_client_full_scan); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__electrum__ffi_electrum_client_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__electrum__ffi_electrum_client_sync); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__esplora__ffi_esplora_client_broadcast); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__esplora__ffi_esplora_client_full_scan); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__esplora__ffi_esplora_client_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__esplora__ffi_esplora_client_sync); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__ffi_derivation_path_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__ffi_derivation_path_from_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_public_key_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_public_key_derive); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_public_key_extend); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_public_key_from_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_as_public); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_create); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_derive); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_extend); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_from_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_secret_bytes); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__ffi_mnemonic_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__ffi_mnemonic_from_entropy); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__ffi_mnemonic_from_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__ffi_mnemonic_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__store__ffi_connection_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__store__ffi_connection_new_in_memory); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__tx_builder__finish_bump_fee_tx_builder); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__tx_builder__tx_builder_finish); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__change_spend_policy_default); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__ffi_full_scan_request_builder_build); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__ffi_full_scan_request_builder_inspect_spks_for_all_keychains); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__ffi_policy_id); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__ffi_sync_request_builder_build); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__ffi_sync_request_builder_inspect_spks); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__network_default); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__sign_options_default); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_apply_update); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_calculate_fee); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_calculate_fee_rate); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_get_balance); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_get_tx); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_is_mine); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_list_output); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_list_unspent); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_load); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_network); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_persist); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_policies); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_reveal_next_address); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_sign); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_start_full_scan); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_start_sync_with_revealed_spks); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_transactions); dummy_var ^= ((int64_t) (void*) store_dart_post_cobject); return dummy_var; } diff --git a/ios/bdk_flutter.podspec b/ios/bdk_flutter.podspec index 6d40826d..c8fadab9 100644 --- a/ios/bdk_flutter.podspec +++ b/ios/bdk_flutter.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'bdk_flutter' - s.version = "0.31.2" + s.version = "1.0.0-alpha.11" s.summary = 'A Flutter library for the Bitcoin Development Kit (https://bitcoindevkit.org/)' s.description = <<-DESC A new Flutter plugin project. diff --git a/lib/bdk_flutter.dart b/lib/bdk_flutter.dart index 48f3898f..d041b6f9 100644 --- a/lib/bdk_flutter.dart +++ b/lib/bdk_flutter.dart @@ -1,43 +1,42 @@ ///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, - Auth_Cookie, - Auth_UserPass, - Auth_None, - BlockchainConfig_Rpc; -export './src/generated/api/descriptor.dart' hide BdkDescriptor; -export './src/generated/api/key.dart' - hide - BdkDerivationPath, - BdkDescriptorPublicKey, - BdkDescriptorSecretKey, - BdkMnemonic; -export './src/generated/api/psbt.dart' hide BdkPsbt; export './src/generated/api/types.dart' - hide - BdkScriptBuf, - BdkTransaction, - AddressIndex_Reset, - LockTime_Blocks, - LockTime_Seconds, - BdkAddress, - AddressIndex_Peek, - AddressIndex_Increase, - AddressIndex_LastUnused, - Payload_PubkeyHash, - Payload_ScriptHash, - Payload_WitnessProgram, - DatabaseConfig_Sled, - DatabaseConfig_Memory, - RbfValue_RbfDefault, - RbfValue_Value, - DatabaseConfig_Sqlite; -export './src/generated/api/wallet.dart' - hide BdkWallet, finishBumpFeeTxBuilder, txBuilderFinish; + show + Balance, + BlockId, + ChainPosition, + ChangeSpendPolicy, + KeychainKind, + LocalOutput, + Network, + RbfValue, + SignOptions, + WordCount, + ConfirmationBlockTime; +export './src/generated/api/bitcoin.dart' show FeeRate, OutPoint; export './src/root.dart'; -export 'src/utils/exceptions.dart' hide mapBdkError, BdkFfiException; +export 'src/utils/exceptions.dart' + hide + mapCreateTxError, + mapAddressParseError, + mapBip32Error, + mapBip39Error, + mapCalculateFeeError, + mapCannotConnectError, + mapCreateWithPersistError, + mapDescriptorError, + mapDescriptorKeyError, + mapElectrumError, + mapEsploraError, + mapExtractTxError, + mapFromScriptError, + mapLoadWithPersistError, + mapPsbtError, + mapPsbtParseError, + mapRequestBuilderError, + mapSignerError, + mapSqliteError, + mapTransactionError, + mapTxidParseError, + BdkFfiException; diff --git a/lib/src/generated/api/bitcoin.dart b/lib/src/generated/api/bitcoin.dart new file mode 100644 index 00000000..3eba200d --- /dev/null +++ b/lib/src/generated/api/bitcoin.dart @@ -0,0 +1,337 @@ +// This file is automatically generated, so please do not edit it. +// @generated by `flutter_rust_bridge`@ 2.4.0. + +// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import + +import '../frb_generated.dart'; +import '../lib.dart'; +import 'error.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; +import 'types.dart'; + +// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `assert_receiver_is_total_eq`, `clone`, `clone`, `clone`, `clone`, `eq`, `fmt`, `fmt`, `fmt`, `fmt`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `hash`, `try_from`, `try_from` + +class FeeRate { + ///Constructs FeeRate from satoshis per 1000 weight units. + final BigInt satKwu; + + const FeeRate({ + required this.satKwu, + }); + + @override + int get hashCode => satKwu.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is FeeRate && + runtimeType == other.runtimeType && + satKwu == other.satKwu; +} + +class FfiAddress { + final Address field0; + + const FfiAddress({ + required this.field0, + }); + + String asString() => core.instance.api.crateApiBitcoinFfiAddressAsString( + that: this, + ); + + static Future fromScript( + {required FfiScriptBuf script, required Network network}) => + core.instance.api.crateApiBitcoinFfiAddressFromScript( + script: script, network: network); + + static Future fromString( + {required String address, required Network network}) => + core.instance.api.crateApiBitcoinFfiAddressFromString( + address: address, network: network); + + bool isValidForNetwork({required Network network}) => core.instance.api + .crateApiBitcoinFfiAddressIsValidForNetwork(that: this, network: network); + + static FfiScriptBuf script({required FfiAddress opaque}) => + core.instance.api.crateApiBitcoinFfiAddressScript(opaque: opaque); + + String toQrUri() => core.instance.api.crateApiBitcoinFfiAddressToQrUri( + that: this, + ); + + @override + int get hashCode => field0.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is FfiAddress && + runtimeType == other.runtimeType && + field0 == other.field0; +} + +class FfiPsbt { + final MutexPsbt opaque; + + const FfiPsbt({ + required this.opaque, + }); + + String asString() => core.instance.api.crateApiBitcoinFfiPsbtAsString( + that: this, + ); + + /// Combines this PartiallySignedTransaction with other PSBT as described by BIP 174. + /// + /// In accordance with BIP 174 this function is commutative i.e., `A.combine(B) == B.combine(A)` + static Future combine( + {required FfiPsbt opaque, required FfiPsbt other}) => + core.instance.api + .crateApiBitcoinFfiPsbtCombine(opaque: opaque, other: other); + + /// Return the transaction. + static FfiTransaction extractTx({required FfiPsbt opaque}) => + core.instance.api.crateApiBitcoinFfiPsbtExtractTx(opaque: opaque); + + /// The total transaction fee amount, sum of input amounts minus sum of output amounts, in Sats. + /// If the PSBT is missing a TxOut for an input returns None. + BigInt? feeAmount() => core.instance.api.crateApiBitcoinFfiPsbtFeeAmount( + that: this, + ); + + static Future fromStr({required String psbtBase64}) => + core.instance.api.crateApiBitcoinFfiPsbtFromStr(psbtBase64: psbtBase64); + + /// Serialize the PSBT data structure as a String of JSON. + String jsonSerialize() => + core.instance.api.crateApiBitcoinFfiPsbtJsonSerialize( + that: this, + ); + + ///Serialize as raw binary data + Uint8List serialize() => core.instance.api.crateApiBitcoinFfiPsbtSerialize( + that: this, + ); + + @override + int get hashCode => opaque.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is FfiPsbt && + runtimeType == other.runtimeType && + opaque == other.opaque; +} + +class FfiScriptBuf { + final Uint8List bytes; + + const FfiScriptBuf({ + required this.bytes, + }); + + String asString() => core.instance.api.crateApiBitcoinFfiScriptBufAsString( + that: this, + ); + + ///Creates a new empty script. + static FfiScriptBuf empty() => + core.instance.api.crateApiBitcoinFfiScriptBufEmpty(); + + ///Creates a new empty script with pre-allocated capacity. + static Future withCapacity({required BigInt capacity}) => + core.instance.api + .crateApiBitcoinFfiScriptBufWithCapacity(capacity: capacity); + + @override + int get hashCode => bytes.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is FfiScriptBuf && + runtimeType == other.runtimeType && + bytes == other.bytes; +} + +class FfiTransaction { + final Transaction opaque; + + const FfiTransaction({ + required this.opaque, + }); + + /// Computes the [`Txid`]. + /// + /// Hashes the transaction **excluding** the segwit data (i.e. the marker, flag bytes, and the + /// witness fields themselves). For non-segwit transactions which do not have any segwit data, + String computeTxid() => + core.instance.api.crateApiBitcoinFfiTransactionComputeTxid( + that: this, + ); + + static Future fromBytes( + {required List transactionBytes}) => + core.instance.api.crateApiBitcoinFfiTransactionFromBytes( + transactionBytes: transactionBytes); + + ///List of transaction inputs. + List input() => core.instance.api.crateApiBitcoinFfiTransactionInput( + that: this, + ); + + ///Is this a coin base transaction? + bool isCoinbase() => + core.instance.api.crateApiBitcoinFfiTransactionIsCoinbase( + 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. + bool isExplicitlyRbf() => + core.instance.api.crateApiBitcoinFfiTransactionIsExplicitlyRbf( + that: this, + ); + + ///Returns true if this transactions nLockTime is enabled (BIP-65 ). + bool isLockTimeEnabled() => + core.instance.api.crateApiBitcoinFfiTransactionIsLockTimeEnabled( + that: this, + ); + + ///Block height or timestamp. Transaction cannot be included in a block until this height/time. + LockTime lockTime() => + core.instance.api.crateApiBitcoinFfiTransactionLockTime( + that: this, + ); + + // HINT: Make it `#[frb(sync)]` to let it become the default constructor of Dart class. + static Future newInstance( + {required int version, + required LockTime lockTime, + required List input, + required List output}) => + core.instance.api.crateApiBitcoinFfiTransactionNew( + version: version, lockTime: lockTime, input: input, output: output); + + ///List of transaction outputs. + List output() => core.instance.api.crateApiBitcoinFfiTransactionOutput( + that: this, + ); + + ///Encodes an object into a vector. + Uint8List serialize() => + core.instance.api.crateApiBitcoinFfiTransactionSerialize( + that: this, + ); + + ///The protocol version, is currently expected to be 1 or 2 (BIP 68). + int version() => core.instance.api.crateApiBitcoinFfiTransactionVersion( + that: this, + ); + + ///Returns the “virtual size” (vsize) of this transaction. + /// + BigInt vsize() => core.instance.api.crateApiBitcoinFfiTransactionVsize( + that: this, + ); + + ///Returns the regular byte-wise consensus-serialized size of this transaction. + Future weight() => + core.instance.api.crateApiBitcoinFfiTransactionWeight( + that: this, + ); + + @override + int get hashCode => opaque.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is FfiTransaction && + runtimeType == other.runtimeType && + opaque == other.opaque; +} + +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; +} + +class TxIn { + final OutPoint previousOutput; + final FfiScriptBuf scriptSig; + final int sequence; + final List witness; + + const TxIn({ + required this.previousOutput, + required this.scriptSig, + required this.sequence, + required this.witness, + }); + + @override + int get hashCode => + previousOutput.hashCode ^ + scriptSig.hashCode ^ + sequence.hashCode ^ + witness.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is TxIn && + runtimeType == other.runtimeType && + previousOutput == other.previousOutput && + scriptSig == other.scriptSig && + sequence == other.sequence && + witness == other.witness; +} + +///A transaction output, which defines new coins to be created from old ones. +class TxOut { + /// The value of the output, in satoshis. + final BigInt value; + + /// The address of the output. + final FfiScriptBuf 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; +} diff --git a/lib/src/generated/api/blockchain.dart b/lib/src/generated/api/blockchain.dart deleted file mode 100644 index f4be0008..00000000 --- a/lib/src/generated/api/blockchain.dart +++ /dev/null @@ -1,288 +0,0 @@ -// This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0. - -// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import - -import '../frb_generated.dart'; -import '../lib.dart'; -import 'error.dart'; -import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; -import 'package:freezed_annotation/freezed_annotation.dart' hide protected; -import 'types.dart'; -part 'blockchain.freezed.dart'; - -// These functions are ignored because they are not marked as `pub`: `get_blockchain` -// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `from`, `from`, `from` - -@freezed -sealed class Auth with _$Auth { - const Auth._(); - - /// No authentication - const factory Auth.none() = Auth_None; - - /// Authentication with username and password. - const factory Auth.userPass({ - /// Username - required String username, - - /// Password - required String password, - }) = Auth_UserPass; - - /// Authentication with a cookie file - const factory Auth.cookie({ - /// Cookie file - required String file, - }) = Auth_Cookie; -} - -class BdkBlockchain { - final AnyBlockchain ptr; - - const BdkBlockchain({ - required this.ptr, - }); - - Future broadcast({required BdkTransaction transaction}) => - core.instance.api.crateApiBlockchainBdkBlockchainBroadcast( - that: this, transaction: transaction); - - static Future create( - {required BlockchainConfig blockchainConfig}) => - core.instance.api.crateApiBlockchainBdkBlockchainCreate( - blockchainConfig: blockchainConfig); - - Future estimateFee({required BigInt target}) => core.instance.api - .crateApiBlockchainBdkBlockchainEstimateFee(that: this, target: target); - - Future getBlockHash({required int height}) => core.instance.api - .crateApiBlockchainBdkBlockchainGetBlockHash(that: this, height: height); - - Future getHeight() => - core.instance.api.crateApiBlockchainBdkBlockchainGetHeight( - that: this, - ); - - @override - int get hashCode => ptr.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is BdkBlockchain && - runtimeType == other.runtimeType && - ptr == other.ptr; -} - -@freezed -sealed class BlockchainConfig with _$BlockchainConfig { - const BlockchainConfig._(); - - /// Electrum client - const factory BlockchainConfig.electrum({ - required ElectrumConfig config, - }) = BlockchainConfig_Electrum; - - /// Esplora client - const factory BlockchainConfig.esplora({ - required EsploraConfig config, - }) = BlockchainConfig_Esplora; - - /// Bitcoin Core RPC client - const factory BlockchainConfig.rpc({ - required RpcConfig config, - }) = BlockchainConfig_Rpc; -} - -/// Configuration for an ElectrumBlockchain -class ElectrumConfig { - /// URL of the Electrum server (such as ElectrumX, Esplora, BWT) may start with ssl:// or tcp:// and include a port - /// e.g. ssl://electrum.blockstream.info:60002 - final String url; - - /// URL of the socks5 proxy server or a Tor service - final String? socks5; - - /// Request retry count - final int retry; - - /// Request timeout (seconds) - final int? timeout; - - /// Stop searching addresses for transactions after finding an unused gap of this length - final BigInt stopGap; - - /// Validate the domain when using SSL - final bool validateDomain; - - const ElectrumConfig({ - required this.url, - this.socks5, - required this.retry, - this.timeout, - required this.stopGap, - required this.validateDomain, - }); - - @override - int get hashCode => - url.hashCode ^ - socks5.hashCode ^ - retry.hashCode ^ - timeout.hashCode ^ - stopGap.hashCode ^ - validateDomain.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is ElectrumConfig && - runtimeType == other.runtimeType && - url == other.url && - socks5 == other.socks5 && - retry == other.retry && - timeout == other.timeout && - stopGap == other.stopGap && - validateDomain == other.validateDomain; -} - -/// Configuration for an EsploraBlockchain -class EsploraConfig { - /// Base URL of the esplora service - /// e.g. https://blockstream.info/api/ - final String baseUrl; - - /// Optional URL of the proxy to use to make requests to the Esplora server - /// The string should be formatted as: ://:@host:. - /// Note that the format of this value and the supported protocols change slightly between the - /// sync version of esplora (using ureq) and the async version (using reqwest). For more - /// details check with the documentation of the two crates. Both of them are compiled with - /// the socks feature enabled. - /// The proxy is ignored when targeting wasm32. - final String? proxy; - - /// Number of parallel requests sent to the esplora service (default: 4) - final int? concurrency; - - /// Stop searching addresses for transactions after finding an unused gap of this length. - final BigInt stopGap; - - /// Socket timeout. - final BigInt? timeout; - - const EsploraConfig({ - required this.baseUrl, - this.proxy, - this.concurrency, - required this.stopGap, - this.timeout, - }); - - @override - int get hashCode => - baseUrl.hashCode ^ - proxy.hashCode ^ - concurrency.hashCode ^ - stopGap.hashCode ^ - timeout.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is EsploraConfig && - runtimeType == other.runtimeType && - baseUrl == other.baseUrl && - proxy == other.proxy && - concurrency == other.concurrency && - stopGap == other.stopGap && - timeout == other.timeout; -} - -/// RpcBlockchain configuration options -class RpcConfig { - /// The bitcoin node url - final String url; - - /// The bitcoin node authentication mechanism - final Auth auth; - - /// The network we are using (it will be checked the bitcoin node network matches this) - final Network network; - - /// The wallet name in the bitcoin node. - final String walletName; - - /// Sync parameters - final RpcSyncParams? syncParams; - - const RpcConfig({ - required this.url, - required this.auth, - required this.network, - required this.walletName, - this.syncParams, - }); - - @override - int get hashCode => - url.hashCode ^ - auth.hashCode ^ - network.hashCode ^ - walletName.hashCode ^ - syncParams.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is RpcConfig && - runtimeType == other.runtimeType && - url == other.url && - auth == other.auth && - network == other.network && - walletName == other.walletName && - syncParams == other.syncParams; -} - -/// Sync parameters for Bitcoin Core RPC. -/// -/// In general, BDK tries to sync `scriptPubKey`s cached in `Database` with -/// `scriptPubKey`s imported in the Bitcoin Core Wallet. These parameters are used for determining -/// how the `importdescriptors` RPC calls are to be made. -class RpcSyncParams { - /// The minimum number of scripts to scan for on initial sync. - final BigInt startScriptCount; - - /// Time in unix seconds in which initial sync will start scanning from (0 to start from genesis). - final BigInt startTime; - - /// Forces every sync to use `start_time` as import timestamp. - final bool forceStartTime; - - /// RPC poll rate (in seconds) to get state updates. - final BigInt pollRateSec; - - const RpcSyncParams({ - required this.startScriptCount, - required this.startTime, - required this.forceStartTime, - required this.pollRateSec, - }); - - @override - int get hashCode => - startScriptCount.hashCode ^ - startTime.hashCode ^ - forceStartTime.hashCode ^ - pollRateSec.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is RpcSyncParams && - runtimeType == other.runtimeType && - startScriptCount == other.startScriptCount && - startTime == other.startTime && - forceStartTime == other.forceStartTime && - pollRateSec == other.pollRateSec; -} diff --git a/lib/src/generated/api/blockchain.freezed.dart b/lib/src/generated/api/blockchain.freezed.dart deleted file mode 100644 index 1ddb778a..00000000 --- a/lib/src/generated/api/blockchain.freezed.dart +++ /dev/null @@ -1,993 +0,0 @@ -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// ignore_for_file: type=lint -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark - -part of 'blockchain.dart'; - -// ************************************************************************** -// FreezedGenerator -// ************************************************************************** - -T _$identity(T value) => value; - -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); - -/// @nodoc -mixin _$Auth { - @optionalTypeArgs - TResult when({ - required TResult Function() none, - required TResult Function(String username, String password) userPass, - required TResult Function(String file) cookie, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? none, - TResult? Function(String username, String password)? userPass, - TResult? Function(String file)? cookie, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? none, - TResult Function(String username, String password)? userPass, - TResult Function(String file)? cookie, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(Auth_None value) none, - required TResult Function(Auth_UserPass value) userPass, - required TResult Function(Auth_Cookie value) cookie, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(Auth_None value)? none, - TResult? Function(Auth_UserPass value)? userPass, - TResult? Function(Auth_Cookie value)? cookie, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Auth_None value)? none, - TResult Function(Auth_UserPass value)? userPass, - TResult Function(Auth_Cookie value)? cookie, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $AuthCopyWith<$Res> { - factory $AuthCopyWith(Auth value, $Res Function(Auth) then) = - _$AuthCopyWithImpl<$Res, Auth>; -} - -/// @nodoc -class _$AuthCopyWithImpl<$Res, $Val extends Auth> - implements $AuthCopyWith<$Res> { - _$AuthCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$Auth_NoneImplCopyWith<$Res> { - factory _$$Auth_NoneImplCopyWith( - _$Auth_NoneImpl value, $Res Function(_$Auth_NoneImpl) then) = - __$$Auth_NoneImplCopyWithImpl<$Res>; -} - -/// @nodoc -class __$$Auth_NoneImplCopyWithImpl<$Res> - extends _$AuthCopyWithImpl<$Res, _$Auth_NoneImpl> - implements _$$Auth_NoneImplCopyWith<$Res> { - __$$Auth_NoneImplCopyWithImpl( - _$Auth_NoneImpl _value, $Res Function(_$Auth_NoneImpl) _then) - : super(_value, _then); -} - -/// @nodoc - -class _$Auth_NoneImpl extends Auth_None { - const _$Auth_NoneImpl() : super._(); - - @override - String toString() { - return 'Auth.none()'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is _$Auth_NoneImpl); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() none, - required TResult Function(String username, String password) userPass, - required TResult Function(String file) cookie, - }) { - return none(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? none, - TResult? Function(String username, String password)? userPass, - TResult? Function(String file)? cookie, - }) { - return none?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? none, - TResult Function(String username, String password)? userPass, - TResult Function(String file)? cookie, - required TResult orElse(), - }) { - if (none != null) { - return none(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Auth_None value) none, - required TResult Function(Auth_UserPass value) userPass, - required TResult Function(Auth_Cookie value) cookie, - }) { - return none(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(Auth_None value)? none, - TResult? Function(Auth_UserPass value)? userPass, - TResult? Function(Auth_Cookie value)? cookie, - }) { - return none?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Auth_None value)? none, - TResult Function(Auth_UserPass value)? userPass, - TResult Function(Auth_Cookie value)? cookie, - required TResult orElse(), - }) { - if (none != null) { - return none(this); - } - return orElse(); - } -} - -abstract class Auth_None extends Auth { - const factory Auth_None() = _$Auth_NoneImpl; - const Auth_None._() : super._(); -} - -/// @nodoc -abstract class _$$Auth_UserPassImplCopyWith<$Res> { - factory _$$Auth_UserPassImplCopyWith( - _$Auth_UserPassImpl value, $Res Function(_$Auth_UserPassImpl) then) = - __$$Auth_UserPassImplCopyWithImpl<$Res>; - @useResult - $Res call({String username, String password}); -} - -/// @nodoc -class __$$Auth_UserPassImplCopyWithImpl<$Res> - extends _$AuthCopyWithImpl<$Res, _$Auth_UserPassImpl> - implements _$$Auth_UserPassImplCopyWith<$Res> { - __$$Auth_UserPassImplCopyWithImpl( - _$Auth_UserPassImpl _value, $Res Function(_$Auth_UserPassImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? username = null, - Object? password = null, - }) { - return _then(_$Auth_UserPassImpl( - username: null == username - ? _value.username - : username // ignore: cast_nullable_to_non_nullable - as String, - password: null == password - ? _value.password - : password // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$Auth_UserPassImpl extends Auth_UserPass { - const _$Auth_UserPassImpl({required this.username, required this.password}) - : super._(); - - /// Username - @override - final String username; - - /// Password - @override - final String password; - - @override - String toString() { - return 'Auth.userPass(username: $username, password: $password)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$Auth_UserPassImpl && - (identical(other.username, username) || - other.username == username) && - (identical(other.password, password) || - other.password == password)); - } - - @override - int get hashCode => Object.hash(runtimeType, username, password); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$Auth_UserPassImplCopyWith<_$Auth_UserPassImpl> get copyWith => - __$$Auth_UserPassImplCopyWithImpl<_$Auth_UserPassImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() none, - required TResult Function(String username, String password) userPass, - required TResult Function(String file) cookie, - }) { - return userPass(username, password); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? none, - TResult? Function(String username, String password)? userPass, - TResult? Function(String file)? cookie, - }) { - return userPass?.call(username, password); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? none, - TResult Function(String username, String password)? userPass, - TResult Function(String file)? cookie, - required TResult orElse(), - }) { - if (userPass != null) { - return userPass(username, password); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Auth_None value) none, - required TResult Function(Auth_UserPass value) userPass, - required TResult Function(Auth_Cookie value) cookie, - }) { - return userPass(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(Auth_None value)? none, - TResult? Function(Auth_UserPass value)? userPass, - TResult? Function(Auth_Cookie value)? cookie, - }) { - return userPass?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Auth_None value)? none, - TResult Function(Auth_UserPass value)? userPass, - TResult Function(Auth_Cookie value)? cookie, - required TResult orElse(), - }) { - if (userPass != null) { - return userPass(this); - } - return orElse(); - } -} - -abstract class Auth_UserPass extends Auth { - const factory Auth_UserPass( - {required final String username, - required final String password}) = _$Auth_UserPassImpl; - const Auth_UserPass._() : super._(); - - /// Username - String get username; - - /// Password - String get password; - @JsonKey(ignore: true) - _$$Auth_UserPassImplCopyWith<_$Auth_UserPassImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$Auth_CookieImplCopyWith<$Res> { - factory _$$Auth_CookieImplCopyWith( - _$Auth_CookieImpl value, $Res Function(_$Auth_CookieImpl) then) = - __$$Auth_CookieImplCopyWithImpl<$Res>; - @useResult - $Res call({String file}); -} - -/// @nodoc -class __$$Auth_CookieImplCopyWithImpl<$Res> - extends _$AuthCopyWithImpl<$Res, _$Auth_CookieImpl> - implements _$$Auth_CookieImplCopyWith<$Res> { - __$$Auth_CookieImplCopyWithImpl( - _$Auth_CookieImpl _value, $Res Function(_$Auth_CookieImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? file = null, - }) { - return _then(_$Auth_CookieImpl( - file: null == file - ? _value.file - : file // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$Auth_CookieImpl extends Auth_Cookie { - const _$Auth_CookieImpl({required this.file}) : super._(); - - /// Cookie file - @override - final String file; - - @override - String toString() { - return 'Auth.cookie(file: $file)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$Auth_CookieImpl && - (identical(other.file, file) || other.file == file)); - } - - @override - int get hashCode => Object.hash(runtimeType, file); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$Auth_CookieImplCopyWith<_$Auth_CookieImpl> get copyWith => - __$$Auth_CookieImplCopyWithImpl<_$Auth_CookieImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() none, - required TResult Function(String username, String password) userPass, - required TResult Function(String file) cookie, - }) { - return cookie(file); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? none, - TResult? Function(String username, String password)? userPass, - TResult? Function(String file)? cookie, - }) { - return cookie?.call(file); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? none, - TResult Function(String username, String password)? userPass, - TResult Function(String file)? cookie, - required TResult orElse(), - }) { - if (cookie != null) { - return cookie(file); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Auth_None value) none, - required TResult Function(Auth_UserPass value) userPass, - required TResult Function(Auth_Cookie value) cookie, - }) { - return cookie(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(Auth_None value)? none, - TResult? Function(Auth_UserPass value)? userPass, - TResult? Function(Auth_Cookie value)? cookie, - }) { - return cookie?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Auth_None value)? none, - TResult Function(Auth_UserPass value)? userPass, - TResult Function(Auth_Cookie value)? cookie, - required TResult orElse(), - }) { - if (cookie != null) { - return cookie(this); - } - return orElse(); - } -} - -abstract class Auth_Cookie extends Auth { - const factory Auth_Cookie({required final String file}) = _$Auth_CookieImpl; - const Auth_Cookie._() : super._(); - - /// Cookie file - String get file; - @JsonKey(ignore: true) - _$$Auth_CookieImplCopyWith<_$Auth_CookieImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$BlockchainConfig { - Object get config => throw _privateConstructorUsedError; - @optionalTypeArgs - TResult when({ - required TResult Function(ElectrumConfig config) electrum, - required TResult Function(EsploraConfig config) esplora, - required TResult Function(RpcConfig config) rpc, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(ElectrumConfig config)? electrum, - TResult? Function(EsploraConfig config)? esplora, - TResult? Function(RpcConfig config)? rpc, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(ElectrumConfig config)? electrum, - TResult Function(EsploraConfig config)? esplora, - TResult Function(RpcConfig config)? rpc, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(BlockchainConfig_Electrum value) electrum, - required TResult Function(BlockchainConfig_Esplora value) esplora, - required TResult Function(BlockchainConfig_Rpc value) rpc, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BlockchainConfig_Electrum value)? electrum, - TResult? Function(BlockchainConfig_Esplora value)? esplora, - TResult? Function(BlockchainConfig_Rpc value)? rpc, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BlockchainConfig_Electrum value)? electrum, - TResult Function(BlockchainConfig_Esplora value)? esplora, - TResult Function(BlockchainConfig_Rpc value)? rpc, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $BlockchainConfigCopyWith<$Res> { - factory $BlockchainConfigCopyWith( - BlockchainConfig value, $Res Function(BlockchainConfig) then) = - _$BlockchainConfigCopyWithImpl<$Res, BlockchainConfig>; -} - -/// @nodoc -class _$BlockchainConfigCopyWithImpl<$Res, $Val extends BlockchainConfig> - implements $BlockchainConfigCopyWith<$Res> { - _$BlockchainConfigCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$BlockchainConfig_ElectrumImplCopyWith<$Res> { - factory _$$BlockchainConfig_ElectrumImplCopyWith( - _$BlockchainConfig_ElectrumImpl value, - $Res Function(_$BlockchainConfig_ElectrumImpl) then) = - __$$BlockchainConfig_ElectrumImplCopyWithImpl<$Res>; - @useResult - $Res call({ElectrumConfig config}); -} - -/// @nodoc -class __$$BlockchainConfig_ElectrumImplCopyWithImpl<$Res> - extends _$BlockchainConfigCopyWithImpl<$Res, - _$BlockchainConfig_ElectrumImpl> - implements _$$BlockchainConfig_ElectrumImplCopyWith<$Res> { - __$$BlockchainConfig_ElectrumImplCopyWithImpl( - _$BlockchainConfig_ElectrumImpl _value, - $Res Function(_$BlockchainConfig_ElectrumImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? config = null, - }) { - return _then(_$BlockchainConfig_ElectrumImpl( - config: null == config - ? _value.config - : config // ignore: cast_nullable_to_non_nullable - as ElectrumConfig, - )); - } -} - -/// @nodoc - -class _$BlockchainConfig_ElectrumImpl extends BlockchainConfig_Electrum { - const _$BlockchainConfig_ElectrumImpl({required this.config}) : super._(); - - @override - final ElectrumConfig config; - - @override - String toString() { - return 'BlockchainConfig.electrum(config: $config)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BlockchainConfig_ElectrumImpl && - (identical(other.config, config) || other.config == config)); - } - - @override - int get hashCode => Object.hash(runtimeType, config); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BlockchainConfig_ElectrumImplCopyWith<_$BlockchainConfig_ElectrumImpl> - get copyWith => __$$BlockchainConfig_ElectrumImplCopyWithImpl< - _$BlockchainConfig_ElectrumImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(ElectrumConfig config) electrum, - required TResult Function(EsploraConfig config) esplora, - required TResult Function(RpcConfig config) rpc, - }) { - return electrum(config); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(ElectrumConfig config)? electrum, - TResult? Function(EsploraConfig config)? esplora, - TResult? Function(RpcConfig config)? rpc, - }) { - return electrum?.call(config); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(ElectrumConfig config)? electrum, - TResult Function(EsploraConfig config)? esplora, - TResult Function(RpcConfig config)? rpc, - required TResult orElse(), - }) { - if (electrum != null) { - return electrum(config); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BlockchainConfig_Electrum value) electrum, - required TResult Function(BlockchainConfig_Esplora value) esplora, - required TResult Function(BlockchainConfig_Rpc value) rpc, - }) { - return electrum(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BlockchainConfig_Electrum value)? electrum, - TResult? Function(BlockchainConfig_Esplora value)? esplora, - TResult? Function(BlockchainConfig_Rpc value)? rpc, - }) { - return electrum?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BlockchainConfig_Electrum value)? electrum, - TResult Function(BlockchainConfig_Esplora value)? esplora, - TResult Function(BlockchainConfig_Rpc value)? rpc, - required TResult orElse(), - }) { - if (electrum != null) { - return electrum(this); - } - return orElse(); - } -} - -abstract class BlockchainConfig_Electrum extends BlockchainConfig { - const factory BlockchainConfig_Electrum( - {required final ElectrumConfig config}) = _$BlockchainConfig_ElectrumImpl; - const BlockchainConfig_Electrum._() : super._(); - - @override - ElectrumConfig get config; - @JsonKey(ignore: true) - _$$BlockchainConfig_ElectrumImplCopyWith<_$BlockchainConfig_ElectrumImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BlockchainConfig_EsploraImplCopyWith<$Res> { - factory _$$BlockchainConfig_EsploraImplCopyWith( - _$BlockchainConfig_EsploraImpl value, - $Res Function(_$BlockchainConfig_EsploraImpl) then) = - __$$BlockchainConfig_EsploraImplCopyWithImpl<$Res>; - @useResult - $Res call({EsploraConfig config}); -} - -/// @nodoc -class __$$BlockchainConfig_EsploraImplCopyWithImpl<$Res> - extends _$BlockchainConfigCopyWithImpl<$Res, _$BlockchainConfig_EsploraImpl> - implements _$$BlockchainConfig_EsploraImplCopyWith<$Res> { - __$$BlockchainConfig_EsploraImplCopyWithImpl( - _$BlockchainConfig_EsploraImpl _value, - $Res Function(_$BlockchainConfig_EsploraImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? config = null, - }) { - return _then(_$BlockchainConfig_EsploraImpl( - config: null == config - ? _value.config - : config // ignore: cast_nullable_to_non_nullable - as EsploraConfig, - )); - } -} - -/// @nodoc - -class _$BlockchainConfig_EsploraImpl extends BlockchainConfig_Esplora { - const _$BlockchainConfig_EsploraImpl({required this.config}) : super._(); - - @override - final EsploraConfig config; - - @override - String toString() { - return 'BlockchainConfig.esplora(config: $config)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BlockchainConfig_EsploraImpl && - (identical(other.config, config) || other.config == config)); - } - - @override - int get hashCode => Object.hash(runtimeType, config); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BlockchainConfig_EsploraImplCopyWith<_$BlockchainConfig_EsploraImpl> - get copyWith => __$$BlockchainConfig_EsploraImplCopyWithImpl< - _$BlockchainConfig_EsploraImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(ElectrumConfig config) electrum, - required TResult Function(EsploraConfig config) esplora, - required TResult Function(RpcConfig config) rpc, - }) { - return esplora(config); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(ElectrumConfig config)? electrum, - TResult? Function(EsploraConfig config)? esplora, - TResult? Function(RpcConfig config)? rpc, - }) { - return esplora?.call(config); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(ElectrumConfig config)? electrum, - TResult Function(EsploraConfig config)? esplora, - TResult Function(RpcConfig config)? rpc, - required TResult orElse(), - }) { - if (esplora != null) { - return esplora(config); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BlockchainConfig_Electrum value) electrum, - required TResult Function(BlockchainConfig_Esplora value) esplora, - required TResult Function(BlockchainConfig_Rpc value) rpc, - }) { - return esplora(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BlockchainConfig_Electrum value)? electrum, - TResult? Function(BlockchainConfig_Esplora value)? esplora, - TResult? Function(BlockchainConfig_Rpc value)? rpc, - }) { - return esplora?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BlockchainConfig_Electrum value)? electrum, - TResult Function(BlockchainConfig_Esplora value)? esplora, - TResult Function(BlockchainConfig_Rpc value)? rpc, - required TResult orElse(), - }) { - if (esplora != null) { - return esplora(this); - } - return orElse(); - } -} - -abstract class BlockchainConfig_Esplora extends BlockchainConfig { - const factory BlockchainConfig_Esplora( - {required final EsploraConfig config}) = _$BlockchainConfig_EsploraImpl; - const BlockchainConfig_Esplora._() : super._(); - - @override - EsploraConfig get config; - @JsonKey(ignore: true) - _$$BlockchainConfig_EsploraImplCopyWith<_$BlockchainConfig_EsploraImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BlockchainConfig_RpcImplCopyWith<$Res> { - factory _$$BlockchainConfig_RpcImplCopyWith(_$BlockchainConfig_RpcImpl value, - $Res Function(_$BlockchainConfig_RpcImpl) then) = - __$$BlockchainConfig_RpcImplCopyWithImpl<$Res>; - @useResult - $Res call({RpcConfig config}); -} - -/// @nodoc -class __$$BlockchainConfig_RpcImplCopyWithImpl<$Res> - extends _$BlockchainConfigCopyWithImpl<$Res, _$BlockchainConfig_RpcImpl> - implements _$$BlockchainConfig_RpcImplCopyWith<$Res> { - __$$BlockchainConfig_RpcImplCopyWithImpl(_$BlockchainConfig_RpcImpl _value, - $Res Function(_$BlockchainConfig_RpcImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? config = null, - }) { - return _then(_$BlockchainConfig_RpcImpl( - config: null == config - ? _value.config - : config // ignore: cast_nullable_to_non_nullable - as RpcConfig, - )); - } -} - -/// @nodoc - -class _$BlockchainConfig_RpcImpl extends BlockchainConfig_Rpc { - const _$BlockchainConfig_RpcImpl({required this.config}) : super._(); - - @override - final RpcConfig config; - - @override - String toString() { - return 'BlockchainConfig.rpc(config: $config)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BlockchainConfig_RpcImpl && - (identical(other.config, config) || other.config == config)); - } - - @override - int get hashCode => Object.hash(runtimeType, config); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BlockchainConfig_RpcImplCopyWith<_$BlockchainConfig_RpcImpl> - get copyWith => - __$$BlockchainConfig_RpcImplCopyWithImpl<_$BlockchainConfig_RpcImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(ElectrumConfig config) electrum, - required TResult Function(EsploraConfig config) esplora, - required TResult Function(RpcConfig config) rpc, - }) { - return rpc(config); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(ElectrumConfig config)? electrum, - TResult? Function(EsploraConfig config)? esplora, - TResult? Function(RpcConfig config)? rpc, - }) { - return rpc?.call(config); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(ElectrumConfig config)? electrum, - TResult Function(EsploraConfig config)? esplora, - TResult Function(RpcConfig config)? rpc, - required TResult orElse(), - }) { - if (rpc != null) { - return rpc(config); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BlockchainConfig_Electrum value) electrum, - required TResult Function(BlockchainConfig_Esplora value) esplora, - required TResult Function(BlockchainConfig_Rpc value) rpc, - }) { - return rpc(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BlockchainConfig_Electrum value)? electrum, - TResult? Function(BlockchainConfig_Esplora value)? esplora, - TResult? Function(BlockchainConfig_Rpc value)? rpc, - }) { - return rpc?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BlockchainConfig_Electrum value)? electrum, - TResult Function(BlockchainConfig_Esplora value)? esplora, - TResult Function(BlockchainConfig_Rpc value)? rpc, - required TResult orElse(), - }) { - if (rpc != null) { - return rpc(this); - } - return orElse(); - } -} - -abstract class BlockchainConfig_Rpc extends BlockchainConfig { - const factory BlockchainConfig_Rpc({required final RpcConfig config}) = - _$BlockchainConfig_RpcImpl; - const BlockchainConfig_Rpc._() : super._(); - - @override - RpcConfig get config; - @JsonKey(ignore: true) - _$$BlockchainConfig_RpcImplCopyWith<_$BlockchainConfig_RpcImpl> - get copyWith => throw _privateConstructorUsedError; -} diff --git a/lib/src/generated/api/descriptor.dart b/lib/src/generated/api/descriptor.dart index 83ace5cf..9f1efac7 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. +// @generated by `flutter_rust_bridge`@ 2.4.0. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import @@ -12,105 +12,106 @@ import 'types.dart'; // These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `fmt` -class BdkDescriptor { +class FfiDescriptor { final ExtendedDescriptor extendedDescriptor; final KeyMap keyMap; - const BdkDescriptor({ + const FfiDescriptor({ required this.extendedDescriptor, required this.keyMap, }); String asString() => - core.instance.api.crateApiDescriptorBdkDescriptorAsString( + core.instance.api.crateApiDescriptorFfiDescriptorAsString( that: this, ); + ///Returns raw weight units. BigInt maxSatisfactionWeight() => - core.instance.api.crateApiDescriptorBdkDescriptorMaxSatisfactionWeight( + core.instance.api.crateApiDescriptorFfiDescriptorMaxSatisfactionWeight( that: this, ); // 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}) => - core.instance.api.crateApiDescriptorBdkDescriptorNew( + core.instance.api.crateApiDescriptorFfiDescriptorNew( descriptor: descriptor, network: network); - static Future newBip44( - {required BdkDescriptorSecretKey secretKey, + static Future newBip44( + {required FfiDescriptorSecretKey secretKey, required KeychainKind keychainKind, required Network network}) => - core.instance.api.crateApiDescriptorBdkDescriptorNewBip44( + core.instance.api.crateApiDescriptorFfiDescriptorNewBip44( secretKey: secretKey, keychainKind: keychainKind, network: network); - static Future newBip44Public( - {required BdkDescriptorPublicKey publicKey, + static Future newBip44Public( + {required FfiDescriptorPublicKey publicKey, required String fingerprint, required KeychainKind keychainKind, required Network network}) => - core.instance.api.crateApiDescriptorBdkDescriptorNewBip44Public( + core.instance.api.crateApiDescriptorFfiDescriptorNewBip44Public( publicKey: publicKey, fingerprint: fingerprint, keychainKind: keychainKind, network: network); - static Future newBip49( - {required BdkDescriptorSecretKey secretKey, + static Future newBip49( + {required FfiDescriptorSecretKey secretKey, required KeychainKind keychainKind, required Network network}) => - core.instance.api.crateApiDescriptorBdkDescriptorNewBip49( + core.instance.api.crateApiDescriptorFfiDescriptorNewBip49( secretKey: secretKey, keychainKind: keychainKind, network: network); - static Future newBip49Public( - {required BdkDescriptorPublicKey publicKey, + static Future newBip49Public( + {required FfiDescriptorPublicKey publicKey, required String fingerprint, required KeychainKind keychainKind, required Network network}) => - core.instance.api.crateApiDescriptorBdkDescriptorNewBip49Public( + core.instance.api.crateApiDescriptorFfiDescriptorNewBip49Public( publicKey: publicKey, fingerprint: fingerprint, keychainKind: keychainKind, network: network); - static Future newBip84( - {required BdkDescriptorSecretKey secretKey, + static Future newBip84( + {required FfiDescriptorSecretKey secretKey, required KeychainKind keychainKind, required Network network}) => - core.instance.api.crateApiDescriptorBdkDescriptorNewBip84( + core.instance.api.crateApiDescriptorFfiDescriptorNewBip84( secretKey: secretKey, keychainKind: keychainKind, network: network); - static Future newBip84Public( - {required BdkDescriptorPublicKey publicKey, + static Future newBip84Public( + {required FfiDescriptorPublicKey publicKey, required String fingerprint, required KeychainKind keychainKind, required Network network}) => - core.instance.api.crateApiDescriptorBdkDescriptorNewBip84Public( + core.instance.api.crateApiDescriptorFfiDescriptorNewBip84Public( publicKey: publicKey, fingerprint: fingerprint, keychainKind: keychainKind, network: network); - static Future newBip86( - {required BdkDescriptorSecretKey secretKey, + static Future newBip86( + {required FfiDescriptorSecretKey secretKey, required KeychainKind keychainKind, required Network network}) => - core.instance.api.crateApiDescriptorBdkDescriptorNewBip86( + core.instance.api.crateApiDescriptorFfiDescriptorNewBip86( secretKey: secretKey, keychainKind: keychainKind, network: network); - static Future newBip86Public( - {required BdkDescriptorPublicKey publicKey, + static Future newBip86Public( + {required FfiDescriptorPublicKey publicKey, required String fingerprint, required KeychainKind keychainKind, required Network network}) => - core.instance.api.crateApiDescriptorBdkDescriptorNewBip86Public( + core.instance.api.crateApiDescriptorFfiDescriptorNewBip86Public( publicKey: publicKey, fingerprint: fingerprint, keychainKind: keychainKind, network: network); - String toStringPrivate() => - core.instance.api.crateApiDescriptorBdkDescriptorToStringPrivate( + String toStringWithSecret() => + core.instance.api.crateApiDescriptorFfiDescriptorToStringWithSecret( that: this, ); @@ -120,7 +121,7 @@ class BdkDescriptor { @override bool operator ==(Object other) => identical(this, other) || - other is BdkDescriptor && + other is FfiDescriptor && runtimeType == other.runtimeType && extendedDescriptor == other.extendedDescriptor && keyMap == other.keyMap; diff --git a/lib/src/generated/api/electrum.dart b/lib/src/generated/api/electrum.dart new file mode 100644 index 00000000..93383f8d --- /dev/null +++ b/lib/src/generated/api/electrum.dart @@ -0,0 +1,77 @@ +// This file is automatically generated, so please do not edit it. +// @generated by `flutter_rust_bridge`@ 2.4.0. + +// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import + +import '../frb_generated.dart'; +import '../lib.dart'; +import 'bitcoin.dart'; +import 'error.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; +import 'types.dart'; + +// Rust type: RustOpaqueNom> +abstract class BdkElectrumClientClient implements RustOpaqueInterface {} + +// Rust type: RustOpaqueNom +abstract class Update implements RustOpaqueInterface {} + +// Rust type: RustOpaqueNom > >> +abstract class MutexOptionFullScanRequestKeychainKind + implements RustOpaqueInterface {} + +// Rust type: RustOpaqueNom > >> +abstract class MutexOptionSyncRequestKeychainKindU32 + implements RustOpaqueInterface {} + +class FfiElectrumClient { + final BdkElectrumClientClient opaque; + + const FfiElectrumClient({ + required this.opaque, + }); + + static Future broadcast( + {required FfiElectrumClient opaque, + required FfiTransaction transaction}) => + core.instance.api.crateApiElectrumFfiElectrumClientBroadcast( + opaque: opaque, transaction: transaction); + + static Future fullScan( + {required FfiElectrumClient opaque, + required FfiFullScanRequest request, + required BigInt stopGap, + required BigInt batchSize, + required bool fetchPrevTxouts}) => + core.instance.api.crateApiElectrumFfiElectrumClientFullScan( + opaque: opaque, + request: request, + stopGap: stopGap, + batchSize: batchSize, + fetchPrevTxouts: fetchPrevTxouts); + + // HINT: Make it `#[frb(sync)]` to let it become the default constructor of Dart class. + static Future newInstance({required String url}) => + core.instance.api.crateApiElectrumFfiElectrumClientNew(url: url); + + static Future sync_( + {required FfiElectrumClient opaque, + required FfiSyncRequest request, + required BigInt batchSize, + required bool fetchPrevTxouts}) => + core.instance.api.crateApiElectrumFfiElectrumClientSync( + opaque: opaque, + request: request, + batchSize: batchSize, + fetchPrevTxouts: fetchPrevTxouts); + + @override + int get hashCode => opaque.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is FfiElectrumClient && + runtimeType == other.runtimeType && + opaque == other.opaque; +} diff --git a/lib/src/generated/api/error.dart b/lib/src/generated/api/error.dart index c02c6f53..b06472bd 100644 --- a/lib/src/generated/api/error.dart +++ b/lib/src/generated/api/error.dart @@ -1,362 +1,582 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0. +// @generated by `flutter_rust_bridge`@ 2.4.0. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import import '../frb_generated.dart'; -import '../lib.dart'; +import 'bitcoin.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; import 'package:freezed_annotation/freezed_annotation.dart' hide protected; -import 'types.dart'; part 'error.freezed.dart'; -// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from` +// These types are ignored because they are not used by any `pub` functions: `LockError`, `PersistenceError` +// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from` @freezed -sealed class AddressError with _$AddressError { - const AddressError._(); - - const factory AddressError.base58( - String field0, - ) = AddressError_Base58; - const factory AddressError.bech32( - String field0, - ) = AddressError_Bech32; - const factory AddressError.emptyBech32Payload() = - AddressError_EmptyBech32Payload; - const factory AddressError.invalidBech32Variant({ - required Variant expected, - required Variant found, - }) = AddressError_InvalidBech32Variant; - const factory AddressError.invalidWitnessVersion( - int field0, - ) = AddressError_InvalidWitnessVersion; - const factory AddressError.unparsableWitnessVersion( - String field0, - ) = AddressError_UnparsableWitnessVersion; - const factory AddressError.malformedWitnessVersion() = - AddressError_MalformedWitnessVersion; - const factory AddressError.invalidWitnessProgramLength( - BigInt field0, - ) = AddressError_InvalidWitnessProgramLength; - const factory AddressError.invalidSegwitV0ProgramLength( - BigInt field0, - ) = AddressError_InvalidSegwitV0ProgramLength; - const factory AddressError.uncompressedPubkey() = - AddressError_UncompressedPubkey; - const factory AddressError.excessiveScriptSize() = - AddressError_ExcessiveScriptSize; - const factory AddressError.unrecognizedScript() = - AddressError_UnrecognizedScript; - const factory AddressError.unknownAddressType( - String field0, - ) = AddressError_UnknownAddressType; - const factory AddressError.networkValidation({ - required Network networkRequired, - required Network networkFound, - required String address, - }) = AddressError_NetworkValidation; +sealed class AddressParseError + with _$AddressParseError + implements FrbException { + const AddressParseError._(); + + const factory AddressParseError.base58() = AddressParseError_Base58; + const factory AddressParseError.bech32() = AddressParseError_Bech32; + const factory AddressParseError.witnessVersion({ + required String errorMessage, + }) = AddressParseError_WitnessVersion; + const factory AddressParseError.witnessProgram({ + required String errorMessage, + }) = AddressParseError_WitnessProgram; + const factory AddressParseError.unknownHrp() = AddressParseError_UnknownHrp; + const factory AddressParseError.legacyAddressTooLong() = + AddressParseError_LegacyAddressTooLong; + const factory AddressParseError.invalidBase58PayloadLength() = + AddressParseError_InvalidBase58PayloadLength; + const factory AddressParseError.invalidLegacyPrefix() = + AddressParseError_InvalidLegacyPrefix; + const factory AddressParseError.networkValidation() = + AddressParseError_NetworkValidation; + const factory AddressParseError.otherAddressParseErr() = + AddressParseError_OtherAddressParseErr; } @freezed -sealed class BdkError with _$BdkError implements FrbException { - const BdkError._(); - - /// Hex decoding error - const factory BdkError.hex( - HexError field0, - ) = BdkError_Hex; - - /// Encoding error - const factory BdkError.consensus( - ConsensusError field0, - ) = BdkError_Consensus; - const factory BdkError.verifyTransaction( - String field0, - ) = BdkError_VerifyTransaction; - - /// Address error. - const factory BdkError.address( - AddressError field0, - ) = BdkError_Address; - - /// Error related to the parsing and usage of descriptors - const factory BdkError.descriptor( - DescriptorError field0, - ) = BdkError_Descriptor; - - /// Wrong number of bytes found when trying to convert to u32 - const factory BdkError.invalidU32Bytes( - Uint8List field0, - ) = BdkError_InvalidU32Bytes; - - /// Generic error - const factory BdkError.generic( - String field0, - ) = BdkError_Generic; - - /// This error is thrown when trying to convert Bare and Public key script to address - const factory BdkError.scriptDoesntHaveAddressForm() = - BdkError_ScriptDoesntHaveAddressForm; - - /// Cannot build a tx without recipients - const factory BdkError.noRecipients() = BdkError_NoRecipients; - - /// `manually_selected_only` option is selected but no utxo has been passed - const factory BdkError.noUtxosSelected() = BdkError_NoUtxosSelected; - - /// Output created is under the dust limit, 546 satoshis - const factory BdkError.outputBelowDustLimit( - BigInt field0, - ) = BdkError_OutputBelowDustLimit; - - /// Wallet's UTXO set is not enough to cover recipient's requested plus fee - const factory BdkError.insufficientFunds({ - /// Sats needed for some transaction - required BigInt needed, - - /// Sats available for spending - required BigInt available, - }) = BdkError_InsufficientFunds; - - /// Branch and bound coin selection possible attempts with sufficiently big UTXO set could grow - /// exponentially, thus a limit is set, and when hit, this error is thrown - const factory BdkError.bnBTotalTriesExceeded() = - BdkError_BnBTotalTriesExceeded; - - /// Branch and bound coin selection tries to avoid needing a change by finding the right inputs for - /// the desired outputs plus fee, if there is not such combination this error is thrown - const factory BdkError.bnBNoExactMatch() = BdkError_BnBNoExactMatch; - - /// Happens when trying to spend an UTXO that is not in the internal database - const factory BdkError.unknownUtxo() = BdkError_UnknownUtxo; - - /// Thrown when a tx is not found in the internal database - const factory BdkError.transactionNotFound() = BdkError_TransactionNotFound; +sealed class Bip32Error with _$Bip32Error implements FrbException { + const Bip32Error._(); + + const factory Bip32Error.cannotDeriveFromHardenedKey() = + Bip32Error_CannotDeriveFromHardenedKey; + const factory Bip32Error.secp256K1({ + required String errorMessage, + }) = Bip32Error_Secp256k1; + const factory Bip32Error.invalidChildNumber({ + required int childNumber, + }) = Bip32Error_InvalidChildNumber; + const factory Bip32Error.invalidChildNumberFormat() = + Bip32Error_InvalidChildNumberFormat; + const factory Bip32Error.invalidDerivationPathFormat() = + Bip32Error_InvalidDerivationPathFormat; + const factory Bip32Error.unknownVersion({ + required String version, + }) = Bip32Error_UnknownVersion; + const factory Bip32Error.wrongExtendedKeyLength({ + required int length, + }) = Bip32Error_WrongExtendedKeyLength; + const factory Bip32Error.base58({ + required String errorMessage, + }) = Bip32Error_Base58; + const factory Bip32Error.hex({ + required String errorMessage, + }) = Bip32Error_Hex; + const factory Bip32Error.invalidPublicKeyHexLength({ + required int length, + }) = Bip32Error_InvalidPublicKeyHexLength; + const factory Bip32Error.unknownError({ + required String errorMessage, + }) = Bip32Error_UnknownError; +} - /// Happens when trying to bump a transaction that is already confirmed - const factory BdkError.transactionConfirmed() = BdkError_TransactionConfirmed; +@freezed +sealed class Bip39Error with _$Bip39Error implements FrbException { + const Bip39Error._(); + + const factory Bip39Error.badWordCount({ + required BigInt wordCount, + }) = Bip39Error_BadWordCount; + const factory Bip39Error.unknownWord({ + required BigInt index, + }) = Bip39Error_UnknownWord; + const factory Bip39Error.badEntropyBitCount({ + required BigInt bitCount, + }) = Bip39Error_BadEntropyBitCount; + const factory Bip39Error.invalidChecksum() = Bip39Error_InvalidChecksum; + const factory Bip39Error.ambiguousLanguages({ + required String languages, + }) = Bip39Error_AmbiguousLanguages; + const factory Bip39Error.generic({ + required String errorMessage, + }) = Bip39Error_Generic; +} - /// Trying to replace a tx that has a sequence >= `0xFFFFFFFE` - const factory BdkError.irreplaceableTransaction() = - BdkError_IrreplaceableTransaction; +@freezed +sealed class CalculateFeeError + with _$CalculateFeeError + implements FrbException { + const CalculateFeeError._(); + + const factory CalculateFeeError.generic({ + required String errorMessage, + }) = CalculateFeeError_Generic; + const factory CalculateFeeError.missingTxOut({ + required List outPoints, + }) = CalculateFeeError_MissingTxOut; + const factory CalculateFeeError.negativeFee({ + required String amount, + }) = CalculateFeeError_NegativeFee; +} - /// 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; +@freezed +sealed class CannotConnectError + with _$CannotConnectError + implements FrbException { + const CannotConnectError._(); + + const factory CannotConnectError.include({ + required int height, + }) = CannotConnectError_Include; +} - /// When bumping a tx the absolute fee requested is lower than replaced tx absolute fee - const factory BdkError.feeTooLow({ - /// Required fee absolute value (satoshi) +@freezed +sealed class CreateTxError with _$CreateTxError implements FrbException { + const CreateTxError._(); + + const factory CreateTxError.transactionNotFound({ + required String txid, + }) = CreateTxError_TransactionNotFound; + const factory CreateTxError.transactionConfirmed({ + required String txid, + }) = CreateTxError_TransactionConfirmed; + const factory CreateTxError.irreplaceableTransaction({ + required String txid, + }) = CreateTxError_IrreplaceableTransaction; + const factory CreateTxError.feeRateUnavailable() = + CreateTxError_FeeRateUnavailable; + const factory CreateTxError.generic({ + required String errorMessage, + }) = CreateTxError_Generic; + const factory CreateTxError.descriptor({ + required String errorMessage, + }) = CreateTxError_Descriptor; + const factory CreateTxError.policy({ + required String errorMessage, + }) = CreateTxError_Policy; + const factory CreateTxError.spendingPolicyRequired({ + required String kind, + }) = CreateTxError_SpendingPolicyRequired; + const factory CreateTxError.version0() = CreateTxError_Version0; + const factory CreateTxError.version1Csv() = CreateTxError_Version1Csv; + const factory CreateTxError.lockTime({ + required String requestedTime, + required String requiredTime, + }) = CreateTxError_LockTime; + const factory CreateTxError.rbfSequence() = CreateTxError_RbfSequence; + const factory CreateTxError.rbfSequenceCsv({ + required String rbf, + required String csv, + }) = CreateTxError_RbfSequenceCsv; + const factory CreateTxError.feeTooLow({ + required String feeRequired, + }) = CreateTxError_FeeTooLow; + const factory CreateTxError.feeRateTooLow({ + required String feeRateRequired, + }) = CreateTxError_FeeRateTooLow; + const factory CreateTxError.noUtxosSelected() = CreateTxError_NoUtxosSelected; + const factory CreateTxError.outputBelowDustLimit({ + required BigInt index, + }) = CreateTxError_OutputBelowDustLimit; + const factory CreateTxError.changePolicyDescriptor() = + CreateTxError_ChangePolicyDescriptor; + const factory CreateTxError.coinSelection({ + required String errorMessage, + }) = CreateTxError_CoinSelection; + const factory CreateTxError.insufficientFunds({ required BigInt needed, - }) = BdkError_FeeTooLow; - - /// Node doesn't have data to estimate a fee rate - const factory BdkError.feeRateUnavailable() = BdkError_FeeRateUnavailable; - const factory BdkError.missingKeyOrigin( - String field0, - ) = BdkError_MissingKeyOrigin; - - /// Error while working with keys - const factory BdkError.key( - String field0, - ) = BdkError_Key; - - /// Descriptor checksum mismatch - const factory BdkError.checksumMismatch() = BdkError_ChecksumMismatch; - - /// Spending policy is not compatible with this [KeychainKind] - const factory BdkError.spendingPolicyRequired( - KeychainKind field0, - ) = BdkError_SpendingPolicyRequired; - - /// Error while extracting and manipulating policies - const factory BdkError.invalidPolicyPathError( - String field0, - ) = BdkError_InvalidPolicyPathError; - - /// Signing error - const factory BdkError.signer( - String field0, - ) = BdkError_Signer; - - /// Invalid network - const factory BdkError.invalidNetwork({ - /// requested network, for example what is given as bdk-cli option - required Network requested, - - /// found network, for example the network of the bitcoin node - required Network found, - }) = BdkError_InvalidNetwork; - - /// Requested outpoint doesn't exist in the tx (vout greater than available outputs) - const factory BdkError.invalidOutpoint( - OutPoint field0, - ) = BdkError_InvalidOutpoint; - - /// Encoding error - const factory BdkError.encode( - String field0, - ) = BdkError_Encode; - - /// Miniscript error - const factory BdkError.miniscript( - String field0, - ) = BdkError_Miniscript; - - /// Miniscript PSBT error - const factory BdkError.miniscriptPsbt( - String field0, - ) = BdkError_MiniscriptPsbt; - - /// BIP32 error - const factory BdkError.bip32( - String field0, - ) = BdkError_Bip32; - - /// BIP39 error - const factory BdkError.bip39( - String field0, - ) = BdkError_Bip39; - - /// A secp256k1 error - const factory BdkError.secp256K1( - String field0, - ) = BdkError_Secp256k1; - - /// Error serializing or deserializing JSON data - const factory BdkError.json( - String field0, - ) = BdkError_Json; - - /// Partially signed bitcoin transaction error - const factory BdkError.psbt( - String field0, - ) = BdkError_Psbt; - - /// Partially signed bitcoin transaction parse error - const factory BdkError.psbtParse( - String field0, - ) = BdkError_PsbtParse; - - /// sync attempt failed due to missing scripts in cache which - /// are needed to satisfy `stop_gap`. - const factory BdkError.missingCachedScripts( - BigInt field0, - BigInt field1, - ) = BdkError_MissingCachedScripts; - - /// Electrum client error - const factory BdkError.electrum( - String field0, - ) = BdkError_Electrum; - - /// Esplora client error - const factory BdkError.esplora( - String field0, - ) = BdkError_Esplora; - - /// Sled database error - const factory BdkError.sled( - String field0, - ) = BdkError_Sled; - - /// Rpc client error - const factory BdkError.rpc( - String field0, - ) = BdkError_Rpc; - - /// Rusqlite client error - const factory BdkError.rusqlite( - String field0, - ) = BdkError_Rusqlite; - const factory BdkError.invalidInput( - String field0, - ) = BdkError_InvalidInput; - const factory BdkError.invalidLockTime( - String field0, - ) = BdkError_InvalidLockTime; - const factory BdkError.invalidTransaction( - String field0, - ) = BdkError_InvalidTransaction; + required BigInt available, + }) = CreateTxError_InsufficientFunds; + const factory CreateTxError.noRecipients() = CreateTxError_NoRecipients; + const factory CreateTxError.psbt({ + required String errorMessage, + }) = CreateTxError_Psbt; + const factory CreateTxError.missingKeyOrigin({ + required String key, + }) = CreateTxError_MissingKeyOrigin; + const factory CreateTxError.unknownUtxo({ + required String outpoint, + }) = CreateTxError_UnknownUtxo; + const factory CreateTxError.missingNonWitnessUtxo({ + required String outpoint, + }) = CreateTxError_MissingNonWitnessUtxo; + const factory CreateTxError.miniscriptPsbt({ + required String errorMessage, + }) = CreateTxError_MiniscriptPsbt; } @freezed -sealed class ConsensusError with _$ConsensusError { - const ConsensusError._(); - - const factory ConsensusError.io( - String field0, - ) = ConsensusError_Io; - const factory ConsensusError.oversizedVectorAllocation({ - required BigInt requested, - required BigInt max, - }) = ConsensusError_OversizedVectorAllocation; - const factory ConsensusError.invalidChecksum({ - required U8Array4 expected, - required U8Array4 actual, - }) = ConsensusError_InvalidChecksum; - const factory ConsensusError.nonMinimalVarInt() = - ConsensusError_NonMinimalVarInt; - const factory ConsensusError.parseFailed( - String field0, - ) = ConsensusError_ParseFailed; - const factory ConsensusError.unsupportedSegwitFlag( - int field0, - ) = ConsensusError_UnsupportedSegwitFlag; +sealed class CreateWithPersistError + with _$CreateWithPersistError + implements FrbException { + const CreateWithPersistError._(); + + const factory CreateWithPersistError.persist({ + required String errorMessage, + }) = CreateWithPersistError_Persist; + const factory CreateWithPersistError.dataAlreadyExists() = + CreateWithPersistError_DataAlreadyExists; + const factory CreateWithPersistError.descriptor({ + required String errorMessage, + }) = CreateWithPersistError_Descriptor; } @freezed -sealed class DescriptorError with _$DescriptorError { +sealed class DescriptorError with _$DescriptorError implements FrbException { const DescriptorError._(); const factory DescriptorError.invalidHdKeyPath() = DescriptorError_InvalidHdKeyPath; + const factory DescriptorError.missingPrivateData() = + DescriptorError_MissingPrivateData; 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; + const factory DescriptorError.key({ + required String errorMessage, + }) = DescriptorError_Key; + const factory DescriptorError.generic({ + required String errorMessage, + }) = DescriptorError_Generic; + const factory DescriptorError.policy({ + required String errorMessage, + }) = DescriptorError_Policy; + const factory DescriptorError.invalidDescriptorCharacter({ + required String charector, + }) = DescriptorError_InvalidDescriptorCharacter; + const factory DescriptorError.bip32({ + required String errorMessage, + }) = DescriptorError_Bip32; + const factory DescriptorError.base58({ + required String errorMessage, + }) = DescriptorError_Base58; + const factory DescriptorError.pk({ + required String errorMessage, + }) = DescriptorError_Pk; + const factory DescriptorError.miniscript({ + required String errorMessage, + }) = DescriptorError_Miniscript; + const factory DescriptorError.hex({ + required String errorMessage, + }) = DescriptorError_Hex; + const factory DescriptorError.externalAndInternalAreTheSame() = + DescriptorError_ExternalAndInternalAreTheSame; } @freezed -sealed class HexError with _$HexError { - const HexError._(); - - const factory HexError.invalidChar( - int field0, - ) = HexError_InvalidChar; - const factory HexError.oddLengthString( - BigInt field0, - ) = HexError_OddLengthString; - const factory HexError.invalidLength( - BigInt field0, - BigInt field1, - ) = HexError_InvalidLength; +sealed class DescriptorKeyError + with _$DescriptorKeyError + implements FrbException { + const DescriptorKeyError._(); + + const factory DescriptorKeyError.parse({ + required String errorMessage, + }) = DescriptorKeyError_Parse; + const factory DescriptorKeyError.invalidKeyType() = + DescriptorKeyError_InvalidKeyType; + const factory DescriptorKeyError.bip32({ + required String errorMessage, + }) = DescriptorKeyError_Bip32; +} + +@freezed +sealed class ElectrumError with _$ElectrumError implements FrbException { + const ElectrumError._(); + + const factory ElectrumError.ioError({ + required String errorMessage, + }) = ElectrumError_IOError; + const factory ElectrumError.json({ + required String errorMessage, + }) = ElectrumError_Json; + const factory ElectrumError.hex({ + required String errorMessage, + }) = ElectrumError_Hex; + const factory ElectrumError.protocol({ + required String errorMessage, + }) = ElectrumError_Protocol; + const factory ElectrumError.bitcoin({ + required String errorMessage, + }) = ElectrumError_Bitcoin; + const factory ElectrumError.alreadySubscribed() = + ElectrumError_AlreadySubscribed; + const factory ElectrumError.notSubscribed() = ElectrumError_NotSubscribed; + const factory ElectrumError.invalidResponse({ + required String errorMessage, + }) = ElectrumError_InvalidResponse; + const factory ElectrumError.message({ + required String errorMessage, + }) = ElectrumError_Message; + const factory ElectrumError.invalidDnsNameError({ + required String domain, + }) = ElectrumError_InvalidDNSNameError; + const factory ElectrumError.missingDomain() = ElectrumError_MissingDomain; + const factory ElectrumError.allAttemptsErrored() = + ElectrumError_AllAttemptsErrored; + const factory ElectrumError.sharedIoError({ + required String errorMessage, + }) = ElectrumError_SharedIOError; + const factory ElectrumError.couldntLockReader() = + ElectrumError_CouldntLockReader; + const factory ElectrumError.mpsc() = ElectrumError_Mpsc; + const factory ElectrumError.couldNotCreateConnection({ + required String errorMessage, + }) = ElectrumError_CouldNotCreateConnection; + const factory ElectrumError.requestAlreadyConsumed() = + ElectrumError_RequestAlreadyConsumed; +} + +@freezed +sealed class EsploraError with _$EsploraError implements FrbException { + const EsploraError._(); + + const factory EsploraError.minreq({ + required String errorMessage, + }) = EsploraError_Minreq; + const factory EsploraError.httpResponse({ + required int status, + required String errorMessage, + }) = EsploraError_HttpResponse; + const factory EsploraError.parsing({ + required String errorMessage, + }) = EsploraError_Parsing; + const factory EsploraError.statusCode({ + required String errorMessage, + }) = EsploraError_StatusCode; + const factory EsploraError.bitcoinEncoding({ + required String errorMessage, + }) = EsploraError_BitcoinEncoding; + const factory EsploraError.hexToArray({ + required String errorMessage, + }) = EsploraError_HexToArray; + const factory EsploraError.hexToBytes({ + required String errorMessage, + }) = EsploraError_HexToBytes; + const factory EsploraError.transactionNotFound() = + EsploraError_TransactionNotFound; + const factory EsploraError.headerHeightNotFound({ + required int height, + }) = EsploraError_HeaderHeightNotFound; + const factory EsploraError.headerHashNotFound() = + EsploraError_HeaderHashNotFound; + const factory EsploraError.invalidHttpHeaderName({ + required String name, + }) = EsploraError_InvalidHttpHeaderName; + const factory EsploraError.invalidHttpHeaderValue({ + required String value, + }) = EsploraError_InvalidHttpHeaderValue; + const factory EsploraError.requestAlreadyConsumed() = + EsploraError_RequestAlreadyConsumed; +} + +@freezed +sealed class ExtractTxError with _$ExtractTxError implements FrbException { + const ExtractTxError._(); + + const factory ExtractTxError.absurdFeeRate({ + required BigInt feeRate, + }) = ExtractTxError_AbsurdFeeRate; + const factory ExtractTxError.missingInputValue() = + ExtractTxError_MissingInputValue; + const factory ExtractTxError.sendingTooMuch() = ExtractTxError_SendingTooMuch; + const factory ExtractTxError.otherExtractTxErr() = + ExtractTxError_OtherExtractTxErr; +} + +@freezed +sealed class FromScriptError with _$FromScriptError implements FrbException { + const FromScriptError._(); + + const factory FromScriptError.unrecognizedScript() = + FromScriptError_UnrecognizedScript; + const factory FromScriptError.witnessProgram({ + required String errorMessage, + }) = FromScriptError_WitnessProgram; + const factory FromScriptError.witnessVersion({ + required String errorMessage, + }) = FromScriptError_WitnessVersion; + const factory FromScriptError.otherFromScriptErr() = + FromScriptError_OtherFromScriptErr; +} + +@freezed +sealed class LoadWithPersistError + with _$LoadWithPersistError + implements FrbException { + const LoadWithPersistError._(); + + const factory LoadWithPersistError.persist({ + required String errorMessage, + }) = LoadWithPersistError_Persist; + const factory LoadWithPersistError.invalidChangeSet({ + required String errorMessage, + }) = LoadWithPersistError_InvalidChangeSet; + const factory LoadWithPersistError.couldNotLoad() = + LoadWithPersistError_CouldNotLoad; +} + +@freezed +sealed class PsbtError with _$PsbtError implements FrbException { + const PsbtError._(); + + const factory PsbtError.invalidMagic() = PsbtError_InvalidMagic; + const factory PsbtError.missingUtxo() = PsbtError_MissingUtxo; + const factory PsbtError.invalidSeparator() = PsbtError_InvalidSeparator; + const factory PsbtError.psbtUtxoOutOfBounds() = PsbtError_PsbtUtxoOutOfBounds; + const factory PsbtError.invalidKey({ + required String key, + }) = PsbtError_InvalidKey; + const factory PsbtError.invalidProprietaryKey() = + PsbtError_InvalidProprietaryKey; + const factory PsbtError.duplicateKey({ + required String key, + }) = PsbtError_DuplicateKey; + const factory PsbtError.unsignedTxHasScriptSigs() = + PsbtError_UnsignedTxHasScriptSigs; + const factory PsbtError.unsignedTxHasScriptWitnesses() = + PsbtError_UnsignedTxHasScriptWitnesses; + const factory PsbtError.mustHaveUnsignedTx() = PsbtError_MustHaveUnsignedTx; + const factory PsbtError.noMorePairs() = PsbtError_NoMorePairs; + const factory PsbtError.unexpectedUnsignedTx() = + PsbtError_UnexpectedUnsignedTx; + const factory PsbtError.nonStandardSighashType({ + required int sighash, + }) = PsbtError_NonStandardSighashType; + const factory PsbtError.invalidHash({ + required String hash, + }) = PsbtError_InvalidHash; + const factory PsbtError.invalidPreimageHashPair() = + PsbtError_InvalidPreimageHashPair; + const factory PsbtError.combineInconsistentKeySources({ + required String xpub, + }) = PsbtError_CombineInconsistentKeySources; + const factory PsbtError.consensusEncoding({ + required String encodingError, + }) = PsbtError_ConsensusEncoding; + const factory PsbtError.negativeFee() = PsbtError_NegativeFee; + const factory PsbtError.feeOverflow() = PsbtError_FeeOverflow; + const factory PsbtError.invalidPublicKey({ + required String errorMessage, + }) = PsbtError_InvalidPublicKey; + const factory PsbtError.invalidSecp256K1PublicKey({ + required String secp256K1Error, + }) = PsbtError_InvalidSecp256k1PublicKey; + const factory PsbtError.invalidXOnlyPublicKey() = + PsbtError_InvalidXOnlyPublicKey; + const factory PsbtError.invalidEcdsaSignature({ + required String errorMessage, + }) = PsbtError_InvalidEcdsaSignature; + const factory PsbtError.invalidTaprootSignature({ + required String errorMessage, + }) = PsbtError_InvalidTaprootSignature; + const factory PsbtError.invalidControlBlock() = PsbtError_InvalidControlBlock; + const factory PsbtError.invalidLeafVersion() = PsbtError_InvalidLeafVersion; + const factory PsbtError.taproot() = PsbtError_Taproot; + const factory PsbtError.tapTree({ + required String errorMessage, + }) = PsbtError_TapTree; + const factory PsbtError.xPubKey() = PsbtError_XPubKey; + const factory PsbtError.version({ + required String errorMessage, + }) = PsbtError_Version; + const factory PsbtError.partialDataConsumption() = + PsbtError_PartialDataConsumption; + const factory PsbtError.io({ + required String errorMessage, + }) = PsbtError_Io; + const factory PsbtError.otherPsbtErr() = PsbtError_OtherPsbtErr; +} + +@freezed +sealed class PsbtParseError with _$PsbtParseError implements FrbException { + const PsbtParseError._(); + + const factory PsbtParseError.psbtEncoding({ + required String errorMessage, + }) = PsbtParseError_PsbtEncoding; + const factory PsbtParseError.base64Encoding({ + required String errorMessage, + }) = PsbtParseError_Base64Encoding; +} + +enum RequestBuilderError { + requestAlreadyConsumed, + ; +} + +@freezed +sealed class SignerError with _$SignerError implements FrbException { + const SignerError._(); + + const factory SignerError.missingKey() = SignerError_MissingKey; + const factory SignerError.invalidKey() = SignerError_InvalidKey; + const factory SignerError.userCanceled() = SignerError_UserCanceled; + const factory SignerError.inputIndexOutOfRange() = + SignerError_InputIndexOutOfRange; + const factory SignerError.missingNonWitnessUtxo() = + SignerError_MissingNonWitnessUtxo; + const factory SignerError.invalidNonWitnessUtxo() = + SignerError_InvalidNonWitnessUtxo; + const factory SignerError.missingWitnessUtxo() = + SignerError_MissingWitnessUtxo; + const factory SignerError.missingWitnessScript() = + SignerError_MissingWitnessScript; + const factory SignerError.missingHdKeypath() = SignerError_MissingHdKeypath; + const factory SignerError.nonStandardSighash() = + SignerError_NonStandardSighash; + const factory SignerError.invalidSighash() = SignerError_InvalidSighash; + const factory SignerError.sighashP2Wpkh({ + required String errorMessage, + }) = SignerError_SighashP2wpkh; + const factory SignerError.sighashTaproot({ + required String errorMessage, + }) = SignerError_SighashTaproot; + const factory SignerError.txInputsIndexError({ + required String errorMessage, + }) = SignerError_TxInputsIndexError; + const factory SignerError.miniscriptPsbt({ + required String errorMessage, + }) = SignerError_MiniscriptPsbt; + const factory SignerError.external_({ + required String errorMessage, + }) = SignerError_External; + const factory SignerError.psbt({ + required String errorMessage, + }) = SignerError_Psbt; +} + +@freezed +sealed class SqliteError with _$SqliteError implements FrbException { + const SqliteError._(); + + const factory SqliteError.sqlite({ + required String rusqliteError, + }) = SqliteError_Sqlite; +} + +@freezed +sealed class TransactionError with _$TransactionError implements FrbException { + const TransactionError._(); + + const factory TransactionError.io() = TransactionError_Io; + const factory TransactionError.oversizedVectorAllocation() = + TransactionError_OversizedVectorAllocation; + const factory TransactionError.invalidChecksum({ + required String expected, + required String actual, + }) = TransactionError_InvalidChecksum; + const factory TransactionError.nonMinimalVarInt() = + TransactionError_NonMinimalVarInt; + const factory TransactionError.parseFailed() = TransactionError_ParseFailed; + const factory TransactionError.unsupportedSegwitFlag({ + required int flag, + }) = TransactionError_UnsupportedSegwitFlag; + const factory TransactionError.otherTransactionErr() = + TransactionError_OtherTransactionErr; +} + +@freezed +sealed class TxidParseError with _$TxidParseError implements FrbException { + const TxidParseError._(); + + const factory TxidParseError.invalidTxid({ + required String txid, + }) = TxidParseError_InvalidTxid; } diff --git a/lib/src/generated/api/error.freezed.dart b/lib/src/generated/api/error.freezed.dart index 72d8139e..46f517bf 100644 --- a/lib/src/generated/api/error.freezed.dart +++ b/lib/src/generated/api/error.freezed.dart @@ -15,167 +15,124 @@ final _privateConstructorUsedError = UnsupportedError( 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); /// @nodoc -mixin _$AddressError { +mixin _$AddressParseError { @optionalTypeArgs TResult when({ - required TResult Function(String field0) base58, - required TResult Function(String field0) bech32, - required TResult Function() emptyBech32Payload, - required TResult Function(Variant expected, Variant found) - invalidBech32Variant, - required TResult Function(int field0) invalidWitnessVersion, - required TResult Function(String field0) unparsableWitnessVersion, - required TResult Function() malformedWitnessVersion, - required TResult Function(BigInt field0) invalidWitnessProgramLength, - required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, - required TResult Function() uncompressedPubkey, - required TResult Function() excessiveScriptSize, - required TResult Function() unrecognizedScript, - required TResult Function(String field0) unknownAddressType, - required TResult Function( - Network networkRequired, Network networkFound, String address) - networkValidation, + required TResult Function() base58, + required TResult Function() bech32, + required TResult Function(String errorMessage) witnessVersion, + required TResult Function(String errorMessage) witnessProgram, + required TResult Function() unknownHrp, + required TResult Function() legacyAddressTooLong, + required TResult Function() invalidBase58PayloadLength, + required TResult Function() invalidLegacyPrefix, + required TResult Function() networkValidation, + required TResult Function() otherAddressParseErr, }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(String field0)? base58, - TResult? Function(String field0)? bech32, - TResult? Function()? emptyBech32Payload, - TResult? Function(Variant expected, Variant found)? invalidBech32Variant, - TResult? Function(int field0)? invalidWitnessVersion, - TResult? Function(String field0)? unparsableWitnessVersion, - TResult? Function()? malformedWitnessVersion, - TResult? Function(BigInt field0)? invalidWitnessProgramLength, - TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult? Function()? uncompressedPubkey, - TResult? Function()? excessiveScriptSize, - TResult? Function()? unrecognizedScript, - TResult? Function(String field0)? unknownAddressType, - TResult? Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, + TResult? Function()? base58, + TResult? Function()? bech32, + TResult? Function(String errorMessage)? witnessVersion, + TResult? Function(String errorMessage)? witnessProgram, + TResult? Function()? unknownHrp, + TResult? Function()? legacyAddressTooLong, + TResult? Function()? invalidBase58PayloadLength, + TResult? Function()? invalidLegacyPrefix, + TResult? Function()? networkValidation, + TResult? Function()? otherAddressParseErr, }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeWhen({ - TResult Function(String field0)? base58, - TResult Function(String field0)? bech32, - TResult Function()? emptyBech32Payload, - TResult Function(Variant expected, Variant found)? invalidBech32Variant, - TResult Function(int field0)? invalidWitnessVersion, - TResult Function(String field0)? unparsableWitnessVersion, - TResult Function()? malformedWitnessVersion, - TResult Function(BigInt field0)? invalidWitnessProgramLength, - TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult Function()? uncompressedPubkey, - TResult Function()? excessiveScriptSize, - TResult Function()? unrecognizedScript, - TResult Function(String field0)? unknownAddressType, - TResult Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, + TResult Function()? base58, + TResult Function()? bech32, + TResult Function(String errorMessage)? witnessVersion, + TResult Function(String errorMessage)? witnessProgram, + TResult Function()? unknownHrp, + TResult Function()? legacyAddressTooLong, + TResult Function()? invalidBase58PayloadLength, + TResult Function()? invalidLegacyPrefix, + TResult Function()? networkValidation, + TResult Function()? otherAddressParseErr, 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) + required TResult Function(AddressParseError_Base58 value) base58, + required TResult Function(AddressParseError_Bech32 value) bech32, + required TResult Function(AddressParseError_WitnessVersion value) + witnessVersion, + required TResult Function(AddressParseError_WitnessProgram value) + witnessProgram, + required TResult Function(AddressParseError_UnknownHrp value) unknownHrp, + required TResult Function(AddressParseError_LegacyAddressTooLong value) + legacyAddressTooLong, + required TResult Function( + AddressParseError_InvalidBase58PayloadLength value) + invalidBase58PayloadLength, + required TResult Function(AddressParseError_InvalidLegacyPrefix value) + invalidLegacyPrefix, + required TResult Function(AddressParseError_NetworkValidation value) networkValidation, + required TResult Function(AddressParseError_OtherAddressParseErr value) + otherAddressParseErr, }) => 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, + TResult? Function(AddressParseError_Base58 value)? base58, + TResult? Function(AddressParseError_Bech32 value)? bech32, + TResult? Function(AddressParseError_WitnessVersion value)? witnessVersion, + TResult? Function(AddressParseError_WitnessProgram value)? witnessProgram, + TResult? Function(AddressParseError_UnknownHrp value)? unknownHrp, + TResult? Function(AddressParseError_LegacyAddressTooLong value)? + legacyAddressTooLong, + TResult? Function(AddressParseError_InvalidBase58PayloadLength value)? + invalidBase58PayloadLength, + TResult? Function(AddressParseError_InvalidLegacyPrefix value)? + invalidLegacyPrefix, + TResult? Function(AddressParseError_NetworkValidation value)? + networkValidation, + TResult? Function(AddressParseError_OtherAddressParseErr value)? + otherAddressParseErr, }) => 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, + TResult Function(AddressParseError_Base58 value)? base58, + TResult Function(AddressParseError_Bech32 value)? bech32, + TResult Function(AddressParseError_WitnessVersion value)? witnessVersion, + TResult Function(AddressParseError_WitnessProgram value)? witnessProgram, + TResult Function(AddressParseError_UnknownHrp value)? unknownHrp, + TResult Function(AddressParseError_LegacyAddressTooLong value)? + legacyAddressTooLong, + TResult Function(AddressParseError_InvalidBase58PayloadLength value)? + invalidBase58PayloadLength, + TResult Function(AddressParseError_InvalidLegacyPrefix value)? + invalidLegacyPrefix, + TResult Function(AddressParseError_NetworkValidation value)? + networkValidation, + TResult Function(AddressParseError_OtherAddressParseErr value)? + otherAddressParseErr, required TResult orElse(), }) => throw _privateConstructorUsedError; } /// @nodoc -abstract class $AddressErrorCopyWith<$Res> { - factory $AddressErrorCopyWith( - AddressError value, $Res Function(AddressError) then) = - _$AddressErrorCopyWithImpl<$Res, AddressError>; +abstract class $AddressParseErrorCopyWith<$Res> { + factory $AddressParseErrorCopyWith( + AddressParseError value, $Res Function(AddressParseError) then) = + _$AddressParseErrorCopyWithImpl<$Res, AddressParseError>; } /// @nodoc -class _$AddressErrorCopyWithImpl<$Res, $Val extends AddressError> - implements $AddressErrorCopyWith<$Res> { - _$AddressErrorCopyWithImpl(this._value, this._then); +class _$AddressParseErrorCopyWithImpl<$Res, $Val extends AddressParseError> + implements $AddressParseErrorCopyWith<$Res> { + _$AddressParseErrorCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -184,137 +141,95 @@ class _$AddressErrorCopyWithImpl<$Res, $Val extends AddressError> } /// @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}); +abstract class _$$AddressParseError_Base58ImplCopyWith<$Res> { + factory _$$AddressParseError_Base58ImplCopyWith( + _$AddressParseError_Base58Impl value, + $Res Function(_$AddressParseError_Base58Impl) then) = + __$$AddressParseError_Base58ImplCopyWithImpl<$Res>; } /// @nodoc -class __$$AddressError_Base58ImplCopyWithImpl<$Res> - extends _$AddressErrorCopyWithImpl<$Res, _$AddressError_Base58Impl> - implements _$$AddressError_Base58ImplCopyWith<$Res> { - __$$AddressError_Base58ImplCopyWithImpl(_$AddressError_Base58Impl _value, - $Res Function(_$AddressError_Base58Impl) _then) +class __$$AddressParseError_Base58ImplCopyWithImpl<$Res> + extends _$AddressParseErrorCopyWithImpl<$Res, + _$AddressParseError_Base58Impl> + implements _$$AddressParseError_Base58ImplCopyWith<$Res> { + __$$AddressParseError_Base58ImplCopyWithImpl( + _$AddressParseError_Base58Impl _value, + $Res Function(_$AddressParseError_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; +class _$AddressParseError_Base58Impl extends AddressParseError_Base58 { + const _$AddressParseError_Base58Impl() : super._(); @override String toString() { - return 'AddressError.base58(field0: $field0)'; + return 'AddressParseError.base58()'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$AddressError_Base58Impl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$AddressParseError_Base58Impl); } @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); + int get hashCode => runtimeType.hashCode; @override @optionalTypeArgs TResult when({ - required TResult Function(String field0) base58, - required TResult Function(String field0) bech32, - required TResult Function() emptyBech32Payload, - required TResult Function(Variant expected, Variant found) - invalidBech32Variant, - required TResult Function(int field0) invalidWitnessVersion, - required TResult Function(String field0) unparsableWitnessVersion, - required TResult Function() malformedWitnessVersion, - required TResult Function(BigInt field0) invalidWitnessProgramLength, - required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, - required TResult Function() uncompressedPubkey, - required TResult Function() excessiveScriptSize, - required TResult Function() unrecognizedScript, - required TResult Function(String field0) unknownAddressType, - required TResult Function( - Network networkRequired, Network networkFound, String address) - networkValidation, + required TResult Function() base58, + required TResult Function() bech32, + required TResult Function(String errorMessage) witnessVersion, + required TResult Function(String errorMessage) witnessProgram, + required TResult Function() unknownHrp, + required TResult Function() legacyAddressTooLong, + required TResult Function() invalidBase58PayloadLength, + required TResult Function() invalidLegacyPrefix, + required TResult Function() networkValidation, + required TResult Function() otherAddressParseErr, }) { - return base58(field0); + return base58(); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(String field0)? base58, - TResult? Function(String field0)? bech32, - TResult? Function()? emptyBech32Payload, - TResult? Function(Variant expected, Variant found)? invalidBech32Variant, - TResult? Function(int field0)? invalidWitnessVersion, - TResult? Function(String field0)? unparsableWitnessVersion, - TResult? Function()? malformedWitnessVersion, - TResult? Function(BigInt field0)? invalidWitnessProgramLength, - TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult? Function()? uncompressedPubkey, - TResult? Function()? excessiveScriptSize, - TResult? Function()? unrecognizedScript, - TResult? Function(String field0)? unknownAddressType, - TResult? Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, + TResult? Function()? base58, + TResult? Function()? bech32, + TResult? Function(String errorMessage)? witnessVersion, + TResult? Function(String errorMessage)? witnessProgram, + TResult? Function()? unknownHrp, + TResult? Function()? legacyAddressTooLong, + TResult? Function()? invalidBase58PayloadLength, + TResult? Function()? invalidLegacyPrefix, + TResult? Function()? networkValidation, + TResult? Function()? otherAddressParseErr, }) { - return base58?.call(field0); + return base58?.call(); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(String field0)? base58, - TResult Function(String field0)? bech32, - TResult Function()? emptyBech32Payload, - TResult Function(Variant expected, Variant found)? invalidBech32Variant, - TResult Function(int field0)? invalidWitnessVersion, - TResult Function(String field0)? unparsableWitnessVersion, - TResult Function()? malformedWitnessVersion, - TResult Function(BigInt field0)? invalidWitnessProgramLength, - TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult Function()? uncompressedPubkey, - TResult Function()? excessiveScriptSize, - TResult Function()? unrecognizedScript, - TResult Function(String field0)? unknownAddressType, - TResult Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, + TResult Function()? base58, + TResult Function()? bech32, + TResult Function(String errorMessage)? witnessVersion, + TResult Function(String errorMessage)? witnessProgram, + TResult Function()? unknownHrp, + TResult Function()? legacyAddressTooLong, + TResult Function()? invalidBase58PayloadLength, + TResult Function()? invalidLegacyPrefix, + TResult Function()? networkValidation, + TResult Function()? otherAddressParseErr, required TResult orElse(), }) { if (base58 != null) { - return base58(field0); + return base58(); } return orElse(); } @@ -322,32 +237,24 @@ class _$AddressError_Base58Impl extends AddressError_Base58 { @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) + required TResult Function(AddressParseError_Base58 value) base58, + required TResult Function(AddressParseError_Bech32 value) bech32, + required TResult Function(AddressParseError_WitnessVersion value) + witnessVersion, + required TResult Function(AddressParseError_WitnessProgram value) + witnessProgram, + required TResult Function(AddressParseError_UnknownHrp value) unknownHrp, + required TResult Function(AddressParseError_LegacyAddressTooLong value) + legacyAddressTooLong, + required TResult Function( + AddressParseError_InvalidBase58PayloadLength value) + invalidBase58PayloadLength, + required TResult Function(AddressParseError_InvalidLegacyPrefix value) + invalidLegacyPrefix, + required TResult Function(AddressParseError_NetworkValidation value) networkValidation, + required TResult Function(AddressParseError_OtherAddressParseErr value) + otherAddressParseErr, }) { return base58(this); } @@ -355,31 +262,21 @@ class _$AddressError_Base58Impl extends AddressError_Base58 { @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, + TResult? Function(AddressParseError_Base58 value)? base58, + TResult? Function(AddressParseError_Bech32 value)? bech32, + TResult? Function(AddressParseError_WitnessVersion value)? witnessVersion, + TResult? Function(AddressParseError_WitnessProgram value)? witnessProgram, + TResult? Function(AddressParseError_UnknownHrp value)? unknownHrp, + TResult? Function(AddressParseError_LegacyAddressTooLong value)? + legacyAddressTooLong, + TResult? Function(AddressParseError_InvalidBase58PayloadLength value)? + invalidBase58PayloadLength, + TResult? Function(AddressParseError_InvalidLegacyPrefix value)? + invalidLegacyPrefix, + TResult? Function(AddressParseError_NetworkValidation value)? + networkValidation, + TResult? Function(AddressParseError_OtherAddressParseErr value)? + otherAddressParseErr, }) { return base58?.call(this); } @@ -387,27 +284,21 @@ class _$AddressError_Base58Impl extends AddressError_Base58 { @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, + TResult Function(AddressParseError_Base58 value)? base58, + TResult Function(AddressParseError_Bech32 value)? bech32, + TResult Function(AddressParseError_WitnessVersion value)? witnessVersion, + TResult Function(AddressParseError_WitnessProgram value)? witnessProgram, + TResult Function(AddressParseError_UnknownHrp value)? unknownHrp, + TResult Function(AddressParseError_LegacyAddressTooLong value)? + legacyAddressTooLong, + TResult Function(AddressParseError_InvalidBase58PayloadLength value)? + invalidBase58PayloadLength, + TResult Function(AddressParseError_InvalidLegacyPrefix value)? + invalidLegacyPrefix, + TResult Function(AddressParseError_NetworkValidation value)? + networkValidation, + TResult Function(AddressParseError_OtherAddressParseErr value)? + otherAddressParseErr, required TResult orElse(), }) { if (base58 != null) { @@ -417,149 +308,101 @@ class _$AddressError_Base58Impl extends AddressError_Base58 { } } -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; +abstract class AddressParseError_Base58 extends AddressParseError { + const factory AddressParseError_Base58() = _$AddressParseError_Base58Impl; + const AddressParseError_Base58._() : super._(); } /// @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}); +abstract class _$$AddressParseError_Bech32ImplCopyWith<$Res> { + factory _$$AddressParseError_Bech32ImplCopyWith( + _$AddressParseError_Bech32Impl value, + $Res Function(_$AddressParseError_Bech32Impl) then) = + __$$AddressParseError_Bech32ImplCopyWithImpl<$Res>; } /// @nodoc -class __$$AddressError_Bech32ImplCopyWithImpl<$Res> - extends _$AddressErrorCopyWithImpl<$Res, _$AddressError_Bech32Impl> - implements _$$AddressError_Bech32ImplCopyWith<$Res> { - __$$AddressError_Bech32ImplCopyWithImpl(_$AddressError_Bech32Impl _value, - $Res Function(_$AddressError_Bech32Impl) _then) +class __$$AddressParseError_Bech32ImplCopyWithImpl<$Res> + extends _$AddressParseErrorCopyWithImpl<$Res, + _$AddressParseError_Bech32Impl> + implements _$$AddressParseError_Bech32ImplCopyWith<$Res> { + __$$AddressParseError_Bech32ImplCopyWithImpl( + _$AddressParseError_Bech32Impl _value, + $Res Function(_$AddressParseError_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; +class _$AddressParseError_Bech32Impl extends AddressParseError_Bech32 { + const _$AddressParseError_Bech32Impl() : super._(); @override String toString() { - return 'AddressError.bech32(field0: $field0)'; + return 'AddressParseError.bech32()'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$AddressError_Bech32Impl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$AddressParseError_Bech32Impl); } @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); + int get hashCode => runtimeType.hashCode; @override @optionalTypeArgs TResult when({ - required TResult Function(String field0) base58, - required TResult Function(String field0) bech32, - required TResult Function() emptyBech32Payload, - required TResult Function(Variant expected, Variant found) - invalidBech32Variant, - required TResult Function(int field0) invalidWitnessVersion, - required TResult Function(String field0) unparsableWitnessVersion, - required TResult Function() malformedWitnessVersion, - required TResult Function(BigInt field0) invalidWitnessProgramLength, - required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, - required TResult Function() uncompressedPubkey, - required TResult Function() excessiveScriptSize, - required TResult Function() unrecognizedScript, - required TResult Function(String field0) unknownAddressType, - required TResult Function( - Network networkRequired, Network networkFound, String address) - networkValidation, + required TResult Function() base58, + required TResult Function() bech32, + required TResult Function(String errorMessage) witnessVersion, + required TResult Function(String errorMessage) witnessProgram, + required TResult Function() unknownHrp, + required TResult Function() legacyAddressTooLong, + required TResult Function() invalidBase58PayloadLength, + required TResult Function() invalidLegacyPrefix, + required TResult Function() networkValidation, + required TResult Function() otherAddressParseErr, }) { - return bech32(field0); + return bech32(); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(String field0)? base58, - TResult? Function(String field0)? bech32, - TResult? Function()? emptyBech32Payload, - TResult? Function(Variant expected, Variant found)? invalidBech32Variant, - TResult? Function(int field0)? invalidWitnessVersion, - TResult? Function(String field0)? unparsableWitnessVersion, - TResult? Function()? malformedWitnessVersion, - TResult? Function(BigInt field0)? invalidWitnessProgramLength, - TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult? Function()? uncompressedPubkey, - TResult? Function()? excessiveScriptSize, - TResult? Function()? unrecognizedScript, - TResult? Function(String field0)? unknownAddressType, - TResult? Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, + TResult? Function()? base58, + TResult? Function()? bech32, + TResult? Function(String errorMessage)? witnessVersion, + TResult? Function(String errorMessage)? witnessProgram, + TResult? Function()? unknownHrp, + TResult? Function()? legacyAddressTooLong, + TResult? Function()? invalidBase58PayloadLength, + TResult? Function()? invalidLegacyPrefix, + TResult? Function()? networkValidation, + TResult? Function()? otherAddressParseErr, }) { - return bech32?.call(field0); + return bech32?.call(); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(String field0)? base58, - TResult Function(String field0)? bech32, - TResult Function()? emptyBech32Payload, - TResult Function(Variant expected, Variant found)? invalidBech32Variant, - TResult Function(int field0)? invalidWitnessVersion, - TResult Function(String field0)? unparsableWitnessVersion, - TResult Function()? malformedWitnessVersion, - TResult Function(BigInt field0)? invalidWitnessProgramLength, - TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult Function()? uncompressedPubkey, - TResult Function()? excessiveScriptSize, - TResult Function()? unrecognizedScript, - TResult Function(String field0)? unknownAddressType, - TResult Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, + TResult Function()? base58, + TResult Function()? bech32, + TResult Function(String errorMessage)? witnessVersion, + TResult Function(String errorMessage)? witnessProgram, + TResult Function()? unknownHrp, + TResult Function()? legacyAddressTooLong, + TResult Function()? invalidBase58PayloadLength, + TResult Function()? invalidLegacyPrefix, + TResult Function()? networkValidation, + TResult Function()? otherAddressParseErr, required TResult orElse(), }) { if (bech32 != null) { - return bech32(field0); + return bech32(); } return orElse(); } @@ -567,32 +410,24 @@ class _$AddressError_Bech32Impl extends AddressError_Bech32 { @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) + required TResult Function(AddressParseError_Base58 value) base58, + required TResult Function(AddressParseError_Bech32 value) bech32, + required TResult Function(AddressParseError_WitnessVersion value) + witnessVersion, + required TResult Function(AddressParseError_WitnessProgram value) + witnessProgram, + required TResult Function(AddressParseError_UnknownHrp value) unknownHrp, + required TResult Function(AddressParseError_LegacyAddressTooLong value) + legacyAddressTooLong, + required TResult Function( + AddressParseError_InvalidBase58PayloadLength value) + invalidBase58PayloadLength, + required TResult Function(AddressParseError_InvalidLegacyPrefix value) + invalidLegacyPrefix, + required TResult Function(AddressParseError_NetworkValidation value) networkValidation, + required TResult Function(AddressParseError_OtherAddressParseErr value) + otherAddressParseErr, }) { return bech32(this); } @@ -600,31 +435,21 @@ class _$AddressError_Bech32Impl extends AddressError_Bech32 { @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, + TResult? Function(AddressParseError_Base58 value)? base58, + TResult? Function(AddressParseError_Bech32 value)? bech32, + TResult? Function(AddressParseError_WitnessVersion value)? witnessVersion, + TResult? Function(AddressParseError_WitnessProgram value)? witnessProgram, + TResult? Function(AddressParseError_UnknownHrp value)? unknownHrp, + TResult? Function(AddressParseError_LegacyAddressTooLong value)? + legacyAddressTooLong, + TResult? Function(AddressParseError_InvalidBase58PayloadLength value)? + invalidBase58PayloadLength, + TResult? Function(AddressParseError_InvalidLegacyPrefix value)? + invalidLegacyPrefix, + TResult? Function(AddressParseError_NetworkValidation value)? + networkValidation, + TResult? Function(AddressParseError_OtherAddressParseErr value)? + otherAddressParseErr, }) { return bech32?.call(this); } @@ -632,27 +457,21 @@ class _$AddressError_Bech32Impl extends AddressError_Bech32 { @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, + TResult Function(AddressParseError_Base58 value)? base58, + TResult Function(AddressParseError_Bech32 value)? bech32, + TResult Function(AddressParseError_WitnessVersion value)? witnessVersion, + TResult Function(AddressParseError_WitnessProgram value)? witnessProgram, + TResult Function(AddressParseError_UnknownHrp value)? unknownHrp, + TResult Function(AddressParseError_LegacyAddressTooLong value)? + legacyAddressTooLong, + TResult Function(AddressParseError_InvalidBase58PayloadLength value)? + invalidBase58PayloadLength, + TResult Function(AddressParseError_InvalidLegacyPrefix value)? + invalidLegacyPrefix, + TResult Function(AddressParseError_NetworkValidation value)? + networkValidation, + TResult Function(AddressParseError_OtherAddressParseErr value)? + otherAddressParseErr, required TResult orElse(), }) { if (bech32 != null) { @@ -662,127 +481,131 @@ class _$AddressError_Bech32Impl extends AddressError_Bech32 { } } -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; +abstract class AddressParseError_Bech32 extends AddressParseError { + const factory AddressParseError_Bech32() = _$AddressParseError_Bech32Impl; + const AddressParseError_Bech32._() : super._(); } /// @nodoc -abstract class _$$AddressError_EmptyBech32PayloadImplCopyWith<$Res> { - factory _$$AddressError_EmptyBech32PayloadImplCopyWith( - _$AddressError_EmptyBech32PayloadImpl value, - $Res Function(_$AddressError_EmptyBech32PayloadImpl) then) = - __$$AddressError_EmptyBech32PayloadImplCopyWithImpl<$Res>; +abstract class _$$AddressParseError_WitnessVersionImplCopyWith<$Res> { + factory _$$AddressParseError_WitnessVersionImplCopyWith( + _$AddressParseError_WitnessVersionImpl value, + $Res Function(_$AddressParseError_WitnessVersionImpl) then) = + __$$AddressParseError_WitnessVersionImplCopyWithImpl<$Res>; + @useResult + $Res call({String errorMessage}); } /// @nodoc -class __$$AddressError_EmptyBech32PayloadImplCopyWithImpl<$Res> - extends _$AddressErrorCopyWithImpl<$Res, - _$AddressError_EmptyBech32PayloadImpl> - implements _$$AddressError_EmptyBech32PayloadImplCopyWith<$Res> { - __$$AddressError_EmptyBech32PayloadImplCopyWithImpl( - _$AddressError_EmptyBech32PayloadImpl _value, - $Res Function(_$AddressError_EmptyBech32PayloadImpl) _then) +class __$$AddressParseError_WitnessVersionImplCopyWithImpl<$Res> + extends _$AddressParseErrorCopyWithImpl<$Res, + _$AddressParseError_WitnessVersionImpl> + implements _$$AddressParseError_WitnessVersionImplCopyWith<$Res> { + __$$AddressParseError_WitnessVersionImplCopyWithImpl( + _$AddressParseError_WitnessVersionImpl _value, + $Res Function(_$AddressParseError_WitnessVersionImpl) _then) : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? errorMessage = null, + }) { + return _then(_$AddressParseError_WitnessVersionImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } } /// @nodoc -class _$AddressError_EmptyBech32PayloadImpl - extends AddressError_EmptyBech32Payload { - const _$AddressError_EmptyBech32PayloadImpl() : super._(); +class _$AddressParseError_WitnessVersionImpl + extends AddressParseError_WitnessVersion { + const _$AddressParseError_WitnessVersionImpl({required this.errorMessage}) + : super._(); + + @override + final String errorMessage; @override String toString() { - return 'AddressError.emptyBech32Payload()'; + return 'AddressParseError.witnessVersion(errorMessage: $errorMessage)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$AddressError_EmptyBech32PayloadImpl); + other is _$AddressParseError_WitnessVersionImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); } @override - int get hashCode => runtimeType.hashCode; + int get hashCode => Object.hash(runtimeType, errorMessage); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$AddressParseError_WitnessVersionImplCopyWith< + _$AddressParseError_WitnessVersionImpl> + get copyWith => __$$AddressParseError_WitnessVersionImplCopyWithImpl< + _$AddressParseError_WitnessVersionImpl>(this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(String field0) base58, - required TResult Function(String field0) bech32, - required TResult Function() emptyBech32Payload, - required TResult Function(Variant expected, Variant found) - invalidBech32Variant, - required TResult Function(int field0) invalidWitnessVersion, - required TResult Function(String field0) unparsableWitnessVersion, - required TResult Function() malformedWitnessVersion, - required TResult Function(BigInt field0) invalidWitnessProgramLength, - required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, - required TResult Function() uncompressedPubkey, - required TResult Function() excessiveScriptSize, - required TResult Function() unrecognizedScript, - required TResult Function(String field0) unknownAddressType, - required TResult Function( - Network networkRequired, Network networkFound, String address) - networkValidation, + required TResult Function() base58, + required TResult Function() bech32, + required TResult Function(String errorMessage) witnessVersion, + required TResult Function(String errorMessage) witnessProgram, + required TResult Function() unknownHrp, + required TResult Function() legacyAddressTooLong, + required TResult Function() invalidBase58PayloadLength, + required TResult Function() invalidLegacyPrefix, + required TResult Function() networkValidation, + required TResult Function() otherAddressParseErr, }) { - return emptyBech32Payload(); + return witnessVersion(errorMessage); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(String field0)? base58, - TResult? Function(String field0)? bech32, - TResult? Function()? emptyBech32Payload, - TResult? Function(Variant expected, Variant found)? invalidBech32Variant, - TResult? Function(int field0)? invalidWitnessVersion, - TResult? Function(String field0)? unparsableWitnessVersion, - TResult? Function()? malformedWitnessVersion, - TResult? Function(BigInt field0)? invalidWitnessProgramLength, - TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult? Function()? uncompressedPubkey, - TResult? Function()? excessiveScriptSize, - TResult? Function()? unrecognizedScript, - TResult? Function(String field0)? unknownAddressType, - TResult? Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, + TResult? Function()? base58, + TResult? Function()? bech32, + TResult? Function(String errorMessage)? witnessVersion, + TResult? Function(String errorMessage)? witnessProgram, + TResult? Function()? unknownHrp, + TResult? Function()? legacyAddressTooLong, + TResult? Function()? invalidBase58PayloadLength, + TResult? Function()? invalidLegacyPrefix, + TResult? Function()? networkValidation, + TResult? Function()? otherAddressParseErr, }) { - return emptyBech32Payload?.call(); + return witnessVersion?.call(errorMessage); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(String field0)? base58, - TResult Function(String field0)? bech32, - TResult Function()? emptyBech32Payload, - TResult Function(Variant expected, Variant found)? invalidBech32Variant, - TResult Function(int field0)? invalidWitnessVersion, - TResult Function(String field0)? unparsableWitnessVersion, - TResult Function()? malformedWitnessVersion, - TResult Function(BigInt field0)? invalidWitnessProgramLength, - TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult Function()? uncompressedPubkey, - TResult Function()? excessiveScriptSize, - TResult Function()? unrecognizedScript, - TResult Function(String field0)? unknownAddressType, - TResult Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, + TResult Function()? base58, + TResult Function()? bech32, + TResult Function(String errorMessage)? witnessVersion, + TResult Function(String errorMessage)? witnessProgram, + TResult Function()? unknownHrp, + TResult Function()? legacyAddressTooLong, + TResult Function()? invalidBase58PayloadLength, + TResult Function()? invalidLegacyPrefix, + TResult Function()? networkValidation, + TResult Function()? otherAddressParseErr, required TResult orElse(), }) { - if (emptyBech32Payload != null) { - return emptyBech32Payload(); + if (witnessVersion != null) { + return witnessVersion(errorMessage); } return orElse(); } @@ -790,255 +613,210 @@ class _$AddressError_EmptyBech32PayloadImpl @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) + required TResult Function(AddressParseError_Base58 value) base58, + required TResult Function(AddressParseError_Bech32 value) bech32, + required TResult Function(AddressParseError_WitnessVersion value) + witnessVersion, + required TResult Function(AddressParseError_WitnessProgram value) + witnessProgram, + required TResult Function(AddressParseError_UnknownHrp value) unknownHrp, + required TResult Function(AddressParseError_LegacyAddressTooLong value) + legacyAddressTooLong, + required TResult Function( + AddressParseError_InvalidBase58PayloadLength value) + invalidBase58PayloadLength, + required TResult Function(AddressParseError_InvalidLegacyPrefix value) + invalidLegacyPrefix, + required TResult Function(AddressParseError_NetworkValidation value) networkValidation, + required TResult Function(AddressParseError_OtherAddressParseErr value) + otherAddressParseErr, }) { - return emptyBech32Payload(this); + return witnessVersion(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, + TResult? Function(AddressParseError_Base58 value)? base58, + TResult? Function(AddressParseError_Bech32 value)? bech32, + TResult? Function(AddressParseError_WitnessVersion value)? witnessVersion, + TResult? Function(AddressParseError_WitnessProgram value)? witnessProgram, + TResult? Function(AddressParseError_UnknownHrp value)? unknownHrp, + TResult? Function(AddressParseError_LegacyAddressTooLong value)? + legacyAddressTooLong, + TResult? Function(AddressParseError_InvalidBase58PayloadLength value)? + invalidBase58PayloadLength, + TResult? Function(AddressParseError_InvalidLegacyPrefix value)? + invalidLegacyPrefix, + TResult? Function(AddressParseError_NetworkValidation value)? + networkValidation, + TResult? Function(AddressParseError_OtherAddressParseErr value)? + otherAddressParseErr, }) { - return emptyBech32Payload?.call(this); + return witnessVersion?.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, + TResult Function(AddressParseError_Base58 value)? base58, + TResult Function(AddressParseError_Bech32 value)? bech32, + TResult Function(AddressParseError_WitnessVersion value)? witnessVersion, + TResult Function(AddressParseError_WitnessProgram value)? witnessProgram, + TResult Function(AddressParseError_UnknownHrp value)? unknownHrp, + TResult Function(AddressParseError_LegacyAddressTooLong value)? + legacyAddressTooLong, + TResult Function(AddressParseError_InvalidBase58PayloadLength value)? + invalidBase58PayloadLength, + TResult Function(AddressParseError_InvalidLegacyPrefix value)? + invalidLegacyPrefix, + TResult Function(AddressParseError_NetworkValidation value)? + networkValidation, + TResult Function(AddressParseError_OtherAddressParseErr value)? + otherAddressParseErr, required TResult orElse(), }) { - if (emptyBech32Payload != null) { - return emptyBech32Payload(this); + if (witnessVersion != null) { + return witnessVersion(this); } return orElse(); } } -abstract class AddressError_EmptyBech32Payload extends AddressError { - const factory AddressError_EmptyBech32Payload() = - _$AddressError_EmptyBech32PayloadImpl; - const AddressError_EmptyBech32Payload._() : super._(); +abstract class AddressParseError_WitnessVersion extends AddressParseError { + const factory AddressParseError_WitnessVersion( + {required final String errorMessage}) = + _$AddressParseError_WitnessVersionImpl; + const AddressParseError_WitnessVersion._() : super._(); + + String get errorMessage; + @JsonKey(ignore: true) + _$$AddressParseError_WitnessVersionImplCopyWith< + _$AddressParseError_WitnessVersionImpl> + get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$AddressError_InvalidBech32VariantImplCopyWith<$Res> { - factory _$$AddressError_InvalidBech32VariantImplCopyWith( - _$AddressError_InvalidBech32VariantImpl value, - $Res Function(_$AddressError_InvalidBech32VariantImpl) then) = - __$$AddressError_InvalidBech32VariantImplCopyWithImpl<$Res>; +abstract class _$$AddressParseError_WitnessProgramImplCopyWith<$Res> { + factory _$$AddressParseError_WitnessProgramImplCopyWith( + _$AddressParseError_WitnessProgramImpl value, + $Res Function(_$AddressParseError_WitnessProgramImpl) then) = + __$$AddressParseError_WitnessProgramImplCopyWithImpl<$Res>; @useResult - $Res call({Variant expected, Variant found}); + $Res call({String errorMessage}); } /// @nodoc -class __$$AddressError_InvalidBech32VariantImplCopyWithImpl<$Res> - extends _$AddressErrorCopyWithImpl<$Res, - _$AddressError_InvalidBech32VariantImpl> - implements _$$AddressError_InvalidBech32VariantImplCopyWith<$Res> { - __$$AddressError_InvalidBech32VariantImplCopyWithImpl( - _$AddressError_InvalidBech32VariantImpl _value, - $Res Function(_$AddressError_InvalidBech32VariantImpl) _then) +class __$$AddressParseError_WitnessProgramImplCopyWithImpl<$Res> + extends _$AddressParseErrorCopyWithImpl<$Res, + _$AddressParseError_WitnessProgramImpl> + implements _$$AddressParseError_WitnessProgramImplCopyWith<$Res> { + __$$AddressParseError_WitnessProgramImplCopyWithImpl( + _$AddressParseError_WitnessProgramImpl _value, + $Res Function(_$AddressParseError_WitnessProgramImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? expected = null, - Object? found = null, + Object? errorMessage = 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, + return _then(_$AddressParseError_WitnessProgramImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, )); } } /// @nodoc -class _$AddressError_InvalidBech32VariantImpl - extends AddressError_InvalidBech32Variant { - const _$AddressError_InvalidBech32VariantImpl( - {required this.expected, required this.found}) +class _$AddressParseError_WitnessProgramImpl + extends AddressParseError_WitnessProgram { + const _$AddressParseError_WitnessProgramImpl({required this.errorMessage}) : super._(); @override - final Variant expected; - @override - final Variant found; + final String errorMessage; @override String toString() { - return 'AddressError.invalidBech32Variant(expected: $expected, found: $found)'; + return 'AddressParseError.witnessProgram(errorMessage: $errorMessage)'; } @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)); + other is _$AddressParseError_WitnessProgramImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); } @override - int get hashCode => Object.hash(runtimeType, expected, found); + int get hashCode => Object.hash(runtimeType, errorMessage); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$AddressError_InvalidBech32VariantImplCopyWith< - _$AddressError_InvalidBech32VariantImpl> - get copyWith => __$$AddressError_InvalidBech32VariantImplCopyWithImpl< - _$AddressError_InvalidBech32VariantImpl>(this, _$identity); + _$$AddressParseError_WitnessProgramImplCopyWith< + _$AddressParseError_WitnessProgramImpl> + get copyWith => __$$AddressParseError_WitnessProgramImplCopyWithImpl< + _$AddressParseError_WitnessProgramImpl>(this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(String field0) base58, - required TResult Function(String field0) bech32, - required TResult Function() emptyBech32Payload, - required TResult Function(Variant expected, Variant found) - invalidBech32Variant, - required TResult Function(int field0) invalidWitnessVersion, - required TResult Function(String field0) unparsableWitnessVersion, - required TResult Function() malformedWitnessVersion, - required TResult Function(BigInt field0) invalidWitnessProgramLength, - required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, - required TResult Function() uncompressedPubkey, - required TResult Function() excessiveScriptSize, - required TResult Function() unrecognizedScript, - required TResult Function(String field0) unknownAddressType, - required TResult Function( - Network networkRequired, Network networkFound, String address) - networkValidation, + required TResult Function() base58, + required TResult Function() bech32, + required TResult Function(String errorMessage) witnessVersion, + required TResult Function(String errorMessage) witnessProgram, + required TResult Function() unknownHrp, + required TResult Function() legacyAddressTooLong, + required TResult Function() invalidBase58PayloadLength, + required TResult Function() invalidLegacyPrefix, + required TResult Function() networkValidation, + required TResult Function() otherAddressParseErr, }) { - return invalidBech32Variant(expected, found); + return witnessProgram(errorMessage); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(String field0)? base58, - TResult? Function(String field0)? bech32, - TResult? Function()? emptyBech32Payload, - TResult? Function(Variant expected, Variant found)? invalidBech32Variant, - TResult? Function(int field0)? invalidWitnessVersion, - TResult? Function(String field0)? unparsableWitnessVersion, - TResult? Function()? malformedWitnessVersion, - TResult? Function(BigInt field0)? invalidWitnessProgramLength, - TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult? Function()? uncompressedPubkey, - TResult? Function()? excessiveScriptSize, - TResult? Function()? unrecognizedScript, - TResult? Function(String field0)? unknownAddressType, - TResult? Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, + TResult? Function()? base58, + TResult? Function()? bech32, + TResult? Function(String errorMessage)? witnessVersion, + TResult? Function(String errorMessage)? witnessProgram, + TResult? Function()? unknownHrp, + TResult? Function()? legacyAddressTooLong, + TResult? Function()? invalidBase58PayloadLength, + TResult? Function()? invalidLegacyPrefix, + TResult? Function()? networkValidation, + TResult? Function()? otherAddressParseErr, }) { - return invalidBech32Variant?.call(expected, found); + return witnessProgram?.call(errorMessage); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(String field0)? base58, - TResult Function(String field0)? bech32, - TResult Function()? emptyBech32Payload, - TResult Function(Variant expected, Variant found)? invalidBech32Variant, - TResult Function(int field0)? invalidWitnessVersion, - TResult Function(String field0)? unparsableWitnessVersion, - TResult Function()? malformedWitnessVersion, - TResult Function(BigInt field0)? invalidWitnessProgramLength, - TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult Function()? uncompressedPubkey, - TResult Function()? excessiveScriptSize, - TResult Function()? unrecognizedScript, - TResult Function(String field0)? unknownAddressType, - TResult Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, + TResult Function()? base58, + TResult Function()? bech32, + TResult Function(String errorMessage)? witnessVersion, + TResult Function(String errorMessage)? witnessProgram, + TResult Function()? unknownHrp, + TResult Function()? legacyAddressTooLong, + TResult Function()? invalidBase58PayloadLength, + TResult Function()? invalidLegacyPrefix, + TResult Function()? networkValidation, + TResult Function()? otherAddressParseErr, required TResult orElse(), }) { - if (invalidBech32Variant != null) { - return invalidBech32Variant(expected, found); + if (witnessProgram != null) { + return witnessProgram(errorMessage); } return orElse(); } @@ -1046,252 +824,180 @@ class _$AddressError_InvalidBech32VariantImpl @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) + required TResult Function(AddressParseError_Base58 value) base58, + required TResult Function(AddressParseError_Bech32 value) bech32, + required TResult Function(AddressParseError_WitnessVersion value) + witnessVersion, + required TResult Function(AddressParseError_WitnessProgram value) + witnessProgram, + required TResult Function(AddressParseError_UnknownHrp value) unknownHrp, + required TResult Function(AddressParseError_LegacyAddressTooLong value) + legacyAddressTooLong, + required TResult Function( + AddressParseError_InvalidBase58PayloadLength value) + invalidBase58PayloadLength, + required TResult Function(AddressParseError_InvalidLegacyPrefix value) + invalidLegacyPrefix, + required TResult Function(AddressParseError_NetworkValidation value) networkValidation, + required TResult Function(AddressParseError_OtherAddressParseErr value) + otherAddressParseErr, }) { - return invalidBech32Variant(this); + return witnessProgram(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, + TResult? Function(AddressParseError_Base58 value)? base58, + TResult? Function(AddressParseError_Bech32 value)? bech32, + TResult? Function(AddressParseError_WitnessVersion value)? witnessVersion, + TResult? Function(AddressParseError_WitnessProgram value)? witnessProgram, + TResult? Function(AddressParseError_UnknownHrp value)? unknownHrp, + TResult? Function(AddressParseError_LegacyAddressTooLong value)? + legacyAddressTooLong, + TResult? Function(AddressParseError_InvalidBase58PayloadLength value)? + invalidBase58PayloadLength, + TResult? Function(AddressParseError_InvalidLegacyPrefix value)? + invalidLegacyPrefix, + TResult? Function(AddressParseError_NetworkValidation value)? + networkValidation, + TResult? Function(AddressParseError_OtherAddressParseErr value)? + otherAddressParseErr, }) { - return invalidBech32Variant?.call(this); + return witnessProgram?.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; + TResult Function(AddressParseError_Base58 value)? base58, + TResult Function(AddressParseError_Bech32 value)? bech32, + TResult Function(AddressParseError_WitnessVersion value)? witnessVersion, + TResult Function(AddressParseError_WitnessProgram value)? witnessProgram, + TResult Function(AddressParseError_UnknownHrp value)? unknownHrp, + TResult Function(AddressParseError_LegacyAddressTooLong value)? + legacyAddressTooLong, + TResult Function(AddressParseError_InvalidBase58PayloadLength value)? + invalidBase58PayloadLength, + TResult Function(AddressParseError_InvalidLegacyPrefix value)? + invalidLegacyPrefix, + TResult Function(AddressParseError_NetworkValidation value)? + networkValidation, + TResult Function(AddressParseError_OtherAddressParseErr value)? + otherAddressParseErr, + required TResult orElse(), + }) { + if (witnessProgram != null) { + return witnessProgram(this); + } + return orElse(); + } +} + +abstract class AddressParseError_WitnessProgram extends AddressParseError { + const factory AddressParseError_WitnessProgram( + {required final String errorMessage}) = + _$AddressParseError_WitnessProgramImpl; + const AddressParseError_WitnessProgram._() : super._(); + + String get errorMessage; @JsonKey(ignore: true) - _$$AddressError_InvalidBech32VariantImplCopyWith< - _$AddressError_InvalidBech32VariantImpl> + _$$AddressParseError_WitnessProgramImplCopyWith< + _$AddressParseError_WitnessProgramImpl> 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}); +abstract class _$$AddressParseError_UnknownHrpImplCopyWith<$Res> { + factory _$$AddressParseError_UnknownHrpImplCopyWith( + _$AddressParseError_UnknownHrpImpl value, + $Res Function(_$AddressParseError_UnknownHrpImpl) then) = + __$$AddressParseError_UnknownHrpImplCopyWithImpl<$Res>; } /// @nodoc -class __$$AddressError_InvalidWitnessVersionImplCopyWithImpl<$Res> - extends _$AddressErrorCopyWithImpl<$Res, - _$AddressError_InvalidWitnessVersionImpl> - implements _$$AddressError_InvalidWitnessVersionImplCopyWith<$Res> { - __$$AddressError_InvalidWitnessVersionImplCopyWithImpl( - _$AddressError_InvalidWitnessVersionImpl _value, - $Res Function(_$AddressError_InvalidWitnessVersionImpl) _then) +class __$$AddressParseError_UnknownHrpImplCopyWithImpl<$Res> + extends _$AddressParseErrorCopyWithImpl<$Res, + _$AddressParseError_UnknownHrpImpl> + implements _$$AddressParseError_UnknownHrpImplCopyWith<$Res> { + __$$AddressParseError_UnknownHrpImplCopyWithImpl( + _$AddressParseError_UnknownHrpImpl _value, + $Res Function(_$AddressParseError_UnknownHrpImpl) _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; +class _$AddressParseError_UnknownHrpImpl extends AddressParseError_UnknownHrp { + const _$AddressParseError_UnknownHrpImpl() : super._(); @override String toString() { - return 'AddressError.invalidWitnessVersion(field0: $field0)'; + return 'AddressParseError.unknownHrp()'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$AddressError_InvalidWitnessVersionImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$AddressParseError_UnknownHrpImpl); } @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); + int get hashCode => runtimeType.hashCode; @override @optionalTypeArgs TResult when({ - required TResult Function(String field0) base58, - required TResult Function(String field0) bech32, - required TResult Function() emptyBech32Payload, - required TResult Function(Variant expected, Variant found) - invalidBech32Variant, - required TResult Function(int field0) invalidWitnessVersion, - required TResult Function(String field0) unparsableWitnessVersion, - required TResult Function() malformedWitnessVersion, - required TResult Function(BigInt field0) invalidWitnessProgramLength, - required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, - required TResult Function() uncompressedPubkey, - required TResult Function() excessiveScriptSize, - required TResult Function() unrecognizedScript, - required TResult Function(String field0) unknownAddressType, - required TResult Function( - Network networkRequired, Network networkFound, String address) - networkValidation, + required TResult Function() base58, + required TResult Function() bech32, + required TResult Function(String errorMessage) witnessVersion, + required TResult Function(String errorMessage) witnessProgram, + required TResult Function() unknownHrp, + required TResult Function() legacyAddressTooLong, + required TResult Function() invalidBase58PayloadLength, + required TResult Function() invalidLegacyPrefix, + required TResult Function() networkValidation, + required TResult Function() otherAddressParseErr, }) { - return invalidWitnessVersion(field0); + return unknownHrp(); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(String field0)? base58, - TResult? Function(String field0)? bech32, - TResult? Function()? emptyBech32Payload, - TResult? Function(Variant expected, Variant found)? invalidBech32Variant, - TResult? Function(int field0)? invalidWitnessVersion, - TResult? Function(String field0)? unparsableWitnessVersion, - TResult? Function()? malformedWitnessVersion, - TResult? Function(BigInt field0)? invalidWitnessProgramLength, - TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult? Function()? uncompressedPubkey, - TResult? Function()? excessiveScriptSize, - TResult? Function()? unrecognizedScript, - TResult? Function(String field0)? unknownAddressType, - TResult? Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, + TResult? Function()? base58, + TResult? Function()? bech32, + TResult? Function(String errorMessage)? witnessVersion, + TResult? Function(String errorMessage)? witnessProgram, + TResult? Function()? unknownHrp, + TResult? Function()? legacyAddressTooLong, + TResult? Function()? invalidBase58PayloadLength, + TResult? Function()? invalidLegacyPrefix, + TResult? Function()? networkValidation, + TResult? Function()? otherAddressParseErr, }) { - return invalidWitnessVersion?.call(field0); + return unknownHrp?.call(); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(String field0)? base58, - TResult Function(String field0)? bech32, - TResult Function()? emptyBech32Payload, - TResult Function(Variant expected, Variant found)? invalidBech32Variant, - TResult Function(int field0)? invalidWitnessVersion, - TResult Function(String field0)? unparsableWitnessVersion, - TResult Function()? malformedWitnessVersion, - TResult Function(BigInt field0)? invalidWitnessProgramLength, - TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult Function()? uncompressedPubkey, - TResult Function()? excessiveScriptSize, - TResult Function()? unrecognizedScript, - TResult Function(String field0)? unknownAddressType, - TResult Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, + TResult Function()? base58, + TResult Function()? bech32, + TResult Function(String errorMessage)? witnessVersion, + TResult Function(String errorMessage)? witnessProgram, + TResult Function()? unknownHrp, + TResult Function()? legacyAddressTooLong, + TResult Function()? invalidBase58PayloadLength, + TResult Function()? invalidLegacyPrefix, + TResult Function()? networkValidation, + TResult Function()? otherAddressParseErr, required TResult orElse(), }) { - if (invalidWitnessVersion != null) { - return invalidWitnessVersion(field0); + if (unknownHrp != null) { + return unknownHrp(); } return orElse(); } @@ -1299,250 +1005,174 @@ class _$AddressError_InvalidWitnessVersionImpl @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) + required TResult Function(AddressParseError_Base58 value) base58, + required TResult Function(AddressParseError_Bech32 value) bech32, + required TResult Function(AddressParseError_WitnessVersion value) + witnessVersion, + required TResult Function(AddressParseError_WitnessProgram value) + witnessProgram, + required TResult Function(AddressParseError_UnknownHrp value) unknownHrp, + required TResult Function(AddressParseError_LegacyAddressTooLong value) + legacyAddressTooLong, + required TResult Function( + AddressParseError_InvalidBase58PayloadLength value) + invalidBase58PayloadLength, + required TResult Function(AddressParseError_InvalidLegacyPrefix value) + invalidLegacyPrefix, + required TResult Function(AddressParseError_NetworkValidation value) networkValidation, + required TResult Function(AddressParseError_OtherAddressParseErr value) + otherAddressParseErr, }) { - return invalidWitnessVersion(this); + return unknownHrp(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, + TResult? Function(AddressParseError_Base58 value)? base58, + TResult? Function(AddressParseError_Bech32 value)? bech32, + TResult? Function(AddressParseError_WitnessVersion value)? witnessVersion, + TResult? Function(AddressParseError_WitnessProgram value)? witnessProgram, + TResult? Function(AddressParseError_UnknownHrp value)? unknownHrp, + TResult? Function(AddressParseError_LegacyAddressTooLong value)? + legacyAddressTooLong, + TResult? Function(AddressParseError_InvalidBase58PayloadLength value)? + invalidBase58PayloadLength, + TResult? Function(AddressParseError_InvalidLegacyPrefix value)? + invalidLegacyPrefix, + TResult? Function(AddressParseError_NetworkValidation value)? + networkValidation, + TResult? Function(AddressParseError_OtherAddressParseErr value)? + otherAddressParseErr, }) { - return invalidWitnessVersion?.call(this); + return unknownHrp?.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; + TResult Function(AddressParseError_Base58 value)? base58, + TResult Function(AddressParseError_Bech32 value)? bech32, + TResult Function(AddressParseError_WitnessVersion value)? witnessVersion, + TResult Function(AddressParseError_WitnessProgram value)? witnessProgram, + TResult Function(AddressParseError_UnknownHrp value)? unknownHrp, + TResult Function(AddressParseError_LegacyAddressTooLong value)? + legacyAddressTooLong, + TResult Function(AddressParseError_InvalidBase58PayloadLength value)? + invalidBase58PayloadLength, + TResult Function(AddressParseError_InvalidLegacyPrefix value)? + invalidLegacyPrefix, + TResult Function(AddressParseError_NetworkValidation value)? + networkValidation, + TResult Function(AddressParseError_OtherAddressParseErr value)? + otherAddressParseErr, + required TResult orElse(), + }) { + if (unknownHrp != null) { + return unknownHrp(this); + } + return orElse(); + } +} + +abstract class AddressParseError_UnknownHrp extends AddressParseError { + const factory AddressParseError_UnknownHrp() = + _$AddressParseError_UnknownHrpImpl; + const AddressParseError_UnknownHrp._() : super._(); } /// @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}); +abstract class _$$AddressParseError_LegacyAddressTooLongImplCopyWith<$Res> { + factory _$$AddressParseError_LegacyAddressTooLongImplCopyWith( + _$AddressParseError_LegacyAddressTooLongImpl value, + $Res Function(_$AddressParseError_LegacyAddressTooLongImpl) then) = + __$$AddressParseError_LegacyAddressTooLongImplCopyWithImpl<$Res>; } /// @nodoc -class __$$AddressError_UnparsableWitnessVersionImplCopyWithImpl<$Res> - extends _$AddressErrorCopyWithImpl<$Res, - _$AddressError_UnparsableWitnessVersionImpl> - implements _$$AddressError_UnparsableWitnessVersionImplCopyWith<$Res> { - __$$AddressError_UnparsableWitnessVersionImplCopyWithImpl( - _$AddressError_UnparsableWitnessVersionImpl _value, - $Res Function(_$AddressError_UnparsableWitnessVersionImpl) _then) +class __$$AddressParseError_LegacyAddressTooLongImplCopyWithImpl<$Res> + extends _$AddressParseErrorCopyWithImpl<$Res, + _$AddressParseError_LegacyAddressTooLongImpl> + implements _$$AddressParseError_LegacyAddressTooLongImplCopyWith<$Res> { + __$$AddressParseError_LegacyAddressTooLongImplCopyWithImpl( + _$AddressParseError_LegacyAddressTooLongImpl _value, + $Res Function(_$AddressParseError_LegacyAddressTooLongImpl) _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; +class _$AddressParseError_LegacyAddressTooLongImpl + extends AddressParseError_LegacyAddressTooLong { + const _$AddressParseError_LegacyAddressTooLongImpl() : super._(); @override String toString() { - return 'AddressError.unparsableWitnessVersion(field0: $field0)'; + return 'AddressParseError.legacyAddressTooLong()'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$AddressError_UnparsableWitnessVersionImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$AddressParseError_LegacyAddressTooLongImpl); } @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); + int get hashCode => runtimeType.hashCode; @override @optionalTypeArgs TResult when({ - required TResult Function(String field0) base58, - required TResult Function(String field0) bech32, - required TResult Function() emptyBech32Payload, - required TResult Function(Variant expected, Variant found) - invalidBech32Variant, - required TResult Function(int field0) invalidWitnessVersion, - required TResult Function(String field0) unparsableWitnessVersion, - required TResult Function() malformedWitnessVersion, - required TResult Function(BigInt field0) invalidWitnessProgramLength, - required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, - required TResult Function() uncompressedPubkey, - required TResult Function() excessiveScriptSize, - required TResult Function() unrecognizedScript, - required TResult Function(String field0) unknownAddressType, - required TResult Function( - Network networkRequired, Network networkFound, String address) - networkValidation, + required TResult Function() base58, + required TResult Function() bech32, + required TResult Function(String errorMessage) witnessVersion, + required TResult Function(String errorMessage) witnessProgram, + required TResult Function() unknownHrp, + required TResult Function() legacyAddressTooLong, + required TResult Function() invalidBase58PayloadLength, + required TResult Function() invalidLegacyPrefix, + required TResult Function() networkValidation, + required TResult Function() otherAddressParseErr, }) { - return unparsableWitnessVersion(field0); + return legacyAddressTooLong(); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(String field0)? base58, - TResult? Function(String field0)? bech32, - TResult? Function()? emptyBech32Payload, - TResult? Function(Variant expected, Variant found)? invalidBech32Variant, - TResult? Function(int field0)? invalidWitnessVersion, - TResult? Function(String field0)? unparsableWitnessVersion, - TResult? Function()? malformedWitnessVersion, - TResult? Function(BigInt field0)? invalidWitnessProgramLength, - TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult? Function()? uncompressedPubkey, - TResult? Function()? excessiveScriptSize, - TResult? Function()? unrecognizedScript, - TResult? Function(String field0)? unknownAddressType, - TResult? Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, + TResult? Function()? base58, + TResult? Function()? bech32, + TResult? Function(String errorMessage)? witnessVersion, + TResult? Function(String errorMessage)? witnessProgram, + TResult? Function()? unknownHrp, + TResult? Function()? legacyAddressTooLong, + TResult? Function()? invalidBase58PayloadLength, + TResult? Function()? invalidLegacyPrefix, + TResult? Function()? networkValidation, + TResult? Function()? otherAddressParseErr, }) { - return unparsableWitnessVersion?.call(field0); + return legacyAddressTooLong?.call(); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(String field0)? base58, - TResult Function(String field0)? bech32, - TResult Function()? emptyBech32Payload, - TResult Function(Variant expected, Variant found)? invalidBech32Variant, - TResult Function(int field0)? invalidWitnessVersion, - TResult Function(String field0)? unparsableWitnessVersion, - TResult Function()? malformedWitnessVersion, - TResult Function(BigInt field0)? invalidWitnessProgramLength, - TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult Function()? uncompressedPubkey, - TResult Function()? excessiveScriptSize, - TResult Function()? unrecognizedScript, - TResult Function(String field0)? unknownAddressType, - TResult Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, + TResult Function()? base58, + TResult Function()? bech32, + TResult Function(String errorMessage)? witnessVersion, + TResult Function(String errorMessage)? witnessProgram, + TResult Function()? unknownHrp, + TResult Function()? legacyAddressTooLong, + TResult Function()? invalidBase58PayloadLength, + TResult Function()? invalidLegacyPrefix, + TResult Function()? networkValidation, + TResult Function()? otherAddressParseErr, required TResult orElse(), }) { - if (unparsableWitnessVersion != null) { - return unparsableWitnessVersion(field0); + if (legacyAddressTooLong != null) { + return legacyAddressTooLong(); } return orElse(); } @@ -1550,148 +1180,122 @@ class _$AddressError_UnparsableWitnessVersionImpl @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) + required TResult Function(AddressParseError_Base58 value) base58, + required TResult Function(AddressParseError_Bech32 value) bech32, + required TResult Function(AddressParseError_WitnessVersion value) + witnessVersion, + required TResult Function(AddressParseError_WitnessProgram value) + witnessProgram, + required TResult Function(AddressParseError_UnknownHrp value) unknownHrp, + required TResult Function(AddressParseError_LegacyAddressTooLong value) + legacyAddressTooLong, + required TResult Function( + AddressParseError_InvalidBase58PayloadLength value) + invalidBase58PayloadLength, + required TResult Function(AddressParseError_InvalidLegacyPrefix value) + invalidLegacyPrefix, + required TResult Function(AddressParseError_NetworkValidation value) networkValidation, + required TResult Function(AddressParseError_OtherAddressParseErr value) + otherAddressParseErr, }) { - return unparsableWitnessVersion(this); + return legacyAddressTooLong(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, + TResult? Function(AddressParseError_Base58 value)? base58, + TResult? Function(AddressParseError_Bech32 value)? bech32, + TResult? Function(AddressParseError_WitnessVersion value)? witnessVersion, + TResult? Function(AddressParseError_WitnessProgram value)? witnessProgram, + TResult? Function(AddressParseError_UnknownHrp value)? unknownHrp, + TResult? Function(AddressParseError_LegacyAddressTooLong value)? + legacyAddressTooLong, + TResult? Function(AddressParseError_InvalidBase58PayloadLength value)? + invalidBase58PayloadLength, + TResult? Function(AddressParseError_InvalidLegacyPrefix value)? + invalidLegacyPrefix, + TResult? Function(AddressParseError_NetworkValidation value)? + networkValidation, + TResult? Function(AddressParseError_OtherAddressParseErr value)? + otherAddressParseErr, }) { - return unparsableWitnessVersion?.call(this); + return legacyAddressTooLong?.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; + TResult Function(AddressParseError_Base58 value)? base58, + TResult Function(AddressParseError_Bech32 value)? bech32, + TResult Function(AddressParseError_WitnessVersion value)? witnessVersion, + TResult Function(AddressParseError_WitnessProgram value)? witnessProgram, + TResult Function(AddressParseError_UnknownHrp value)? unknownHrp, + TResult Function(AddressParseError_LegacyAddressTooLong value)? + legacyAddressTooLong, + TResult Function(AddressParseError_InvalidBase58PayloadLength value)? + invalidBase58PayloadLength, + TResult Function(AddressParseError_InvalidLegacyPrefix value)? + invalidLegacyPrefix, + TResult Function(AddressParseError_NetworkValidation value)? + networkValidation, + TResult Function(AddressParseError_OtherAddressParseErr value)? + otherAddressParseErr, + required TResult orElse(), + }) { + if (legacyAddressTooLong != null) { + return legacyAddressTooLong(this); + } + return orElse(); + } +} + +abstract class AddressParseError_LegacyAddressTooLong + extends AddressParseError { + const factory AddressParseError_LegacyAddressTooLong() = + _$AddressParseError_LegacyAddressTooLongImpl; + const AddressParseError_LegacyAddressTooLong._() : super._(); } /// @nodoc -abstract class _$$AddressError_MalformedWitnessVersionImplCopyWith<$Res> { - factory _$$AddressError_MalformedWitnessVersionImplCopyWith( - _$AddressError_MalformedWitnessVersionImpl value, - $Res Function(_$AddressError_MalformedWitnessVersionImpl) then) = - __$$AddressError_MalformedWitnessVersionImplCopyWithImpl<$Res>; +abstract class _$$AddressParseError_InvalidBase58PayloadLengthImplCopyWith< + $Res> { + factory _$$AddressParseError_InvalidBase58PayloadLengthImplCopyWith( + _$AddressParseError_InvalidBase58PayloadLengthImpl value, + $Res Function(_$AddressParseError_InvalidBase58PayloadLengthImpl) + then) = + __$$AddressParseError_InvalidBase58PayloadLengthImplCopyWithImpl<$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) +class __$$AddressParseError_InvalidBase58PayloadLengthImplCopyWithImpl<$Res> + extends _$AddressParseErrorCopyWithImpl<$Res, + _$AddressParseError_InvalidBase58PayloadLengthImpl> + implements + _$$AddressParseError_InvalidBase58PayloadLengthImplCopyWith<$Res> { + __$$AddressParseError_InvalidBase58PayloadLengthImplCopyWithImpl( + _$AddressParseError_InvalidBase58PayloadLengthImpl _value, + $Res Function(_$AddressParseError_InvalidBase58PayloadLengthImpl) _then) : super(_value, _then); } /// @nodoc -class _$AddressError_MalformedWitnessVersionImpl - extends AddressError_MalformedWitnessVersion { - const _$AddressError_MalformedWitnessVersionImpl() : super._(); +class _$AddressParseError_InvalidBase58PayloadLengthImpl + extends AddressParseError_InvalidBase58PayloadLength { + const _$AddressParseError_InvalidBase58PayloadLengthImpl() : super._(); @override String toString() { - return 'AddressError.malformedWitnessVersion()'; + return 'AddressParseError.invalidBase58PayloadLength()'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$AddressError_MalformedWitnessVersionImpl); + other is _$AddressParseError_InvalidBase58PayloadLengthImpl); } @override @@ -1700,73 +1304,54 @@ class _$AddressError_MalformedWitnessVersionImpl @override @optionalTypeArgs TResult when({ - required TResult Function(String field0) base58, - required TResult Function(String field0) bech32, - required TResult Function() emptyBech32Payload, - required TResult Function(Variant expected, Variant found) - invalidBech32Variant, - required TResult Function(int field0) invalidWitnessVersion, - required TResult Function(String field0) unparsableWitnessVersion, - required TResult Function() malformedWitnessVersion, - required TResult Function(BigInt field0) invalidWitnessProgramLength, - required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, - required TResult Function() uncompressedPubkey, - required TResult Function() excessiveScriptSize, - required TResult Function() unrecognizedScript, - required TResult Function(String field0) unknownAddressType, - required TResult Function( - Network networkRequired, Network networkFound, String address) - networkValidation, + required TResult Function() base58, + required TResult Function() bech32, + required TResult Function(String errorMessage) witnessVersion, + required TResult Function(String errorMessage) witnessProgram, + required TResult Function() unknownHrp, + required TResult Function() legacyAddressTooLong, + required TResult Function() invalidBase58PayloadLength, + required TResult Function() invalidLegacyPrefix, + required TResult Function() networkValidation, + required TResult Function() otherAddressParseErr, }) { - return malformedWitnessVersion(); + return invalidBase58PayloadLength(); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(String field0)? base58, - TResult? Function(String field0)? bech32, - TResult? Function()? emptyBech32Payload, - TResult? Function(Variant expected, Variant found)? invalidBech32Variant, - TResult? Function(int field0)? invalidWitnessVersion, - TResult? Function(String field0)? unparsableWitnessVersion, - TResult? Function()? malformedWitnessVersion, - TResult? Function(BigInt field0)? invalidWitnessProgramLength, - TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult? Function()? uncompressedPubkey, - TResult? Function()? excessiveScriptSize, - TResult? Function()? unrecognizedScript, - TResult? Function(String field0)? unknownAddressType, - TResult? Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, + TResult? Function()? base58, + TResult? Function()? bech32, + TResult? Function(String errorMessage)? witnessVersion, + TResult? Function(String errorMessage)? witnessProgram, + TResult? Function()? unknownHrp, + TResult? Function()? legacyAddressTooLong, + TResult? Function()? invalidBase58PayloadLength, + TResult? Function()? invalidLegacyPrefix, + TResult? Function()? networkValidation, + TResult? Function()? otherAddressParseErr, }) { - return malformedWitnessVersion?.call(); + return invalidBase58PayloadLength?.call(); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(String field0)? base58, - TResult Function(String field0)? bech32, - TResult Function()? emptyBech32Payload, - TResult Function(Variant expected, Variant found)? invalidBech32Variant, - TResult Function(int field0)? invalidWitnessVersion, - TResult Function(String field0)? unparsableWitnessVersion, - TResult Function()? malformedWitnessVersion, - TResult Function(BigInt field0)? invalidWitnessProgramLength, - TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult Function()? uncompressedPubkey, - TResult Function()? excessiveScriptSize, - TResult Function()? unrecognizedScript, - TResult Function(String field0)? unknownAddressType, - TResult Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, + TResult Function()? base58, + TResult Function()? bech32, + TResult Function(String errorMessage)? witnessVersion, + TResult Function(String errorMessage)? witnessProgram, + TResult Function()? unknownHrp, + TResult Function()? legacyAddressTooLong, + TResult Function()? invalidBase58PayloadLength, + TResult Function()? invalidLegacyPrefix, + TResult Function()? networkValidation, + TResult Function()? otherAddressParseErr, required TResult orElse(), }) { - if (malformedWitnessVersion != null) { - return malformedWitnessVersion(); + if (invalidBase58PayloadLength != null) { + return invalidBase58PayloadLength(); } return orElse(); } @@ -1774,245 +1359,175 @@ class _$AddressError_MalformedWitnessVersionImpl @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) + required TResult Function(AddressParseError_Base58 value) base58, + required TResult Function(AddressParseError_Bech32 value) bech32, + required TResult Function(AddressParseError_WitnessVersion value) + witnessVersion, + required TResult Function(AddressParseError_WitnessProgram value) + witnessProgram, + required TResult Function(AddressParseError_UnknownHrp value) unknownHrp, + required TResult Function(AddressParseError_LegacyAddressTooLong value) + legacyAddressTooLong, + required TResult Function( + AddressParseError_InvalidBase58PayloadLength value) + invalidBase58PayloadLength, + required TResult Function(AddressParseError_InvalidLegacyPrefix value) + invalidLegacyPrefix, + required TResult Function(AddressParseError_NetworkValidation value) networkValidation, + required TResult Function(AddressParseError_OtherAddressParseErr value) + otherAddressParseErr, }) { - return malformedWitnessVersion(this); + return invalidBase58PayloadLength(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, + TResult? Function(AddressParseError_Base58 value)? base58, + TResult? Function(AddressParseError_Bech32 value)? bech32, + TResult? Function(AddressParseError_WitnessVersion value)? witnessVersion, + TResult? Function(AddressParseError_WitnessProgram value)? witnessProgram, + TResult? Function(AddressParseError_UnknownHrp value)? unknownHrp, + TResult? Function(AddressParseError_LegacyAddressTooLong value)? + legacyAddressTooLong, + TResult? Function(AddressParseError_InvalidBase58PayloadLength value)? + invalidBase58PayloadLength, + TResult? Function(AddressParseError_InvalidLegacyPrefix value)? + invalidLegacyPrefix, + TResult? Function(AddressParseError_NetworkValidation value)? + networkValidation, + TResult? Function(AddressParseError_OtherAddressParseErr value)? + otherAddressParseErr, }) { - return malformedWitnessVersion?.call(this); + return invalidBase58PayloadLength?.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, + TResult Function(AddressParseError_Base58 value)? base58, + TResult Function(AddressParseError_Bech32 value)? bech32, + TResult Function(AddressParseError_WitnessVersion value)? witnessVersion, + TResult Function(AddressParseError_WitnessProgram value)? witnessProgram, + TResult Function(AddressParseError_UnknownHrp value)? unknownHrp, + TResult Function(AddressParseError_LegacyAddressTooLong value)? + legacyAddressTooLong, + TResult Function(AddressParseError_InvalidBase58PayloadLength value)? + invalidBase58PayloadLength, + TResult Function(AddressParseError_InvalidLegacyPrefix value)? + invalidLegacyPrefix, + TResult Function(AddressParseError_NetworkValidation value)? + networkValidation, + TResult Function(AddressParseError_OtherAddressParseErr value)? + otherAddressParseErr, required TResult orElse(), }) { - if (malformedWitnessVersion != null) { - return malformedWitnessVersion(this); + if (invalidBase58PayloadLength != null) { + return invalidBase58PayloadLength(this); } return orElse(); } } -abstract class AddressError_MalformedWitnessVersion extends AddressError { - const factory AddressError_MalformedWitnessVersion() = - _$AddressError_MalformedWitnessVersionImpl; - const AddressError_MalformedWitnessVersion._() : super._(); +abstract class AddressParseError_InvalidBase58PayloadLength + extends AddressParseError { + const factory AddressParseError_InvalidBase58PayloadLength() = + _$AddressParseError_InvalidBase58PayloadLengthImpl; + const AddressParseError_InvalidBase58PayloadLength._() : super._(); } /// @nodoc -abstract class _$$AddressError_InvalidWitnessProgramLengthImplCopyWith<$Res> { - factory _$$AddressError_InvalidWitnessProgramLengthImplCopyWith( - _$AddressError_InvalidWitnessProgramLengthImpl value, - $Res Function(_$AddressError_InvalidWitnessProgramLengthImpl) then) = - __$$AddressError_InvalidWitnessProgramLengthImplCopyWithImpl<$Res>; - @useResult - $Res call({BigInt field0}); +abstract class _$$AddressParseError_InvalidLegacyPrefixImplCopyWith<$Res> { + factory _$$AddressParseError_InvalidLegacyPrefixImplCopyWith( + _$AddressParseError_InvalidLegacyPrefixImpl value, + $Res Function(_$AddressParseError_InvalidLegacyPrefixImpl) then) = + __$$AddressParseError_InvalidLegacyPrefixImplCopyWithImpl<$Res>; } /// @nodoc -class __$$AddressError_InvalidWitnessProgramLengthImplCopyWithImpl<$Res> - extends _$AddressErrorCopyWithImpl<$Res, - _$AddressError_InvalidWitnessProgramLengthImpl> - implements _$$AddressError_InvalidWitnessProgramLengthImplCopyWith<$Res> { - __$$AddressError_InvalidWitnessProgramLengthImplCopyWithImpl( - _$AddressError_InvalidWitnessProgramLengthImpl _value, - $Res Function(_$AddressError_InvalidWitnessProgramLengthImpl) _then) +class __$$AddressParseError_InvalidLegacyPrefixImplCopyWithImpl<$Res> + extends _$AddressParseErrorCopyWithImpl<$Res, + _$AddressParseError_InvalidLegacyPrefixImpl> + implements _$$AddressParseError_InvalidLegacyPrefixImplCopyWith<$Res> { + __$$AddressParseError_InvalidLegacyPrefixImplCopyWithImpl( + _$AddressParseError_InvalidLegacyPrefixImpl _value, + $Res Function(_$AddressParseError_InvalidLegacyPrefixImpl) _then) : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$AddressError_InvalidWitnessProgramLengthImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as BigInt, - )); - } } /// @nodoc -class _$AddressError_InvalidWitnessProgramLengthImpl - extends AddressError_InvalidWitnessProgramLength { - const _$AddressError_InvalidWitnessProgramLengthImpl(this.field0) : super._(); - - @override - final BigInt field0; +class _$AddressParseError_InvalidLegacyPrefixImpl + extends AddressParseError_InvalidLegacyPrefix { + const _$AddressParseError_InvalidLegacyPrefixImpl() : super._(); @override String toString() { - return 'AddressError.invalidWitnessProgramLength(field0: $field0)'; + return 'AddressParseError.invalidLegacyPrefix()'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$AddressError_InvalidWitnessProgramLengthImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$AddressParseError_InvalidLegacyPrefixImpl); } @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); + int get hashCode => runtimeType.hashCode; @override @optionalTypeArgs TResult when({ - required TResult Function(String field0) base58, - required TResult Function(String field0) bech32, - required TResult Function() emptyBech32Payload, - required TResult Function(Variant expected, Variant found) - invalidBech32Variant, - required TResult Function(int field0) invalidWitnessVersion, - required TResult Function(String field0) unparsableWitnessVersion, - required TResult Function() malformedWitnessVersion, - required TResult Function(BigInt field0) invalidWitnessProgramLength, - required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, - required TResult Function() uncompressedPubkey, - required TResult Function() excessiveScriptSize, - required TResult Function() unrecognizedScript, - required TResult Function(String field0) unknownAddressType, - required TResult Function( - Network networkRequired, Network networkFound, String address) - networkValidation, + required TResult Function() base58, + required TResult Function() bech32, + required TResult Function(String errorMessage) witnessVersion, + required TResult Function(String errorMessage) witnessProgram, + required TResult Function() unknownHrp, + required TResult Function() legacyAddressTooLong, + required TResult Function() invalidBase58PayloadLength, + required TResult Function() invalidLegacyPrefix, + required TResult Function() networkValidation, + required TResult Function() otherAddressParseErr, }) { - return invalidWitnessProgramLength(field0); + return invalidLegacyPrefix(); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(String field0)? base58, - TResult? Function(String field0)? bech32, - TResult? Function()? emptyBech32Payload, - TResult? Function(Variant expected, Variant found)? invalidBech32Variant, - TResult? Function(int field0)? invalidWitnessVersion, - TResult? Function(String field0)? unparsableWitnessVersion, - TResult? Function()? malformedWitnessVersion, - TResult? Function(BigInt field0)? invalidWitnessProgramLength, - TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult? Function()? uncompressedPubkey, - TResult? Function()? excessiveScriptSize, - TResult? Function()? unrecognizedScript, - TResult? Function(String field0)? unknownAddressType, - TResult? Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, + TResult? Function()? base58, + TResult? Function()? bech32, + TResult? Function(String errorMessage)? witnessVersion, + TResult? Function(String errorMessage)? witnessProgram, + TResult? Function()? unknownHrp, + TResult? Function()? legacyAddressTooLong, + TResult? Function()? invalidBase58PayloadLength, + TResult? Function()? invalidLegacyPrefix, + TResult? Function()? networkValidation, + TResult? Function()? otherAddressParseErr, }) { - return invalidWitnessProgramLength?.call(field0); + return invalidLegacyPrefix?.call(); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(String field0)? base58, - TResult Function(String field0)? bech32, - TResult Function()? emptyBech32Payload, - TResult Function(Variant expected, Variant found)? invalidBech32Variant, - TResult Function(int field0)? invalidWitnessVersion, - TResult Function(String field0)? unparsableWitnessVersion, - TResult Function()? malformedWitnessVersion, - TResult Function(BigInt field0)? invalidWitnessProgramLength, - TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult Function()? uncompressedPubkey, - TResult Function()? excessiveScriptSize, - TResult Function()? unrecognizedScript, - TResult Function(String field0)? unknownAddressType, - TResult Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, + TResult Function()? base58, + TResult Function()? bech32, + TResult Function(String errorMessage)? witnessVersion, + TResult Function(String errorMessage)? witnessProgram, + TResult Function()? unknownHrp, + TResult Function()? legacyAddressTooLong, + TResult Function()? invalidBase58PayloadLength, + TResult Function()? invalidLegacyPrefix, + TResult Function()? networkValidation, + TResult Function()? otherAddressParseErr, required TResult orElse(), }) { - if (invalidWitnessProgramLength != null) { - return invalidWitnessProgramLength(field0); + if (invalidLegacyPrefix != null) { + return invalidLegacyPrefix(); } return orElse(); } @@ -2020,253 +1535,174 @@ class _$AddressError_InvalidWitnessProgramLengthImpl @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) + required TResult Function(AddressParseError_Base58 value) base58, + required TResult Function(AddressParseError_Bech32 value) bech32, + required TResult Function(AddressParseError_WitnessVersion value) + witnessVersion, + required TResult Function(AddressParseError_WitnessProgram value) + witnessProgram, + required TResult Function(AddressParseError_UnknownHrp value) unknownHrp, + required TResult Function(AddressParseError_LegacyAddressTooLong value) + legacyAddressTooLong, + required TResult Function( + AddressParseError_InvalidBase58PayloadLength value) + invalidBase58PayloadLength, + required TResult Function(AddressParseError_InvalidLegacyPrefix value) + invalidLegacyPrefix, + required TResult Function(AddressParseError_NetworkValidation value) networkValidation, + required TResult Function(AddressParseError_OtherAddressParseErr value) + otherAddressParseErr, }) { - return invalidWitnessProgramLength(this); + return invalidLegacyPrefix(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, + TResult? Function(AddressParseError_Base58 value)? base58, + TResult? Function(AddressParseError_Bech32 value)? bech32, + TResult? Function(AddressParseError_WitnessVersion value)? witnessVersion, + TResult? Function(AddressParseError_WitnessProgram value)? witnessProgram, + TResult? Function(AddressParseError_UnknownHrp value)? unknownHrp, + TResult? Function(AddressParseError_LegacyAddressTooLong value)? + legacyAddressTooLong, + TResult? Function(AddressParseError_InvalidBase58PayloadLength value)? + invalidBase58PayloadLength, + TResult? Function(AddressParseError_InvalidLegacyPrefix value)? + invalidLegacyPrefix, + TResult? Function(AddressParseError_NetworkValidation value)? + networkValidation, + TResult? Function(AddressParseError_OtherAddressParseErr value)? + otherAddressParseErr, }) { - return invalidWitnessProgramLength?.call(this); + return invalidLegacyPrefix?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(AddressError_Base58 value)? base58, - TResult Function(AddressError_Bech32 value)? bech32, - TResult Function(AddressError_EmptyBech32Payload value)? emptyBech32Payload, - TResult Function(AddressError_InvalidBech32Variant value)? - invalidBech32Variant, - TResult Function(AddressError_InvalidWitnessVersion value)? - invalidWitnessVersion, - TResult Function(AddressError_UnparsableWitnessVersion value)? - unparsableWitnessVersion, - TResult Function(AddressError_MalformedWitnessVersion value)? - malformedWitnessVersion, - TResult Function(AddressError_InvalidWitnessProgramLength value)? - invalidWitnessProgramLength, - TResult Function(AddressError_InvalidSegwitV0ProgramLength value)? - invalidSegwitV0ProgramLength, - TResult Function(AddressError_UncompressedPubkey value)? uncompressedPubkey, - TResult Function(AddressError_ExcessiveScriptSize value)? - excessiveScriptSize, - TResult Function(AddressError_UnrecognizedScript value)? unrecognizedScript, - TResult Function(AddressError_UnknownAddressType value)? unknownAddressType, - TResult Function(AddressError_NetworkValidation value)? networkValidation, - required TResult orElse(), - }) { - if (invalidWitnessProgramLength != null) { - return invalidWitnessProgramLength(this); - } - return orElse(); - } -} - -abstract class AddressError_InvalidWitnessProgramLength extends AddressError { - const factory AddressError_InvalidWitnessProgramLength(final BigInt field0) = - _$AddressError_InvalidWitnessProgramLengthImpl; - const AddressError_InvalidWitnessProgramLength._() : super._(); - - BigInt get field0; - @JsonKey(ignore: true) - _$$AddressError_InvalidWitnessProgramLengthImplCopyWith< - _$AddressError_InvalidWitnessProgramLengthImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$AddressError_InvalidSegwitV0ProgramLengthImplCopyWith<$Res> { - factory _$$AddressError_InvalidSegwitV0ProgramLengthImplCopyWith( - _$AddressError_InvalidSegwitV0ProgramLengthImpl value, - $Res Function(_$AddressError_InvalidSegwitV0ProgramLengthImpl) then) = - __$$AddressError_InvalidSegwitV0ProgramLengthImplCopyWithImpl<$Res>; - @useResult - $Res call({BigInt field0}); + TResult Function(AddressParseError_Base58 value)? base58, + TResult Function(AddressParseError_Bech32 value)? bech32, + TResult Function(AddressParseError_WitnessVersion value)? witnessVersion, + TResult Function(AddressParseError_WitnessProgram value)? witnessProgram, + TResult Function(AddressParseError_UnknownHrp value)? unknownHrp, + TResult Function(AddressParseError_LegacyAddressTooLong value)? + legacyAddressTooLong, + TResult Function(AddressParseError_InvalidBase58PayloadLength value)? + invalidBase58PayloadLength, + TResult Function(AddressParseError_InvalidLegacyPrefix value)? + invalidLegacyPrefix, + TResult Function(AddressParseError_NetworkValidation value)? + networkValidation, + TResult Function(AddressParseError_OtherAddressParseErr value)? + otherAddressParseErr, + required TResult orElse(), + }) { + if (invalidLegacyPrefix != null) { + return invalidLegacyPrefix(this); + } + return orElse(); + } } -/// @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); +abstract class AddressParseError_InvalidLegacyPrefix extends AddressParseError { + const factory AddressParseError_InvalidLegacyPrefix() = + _$AddressParseError_InvalidLegacyPrefixImpl; + const AddressParseError_InvalidLegacyPrefix._() : super._(); +} - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$AddressError_InvalidSegwitV0ProgramLengthImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as BigInt, - )); - } +/// @nodoc +abstract class _$$AddressParseError_NetworkValidationImplCopyWith<$Res> { + factory _$$AddressParseError_NetworkValidationImplCopyWith( + _$AddressParseError_NetworkValidationImpl value, + $Res Function(_$AddressParseError_NetworkValidationImpl) then) = + __$$AddressParseError_NetworkValidationImplCopyWithImpl<$Res>; } /// @nodoc +class __$$AddressParseError_NetworkValidationImplCopyWithImpl<$Res> + extends _$AddressParseErrorCopyWithImpl<$Res, + _$AddressParseError_NetworkValidationImpl> + implements _$$AddressParseError_NetworkValidationImplCopyWith<$Res> { + __$$AddressParseError_NetworkValidationImplCopyWithImpl( + _$AddressParseError_NetworkValidationImpl _value, + $Res Function(_$AddressParseError_NetworkValidationImpl) _then) + : super(_value, _then); +} -class _$AddressError_InvalidSegwitV0ProgramLengthImpl - extends AddressError_InvalidSegwitV0ProgramLength { - const _$AddressError_InvalidSegwitV0ProgramLengthImpl(this.field0) - : super._(); +/// @nodoc - @override - final BigInt field0; +class _$AddressParseError_NetworkValidationImpl + extends AddressParseError_NetworkValidation { + const _$AddressParseError_NetworkValidationImpl() : super._(); @override String toString() { - return 'AddressError.invalidSegwitV0ProgramLength(field0: $field0)'; + return 'AddressParseError.networkValidation()'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$AddressError_InvalidSegwitV0ProgramLengthImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$AddressParseError_NetworkValidationImpl); } @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); + int get hashCode => runtimeType.hashCode; @override @optionalTypeArgs TResult when({ - required TResult Function(String field0) base58, - required TResult Function(String field0) bech32, - required TResult Function() emptyBech32Payload, - required TResult Function(Variant expected, Variant found) - invalidBech32Variant, - required TResult Function(int field0) invalidWitnessVersion, - required TResult Function(String field0) unparsableWitnessVersion, - required TResult Function() malformedWitnessVersion, - required TResult Function(BigInt field0) invalidWitnessProgramLength, - required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, - required TResult Function() uncompressedPubkey, - required TResult Function() excessiveScriptSize, - required TResult Function() unrecognizedScript, - required TResult Function(String field0) unknownAddressType, - required TResult Function( - Network networkRequired, Network networkFound, String address) - networkValidation, + required TResult Function() base58, + required TResult Function() bech32, + required TResult Function(String errorMessage) witnessVersion, + required TResult Function(String errorMessage) witnessProgram, + required TResult Function() unknownHrp, + required TResult Function() legacyAddressTooLong, + required TResult Function() invalidBase58PayloadLength, + required TResult Function() invalidLegacyPrefix, + required TResult Function() networkValidation, + required TResult Function() otherAddressParseErr, }) { - return invalidSegwitV0ProgramLength(field0); + return networkValidation(); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(String field0)? base58, - TResult? Function(String field0)? bech32, - TResult? Function()? emptyBech32Payload, - TResult? Function(Variant expected, Variant found)? invalidBech32Variant, - TResult? Function(int field0)? invalidWitnessVersion, - TResult? Function(String field0)? unparsableWitnessVersion, - TResult? Function()? malformedWitnessVersion, - TResult? Function(BigInt field0)? invalidWitnessProgramLength, - TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult? Function()? uncompressedPubkey, - TResult? Function()? excessiveScriptSize, - TResult? Function()? unrecognizedScript, - TResult? Function(String field0)? unknownAddressType, - TResult? Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, + TResult? Function()? base58, + TResult? Function()? bech32, + TResult? Function(String errorMessage)? witnessVersion, + TResult? Function(String errorMessage)? witnessProgram, + TResult? Function()? unknownHrp, + TResult? Function()? legacyAddressTooLong, + TResult? Function()? invalidBase58PayloadLength, + TResult? Function()? invalidLegacyPrefix, + TResult? Function()? networkValidation, + TResult? Function()? otherAddressParseErr, }) { - return invalidSegwitV0ProgramLength?.call(field0); + return networkValidation?.call(); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(String field0)? base58, - TResult Function(String field0)? bech32, - TResult Function()? emptyBech32Payload, - TResult Function(Variant expected, Variant found)? invalidBech32Variant, - TResult Function(int field0)? invalidWitnessVersion, - TResult Function(String field0)? unparsableWitnessVersion, - TResult Function()? malformedWitnessVersion, - TResult Function(BigInt field0)? invalidWitnessProgramLength, - TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult Function()? uncompressedPubkey, - TResult Function()? excessiveScriptSize, - TResult Function()? unrecognizedScript, - TResult Function(String field0)? unknownAddressType, - TResult Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, + TResult Function()? base58, + TResult Function()? bech32, + TResult Function(String errorMessage)? witnessVersion, + TResult Function(String errorMessage)? witnessProgram, + TResult Function()? unknownHrp, + TResult Function()? legacyAddressTooLong, + TResult Function()? invalidBase58PayloadLength, + TResult Function()? invalidLegacyPrefix, + TResult Function()? networkValidation, + TResult Function()? otherAddressParseErr, required TResult orElse(), }) { - if (invalidSegwitV0ProgramLength != null) { - return invalidSegwitV0ProgramLength(field0); + if (networkValidation != null) { + return networkValidation(); } return orElse(); } @@ -2274,148 +1710,118 @@ class _$AddressError_InvalidSegwitV0ProgramLengthImpl @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) + required TResult Function(AddressParseError_Base58 value) base58, + required TResult Function(AddressParseError_Bech32 value) bech32, + required TResult Function(AddressParseError_WitnessVersion value) + witnessVersion, + required TResult Function(AddressParseError_WitnessProgram value) + witnessProgram, + required TResult Function(AddressParseError_UnknownHrp value) unknownHrp, + required TResult Function(AddressParseError_LegacyAddressTooLong value) + legacyAddressTooLong, + required TResult Function( + AddressParseError_InvalidBase58PayloadLength value) + invalidBase58PayloadLength, + required TResult Function(AddressParseError_InvalidLegacyPrefix value) + invalidLegacyPrefix, + required TResult Function(AddressParseError_NetworkValidation value) networkValidation, + required TResult Function(AddressParseError_OtherAddressParseErr value) + otherAddressParseErr, }) { - return invalidSegwitV0ProgramLength(this); + 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, + TResult? Function(AddressParseError_Base58 value)? base58, + TResult? Function(AddressParseError_Bech32 value)? bech32, + TResult? Function(AddressParseError_WitnessVersion value)? witnessVersion, + TResult? Function(AddressParseError_WitnessProgram value)? witnessProgram, + TResult? Function(AddressParseError_UnknownHrp value)? unknownHrp, + TResult? Function(AddressParseError_LegacyAddressTooLong value)? + legacyAddressTooLong, + TResult? Function(AddressParseError_InvalidBase58PayloadLength value)? + invalidBase58PayloadLength, + TResult? Function(AddressParseError_InvalidLegacyPrefix value)? + invalidLegacyPrefix, + TResult? Function(AddressParseError_NetworkValidation value)? + networkValidation, + TResult? Function(AddressParseError_OtherAddressParseErr value)? + otherAddressParseErr, }) { - return invalidSegwitV0ProgramLength?.call(this); + 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 (invalidSegwitV0ProgramLength != null) { - return invalidSegwitV0ProgramLength(this); - } - return orElse(); - } -} - -abstract class AddressError_InvalidSegwitV0ProgramLength extends AddressError { - const factory AddressError_InvalidSegwitV0ProgramLength(final BigInt field0) = - _$AddressError_InvalidSegwitV0ProgramLengthImpl; - const AddressError_InvalidSegwitV0ProgramLength._() : super._(); - - BigInt get field0; - @JsonKey(ignore: true) - _$$AddressError_InvalidSegwitV0ProgramLengthImplCopyWith< - _$AddressError_InvalidSegwitV0ProgramLengthImpl> - get copyWith => throw _privateConstructorUsedError; + TResult Function(AddressParseError_Base58 value)? base58, + TResult Function(AddressParseError_Bech32 value)? bech32, + TResult Function(AddressParseError_WitnessVersion value)? witnessVersion, + TResult Function(AddressParseError_WitnessProgram value)? witnessProgram, + TResult Function(AddressParseError_UnknownHrp value)? unknownHrp, + TResult Function(AddressParseError_LegacyAddressTooLong value)? + legacyAddressTooLong, + TResult Function(AddressParseError_InvalidBase58PayloadLength value)? + invalidBase58PayloadLength, + TResult Function(AddressParseError_InvalidLegacyPrefix value)? + invalidLegacyPrefix, + TResult Function(AddressParseError_NetworkValidation value)? + networkValidation, + TResult Function(AddressParseError_OtherAddressParseErr value)? + otherAddressParseErr, + required TResult orElse(), + }) { + if (networkValidation != null) { + return networkValidation(this); + } + return orElse(); + } +} + +abstract class AddressParseError_NetworkValidation extends AddressParseError { + const factory AddressParseError_NetworkValidation() = + _$AddressParseError_NetworkValidationImpl; + const AddressParseError_NetworkValidation._() : super._(); } /// @nodoc -abstract class _$$AddressError_UncompressedPubkeyImplCopyWith<$Res> { - factory _$$AddressError_UncompressedPubkeyImplCopyWith( - _$AddressError_UncompressedPubkeyImpl value, - $Res Function(_$AddressError_UncompressedPubkeyImpl) then) = - __$$AddressError_UncompressedPubkeyImplCopyWithImpl<$Res>; +abstract class _$$AddressParseError_OtherAddressParseErrImplCopyWith<$Res> { + factory _$$AddressParseError_OtherAddressParseErrImplCopyWith( + _$AddressParseError_OtherAddressParseErrImpl value, + $Res Function(_$AddressParseError_OtherAddressParseErrImpl) then) = + __$$AddressParseError_OtherAddressParseErrImplCopyWithImpl<$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) +class __$$AddressParseError_OtherAddressParseErrImplCopyWithImpl<$Res> + extends _$AddressParseErrorCopyWithImpl<$Res, + _$AddressParseError_OtherAddressParseErrImpl> + implements _$$AddressParseError_OtherAddressParseErrImplCopyWith<$Res> { + __$$AddressParseError_OtherAddressParseErrImplCopyWithImpl( + _$AddressParseError_OtherAddressParseErrImpl _value, + $Res Function(_$AddressParseError_OtherAddressParseErrImpl) _then) : super(_value, _then); } /// @nodoc -class _$AddressError_UncompressedPubkeyImpl - extends AddressError_UncompressedPubkey { - const _$AddressError_UncompressedPubkeyImpl() : super._(); +class _$AddressParseError_OtherAddressParseErrImpl + extends AddressParseError_OtherAddressParseErr { + const _$AddressParseError_OtherAddressParseErrImpl() : super._(); @override String toString() { - return 'AddressError.uncompressedPubkey()'; + return 'AddressParseError.otherAddressParseErr()'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$AddressError_UncompressedPubkeyImpl); + other is _$AddressParseError_OtherAddressParseErrImpl); } @override @@ -2424,73 +1830,54 @@ class _$AddressError_UncompressedPubkeyImpl @override @optionalTypeArgs TResult when({ - required TResult Function(String field0) base58, - required TResult Function(String field0) bech32, - required TResult Function() emptyBech32Payload, - required TResult Function(Variant expected, Variant found) - invalidBech32Variant, - required TResult Function(int field0) invalidWitnessVersion, - required TResult Function(String field0) unparsableWitnessVersion, - required TResult Function() malformedWitnessVersion, - required TResult Function(BigInt field0) invalidWitnessProgramLength, - required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, - required TResult Function() uncompressedPubkey, - required TResult Function() excessiveScriptSize, - required TResult Function() unrecognizedScript, - required TResult Function(String field0) unknownAddressType, - required TResult Function( - Network networkRequired, Network networkFound, String address) - networkValidation, + required TResult Function() base58, + required TResult Function() bech32, + required TResult Function(String errorMessage) witnessVersion, + required TResult Function(String errorMessage) witnessProgram, + required TResult Function() unknownHrp, + required TResult Function() legacyAddressTooLong, + required TResult Function() invalidBase58PayloadLength, + required TResult Function() invalidLegacyPrefix, + required TResult Function() networkValidation, + required TResult Function() otherAddressParseErr, }) { - return uncompressedPubkey(); + return otherAddressParseErr(); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(String field0)? base58, - TResult? Function(String field0)? bech32, - TResult? Function()? emptyBech32Payload, - TResult? Function(Variant expected, Variant found)? invalidBech32Variant, - TResult? Function(int field0)? invalidWitnessVersion, - TResult? Function(String field0)? unparsableWitnessVersion, - TResult? Function()? malformedWitnessVersion, - TResult? Function(BigInt field0)? invalidWitnessProgramLength, - TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult? Function()? uncompressedPubkey, - TResult? Function()? excessiveScriptSize, - TResult? Function()? unrecognizedScript, - TResult? Function(String field0)? unknownAddressType, - TResult? Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, + TResult? Function()? base58, + TResult? Function()? bech32, + TResult? Function(String errorMessage)? witnessVersion, + TResult? Function(String errorMessage)? witnessProgram, + TResult? Function()? unknownHrp, + TResult? Function()? legacyAddressTooLong, + TResult? Function()? invalidBase58PayloadLength, + TResult? Function()? invalidLegacyPrefix, + TResult? Function()? networkValidation, + TResult? Function()? otherAddressParseErr, }) { - return uncompressedPubkey?.call(); + return otherAddressParseErr?.call(); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(String field0)? base58, - TResult Function(String field0)? bech32, - TResult Function()? emptyBech32Payload, - TResult Function(Variant expected, Variant found)? invalidBech32Variant, - TResult Function(int field0)? invalidWitnessVersion, - TResult Function(String field0)? unparsableWitnessVersion, - TResult Function()? malformedWitnessVersion, - TResult Function(BigInt field0)? invalidWitnessProgramLength, - TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult Function()? uncompressedPubkey, - TResult Function()? excessiveScriptSize, - TResult Function()? unrecognizedScript, - TResult Function(String field0)? unknownAddressType, - TResult Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, + TResult Function()? base58, + TResult Function()? bech32, + TResult Function(String errorMessage)? witnessVersion, + TResult Function(String errorMessage)? witnessProgram, + TResult Function()? unknownHrp, + TResult Function()? legacyAddressTooLong, + TResult Function()? invalidBase58PayloadLength, + TResult Function()? invalidLegacyPrefix, + TResult Function()? networkValidation, + TResult Function()? otherAddressParseErr, required TResult orElse(), }) { - if (uncompressedPubkey != null) { - return uncompressedPubkey(); + if (otherAddressParseErr != null) { + return otherAddressParseErr(); } return orElse(); } @@ -2498,142 +1885,249 @@ class _$AddressError_UncompressedPubkeyImpl @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) + required TResult Function(AddressParseError_Base58 value) base58, + required TResult Function(AddressParseError_Bech32 value) bech32, + required TResult Function(AddressParseError_WitnessVersion value) + witnessVersion, + required TResult Function(AddressParseError_WitnessProgram value) + witnessProgram, + required TResult Function(AddressParseError_UnknownHrp value) unknownHrp, + required TResult Function(AddressParseError_LegacyAddressTooLong value) + legacyAddressTooLong, + required TResult Function( + AddressParseError_InvalidBase58PayloadLength value) + invalidBase58PayloadLength, + required TResult Function(AddressParseError_InvalidLegacyPrefix value) + invalidLegacyPrefix, + required TResult Function(AddressParseError_NetworkValidation value) networkValidation, + required TResult Function(AddressParseError_OtherAddressParseErr value) + otherAddressParseErr, }) { - return uncompressedPubkey(this); + return otherAddressParseErr(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, + TResult? Function(AddressParseError_Base58 value)? base58, + TResult? Function(AddressParseError_Bech32 value)? bech32, + TResult? Function(AddressParseError_WitnessVersion value)? witnessVersion, + TResult? Function(AddressParseError_WitnessProgram value)? witnessProgram, + TResult? Function(AddressParseError_UnknownHrp value)? unknownHrp, + TResult? Function(AddressParseError_LegacyAddressTooLong value)? + legacyAddressTooLong, + TResult? Function(AddressParseError_InvalidBase58PayloadLength value)? + invalidBase58PayloadLength, + TResult? Function(AddressParseError_InvalidLegacyPrefix value)? + invalidLegacyPrefix, + TResult? Function(AddressParseError_NetworkValidation value)? + networkValidation, + TResult? Function(AddressParseError_OtherAddressParseErr value)? + otherAddressParseErr, }) { - return uncompressedPubkey?.call(this); + return otherAddressParseErr?.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, + TResult Function(AddressParseError_Base58 value)? base58, + TResult Function(AddressParseError_Bech32 value)? bech32, + TResult Function(AddressParseError_WitnessVersion value)? witnessVersion, + TResult Function(AddressParseError_WitnessProgram value)? witnessProgram, + TResult Function(AddressParseError_UnknownHrp value)? unknownHrp, + TResult Function(AddressParseError_LegacyAddressTooLong value)? + legacyAddressTooLong, + TResult Function(AddressParseError_InvalidBase58PayloadLength value)? + invalidBase58PayloadLength, + TResult Function(AddressParseError_InvalidLegacyPrefix value)? + invalidLegacyPrefix, + TResult Function(AddressParseError_NetworkValidation value)? + networkValidation, + TResult Function(AddressParseError_OtherAddressParseErr value)? + otherAddressParseErr, required TResult orElse(), }) { - if (uncompressedPubkey != null) { - return uncompressedPubkey(this); + if (otherAddressParseErr != null) { + return otherAddressParseErr(this); } return orElse(); } } -abstract class AddressError_UncompressedPubkey extends AddressError { - const factory AddressError_UncompressedPubkey() = - _$AddressError_UncompressedPubkeyImpl; - const AddressError_UncompressedPubkey._() : super._(); +abstract class AddressParseError_OtherAddressParseErr + extends AddressParseError { + const factory AddressParseError_OtherAddressParseErr() = + _$AddressParseError_OtherAddressParseErrImpl; + const AddressParseError_OtherAddressParseErr._() : super._(); +} + +/// @nodoc +mixin _$Bip32Error { + @optionalTypeArgs + TResult when({ + required TResult Function() cannotDeriveFromHardenedKey, + required TResult Function(String errorMessage) secp256K1, + required TResult Function(int childNumber) invalidChildNumber, + required TResult Function() invalidChildNumberFormat, + required TResult Function() invalidDerivationPathFormat, + required TResult Function(String version) unknownVersion, + required TResult Function(int length) wrongExtendedKeyLength, + required TResult Function(String errorMessage) base58, + required TResult Function(String errorMessage) hex, + required TResult Function(int length) invalidPublicKeyHexLength, + required TResult Function(String errorMessage) unknownError, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? cannotDeriveFromHardenedKey, + TResult? Function(String errorMessage)? secp256K1, + TResult? Function(int childNumber)? invalidChildNumber, + TResult? Function()? invalidChildNumberFormat, + TResult? Function()? invalidDerivationPathFormat, + TResult? Function(String version)? unknownVersion, + TResult? Function(int length)? wrongExtendedKeyLength, + TResult? Function(String errorMessage)? base58, + TResult? Function(String errorMessage)? hex, + TResult? Function(int length)? invalidPublicKeyHexLength, + TResult? Function(String errorMessage)? unknownError, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? cannotDeriveFromHardenedKey, + TResult Function(String errorMessage)? secp256K1, + TResult Function(int childNumber)? invalidChildNumber, + TResult Function()? invalidChildNumberFormat, + TResult Function()? invalidDerivationPathFormat, + TResult Function(String version)? unknownVersion, + TResult Function(int length)? wrongExtendedKeyLength, + TResult Function(String errorMessage)? base58, + TResult Function(String errorMessage)? hex, + TResult Function(int length)? invalidPublicKeyHexLength, + TResult Function(String errorMessage)? unknownError, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(Bip32Error_CannotDeriveFromHardenedKey value) + cannotDeriveFromHardenedKey, + required TResult Function(Bip32Error_Secp256k1 value) secp256K1, + required TResult Function(Bip32Error_InvalidChildNumber value) + invalidChildNumber, + required TResult Function(Bip32Error_InvalidChildNumberFormat value) + invalidChildNumberFormat, + required TResult Function(Bip32Error_InvalidDerivationPathFormat value) + invalidDerivationPathFormat, + required TResult Function(Bip32Error_UnknownVersion value) unknownVersion, + required TResult Function(Bip32Error_WrongExtendedKeyLength value) + wrongExtendedKeyLength, + required TResult Function(Bip32Error_Base58 value) base58, + required TResult Function(Bip32Error_Hex value) hex, + required TResult Function(Bip32Error_InvalidPublicKeyHexLength value) + invalidPublicKeyHexLength, + required TResult Function(Bip32Error_UnknownError value) unknownError, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(Bip32Error_CannotDeriveFromHardenedKey value)? + cannotDeriveFromHardenedKey, + TResult? Function(Bip32Error_Secp256k1 value)? secp256K1, + TResult? Function(Bip32Error_InvalidChildNumber value)? invalidChildNumber, + TResult? Function(Bip32Error_InvalidChildNumberFormat value)? + invalidChildNumberFormat, + TResult? Function(Bip32Error_InvalidDerivationPathFormat value)? + invalidDerivationPathFormat, + TResult? Function(Bip32Error_UnknownVersion value)? unknownVersion, + TResult? Function(Bip32Error_WrongExtendedKeyLength value)? + wrongExtendedKeyLength, + TResult? Function(Bip32Error_Base58 value)? base58, + TResult? Function(Bip32Error_Hex value)? hex, + TResult? Function(Bip32Error_InvalidPublicKeyHexLength value)? + invalidPublicKeyHexLength, + TResult? Function(Bip32Error_UnknownError value)? unknownError, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(Bip32Error_CannotDeriveFromHardenedKey value)? + cannotDeriveFromHardenedKey, + TResult Function(Bip32Error_Secp256k1 value)? secp256K1, + TResult Function(Bip32Error_InvalidChildNumber value)? invalidChildNumber, + TResult Function(Bip32Error_InvalidChildNumberFormat value)? + invalidChildNumberFormat, + TResult Function(Bip32Error_InvalidDerivationPathFormat value)? + invalidDerivationPathFormat, + TResult Function(Bip32Error_UnknownVersion value)? unknownVersion, + TResult Function(Bip32Error_WrongExtendedKeyLength value)? + wrongExtendedKeyLength, + TResult Function(Bip32Error_Base58 value)? base58, + TResult Function(Bip32Error_Hex value)? hex, + TResult Function(Bip32Error_InvalidPublicKeyHexLength value)? + invalidPublicKeyHexLength, + TResult Function(Bip32Error_UnknownError value)? unknownError, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $Bip32ErrorCopyWith<$Res> { + factory $Bip32ErrorCopyWith( + Bip32Error value, $Res Function(Bip32Error) then) = + _$Bip32ErrorCopyWithImpl<$Res, Bip32Error>; +} + +/// @nodoc +class _$Bip32ErrorCopyWithImpl<$Res, $Val extends Bip32Error> + implements $Bip32ErrorCopyWith<$Res> { + _$Bip32ErrorCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; } /// @nodoc -abstract class _$$AddressError_ExcessiveScriptSizeImplCopyWith<$Res> { - factory _$$AddressError_ExcessiveScriptSizeImplCopyWith( - _$AddressError_ExcessiveScriptSizeImpl value, - $Res Function(_$AddressError_ExcessiveScriptSizeImpl) then) = - __$$AddressError_ExcessiveScriptSizeImplCopyWithImpl<$Res>; +abstract class _$$Bip32Error_CannotDeriveFromHardenedKeyImplCopyWith<$Res> { + factory _$$Bip32Error_CannotDeriveFromHardenedKeyImplCopyWith( + _$Bip32Error_CannotDeriveFromHardenedKeyImpl value, + $Res Function(_$Bip32Error_CannotDeriveFromHardenedKeyImpl) then) = + __$$Bip32Error_CannotDeriveFromHardenedKeyImplCopyWithImpl<$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) +class __$$Bip32Error_CannotDeriveFromHardenedKeyImplCopyWithImpl<$Res> + extends _$Bip32ErrorCopyWithImpl<$Res, + _$Bip32Error_CannotDeriveFromHardenedKeyImpl> + implements _$$Bip32Error_CannotDeriveFromHardenedKeyImplCopyWith<$Res> { + __$$Bip32Error_CannotDeriveFromHardenedKeyImplCopyWithImpl( + _$Bip32Error_CannotDeriveFromHardenedKeyImpl _value, + $Res Function(_$Bip32Error_CannotDeriveFromHardenedKeyImpl) _then) : super(_value, _then); } /// @nodoc -class _$AddressError_ExcessiveScriptSizeImpl - extends AddressError_ExcessiveScriptSize { - const _$AddressError_ExcessiveScriptSizeImpl() : super._(); +class _$Bip32Error_CannotDeriveFromHardenedKeyImpl + extends Bip32Error_CannotDeriveFromHardenedKey { + const _$Bip32Error_CannotDeriveFromHardenedKeyImpl() : super._(); @override String toString() { - return 'AddressError.excessiveScriptSize()'; + return 'Bip32Error.cannotDeriveFromHardenedKey()'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$AddressError_ExcessiveScriptSizeImpl); + other is _$Bip32Error_CannotDeriveFromHardenedKeyImpl); } @override @@ -2642,73 +2136,57 @@ class _$AddressError_ExcessiveScriptSizeImpl @override @optionalTypeArgs TResult when({ - required TResult Function(String field0) base58, - required TResult Function(String field0) bech32, - required TResult Function() emptyBech32Payload, - required TResult Function(Variant expected, Variant found) - invalidBech32Variant, - required TResult Function(int field0) invalidWitnessVersion, - required TResult Function(String field0) unparsableWitnessVersion, - required TResult Function() malformedWitnessVersion, - required TResult Function(BigInt field0) invalidWitnessProgramLength, - required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, - required TResult Function() uncompressedPubkey, - required TResult Function() excessiveScriptSize, - required TResult Function() unrecognizedScript, - required TResult Function(String field0) unknownAddressType, - required TResult Function( - Network networkRequired, Network networkFound, String address) - networkValidation, + required TResult Function() cannotDeriveFromHardenedKey, + required TResult Function(String errorMessage) secp256K1, + required TResult Function(int childNumber) invalidChildNumber, + required TResult Function() invalidChildNumberFormat, + required TResult Function() invalidDerivationPathFormat, + required TResult Function(String version) unknownVersion, + required TResult Function(int length) wrongExtendedKeyLength, + required TResult Function(String errorMessage) base58, + required TResult Function(String errorMessage) hex, + required TResult Function(int length) invalidPublicKeyHexLength, + required TResult Function(String errorMessage) unknownError, }) { - return excessiveScriptSize(); + return cannotDeriveFromHardenedKey(); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(String field0)? base58, - TResult? Function(String field0)? bech32, - TResult? Function()? emptyBech32Payload, - TResult? Function(Variant expected, Variant found)? invalidBech32Variant, - TResult? Function(int field0)? invalidWitnessVersion, - TResult? Function(String field0)? unparsableWitnessVersion, - TResult? Function()? malformedWitnessVersion, - TResult? Function(BigInt field0)? invalidWitnessProgramLength, - TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult? Function()? uncompressedPubkey, - TResult? Function()? excessiveScriptSize, - TResult? Function()? unrecognizedScript, - TResult? Function(String field0)? unknownAddressType, - TResult? Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, + TResult? Function()? cannotDeriveFromHardenedKey, + TResult? Function(String errorMessage)? secp256K1, + TResult? Function(int childNumber)? invalidChildNumber, + TResult? Function()? invalidChildNumberFormat, + TResult? Function()? invalidDerivationPathFormat, + TResult? Function(String version)? unknownVersion, + TResult? Function(int length)? wrongExtendedKeyLength, + TResult? Function(String errorMessage)? base58, + TResult? Function(String errorMessage)? hex, + TResult? Function(int length)? invalidPublicKeyHexLength, + TResult? Function(String errorMessage)? unknownError, }) { - return excessiveScriptSize?.call(); + return cannotDeriveFromHardenedKey?.call(); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(String field0)? base58, - TResult Function(String field0)? bech32, - TResult Function()? emptyBech32Payload, - TResult Function(Variant expected, Variant found)? invalidBech32Variant, - TResult Function(int field0)? invalidWitnessVersion, - TResult Function(String field0)? unparsableWitnessVersion, - TResult Function()? malformedWitnessVersion, - TResult Function(BigInt field0)? invalidWitnessProgramLength, - TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult Function()? uncompressedPubkey, - TResult Function()? excessiveScriptSize, - TResult Function()? unrecognizedScript, - TResult Function(String field0)? unknownAddressType, - TResult Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, + TResult Function()? cannotDeriveFromHardenedKey, + TResult Function(String errorMessage)? secp256K1, + TResult Function(int childNumber)? invalidChildNumber, + TResult Function()? invalidChildNumberFormat, + TResult Function()? invalidDerivationPathFormat, + TResult Function(String version)? unknownVersion, + TResult Function(int length)? wrongExtendedKeyLength, + TResult Function(String errorMessage)? base58, + TResult Function(String errorMessage)? hex, + TResult Function(int length)? invalidPublicKeyHexLength, + TResult Function(String errorMessage)? unknownError, required TResult orElse(), }) { - if (excessiveScriptSize != null) { - return excessiveScriptSize(); + if (cannotDeriveFromHardenedKey != null) { + return cannotDeriveFromHardenedKey(); } return orElse(); } @@ -2716,217 +2194,202 @@ class _$AddressError_ExcessiveScriptSizeImpl @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, + required TResult Function(Bip32Error_CannotDeriveFromHardenedKey value) + cannotDeriveFromHardenedKey, + required TResult Function(Bip32Error_Secp256k1 value) secp256K1, + required TResult Function(Bip32Error_InvalidChildNumber value) + invalidChildNumber, + required TResult Function(Bip32Error_InvalidChildNumberFormat value) + invalidChildNumberFormat, + required TResult Function(Bip32Error_InvalidDerivationPathFormat value) + invalidDerivationPathFormat, + required TResult Function(Bip32Error_UnknownVersion value) unknownVersion, + required TResult Function(Bip32Error_WrongExtendedKeyLength value) + wrongExtendedKeyLength, + required TResult Function(Bip32Error_Base58 value) base58, + required TResult Function(Bip32Error_Hex value) hex, + required TResult Function(Bip32Error_InvalidPublicKeyHexLength value) + invalidPublicKeyHexLength, + required TResult Function(Bip32Error_UnknownError value) unknownError, }) { - return excessiveScriptSize(this); + return cannotDeriveFromHardenedKey(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, + TResult? Function(Bip32Error_CannotDeriveFromHardenedKey value)? + cannotDeriveFromHardenedKey, + TResult? Function(Bip32Error_Secp256k1 value)? secp256K1, + TResult? Function(Bip32Error_InvalidChildNumber value)? invalidChildNumber, + TResult? Function(Bip32Error_InvalidChildNumberFormat value)? + invalidChildNumberFormat, + TResult? Function(Bip32Error_InvalidDerivationPathFormat value)? + invalidDerivationPathFormat, + TResult? Function(Bip32Error_UnknownVersion value)? unknownVersion, + TResult? Function(Bip32Error_WrongExtendedKeyLength value)? + wrongExtendedKeyLength, + TResult? Function(Bip32Error_Base58 value)? base58, + TResult? Function(Bip32Error_Hex value)? hex, + TResult? Function(Bip32Error_InvalidPublicKeyHexLength value)? + invalidPublicKeyHexLength, + TResult? Function(Bip32Error_UnknownError value)? unknownError, }) { - return excessiveScriptSize?.call(this); + return cannotDeriveFromHardenedKey?.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, + TResult Function(Bip32Error_CannotDeriveFromHardenedKey value)? + cannotDeriveFromHardenedKey, + TResult Function(Bip32Error_Secp256k1 value)? secp256K1, + TResult Function(Bip32Error_InvalidChildNumber value)? invalidChildNumber, + TResult Function(Bip32Error_InvalidChildNumberFormat value)? + invalidChildNumberFormat, + TResult Function(Bip32Error_InvalidDerivationPathFormat value)? + invalidDerivationPathFormat, + TResult Function(Bip32Error_UnknownVersion value)? unknownVersion, + TResult Function(Bip32Error_WrongExtendedKeyLength value)? + wrongExtendedKeyLength, + TResult Function(Bip32Error_Base58 value)? base58, + TResult Function(Bip32Error_Hex value)? hex, + TResult Function(Bip32Error_InvalidPublicKeyHexLength value)? + invalidPublicKeyHexLength, + TResult Function(Bip32Error_UnknownError value)? unknownError, required TResult orElse(), }) { - if (excessiveScriptSize != null) { - return excessiveScriptSize(this); + if (cannotDeriveFromHardenedKey != null) { + return cannotDeriveFromHardenedKey(this); } return orElse(); } } -abstract class AddressError_ExcessiveScriptSize extends AddressError { - const factory AddressError_ExcessiveScriptSize() = - _$AddressError_ExcessiveScriptSizeImpl; - const AddressError_ExcessiveScriptSize._() : super._(); +abstract class Bip32Error_CannotDeriveFromHardenedKey extends Bip32Error { + const factory Bip32Error_CannotDeriveFromHardenedKey() = + _$Bip32Error_CannotDeriveFromHardenedKeyImpl; + const Bip32Error_CannotDeriveFromHardenedKey._() : super._(); } /// @nodoc -abstract class _$$AddressError_UnrecognizedScriptImplCopyWith<$Res> { - factory _$$AddressError_UnrecognizedScriptImplCopyWith( - _$AddressError_UnrecognizedScriptImpl value, - $Res Function(_$AddressError_UnrecognizedScriptImpl) then) = - __$$AddressError_UnrecognizedScriptImplCopyWithImpl<$Res>; +abstract class _$$Bip32Error_Secp256k1ImplCopyWith<$Res> { + factory _$$Bip32Error_Secp256k1ImplCopyWith(_$Bip32Error_Secp256k1Impl value, + $Res Function(_$Bip32Error_Secp256k1Impl) then) = + __$$Bip32Error_Secp256k1ImplCopyWithImpl<$Res>; + @useResult + $Res call({String errorMessage}); } /// @nodoc -class __$$AddressError_UnrecognizedScriptImplCopyWithImpl<$Res> - extends _$AddressErrorCopyWithImpl<$Res, - _$AddressError_UnrecognizedScriptImpl> - implements _$$AddressError_UnrecognizedScriptImplCopyWith<$Res> { - __$$AddressError_UnrecognizedScriptImplCopyWithImpl( - _$AddressError_UnrecognizedScriptImpl _value, - $Res Function(_$AddressError_UnrecognizedScriptImpl) _then) +class __$$Bip32Error_Secp256k1ImplCopyWithImpl<$Res> + extends _$Bip32ErrorCopyWithImpl<$Res, _$Bip32Error_Secp256k1Impl> + implements _$$Bip32Error_Secp256k1ImplCopyWith<$Res> { + __$$Bip32Error_Secp256k1ImplCopyWithImpl(_$Bip32Error_Secp256k1Impl _value, + $Res Function(_$Bip32Error_Secp256k1Impl) _then) : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? errorMessage = null, + }) { + return _then(_$Bip32Error_Secp256k1Impl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } } /// @nodoc -class _$AddressError_UnrecognizedScriptImpl - extends AddressError_UnrecognizedScript { - const _$AddressError_UnrecognizedScriptImpl() : super._(); +class _$Bip32Error_Secp256k1Impl extends Bip32Error_Secp256k1 { + const _$Bip32Error_Secp256k1Impl({required this.errorMessage}) : super._(); + + @override + final String errorMessage; @override String toString() { - return 'AddressError.unrecognizedScript()'; + return 'Bip32Error.secp256K1(errorMessage: $errorMessage)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$AddressError_UnrecognizedScriptImpl); + other is _$Bip32Error_Secp256k1Impl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); } @override - int get hashCode => runtimeType.hashCode; + int get hashCode => Object.hash(runtimeType, errorMessage); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$Bip32Error_Secp256k1ImplCopyWith<_$Bip32Error_Secp256k1Impl> + get copyWith => + __$$Bip32Error_Secp256k1ImplCopyWithImpl<_$Bip32Error_Secp256k1Impl>( + this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(String field0) base58, - required TResult Function(String field0) bech32, - required TResult Function() emptyBech32Payload, - required TResult Function(Variant expected, Variant found) - invalidBech32Variant, - required TResult Function(int field0) invalidWitnessVersion, - required TResult Function(String field0) unparsableWitnessVersion, - required TResult Function() malformedWitnessVersion, - required TResult Function(BigInt field0) invalidWitnessProgramLength, - required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, - required TResult Function() uncompressedPubkey, - required TResult Function() excessiveScriptSize, - required TResult Function() unrecognizedScript, - required TResult Function(String field0) unknownAddressType, - required TResult Function( - Network networkRequired, Network networkFound, String address) - networkValidation, + required TResult Function() cannotDeriveFromHardenedKey, + required TResult Function(String errorMessage) secp256K1, + required TResult Function(int childNumber) invalidChildNumber, + required TResult Function() invalidChildNumberFormat, + required TResult Function() invalidDerivationPathFormat, + required TResult Function(String version) unknownVersion, + required TResult Function(int length) wrongExtendedKeyLength, + required TResult Function(String errorMessage) base58, + required TResult Function(String errorMessage) hex, + required TResult Function(int length) invalidPublicKeyHexLength, + required TResult Function(String errorMessage) unknownError, }) { - return unrecognizedScript(); + return secp256K1(errorMessage); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(String field0)? base58, - TResult? Function(String field0)? bech32, - TResult? Function()? emptyBech32Payload, - TResult? Function(Variant expected, Variant found)? invalidBech32Variant, - TResult? Function(int field0)? invalidWitnessVersion, - TResult? Function(String field0)? unparsableWitnessVersion, - TResult? Function()? malformedWitnessVersion, - TResult? Function(BigInt field0)? invalidWitnessProgramLength, - TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult? Function()? uncompressedPubkey, - TResult? Function()? excessiveScriptSize, - TResult? Function()? unrecognizedScript, - TResult? Function(String field0)? unknownAddressType, - TResult? Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, + TResult? Function()? cannotDeriveFromHardenedKey, + TResult? Function(String errorMessage)? secp256K1, + TResult? Function(int childNumber)? invalidChildNumber, + TResult? Function()? invalidChildNumberFormat, + TResult? Function()? invalidDerivationPathFormat, + TResult? Function(String version)? unknownVersion, + TResult? Function(int length)? wrongExtendedKeyLength, + TResult? Function(String errorMessage)? base58, + TResult? Function(String errorMessage)? hex, + TResult? Function(int length)? invalidPublicKeyHexLength, + TResult? Function(String errorMessage)? unknownError, }) { - return unrecognizedScript?.call(); + return secp256K1?.call(errorMessage); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(String field0)? base58, - TResult Function(String field0)? bech32, - TResult Function()? emptyBech32Payload, - TResult Function(Variant expected, Variant found)? invalidBech32Variant, - TResult Function(int field0)? invalidWitnessVersion, - TResult Function(String field0)? unparsableWitnessVersion, - TResult Function()? malformedWitnessVersion, - TResult Function(BigInt field0)? invalidWitnessProgramLength, - TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult Function()? uncompressedPubkey, - TResult Function()? excessiveScriptSize, - TResult Function()? unrecognizedScript, - TResult Function(String field0)? unknownAddressType, - TResult Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, + TResult Function()? cannotDeriveFromHardenedKey, + TResult Function(String errorMessage)? secp256K1, + TResult Function(int childNumber)? invalidChildNumber, + TResult Function()? invalidChildNumberFormat, + TResult Function()? invalidDerivationPathFormat, + TResult Function(String version)? unknownVersion, + TResult Function(int length)? wrongExtendedKeyLength, + TResult Function(String errorMessage)? base58, + TResult Function(String errorMessage)? hex, + TResult Function(int length)? invalidPublicKeyHexLength, + TResult Function(String errorMessage)? unknownError, required TResult orElse(), }) { - if (unrecognizedScript != null) { - return unrecognizedScript(); + if (secp256K1 != null) { + return secp256K1(errorMessage); } return orElse(); } @@ -2934,244 +2397,211 @@ class _$AddressError_UnrecognizedScriptImpl @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, + required TResult Function(Bip32Error_CannotDeriveFromHardenedKey value) + cannotDeriveFromHardenedKey, + required TResult Function(Bip32Error_Secp256k1 value) secp256K1, + required TResult Function(Bip32Error_InvalidChildNumber value) + invalidChildNumber, + required TResult Function(Bip32Error_InvalidChildNumberFormat value) + invalidChildNumberFormat, + required TResult Function(Bip32Error_InvalidDerivationPathFormat value) + invalidDerivationPathFormat, + required TResult Function(Bip32Error_UnknownVersion value) unknownVersion, + required TResult Function(Bip32Error_WrongExtendedKeyLength value) + wrongExtendedKeyLength, + required TResult Function(Bip32Error_Base58 value) base58, + required TResult Function(Bip32Error_Hex value) hex, + required TResult Function(Bip32Error_InvalidPublicKeyHexLength value) + invalidPublicKeyHexLength, + required TResult Function(Bip32Error_UnknownError value) unknownError, }) { - return unrecognizedScript(this); + return secp256K1(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, + TResult? Function(Bip32Error_CannotDeriveFromHardenedKey value)? + cannotDeriveFromHardenedKey, + TResult? Function(Bip32Error_Secp256k1 value)? secp256K1, + TResult? Function(Bip32Error_InvalidChildNumber value)? invalidChildNumber, + TResult? Function(Bip32Error_InvalidChildNumberFormat value)? + invalidChildNumberFormat, + TResult? Function(Bip32Error_InvalidDerivationPathFormat value)? + invalidDerivationPathFormat, + TResult? Function(Bip32Error_UnknownVersion value)? unknownVersion, + TResult? Function(Bip32Error_WrongExtendedKeyLength value)? + wrongExtendedKeyLength, + TResult? Function(Bip32Error_Base58 value)? base58, + TResult? Function(Bip32Error_Hex value)? hex, + TResult? Function(Bip32Error_InvalidPublicKeyHexLength value)? + invalidPublicKeyHexLength, + TResult? Function(Bip32Error_UnknownError value)? unknownError, }) { - return unrecognizedScript?.call(this); + return secp256K1?.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, + TResult Function(Bip32Error_CannotDeriveFromHardenedKey value)? + cannotDeriveFromHardenedKey, + TResult Function(Bip32Error_Secp256k1 value)? secp256K1, + TResult Function(Bip32Error_InvalidChildNumber value)? invalidChildNumber, + TResult Function(Bip32Error_InvalidChildNumberFormat value)? + invalidChildNumberFormat, + TResult Function(Bip32Error_InvalidDerivationPathFormat value)? + invalidDerivationPathFormat, + TResult Function(Bip32Error_UnknownVersion value)? unknownVersion, + TResult Function(Bip32Error_WrongExtendedKeyLength value)? + wrongExtendedKeyLength, + TResult Function(Bip32Error_Base58 value)? base58, + TResult Function(Bip32Error_Hex value)? hex, + TResult Function(Bip32Error_InvalidPublicKeyHexLength value)? + invalidPublicKeyHexLength, + TResult Function(Bip32Error_UnknownError value)? unknownError, required TResult orElse(), }) { - if (unrecognizedScript != null) { - return unrecognizedScript(this); + if (secp256K1 != null) { + return secp256K1(this); } return orElse(); } } -abstract class AddressError_UnrecognizedScript extends AddressError { - const factory AddressError_UnrecognizedScript() = - _$AddressError_UnrecognizedScriptImpl; - const AddressError_UnrecognizedScript._() : super._(); +abstract class Bip32Error_Secp256k1 extends Bip32Error { + const factory Bip32Error_Secp256k1({required final String errorMessage}) = + _$Bip32Error_Secp256k1Impl; + const Bip32Error_Secp256k1._() : super._(); + + String get errorMessage; + @JsonKey(ignore: true) + _$$Bip32Error_Secp256k1ImplCopyWith<_$Bip32Error_Secp256k1Impl> + get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$AddressError_UnknownAddressTypeImplCopyWith<$Res> { - factory _$$AddressError_UnknownAddressTypeImplCopyWith( - _$AddressError_UnknownAddressTypeImpl value, - $Res Function(_$AddressError_UnknownAddressTypeImpl) then) = - __$$AddressError_UnknownAddressTypeImplCopyWithImpl<$Res>; +abstract class _$$Bip32Error_InvalidChildNumberImplCopyWith<$Res> { + factory _$$Bip32Error_InvalidChildNumberImplCopyWith( + _$Bip32Error_InvalidChildNumberImpl value, + $Res Function(_$Bip32Error_InvalidChildNumberImpl) then) = + __$$Bip32Error_InvalidChildNumberImplCopyWithImpl<$Res>; @useResult - $Res call({String field0}); + $Res call({int childNumber}); } /// @nodoc -class __$$AddressError_UnknownAddressTypeImplCopyWithImpl<$Res> - extends _$AddressErrorCopyWithImpl<$Res, - _$AddressError_UnknownAddressTypeImpl> - implements _$$AddressError_UnknownAddressTypeImplCopyWith<$Res> { - __$$AddressError_UnknownAddressTypeImplCopyWithImpl( - _$AddressError_UnknownAddressTypeImpl _value, - $Res Function(_$AddressError_UnknownAddressTypeImpl) _then) +class __$$Bip32Error_InvalidChildNumberImplCopyWithImpl<$Res> + extends _$Bip32ErrorCopyWithImpl<$Res, _$Bip32Error_InvalidChildNumberImpl> + implements _$$Bip32Error_InvalidChildNumberImplCopyWith<$Res> { + __$$Bip32Error_InvalidChildNumberImplCopyWithImpl( + _$Bip32Error_InvalidChildNumberImpl _value, + $Res Function(_$Bip32Error_InvalidChildNumberImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? field0 = null, + Object? childNumber = null, }) { - return _then(_$AddressError_UnknownAddressTypeImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, + return _then(_$Bip32Error_InvalidChildNumberImpl( + childNumber: null == childNumber + ? _value.childNumber + : childNumber // ignore: cast_nullable_to_non_nullable + as int, )); } } /// @nodoc -class _$AddressError_UnknownAddressTypeImpl - extends AddressError_UnknownAddressType { - const _$AddressError_UnknownAddressTypeImpl(this.field0) : super._(); +class _$Bip32Error_InvalidChildNumberImpl + extends Bip32Error_InvalidChildNumber { + const _$Bip32Error_InvalidChildNumberImpl({required this.childNumber}) + : super._(); @override - final String field0; + final int childNumber; @override String toString() { - return 'AddressError.unknownAddressType(field0: $field0)'; + return 'Bip32Error.invalidChildNumber(childNumber: $childNumber)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$AddressError_UnknownAddressTypeImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$Bip32Error_InvalidChildNumberImpl && + (identical(other.childNumber, childNumber) || + other.childNumber == childNumber)); } @override - int get hashCode => Object.hash(runtimeType, field0); + int get hashCode => Object.hash(runtimeType, childNumber); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$AddressError_UnknownAddressTypeImplCopyWith< - _$AddressError_UnknownAddressTypeImpl> - get copyWith => __$$AddressError_UnknownAddressTypeImplCopyWithImpl< - _$AddressError_UnknownAddressTypeImpl>(this, _$identity); + _$$Bip32Error_InvalidChildNumberImplCopyWith< + _$Bip32Error_InvalidChildNumberImpl> + get copyWith => __$$Bip32Error_InvalidChildNumberImplCopyWithImpl< + _$Bip32Error_InvalidChildNumberImpl>(this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(String field0) base58, - required TResult Function(String field0) bech32, - required TResult Function() emptyBech32Payload, - required TResult Function(Variant expected, Variant found) - invalidBech32Variant, - required TResult Function(int field0) invalidWitnessVersion, - required TResult Function(String field0) unparsableWitnessVersion, - required TResult Function() malformedWitnessVersion, - required TResult Function(BigInt field0) invalidWitnessProgramLength, - required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, - required TResult Function() uncompressedPubkey, - required TResult Function() excessiveScriptSize, - required TResult Function() unrecognizedScript, - required TResult Function(String field0) unknownAddressType, - required TResult Function( - Network networkRequired, Network networkFound, String address) - networkValidation, + required TResult Function() cannotDeriveFromHardenedKey, + required TResult Function(String errorMessage) secp256K1, + required TResult Function(int childNumber) invalidChildNumber, + required TResult Function() invalidChildNumberFormat, + required TResult Function() invalidDerivationPathFormat, + required TResult Function(String version) unknownVersion, + required TResult Function(int length) wrongExtendedKeyLength, + required TResult Function(String errorMessage) base58, + required TResult Function(String errorMessage) hex, + required TResult Function(int length) invalidPublicKeyHexLength, + required TResult Function(String errorMessage) unknownError, }) { - return unknownAddressType(field0); + return invalidChildNumber(childNumber); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(String field0)? base58, - TResult? Function(String field0)? bech32, - TResult? Function()? emptyBech32Payload, - TResult? Function(Variant expected, Variant found)? invalidBech32Variant, - TResult? Function(int field0)? invalidWitnessVersion, - TResult? Function(String field0)? unparsableWitnessVersion, - TResult? Function()? malformedWitnessVersion, - TResult? Function(BigInt field0)? invalidWitnessProgramLength, - TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult? Function()? uncompressedPubkey, - TResult? Function()? excessiveScriptSize, - TResult? Function()? unrecognizedScript, - TResult? Function(String field0)? unknownAddressType, - TResult? Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, + TResult? Function()? cannotDeriveFromHardenedKey, + TResult? Function(String errorMessage)? secp256K1, + TResult? Function(int childNumber)? invalidChildNumber, + TResult? Function()? invalidChildNumberFormat, + TResult? Function()? invalidDerivationPathFormat, + TResult? Function(String version)? unknownVersion, + TResult? Function(int length)? wrongExtendedKeyLength, + TResult? Function(String errorMessage)? base58, + TResult? Function(String errorMessage)? hex, + TResult? Function(int length)? invalidPublicKeyHexLength, + TResult? Function(String errorMessage)? unknownError, }) { - return unknownAddressType?.call(field0); + return invalidChildNumber?.call(childNumber); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(String field0)? base58, - TResult Function(String field0)? bech32, - TResult Function()? emptyBech32Payload, - TResult Function(Variant expected, Variant found)? invalidBech32Variant, - TResult Function(int field0)? invalidWitnessVersion, - TResult Function(String field0)? unparsableWitnessVersion, - TResult Function()? malformedWitnessVersion, - TResult Function(BigInt field0)? invalidWitnessProgramLength, - TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult Function()? uncompressedPubkey, - TResult Function()? excessiveScriptSize, - TResult Function()? unrecognizedScript, - TResult Function(String field0)? unknownAddressType, - TResult Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, + TResult Function()? cannotDeriveFromHardenedKey, + TResult Function(String errorMessage)? secp256K1, + TResult Function(int childNumber)? invalidChildNumber, + TResult Function()? invalidChildNumberFormat, + TResult Function()? invalidDerivationPathFormat, + TResult Function(String version)? unknownVersion, + TResult Function(int length)? wrongExtendedKeyLength, + TResult Function(String errorMessage)? base58, + TResult Function(String errorMessage)? hex, + TResult Function(int length)? invalidPublicKeyHexLength, + TResult Function(String errorMessage)? unknownError, required TResult orElse(), }) { - if (unknownAddressType != null) { - return unknownAddressType(field0); + if (invalidChildNumber != null) { + return invalidChildNumber(childNumber); } return orElse(); } @@ -3179,273 +2609,184 @@ class _$AddressError_UnknownAddressTypeImpl @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, + required TResult Function(Bip32Error_CannotDeriveFromHardenedKey value) + cannotDeriveFromHardenedKey, + required TResult Function(Bip32Error_Secp256k1 value) secp256K1, + required TResult Function(Bip32Error_InvalidChildNumber value) + invalidChildNumber, + required TResult Function(Bip32Error_InvalidChildNumberFormat value) + invalidChildNumberFormat, + required TResult Function(Bip32Error_InvalidDerivationPathFormat value) + invalidDerivationPathFormat, + required TResult Function(Bip32Error_UnknownVersion value) unknownVersion, + required TResult Function(Bip32Error_WrongExtendedKeyLength value) + wrongExtendedKeyLength, + required TResult Function(Bip32Error_Base58 value) base58, + required TResult Function(Bip32Error_Hex value) hex, + required TResult Function(Bip32Error_InvalidPublicKeyHexLength value) + invalidPublicKeyHexLength, + required TResult Function(Bip32Error_UnknownError value) unknownError, }) { - return unknownAddressType(this); + return invalidChildNumber(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, + TResult? Function(Bip32Error_CannotDeriveFromHardenedKey value)? + cannotDeriveFromHardenedKey, + TResult? Function(Bip32Error_Secp256k1 value)? secp256K1, + TResult? Function(Bip32Error_InvalidChildNumber value)? invalidChildNumber, + TResult? Function(Bip32Error_InvalidChildNumberFormat value)? + invalidChildNumberFormat, + TResult? Function(Bip32Error_InvalidDerivationPathFormat value)? + invalidDerivationPathFormat, + TResult? Function(Bip32Error_UnknownVersion value)? unknownVersion, + TResult? Function(Bip32Error_WrongExtendedKeyLength value)? + wrongExtendedKeyLength, + TResult? Function(Bip32Error_Base58 value)? base58, + TResult? Function(Bip32Error_Hex value)? hex, + TResult? Function(Bip32Error_InvalidPublicKeyHexLength value)? + invalidPublicKeyHexLength, + TResult? Function(Bip32Error_UnknownError value)? unknownError, }) { - return unknownAddressType?.call(this); + return invalidChildNumber?.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; + TResult Function(Bip32Error_CannotDeriveFromHardenedKey value)? + cannotDeriveFromHardenedKey, + TResult Function(Bip32Error_Secp256k1 value)? secp256K1, + TResult Function(Bip32Error_InvalidChildNumber value)? invalidChildNumber, + TResult Function(Bip32Error_InvalidChildNumberFormat value)? + invalidChildNumberFormat, + TResult Function(Bip32Error_InvalidDerivationPathFormat value)? + invalidDerivationPathFormat, + TResult Function(Bip32Error_UnknownVersion value)? unknownVersion, + TResult Function(Bip32Error_WrongExtendedKeyLength value)? + wrongExtendedKeyLength, + TResult Function(Bip32Error_Base58 value)? base58, + TResult Function(Bip32Error_Hex value)? hex, + TResult Function(Bip32Error_InvalidPublicKeyHexLength value)? + invalidPublicKeyHexLength, + TResult Function(Bip32Error_UnknownError value)? unknownError, + required TResult orElse(), + }) { + if (invalidChildNumber != null) { + return invalidChildNumber(this); + } + return orElse(); + } +} + +abstract class Bip32Error_InvalidChildNumber extends Bip32Error { + const factory Bip32Error_InvalidChildNumber( + {required final int childNumber}) = _$Bip32Error_InvalidChildNumberImpl; + const Bip32Error_InvalidChildNumber._() : super._(); + + int get childNumber; @JsonKey(ignore: true) - _$$AddressError_UnknownAddressTypeImplCopyWith< - _$AddressError_UnknownAddressTypeImpl> + _$$Bip32Error_InvalidChildNumberImplCopyWith< + _$Bip32Error_InvalidChildNumberImpl> 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}); +abstract class _$$Bip32Error_InvalidChildNumberFormatImplCopyWith<$Res> { + factory _$$Bip32Error_InvalidChildNumberFormatImplCopyWith( + _$Bip32Error_InvalidChildNumberFormatImpl value, + $Res Function(_$Bip32Error_InvalidChildNumberFormatImpl) then) = + __$$Bip32Error_InvalidChildNumberFormatImplCopyWithImpl<$Res>; } /// @nodoc -class __$$AddressError_NetworkValidationImplCopyWithImpl<$Res> - extends _$AddressErrorCopyWithImpl<$Res, - _$AddressError_NetworkValidationImpl> - implements _$$AddressError_NetworkValidationImplCopyWith<$Res> { - __$$AddressError_NetworkValidationImplCopyWithImpl( - _$AddressError_NetworkValidationImpl _value, - $Res Function(_$AddressError_NetworkValidationImpl) _then) +class __$$Bip32Error_InvalidChildNumberFormatImplCopyWithImpl<$Res> + extends _$Bip32ErrorCopyWithImpl<$Res, + _$Bip32Error_InvalidChildNumberFormatImpl> + implements _$$Bip32Error_InvalidChildNumberFormatImplCopyWith<$Res> { + __$$Bip32Error_InvalidChildNumberFormatImplCopyWithImpl( + _$Bip32Error_InvalidChildNumberFormatImpl _value, + $Res Function(_$Bip32Error_InvalidChildNumberFormatImpl) _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; +class _$Bip32Error_InvalidChildNumberFormatImpl + extends Bip32Error_InvalidChildNumberFormat { + const _$Bip32Error_InvalidChildNumberFormatImpl() : super._(); @override String toString() { - return 'AddressError.networkValidation(networkRequired: $networkRequired, networkFound: $networkFound, address: $address)'; + return 'Bip32Error.invalidChildNumberFormat()'; } @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)); + other is _$Bip32Error_InvalidChildNumberFormatImpl); } @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); + int get hashCode => runtimeType.hashCode; @override @optionalTypeArgs TResult when({ - required TResult Function(String field0) base58, - required TResult Function(String field0) bech32, - required TResult Function() emptyBech32Payload, - required TResult Function(Variant expected, Variant found) - invalidBech32Variant, - required TResult Function(int field0) invalidWitnessVersion, - required TResult Function(String field0) unparsableWitnessVersion, - required TResult Function() malformedWitnessVersion, - required TResult Function(BigInt field0) invalidWitnessProgramLength, - required TResult Function(BigInt field0) invalidSegwitV0ProgramLength, - required TResult Function() uncompressedPubkey, - required TResult Function() excessiveScriptSize, - required TResult Function() unrecognizedScript, - required TResult Function(String field0) unknownAddressType, - required TResult Function( - Network networkRequired, Network networkFound, String address) - networkValidation, + required TResult Function() cannotDeriveFromHardenedKey, + required TResult Function(String errorMessage) secp256K1, + required TResult Function(int childNumber) invalidChildNumber, + required TResult Function() invalidChildNumberFormat, + required TResult Function() invalidDerivationPathFormat, + required TResult Function(String version) unknownVersion, + required TResult Function(int length) wrongExtendedKeyLength, + required TResult Function(String errorMessage) base58, + required TResult Function(String errorMessage) hex, + required TResult Function(int length) invalidPublicKeyHexLength, + required TResult Function(String errorMessage) unknownError, }) { - return networkValidation(networkRequired, networkFound, address); + return invalidChildNumberFormat(); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(String field0)? base58, - TResult? Function(String field0)? bech32, - TResult? Function()? emptyBech32Payload, - TResult? Function(Variant expected, Variant found)? invalidBech32Variant, - TResult? Function(int field0)? invalidWitnessVersion, - TResult? Function(String field0)? unparsableWitnessVersion, - TResult? Function()? malformedWitnessVersion, - TResult? Function(BigInt field0)? invalidWitnessProgramLength, - TResult? Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult? Function()? uncompressedPubkey, - TResult? Function()? excessiveScriptSize, - TResult? Function()? unrecognizedScript, - TResult? Function(String field0)? unknownAddressType, - TResult? Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, + TResult? Function()? cannotDeriveFromHardenedKey, + TResult? Function(String errorMessage)? secp256K1, + TResult? Function(int childNumber)? invalidChildNumber, + TResult? Function()? invalidChildNumberFormat, + TResult? Function()? invalidDerivationPathFormat, + TResult? Function(String version)? unknownVersion, + TResult? Function(int length)? wrongExtendedKeyLength, + TResult? Function(String errorMessage)? base58, + TResult? Function(String errorMessage)? hex, + TResult? Function(int length)? invalidPublicKeyHexLength, + TResult? Function(String errorMessage)? unknownError, }) { - return networkValidation?.call(networkRequired, networkFound, address); + return invalidChildNumberFormat?.call(); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(String field0)? base58, - TResult Function(String field0)? bech32, - TResult Function()? emptyBech32Payload, - TResult Function(Variant expected, Variant found)? invalidBech32Variant, - TResult Function(int field0)? invalidWitnessVersion, - TResult Function(String field0)? unparsableWitnessVersion, - TResult Function()? malformedWitnessVersion, - TResult Function(BigInt field0)? invalidWitnessProgramLength, - TResult Function(BigInt field0)? invalidSegwitV0ProgramLength, - TResult Function()? uncompressedPubkey, - TResult Function()? excessiveScriptSize, - TResult Function()? unrecognizedScript, - TResult Function(String field0)? unknownAddressType, - TResult Function( - Network networkRequired, Network networkFound, String address)? - networkValidation, + TResult Function()? cannotDeriveFromHardenedKey, + TResult Function(String errorMessage)? secp256K1, + TResult Function(int childNumber)? invalidChildNumber, + TResult Function()? invalidChildNumberFormat, + TResult Function()? invalidDerivationPathFormat, + TResult Function(String version)? unknownVersion, + TResult Function(int length)? wrongExtendedKeyLength, + TResult Function(String errorMessage)? base58, + TResult Function(String errorMessage)? hex, + TResult Function(int length)? invalidPublicKeyHexLength, + TResult Function(String errorMessage)? unknownError, required TResult orElse(), }) { - if (networkValidation != null) { - return networkValidation(networkRequired, networkFound, address); + if (invalidChildNumberFormat != null) { + return invalidChildNumberFormat(); } return orElse(); } @@ -3453,709 +2794,381 @@ class _$AddressError_NetworkValidationImpl @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, + required TResult Function(Bip32Error_CannotDeriveFromHardenedKey value) + cannotDeriveFromHardenedKey, + required TResult Function(Bip32Error_Secp256k1 value) secp256K1, + required TResult Function(Bip32Error_InvalidChildNumber value) + invalidChildNumber, + required TResult Function(Bip32Error_InvalidChildNumberFormat value) + invalidChildNumberFormat, + required TResult Function(Bip32Error_InvalidDerivationPathFormat value) + invalidDerivationPathFormat, + required TResult Function(Bip32Error_UnknownVersion value) unknownVersion, + required TResult Function(Bip32Error_WrongExtendedKeyLength value) + wrongExtendedKeyLength, + required TResult Function(Bip32Error_Base58 value) base58, + required TResult Function(Bip32Error_Hex value) hex, + required TResult Function(Bip32Error_InvalidPublicKeyHexLength value) + invalidPublicKeyHexLength, + required TResult Function(Bip32Error_UnknownError value) unknownError, }) { - return networkValidation(this); + return invalidChildNumberFormat(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, + TResult? Function(Bip32Error_CannotDeriveFromHardenedKey value)? + cannotDeriveFromHardenedKey, + TResult? Function(Bip32Error_Secp256k1 value)? secp256K1, + TResult? Function(Bip32Error_InvalidChildNumber value)? invalidChildNumber, + TResult? Function(Bip32Error_InvalidChildNumberFormat value)? + invalidChildNumberFormat, + TResult? Function(Bip32Error_InvalidDerivationPathFormat value)? + invalidDerivationPathFormat, + TResult? Function(Bip32Error_UnknownVersion value)? unknownVersion, + TResult? Function(Bip32Error_WrongExtendedKeyLength value)? + wrongExtendedKeyLength, + TResult? Function(Bip32Error_Base58 value)? base58, + TResult? Function(Bip32Error_Hex value)? hex, + TResult? Function(Bip32Error_InvalidPublicKeyHexLength value)? + invalidPublicKeyHexLength, + TResult? Function(Bip32Error_UnknownError value)? unknownError, }) { - return networkValidation?.call(this); + return invalidChildNumberFormat?.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, + TResult Function(Bip32Error_CannotDeriveFromHardenedKey value)? + cannotDeriveFromHardenedKey, + TResult Function(Bip32Error_Secp256k1 value)? secp256K1, + TResult Function(Bip32Error_InvalidChildNumber value)? invalidChildNumber, + TResult Function(Bip32Error_InvalidChildNumberFormat value)? + invalidChildNumberFormat, + TResult Function(Bip32Error_InvalidDerivationPathFormat value)? + invalidDerivationPathFormat, + TResult Function(Bip32Error_UnknownVersion value)? unknownVersion, + TResult Function(Bip32Error_WrongExtendedKeyLength value)? + wrongExtendedKeyLength, + TResult Function(Bip32Error_Base58 value)? base58, + TResult Function(Bip32Error_Hex value)? hex, + TResult Function(Bip32Error_InvalidPublicKeyHexLength value)? + invalidPublicKeyHexLength, + TResult Function(Bip32Error_UnknownError value)? unknownError, required TResult orElse(), }) { - if (networkValidation != null) { - return networkValidation(this); + if (invalidChildNumberFormat != null) { + return invalidChildNumberFormat(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._(); +abstract class Bip32Error_InvalidChildNumberFormat extends Bip32Error { + const factory Bip32Error_InvalidChildNumberFormat() = + _$Bip32Error_InvalidChildNumberFormatImpl; + const Bip32Error_InvalidChildNumberFormat._() : super._(); +} - Network get networkRequired; - Network get networkFound; - String get address; - @JsonKey(ignore: true) - _$$AddressError_NetworkValidationImplCopyWith< - _$AddressError_NetworkValidationImpl> - get copyWith => throw _privateConstructorUsedError; +/// @nodoc +abstract class _$$Bip32Error_InvalidDerivationPathFormatImplCopyWith<$Res> { + factory _$$Bip32Error_InvalidDerivationPathFormatImplCopyWith( + _$Bip32Error_InvalidDerivationPathFormatImpl value, + $Res Function(_$Bip32Error_InvalidDerivationPathFormatImpl) then) = + __$$Bip32Error_InvalidDerivationPathFormatImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$Bip32Error_InvalidDerivationPathFormatImplCopyWithImpl<$Res> + extends _$Bip32ErrorCopyWithImpl<$Res, + _$Bip32Error_InvalidDerivationPathFormatImpl> + implements _$$Bip32Error_InvalidDerivationPathFormatImplCopyWith<$Res> { + __$$Bip32Error_InvalidDerivationPathFormatImplCopyWithImpl( + _$Bip32Error_InvalidDerivationPathFormatImpl _value, + $Res Function(_$Bip32Error_InvalidDerivationPathFormatImpl) _then) + : super(_value, _then); } /// @nodoc -mixin _$BdkError { + +class _$Bip32Error_InvalidDerivationPathFormatImpl + extends Bip32Error_InvalidDerivationPathFormat { + const _$Bip32Error_InvalidDerivationPathFormatImpl() : super._(); + + @override + String toString() { + return 'Bip32Error.invalidDerivationPathFormat()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$Bip32Error_InvalidDerivationPathFormatImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) => - throw _privateConstructorUsedError; + required TResult Function() cannotDeriveFromHardenedKey, + required TResult Function(String errorMessage) secp256K1, + required TResult Function(int childNumber) invalidChildNumber, + required TResult Function() invalidChildNumberFormat, + required TResult Function() invalidDerivationPathFormat, + required TResult Function(String version) unknownVersion, + required TResult Function(int length) wrongExtendedKeyLength, + required TResult Function(String errorMessage) base58, + required TResult Function(String errorMessage) hex, + required TResult Function(int length) invalidPublicKeyHexLength, + required TResult Function(String errorMessage) unknownError, + }) { + return invalidDerivationPathFormat(); + } + + @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) => - throw _privateConstructorUsedError; + TResult? Function()? cannotDeriveFromHardenedKey, + TResult? Function(String errorMessage)? secp256K1, + TResult? Function(int childNumber)? invalidChildNumber, + TResult? Function()? invalidChildNumberFormat, + TResult? Function()? invalidDerivationPathFormat, + TResult? Function(String version)? unknownVersion, + TResult? Function(int length)? wrongExtendedKeyLength, + TResult? Function(String errorMessage)? base58, + TResult? Function(String errorMessage)? hex, + TResult? Function(int length)? invalidPublicKeyHexLength, + TResult? Function(String errorMessage)? unknownError, + }) { + return invalidDerivationPathFormat?.call(); + } + + @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, + TResult Function()? cannotDeriveFromHardenedKey, + TResult Function(String errorMessage)? secp256K1, + TResult Function(int childNumber)? invalidChildNumber, + TResult Function()? invalidChildNumberFormat, + TResult Function()? invalidDerivationPathFormat, + TResult Function(String version)? unknownVersion, + TResult Function(int length)? wrongExtendedKeyLength, + TResult Function(String errorMessage)? base58, + TResult Function(String errorMessage)? hex, + TResult Function(int length)? invalidPublicKeyHexLength, + TResult Function(String errorMessage)? unknownError, required TResult orElse(), - }) => - throw _privateConstructorUsedError; + }) { + if (invalidDerivationPathFormat != null) { + return invalidDerivationPathFormat(); + } + return orElse(); + } + + @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) => - throw _privateConstructorUsedError; + required TResult Function(Bip32Error_CannotDeriveFromHardenedKey value) + cannotDeriveFromHardenedKey, + required TResult Function(Bip32Error_Secp256k1 value) secp256K1, + required TResult Function(Bip32Error_InvalidChildNumber value) + invalidChildNumber, + required TResult Function(Bip32Error_InvalidChildNumberFormat value) + invalidChildNumberFormat, + required TResult Function(Bip32Error_InvalidDerivationPathFormat value) + invalidDerivationPathFormat, + required TResult Function(Bip32Error_UnknownVersion value) unknownVersion, + required TResult Function(Bip32Error_WrongExtendedKeyLength value) + wrongExtendedKeyLength, + required TResult Function(Bip32Error_Base58 value) base58, + required TResult Function(Bip32Error_Hex value) hex, + required TResult Function(Bip32Error_InvalidPublicKeyHexLength value) + invalidPublicKeyHexLength, + required TResult Function(Bip32Error_UnknownError value) unknownError, + }) { + return invalidDerivationPathFormat(this); + } + + @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) => - throw _privateConstructorUsedError; + TResult? Function(Bip32Error_CannotDeriveFromHardenedKey value)? + cannotDeriveFromHardenedKey, + TResult? Function(Bip32Error_Secp256k1 value)? secp256K1, + TResult? Function(Bip32Error_InvalidChildNumber value)? invalidChildNumber, + TResult? Function(Bip32Error_InvalidChildNumberFormat value)? + invalidChildNumberFormat, + TResult? Function(Bip32Error_InvalidDerivationPathFormat value)? + invalidDerivationPathFormat, + TResult? Function(Bip32Error_UnknownVersion value)? unknownVersion, + TResult? Function(Bip32Error_WrongExtendedKeyLength value)? + wrongExtendedKeyLength, + TResult? Function(Bip32Error_Base58 value)? base58, + TResult? Function(Bip32Error_Hex value)? hex, + TResult? Function(Bip32Error_InvalidPublicKeyHexLength value)? + invalidPublicKeyHexLength, + TResult? Function(Bip32Error_UnknownError value)? unknownError, + }) { + return invalidDerivationPathFormat?.call(this); + } + + @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult Function(Bip32Error_CannotDeriveFromHardenedKey value)? + cannotDeriveFromHardenedKey, + TResult Function(Bip32Error_Secp256k1 value)? secp256K1, + TResult Function(Bip32Error_InvalidChildNumber value)? invalidChildNumber, + TResult Function(Bip32Error_InvalidChildNumberFormat value)? + invalidChildNumberFormat, + TResult Function(Bip32Error_InvalidDerivationPathFormat value)? + invalidDerivationPathFormat, + TResult Function(Bip32Error_UnknownVersion value)? unknownVersion, + TResult Function(Bip32Error_WrongExtendedKeyLength value)? + wrongExtendedKeyLength, + TResult Function(Bip32Error_Base58 value)? base58, + TResult Function(Bip32Error_Hex value)? hex, + TResult Function(Bip32Error_InvalidPublicKeyHexLength value)? + invalidPublicKeyHexLength, + TResult Function(Bip32Error_UnknownError value)? unknownError, required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $BdkErrorCopyWith<$Res> { - factory $BdkErrorCopyWith(BdkError value, $Res Function(BdkError) then) = - _$BdkErrorCopyWithImpl<$Res, BdkError>; + }) { + if (invalidDerivationPathFormat != null) { + return invalidDerivationPathFormat(this); + } + return orElse(); + } } -/// @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; +abstract class Bip32Error_InvalidDerivationPathFormat extends Bip32Error { + const factory Bip32Error_InvalidDerivationPathFormat() = + _$Bip32Error_InvalidDerivationPathFormatImpl; + const Bip32Error_InvalidDerivationPathFormat._() : super._(); } /// @nodoc -abstract class _$$BdkError_HexImplCopyWith<$Res> { - factory _$$BdkError_HexImplCopyWith( - _$BdkError_HexImpl value, $Res Function(_$BdkError_HexImpl) then) = - __$$BdkError_HexImplCopyWithImpl<$Res>; +abstract class _$$Bip32Error_UnknownVersionImplCopyWith<$Res> { + factory _$$Bip32Error_UnknownVersionImplCopyWith( + _$Bip32Error_UnknownVersionImpl value, + $Res Function(_$Bip32Error_UnknownVersionImpl) then) = + __$$Bip32Error_UnknownVersionImplCopyWithImpl<$Res>; @useResult - $Res call({HexError field0}); - - $HexErrorCopyWith<$Res> get field0; + $Res call({String version}); } /// @nodoc -class __$$BdkError_HexImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_HexImpl> - implements _$$BdkError_HexImplCopyWith<$Res> { - __$$BdkError_HexImplCopyWithImpl( - _$BdkError_HexImpl _value, $Res Function(_$BdkError_HexImpl) _then) +class __$$Bip32Error_UnknownVersionImplCopyWithImpl<$Res> + extends _$Bip32ErrorCopyWithImpl<$Res, _$Bip32Error_UnknownVersionImpl> + implements _$$Bip32Error_UnknownVersionImplCopyWith<$Res> { + __$$Bip32Error_UnknownVersionImplCopyWithImpl( + _$Bip32Error_UnknownVersionImpl _value, + $Res Function(_$Bip32Error_UnknownVersionImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? field0 = null, + Object? version = null, }) { - return _then(_$BdkError_HexImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as HexError, + return _then(_$Bip32Error_UnknownVersionImpl( + version: null == version + ? _value.version + : version // ignore: cast_nullable_to_non_nullable + as String, )); } - - @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._(); +class _$Bip32Error_UnknownVersionImpl extends Bip32Error_UnknownVersion { + const _$Bip32Error_UnknownVersionImpl({required this.version}) : super._(); @override - final HexError field0; + final String version; @override String toString() { - return 'BdkError.hex(field0: $field0)'; + return 'Bip32Error.unknownVersion(version: $version)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_HexImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$Bip32Error_UnknownVersionImpl && + (identical(other.version, version) || other.version == version)); } @override - int get hashCode => Object.hash(runtimeType, field0); + int get hashCode => Object.hash(runtimeType, version); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$BdkError_HexImplCopyWith<_$BdkError_HexImpl> get copyWith => - __$$BdkError_HexImplCopyWithImpl<_$BdkError_HexImpl>(this, _$identity); + _$$Bip32Error_UnknownVersionImplCopyWith<_$Bip32Error_UnknownVersionImpl> + get copyWith => __$$Bip32Error_UnknownVersionImplCopyWithImpl< + _$Bip32Error_UnknownVersionImpl>(this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return hex(field0); + required TResult Function() cannotDeriveFromHardenedKey, + required TResult Function(String errorMessage) secp256K1, + required TResult Function(int childNumber) invalidChildNumber, + required TResult Function() invalidChildNumberFormat, + required TResult Function() invalidDerivationPathFormat, + required TResult Function(String version) unknownVersion, + required TResult Function(int length) wrongExtendedKeyLength, + required TResult Function(String errorMessage) base58, + required TResult Function(String errorMessage) hex, + required TResult Function(int length) invalidPublicKeyHexLength, + required TResult Function(String errorMessage) unknownError, + }) { + return unknownVersion(version); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return hex?.call(field0); + TResult? Function()? cannotDeriveFromHardenedKey, + TResult? Function(String errorMessage)? secp256K1, + TResult? Function(int childNumber)? invalidChildNumber, + TResult? Function()? invalidChildNumberFormat, + TResult? Function()? invalidDerivationPathFormat, + TResult? Function(String version)? unknownVersion, + TResult? Function(int length)? wrongExtendedKeyLength, + TResult? Function(String errorMessage)? base58, + TResult? Function(String errorMessage)? hex, + TResult? Function(int length)? invalidPublicKeyHexLength, + TResult? Function(String errorMessage)? unknownError, + }) { + return unknownVersion?.call(version); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, + TResult Function()? cannotDeriveFromHardenedKey, + TResult Function(String errorMessage)? secp256K1, + TResult Function(int childNumber)? invalidChildNumber, + TResult Function()? invalidChildNumberFormat, + TResult Function()? invalidDerivationPathFormat, + TResult Function(String version)? unknownVersion, + TResult Function(int length)? wrongExtendedKeyLength, + TResult Function(String errorMessage)? base58, + TResult Function(String errorMessage)? hex, + TResult Function(int length)? invalidPublicKeyHexLength, + TResult Function(String errorMessage)? unknownError, required TResult orElse(), }) { - if (hex != null) { - return hex(field0); + if (unknownVersion != null) { + return unknownVersion(version); } return orElse(); } @@ -4163,442 +3176,211 @@ class _$BdkError_HexImpl extends BdkError_Hex { @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, + required TResult Function(Bip32Error_CannotDeriveFromHardenedKey value) + cannotDeriveFromHardenedKey, + required TResult Function(Bip32Error_Secp256k1 value) secp256K1, + required TResult Function(Bip32Error_InvalidChildNumber value) + invalidChildNumber, + required TResult Function(Bip32Error_InvalidChildNumberFormat value) + invalidChildNumberFormat, + required TResult Function(Bip32Error_InvalidDerivationPathFormat value) + invalidDerivationPathFormat, + required TResult Function(Bip32Error_UnknownVersion value) unknownVersion, + required TResult Function(Bip32Error_WrongExtendedKeyLength value) + wrongExtendedKeyLength, + required TResult Function(Bip32Error_Base58 value) base58, + required TResult Function(Bip32Error_Hex value) hex, + required TResult Function(Bip32Error_InvalidPublicKeyHexLength value) + invalidPublicKeyHexLength, + required TResult Function(Bip32Error_UnknownError value) unknownError, }) { - return hex(this); + return unknownVersion(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult? Function(Bip32Error_CannotDeriveFromHardenedKey value)? + cannotDeriveFromHardenedKey, + TResult? Function(Bip32Error_Secp256k1 value)? secp256K1, + TResult? Function(Bip32Error_InvalidChildNumber value)? invalidChildNumber, + TResult? Function(Bip32Error_InvalidChildNumberFormat value)? + invalidChildNumberFormat, + TResult? Function(Bip32Error_InvalidDerivationPathFormat value)? + invalidDerivationPathFormat, + TResult? Function(Bip32Error_UnknownVersion value)? unknownVersion, + TResult? Function(Bip32Error_WrongExtendedKeyLength value)? + wrongExtendedKeyLength, + TResult? Function(Bip32Error_Base58 value)? base58, + TResult? Function(Bip32Error_Hex value)? hex, + TResult? Function(Bip32Error_InvalidPublicKeyHexLength value)? + invalidPublicKeyHexLength, + TResult? Function(Bip32Error_UnknownError value)? unknownError, }) { - return hex?.call(this); + return unknownVersion?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult Function(Bip32Error_CannotDeriveFromHardenedKey value)? + cannotDeriveFromHardenedKey, + TResult Function(Bip32Error_Secp256k1 value)? secp256K1, + TResult Function(Bip32Error_InvalidChildNumber value)? invalidChildNumber, + TResult Function(Bip32Error_InvalidChildNumberFormat value)? + invalidChildNumberFormat, + TResult Function(Bip32Error_InvalidDerivationPathFormat value)? + invalidDerivationPathFormat, + TResult Function(Bip32Error_UnknownVersion value)? unknownVersion, + TResult Function(Bip32Error_WrongExtendedKeyLength value)? + wrongExtendedKeyLength, + TResult Function(Bip32Error_Base58 value)? base58, + TResult Function(Bip32Error_Hex value)? hex, + TResult Function(Bip32Error_InvalidPublicKeyHexLength value)? + invalidPublicKeyHexLength, + TResult Function(Bip32Error_UnknownError value)? unknownError, required TResult orElse(), }) { - if (hex != null) { - return hex(this); + if (unknownVersion != null) { + return unknownVersion(this); } return orElse(); } } -abstract class BdkError_Hex extends BdkError { - const factory BdkError_Hex(final HexError field0) = _$BdkError_HexImpl; - const BdkError_Hex._() : super._(); +abstract class Bip32Error_UnknownVersion extends Bip32Error { + const factory Bip32Error_UnknownVersion({required final String version}) = + _$Bip32Error_UnknownVersionImpl; + const Bip32Error_UnknownVersion._() : super._(); - HexError get field0; + String get version; @JsonKey(ignore: true) - _$$BdkError_HexImplCopyWith<_$BdkError_HexImpl> get copyWith => - throw _privateConstructorUsedError; + _$$Bip32Error_UnknownVersionImplCopyWith<_$Bip32Error_UnknownVersionImpl> + get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$BdkError_ConsensusImplCopyWith<$Res> { - factory _$$BdkError_ConsensusImplCopyWith(_$BdkError_ConsensusImpl value, - $Res Function(_$BdkError_ConsensusImpl) then) = - __$$BdkError_ConsensusImplCopyWithImpl<$Res>; +abstract class _$$Bip32Error_WrongExtendedKeyLengthImplCopyWith<$Res> { + factory _$$Bip32Error_WrongExtendedKeyLengthImplCopyWith( + _$Bip32Error_WrongExtendedKeyLengthImpl value, + $Res Function(_$Bip32Error_WrongExtendedKeyLengthImpl) then) = + __$$Bip32Error_WrongExtendedKeyLengthImplCopyWithImpl<$Res>; @useResult - $Res call({ConsensusError field0}); - - $ConsensusErrorCopyWith<$Res> get field0; + $Res call({int length}); } /// @nodoc -class __$$BdkError_ConsensusImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_ConsensusImpl> - implements _$$BdkError_ConsensusImplCopyWith<$Res> { - __$$BdkError_ConsensusImplCopyWithImpl(_$BdkError_ConsensusImpl _value, - $Res Function(_$BdkError_ConsensusImpl) _then) +class __$$Bip32Error_WrongExtendedKeyLengthImplCopyWithImpl<$Res> + extends _$Bip32ErrorCopyWithImpl<$Res, + _$Bip32Error_WrongExtendedKeyLengthImpl> + implements _$$Bip32Error_WrongExtendedKeyLengthImplCopyWith<$Res> { + __$$Bip32Error_WrongExtendedKeyLengthImplCopyWithImpl( + _$Bip32Error_WrongExtendedKeyLengthImpl _value, + $Res Function(_$Bip32Error_WrongExtendedKeyLengthImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? field0 = null, + Object? length = null, }) { - return _then(_$BdkError_ConsensusImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as ConsensusError, + return _then(_$Bip32Error_WrongExtendedKeyLengthImpl( + length: null == length + ? _value.length + : length // ignore: cast_nullable_to_non_nullable + as int, )); } - - @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._(); +class _$Bip32Error_WrongExtendedKeyLengthImpl + extends Bip32Error_WrongExtendedKeyLength { + const _$Bip32Error_WrongExtendedKeyLengthImpl({required this.length}) + : super._(); @override - final ConsensusError field0; + final int length; @override String toString() { - return 'BdkError.consensus(field0: $field0)'; + return 'Bip32Error.wrongExtendedKeyLength(length: $length)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_ConsensusImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$Bip32Error_WrongExtendedKeyLengthImpl && + (identical(other.length, length) || other.length == length)); } @override - int get hashCode => Object.hash(runtimeType, field0); + int get hashCode => Object.hash(runtimeType, length); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$BdkError_ConsensusImplCopyWith<_$BdkError_ConsensusImpl> get copyWith => - __$$BdkError_ConsensusImplCopyWithImpl<_$BdkError_ConsensusImpl>( - this, _$identity); + _$$Bip32Error_WrongExtendedKeyLengthImplCopyWith< + _$Bip32Error_WrongExtendedKeyLengthImpl> + get copyWith => __$$Bip32Error_WrongExtendedKeyLengthImplCopyWithImpl< + _$Bip32Error_WrongExtendedKeyLengthImpl>(this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return consensus(field0); + required TResult Function() cannotDeriveFromHardenedKey, + required TResult Function(String errorMessage) secp256K1, + required TResult Function(int childNumber) invalidChildNumber, + required TResult Function() invalidChildNumberFormat, + required TResult Function() invalidDerivationPathFormat, + required TResult Function(String version) unknownVersion, + required TResult Function(int length) wrongExtendedKeyLength, + required TResult Function(String errorMessage) base58, + required TResult Function(String errorMessage) hex, + required TResult Function(int length) invalidPublicKeyHexLength, + required TResult Function(String errorMessage) unknownError, + }) { + return wrongExtendedKeyLength(length); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return consensus?.call(field0); + TResult? Function()? cannotDeriveFromHardenedKey, + TResult? Function(String errorMessage)? secp256K1, + TResult? Function(int childNumber)? invalidChildNumber, + TResult? Function()? invalidChildNumberFormat, + TResult? Function()? invalidDerivationPathFormat, + TResult? Function(String version)? unknownVersion, + TResult? Function(int length)? wrongExtendedKeyLength, + TResult? Function(String errorMessage)? base58, + TResult? Function(String errorMessage)? hex, + TResult? Function(int length)? invalidPublicKeyHexLength, + TResult? Function(String errorMessage)? unknownError, + }) { + return wrongExtendedKeyLength?.call(length); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (consensus != null) { - return consensus(field0); + TResult Function()? cannotDeriveFromHardenedKey, + TResult Function(String errorMessage)? secp256K1, + TResult Function(int childNumber)? invalidChildNumber, + TResult Function()? invalidChildNumberFormat, + TResult Function()? invalidDerivationPathFormat, + TResult Function(String version)? unknownVersion, + TResult Function(int length)? wrongExtendedKeyLength, + TResult Function(String errorMessage)? base58, + TResult Function(String errorMessage)? hex, + TResult Function(int length)? invalidPublicKeyHexLength, + TResult Function(String errorMessage)? unknownError, + required TResult orElse(), + }) { + if (wrongExtendedKeyLength != null) { + return wrongExtendedKeyLength(length); } return orElse(); } @@ -4606,235 +3388,116 @@ class _$BdkError_ConsensusImpl extends BdkError_Consensus { @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return consensus(this); + required TResult Function(Bip32Error_CannotDeriveFromHardenedKey value) + cannotDeriveFromHardenedKey, + required TResult Function(Bip32Error_Secp256k1 value) secp256K1, + required TResult Function(Bip32Error_InvalidChildNumber value) + invalidChildNumber, + required TResult Function(Bip32Error_InvalidChildNumberFormat value) + invalidChildNumberFormat, + required TResult Function(Bip32Error_InvalidDerivationPathFormat value) + invalidDerivationPathFormat, + required TResult Function(Bip32Error_UnknownVersion value) unknownVersion, + required TResult Function(Bip32Error_WrongExtendedKeyLength value) + wrongExtendedKeyLength, + required TResult Function(Bip32Error_Base58 value) base58, + required TResult Function(Bip32Error_Hex value) hex, + required TResult Function(Bip32Error_InvalidPublicKeyHexLength value) + invalidPublicKeyHexLength, + required TResult Function(Bip32Error_UnknownError value) unknownError, + }) { + return wrongExtendedKeyLength(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return consensus?.call(this); + TResult? Function(Bip32Error_CannotDeriveFromHardenedKey value)? + cannotDeriveFromHardenedKey, + TResult? Function(Bip32Error_Secp256k1 value)? secp256K1, + TResult? Function(Bip32Error_InvalidChildNumber value)? invalidChildNumber, + TResult? Function(Bip32Error_InvalidChildNumberFormat value)? + invalidChildNumberFormat, + TResult? Function(Bip32Error_InvalidDerivationPathFormat value)? + invalidDerivationPathFormat, + TResult? Function(Bip32Error_UnknownVersion value)? unknownVersion, + TResult? Function(Bip32Error_WrongExtendedKeyLength value)? + wrongExtendedKeyLength, + TResult? Function(Bip32Error_Base58 value)? base58, + TResult? Function(Bip32Error_Hex value)? hex, + TResult? Function(Bip32Error_InvalidPublicKeyHexLength value)? + invalidPublicKeyHexLength, + TResult? Function(Bip32Error_UnknownError value)? unknownError, + }) { + return wrongExtendedKeyLength?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (consensus != null) { - return consensus(this); - } - return orElse(); - } -} - -abstract class BdkError_Consensus extends BdkError { - const factory BdkError_Consensus(final ConsensusError field0) = - _$BdkError_ConsensusImpl; - const BdkError_Consensus._() : super._(); - - ConsensusError get field0; + TResult Function(Bip32Error_CannotDeriveFromHardenedKey value)? + cannotDeriveFromHardenedKey, + TResult Function(Bip32Error_Secp256k1 value)? secp256K1, + TResult Function(Bip32Error_InvalidChildNumber value)? invalidChildNumber, + TResult Function(Bip32Error_InvalidChildNumberFormat value)? + invalidChildNumberFormat, + TResult Function(Bip32Error_InvalidDerivationPathFormat value)? + invalidDerivationPathFormat, + TResult Function(Bip32Error_UnknownVersion value)? unknownVersion, + TResult Function(Bip32Error_WrongExtendedKeyLength value)? + wrongExtendedKeyLength, + TResult Function(Bip32Error_Base58 value)? base58, + TResult Function(Bip32Error_Hex value)? hex, + TResult Function(Bip32Error_InvalidPublicKeyHexLength value)? + invalidPublicKeyHexLength, + TResult Function(Bip32Error_UnknownError value)? unknownError, + required TResult orElse(), + }) { + if (wrongExtendedKeyLength != null) { + return wrongExtendedKeyLength(this); + } + return orElse(); + } +} + +abstract class Bip32Error_WrongExtendedKeyLength extends Bip32Error { + const factory Bip32Error_WrongExtendedKeyLength({required final int length}) = + _$Bip32Error_WrongExtendedKeyLengthImpl; + const Bip32Error_WrongExtendedKeyLength._() : super._(); + + int get length; @JsonKey(ignore: true) - _$$BdkError_ConsensusImplCopyWith<_$BdkError_ConsensusImpl> get copyWith => - throw _privateConstructorUsedError; + _$$Bip32Error_WrongExtendedKeyLengthImplCopyWith< + _$Bip32Error_WrongExtendedKeyLengthImpl> + get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$BdkError_VerifyTransactionImplCopyWith<$Res> { - factory _$$BdkError_VerifyTransactionImplCopyWith( - _$BdkError_VerifyTransactionImpl value, - $Res Function(_$BdkError_VerifyTransactionImpl) then) = - __$$BdkError_VerifyTransactionImplCopyWithImpl<$Res>; +abstract class _$$Bip32Error_Base58ImplCopyWith<$Res> { + factory _$$Bip32Error_Base58ImplCopyWith(_$Bip32Error_Base58Impl value, + $Res Function(_$Bip32Error_Base58Impl) then) = + __$$Bip32Error_Base58ImplCopyWithImpl<$Res>; @useResult - $Res call({String field0}); + $Res call({String errorMessage}); } /// @nodoc -class __$$BdkError_VerifyTransactionImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_VerifyTransactionImpl> - implements _$$BdkError_VerifyTransactionImplCopyWith<$Res> { - __$$BdkError_VerifyTransactionImplCopyWithImpl( - _$BdkError_VerifyTransactionImpl _value, - $Res Function(_$BdkError_VerifyTransactionImpl) _then) +class __$$Bip32Error_Base58ImplCopyWithImpl<$Res> + extends _$Bip32ErrorCopyWithImpl<$Res, _$Bip32Error_Base58Impl> + implements _$$Bip32Error_Base58ImplCopyWith<$Res> { + __$$Bip32Error_Base58ImplCopyWithImpl(_$Bip32Error_Base58Impl _value, + $Res Function(_$Bip32Error_Base58Impl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? field0 = null, + Object? errorMessage = null, }) { - return _then(_$BdkError_VerifyTransactionImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable + return _then(_$Bip32Error_Base58Impl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable as String, )); } @@ -4842,199 +3505,90 @@ class __$$BdkError_VerifyTransactionImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_VerifyTransactionImpl extends BdkError_VerifyTransaction { - const _$BdkError_VerifyTransactionImpl(this.field0) : super._(); +class _$Bip32Error_Base58Impl extends Bip32Error_Base58 { + const _$Bip32Error_Base58Impl({required this.errorMessage}) : super._(); @override - final String field0; + final String errorMessage; @override String toString() { - return 'BdkError.verifyTransaction(field0: $field0)'; + return 'Bip32Error.base58(errorMessage: $errorMessage)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_VerifyTransactionImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$Bip32Error_Base58Impl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); } @override - int get hashCode => Object.hash(runtimeType, field0); + int get hashCode => Object.hash(runtimeType, errorMessage); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$BdkError_VerifyTransactionImplCopyWith<_$BdkError_VerifyTransactionImpl> - get copyWith => __$$BdkError_VerifyTransactionImplCopyWithImpl< - _$BdkError_VerifyTransactionImpl>(this, _$identity); + _$$Bip32Error_Base58ImplCopyWith<_$Bip32Error_Base58Impl> get copyWith => + __$$Bip32Error_Base58ImplCopyWithImpl<_$Bip32Error_Base58Impl>( + this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return verifyTransaction(field0); + required TResult Function() cannotDeriveFromHardenedKey, + required TResult Function(String errorMessage) secp256K1, + required TResult Function(int childNumber) invalidChildNumber, + required TResult Function() invalidChildNumberFormat, + required TResult Function() invalidDerivationPathFormat, + required TResult Function(String version) unknownVersion, + required TResult Function(int length) wrongExtendedKeyLength, + required TResult Function(String errorMessage) base58, + required TResult Function(String errorMessage) hex, + required TResult Function(int length) invalidPublicKeyHexLength, + required TResult Function(String errorMessage) unknownError, + }) { + return base58(errorMessage); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return verifyTransaction?.call(field0); + TResult? Function()? cannotDeriveFromHardenedKey, + TResult? Function(String errorMessage)? secp256K1, + TResult? Function(int childNumber)? invalidChildNumber, + TResult? Function()? invalidChildNumberFormat, + TResult? Function()? invalidDerivationPathFormat, + TResult? Function(String version)? unknownVersion, + TResult? Function(int length)? wrongExtendedKeyLength, + TResult? Function(String errorMessage)? base58, + TResult? Function(String errorMessage)? hex, + TResult? Function(int length)? invalidPublicKeyHexLength, + TResult? Function(String errorMessage)? unknownError, + }) { + return base58?.call(errorMessage); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (verifyTransaction != null) { - return verifyTransaction(field0); + TResult Function()? cannotDeriveFromHardenedKey, + TResult Function(String errorMessage)? secp256K1, + TResult Function(int childNumber)? invalidChildNumber, + TResult Function()? invalidChildNumberFormat, + TResult Function()? invalidDerivationPathFormat, + TResult Function(String version)? unknownVersion, + TResult Function(int length)? wrongExtendedKeyLength, + TResult Function(String errorMessage)? base58, + TResult Function(String errorMessage)? hex, + TResult Function(int length)? invalidPublicKeyHexLength, + TResult Function(String errorMessage)? unknownError, + required TResult orElse(), + }) { + if (base58 != null) { + return base58(errorMessage); } return orElse(); } @@ -5042,443 +3596,206 @@ class _$BdkError_VerifyTransactionImpl extends BdkError_VerifyTransaction { @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return verifyTransaction(this); + required TResult Function(Bip32Error_CannotDeriveFromHardenedKey value) + cannotDeriveFromHardenedKey, + required TResult Function(Bip32Error_Secp256k1 value) secp256K1, + required TResult Function(Bip32Error_InvalidChildNumber value) + invalidChildNumber, + required TResult Function(Bip32Error_InvalidChildNumberFormat value) + invalidChildNumberFormat, + required TResult Function(Bip32Error_InvalidDerivationPathFormat value) + invalidDerivationPathFormat, + required TResult Function(Bip32Error_UnknownVersion value) unknownVersion, + required TResult Function(Bip32Error_WrongExtendedKeyLength value) + wrongExtendedKeyLength, + required TResult Function(Bip32Error_Base58 value) base58, + required TResult Function(Bip32Error_Hex value) hex, + required TResult Function(Bip32Error_InvalidPublicKeyHexLength value) + invalidPublicKeyHexLength, + required TResult Function(Bip32Error_UnknownError value) unknownError, + }) { + return base58(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return verifyTransaction?.call(this); + TResult? Function(Bip32Error_CannotDeriveFromHardenedKey value)? + cannotDeriveFromHardenedKey, + TResult? Function(Bip32Error_Secp256k1 value)? secp256K1, + TResult? Function(Bip32Error_InvalidChildNumber value)? invalidChildNumber, + TResult? Function(Bip32Error_InvalidChildNumberFormat value)? + invalidChildNumberFormat, + TResult? Function(Bip32Error_InvalidDerivationPathFormat value)? + invalidDerivationPathFormat, + TResult? Function(Bip32Error_UnknownVersion value)? unknownVersion, + TResult? Function(Bip32Error_WrongExtendedKeyLength value)? + wrongExtendedKeyLength, + TResult? Function(Bip32Error_Base58 value)? base58, + TResult? Function(Bip32Error_Hex value)? hex, + TResult? Function(Bip32Error_InvalidPublicKeyHexLength value)? + invalidPublicKeyHexLength, + TResult? Function(Bip32Error_UnknownError value)? unknownError, + }) { + return base58?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (verifyTransaction != null) { - return verifyTransaction(this); - } - return orElse(); - } -} - -abstract class BdkError_VerifyTransaction extends BdkError { - const factory BdkError_VerifyTransaction(final String field0) = - _$BdkError_VerifyTransactionImpl; - const BdkError_VerifyTransaction._() : super._(); - - String get field0; + TResult Function(Bip32Error_CannotDeriveFromHardenedKey value)? + cannotDeriveFromHardenedKey, + TResult Function(Bip32Error_Secp256k1 value)? secp256K1, + TResult Function(Bip32Error_InvalidChildNumber value)? invalidChildNumber, + TResult Function(Bip32Error_InvalidChildNumberFormat value)? + invalidChildNumberFormat, + TResult Function(Bip32Error_InvalidDerivationPathFormat value)? + invalidDerivationPathFormat, + TResult Function(Bip32Error_UnknownVersion value)? unknownVersion, + TResult Function(Bip32Error_WrongExtendedKeyLength value)? + wrongExtendedKeyLength, + TResult Function(Bip32Error_Base58 value)? base58, + TResult Function(Bip32Error_Hex value)? hex, + TResult Function(Bip32Error_InvalidPublicKeyHexLength value)? + invalidPublicKeyHexLength, + TResult Function(Bip32Error_UnknownError value)? unknownError, + required TResult orElse(), + }) { + if (base58 != null) { + return base58(this); + } + return orElse(); + } +} + +abstract class Bip32Error_Base58 extends Bip32Error { + const factory Bip32Error_Base58({required final String errorMessage}) = + _$Bip32Error_Base58Impl; + const Bip32Error_Base58._() : super._(); + + String get errorMessage; @JsonKey(ignore: true) - _$$BdkError_VerifyTransactionImplCopyWith<_$BdkError_VerifyTransactionImpl> - get copyWith => throw _privateConstructorUsedError; + _$$Bip32Error_Base58ImplCopyWith<_$Bip32Error_Base58Impl> get copyWith => + throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$BdkError_AddressImplCopyWith<$Res> { - factory _$$BdkError_AddressImplCopyWith(_$BdkError_AddressImpl value, - $Res Function(_$BdkError_AddressImpl) then) = - __$$BdkError_AddressImplCopyWithImpl<$Res>; +abstract class _$$Bip32Error_HexImplCopyWith<$Res> { + factory _$$Bip32Error_HexImplCopyWith(_$Bip32Error_HexImpl value, + $Res Function(_$Bip32Error_HexImpl) then) = + __$$Bip32Error_HexImplCopyWithImpl<$Res>; @useResult - $Res call({AddressError field0}); - - $AddressErrorCopyWith<$Res> get field0; + $Res call({String errorMessage}); } /// @nodoc -class __$$BdkError_AddressImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_AddressImpl> - implements _$$BdkError_AddressImplCopyWith<$Res> { - __$$BdkError_AddressImplCopyWithImpl(_$BdkError_AddressImpl _value, - $Res Function(_$BdkError_AddressImpl) _then) +class __$$Bip32Error_HexImplCopyWithImpl<$Res> + extends _$Bip32ErrorCopyWithImpl<$Res, _$Bip32Error_HexImpl> + implements _$$Bip32Error_HexImplCopyWith<$Res> { + __$$Bip32Error_HexImplCopyWithImpl( + _$Bip32Error_HexImpl _value, $Res Function(_$Bip32Error_HexImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? field0 = null, + Object? errorMessage = null, }) { - return _then(_$BdkError_AddressImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as AddressError, + return _then(_$Bip32Error_HexImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, )); } - - @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._(); +class _$Bip32Error_HexImpl extends Bip32Error_Hex { + const _$Bip32Error_HexImpl({required this.errorMessage}) : super._(); @override - final AddressError field0; + final String errorMessage; @override String toString() { - return 'BdkError.address(field0: $field0)'; + return 'Bip32Error.hex(errorMessage: $errorMessage)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_AddressImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$Bip32Error_HexImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); } @override - int get hashCode => Object.hash(runtimeType, field0); + int get hashCode => Object.hash(runtimeType, errorMessage); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$BdkError_AddressImplCopyWith<_$BdkError_AddressImpl> get copyWith => - __$$BdkError_AddressImplCopyWithImpl<_$BdkError_AddressImpl>( + _$$Bip32Error_HexImplCopyWith<_$Bip32Error_HexImpl> get copyWith => + __$$Bip32Error_HexImplCopyWithImpl<_$Bip32Error_HexImpl>( this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return address(field0); + required TResult Function() cannotDeriveFromHardenedKey, + required TResult Function(String errorMessage) secp256K1, + required TResult Function(int childNumber) invalidChildNumber, + required TResult Function() invalidChildNumberFormat, + required TResult Function() invalidDerivationPathFormat, + required TResult Function(String version) unknownVersion, + required TResult Function(int length) wrongExtendedKeyLength, + required TResult Function(String errorMessage) base58, + required TResult Function(String errorMessage) hex, + required TResult Function(int length) invalidPublicKeyHexLength, + required TResult Function(String errorMessage) unknownError, + }) { + return hex(errorMessage); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return address?.call(field0); + TResult? Function()? cannotDeriveFromHardenedKey, + TResult? Function(String errorMessage)? secp256K1, + TResult? Function(int childNumber)? invalidChildNumber, + TResult? Function()? invalidChildNumberFormat, + TResult? Function()? invalidDerivationPathFormat, + TResult? Function(String version)? unknownVersion, + TResult? Function(int length)? wrongExtendedKeyLength, + TResult? Function(String errorMessage)? base58, + TResult? Function(String errorMessage)? hex, + TResult? Function(int length)? invalidPublicKeyHexLength, + TResult? Function(String errorMessage)? unknownError, + }) { + return hex?.call(errorMessage); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (address != null) { - return address(field0); + TResult Function()? cannotDeriveFromHardenedKey, + TResult Function(String errorMessage)? secp256K1, + TResult Function(int childNumber)? invalidChildNumber, + TResult Function()? invalidChildNumberFormat, + TResult Function()? invalidDerivationPathFormat, + TResult Function(String version)? unknownVersion, + TResult Function(int length)? wrongExtendedKeyLength, + TResult Function(String errorMessage)? base58, + TResult Function(String errorMessage)? hex, + TResult Function(int length)? invalidPublicKeyHexLength, + TResult Function(String errorMessage)? unknownError, + required TResult orElse(), + }) { + if (hex != null) { + return hex(errorMessage); } return orElse(); } @@ -5486,443 +3803,211 @@ class _$BdkError_AddressImpl extends BdkError_Address { @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return address(this); + required TResult Function(Bip32Error_CannotDeriveFromHardenedKey value) + cannotDeriveFromHardenedKey, + required TResult Function(Bip32Error_Secp256k1 value) secp256K1, + required TResult Function(Bip32Error_InvalidChildNumber value) + invalidChildNumber, + required TResult Function(Bip32Error_InvalidChildNumberFormat value) + invalidChildNumberFormat, + required TResult Function(Bip32Error_InvalidDerivationPathFormat value) + invalidDerivationPathFormat, + required TResult Function(Bip32Error_UnknownVersion value) unknownVersion, + required TResult Function(Bip32Error_WrongExtendedKeyLength value) + wrongExtendedKeyLength, + required TResult Function(Bip32Error_Base58 value) base58, + required TResult Function(Bip32Error_Hex value) hex, + required TResult Function(Bip32Error_InvalidPublicKeyHexLength value) + invalidPublicKeyHexLength, + required TResult Function(Bip32Error_UnknownError value) unknownError, + }) { + return hex(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return address?.call(this); + TResult? Function(Bip32Error_CannotDeriveFromHardenedKey value)? + cannotDeriveFromHardenedKey, + TResult? Function(Bip32Error_Secp256k1 value)? secp256K1, + TResult? Function(Bip32Error_InvalidChildNumber value)? invalidChildNumber, + TResult? Function(Bip32Error_InvalidChildNumberFormat value)? + invalidChildNumberFormat, + TResult? Function(Bip32Error_InvalidDerivationPathFormat value)? + invalidDerivationPathFormat, + TResult? Function(Bip32Error_UnknownVersion value)? unknownVersion, + TResult? Function(Bip32Error_WrongExtendedKeyLength value)? + wrongExtendedKeyLength, + TResult? Function(Bip32Error_Base58 value)? base58, + TResult? Function(Bip32Error_Hex value)? hex, + TResult? Function(Bip32Error_InvalidPublicKeyHexLength value)? + invalidPublicKeyHexLength, + TResult? Function(Bip32Error_UnknownError value)? unknownError, + }) { + return hex?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (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; -} + TResult Function(Bip32Error_CannotDeriveFromHardenedKey value)? + cannotDeriveFromHardenedKey, + TResult Function(Bip32Error_Secp256k1 value)? secp256K1, + TResult Function(Bip32Error_InvalidChildNumber value)? invalidChildNumber, + TResult Function(Bip32Error_InvalidChildNumberFormat value)? + invalidChildNumberFormat, + TResult Function(Bip32Error_InvalidDerivationPathFormat value)? + invalidDerivationPathFormat, + TResult Function(Bip32Error_UnknownVersion value)? unknownVersion, + TResult Function(Bip32Error_WrongExtendedKeyLength value)? + wrongExtendedKeyLength, + TResult Function(Bip32Error_Base58 value)? base58, + TResult Function(Bip32Error_Hex value)? hex, + TResult Function(Bip32Error_InvalidPublicKeyHexLength value)? + invalidPublicKeyHexLength, + TResult Function(Bip32Error_UnknownError value)? unknownError, + required TResult orElse(), + }) { + if (hex != null) { + return hex(this); + } + return orElse(); + } +} + +abstract class Bip32Error_Hex extends Bip32Error { + const factory Bip32Error_Hex({required final String errorMessage}) = + _$Bip32Error_HexImpl; + const Bip32Error_Hex._() : super._(); + + String get errorMessage; + @JsonKey(ignore: true) + _$$Bip32Error_HexImplCopyWith<_$Bip32Error_HexImpl> get copyWith => + throw _privateConstructorUsedError; +} /// @nodoc -abstract class _$$BdkError_DescriptorImplCopyWith<$Res> { - factory _$$BdkError_DescriptorImplCopyWith(_$BdkError_DescriptorImpl value, - $Res Function(_$BdkError_DescriptorImpl) then) = - __$$BdkError_DescriptorImplCopyWithImpl<$Res>; +abstract class _$$Bip32Error_InvalidPublicKeyHexLengthImplCopyWith<$Res> { + factory _$$Bip32Error_InvalidPublicKeyHexLengthImplCopyWith( + _$Bip32Error_InvalidPublicKeyHexLengthImpl value, + $Res Function(_$Bip32Error_InvalidPublicKeyHexLengthImpl) then) = + __$$Bip32Error_InvalidPublicKeyHexLengthImplCopyWithImpl<$Res>; @useResult - $Res call({DescriptorError field0}); - - $DescriptorErrorCopyWith<$Res> get field0; + $Res call({int length}); } /// @nodoc -class __$$BdkError_DescriptorImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_DescriptorImpl> - implements _$$BdkError_DescriptorImplCopyWith<$Res> { - __$$BdkError_DescriptorImplCopyWithImpl(_$BdkError_DescriptorImpl _value, - $Res Function(_$BdkError_DescriptorImpl) _then) +class __$$Bip32Error_InvalidPublicKeyHexLengthImplCopyWithImpl<$Res> + extends _$Bip32ErrorCopyWithImpl<$Res, + _$Bip32Error_InvalidPublicKeyHexLengthImpl> + implements _$$Bip32Error_InvalidPublicKeyHexLengthImplCopyWith<$Res> { + __$$Bip32Error_InvalidPublicKeyHexLengthImplCopyWithImpl( + _$Bip32Error_InvalidPublicKeyHexLengthImpl _value, + $Res Function(_$Bip32Error_InvalidPublicKeyHexLengthImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? field0 = null, + Object? length = null, }) { - return _then(_$BdkError_DescriptorImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as DescriptorError, + return _then(_$Bip32Error_InvalidPublicKeyHexLengthImpl( + length: null == length + ? _value.length + : length // ignore: cast_nullable_to_non_nullable + as int, )); } - - @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._(); +class _$Bip32Error_InvalidPublicKeyHexLengthImpl + extends Bip32Error_InvalidPublicKeyHexLength { + const _$Bip32Error_InvalidPublicKeyHexLengthImpl({required this.length}) + : super._(); @override - final DescriptorError field0; + final int length; @override String toString() { - return 'BdkError.descriptor(field0: $field0)'; + return 'Bip32Error.invalidPublicKeyHexLength(length: $length)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_DescriptorImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$Bip32Error_InvalidPublicKeyHexLengthImpl && + (identical(other.length, length) || other.length == length)); } @override - int get hashCode => Object.hash(runtimeType, field0); + int get hashCode => Object.hash(runtimeType, length); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$BdkError_DescriptorImplCopyWith<_$BdkError_DescriptorImpl> get copyWith => - __$$BdkError_DescriptorImplCopyWithImpl<_$BdkError_DescriptorImpl>( - this, _$identity); + _$$Bip32Error_InvalidPublicKeyHexLengthImplCopyWith< + _$Bip32Error_InvalidPublicKeyHexLengthImpl> + get copyWith => __$$Bip32Error_InvalidPublicKeyHexLengthImplCopyWithImpl< + _$Bip32Error_InvalidPublicKeyHexLengthImpl>(this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return descriptor(field0); + required TResult Function() cannotDeriveFromHardenedKey, + required TResult Function(String errorMessage) secp256K1, + required TResult Function(int childNumber) invalidChildNumber, + required TResult Function() invalidChildNumberFormat, + required TResult Function() invalidDerivationPathFormat, + required TResult Function(String version) unknownVersion, + required TResult Function(int length) wrongExtendedKeyLength, + required TResult Function(String errorMessage) base58, + required TResult Function(String errorMessage) hex, + required TResult Function(int length) invalidPublicKeyHexLength, + required TResult Function(String errorMessage) unknownError, + }) { + return invalidPublicKeyHexLength(length); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return descriptor?.call(field0); + TResult? Function()? cannotDeriveFromHardenedKey, + TResult? Function(String errorMessage)? secp256K1, + TResult? Function(int childNumber)? invalidChildNumber, + TResult? Function()? invalidChildNumberFormat, + TResult? Function()? invalidDerivationPathFormat, + TResult? Function(String version)? unknownVersion, + TResult? Function(int length)? wrongExtendedKeyLength, + TResult? Function(String errorMessage)? base58, + TResult? Function(String errorMessage)? hex, + TResult? Function(int length)? invalidPublicKeyHexLength, + TResult? Function(String errorMessage)? unknownError, + }) { + return invalidPublicKeyHexLength?.call(length); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, + TResult Function()? cannotDeriveFromHardenedKey, + TResult Function(String errorMessage)? secp256K1, + TResult Function(int childNumber)? invalidChildNumber, + TResult Function()? invalidChildNumberFormat, + TResult Function()? invalidDerivationPathFormat, + TResult Function(String version)? unknownVersion, + TResult Function(int length)? wrongExtendedKeyLength, + TResult Function(String errorMessage)? base58, + TResult Function(String errorMessage)? hex, + TResult Function(int length)? invalidPublicKeyHexLength, + TResult Function(String errorMessage)? unknownError, required TResult orElse(), }) { - if (descriptor != null) { - return descriptor(field0); + if (invalidPublicKeyHexLength != null) { + return invalidPublicKeyHexLength(length); } return orElse(); } @@ -5930,436 +4015,209 @@ class _$BdkError_DescriptorImpl extends BdkError_Descriptor { @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, + required TResult Function(Bip32Error_CannotDeriveFromHardenedKey value) + cannotDeriveFromHardenedKey, + required TResult Function(Bip32Error_Secp256k1 value) secp256K1, + required TResult Function(Bip32Error_InvalidChildNumber value) + invalidChildNumber, + required TResult Function(Bip32Error_InvalidChildNumberFormat value) + invalidChildNumberFormat, + required TResult Function(Bip32Error_InvalidDerivationPathFormat value) + invalidDerivationPathFormat, + required TResult Function(Bip32Error_UnknownVersion value) unknownVersion, + required TResult Function(Bip32Error_WrongExtendedKeyLength value) + wrongExtendedKeyLength, + required TResult Function(Bip32Error_Base58 value) base58, + required TResult Function(Bip32Error_Hex value) hex, + required TResult Function(Bip32Error_InvalidPublicKeyHexLength value) + invalidPublicKeyHexLength, + required TResult Function(Bip32Error_UnknownError value) unknownError, }) { - return descriptor(this); + return invalidPublicKeyHexLength(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult? Function(Bip32Error_CannotDeriveFromHardenedKey value)? + cannotDeriveFromHardenedKey, + TResult? Function(Bip32Error_Secp256k1 value)? secp256K1, + TResult? Function(Bip32Error_InvalidChildNumber value)? invalidChildNumber, + TResult? Function(Bip32Error_InvalidChildNumberFormat value)? + invalidChildNumberFormat, + TResult? Function(Bip32Error_InvalidDerivationPathFormat value)? + invalidDerivationPathFormat, + TResult? Function(Bip32Error_UnknownVersion value)? unknownVersion, + TResult? Function(Bip32Error_WrongExtendedKeyLength value)? + wrongExtendedKeyLength, + TResult? Function(Bip32Error_Base58 value)? base58, + TResult? Function(Bip32Error_Hex value)? hex, + TResult? Function(Bip32Error_InvalidPublicKeyHexLength value)? + invalidPublicKeyHexLength, + TResult? Function(Bip32Error_UnknownError value)? unknownError, }) { - return descriptor?.call(this); + return invalidPublicKeyHexLength?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult Function(Bip32Error_CannotDeriveFromHardenedKey value)? + cannotDeriveFromHardenedKey, + TResult Function(Bip32Error_Secp256k1 value)? secp256K1, + TResult Function(Bip32Error_InvalidChildNumber value)? invalidChildNumber, + TResult Function(Bip32Error_InvalidChildNumberFormat value)? + invalidChildNumberFormat, + TResult Function(Bip32Error_InvalidDerivationPathFormat value)? + invalidDerivationPathFormat, + TResult Function(Bip32Error_UnknownVersion value)? unknownVersion, + TResult Function(Bip32Error_WrongExtendedKeyLength value)? + wrongExtendedKeyLength, + TResult Function(Bip32Error_Base58 value)? base58, + TResult Function(Bip32Error_Hex value)? hex, + TResult Function(Bip32Error_InvalidPublicKeyHexLength value)? + invalidPublicKeyHexLength, + TResult Function(Bip32Error_UnknownError value)? unknownError, required TResult orElse(), }) { - if (descriptor != null) { - return descriptor(this); + if (invalidPublicKeyHexLength != null) { + return invalidPublicKeyHexLength(this); } return orElse(); } } -abstract class BdkError_Descriptor extends BdkError { - const factory BdkError_Descriptor(final DescriptorError field0) = - _$BdkError_DescriptorImpl; - const BdkError_Descriptor._() : super._(); +abstract class Bip32Error_InvalidPublicKeyHexLength extends Bip32Error { + const factory Bip32Error_InvalidPublicKeyHexLength( + {required final int length}) = _$Bip32Error_InvalidPublicKeyHexLengthImpl; + const Bip32Error_InvalidPublicKeyHexLength._() : super._(); - DescriptorError get field0; + int get length; @JsonKey(ignore: true) - _$$BdkError_DescriptorImplCopyWith<_$BdkError_DescriptorImpl> get copyWith => - throw _privateConstructorUsedError; + _$$Bip32Error_InvalidPublicKeyHexLengthImplCopyWith< + _$Bip32Error_InvalidPublicKeyHexLengthImpl> + get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$BdkError_InvalidU32BytesImplCopyWith<$Res> { - factory _$$BdkError_InvalidU32BytesImplCopyWith( - _$BdkError_InvalidU32BytesImpl value, - $Res Function(_$BdkError_InvalidU32BytesImpl) then) = - __$$BdkError_InvalidU32BytesImplCopyWithImpl<$Res>; +abstract class _$$Bip32Error_UnknownErrorImplCopyWith<$Res> { + factory _$$Bip32Error_UnknownErrorImplCopyWith( + _$Bip32Error_UnknownErrorImpl value, + $Res Function(_$Bip32Error_UnknownErrorImpl) then) = + __$$Bip32Error_UnknownErrorImplCopyWithImpl<$Res>; @useResult - $Res call({Uint8List field0}); + $Res call({String errorMessage}); } /// @nodoc -class __$$BdkError_InvalidU32BytesImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_InvalidU32BytesImpl> - implements _$$BdkError_InvalidU32BytesImplCopyWith<$Res> { - __$$BdkError_InvalidU32BytesImplCopyWithImpl( - _$BdkError_InvalidU32BytesImpl _value, - $Res Function(_$BdkError_InvalidU32BytesImpl) _then) +class __$$Bip32Error_UnknownErrorImplCopyWithImpl<$Res> + extends _$Bip32ErrorCopyWithImpl<$Res, _$Bip32Error_UnknownErrorImpl> + implements _$$Bip32Error_UnknownErrorImplCopyWith<$Res> { + __$$Bip32Error_UnknownErrorImplCopyWithImpl( + _$Bip32Error_UnknownErrorImpl _value, + $Res Function(_$Bip32Error_UnknownErrorImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? field0 = null, + Object? errorMessage = null, }) { - return _then(_$BdkError_InvalidU32BytesImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as Uint8List, + return _then(_$Bip32Error_UnknownErrorImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, )); } } /// @nodoc -class _$BdkError_InvalidU32BytesImpl extends BdkError_InvalidU32Bytes { - const _$BdkError_InvalidU32BytesImpl(this.field0) : super._(); +class _$Bip32Error_UnknownErrorImpl extends Bip32Error_UnknownError { + const _$Bip32Error_UnknownErrorImpl({required this.errorMessage}) : super._(); @override - final Uint8List field0; + final String errorMessage; @override String toString() { - return 'BdkError.invalidU32Bytes(field0: $field0)'; + return 'Bip32Error.unknownError(errorMessage: $errorMessage)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_InvalidU32BytesImpl && - const DeepCollectionEquality().equals(other.field0, field0)); + other is _$Bip32Error_UnknownErrorImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); } @override - int get hashCode => - Object.hash(runtimeType, const DeepCollectionEquality().hash(field0)); + int get hashCode => Object.hash(runtimeType, errorMessage); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$BdkError_InvalidU32BytesImplCopyWith<_$BdkError_InvalidU32BytesImpl> - get copyWith => __$$BdkError_InvalidU32BytesImplCopyWithImpl< - _$BdkError_InvalidU32BytesImpl>(this, _$identity); + _$$Bip32Error_UnknownErrorImplCopyWith<_$Bip32Error_UnknownErrorImpl> + get copyWith => __$$Bip32Error_UnknownErrorImplCopyWithImpl< + _$Bip32Error_UnknownErrorImpl>(this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return invalidU32Bytes(field0); + required TResult Function() cannotDeriveFromHardenedKey, + required TResult Function(String errorMessage) secp256K1, + required TResult Function(int childNumber) invalidChildNumber, + required TResult Function() invalidChildNumberFormat, + required TResult Function() invalidDerivationPathFormat, + required TResult Function(String version) unknownVersion, + required TResult Function(int length) wrongExtendedKeyLength, + required TResult Function(String errorMessage) base58, + required TResult Function(String errorMessage) hex, + required TResult Function(int length) invalidPublicKeyHexLength, + required TResult Function(String errorMessage) unknownError, + }) { + return unknownError(errorMessage); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return invalidU32Bytes?.call(field0); + TResult? Function()? cannotDeriveFromHardenedKey, + TResult? Function(String errorMessage)? secp256K1, + TResult? Function(int childNumber)? invalidChildNumber, + TResult? Function()? invalidChildNumberFormat, + TResult? Function()? invalidDerivationPathFormat, + TResult? Function(String version)? unknownVersion, + TResult? Function(int length)? wrongExtendedKeyLength, + TResult? Function(String errorMessage)? base58, + TResult? Function(String errorMessage)? hex, + TResult? Function(int length)? invalidPublicKeyHexLength, + TResult? Function(String errorMessage)? unknownError, + }) { + return unknownError?.call(errorMessage); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (invalidU32Bytes != null) { - return invalidU32Bytes(field0); + TResult Function()? cannotDeriveFromHardenedKey, + TResult Function(String errorMessage)? secp256K1, + TResult Function(int childNumber)? invalidChildNumber, + TResult Function()? invalidChildNumberFormat, + TResult Function()? invalidDerivationPathFormat, + TResult Function(String version)? unknownVersion, + TResult Function(int length)? wrongExtendedKeyLength, + TResult Function(String errorMessage)? base58, + TResult Function(String errorMessage)? hex, + TResult Function(int length)? invalidPublicKeyHexLength, + TResult Function(String errorMessage)? unknownError, + required TResult orElse(), + }) { + if (unknownError != null) { + return unknownError(errorMessage); } return orElse(); } @@ -6367,433 +4225,279 @@ class _$BdkError_InvalidU32BytesImpl extends BdkError_InvalidU32Bytes { @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return invalidU32Bytes(this); + required TResult Function(Bip32Error_CannotDeriveFromHardenedKey value) + cannotDeriveFromHardenedKey, + required TResult Function(Bip32Error_Secp256k1 value) secp256K1, + required TResult Function(Bip32Error_InvalidChildNumber value) + invalidChildNumber, + required TResult Function(Bip32Error_InvalidChildNumberFormat value) + invalidChildNumberFormat, + required TResult Function(Bip32Error_InvalidDerivationPathFormat value) + invalidDerivationPathFormat, + required TResult Function(Bip32Error_UnknownVersion value) unknownVersion, + required TResult Function(Bip32Error_WrongExtendedKeyLength value) + wrongExtendedKeyLength, + required TResult Function(Bip32Error_Base58 value) base58, + required TResult Function(Bip32Error_Hex value) hex, + required TResult Function(Bip32Error_InvalidPublicKeyHexLength value) + invalidPublicKeyHexLength, + required TResult Function(Bip32Error_UnknownError value) unknownError, + }) { + return unknownError(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return invalidU32Bytes?.call(this); + TResult? Function(Bip32Error_CannotDeriveFromHardenedKey value)? + cannotDeriveFromHardenedKey, + TResult? Function(Bip32Error_Secp256k1 value)? secp256K1, + TResult? Function(Bip32Error_InvalidChildNumber value)? invalidChildNumber, + TResult? Function(Bip32Error_InvalidChildNumberFormat value)? + invalidChildNumberFormat, + TResult? Function(Bip32Error_InvalidDerivationPathFormat value)? + invalidDerivationPathFormat, + TResult? Function(Bip32Error_UnknownVersion value)? unknownVersion, + TResult? Function(Bip32Error_WrongExtendedKeyLength value)? + wrongExtendedKeyLength, + TResult? Function(Bip32Error_Base58 value)? base58, + TResult? Function(Bip32Error_Hex value)? hex, + TResult? Function(Bip32Error_InvalidPublicKeyHexLength value)? + invalidPublicKeyHexLength, + TResult? Function(Bip32Error_UnknownError value)? unknownError, + }) { + return unknownError?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (invalidU32Bytes != null) { - return invalidU32Bytes(this); - } - return orElse(); - } -} - -abstract class BdkError_InvalidU32Bytes extends BdkError { - const factory BdkError_InvalidU32Bytes(final Uint8List field0) = - _$BdkError_InvalidU32BytesImpl; - const BdkError_InvalidU32Bytes._() : super._(); - - Uint8List get field0; + TResult Function(Bip32Error_CannotDeriveFromHardenedKey value)? + cannotDeriveFromHardenedKey, + TResult Function(Bip32Error_Secp256k1 value)? secp256K1, + TResult Function(Bip32Error_InvalidChildNumber value)? invalidChildNumber, + TResult Function(Bip32Error_InvalidChildNumberFormat value)? + invalidChildNumberFormat, + TResult Function(Bip32Error_InvalidDerivationPathFormat value)? + invalidDerivationPathFormat, + TResult Function(Bip32Error_UnknownVersion value)? unknownVersion, + TResult Function(Bip32Error_WrongExtendedKeyLength value)? + wrongExtendedKeyLength, + TResult Function(Bip32Error_Base58 value)? base58, + TResult Function(Bip32Error_Hex value)? hex, + TResult Function(Bip32Error_InvalidPublicKeyHexLength value)? + invalidPublicKeyHexLength, + TResult Function(Bip32Error_UnknownError value)? unknownError, + required TResult orElse(), + }) { + if (unknownError != null) { + return unknownError(this); + } + return orElse(); + } +} + +abstract class Bip32Error_UnknownError extends Bip32Error { + const factory Bip32Error_UnknownError({required final String errorMessage}) = + _$Bip32Error_UnknownErrorImpl; + const Bip32Error_UnknownError._() : super._(); + + String get errorMessage; @JsonKey(ignore: true) - _$$BdkError_InvalidU32BytesImplCopyWith<_$BdkError_InvalidU32BytesImpl> + _$$Bip32Error_UnknownErrorImplCopyWith<_$Bip32Error_UnknownErrorImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$BdkError_GenericImplCopyWith<$Res> { - factory _$$BdkError_GenericImplCopyWith(_$BdkError_GenericImpl value, - $Res Function(_$BdkError_GenericImpl) then) = - __$$BdkError_GenericImplCopyWithImpl<$Res>; +mixin _$Bip39Error { + @optionalTypeArgs + TResult when({ + required TResult Function(BigInt wordCount) badWordCount, + required TResult Function(BigInt index) unknownWord, + required TResult Function(BigInt bitCount) badEntropyBitCount, + required TResult Function() invalidChecksum, + required TResult Function(String languages) ambiguousLanguages, + required TResult Function(String errorMessage) generic, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(BigInt wordCount)? badWordCount, + TResult? Function(BigInt index)? unknownWord, + TResult? Function(BigInt bitCount)? badEntropyBitCount, + TResult? Function()? invalidChecksum, + TResult? Function(String languages)? ambiguousLanguages, + TResult? Function(String errorMessage)? generic, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(BigInt wordCount)? badWordCount, + TResult Function(BigInt index)? unknownWord, + TResult Function(BigInt bitCount)? badEntropyBitCount, + TResult Function()? invalidChecksum, + TResult Function(String languages)? ambiguousLanguages, + TResult Function(String errorMessage)? generic, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(Bip39Error_BadWordCount value) badWordCount, + required TResult Function(Bip39Error_UnknownWord value) unknownWord, + required TResult Function(Bip39Error_BadEntropyBitCount value) + badEntropyBitCount, + required TResult Function(Bip39Error_InvalidChecksum value) invalidChecksum, + required TResult Function(Bip39Error_AmbiguousLanguages value) + ambiguousLanguages, + required TResult Function(Bip39Error_Generic value) generic, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(Bip39Error_BadWordCount value)? badWordCount, + TResult? Function(Bip39Error_UnknownWord value)? unknownWord, + TResult? Function(Bip39Error_BadEntropyBitCount value)? badEntropyBitCount, + TResult? Function(Bip39Error_InvalidChecksum value)? invalidChecksum, + TResult? Function(Bip39Error_AmbiguousLanguages value)? ambiguousLanguages, + TResult? Function(Bip39Error_Generic value)? generic, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(Bip39Error_BadWordCount value)? badWordCount, + TResult Function(Bip39Error_UnknownWord value)? unknownWord, + TResult Function(Bip39Error_BadEntropyBitCount value)? badEntropyBitCount, + TResult Function(Bip39Error_InvalidChecksum value)? invalidChecksum, + TResult Function(Bip39Error_AmbiguousLanguages value)? ambiguousLanguages, + TResult Function(Bip39Error_Generic value)? generic, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $Bip39ErrorCopyWith<$Res> { + factory $Bip39ErrorCopyWith( + Bip39Error value, $Res Function(Bip39Error) then) = + _$Bip39ErrorCopyWithImpl<$Res, Bip39Error>; +} + +/// @nodoc +class _$Bip39ErrorCopyWithImpl<$Res, $Val extends Bip39Error> + implements $Bip39ErrorCopyWith<$Res> { + _$Bip39ErrorCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; +} + +/// @nodoc +abstract class _$$Bip39Error_BadWordCountImplCopyWith<$Res> { + factory _$$Bip39Error_BadWordCountImplCopyWith( + _$Bip39Error_BadWordCountImpl value, + $Res Function(_$Bip39Error_BadWordCountImpl) then) = + __$$Bip39Error_BadWordCountImplCopyWithImpl<$Res>; @useResult - $Res call({String field0}); + $Res call({BigInt wordCount}); } /// @nodoc -class __$$BdkError_GenericImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_GenericImpl> - implements _$$BdkError_GenericImplCopyWith<$Res> { - __$$BdkError_GenericImplCopyWithImpl(_$BdkError_GenericImpl _value, - $Res Function(_$BdkError_GenericImpl) _then) +class __$$Bip39Error_BadWordCountImplCopyWithImpl<$Res> + extends _$Bip39ErrorCopyWithImpl<$Res, _$Bip39Error_BadWordCountImpl> + implements _$$Bip39Error_BadWordCountImplCopyWith<$Res> { + __$$Bip39Error_BadWordCountImplCopyWithImpl( + _$Bip39Error_BadWordCountImpl _value, + $Res Function(_$Bip39Error_BadWordCountImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? field0 = null, + Object? wordCount = null, }) { - return _then(_$BdkError_GenericImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, + return _then(_$Bip39Error_BadWordCountImpl( + wordCount: null == wordCount + ? _value.wordCount + : wordCount // ignore: cast_nullable_to_non_nullable + as BigInt, )); } } /// @nodoc -class _$BdkError_GenericImpl extends BdkError_Generic { - const _$BdkError_GenericImpl(this.field0) : super._(); +class _$Bip39Error_BadWordCountImpl extends Bip39Error_BadWordCount { + const _$Bip39Error_BadWordCountImpl({required this.wordCount}) : super._(); @override - final String field0; + final BigInt wordCount; @override String toString() { - return 'BdkError.generic(field0: $field0)'; + return 'Bip39Error.badWordCount(wordCount: $wordCount)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_GenericImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$Bip39Error_BadWordCountImpl && + (identical(other.wordCount, wordCount) || + other.wordCount == wordCount)); } @override - int get hashCode => Object.hash(runtimeType, field0); + int get hashCode => Object.hash(runtimeType, wordCount); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$BdkError_GenericImplCopyWith<_$BdkError_GenericImpl> get copyWith => - __$$BdkError_GenericImplCopyWithImpl<_$BdkError_GenericImpl>( - this, _$identity); + _$$Bip39Error_BadWordCountImplCopyWith<_$Bip39Error_BadWordCountImpl> + get copyWith => __$$Bip39Error_BadWordCountImplCopyWithImpl< + _$Bip39Error_BadWordCountImpl>(this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return generic(field0); + required TResult Function(BigInt wordCount) badWordCount, + required TResult Function(BigInt index) unknownWord, + required TResult Function(BigInt bitCount) badEntropyBitCount, + required TResult Function() invalidChecksum, + required TResult Function(String languages) ambiguousLanguages, + required TResult Function(String errorMessage) generic, + }) { + return badWordCount(wordCount); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return generic?.call(field0); + TResult? Function(BigInt wordCount)? badWordCount, + TResult? Function(BigInt index)? unknownWord, + TResult? Function(BigInt bitCount)? badEntropyBitCount, + TResult? Function()? invalidChecksum, + TResult? Function(String languages)? ambiguousLanguages, + TResult? Function(String errorMessage)? generic, + }) { + return badWordCount?.call(wordCount); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, + TResult Function(BigInt wordCount)? badWordCount, + TResult Function(BigInt index)? unknownWord, + TResult Function(BigInt bitCount)? badEntropyBitCount, + TResult Function()? invalidChecksum, + TResult Function(String languages)? ambiguousLanguages, + TResult Function(String errorMessage)? generic, required TResult orElse(), }) { - if (generic != null) { - return generic(field0); + if (badWordCount != null) { + return badWordCount(wordCount); } return orElse(); } @@ -6801,410 +4505,163 @@ class _$BdkError_GenericImpl extends BdkError_Generic { @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, + required TResult Function(Bip39Error_BadWordCount value) badWordCount, + required TResult Function(Bip39Error_UnknownWord value) unknownWord, + required TResult Function(Bip39Error_BadEntropyBitCount value) + badEntropyBitCount, + required TResult Function(Bip39Error_InvalidChecksum value) invalidChecksum, + required TResult Function(Bip39Error_AmbiguousLanguages value) + ambiguousLanguages, + required TResult Function(Bip39Error_Generic value) generic, }) { - return generic(this); + return badWordCount(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult? Function(Bip39Error_BadWordCount value)? badWordCount, + TResult? Function(Bip39Error_UnknownWord value)? unknownWord, + TResult? Function(Bip39Error_BadEntropyBitCount value)? badEntropyBitCount, + TResult? Function(Bip39Error_InvalidChecksum value)? invalidChecksum, + TResult? Function(Bip39Error_AmbiguousLanguages value)? ambiguousLanguages, + TResult? Function(Bip39Error_Generic value)? generic, }) { - return generic?.call(this); + return badWordCount?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult Function(Bip39Error_BadWordCount value)? badWordCount, + TResult Function(Bip39Error_UnknownWord value)? unknownWord, + TResult Function(Bip39Error_BadEntropyBitCount value)? badEntropyBitCount, + TResult Function(Bip39Error_InvalidChecksum value)? invalidChecksum, + TResult Function(Bip39Error_AmbiguousLanguages value)? ambiguousLanguages, + TResult Function(Bip39Error_Generic value)? generic, required TResult orElse(), }) { - if (generic != null) { - return generic(this); + if (badWordCount != null) { + return badWordCount(this); } return orElse(); } } -abstract class BdkError_Generic extends BdkError { - const factory BdkError_Generic(final String field0) = _$BdkError_GenericImpl; - const BdkError_Generic._() : super._(); +abstract class Bip39Error_BadWordCount extends Bip39Error { + const factory Bip39Error_BadWordCount({required final BigInt wordCount}) = + _$Bip39Error_BadWordCountImpl; + const Bip39Error_BadWordCount._() : super._(); - String get field0; + BigInt get wordCount; @JsonKey(ignore: true) - _$$BdkError_GenericImplCopyWith<_$BdkError_GenericImpl> get copyWith => - throw _privateConstructorUsedError; + _$$Bip39Error_BadWordCountImplCopyWith<_$Bip39Error_BadWordCountImpl> + get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$BdkError_ScriptDoesntHaveAddressFormImplCopyWith<$Res> { - factory _$$BdkError_ScriptDoesntHaveAddressFormImplCopyWith( - _$BdkError_ScriptDoesntHaveAddressFormImpl value, - $Res Function(_$BdkError_ScriptDoesntHaveAddressFormImpl) then) = - __$$BdkError_ScriptDoesntHaveAddressFormImplCopyWithImpl<$Res>; +abstract class _$$Bip39Error_UnknownWordImplCopyWith<$Res> { + factory _$$Bip39Error_UnknownWordImplCopyWith( + _$Bip39Error_UnknownWordImpl value, + $Res Function(_$Bip39Error_UnknownWordImpl) then) = + __$$Bip39Error_UnknownWordImplCopyWithImpl<$Res>; + @useResult + $Res call({BigInt index}); } /// @nodoc -class __$$BdkError_ScriptDoesntHaveAddressFormImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, - _$BdkError_ScriptDoesntHaveAddressFormImpl> - implements _$$BdkError_ScriptDoesntHaveAddressFormImplCopyWith<$Res> { - __$$BdkError_ScriptDoesntHaveAddressFormImplCopyWithImpl( - _$BdkError_ScriptDoesntHaveAddressFormImpl _value, - $Res Function(_$BdkError_ScriptDoesntHaveAddressFormImpl) _then) +class __$$Bip39Error_UnknownWordImplCopyWithImpl<$Res> + extends _$Bip39ErrorCopyWithImpl<$Res, _$Bip39Error_UnknownWordImpl> + implements _$$Bip39Error_UnknownWordImplCopyWith<$Res> { + __$$Bip39Error_UnknownWordImplCopyWithImpl( + _$Bip39Error_UnknownWordImpl _value, + $Res Function(_$Bip39Error_UnknownWordImpl) _then) : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? index = null, + }) { + return _then(_$Bip39Error_UnknownWordImpl( + index: null == index + ? _value.index + : index // ignore: cast_nullable_to_non_nullable + as BigInt, + )); + } } /// @nodoc -class _$BdkError_ScriptDoesntHaveAddressFormImpl - extends BdkError_ScriptDoesntHaveAddressForm { - const _$BdkError_ScriptDoesntHaveAddressFormImpl() : super._(); +class _$Bip39Error_UnknownWordImpl extends Bip39Error_UnknownWord { + const _$Bip39Error_UnknownWordImpl({required this.index}) : super._(); + + @override + final BigInt index; @override String toString() { - return 'BdkError.scriptDoesntHaveAddressForm()'; + return 'Bip39Error.unknownWord(index: $index)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_ScriptDoesntHaveAddressFormImpl); + other is _$Bip39Error_UnknownWordImpl && + (identical(other.index, index) || other.index == index)); } @override - int get hashCode => runtimeType.hashCode; + int get hashCode => Object.hash(runtimeType, index); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$Bip39Error_UnknownWordImplCopyWith<_$Bip39Error_UnknownWordImpl> + get copyWith => __$$Bip39Error_UnknownWordImplCopyWithImpl< + _$Bip39Error_UnknownWordImpl>(this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return scriptDoesntHaveAddressForm(); + required TResult Function(BigInt wordCount) badWordCount, + required TResult Function(BigInt index) unknownWord, + required TResult Function(BigInt bitCount) badEntropyBitCount, + required TResult Function() invalidChecksum, + required TResult Function(String languages) ambiguousLanguages, + required TResult Function(String errorMessage) generic, + }) { + return unknownWord(index); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return scriptDoesntHaveAddressForm?.call(); + TResult? Function(BigInt wordCount)? badWordCount, + TResult? Function(BigInt index)? unknownWord, + TResult? Function(BigInt bitCount)? badEntropyBitCount, + TResult? Function()? invalidChecksum, + TResult? Function(String languages)? ambiguousLanguages, + TResult? Function(String errorMessage)? generic, + }) { + return unknownWord?.call(index); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (scriptDoesntHaveAddressForm != null) { - return scriptDoesntHaveAddressForm(); + TResult Function(BigInt wordCount)? badWordCount, + TResult Function(BigInt index)? unknownWord, + TResult Function(BigInt bitCount)? badEntropyBitCount, + TResult Function()? invalidChecksum, + TResult Function(String languages)? ambiguousLanguages, + TResult Function(String errorMessage)? generic, + required TResult orElse(), + }) { + if (unknownWord != null) { + return unknownWord(index); } return orElse(); } @@ -7212,403 +4669,167 @@ class _$BdkError_ScriptDoesntHaveAddressFormImpl @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return scriptDoesntHaveAddressForm(this); + required TResult Function(Bip39Error_BadWordCount value) badWordCount, + required TResult Function(Bip39Error_UnknownWord value) unknownWord, + required TResult Function(Bip39Error_BadEntropyBitCount value) + badEntropyBitCount, + required TResult Function(Bip39Error_InvalidChecksum value) invalidChecksum, + required TResult Function(Bip39Error_AmbiguousLanguages value) + ambiguousLanguages, + required TResult Function(Bip39Error_Generic value) generic, + }) { + return unknownWord(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return scriptDoesntHaveAddressForm?.call(this); + TResult? Function(Bip39Error_BadWordCount value)? badWordCount, + TResult? Function(Bip39Error_UnknownWord value)? unknownWord, + TResult? Function(Bip39Error_BadEntropyBitCount value)? badEntropyBitCount, + TResult? Function(Bip39Error_InvalidChecksum value)? invalidChecksum, + TResult? Function(Bip39Error_AmbiguousLanguages value)? ambiguousLanguages, + TResult? Function(Bip39Error_Generic value)? generic, + }) { + return unknownWord?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult Function(Bip39Error_BadWordCount value)? badWordCount, + TResult Function(Bip39Error_UnknownWord value)? unknownWord, + TResult Function(Bip39Error_BadEntropyBitCount value)? badEntropyBitCount, + TResult Function(Bip39Error_InvalidChecksum value)? invalidChecksum, + TResult Function(Bip39Error_AmbiguousLanguages value)? ambiguousLanguages, + TResult Function(Bip39Error_Generic value)? generic, required TResult orElse(), }) { - if (scriptDoesntHaveAddressForm != null) { - return scriptDoesntHaveAddressForm(this); + if (unknownWord != null) { + return unknownWord(this); } return orElse(); } } -abstract class BdkError_ScriptDoesntHaveAddressForm extends BdkError { - const factory BdkError_ScriptDoesntHaveAddressForm() = - _$BdkError_ScriptDoesntHaveAddressFormImpl; - const BdkError_ScriptDoesntHaveAddressForm._() : super._(); +abstract class Bip39Error_UnknownWord extends Bip39Error { + const factory Bip39Error_UnknownWord({required final BigInt index}) = + _$Bip39Error_UnknownWordImpl; + const Bip39Error_UnknownWord._() : super._(); + + BigInt get index; + @JsonKey(ignore: true) + _$$Bip39Error_UnknownWordImplCopyWith<_$Bip39Error_UnknownWordImpl> + get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$BdkError_NoRecipientsImplCopyWith<$Res> { - factory _$$BdkError_NoRecipientsImplCopyWith( - _$BdkError_NoRecipientsImpl value, - $Res Function(_$BdkError_NoRecipientsImpl) then) = - __$$BdkError_NoRecipientsImplCopyWithImpl<$Res>; +abstract class _$$Bip39Error_BadEntropyBitCountImplCopyWith<$Res> { + factory _$$Bip39Error_BadEntropyBitCountImplCopyWith( + _$Bip39Error_BadEntropyBitCountImpl value, + $Res Function(_$Bip39Error_BadEntropyBitCountImpl) then) = + __$$Bip39Error_BadEntropyBitCountImplCopyWithImpl<$Res>; + @useResult + $Res call({BigInt bitCount}); } /// @nodoc -class __$$BdkError_NoRecipientsImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_NoRecipientsImpl> - implements _$$BdkError_NoRecipientsImplCopyWith<$Res> { - __$$BdkError_NoRecipientsImplCopyWithImpl(_$BdkError_NoRecipientsImpl _value, - $Res Function(_$BdkError_NoRecipientsImpl) _then) +class __$$Bip39Error_BadEntropyBitCountImplCopyWithImpl<$Res> + extends _$Bip39ErrorCopyWithImpl<$Res, _$Bip39Error_BadEntropyBitCountImpl> + implements _$$Bip39Error_BadEntropyBitCountImplCopyWith<$Res> { + __$$Bip39Error_BadEntropyBitCountImplCopyWithImpl( + _$Bip39Error_BadEntropyBitCountImpl _value, + $Res Function(_$Bip39Error_BadEntropyBitCountImpl) _then) : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? bitCount = null, + }) { + return _then(_$Bip39Error_BadEntropyBitCountImpl( + bitCount: null == bitCount + ? _value.bitCount + : bitCount // ignore: cast_nullable_to_non_nullable + as BigInt, + )); + } } /// @nodoc -class _$BdkError_NoRecipientsImpl extends BdkError_NoRecipients { - const _$BdkError_NoRecipientsImpl() : super._(); +class _$Bip39Error_BadEntropyBitCountImpl + extends Bip39Error_BadEntropyBitCount { + const _$Bip39Error_BadEntropyBitCountImpl({required this.bitCount}) + : super._(); + + @override + final BigInt bitCount; @override String toString() { - return 'BdkError.noRecipients()'; + return 'Bip39Error.badEntropyBitCount(bitCount: $bitCount)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_NoRecipientsImpl); + other is _$Bip39Error_BadEntropyBitCountImpl && + (identical(other.bitCount, bitCount) || + other.bitCount == bitCount)); } @override - int get hashCode => runtimeType.hashCode; + int get hashCode => Object.hash(runtimeType, bitCount); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$Bip39Error_BadEntropyBitCountImplCopyWith< + _$Bip39Error_BadEntropyBitCountImpl> + get copyWith => __$$Bip39Error_BadEntropyBitCountImplCopyWithImpl< + _$Bip39Error_BadEntropyBitCountImpl>(this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, + required TResult Function(BigInt wordCount) badWordCount, + required TResult Function(BigInt index) unknownWord, + required TResult Function(BigInt bitCount) badEntropyBitCount, + required TResult Function() invalidChecksum, + required TResult Function(String languages) ambiguousLanguages, + required TResult Function(String errorMessage) generic, }) { - return noRecipients(); + return badEntropyBitCount(bitCount); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, + TResult? Function(BigInt wordCount)? badWordCount, + TResult? Function(BigInt index)? unknownWord, + TResult? Function(BigInt bitCount)? badEntropyBitCount, + TResult? Function()? invalidChecksum, + TResult? Function(String languages)? ambiguousLanguages, + TResult? Function(String errorMessage)? generic, }) { - return noRecipients?.call(); + return badEntropyBitCount?.call(bitCount); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, + TResult Function(BigInt wordCount)? badWordCount, + TResult Function(BigInt index)? unknownWord, + TResult Function(BigInt bitCount)? badEntropyBitCount, + TResult Function()? invalidChecksum, + TResult Function(String languages)? ambiguousLanguages, + TResult Function(String errorMessage)? generic, required TResult orElse(), }) { - if (noRecipients != null) { - return noRecipients(); + if (badEntropyBitCount != null) { + return badEntropyBitCount(bitCount); } return orElse(); } @@ -7616,234 +4837,94 @@ class _$BdkError_NoRecipientsImpl extends BdkError_NoRecipients { @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, + required TResult Function(Bip39Error_BadWordCount value) badWordCount, + required TResult Function(Bip39Error_UnknownWord value) unknownWord, + required TResult Function(Bip39Error_BadEntropyBitCount value) + badEntropyBitCount, + required TResult Function(Bip39Error_InvalidChecksum value) invalidChecksum, + required TResult Function(Bip39Error_AmbiguousLanguages value) + ambiguousLanguages, + required TResult Function(Bip39Error_Generic value) generic, }) { - return noRecipients(this); + return badEntropyBitCount(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult? Function(Bip39Error_BadWordCount value)? badWordCount, + TResult? Function(Bip39Error_UnknownWord value)? unknownWord, + TResult? Function(Bip39Error_BadEntropyBitCount value)? badEntropyBitCount, + TResult? Function(Bip39Error_InvalidChecksum value)? invalidChecksum, + TResult? Function(Bip39Error_AmbiguousLanguages value)? ambiguousLanguages, + TResult? Function(Bip39Error_Generic value)? generic, }) { - return noRecipients?.call(this); + return badEntropyBitCount?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult Function(Bip39Error_BadWordCount value)? badWordCount, + TResult Function(Bip39Error_UnknownWord value)? unknownWord, + TResult Function(Bip39Error_BadEntropyBitCount value)? badEntropyBitCount, + TResult Function(Bip39Error_InvalidChecksum value)? invalidChecksum, + TResult Function(Bip39Error_AmbiguousLanguages value)? ambiguousLanguages, + TResult Function(Bip39Error_Generic value)? generic, required TResult orElse(), }) { - if (noRecipients != null) { - return noRecipients(this); + if (badEntropyBitCount != null) { + return badEntropyBitCount(this); } return orElse(); } } -abstract class BdkError_NoRecipients extends BdkError { - const factory BdkError_NoRecipients() = _$BdkError_NoRecipientsImpl; - const BdkError_NoRecipients._() : super._(); +abstract class Bip39Error_BadEntropyBitCount extends Bip39Error { + const factory Bip39Error_BadEntropyBitCount( + {required final BigInt bitCount}) = _$Bip39Error_BadEntropyBitCountImpl; + const Bip39Error_BadEntropyBitCount._() : super._(); + + BigInt get bitCount; + @JsonKey(ignore: true) + _$$Bip39Error_BadEntropyBitCountImplCopyWith< + _$Bip39Error_BadEntropyBitCountImpl> + get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$BdkError_NoUtxosSelectedImplCopyWith<$Res> { - factory _$$BdkError_NoUtxosSelectedImplCopyWith( - _$BdkError_NoUtxosSelectedImpl value, - $Res Function(_$BdkError_NoUtxosSelectedImpl) then) = - __$$BdkError_NoUtxosSelectedImplCopyWithImpl<$Res>; +abstract class _$$Bip39Error_InvalidChecksumImplCopyWith<$Res> { + factory _$$Bip39Error_InvalidChecksumImplCopyWith( + _$Bip39Error_InvalidChecksumImpl value, + $Res Function(_$Bip39Error_InvalidChecksumImpl) then) = + __$$Bip39Error_InvalidChecksumImplCopyWithImpl<$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) +class __$$Bip39Error_InvalidChecksumImplCopyWithImpl<$Res> + extends _$Bip39ErrorCopyWithImpl<$Res, _$Bip39Error_InvalidChecksumImpl> + implements _$$Bip39Error_InvalidChecksumImplCopyWith<$Res> { + __$$Bip39Error_InvalidChecksumImplCopyWithImpl( + _$Bip39Error_InvalidChecksumImpl _value, + $Res Function(_$Bip39Error_InvalidChecksumImpl) _then) : super(_value, _then); } /// @nodoc -class _$BdkError_NoUtxosSelectedImpl extends BdkError_NoUtxosSelected { - const _$BdkError_NoUtxosSelectedImpl() : super._(); +class _$Bip39Error_InvalidChecksumImpl extends Bip39Error_InvalidChecksum { + const _$Bip39Error_InvalidChecksumImpl() : super._(); @override String toString() { - return 'BdkError.noUtxosSelected()'; + return 'Bip39Error.invalidChecksum()'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_NoUtxosSelectedImpl); + other is _$Bip39Error_InvalidChecksumImpl); } @override @@ -7852,167 +4933,42 @@ class _$BdkError_NoUtxosSelectedImpl extends BdkError_NoUtxosSelected { @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, + required TResult Function(BigInt wordCount) badWordCount, + required TResult Function(BigInt index) unknownWord, + required TResult Function(BigInt bitCount) badEntropyBitCount, + required TResult Function() invalidChecksum, + required TResult Function(String languages) ambiguousLanguages, + required TResult Function(String errorMessage) generic, }) { - return noUtxosSelected(); + return invalidChecksum(); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, + TResult? Function(BigInt wordCount)? badWordCount, + TResult? Function(BigInt index)? unknownWord, + TResult? Function(BigInt bitCount)? badEntropyBitCount, + TResult? Function()? invalidChecksum, + TResult? Function(String languages)? ambiguousLanguages, + TResult? Function(String errorMessage)? generic, }) { - return noUtxosSelected?.call(); + return invalidChecksum?.call(); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, + TResult Function(BigInt wordCount)? badWordCount, + TResult Function(BigInt index)? unknownWord, + TResult Function(BigInt bitCount)? badEntropyBitCount, + TResult Function()? invalidChecksum, + TResult Function(String languages)? ambiguousLanguages, + TResult Function(String errorMessage)? generic, required TResult orElse(), }) { - if (noUtxosSelected != null) { - return noUtxosSelected(); + if (invalidChecksum != null) { + return invalidChecksum(); } return orElse(); } @@ -8020,431 +4976,161 @@ class _$BdkError_NoUtxosSelectedImpl extends BdkError_NoUtxosSelected { @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, + required TResult Function(Bip39Error_BadWordCount value) badWordCount, + required TResult Function(Bip39Error_UnknownWord value) unknownWord, + required TResult Function(Bip39Error_BadEntropyBitCount value) + badEntropyBitCount, + required TResult Function(Bip39Error_InvalidChecksum value) invalidChecksum, + required TResult Function(Bip39Error_AmbiguousLanguages value) + ambiguousLanguages, + required TResult Function(Bip39Error_Generic value) generic, }) { - return noUtxosSelected(this); + return invalidChecksum(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult? Function(Bip39Error_BadWordCount value)? badWordCount, + TResult? Function(Bip39Error_UnknownWord value)? unknownWord, + TResult? Function(Bip39Error_BadEntropyBitCount value)? badEntropyBitCount, + TResult? Function(Bip39Error_InvalidChecksum value)? invalidChecksum, + TResult? Function(Bip39Error_AmbiguousLanguages value)? ambiguousLanguages, + TResult? Function(Bip39Error_Generic value)? generic, }) { - return noUtxosSelected?.call(this); + return invalidChecksum?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult Function(Bip39Error_BadWordCount value)? badWordCount, + TResult Function(Bip39Error_UnknownWord value)? unknownWord, + TResult Function(Bip39Error_BadEntropyBitCount value)? badEntropyBitCount, + TResult Function(Bip39Error_InvalidChecksum value)? invalidChecksum, + TResult Function(Bip39Error_AmbiguousLanguages value)? ambiguousLanguages, + TResult Function(Bip39Error_Generic value)? generic, required TResult orElse(), }) { - if (noUtxosSelected != null) { - return noUtxosSelected(this); + if (invalidChecksum != null) { + return invalidChecksum(this); } return orElse(); } } -abstract class BdkError_NoUtxosSelected extends BdkError { - const factory BdkError_NoUtxosSelected() = _$BdkError_NoUtxosSelectedImpl; - const BdkError_NoUtxosSelected._() : super._(); +abstract class Bip39Error_InvalidChecksum extends Bip39Error { + const factory Bip39Error_InvalidChecksum() = _$Bip39Error_InvalidChecksumImpl; + const Bip39Error_InvalidChecksum._() : super._(); } /// @nodoc -abstract class _$$BdkError_OutputBelowDustLimitImplCopyWith<$Res> { - factory _$$BdkError_OutputBelowDustLimitImplCopyWith( - _$BdkError_OutputBelowDustLimitImpl value, - $Res Function(_$BdkError_OutputBelowDustLimitImpl) then) = - __$$BdkError_OutputBelowDustLimitImplCopyWithImpl<$Res>; +abstract class _$$Bip39Error_AmbiguousLanguagesImplCopyWith<$Res> { + factory _$$Bip39Error_AmbiguousLanguagesImplCopyWith( + _$Bip39Error_AmbiguousLanguagesImpl value, + $Res Function(_$Bip39Error_AmbiguousLanguagesImpl) then) = + __$$Bip39Error_AmbiguousLanguagesImplCopyWithImpl<$Res>; @useResult - $Res call({BigInt field0}); + $Res call({String languages}); } /// @nodoc -class __$$BdkError_OutputBelowDustLimitImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_OutputBelowDustLimitImpl> - implements _$$BdkError_OutputBelowDustLimitImplCopyWith<$Res> { - __$$BdkError_OutputBelowDustLimitImplCopyWithImpl( - _$BdkError_OutputBelowDustLimitImpl _value, - $Res Function(_$BdkError_OutputBelowDustLimitImpl) _then) +class __$$Bip39Error_AmbiguousLanguagesImplCopyWithImpl<$Res> + extends _$Bip39ErrorCopyWithImpl<$Res, _$Bip39Error_AmbiguousLanguagesImpl> + implements _$$Bip39Error_AmbiguousLanguagesImplCopyWith<$Res> { + __$$Bip39Error_AmbiguousLanguagesImplCopyWithImpl( + _$Bip39Error_AmbiguousLanguagesImpl _value, + $Res Function(_$Bip39Error_AmbiguousLanguagesImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? field0 = null, + Object? languages = null, }) { - return _then(_$BdkError_OutputBelowDustLimitImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as BigInt, + return _then(_$Bip39Error_AmbiguousLanguagesImpl( + languages: null == languages + ? _value.languages + : languages // ignore: cast_nullable_to_non_nullable + as String, )); } } /// @nodoc -class _$BdkError_OutputBelowDustLimitImpl - extends BdkError_OutputBelowDustLimit { - const _$BdkError_OutputBelowDustLimitImpl(this.field0) : super._(); +class _$Bip39Error_AmbiguousLanguagesImpl + extends Bip39Error_AmbiguousLanguages { + const _$Bip39Error_AmbiguousLanguagesImpl({required this.languages}) + : super._(); @override - final BigInt field0; + final String languages; @override String toString() { - return 'BdkError.outputBelowDustLimit(field0: $field0)'; + return 'Bip39Error.ambiguousLanguages(languages: $languages)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_OutputBelowDustLimitImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$Bip39Error_AmbiguousLanguagesImpl && + (identical(other.languages, languages) || + other.languages == languages)); } @override - int get hashCode => Object.hash(runtimeType, field0); + int get hashCode => Object.hash(runtimeType, languages); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$BdkError_OutputBelowDustLimitImplCopyWith< - _$BdkError_OutputBelowDustLimitImpl> - get copyWith => __$$BdkError_OutputBelowDustLimitImplCopyWithImpl< - _$BdkError_OutputBelowDustLimitImpl>(this, _$identity); + _$$Bip39Error_AmbiguousLanguagesImplCopyWith< + _$Bip39Error_AmbiguousLanguagesImpl> + get copyWith => __$$Bip39Error_AmbiguousLanguagesImplCopyWithImpl< + _$Bip39Error_AmbiguousLanguagesImpl>(this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return outputBelowDustLimit(field0); + required TResult Function(BigInt wordCount) badWordCount, + required TResult Function(BigInt index) unknownWord, + required TResult Function(BigInt bitCount) badEntropyBitCount, + required TResult Function() invalidChecksum, + required TResult Function(String languages) ambiguousLanguages, + required TResult Function(String errorMessage) generic, + }) { + return ambiguousLanguages(languages); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return outputBelowDustLimit?.call(field0); + TResult? Function(BigInt wordCount)? badWordCount, + TResult? Function(BigInt index)? unknownWord, + TResult? Function(BigInt bitCount)? badEntropyBitCount, + TResult? Function()? invalidChecksum, + TResult? Function(String languages)? ambiguousLanguages, + TResult? Function(String errorMessage)? generic, + }) { + return ambiguousLanguages?.call(languages); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, + TResult Function(BigInt wordCount)? badWordCount, + TResult Function(BigInt index)? unknownWord, + TResult Function(BigInt bitCount)? badEntropyBitCount, + TResult Function()? invalidChecksum, + TResult Function(String languages)? ambiguousLanguages, + TResult Function(String errorMessage)? generic, required TResult orElse(), }) { - if (outputBelowDustLimit != null) { - return outputBelowDustLimit(field0); + if (ambiguousLanguages != null) { + return ambiguousLanguages(languages); } return orElse(); } @@ -8452,450 +5138,163 @@ class _$BdkError_OutputBelowDustLimitImpl @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, + required TResult Function(Bip39Error_BadWordCount value) badWordCount, + required TResult Function(Bip39Error_UnknownWord value) unknownWord, + required TResult Function(Bip39Error_BadEntropyBitCount value) + badEntropyBitCount, + required TResult Function(Bip39Error_InvalidChecksum value) invalidChecksum, + required TResult Function(Bip39Error_AmbiguousLanguages value) + ambiguousLanguages, + required TResult Function(Bip39Error_Generic value) generic, }) { - return outputBelowDustLimit(this); + return ambiguousLanguages(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult? Function(Bip39Error_BadWordCount value)? badWordCount, + TResult? Function(Bip39Error_UnknownWord value)? unknownWord, + TResult? Function(Bip39Error_BadEntropyBitCount value)? badEntropyBitCount, + TResult? Function(Bip39Error_InvalidChecksum value)? invalidChecksum, + TResult? Function(Bip39Error_AmbiguousLanguages value)? ambiguousLanguages, + TResult? Function(Bip39Error_Generic value)? generic, }) { - return outputBelowDustLimit?.call(this); + return ambiguousLanguages?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult Function(Bip39Error_BadWordCount value)? badWordCount, + TResult Function(Bip39Error_UnknownWord value)? unknownWord, + TResult Function(Bip39Error_BadEntropyBitCount value)? badEntropyBitCount, + TResult Function(Bip39Error_InvalidChecksum value)? invalidChecksum, + TResult Function(Bip39Error_AmbiguousLanguages value)? ambiguousLanguages, + TResult Function(Bip39Error_Generic value)? generic, required TResult orElse(), }) { - if (outputBelowDustLimit != null) { - return outputBelowDustLimit(this); + if (ambiguousLanguages != null) { + return ambiguousLanguages(this); } return orElse(); } } -abstract class BdkError_OutputBelowDustLimit extends BdkError { - const factory BdkError_OutputBelowDustLimit(final BigInt field0) = - _$BdkError_OutputBelowDustLimitImpl; - const BdkError_OutputBelowDustLimit._() : super._(); +abstract class Bip39Error_AmbiguousLanguages extends Bip39Error { + const factory Bip39Error_AmbiguousLanguages( + {required final String languages}) = _$Bip39Error_AmbiguousLanguagesImpl; + const Bip39Error_AmbiguousLanguages._() : super._(); - BigInt get field0; + String get languages; @JsonKey(ignore: true) - _$$BdkError_OutputBelowDustLimitImplCopyWith< - _$BdkError_OutputBelowDustLimitImpl> + _$$Bip39Error_AmbiguousLanguagesImplCopyWith< + _$Bip39Error_AmbiguousLanguagesImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$BdkError_InsufficientFundsImplCopyWith<$Res> { - factory _$$BdkError_InsufficientFundsImplCopyWith( - _$BdkError_InsufficientFundsImpl value, - $Res Function(_$BdkError_InsufficientFundsImpl) then) = - __$$BdkError_InsufficientFundsImplCopyWithImpl<$Res>; +abstract class _$$Bip39Error_GenericImplCopyWith<$Res> { + factory _$$Bip39Error_GenericImplCopyWith(_$Bip39Error_GenericImpl value, + $Res Function(_$Bip39Error_GenericImpl) then) = + __$$Bip39Error_GenericImplCopyWithImpl<$Res>; @useResult - $Res call({BigInt needed, BigInt available}); + $Res call({String errorMessage}); } /// @nodoc -class __$$BdkError_InsufficientFundsImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_InsufficientFundsImpl> - implements _$$BdkError_InsufficientFundsImplCopyWith<$Res> { - __$$BdkError_InsufficientFundsImplCopyWithImpl( - _$BdkError_InsufficientFundsImpl _value, - $Res Function(_$BdkError_InsufficientFundsImpl) _then) +class __$$Bip39Error_GenericImplCopyWithImpl<$Res> + extends _$Bip39ErrorCopyWithImpl<$Res, _$Bip39Error_GenericImpl> + implements _$$Bip39Error_GenericImplCopyWith<$Res> { + __$$Bip39Error_GenericImplCopyWithImpl(_$Bip39Error_GenericImpl _value, + $Res Function(_$Bip39Error_GenericImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? needed = null, - Object? available = null, + Object? errorMessage = null, }) { - return _then(_$BdkError_InsufficientFundsImpl( - needed: null == needed - ? _value.needed - : needed // ignore: cast_nullable_to_non_nullable - as BigInt, - available: null == available - ? _value.available - : available // ignore: cast_nullable_to_non_nullable - as BigInt, + return _then(_$Bip39Error_GenericImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, )); } } /// @nodoc -class _$BdkError_InsufficientFundsImpl extends BdkError_InsufficientFunds { - const _$BdkError_InsufficientFundsImpl( - {required this.needed, required this.available}) - : super._(); - - /// Sats needed for some transaction - @override - final BigInt needed; +class _$Bip39Error_GenericImpl extends Bip39Error_Generic { + const _$Bip39Error_GenericImpl({required this.errorMessage}) : super._(); - /// Sats available for spending @override - final BigInt available; + final String errorMessage; @override String toString() { - return 'BdkError.insufficientFunds(needed: $needed, available: $available)'; + return 'Bip39Error.generic(errorMessage: $errorMessage)'; } @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)); + other is _$Bip39Error_GenericImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); } @override - int get hashCode => Object.hash(runtimeType, needed, available); + int get hashCode => Object.hash(runtimeType, errorMessage); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$BdkError_InsufficientFundsImplCopyWith<_$BdkError_InsufficientFundsImpl> - get copyWith => __$$BdkError_InsufficientFundsImplCopyWithImpl< - _$BdkError_InsufficientFundsImpl>(this, _$identity); + _$$Bip39Error_GenericImplCopyWith<_$Bip39Error_GenericImpl> get copyWith => + __$$Bip39Error_GenericImplCopyWithImpl<_$Bip39Error_GenericImpl>( + this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, + required TResult Function(BigInt wordCount) badWordCount, + required TResult Function(BigInt index) unknownWord, + required TResult Function(BigInt bitCount) badEntropyBitCount, + required TResult Function() invalidChecksum, + required TResult Function(String languages) ambiguousLanguages, + required TResult Function(String errorMessage) generic, }) { - return insufficientFunds(needed, available); + return generic(errorMessage); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, + TResult? Function(BigInt wordCount)? badWordCount, + TResult? Function(BigInt index)? unknownWord, + TResult? Function(BigInt bitCount)? badEntropyBitCount, + TResult? Function()? invalidChecksum, + TResult? Function(String languages)? ambiguousLanguages, + TResult? Function(String errorMessage)? generic, }) { - return insufficientFunds?.call(needed, available); + return generic?.call(errorMessage); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, + TResult Function(BigInt wordCount)? badWordCount, + TResult Function(BigInt index)? unknownWord, + TResult Function(BigInt bitCount)? badEntropyBitCount, + TResult Function()? invalidChecksum, + TResult Function(String languages)? ambiguousLanguages, + TResult Function(String errorMessage)? generic, required TResult orElse(), }) { - if (insufficientFunds != null) { - return insufficientFunds(needed, available); + if (generic != null) { + return generic(errorMessage); } return orElse(); } @@ -8903,415 +5302,224 @@ class _$BdkError_InsufficientFundsImpl extends BdkError_InsufficientFunds { @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, + required TResult Function(Bip39Error_BadWordCount value) badWordCount, + required TResult Function(Bip39Error_UnknownWord value) unknownWord, + required TResult Function(Bip39Error_BadEntropyBitCount value) + badEntropyBitCount, + required TResult Function(Bip39Error_InvalidChecksum value) invalidChecksum, + required TResult Function(Bip39Error_AmbiguousLanguages value) + ambiguousLanguages, + required TResult Function(Bip39Error_Generic value) generic, }) { - return insufficientFunds(this); + return generic(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult? Function(Bip39Error_BadWordCount value)? badWordCount, + TResult? Function(Bip39Error_UnknownWord value)? unknownWord, + TResult? Function(Bip39Error_BadEntropyBitCount value)? badEntropyBitCount, + TResult? Function(Bip39Error_InvalidChecksum value)? invalidChecksum, + TResult? Function(Bip39Error_AmbiguousLanguages value)? ambiguousLanguages, + TResult? Function(Bip39Error_Generic value)? generic, }) { - return insufficientFunds?.call(this); + return generic?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult Function(Bip39Error_BadWordCount value)? badWordCount, + TResult Function(Bip39Error_UnknownWord value)? unknownWord, + TResult Function(Bip39Error_BadEntropyBitCount value)? badEntropyBitCount, + TResult Function(Bip39Error_InvalidChecksum value)? invalidChecksum, + TResult Function(Bip39Error_AmbiguousLanguages value)? ambiguousLanguages, + TResult Function(Bip39Error_Generic value)? generic, required TResult orElse(), }) { - if (insufficientFunds != null) { - return insufficientFunds(this); + if (generic != null) { + return generic(this); } return orElse(); } } -abstract class BdkError_InsufficientFunds extends BdkError { - const factory BdkError_InsufficientFunds( - {required final BigInt needed, - required final BigInt available}) = _$BdkError_InsufficientFundsImpl; - const BdkError_InsufficientFunds._() : super._(); - - /// Sats needed for some transaction - BigInt get needed; +abstract class Bip39Error_Generic extends Bip39Error { + const factory Bip39Error_Generic({required final String errorMessage}) = + _$Bip39Error_GenericImpl; + const Bip39Error_Generic._() : super._(); - /// Sats available for spending - BigInt get available; + String get errorMessage; @JsonKey(ignore: true) - _$$BdkError_InsufficientFundsImplCopyWith<_$BdkError_InsufficientFundsImpl> - get copyWith => throw _privateConstructorUsedError; + _$$Bip39Error_GenericImplCopyWith<_$Bip39Error_GenericImpl> get copyWith => + throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$BdkError_BnBTotalTriesExceededImplCopyWith<$Res> { - factory _$$BdkError_BnBTotalTriesExceededImplCopyWith( - _$BdkError_BnBTotalTriesExceededImpl value, - $Res Function(_$BdkError_BnBTotalTriesExceededImpl) then) = - __$$BdkError_BnBTotalTriesExceededImplCopyWithImpl<$Res>; +mixin _$CalculateFeeError { + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) generic, + required TResult Function(List outPoints) missingTxOut, + required TResult Function(String amount) negativeFee, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? generic, + TResult? Function(List outPoints)? missingTxOut, + TResult? Function(String amount)? negativeFee, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? generic, + TResult Function(List outPoints)? missingTxOut, + TResult Function(String amount)? negativeFee, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(CalculateFeeError_Generic value) generic, + required TResult Function(CalculateFeeError_MissingTxOut value) + missingTxOut, + required TResult Function(CalculateFeeError_NegativeFee value) negativeFee, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(CalculateFeeError_Generic value)? generic, + TResult? Function(CalculateFeeError_MissingTxOut value)? missingTxOut, + TResult? Function(CalculateFeeError_NegativeFee value)? negativeFee, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(CalculateFeeError_Generic value)? generic, + TResult Function(CalculateFeeError_MissingTxOut value)? missingTxOut, + TResult Function(CalculateFeeError_NegativeFee value)? negativeFee, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $CalculateFeeErrorCopyWith<$Res> { + factory $CalculateFeeErrorCopyWith( + CalculateFeeError value, $Res Function(CalculateFeeError) then) = + _$CalculateFeeErrorCopyWithImpl<$Res, CalculateFeeError>; +} + +/// @nodoc +class _$CalculateFeeErrorCopyWithImpl<$Res, $Val extends CalculateFeeError> + implements $CalculateFeeErrorCopyWith<$Res> { + _$CalculateFeeErrorCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; +} + +/// @nodoc +abstract class _$$CalculateFeeError_GenericImplCopyWith<$Res> { + factory _$$CalculateFeeError_GenericImplCopyWith( + _$CalculateFeeError_GenericImpl value, + $Res Function(_$CalculateFeeError_GenericImpl) then) = + __$$CalculateFeeError_GenericImplCopyWithImpl<$Res>; + @useResult + $Res call({String errorMessage}); } /// @nodoc -class __$$BdkError_BnBTotalTriesExceededImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_BnBTotalTriesExceededImpl> - implements _$$BdkError_BnBTotalTriesExceededImplCopyWith<$Res> { - __$$BdkError_BnBTotalTriesExceededImplCopyWithImpl( - _$BdkError_BnBTotalTriesExceededImpl _value, - $Res Function(_$BdkError_BnBTotalTriesExceededImpl) _then) +class __$$CalculateFeeError_GenericImplCopyWithImpl<$Res> + extends _$CalculateFeeErrorCopyWithImpl<$Res, + _$CalculateFeeError_GenericImpl> + implements _$$CalculateFeeError_GenericImplCopyWith<$Res> { + __$$CalculateFeeError_GenericImplCopyWithImpl( + _$CalculateFeeError_GenericImpl _value, + $Res Function(_$CalculateFeeError_GenericImpl) _then) : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? errorMessage = null, + }) { + return _then(_$CalculateFeeError_GenericImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } } /// @nodoc -class _$BdkError_BnBTotalTriesExceededImpl - extends BdkError_BnBTotalTriesExceeded { - const _$BdkError_BnBTotalTriesExceededImpl() : super._(); +class _$CalculateFeeError_GenericImpl extends CalculateFeeError_Generic { + const _$CalculateFeeError_GenericImpl({required this.errorMessage}) + : super._(); + + @override + final String errorMessage; @override String toString() { - return 'BdkError.bnBTotalTriesExceeded()'; + return 'CalculateFeeError.generic(errorMessage: $errorMessage)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_BnBTotalTriesExceededImpl); + other is _$CalculateFeeError_GenericImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); } @override - int get hashCode => runtimeType.hashCode; + int get hashCode => Object.hash(runtimeType, errorMessage); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$CalculateFeeError_GenericImplCopyWith<_$CalculateFeeError_GenericImpl> + get copyWith => __$$CalculateFeeError_GenericImplCopyWithImpl< + _$CalculateFeeError_GenericImpl>(this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return bnBTotalTriesExceeded(); + required TResult Function(String errorMessage) generic, + required TResult Function(List outPoints) missingTxOut, + required TResult Function(String amount) negativeFee, + }) { + return generic(errorMessage); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return bnBTotalTriesExceeded?.call(); + TResult? Function(String errorMessage)? generic, + TResult? Function(List outPoints)? missingTxOut, + TResult? Function(String amount)? negativeFee, + }) { + return generic?.call(errorMessage); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (bnBTotalTriesExceeded != null) { - return bnBTotalTriesExceeded(); + TResult Function(String errorMessage)? generic, + TResult Function(List outPoints)? missingTxOut, + TResult Function(String amount)? negativeFee, + required TResult orElse(), + }) { + if (generic != null) { + return generic(errorMessage); } return orElse(); } @@ -9319,404 +5527,157 @@ class _$BdkError_BnBTotalTriesExceededImpl @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return bnBTotalTriesExceeded(this); + required TResult Function(CalculateFeeError_Generic value) generic, + required TResult Function(CalculateFeeError_MissingTxOut value) + missingTxOut, + required TResult Function(CalculateFeeError_NegativeFee value) negativeFee, + }) { + return generic(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return bnBTotalTriesExceeded?.call(this); + TResult? Function(CalculateFeeError_Generic value)? generic, + TResult? Function(CalculateFeeError_MissingTxOut value)? missingTxOut, + TResult? Function(CalculateFeeError_NegativeFee value)? negativeFee, + }) { + return generic?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult Function(CalculateFeeError_Generic value)? generic, + TResult Function(CalculateFeeError_MissingTxOut value)? missingTxOut, + TResult Function(CalculateFeeError_NegativeFee value)? negativeFee, required TResult orElse(), }) { - if (bnBTotalTriesExceeded != null) { - return bnBTotalTriesExceeded(this); + if (generic != null) { + return generic(this); } return orElse(); } } -abstract class BdkError_BnBTotalTriesExceeded extends BdkError { - const factory BdkError_BnBTotalTriesExceeded() = - _$BdkError_BnBTotalTriesExceededImpl; - const BdkError_BnBTotalTriesExceeded._() : super._(); +abstract class CalculateFeeError_Generic extends CalculateFeeError { + const factory CalculateFeeError_Generic( + {required final String errorMessage}) = _$CalculateFeeError_GenericImpl; + const CalculateFeeError_Generic._() : super._(); + + String get errorMessage; + @JsonKey(ignore: true) + _$$CalculateFeeError_GenericImplCopyWith<_$CalculateFeeError_GenericImpl> + get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$BdkError_BnBNoExactMatchImplCopyWith<$Res> { - factory _$$BdkError_BnBNoExactMatchImplCopyWith( - _$BdkError_BnBNoExactMatchImpl value, - $Res Function(_$BdkError_BnBNoExactMatchImpl) then) = - __$$BdkError_BnBNoExactMatchImplCopyWithImpl<$Res>; +abstract class _$$CalculateFeeError_MissingTxOutImplCopyWith<$Res> { + factory _$$CalculateFeeError_MissingTxOutImplCopyWith( + _$CalculateFeeError_MissingTxOutImpl value, + $Res Function(_$CalculateFeeError_MissingTxOutImpl) then) = + __$$CalculateFeeError_MissingTxOutImplCopyWithImpl<$Res>; + @useResult + $Res call({List outPoints}); } /// @nodoc -class __$$BdkError_BnBNoExactMatchImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_BnBNoExactMatchImpl> - implements _$$BdkError_BnBNoExactMatchImplCopyWith<$Res> { - __$$BdkError_BnBNoExactMatchImplCopyWithImpl( - _$BdkError_BnBNoExactMatchImpl _value, - $Res Function(_$BdkError_BnBNoExactMatchImpl) _then) +class __$$CalculateFeeError_MissingTxOutImplCopyWithImpl<$Res> + extends _$CalculateFeeErrorCopyWithImpl<$Res, + _$CalculateFeeError_MissingTxOutImpl> + implements _$$CalculateFeeError_MissingTxOutImplCopyWith<$Res> { + __$$CalculateFeeError_MissingTxOutImplCopyWithImpl( + _$CalculateFeeError_MissingTxOutImpl _value, + $Res Function(_$CalculateFeeError_MissingTxOutImpl) _then) : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? outPoints = null, + }) { + return _then(_$CalculateFeeError_MissingTxOutImpl( + outPoints: null == outPoints + ? _value._outPoints + : outPoints // ignore: cast_nullable_to_non_nullable + as List, + )); + } } /// @nodoc -class _$BdkError_BnBNoExactMatchImpl extends BdkError_BnBNoExactMatch { - const _$BdkError_BnBNoExactMatchImpl() : super._(); +class _$CalculateFeeError_MissingTxOutImpl + extends CalculateFeeError_MissingTxOut { + const _$CalculateFeeError_MissingTxOutImpl( + {required final List outPoints}) + : _outPoints = outPoints, + super._(); + + final List _outPoints; + @override + List get outPoints { + if (_outPoints is EqualUnmodifiableListView) return _outPoints; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_outPoints); + } @override String toString() { - return 'BdkError.bnBNoExactMatch()'; + return 'CalculateFeeError.missingTxOut(outPoints: $outPoints)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_BnBNoExactMatchImpl); + other is _$CalculateFeeError_MissingTxOutImpl && + const DeepCollectionEquality() + .equals(other._outPoints, _outPoints)); } @override - int get hashCode => runtimeType.hashCode; + int get hashCode => + Object.hash(runtimeType, const DeepCollectionEquality().hash(_outPoints)); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$CalculateFeeError_MissingTxOutImplCopyWith< + _$CalculateFeeError_MissingTxOutImpl> + get copyWith => __$$CalculateFeeError_MissingTxOutImplCopyWithImpl< + _$CalculateFeeError_MissingTxOutImpl>(this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return bnBNoExactMatch(); + required TResult Function(String errorMessage) generic, + required TResult Function(List outPoints) missingTxOut, + required TResult Function(String amount) negativeFee, + }) { + return missingTxOut(outPoints); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return bnBNoExactMatch?.call(); + TResult? Function(String errorMessage)? generic, + TResult? Function(List outPoints)? missingTxOut, + TResult? Function(String amount)? negativeFee, + }) { + return missingTxOut?.call(outPoints); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (bnBNoExactMatch != null) { - return bnBNoExactMatch(); + TResult Function(String errorMessage)? generic, + TResult Function(List outPoints)? missingTxOut, + TResult Function(String amount)? negativeFee, + required TResult orElse(), + }) { + if (missingTxOut != null) { + return missingTxOut(outPoints); } return orElse(); } @@ -9724,401 +5685,149 @@ class _$BdkError_BnBNoExactMatchImpl extends BdkError_BnBNoExactMatch { @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return bnBNoExactMatch(this); + required TResult Function(CalculateFeeError_Generic value) generic, + required TResult Function(CalculateFeeError_MissingTxOut value) + missingTxOut, + required TResult Function(CalculateFeeError_NegativeFee value) negativeFee, + }) { + return missingTxOut(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return bnBNoExactMatch?.call(this); + TResult? Function(CalculateFeeError_Generic value)? generic, + TResult? Function(CalculateFeeError_MissingTxOut value)? missingTxOut, + TResult? Function(CalculateFeeError_NegativeFee value)? negativeFee, + }) { + return missingTxOut?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult Function(CalculateFeeError_Generic value)? generic, + TResult Function(CalculateFeeError_MissingTxOut value)? missingTxOut, + TResult Function(CalculateFeeError_NegativeFee value)? negativeFee, required TResult orElse(), }) { - if (bnBNoExactMatch != null) { - return bnBNoExactMatch(this); + if (missingTxOut != null) { + return missingTxOut(this); } return orElse(); } } -abstract class BdkError_BnBNoExactMatch extends BdkError { - const factory BdkError_BnBNoExactMatch() = _$BdkError_BnBNoExactMatchImpl; - const BdkError_BnBNoExactMatch._() : super._(); +abstract class CalculateFeeError_MissingTxOut extends CalculateFeeError { + const factory CalculateFeeError_MissingTxOut( + {required final List outPoints}) = + _$CalculateFeeError_MissingTxOutImpl; + const CalculateFeeError_MissingTxOut._() : super._(); + + List get outPoints; + @JsonKey(ignore: true) + _$$CalculateFeeError_MissingTxOutImplCopyWith< + _$CalculateFeeError_MissingTxOutImpl> + get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$BdkError_UnknownUtxoImplCopyWith<$Res> { - factory _$$BdkError_UnknownUtxoImplCopyWith(_$BdkError_UnknownUtxoImpl value, - $Res Function(_$BdkError_UnknownUtxoImpl) then) = - __$$BdkError_UnknownUtxoImplCopyWithImpl<$Res>; +abstract class _$$CalculateFeeError_NegativeFeeImplCopyWith<$Res> { + factory _$$CalculateFeeError_NegativeFeeImplCopyWith( + _$CalculateFeeError_NegativeFeeImpl value, + $Res Function(_$CalculateFeeError_NegativeFeeImpl) then) = + __$$CalculateFeeError_NegativeFeeImplCopyWithImpl<$Res>; + @useResult + $Res call({String amount}); } /// @nodoc -class __$$BdkError_UnknownUtxoImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_UnknownUtxoImpl> - implements _$$BdkError_UnknownUtxoImplCopyWith<$Res> { - __$$BdkError_UnknownUtxoImplCopyWithImpl(_$BdkError_UnknownUtxoImpl _value, - $Res Function(_$BdkError_UnknownUtxoImpl) _then) +class __$$CalculateFeeError_NegativeFeeImplCopyWithImpl<$Res> + extends _$CalculateFeeErrorCopyWithImpl<$Res, + _$CalculateFeeError_NegativeFeeImpl> + implements _$$CalculateFeeError_NegativeFeeImplCopyWith<$Res> { + __$$CalculateFeeError_NegativeFeeImplCopyWithImpl( + _$CalculateFeeError_NegativeFeeImpl _value, + $Res Function(_$CalculateFeeError_NegativeFeeImpl) _then) : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? amount = null, + }) { + return _then(_$CalculateFeeError_NegativeFeeImpl( + amount: null == amount + ? _value.amount + : amount // ignore: cast_nullable_to_non_nullable + as String, + )); + } } /// @nodoc -class _$BdkError_UnknownUtxoImpl extends BdkError_UnknownUtxo { - const _$BdkError_UnknownUtxoImpl() : super._(); +class _$CalculateFeeError_NegativeFeeImpl + extends CalculateFeeError_NegativeFee { + const _$CalculateFeeError_NegativeFeeImpl({required this.amount}) : super._(); + + @override + final String amount; @override String toString() { - return 'BdkError.unknownUtxo()'; + return 'CalculateFeeError.negativeFee(amount: $amount)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_UnknownUtxoImpl); + other is _$CalculateFeeError_NegativeFeeImpl && + (identical(other.amount, amount) || other.amount == amount)); } @override - int get hashCode => runtimeType.hashCode; + int get hashCode => Object.hash(runtimeType, amount); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$CalculateFeeError_NegativeFeeImplCopyWith< + _$CalculateFeeError_NegativeFeeImpl> + get copyWith => __$$CalculateFeeError_NegativeFeeImplCopyWithImpl< + _$CalculateFeeError_NegativeFeeImpl>(this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return unknownUtxo(); + required TResult Function(String errorMessage) generic, + required TResult Function(List outPoints) missingTxOut, + required TResult Function(String amount) negativeFee, + }) { + return negativeFee(amount); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return unknownUtxo?.call(); + TResult? Function(String errorMessage)? generic, + TResult? Function(List outPoints)? missingTxOut, + TResult? Function(String amount)? negativeFee, + }) { + return negativeFee?.call(amount); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, + TResult Function(String errorMessage)? generic, + TResult Function(List outPoints)? missingTxOut, + TResult Function(String amount)? negativeFee, required TResult orElse(), }) { - if (unknownUtxo != null) { - return unknownUtxo(); + if (negativeFee != null) { + return negativeFee(amount); } return orElse(); } @@ -10126,403 +5835,216 @@ class _$BdkError_UnknownUtxoImpl extends BdkError_UnknownUtxo { @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, + required TResult Function(CalculateFeeError_Generic value) generic, + required TResult Function(CalculateFeeError_MissingTxOut value) + missingTxOut, + required TResult Function(CalculateFeeError_NegativeFee value) negativeFee, }) { - return unknownUtxo(this); + return negativeFee(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult? Function(CalculateFeeError_Generic value)? generic, + TResult? Function(CalculateFeeError_MissingTxOut value)? missingTxOut, + TResult? Function(CalculateFeeError_NegativeFee value)? negativeFee, }) { - return unknownUtxo?.call(this); + return negativeFee?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult Function(CalculateFeeError_Generic value)? generic, + TResult Function(CalculateFeeError_MissingTxOut value)? missingTxOut, + TResult Function(CalculateFeeError_NegativeFee value)? negativeFee, required TResult orElse(), }) { - if (unknownUtxo != null) { - return unknownUtxo(this); + if (negativeFee != null) { + return negativeFee(this); } return orElse(); } } -abstract class BdkError_UnknownUtxo extends BdkError { - const factory BdkError_UnknownUtxo() = _$BdkError_UnknownUtxoImpl; - const BdkError_UnknownUtxo._() : super._(); +abstract class CalculateFeeError_NegativeFee extends CalculateFeeError { + const factory CalculateFeeError_NegativeFee({required final String amount}) = + _$CalculateFeeError_NegativeFeeImpl; + const CalculateFeeError_NegativeFee._() : super._(); + + String get amount; + @JsonKey(ignore: true) + _$$CalculateFeeError_NegativeFeeImplCopyWith< + _$CalculateFeeError_NegativeFeeImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +mixin _$CannotConnectError { + int get height => throw _privateConstructorUsedError; + @optionalTypeArgs + TResult when({ + required TResult Function(int height) include, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(int height)? include, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(int height)? include, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(CannotConnectError_Include value) include, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(CannotConnectError_Include value)? include, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(CannotConnectError_Include value)? include, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + + @JsonKey(ignore: true) + $CannotConnectErrorCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $CannotConnectErrorCopyWith<$Res> { + factory $CannotConnectErrorCopyWith( + CannotConnectError value, $Res Function(CannotConnectError) then) = + _$CannotConnectErrorCopyWithImpl<$Res, CannotConnectError>; + @useResult + $Res call({int height}); +} + +/// @nodoc +class _$CannotConnectErrorCopyWithImpl<$Res, $Val extends CannotConnectError> + implements $CannotConnectErrorCopyWith<$Res> { + _$CannotConnectErrorCopyWithImpl(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? height = null, + }) { + return _then(_value.copyWith( + height: null == height + ? _value.height + : height // ignore: cast_nullable_to_non_nullable + as int, + ) as $Val); + } } /// @nodoc -abstract class _$$BdkError_TransactionNotFoundImplCopyWith<$Res> { - factory _$$BdkError_TransactionNotFoundImplCopyWith( - _$BdkError_TransactionNotFoundImpl value, - $Res Function(_$BdkError_TransactionNotFoundImpl) then) = - __$$BdkError_TransactionNotFoundImplCopyWithImpl<$Res>; +abstract class _$$CannotConnectError_IncludeImplCopyWith<$Res> + implements $CannotConnectErrorCopyWith<$Res> { + factory _$$CannotConnectError_IncludeImplCopyWith( + _$CannotConnectError_IncludeImpl value, + $Res Function(_$CannotConnectError_IncludeImpl) then) = + __$$CannotConnectError_IncludeImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({int height}); } /// @nodoc -class __$$BdkError_TransactionNotFoundImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_TransactionNotFoundImpl> - implements _$$BdkError_TransactionNotFoundImplCopyWith<$Res> { - __$$BdkError_TransactionNotFoundImplCopyWithImpl( - _$BdkError_TransactionNotFoundImpl _value, - $Res Function(_$BdkError_TransactionNotFoundImpl) _then) +class __$$CannotConnectError_IncludeImplCopyWithImpl<$Res> + extends _$CannotConnectErrorCopyWithImpl<$Res, + _$CannotConnectError_IncludeImpl> + implements _$$CannotConnectError_IncludeImplCopyWith<$Res> { + __$$CannotConnectError_IncludeImplCopyWithImpl( + _$CannotConnectError_IncludeImpl _value, + $Res Function(_$CannotConnectError_IncludeImpl) _then) : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? height = null, + }) { + return _then(_$CannotConnectError_IncludeImpl( + height: null == height + ? _value.height + : height // ignore: cast_nullable_to_non_nullable + as int, + )); + } } /// @nodoc -class _$BdkError_TransactionNotFoundImpl extends BdkError_TransactionNotFound { - const _$BdkError_TransactionNotFoundImpl() : super._(); +class _$CannotConnectError_IncludeImpl extends CannotConnectError_Include { + const _$CannotConnectError_IncludeImpl({required this.height}) : super._(); + + @override + final int height; @override String toString() { - return 'BdkError.transactionNotFound()'; + return 'CannotConnectError.include(height: $height)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_TransactionNotFoundImpl); + other is _$CannotConnectError_IncludeImpl && + (identical(other.height, height) || other.height == height)); } @override - int get hashCode => runtimeType.hashCode; + int get hashCode => Object.hash(runtimeType, height); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$CannotConnectError_IncludeImplCopyWith<_$CannotConnectError_IncludeImpl> + get copyWith => __$$CannotConnectError_IncludeImplCopyWithImpl< + _$CannotConnectError_IncludeImpl>(this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, + required TResult Function(int height) include, }) { - return transactionNotFound(); + return include(height); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, + TResult? Function(int height)? include, }) { - return transactionNotFound?.call(); + return include?.call(height); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, + TResult Function(int height)? include, required TResult orElse(), }) { - if (transactionNotFound != null) { - return transactionNotFound(); + if (include != null) { + return include(height); } return orElse(); } @@ -10530,812 +6052,449 @@ class _$BdkError_TransactionNotFoundImpl extends BdkError_TransactionNotFound { @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, + required TResult Function(CannotConnectError_Include value) include, }) { - return transactionNotFound(this); + return include(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult? Function(CannotConnectError_Include value)? include, }) { - return transactionNotFound?.call(this); + return include?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult Function(CannotConnectError_Include value)? include, required TResult orElse(), }) { - if (transactionNotFound != null) { - return transactionNotFound(this); + if (include != null) { + return include(this); } return orElse(); } } -abstract class BdkError_TransactionNotFound extends BdkError { - const factory BdkError_TransactionNotFound() = - _$BdkError_TransactionNotFoundImpl; - const BdkError_TransactionNotFound._() : super._(); +abstract class CannotConnectError_Include extends CannotConnectError { + const factory CannotConnectError_Include({required final int height}) = + _$CannotConnectError_IncludeImpl; + const CannotConnectError_Include._() : super._(); + + @override + int get height; + @override + @JsonKey(ignore: true) + _$$CannotConnectError_IncludeImplCopyWith<_$CannotConnectError_IncludeImpl> + get copyWith => throw _privateConstructorUsedError; } /// @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 +mixin _$CreateTxError { @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, + required TResult Function(String txid) transactionNotFound, + required TResult Function(String txid) transactionConfirmed, + required TResult Function(String txid) irreplaceableTransaction, + required TResult Function() feeRateUnavailable, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) descriptor, + required TResult Function(String errorMessage) policy, + required TResult Function(String kind) spendingPolicyRequired, + required TResult Function() version0, + required TResult Function() version1Csv, + required TResult Function(String requestedTime, String requiredTime) + lockTime, + required TResult Function() rbfSequence, + required TResult Function(String rbf, String csv) rbfSequenceCsv, + required TResult Function(String feeRequired) feeTooLow, + required TResult Function(String feeRateRequired) feeRateTooLow, required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt index) outputBelowDustLimit, + required TResult Function() changePolicyDescriptor, + required TResult Function(String errorMessage) coinSelection, required TResult Function(BigInt needed, BigInt available) insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return transactionConfirmed(); - } - - @override + required TResult Function() noRecipients, + required TResult Function(String errorMessage) psbt, + required TResult Function(String key) missingKeyOrigin, + required TResult Function(String outpoint) unknownUtxo, + required TResult Function(String outpoint) missingNonWitnessUtxo, + required TResult Function(String errorMessage) miniscriptPsbt, + }) => + throw _privateConstructorUsedError; @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, + TResult? Function(String txid)? transactionNotFound, + TResult? Function(String txid)? transactionConfirmed, + TResult? Function(String txid)? irreplaceableTransaction, + TResult? Function()? feeRateUnavailable, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? descriptor, + TResult? Function(String errorMessage)? policy, + TResult? Function(String kind)? spendingPolicyRequired, + TResult? Function()? version0, + TResult? Function()? version1Csv, + TResult? Function(String requestedTime, String requiredTime)? lockTime, + TResult? Function()? rbfSequence, + TResult? Function(String rbf, String csv)? rbfSequenceCsv, + TResult? Function(String feeRequired)? feeTooLow, + TResult? Function(String feeRateRequired)? feeRateTooLow, TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt index)? outputBelowDustLimit, + TResult? Function()? changePolicyDescriptor, + TResult? Function(String errorMessage)? coinSelection, TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return transactionConfirmed?.call(); - } - - @override + TResult? Function()? noRecipients, + TResult? Function(String errorMessage)? psbt, + TResult? Function(String key)? missingKeyOrigin, + TResult? Function(String outpoint)? unknownUtxo, + TResult? Function(String outpoint)? missingNonWitnessUtxo, + TResult? Function(String errorMessage)? miniscriptPsbt, + }) => + throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, + TResult Function(String txid)? transactionNotFound, + TResult Function(String txid)? transactionConfirmed, + TResult Function(String txid)? irreplaceableTransaction, + TResult Function()? feeRateUnavailable, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? descriptor, + TResult Function(String errorMessage)? policy, + TResult Function(String kind)? spendingPolicyRequired, + TResult Function()? version0, + TResult Function()? version1Csv, + TResult Function(String requestedTime, String requiredTime)? lockTime, + TResult Function()? rbfSequence, + TResult Function(String rbf, String csv)? rbfSequenceCsv, + TResult Function(String feeRequired)? feeTooLow, + TResult Function(String feeRateRequired)? feeRateTooLow, TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt index)? outputBelowDustLimit, + TResult Function()? changePolicyDescriptor, + TResult Function(String errorMessage)? coinSelection, TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, + TResult Function()? noRecipients, + TResult Function(String errorMessage)? psbt, + TResult Function(String key)? missingKeyOrigin, + TResult Function(String outpoint)? unknownUtxo, + TResult Function(String outpoint)? missingNonWitnessUtxo, + TResult Function(String errorMessage)? miniscriptPsbt, required TResult orElse(), - }) { - if (transactionConfirmed != null) { - return transactionConfirmed(); - } - return orElse(); - } - - @override + }) => + throw _privateConstructorUsedError; @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) + required TResult Function(CreateTxError_TransactionNotFound value) transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) + required TResult Function(CreateTxError_TransactionConfirmed value) transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) + required TResult Function(CreateTxError_IrreplaceableTransaction value) irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) + required TResult Function(CreateTxError_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) + required TResult Function(CreateTxError_Generic value) generic, + required TResult Function(CreateTxError_Descriptor value) descriptor, + required TResult Function(CreateTxError_Policy value) policy, + required TResult Function(CreateTxError_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 + required TResult Function(CreateTxError_Version0 value) version0, + required TResult Function(CreateTxError_Version1Csv value) version1Csv, + required TResult Function(CreateTxError_LockTime value) lockTime, + required TResult Function(CreateTxError_RbfSequence value) rbfSequence, + required TResult Function(CreateTxError_RbfSequenceCsv value) + rbfSequenceCsv, + required TResult Function(CreateTxError_FeeTooLow value) feeTooLow, + required TResult Function(CreateTxError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(CreateTxError_NoUtxosSelected value) + noUtxosSelected, + required TResult Function(CreateTxError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(CreateTxError_ChangePolicyDescriptor value) + changePolicyDescriptor, + required TResult Function(CreateTxError_CoinSelection value) coinSelection, + required TResult Function(CreateTxError_InsufficientFunds value) + insufficientFunds, + required TResult Function(CreateTxError_NoRecipients value) noRecipients, + required TResult Function(CreateTxError_Psbt value) psbt, + required TResult Function(CreateTxError_MissingKeyOrigin value) + missingKeyOrigin, + required TResult Function(CreateTxError_UnknownUtxo value) unknownUtxo, + required TResult Function(CreateTxError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(CreateTxError_MiniscriptPsbt value) + miniscriptPsbt, + }) => + throw _privateConstructorUsedError; @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? + TResult? Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(CreateTxError_TransactionConfirmed value)? transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? + TResult? Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? + TResult? Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult? Function(CreateTxError_Generic value)? generic, + TResult? Function(CreateTxError_Descriptor value)? descriptor, + TResult? Function(CreateTxError_Policy value)? policy, + TResult? Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - 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 + TResult? Function(CreateTxError_Version0 value)? version0, + TResult? Function(CreateTxError_Version1Csv value)? version1Csv, + TResult? Function(CreateTxError_LockTime value)? lockTime, + TResult? Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult? Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult? Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult? Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult? Function(CreateTxError_CoinSelection value)? coinSelection, + TResult? Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult? Function(CreateTxError_NoRecipients value)? noRecipients, + TResult? Function(CreateTxError_Psbt value)? psbt, + TResult? Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult? Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, + }) => + throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? + TResult Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult Function(CreateTxError_TransactionConfirmed value)? + transactionConfirmed, + TResult Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? + TResult Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult Function(CreateTxError_Generic value)? generic, + TResult Function(CreateTxError_Descriptor value)? descriptor, + TResult Function(CreateTxError_Policy value)? policy, + TResult Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult Function(CreateTxError_Version0 value)? version0, + TResult Function(CreateTxError_Version1Csv value)? version1Csv, + TResult Function(CreateTxError_LockTime value)? lockTime, + TResult Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult Function(CreateTxError_CoinSelection value)? coinSelection, + TResult Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult Function(CreateTxError_NoRecipients value)? noRecipients, + TResult Function(CreateTxError_Psbt value)? psbt, + TResult Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, required TResult orElse(), - }) { - if (transactionConfirmed != null) { - return transactionConfirmed(this); - } - return orElse(); - } + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $CreateTxErrorCopyWith<$Res> { + factory $CreateTxErrorCopyWith( + CreateTxError value, $Res Function(CreateTxError) then) = + _$CreateTxErrorCopyWithImpl<$Res, CreateTxError>; } -abstract class BdkError_TransactionConfirmed extends BdkError { - const factory BdkError_TransactionConfirmed() = - _$BdkError_TransactionConfirmedImpl; - const BdkError_TransactionConfirmed._() : super._(); +/// @nodoc +class _$CreateTxErrorCopyWithImpl<$Res, $Val extends CreateTxError> + implements $CreateTxErrorCopyWith<$Res> { + _$CreateTxErrorCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; } /// @nodoc -abstract class _$$BdkError_IrreplaceableTransactionImplCopyWith<$Res> { - factory _$$BdkError_IrreplaceableTransactionImplCopyWith( - _$BdkError_IrreplaceableTransactionImpl value, - $Res Function(_$BdkError_IrreplaceableTransactionImpl) then) = - __$$BdkError_IrreplaceableTransactionImplCopyWithImpl<$Res>; +abstract class _$$CreateTxError_TransactionNotFoundImplCopyWith<$Res> { + factory _$$CreateTxError_TransactionNotFoundImplCopyWith( + _$CreateTxError_TransactionNotFoundImpl value, + $Res Function(_$CreateTxError_TransactionNotFoundImpl) then) = + __$$CreateTxError_TransactionNotFoundImplCopyWithImpl<$Res>; + @useResult + $Res call({String txid}); } /// @nodoc -class __$$BdkError_IrreplaceableTransactionImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, - _$BdkError_IrreplaceableTransactionImpl> - implements _$$BdkError_IrreplaceableTransactionImplCopyWith<$Res> { - __$$BdkError_IrreplaceableTransactionImplCopyWithImpl( - _$BdkError_IrreplaceableTransactionImpl _value, - $Res Function(_$BdkError_IrreplaceableTransactionImpl) _then) +class __$$CreateTxError_TransactionNotFoundImplCopyWithImpl<$Res> + extends _$CreateTxErrorCopyWithImpl<$Res, + _$CreateTxError_TransactionNotFoundImpl> + implements _$$CreateTxError_TransactionNotFoundImplCopyWith<$Res> { + __$$CreateTxError_TransactionNotFoundImplCopyWithImpl( + _$CreateTxError_TransactionNotFoundImpl _value, + $Res Function(_$CreateTxError_TransactionNotFoundImpl) _then) : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? txid = null, + }) { + return _then(_$CreateTxError_TransactionNotFoundImpl( + txid: null == txid + ? _value.txid + : txid // ignore: cast_nullable_to_non_nullable + as String, + )); + } } /// @nodoc -class _$BdkError_IrreplaceableTransactionImpl - extends BdkError_IrreplaceableTransaction { - const _$BdkError_IrreplaceableTransactionImpl() : super._(); +class _$CreateTxError_TransactionNotFoundImpl + extends CreateTxError_TransactionNotFound { + const _$CreateTxError_TransactionNotFoundImpl({required this.txid}) + : super._(); + + @override + final String txid; @override String toString() { - return 'BdkError.irreplaceableTransaction()'; + return 'CreateTxError.transactionNotFound(txid: $txid)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_IrreplaceableTransactionImpl); + other is _$CreateTxError_TransactionNotFoundImpl && + (identical(other.txid, txid) || other.txid == txid)); } @override - int get hashCode => runtimeType.hashCode; + int get hashCode => Object.hash(runtimeType, txid); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$CreateTxError_TransactionNotFoundImplCopyWith< + _$CreateTxError_TransactionNotFoundImpl> + get copyWith => __$$CreateTxError_TransactionNotFoundImplCopyWithImpl< + _$CreateTxError_TransactionNotFoundImpl>(this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, + required TResult Function(String txid) transactionNotFound, + required TResult Function(String txid) transactionConfirmed, + required TResult Function(String txid) irreplaceableTransaction, + required TResult Function() feeRateUnavailable, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) descriptor, + required TResult Function(String errorMessage) policy, + required TResult Function(String kind) spendingPolicyRequired, + required TResult Function() version0, + required TResult Function() version1Csv, + required TResult Function(String requestedTime, String requiredTime) + lockTime, + required TResult Function() rbfSequence, + required TResult Function(String rbf, String csv) rbfSequenceCsv, + required TResult Function(String feeRequired) feeTooLow, + required TResult Function(String feeRateRequired) feeRateTooLow, required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt index) outputBelowDustLimit, + required TResult Function() changePolicyDescriptor, + required TResult Function(String errorMessage) coinSelection, required TResult Function(BigInt needed, BigInt available) insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return irreplaceableTransaction(); + required TResult Function() noRecipients, + required TResult Function(String errorMessage) psbt, + required TResult Function(String key) missingKeyOrigin, + required TResult Function(String outpoint) unknownUtxo, + required TResult Function(String outpoint) missingNonWitnessUtxo, + required TResult Function(String errorMessage) miniscriptPsbt, + }) { + return transactionNotFound(txid); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, + TResult? Function(String txid)? transactionNotFound, + TResult? Function(String txid)? transactionConfirmed, + TResult? Function(String txid)? irreplaceableTransaction, + TResult? Function()? feeRateUnavailable, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? descriptor, + TResult? Function(String errorMessage)? policy, + TResult? Function(String kind)? spendingPolicyRequired, + TResult? Function()? version0, + TResult? Function()? version1Csv, + TResult? Function(String requestedTime, String requiredTime)? lockTime, + TResult? Function()? rbfSequence, + TResult? Function(String rbf, String csv)? rbfSequenceCsv, + TResult? Function(String feeRequired)? feeTooLow, + TResult? Function(String feeRateRequired)? feeRateTooLow, TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt index)? outputBelowDustLimit, + TResult? Function()? changePolicyDescriptor, + TResult? Function(String errorMessage)? coinSelection, TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return irreplaceableTransaction?.call(); + TResult? Function()? noRecipients, + TResult? Function(String errorMessage)? psbt, + TResult? Function(String key)? missingKeyOrigin, + TResult? Function(String outpoint)? unknownUtxo, + TResult? Function(String outpoint)? missingNonWitnessUtxo, + TResult? Function(String errorMessage)? miniscriptPsbt, + }) { + return transactionNotFound?.call(txid); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, + TResult Function(String txid)? transactionNotFound, + TResult Function(String txid)? transactionConfirmed, + TResult Function(String txid)? irreplaceableTransaction, + TResult Function()? feeRateUnavailable, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? descriptor, + TResult Function(String errorMessage)? policy, + TResult Function(String kind)? spendingPolicyRequired, + TResult Function()? version0, + TResult Function()? version1Csv, + TResult Function(String requestedTime, String requiredTime)? lockTime, + TResult Function()? rbfSequence, + TResult Function(String rbf, String csv)? rbfSequenceCsv, + TResult Function(String feeRequired)? feeTooLow, + TResult Function(String feeRateRequired)? feeRateTooLow, TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt index)? outputBelowDustLimit, + TResult Function()? changePolicyDescriptor, + TResult Function(String errorMessage)? coinSelection, TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, + TResult Function()? noRecipients, + TResult Function(String errorMessage)? psbt, + TResult Function(String key)? missingKeyOrigin, + TResult Function(String outpoint)? unknownUtxo, + TResult Function(String outpoint)? missingNonWitnessUtxo, + TResult Function(String errorMessage)? miniscriptPsbt, required TResult orElse(), }) { - if (irreplaceableTransaction != null) { - return irreplaceableTransaction(); + if (transactionNotFound != null) { + return transactionNotFound(txid); } return orElse(); } @@ -11343,431 +6502,317 @@ class _$BdkError_IrreplaceableTransactionImpl @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) + required TResult Function(CreateTxError_TransactionNotFound value) transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) + required TResult Function(CreateTxError_TransactionConfirmed value) transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) + required TResult Function(CreateTxError_IrreplaceableTransaction value) irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) + required TResult Function(CreateTxError_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) + required TResult Function(CreateTxError_Generic value) generic, + required TResult Function(CreateTxError_Descriptor value) descriptor, + required TResult Function(CreateTxError_Policy value) policy, + required TResult Function(CreateTxError_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, + required TResult Function(CreateTxError_Version0 value) version0, + required TResult Function(CreateTxError_Version1Csv value) version1Csv, + required TResult Function(CreateTxError_LockTime value) lockTime, + required TResult Function(CreateTxError_RbfSequence value) rbfSequence, + required TResult Function(CreateTxError_RbfSequenceCsv value) + rbfSequenceCsv, + required TResult Function(CreateTxError_FeeTooLow value) feeTooLow, + required TResult Function(CreateTxError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(CreateTxError_NoUtxosSelected value) + noUtxosSelected, + required TResult Function(CreateTxError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(CreateTxError_ChangePolicyDescriptor value) + changePolicyDescriptor, + required TResult Function(CreateTxError_CoinSelection value) coinSelection, + required TResult Function(CreateTxError_InsufficientFunds value) + insufficientFunds, + required TResult Function(CreateTxError_NoRecipients value) noRecipients, + required TResult Function(CreateTxError_Psbt value) psbt, + required TResult Function(CreateTxError_MissingKeyOrigin value) + missingKeyOrigin, + required TResult Function(CreateTxError_UnknownUtxo value) unknownUtxo, + required TResult Function(CreateTxError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(CreateTxError_MiniscriptPsbt value) + miniscriptPsbt, }) { - return irreplaceableTransaction(this); + return transactionNotFound(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? + TResult? Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(CreateTxError_TransactionConfirmed value)? transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? + TResult? Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? + TResult? Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult? Function(CreateTxError_Generic value)? generic, + TResult? Function(CreateTxError_Descriptor value)? descriptor, + TResult? Function(CreateTxError_Policy value)? policy, + TResult? Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult? Function(CreateTxError_Version0 value)? version0, + TResult? Function(CreateTxError_Version1Csv value)? version1Csv, + TResult? Function(CreateTxError_LockTime value)? lockTime, + TResult? Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult? Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult? Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult? Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult? Function(CreateTxError_CoinSelection value)? coinSelection, + TResult? Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult? Function(CreateTxError_NoRecipients value)? noRecipients, + TResult? Function(CreateTxError_Psbt value)? psbt, + TResult? Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult? Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, }) { - return irreplaceableTransaction?.call(this); + return transactionNotFound?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? + TResult Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult Function(CreateTxError_TransactionConfirmed value)? + transactionConfirmed, + TResult Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? + TResult Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult Function(CreateTxError_Generic value)? generic, + TResult Function(CreateTxError_Descriptor value)? descriptor, + TResult Function(CreateTxError_Policy value)? policy, + TResult Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult Function(CreateTxError_Version0 value)? version0, + TResult Function(CreateTxError_Version1Csv value)? version1Csv, + TResult Function(CreateTxError_LockTime value)? lockTime, + TResult Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult Function(CreateTxError_CoinSelection value)? coinSelection, + TResult Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult Function(CreateTxError_NoRecipients value)? noRecipients, + TResult Function(CreateTxError_Psbt value)? psbt, + TResult Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, required TResult orElse(), }) { - if (irreplaceableTransaction != null) { - return irreplaceableTransaction(this); + if (transactionNotFound != null) { + return transactionNotFound(this); } return orElse(); } } -abstract class BdkError_IrreplaceableTransaction extends BdkError { - const factory BdkError_IrreplaceableTransaction() = - _$BdkError_IrreplaceableTransactionImpl; - const BdkError_IrreplaceableTransaction._() : super._(); +abstract class CreateTxError_TransactionNotFound extends CreateTxError { + const factory CreateTxError_TransactionNotFound( + {required final String txid}) = _$CreateTxError_TransactionNotFoundImpl; + const CreateTxError_TransactionNotFound._() : super._(); + + String get txid; + @JsonKey(ignore: true) + _$$CreateTxError_TransactionNotFoundImplCopyWith< + _$CreateTxError_TransactionNotFoundImpl> + get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$BdkError_FeeRateTooLowImplCopyWith<$Res> { - factory _$$BdkError_FeeRateTooLowImplCopyWith( - _$BdkError_FeeRateTooLowImpl value, - $Res Function(_$BdkError_FeeRateTooLowImpl) then) = - __$$BdkError_FeeRateTooLowImplCopyWithImpl<$Res>; +abstract class _$$CreateTxError_TransactionConfirmedImplCopyWith<$Res> { + factory _$$CreateTxError_TransactionConfirmedImplCopyWith( + _$CreateTxError_TransactionConfirmedImpl value, + $Res Function(_$CreateTxError_TransactionConfirmedImpl) then) = + __$$CreateTxError_TransactionConfirmedImplCopyWithImpl<$Res>; @useResult - $Res call({double needed}); + $Res call({String txid}); } /// @nodoc -class __$$BdkError_FeeRateTooLowImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_FeeRateTooLowImpl> - implements _$$BdkError_FeeRateTooLowImplCopyWith<$Res> { - __$$BdkError_FeeRateTooLowImplCopyWithImpl( - _$BdkError_FeeRateTooLowImpl _value, - $Res Function(_$BdkError_FeeRateTooLowImpl) _then) +class __$$CreateTxError_TransactionConfirmedImplCopyWithImpl<$Res> + extends _$CreateTxErrorCopyWithImpl<$Res, + _$CreateTxError_TransactionConfirmedImpl> + implements _$$CreateTxError_TransactionConfirmedImplCopyWith<$Res> { + __$$CreateTxError_TransactionConfirmedImplCopyWithImpl( + _$CreateTxError_TransactionConfirmedImpl _value, + $Res Function(_$CreateTxError_TransactionConfirmedImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? needed = null, + Object? txid = null, }) { - return _then(_$BdkError_FeeRateTooLowImpl( - needed: null == needed - ? _value.needed - : needed // ignore: cast_nullable_to_non_nullable - as double, + return _then(_$CreateTxError_TransactionConfirmedImpl( + txid: null == txid + ? _value.txid + : txid // ignore: cast_nullable_to_non_nullable + as String, )); } } /// @nodoc -class _$BdkError_FeeRateTooLowImpl extends BdkError_FeeRateTooLow { - const _$BdkError_FeeRateTooLowImpl({required this.needed}) : super._(); +class _$CreateTxError_TransactionConfirmedImpl + extends CreateTxError_TransactionConfirmed { + const _$CreateTxError_TransactionConfirmedImpl({required this.txid}) + : super._(); - /// Required fee rate (satoshi/vbyte) @override - final double needed; + final String txid; @override String toString() { - return 'BdkError.feeRateTooLow(needed: $needed)'; + return 'CreateTxError.transactionConfirmed(txid: $txid)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_FeeRateTooLowImpl && - (identical(other.needed, needed) || other.needed == needed)); + other is _$CreateTxError_TransactionConfirmedImpl && + (identical(other.txid, txid) || other.txid == txid)); } @override - int get hashCode => Object.hash(runtimeType, needed); + int get hashCode => Object.hash(runtimeType, txid); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$BdkError_FeeRateTooLowImplCopyWith<_$BdkError_FeeRateTooLowImpl> - get copyWith => __$$BdkError_FeeRateTooLowImplCopyWithImpl< - _$BdkError_FeeRateTooLowImpl>(this, _$identity); + _$$CreateTxError_TransactionConfirmedImplCopyWith< + _$CreateTxError_TransactionConfirmedImpl> + get copyWith => __$$CreateTxError_TransactionConfirmedImplCopyWithImpl< + _$CreateTxError_TransactionConfirmedImpl>(this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, + required TResult Function(String txid) transactionNotFound, + required TResult Function(String txid) transactionConfirmed, + required TResult Function(String txid) irreplaceableTransaction, + required TResult Function() feeRateUnavailable, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) descriptor, + required TResult Function(String errorMessage) policy, + required TResult Function(String kind) spendingPolicyRequired, + required TResult Function() version0, + required TResult Function() version1Csv, + required TResult Function(String requestedTime, String requiredTime) + lockTime, + required TResult Function() rbfSequence, + required TResult Function(String rbf, String csv) rbfSequenceCsv, + required TResult Function(String feeRequired) feeTooLow, + required TResult Function(String feeRateRequired) feeRateTooLow, required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt index) outputBelowDustLimit, + required TResult Function() changePolicyDescriptor, + required TResult Function(String errorMessage) coinSelection, required TResult Function(BigInt needed, BigInt available) insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return feeRateTooLow(needed); + required TResult Function() noRecipients, + required TResult Function(String errorMessage) psbt, + required TResult Function(String key) missingKeyOrigin, + required TResult Function(String outpoint) unknownUtxo, + required TResult Function(String outpoint) missingNonWitnessUtxo, + required TResult Function(String errorMessage) miniscriptPsbt, + }) { + return transactionConfirmed(txid); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, + TResult? Function(String txid)? transactionNotFound, + TResult? Function(String txid)? transactionConfirmed, + TResult? Function(String txid)? irreplaceableTransaction, + TResult? Function()? feeRateUnavailable, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? descriptor, + TResult? Function(String errorMessage)? policy, + TResult? Function(String kind)? spendingPolicyRequired, + TResult? Function()? version0, + TResult? Function()? version1Csv, + TResult? Function(String requestedTime, String requiredTime)? lockTime, + TResult? Function()? rbfSequence, + TResult? Function(String rbf, String csv)? rbfSequenceCsv, + TResult? Function(String feeRequired)? feeTooLow, + TResult? Function(String feeRateRequired)? feeRateTooLow, TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt index)? outputBelowDustLimit, + TResult? Function()? changePolicyDescriptor, + TResult? Function(String errorMessage)? coinSelection, TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return feeRateTooLow?.call(needed); + TResult? Function()? noRecipients, + TResult? Function(String errorMessage)? psbt, + TResult? Function(String key)? missingKeyOrigin, + TResult? Function(String outpoint)? unknownUtxo, + TResult? Function(String outpoint)? missingNonWitnessUtxo, + TResult? Function(String errorMessage)? miniscriptPsbt, + }) { + return transactionConfirmed?.call(txid); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, + TResult Function(String txid)? transactionNotFound, + TResult Function(String txid)? transactionConfirmed, + TResult Function(String txid)? irreplaceableTransaction, + TResult Function()? feeRateUnavailable, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? descriptor, + TResult Function(String errorMessage)? policy, + TResult Function(String kind)? spendingPolicyRequired, + TResult Function()? version0, + TResult Function()? version1Csv, + TResult Function(String requestedTime, String requiredTime)? lockTime, + TResult Function()? rbfSequence, + TResult Function(String rbf, String csv)? rbfSequenceCsv, + TResult Function(String feeRequired)? feeTooLow, + TResult Function(String feeRateRequired)? feeRateTooLow, TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt index)? outputBelowDustLimit, + TResult Function()? changePolicyDescriptor, + TResult Function(String errorMessage)? coinSelection, TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, + TResult Function()? noRecipients, + TResult Function(String errorMessage)? psbt, + TResult Function(String key)? missingKeyOrigin, + TResult Function(String outpoint)? unknownUtxo, + TResult Function(String outpoint)? missingNonWitnessUtxo, + TResult Function(String errorMessage)? miniscriptPsbt, required TResult orElse(), }) { - if (feeRateTooLow != null) { - return feeRateTooLow(needed); + if (transactionConfirmed != null) { + return transactionConfirmed(txid); } return orElse(); } @@ -11775,435 +6820,318 @@ class _$BdkError_FeeRateTooLowImpl extends BdkError_FeeRateTooLow { @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) + required TResult Function(CreateTxError_TransactionNotFound value) transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) + required TResult Function(CreateTxError_TransactionConfirmed value) transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) + required TResult Function(CreateTxError_IrreplaceableTransaction value) irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) + required TResult Function(CreateTxError_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) + required TResult Function(CreateTxError_Generic value) generic, + required TResult Function(CreateTxError_Descriptor value) descriptor, + required TResult Function(CreateTxError_Policy value) policy, + required TResult Function(CreateTxError_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, + required TResult Function(CreateTxError_Version0 value) version0, + required TResult Function(CreateTxError_Version1Csv value) version1Csv, + required TResult Function(CreateTxError_LockTime value) lockTime, + required TResult Function(CreateTxError_RbfSequence value) rbfSequence, + required TResult Function(CreateTxError_RbfSequenceCsv value) + rbfSequenceCsv, + required TResult Function(CreateTxError_FeeTooLow value) feeTooLow, + required TResult Function(CreateTxError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(CreateTxError_NoUtxosSelected value) + noUtxosSelected, + required TResult Function(CreateTxError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(CreateTxError_ChangePolicyDescriptor value) + changePolicyDescriptor, + required TResult Function(CreateTxError_CoinSelection value) coinSelection, + required TResult Function(CreateTxError_InsufficientFunds value) + insufficientFunds, + required TResult Function(CreateTxError_NoRecipients value) noRecipients, + required TResult Function(CreateTxError_Psbt value) psbt, + required TResult Function(CreateTxError_MissingKeyOrigin value) + missingKeyOrigin, + required TResult Function(CreateTxError_UnknownUtxo value) unknownUtxo, + required TResult Function(CreateTxError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(CreateTxError_MiniscriptPsbt value) + miniscriptPsbt, }) { - return feeRateTooLow(this); + return transactionConfirmed(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? + TResult? Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(CreateTxError_TransactionConfirmed value)? transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? + TResult? Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? + TResult? Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult? Function(CreateTxError_Generic value)? generic, + TResult? Function(CreateTxError_Descriptor value)? descriptor, + TResult? Function(CreateTxError_Policy value)? policy, + TResult? Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult? Function(CreateTxError_Version0 value)? version0, + TResult? Function(CreateTxError_Version1Csv value)? version1Csv, + TResult? Function(CreateTxError_LockTime value)? lockTime, + TResult? Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult? Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult? Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult? Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult? Function(CreateTxError_CoinSelection value)? coinSelection, + TResult? Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult? Function(CreateTxError_NoRecipients value)? noRecipients, + TResult? Function(CreateTxError_Psbt value)? psbt, + TResult? Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult? Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, }) { - return feeRateTooLow?.call(this); + return transactionConfirmed?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? + TResult Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult Function(CreateTxError_TransactionConfirmed value)? + transactionConfirmed, + TResult Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? + TResult Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult Function(CreateTxError_Generic value)? generic, + TResult Function(CreateTxError_Descriptor value)? descriptor, + TResult Function(CreateTxError_Policy value)? policy, + TResult Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult Function(CreateTxError_Version0 value)? version0, + TResult Function(CreateTxError_Version1Csv value)? version1Csv, + TResult Function(CreateTxError_LockTime value)? lockTime, + TResult Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult Function(CreateTxError_CoinSelection value)? coinSelection, + TResult Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult Function(CreateTxError_NoRecipients value)? noRecipients, + TResult Function(CreateTxError_Psbt value)? psbt, + TResult Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, required TResult orElse(), }) { - if (feeRateTooLow != null) { - return feeRateTooLow(this); + if (transactionConfirmed != null) { + return transactionConfirmed(this); } return orElse(); } } -abstract class BdkError_FeeRateTooLow extends BdkError { - const factory BdkError_FeeRateTooLow({required final double needed}) = - _$BdkError_FeeRateTooLowImpl; - const BdkError_FeeRateTooLow._() : super._(); +abstract class CreateTxError_TransactionConfirmed extends CreateTxError { + const factory CreateTxError_TransactionConfirmed( + {required final String txid}) = _$CreateTxError_TransactionConfirmedImpl; + const CreateTxError_TransactionConfirmed._() : super._(); - /// Required fee rate (satoshi/vbyte) - double get needed; + String get txid; @JsonKey(ignore: true) - _$$BdkError_FeeRateTooLowImplCopyWith<_$BdkError_FeeRateTooLowImpl> + _$$CreateTxError_TransactionConfirmedImplCopyWith< + _$CreateTxError_TransactionConfirmedImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$BdkError_FeeTooLowImplCopyWith<$Res> { - factory _$$BdkError_FeeTooLowImplCopyWith(_$BdkError_FeeTooLowImpl value, - $Res Function(_$BdkError_FeeTooLowImpl) then) = - __$$BdkError_FeeTooLowImplCopyWithImpl<$Res>; +abstract class _$$CreateTxError_IrreplaceableTransactionImplCopyWith<$Res> { + factory _$$CreateTxError_IrreplaceableTransactionImplCopyWith( + _$CreateTxError_IrreplaceableTransactionImpl value, + $Res Function(_$CreateTxError_IrreplaceableTransactionImpl) then) = + __$$CreateTxError_IrreplaceableTransactionImplCopyWithImpl<$Res>; @useResult - $Res call({BigInt needed}); + $Res call({String txid}); } /// @nodoc -class __$$BdkError_FeeTooLowImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_FeeTooLowImpl> - implements _$$BdkError_FeeTooLowImplCopyWith<$Res> { - __$$BdkError_FeeTooLowImplCopyWithImpl(_$BdkError_FeeTooLowImpl _value, - $Res Function(_$BdkError_FeeTooLowImpl) _then) +class __$$CreateTxError_IrreplaceableTransactionImplCopyWithImpl<$Res> + extends _$CreateTxErrorCopyWithImpl<$Res, + _$CreateTxError_IrreplaceableTransactionImpl> + implements _$$CreateTxError_IrreplaceableTransactionImplCopyWith<$Res> { + __$$CreateTxError_IrreplaceableTransactionImplCopyWithImpl( + _$CreateTxError_IrreplaceableTransactionImpl _value, + $Res Function(_$CreateTxError_IrreplaceableTransactionImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? needed = null, + Object? txid = null, }) { - return _then(_$BdkError_FeeTooLowImpl( - needed: null == needed - ? _value.needed - : needed // ignore: cast_nullable_to_non_nullable - as BigInt, + return _then(_$CreateTxError_IrreplaceableTransactionImpl( + txid: null == txid + ? _value.txid + : txid // ignore: cast_nullable_to_non_nullable + as String, )); } } /// @nodoc -class _$BdkError_FeeTooLowImpl extends BdkError_FeeTooLow { - const _$BdkError_FeeTooLowImpl({required this.needed}) : super._(); +class _$CreateTxError_IrreplaceableTransactionImpl + extends CreateTxError_IrreplaceableTransaction { + const _$CreateTxError_IrreplaceableTransactionImpl({required this.txid}) + : super._(); - /// Required fee absolute value (satoshi) @override - final BigInt needed; + final String txid; @override String toString() { - return 'BdkError.feeTooLow(needed: $needed)'; + return 'CreateTxError.irreplaceableTransaction(txid: $txid)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_FeeTooLowImpl && - (identical(other.needed, needed) || other.needed == needed)); + other is _$CreateTxError_IrreplaceableTransactionImpl && + (identical(other.txid, txid) || other.txid == txid)); } @override - int get hashCode => Object.hash(runtimeType, needed); + int get hashCode => Object.hash(runtimeType, txid); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$BdkError_FeeTooLowImplCopyWith<_$BdkError_FeeTooLowImpl> get copyWith => - __$$BdkError_FeeTooLowImplCopyWithImpl<_$BdkError_FeeTooLowImpl>( - this, _$identity); + _$$CreateTxError_IrreplaceableTransactionImplCopyWith< + _$CreateTxError_IrreplaceableTransactionImpl> + get copyWith => + __$$CreateTxError_IrreplaceableTransactionImplCopyWithImpl< + _$CreateTxError_IrreplaceableTransactionImpl>(this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, + required TResult Function(String txid) transactionNotFound, + required TResult Function(String txid) transactionConfirmed, + required TResult Function(String txid) irreplaceableTransaction, + required TResult Function() feeRateUnavailable, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) descriptor, + required TResult Function(String errorMessage) policy, + required TResult Function(String kind) spendingPolicyRequired, + required TResult Function() version0, + required TResult Function() version1Csv, + required TResult Function(String requestedTime, String requiredTime) + lockTime, + required TResult Function() rbfSequence, + required TResult Function(String rbf, String csv) rbfSequenceCsv, + required TResult Function(String feeRequired) feeTooLow, + required TResult Function(String feeRateRequired) feeRateTooLow, required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt index) outputBelowDustLimit, + required TResult Function() changePolicyDescriptor, + required TResult Function(String errorMessage) coinSelection, required TResult Function(BigInt needed, BigInt available) insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return feeTooLow(needed); + required TResult Function() noRecipients, + required TResult Function(String errorMessage) psbt, + required TResult Function(String key) missingKeyOrigin, + required TResult Function(String outpoint) unknownUtxo, + required TResult Function(String outpoint) missingNonWitnessUtxo, + required TResult Function(String errorMessage) miniscriptPsbt, + }) { + return irreplaceableTransaction(txid); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, + TResult? Function(String txid)? transactionNotFound, + TResult? Function(String txid)? transactionConfirmed, + TResult? Function(String txid)? irreplaceableTransaction, + TResult? Function()? feeRateUnavailable, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? descriptor, + TResult? Function(String errorMessage)? policy, + TResult? Function(String kind)? spendingPolicyRequired, + TResult? Function()? version0, + TResult? Function()? version1Csv, + TResult? Function(String requestedTime, String requiredTime)? lockTime, + TResult? Function()? rbfSequence, + TResult? Function(String rbf, String csv)? rbfSequenceCsv, + TResult? Function(String feeRequired)? feeTooLow, + TResult? Function(String feeRateRequired)? feeRateTooLow, TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt index)? outputBelowDustLimit, + TResult? Function()? changePolicyDescriptor, + TResult? Function(String errorMessage)? coinSelection, TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return feeTooLow?.call(needed); + TResult? Function()? noRecipients, + TResult? Function(String errorMessage)? psbt, + TResult? Function(String key)? missingKeyOrigin, + TResult? Function(String outpoint)? unknownUtxo, + TResult? Function(String outpoint)? missingNonWitnessUtxo, + TResult? Function(String errorMessage)? miniscriptPsbt, + }) { + return irreplaceableTransaction?.call(txid); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, + TResult Function(String txid)? transactionNotFound, + TResult Function(String txid)? transactionConfirmed, + TResult Function(String txid)? irreplaceableTransaction, + TResult Function()? feeRateUnavailable, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? descriptor, + TResult Function(String errorMessage)? policy, + TResult Function(String kind)? spendingPolicyRequired, + TResult Function()? version0, + TResult Function()? version1Csv, + TResult Function(String requestedTime, String requiredTime)? lockTime, + TResult Function()? rbfSequence, + TResult Function(String rbf, String csv)? rbfSequenceCsv, + TResult Function(String feeRequired)? feeTooLow, + TResult Function(String feeRateRequired)? feeRateTooLow, TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt index)? outputBelowDustLimit, + TResult Function()? changePolicyDescriptor, + TResult Function(String errorMessage)? coinSelection, TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, + TResult Function()? noRecipients, + TResult Function(String errorMessage)? psbt, + TResult Function(String key)? missingKeyOrigin, + TResult Function(String outpoint)? unknownUtxo, + TResult Function(String outpoint)? missingNonWitnessUtxo, + TResult Function(String errorMessage)? miniscriptPsbt, required TResult orElse(), }) { - if (feeTooLow != null) { - return feeTooLow(needed); + if (irreplaceableTransaction != null) { + return irreplaceableTransaction(txid); } return orElse(); } @@ -12211,241 +7139,184 @@ class _$BdkError_FeeTooLowImpl extends BdkError_FeeTooLow { @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) + required TResult Function(CreateTxError_TransactionNotFound value) transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) + required TResult Function(CreateTxError_TransactionConfirmed value) transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) + required TResult Function(CreateTxError_IrreplaceableTransaction value) irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) + required TResult Function(CreateTxError_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) + required TResult Function(CreateTxError_Generic value) generic, + required TResult Function(CreateTxError_Descriptor value) descriptor, + required TResult Function(CreateTxError_Policy value) policy, + required TResult Function(CreateTxError_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, + required TResult Function(CreateTxError_Version0 value) version0, + required TResult Function(CreateTxError_Version1Csv value) version1Csv, + required TResult Function(CreateTxError_LockTime value) lockTime, + required TResult Function(CreateTxError_RbfSequence value) rbfSequence, + required TResult Function(CreateTxError_RbfSequenceCsv value) + rbfSequenceCsv, + required TResult Function(CreateTxError_FeeTooLow value) feeTooLow, + required TResult Function(CreateTxError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(CreateTxError_NoUtxosSelected value) + noUtxosSelected, + required TResult Function(CreateTxError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(CreateTxError_ChangePolicyDescriptor value) + changePolicyDescriptor, + required TResult Function(CreateTxError_CoinSelection value) coinSelection, + required TResult Function(CreateTxError_InsufficientFunds value) + insufficientFunds, + required TResult Function(CreateTxError_NoRecipients value) noRecipients, + required TResult Function(CreateTxError_Psbt value) psbt, + required TResult Function(CreateTxError_MissingKeyOrigin value) + missingKeyOrigin, + required TResult Function(CreateTxError_UnknownUtxo value) unknownUtxo, + required TResult Function(CreateTxError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(CreateTxError_MiniscriptPsbt value) + miniscriptPsbt, }) { - return feeTooLow(this); + return irreplaceableTransaction(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? + TResult? Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(CreateTxError_TransactionConfirmed value)? transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? + TResult? Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? + TResult? Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult? Function(CreateTxError_Generic value)? generic, + TResult? Function(CreateTxError_Descriptor value)? descriptor, + TResult? Function(CreateTxError_Policy value)? policy, + TResult? Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult? Function(CreateTxError_Version0 value)? version0, + TResult? Function(CreateTxError_Version1Csv value)? version1Csv, + TResult? Function(CreateTxError_LockTime value)? lockTime, + TResult? Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult? Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult? Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult? Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult? Function(CreateTxError_CoinSelection value)? coinSelection, + TResult? Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult? Function(CreateTxError_NoRecipients value)? noRecipients, + TResult? Function(CreateTxError_Psbt value)? psbt, + TResult? Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult? Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, }) { - return feeTooLow?.call(this); + return irreplaceableTransaction?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? + TResult Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult Function(CreateTxError_TransactionConfirmed value)? + transactionConfirmed, + TResult Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? + TResult Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult Function(CreateTxError_Generic value)? generic, + TResult Function(CreateTxError_Descriptor value)? descriptor, + TResult Function(CreateTxError_Policy value)? policy, + TResult Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult Function(CreateTxError_Version0 value)? version0, + TResult Function(CreateTxError_Version1Csv value)? version1Csv, + TResult Function(CreateTxError_LockTime value)? lockTime, + TResult Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult Function(CreateTxError_CoinSelection value)? coinSelection, + TResult Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult Function(CreateTxError_NoRecipients value)? noRecipients, + TResult Function(CreateTxError_Psbt value)? psbt, + TResult Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, required TResult orElse(), }) { - if (feeTooLow != null) { - return feeTooLow(this); + if (irreplaceableTransaction != null) { + return irreplaceableTransaction(this); } return orElse(); } } -abstract class BdkError_FeeTooLow extends BdkError { - const factory BdkError_FeeTooLow({required final BigInt needed}) = - _$BdkError_FeeTooLowImpl; - const BdkError_FeeTooLow._() : super._(); +abstract class CreateTxError_IrreplaceableTransaction extends CreateTxError { + const factory CreateTxError_IrreplaceableTransaction( + {required final String txid}) = + _$CreateTxError_IrreplaceableTransactionImpl; + const CreateTxError_IrreplaceableTransaction._() : super._(); - /// Required fee absolute value (satoshi) - BigInt get needed; + String get txid; @JsonKey(ignore: true) - _$$BdkError_FeeTooLowImplCopyWith<_$BdkError_FeeTooLowImpl> get copyWith => - throw _privateConstructorUsedError; + _$$CreateTxError_IrreplaceableTransactionImplCopyWith< + _$CreateTxError_IrreplaceableTransactionImpl> + get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$BdkError_FeeRateUnavailableImplCopyWith<$Res> { - factory _$$BdkError_FeeRateUnavailableImplCopyWith( - _$BdkError_FeeRateUnavailableImpl value, - $Res Function(_$BdkError_FeeRateUnavailableImpl) then) = - __$$BdkError_FeeRateUnavailableImplCopyWithImpl<$Res>; +abstract class _$$CreateTxError_FeeRateUnavailableImplCopyWith<$Res> { + factory _$$CreateTxError_FeeRateUnavailableImplCopyWith( + _$CreateTxError_FeeRateUnavailableImpl value, + $Res Function(_$CreateTxError_FeeRateUnavailableImpl) then) = + __$$CreateTxError_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) +class __$$CreateTxError_FeeRateUnavailableImplCopyWithImpl<$Res> + extends _$CreateTxErrorCopyWithImpl<$Res, + _$CreateTxError_FeeRateUnavailableImpl> + implements _$$CreateTxError_FeeRateUnavailableImplCopyWith<$Res> { + __$$CreateTxError_FeeRateUnavailableImplCopyWithImpl( + _$CreateTxError_FeeRateUnavailableImpl _value, + $Res Function(_$CreateTxError_FeeRateUnavailableImpl) _then) : super(_value, _then); } /// @nodoc -class _$BdkError_FeeRateUnavailableImpl extends BdkError_FeeRateUnavailable { - const _$BdkError_FeeRateUnavailableImpl() : super._(); +class _$CreateTxError_FeeRateUnavailableImpl + extends CreateTxError_FeeRateUnavailable { + const _$CreateTxError_FeeRateUnavailableImpl() : super._(); @override String toString() { - return 'BdkError.feeRateUnavailable()'; + return 'CreateTxError.feeRateUnavailable()'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_FeeRateUnavailableImpl); + other is _$CreateTxError_FeeRateUnavailableImpl); } @override @@ -12454,55 +7325,34 @@ class _$BdkError_FeeRateUnavailableImpl extends BdkError_FeeRateUnavailable { @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, + required TResult Function(String txid) transactionNotFound, + required TResult Function(String txid) transactionConfirmed, + required TResult Function(String txid) irreplaceableTransaction, + required TResult Function() feeRateUnavailable, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) descriptor, + required TResult Function(String errorMessage) policy, + required TResult Function(String kind) spendingPolicyRequired, + required TResult Function() version0, + required TResult Function() version1Csv, + required TResult Function(String requestedTime, String requiredTime) + lockTime, + required TResult Function() rbfSequence, + required TResult Function(String rbf, String csv) rbfSequenceCsv, + required TResult Function(String feeRequired) feeTooLow, + required TResult Function(String feeRateRequired) feeRateTooLow, required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt index) outputBelowDustLimit, + required TResult Function() changePolicyDescriptor, + required TResult Function(String errorMessage) coinSelection, required TResult Function(BigInt needed, BigInt available) insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, + required TResult Function() noRecipients, + required TResult Function(String errorMessage) psbt, + required TResult Function(String key) missingKeyOrigin, + required TResult Function(String outpoint) unknownUtxo, + required TResult Function(String outpoint) missingNonWitnessUtxo, + required TResult Function(String errorMessage) miniscriptPsbt, }) { return feeRateUnavailable(); } @@ -12510,53 +7360,32 @@ class _$BdkError_FeeRateUnavailableImpl extends BdkError_FeeRateUnavailable { @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, + TResult? Function(String txid)? transactionNotFound, + TResult? Function(String txid)? transactionConfirmed, + TResult? Function(String txid)? irreplaceableTransaction, + TResult? Function()? feeRateUnavailable, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? descriptor, + TResult? Function(String errorMessage)? policy, + TResult? Function(String kind)? spendingPolicyRequired, + TResult? Function()? version0, + TResult? Function()? version1Csv, + TResult? Function(String requestedTime, String requiredTime)? lockTime, + TResult? Function()? rbfSequence, + TResult? Function(String rbf, String csv)? rbfSequenceCsv, + TResult? Function(String feeRequired)? feeTooLow, + TResult? Function(String feeRateRequired)? feeRateTooLow, TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt index)? outputBelowDustLimit, + TResult? Function()? changePolicyDescriptor, + TResult? Function(String errorMessage)? coinSelection, TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, + TResult? Function()? noRecipients, + TResult? Function(String errorMessage)? psbt, + TResult? Function(String key)? missingKeyOrigin, + TResult? Function(String outpoint)? unknownUtxo, + TResult? Function(String outpoint)? missingNonWitnessUtxo, + TResult? Function(String errorMessage)? miniscriptPsbt, }) { return feeRateUnavailable?.call(); } @@ -12564,53 +7393,32 @@ class _$BdkError_FeeRateUnavailableImpl extends BdkError_FeeRateUnavailable { @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, + TResult Function(String txid)? transactionNotFound, + TResult Function(String txid)? transactionConfirmed, + TResult Function(String txid)? irreplaceableTransaction, + TResult Function()? feeRateUnavailable, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? descriptor, + TResult Function(String errorMessage)? policy, + TResult Function(String kind)? spendingPolicyRequired, + TResult Function()? version0, + TResult Function()? version1Csv, + TResult Function(String requestedTime, String requiredTime)? lockTime, + TResult Function()? rbfSequence, + TResult Function(String rbf, String csv)? rbfSequenceCsv, + TResult Function(String feeRequired)? feeTooLow, + TResult Function(String feeRateRequired)? feeRateTooLow, TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt index)? outputBelowDustLimit, + TResult Function()? changePolicyDescriptor, + TResult Function(String errorMessage)? coinSelection, TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, + TResult Function()? noRecipients, + TResult Function(String errorMessage)? psbt, + TResult Function(String key)? missingKeyOrigin, + TResult Function(String outpoint)? unknownUtxo, + TResult Function(String outpoint)? missingNonWitnessUtxo, + TResult Function(String errorMessage)? miniscriptPsbt, required TResult orElse(), }) { if (feeRateUnavailable != null) { @@ -12622,66 +7430,45 @@ class _$BdkError_FeeRateUnavailableImpl extends BdkError_FeeRateUnavailable { @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) + required TResult Function(CreateTxError_TransactionNotFound value) transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) + required TResult Function(CreateTxError_TransactionConfirmed value) transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) + required TResult Function(CreateTxError_IrreplaceableTransaction value) irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) + required TResult Function(CreateTxError_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) + required TResult Function(CreateTxError_Generic value) generic, + required TResult Function(CreateTxError_Descriptor value) descriptor, + required TResult Function(CreateTxError_Policy value) policy, + required TResult Function(CreateTxError_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, + required TResult Function(CreateTxError_Version0 value) version0, + required TResult Function(CreateTxError_Version1Csv value) version1Csv, + required TResult Function(CreateTxError_LockTime value) lockTime, + required TResult Function(CreateTxError_RbfSequence value) rbfSequence, + required TResult Function(CreateTxError_RbfSequenceCsv value) + rbfSequenceCsv, + required TResult Function(CreateTxError_FeeTooLow value) feeTooLow, + required TResult Function(CreateTxError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(CreateTxError_NoUtxosSelected value) + noUtxosSelected, + required TResult Function(CreateTxError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(CreateTxError_ChangePolicyDescriptor value) + changePolicyDescriptor, + required TResult Function(CreateTxError_CoinSelection value) coinSelection, + required TResult Function(CreateTxError_InsufficientFunds value) + insufficientFunds, + required TResult Function(CreateTxError_NoRecipients value) noRecipients, + required TResult Function(CreateTxError_Psbt value) psbt, + required TResult Function(CreateTxError_MissingKeyOrigin value) + missingKeyOrigin, + required TResult Function(CreateTxError_UnknownUtxo value) unknownUtxo, + required TResult Function(CreateTxError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(CreateTxError_MiniscriptPsbt value) + miniscriptPsbt, }) { return feeRateUnavailable(this); } @@ -12689,61 +7476,40 @@ class _$BdkError_FeeRateUnavailableImpl extends BdkError_FeeRateUnavailable { @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? + TResult? Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(CreateTxError_TransactionConfirmed value)? transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? + TResult? Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? + TResult? Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult? Function(CreateTxError_Generic value)? generic, + TResult? Function(CreateTxError_Descriptor value)? descriptor, + TResult? Function(CreateTxError_Policy value)? policy, + TResult? Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult? Function(CreateTxError_Version0 value)? version0, + TResult? Function(CreateTxError_Version1Csv value)? version1Csv, + TResult? Function(CreateTxError_LockTime value)? lockTime, + TResult? Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult? Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult? Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult? Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult? Function(CreateTxError_CoinSelection value)? coinSelection, + TResult? Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult? Function(CreateTxError_NoRecipients value)? noRecipients, + TResult? Function(CreateTxError_Psbt value)? psbt, + TResult? Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult? Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, }) { return feeRateUnavailable?.call(this); } @@ -12751,58 +7517,40 @@ class _$BdkError_FeeRateUnavailableImpl extends BdkError_FeeRateUnavailable { @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? + TResult Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult Function(CreateTxError_TransactionConfirmed value)? + transactionConfirmed, + TResult Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? + TResult Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult Function(CreateTxError_Generic value)? generic, + TResult Function(CreateTxError_Descriptor value)? descriptor, + TResult Function(CreateTxError_Policy value)? policy, + TResult Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult Function(CreateTxError_Version0 value)? version0, + TResult Function(CreateTxError_Version1Csv value)? version1Csv, + TResult Function(CreateTxError_LockTime value)? lockTime, + TResult Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult Function(CreateTxError_CoinSelection value)? coinSelection, + TResult Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult Function(CreateTxError_NoRecipients value)? noRecipients, + TResult Function(CreateTxError_Psbt value)? psbt, + TResult Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, required TResult orElse(), }) { if (feeRateUnavailable != null) { @@ -12812,40 +7560,39 @@ class _$BdkError_FeeRateUnavailableImpl extends BdkError_FeeRateUnavailable { } } -abstract class BdkError_FeeRateUnavailable extends BdkError { - const factory BdkError_FeeRateUnavailable() = - _$BdkError_FeeRateUnavailableImpl; - const BdkError_FeeRateUnavailable._() : super._(); +abstract class CreateTxError_FeeRateUnavailable extends CreateTxError { + const factory CreateTxError_FeeRateUnavailable() = + _$CreateTxError_FeeRateUnavailableImpl; + const CreateTxError_FeeRateUnavailable._() : super._(); } /// @nodoc -abstract class _$$BdkError_MissingKeyOriginImplCopyWith<$Res> { - factory _$$BdkError_MissingKeyOriginImplCopyWith( - _$BdkError_MissingKeyOriginImpl value, - $Res Function(_$BdkError_MissingKeyOriginImpl) then) = - __$$BdkError_MissingKeyOriginImplCopyWithImpl<$Res>; +abstract class _$$CreateTxError_GenericImplCopyWith<$Res> { + factory _$$CreateTxError_GenericImplCopyWith( + _$CreateTxError_GenericImpl value, + $Res Function(_$CreateTxError_GenericImpl) then) = + __$$CreateTxError_GenericImplCopyWithImpl<$Res>; @useResult - $Res call({String field0}); + $Res call({String errorMessage}); } /// @nodoc -class __$$BdkError_MissingKeyOriginImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_MissingKeyOriginImpl> - implements _$$BdkError_MissingKeyOriginImplCopyWith<$Res> { - __$$BdkError_MissingKeyOriginImplCopyWithImpl( - _$BdkError_MissingKeyOriginImpl _value, - $Res Function(_$BdkError_MissingKeyOriginImpl) _then) +class __$$CreateTxError_GenericImplCopyWithImpl<$Res> + extends _$CreateTxErrorCopyWithImpl<$Res, _$CreateTxError_GenericImpl> + implements _$$CreateTxError_GenericImplCopyWith<$Res> { + __$$CreateTxError_GenericImplCopyWithImpl(_$CreateTxError_GenericImpl _value, + $Res Function(_$CreateTxError_GenericImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? field0 = null, + Object? errorMessage = null, }) { - return _then(_$BdkError_MissingKeyOriginImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable + return _then(_$CreateTxError_GenericImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable as String, )); } @@ -12853,199 +7600,137 @@ class __$$BdkError_MissingKeyOriginImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_MissingKeyOriginImpl extends BdkError_MissingKeyOrigin { - const _$BdkError_MissingKeyOriginImpl(this.field0) : super._(); +class _$CreateTxError_GenericImpl extends CreateTxError_Generic { + const _$CreateTxError_GenericImpl({required this.errorMessage}) : super._(); @override - final String field0; + final String errorMessage; @override String toString() { - return 'BdkError.missingKeyOrigin(field0: $field0)'; + return 'CreateTxError.generic(errorMessage: $errorMessage)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_MissingKeyOriginImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$CreateTxError_GenericImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); } @override - int get hashCode => Object.hash(runtimeType, field0); + int get hashCode => Object.hash(runtimeType, errorMessage); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$BdkError_MissingKeyOriginImplCopyWith<_$BdkError_MissingKeyOriginImpl> - get copyWith => __$$BdkError_MissingKeyOriginImplCopyWithImpl< - _$BdkError_MissingKeyOriginImpl>(this, _$identity); + _$$CreateTxError_GenericImplCopyWith<_$CreateTxError_GenericImpl> + get copyWith => __$$CreateTxError_GenericImplCopyWithImpl< + _$CreateTxError_GenericImpl>(this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, + required TResult Function(String txid) transactionNotFound, + required TResult Function(String txid) transactionConfirmed, + required TResult Function(String txid) irreplaceableTransaction, + required TResult Function() feeRateUnavailable, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) descriptor, + required TResult Function(String errorMessage) policy, + required TResult Function(String kind) spendingPolicyRequired, + required TResult Function() version0, + required TResult Function() version1Csv, + required TResult Function(String requestedTime, String requiredTime) + lockTime, + required TResult Function() rbfSequence, + required TResult Function(String rbf, String csv) rbfSequenceCsv, + required TResult Function(String feeRequired) feeTooLow, + required TResult Function(String feeRateRequired) feeRateTooLow, required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt index) outputBelowDustLimit, + required TResult Function() changePolicyDescriptor, + required TResult Function(String errorMessage) coinSelection, required TResult Function(BigInt needed, BigInt available) insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return missingKeyOrigin(field0); + required TResult Function() noRecipients, + required TResult Function(String errorMessage) psbt, + required TResult Function(String key) missingKeyOrigin, + required TResult Function(String outpoint) unknownUtxo, + required TResult Function(String outpoint) missingNonWitnessUtxo, + required TResult Function(String errorMessage) miniscriptPsbt, + }) { + return generic(errorMessage); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, + TResult? Function(String txid)? transactionNotFound, + TResult? Function(String txid)? transactionConfirmed, + TResult? Function(String txid)? irreplaceableTransaction, + TResult? Function()? feeRateUnavailable, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? descriptor, + TResult? Function(String errorMessage)? policy, + TResult? Function(String kind)? spendingPolicyRequired, + TResult? Function()? version0, + TResult? Function()? version1Csv, + TResult? Function(String requestedTime, String requiredTime)? lockTime, + TResult? Function()? rbfSequence, + TResult? Function(String rbf, String csv)? rbfSequenceCsv, + TResult? Function(String feeRequired)? feeTooLow, + TResult? Function(String feeRateRequired)? feeRateTooLow, TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt index)? outputBelowDustLimit, + TResult? Function()? changePolicyDescriptor, + TResult? Function(String errorMessage)? coinSelection, TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return missingKeyOrigin?.call(field0); + TResult? Function()? noRecipients, + TResult? Function(String errorMessage)? psbt, + TResult? Function(String key)? missingKeyOrigin, + TResult? Function(String outpoint)? unknownUtxo, + TResult? Function(String outpoint)? missingNonWitnessUtxo, + TResult? Function(String errorMessage)? miniscriptPsbt, + }) { + return generic?.call(errorMessage); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, + TResult Function(String txid)? transactionNotFound, + TResult Function(String txid)? transactionConfirmed, + TResult Function(String txid)? irreplaceableTransaction, + TResult Function()? feeRateUnavailable, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? descriptor, + TResult Function(String errorMessage)? policy, + TResult Function(String kind)? spendingPolicyRequired, + TResult Function()? version0, + TResult Function()? version1Csv, + TResult Function(String requestedTime, String requiredTime)? lockTime, + TResult Function()? rbfSequence, + TResult Function(String rbf, String csv)? rbfSequenceCsv, + TResult Function(String feeRequired)? feeTooLow, + TResult Function(String feeRateRequired)? feeRateTooLow, TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt index)? outputBelowDustLimit, + TResult Function()? changePolicyDescriptor, + TResult Function(String errorMessage)? coinSelection, TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, + TResult Function()? noRecipients, + TResult Function(String errorMessage)? psbt, + TResult Function(String key)? missingKeyOrigin, + TResult Function(String outpoint)? unknownUtxo, + TResult Function(String outpoint)? missingNonWitnessUtxo, + TResult Function(String errorMessage)? miniscriptPsbt, required TResult orElse(), }) { - if (missingKeyOrigin != null) { - return missingKeyOrigin(field0); + if (generic != null) { + return generic(errorMessage); } return orElse(); } @@ -13053,233 +7738,175 @@ class _$BdkError_MissingKeyOriginImpl extends BdkError_MissingKeyOrigin { @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) + required TResult Function(CreateTxError_TransactionNotFound value) transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) + required TResult Function(CreateTxError_TransactionConfirmed value) transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) + required TResult Function(CreateTxError_IrreplaceableTransaction value) irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) + required TResult Function(CreateTxError_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) + required TResult Function(CreateTxError_Generic value) generic, + required TResult Function(CreateTxError_Descriptor value) descriptor, + required TResult Function(CreateTxError_Policy value) policy, + required TResult Function(CreateTxError_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, + required TResult Function(CreateTxError_Version0 value) version0, + required TResult Function(CreateTxError_Version1Csv value) version1Csv, + required TResult Function(CreateTxError_LockTime value) lockTime, + required TResult Function(CreateTxError_RbfSequence value) rbfSequence, + required TResult Function(CreateTxError_RbfSequenceCsv value) + rbfSequenceCsv, + required TResult Function(CreateTxError_FeeTooLow value) feeTooLow, + required TResult Function(CreateTxError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(CreateTxError_NoUtxosSelected value) + noUtxosSelected, + required TResult Function(CreateTxError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(CreateTxError_ChangePolicyDescriptor value) + changePolicyDescriptor, + required TResult Function(CreateTxError_CoinSelection value) coinSelection, + required TResult Function(CreateTxError_InsufficientFunds value) + insufficientFunds, + required TResult Function(CreateTxError_NoRecipients value) noRecipients, + required TResult Function(CreateTxError_Psbt value) psbt, + required TResult Function(CreateTxError_MissingKeyOrigin value) + missingKeyOrigin, + required TResult Function(CreateTxError_UnknownUtxo value) unknownUtxo, + required TResult Function(CreateTxError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(CreateTxError_MiniscriptPsbt value) + miniscriptPsbt, }) { - return missingKeyOrigin(this); + return generic(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? + TResult? Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(CreateTxError_TransactionConfirmed value)? transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? + TResult? Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? + TResult? Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult? Function(CreateTxError_Generic value)? generic, + TResult? Function(CreateTxError_Descriptor value)? descriptor, + TResult? Function(CreateTxError_Policy value)? policy, + TResult? Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult? Function(CreateTxError_Version0 value)? version0, + TResult? Function(CreateTxError_Version1Csv value)? version1Csv, + TResult? Function(CreateTxError_LockTime value)? lockTime, + TResult? Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult? Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult? Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult? Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult? Function(CreateTxError_CoinSelection value)? coinSelection, + TResult? Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult? Function(CreateTxError_NoRecipients value)? noRecipients, + TResult? Function(CreateTxError_Psbt value)? psbt, + TResult? Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult? Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, }) { - return missingKeyOrigin?.call(this); + return generic?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? + TResult Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult Function(CreateTxError_TransactionConfirmed value)? + transactionConfirmed, + TResult Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? + TResult Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult Function(CreateTxError_Generic value)? generic, + TResult Function(CreateTxError_Descriptor value)? descriptor, + TResult Function(CreateTxError_Policy value)? policy, + TResult Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult Function(CreateTxError_Version0 value)? version0, + TResult Function(CreateTxError_Version1Csv value)? version1Csv, + TResult Function(CreateTxError_LockTime value)? lockTime, + TResult Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult Function(CreateTxError_CoinSelection value)? coinSelection, + TResult Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult Function(CreateTxError_NoRecipients value)? noRecipients, + TResult Function(CreateTxError_Psbt value)? psbt, + TResult Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, required TResult orElse(), }) { - if (missingKeyOrigin != null) { - return missingKeyOrigin(this); + if (generic != null) { + return generic(this); } return orElse(); } } -abstract class BdkError_MissingKeyOrigin extends BdkError { - const factory BdkError_MissingKeyOrigin(final String field0) = - _$BdkError_MissingKeyOriginImpl; - const BdkError_MissingKeyOrigin._() : super._(); +abstract class CreateTxError_Generic extends CreateTxError { + const factory CreateTxError_Generic({required final String errorMessage}) = + _$CreateTxError_GenericImpl; + const CreateTxError_Generic._() : super._(); - String get field0; + String get errorMessage; @JsonKey(ignore: true) - _$$BdkError_MissingKeyOriginImplCopyWith<_$BdkError_MissingKeyOriginImpl> + _$$CreateTxError_GenericImplCopyWith<_$CreateTxError_GenericImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$BdkError_KeyImplCopyWith<$Res> { - factory _$$BdkError_KeyImplCopyWith( - _$BdkError_KeyImpl value, $Res Function(_$BdkError_KeyImpl) then) = - __$$BdkError_KeyImplCopyWithImpl<$Res>; +abstract class _$$CreateTxError_DescriptorImplCopyWith<$Res> { + factory _$$CreateTxError_DescriptorImplCopyWith( + _$CreateTxError_DescriptorImpl value, + $Res Function(_$CreateTxError_DescriptorImpl) then) = + __$$CreateTxError_DescriptorImplCopyWithImpl<$Res>; @useResult - $Res call({String field0}); + $Res call({String errorMessage}); } /// @nodoc -class __$$BdkError_KeyImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_KeyImpl> - implements _$$BdkError_KeyImplCopyWith<$Res> { - __$$BdkError_KeyImplCopyWithImpl( - _$BdkError_KeyImpl _value, $Res Function(_$BdkError_KeyImpl) _then) +class __$$CreateTxError_DescriptorImplCopyWithImpl<$Res> + extends _$CreateTxErrorCopyWithImpl<$Res, _$CreateTxError_DescriptorImpl> + implements _$$CreateTxError_DescriptorImplCopyWith<$Res> { + __$$CreateTxError_DescriptorImplCopyWithImpl( + _$CreateTxError_DescriptorImpl _value, + $Res Function(_$CreateTxError_DescriptorImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? field0 = null, + Object? errorMessage = null, }) { - return _then(_$BdkError_KeyImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable + return _then(_$CreateTxError_DescriptorImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable as String, )); } @@ -13287,198 +7914,138 @@ class __$$BdkError_KeyImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_KeyImpl extends BdkError_Key { - const _$BdkError_KeyImpl(this.field0) : super._(); +class _$CreateTxError_DescriptorImpl extends CreateTxError_Descriptor { + const _$CreateTxError_DescriptorImpl({required this.errorMessage}) + : super._(); @override - final String field0; + final String errorMessage; @override String toString() { - return 'BdkError.key(field0: $field0)'; + return 'CreateTxError.descriptor(errorMessage: $errorMessage)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_KeyImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$CreateTxError_DescriptorImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); } @override - int get hashCode => Object.hash(runtimeType, field0); + int get hashCode => Object.hash(runtimeType, errorMessage); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$BdkError_KeyImplCopyWith<_$BdkError_KeyImpl> get copyWith => - __$$BdkError_KeyImplCopyWithImpl<_$BdkError_KeyImpl>(this, _$identity); + _$$CreateTxError_DescriptorImplCopyWith<_$CreateTxError_DescriptorImpl> + get copyWith => __$$CreateTxError_DescriptorImplCopyWithImpl< + _$CreateTxError_DescriptorImpl>(this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, + required TResult Function(String txid) transactionNotFound, + required TResult Function(String txid) transactionConfirmed, + required TResult Function(String txid) irreplaceableTransaction, + required TResult Function() feeRateUnavailable, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) descriptor, + required TResult Function(String errorMessage) policy, + required TResult Function(String kind) spendingPolicyRequired, + required TResult Function() version0, + required TResult Function() version1Csv, + required TResult Function(String requestedTime, String requiredTime) + lockTime, + required TResult Function() rbfSequence, + required TResult Function(String rbf, String csv) rbfSequenceCsv, + required TResult Function(String feeRequired) feeTooLow, + required TResult Function(String feeRateRequired) feeRateTooLow, required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt index) outputBelowDustLimit, + required TResult Function() changePolicyDescriptor, + required TResult Function(String errorMessage) coinSelection, required TResult Function(BigInt needed, BigInt available) insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return key(field0); + required TResult Function() noRecipients, + required TResult Function(String errorMessage) psbt, + required TResult Function(String key) missingKeyOrigin, + required TResult Function(String outpoint) unknownUtxo, + required TResult Function(String outpoint) missingNonWitnessUtxo, + required TResult Function(String errorMessage) miniscriptPsbt, + }) { + return descriptor(errorMessage); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, + TResult? Function(String txid)? transactionNotFound, + TResult? Function(String txid)? transactionConfirmed, + TResult? Function(String txid)? irreplaceableTransaction, + TResult? Function()? feeRateUnavailable, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? descriptor, + TResult? Function(String errorMessage)? policy, + TResult? Function(String kind)? spendingPolicyRequired, + TResult? Function()? version0, + TResult? Function()? version1Csv, + TResult? Function(String requestedTime, String requiredTime)? lockTime, + TResult? Function()? rbfSequence, + TResult? Function(String rbf, String csv)? rbfSequenceCsv, + TResult? Function(String feeRequired)? feeTooLow, + TResult? Function(String feeRateRequired)? feeRateTooLow, TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt index)? outputBelowDustLimit, + TResult? Function()? changePolicyDescriptor, + TResult? Function(String errorMessage)? coinSelection, TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return key?.call(field0); + TResult? Function()? noRecipients, + TResult? Function(String errorMessage)? psbt, + TResult? Function(String key)? missingKeyOrigin, + TResult? Function(String outpoint)? unknownUtxo, + TResult? Function(String outpoint)? missingNonWitnessUtxo, + TResult? Function(String errorMessage)? miniscriptPsbt, + }) { + return descriptor?.call(errorMessage); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, + TResult Function(String txid)? transactionNotFound, + TResult Function(String txid)? transactionConfirmed, + TResult Function(String txid)? irreplaceableTransaction, + TResult Function()? feeRateUnavailable, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? descriptor, + TResult Function(String errorMessage)? policy, + TResult Function(String kind)? spendingPolicyRequired, + TResult Function()? version0, + TResult Function()? version1Csv, + TResult Function(String requestedTime, String requiredTime)? lockTime, + TResult Function()? rbfSequence, + TResult Function(String rbf, String csv)? rbfSequenceCsv, + TResult Function(String feeRequired)? feeTooLow, + TResult Function(String feeRateRequired)? feeRateTooLow, TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt index)? outputBelowDustLimit, + TResult Function()? changePolicyDescriptor, + TResult Function(String errorMessage)? coinSelection, TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, + TResult Function()? noRecipients, + TResult Function(String errorMessage)? psbt, + TResult Function(String key)? missingKeyOrigin, + TResult Function(String outpoint)? unknownUtxo, + TResult Function(String outpoint)? missingNonWitnessUtxo, + TResult Function(String errorMessage)? miniscriptPsbt, required TResult orElse(), }) { - if (key != null) { - return key(field0); + if (descriptor != null) { + return descriptor(errorMessage); } return orElse(); } @@ -13486,408 +8053,312 @@ class _$BdkError_KeyImpl extends BdkError_Key { @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) + required TResult Function(CreateTxError_TransactionNotFound value) transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) + required TResult Function(CreateTxError_TransactionConfirmed value) transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) + required TResult Function(CreateTxError_IrreplaceableTransaction value) irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) + required TResult Function(CreateTxError_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) + required TResult Function(CreateTxError_Generic value) generic, + required TResult Function(CreateTxError_Descriptor value) descriptor, + required TResult Function(CreateTxError_Policy value) policy, + required TResult Function(CreateTxError_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, + required TResult Function(CreateTxError_Version0 value) version0, + required TResult Function(CreateTxError_Version1Csv value) version1Csv, + required TResult Function(CreateTxError_LockTime value) lockTime, + required TResult Function(CreateTxError_RbfSequence value) rbfSequence, + required TResult Function(CreateTxError_RbfSequenceCsv value) + rbfSequenceCsv, + required TResult Function(CreateTxError_FeeTooLow value) feeTooLow, + required TResult Function(CreateTxError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(CreateTxError_NoUtxosSelected value) + noUtxosSelected, + required TResult Function(CreateTxError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(CreateTxError_ChangePolicyDescriptor value) + changePolicyDescriptor, + required TResult Function(CreateTxError_CoinSelection value) coinSelection, + required TResult Function(CreateTxError_InsufficientFunds value) + insufficientFunds, + required TResult Function(CreateTxError_NoRecipients value) noRecipients, + required TResult Function(CreateTxError_Psbt value) psbt, + required TResult Function(CreateTxError_MissingKeyOrigin value) + missingKeyOrigin, + required TResult Function(CreateTxError_UnknownUtxo value) unknownUtxo, + required TResult Function(CreateTxError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(CreateTxError_MiniscriptPsbt value) + miniscriptPsbt, }) { - return key(this); + return descriptor(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? + TResult? Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(CreateTxError_TransactionConfirmed value)? transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? + TResult? Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? + TResult? Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult? Function(CreateTxError_Generic value)? generic, + TResult? Function(CreateTxError_Descriptor value)? descriptor, + TResult? Function(CreateTxError_Policy value)? policy, + TResult? Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult? Function(CreateTxError_Version0 value)? version0, + TResult? Function(CreateTxError_Version1Csv value)? version1Csv, + TResult? Function(CreateTxError_LockTime value)? lockTime, + TResult? Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult? Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult? Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult? Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult? Function(CreateTxError_CoinSelection value)? coinSelection, + TResult? Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult? Function(CreateTxError_NoRecipients value)? noRecipients, + TResult? Function(CreateTxError_Psbt value)? psbt, + TResult? Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult? Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, }) { - return key?.call(this); + return descriptor?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? + TResult Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult Function(CreateTxError_TransactionConfirmed value)? + transactionConfirmed, + TResult Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? + TResult Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult Function(CreateTxError_Generic value)? generic, + TResult Function(CreateTxError_Descriptor value)? descriptor, + TResult Function(CreateTxError_Policy value)? policy, + TResult Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult Function(CreateTxError_Version0 value)? version0, + TResult Function(CreateTxError_Version1Csv value)? version1Csv, + TResult Function(CreateTxError_LockTime value)? lockTime, + TResult Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult Function(CreateTxError_CoinSelection value)? coinSelection, + TResult Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult Function(CreateTxError_NoRecipients value)? noRecipients, + TResult Function(CreateTxError_Psbt value)? psbt, + TResult Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, required TResult orElse(), }) { - if (key != null) { - return key(this); + if (descriptor != null) { + return descriptor(this); } return orElse(); } } -abstract class BdkError_Key extends BdkError { - const factory BdkError_Key(final String field0) = _$BdkError_KeyImpl; - const BdkError_Key._() : super._(); +abstract class CreateTxError_Descriptor extends CreateTxError { + const factory CreateTxError_Descriptor({required final String errorMessage}) = + _$CreateTxError_DescriptorImpl; + const CreateTxError_Descriptor._() : super._(); - String get field0; + String get errorMessage; @JsonKey(ignore: true) - _$$BdkError_KeyImplCopyWith<_$BdkError_KeyImpl> get copyWith => - throw _privateConstructorUsedError; + _$$CreateTxError_DescriptorImplCopyWith<_$CreateTxError_DescriptorImpl> + get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$BdkError_ChecksumMismatchImplCopyWith<$Res> { - factory _$$BdkError_ChecksumMismatchImplCopyWith( - _$BdkError_ChecksumMismatchImpl value, - $Res Function(_$BdkError_ChecksumMismatchImpl) then) = - __$$BdkError_ChecksumMismatchImplCopyWithImpl<$Res>; +abstract class _$$CreateTxError_PolicyImplCopyWith<$Res> { + factory _$$CreateTxError_PolicyImplCopyWith(_$CreateTxError_PolicyImpl value, + $Res Function(_$CreateTxError_PolicyImpl) then) = + __$$CreateTxError_PolicyImplCopyWithImpl<$Res>; + @useResult + $Res call({String errorMessage}); } /// @nodoc -class __$$BdkError_ChecksumMismatchImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_ChecksumMismatchImpl> - implements _$$BdkError_ChecksumMismatchImplCopyWith<$Res> { - __$$BdkError_ChecksumMismatchImplCopyWithImpl( - _$BdkError_ChecksumMismatchImpl _value, - $Res Function(_$BdkError_ChecksumMismatchImpl) _then) +class __$$CreateTxError_PolicyImplCopyWithImpl<$Res> + extends _$CreateTxErrorCopyWithImpl<$Res, _$CreateTxError_PolicyImpl> + implements _$$CreateTxError_PolicyImplCopyWith<$Res> { + __$$CreateTxError_PolicyImplCopyWithImpl(_$CreateTxError_PolicyImpl _value, + $Res Function(_$CreateTxError_PolicyImpl) _then) : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? errorMessage = null, + }) { + return _then(_$CreateTxError_PolicyImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } } /// @nodoc -class _$BdkError_ChecksumMismatchImpl extends BdkError_ChecksumMismatch { - const _$BdkError_ChecksumMismatchImpl() : super._(); +class _$CreateTxError_PolicyImpl extends CreateTxError_Policy { + const _$CreateTxError_PolicyImpl({required this.errorMessage}) : super._(); + + @override + final String errorMessage; @override String toString() { - return 'BdkError.checksumMismatch()'; + return 'CreateTxError.policy(errorMessage: $errorMessage)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_ChecksumMismatchImpl); + other is _$CreateTxError_PolicyImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); } @override - int get hashCode => runtimeType.hashCode; + int get hashCode => Object.hash(runtimeType, errorMessage); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$CreateTxError_PolicyImplCopyWith<_$CreateTxError_PolicyImpl> + get copyWith => + __$$CreateTxError_PolicyImplCopyWithImpl<_$CreateTxError_PolicyImpl>( + this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, + required TResult Function(String txid) transactionNotFound, + required TResult Function(String txid) transactionConfirmed, + required TResult Function(String txid) irreplaceableTransaction, + required TResult Function() feeRateUnavailable, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) descriptor, + required TResult Function(String errorMessage) policy, + required TResult Function(String kind) spendingPolicyRequired, + required TResult Function() version0, + required TResult Function() version1Csv, + required TResult Function(String requestedTime, String requiredTime) + lockTime, + required TResult Function() rbfSequence, + required TResult Function(String rbf, String csv) rbfSequenceCsv, + required TResult Function(String feeRequired) feeTooLow, + required TResult Function(String feeRateRequired) feeRateTooLow, required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt index) outputBelowDustLimit, + required TResult Function() changePolicyDescriptor, + required TResult Function(String errorMessage) coinSelection, required TResult Function(BigInt needed, BigInt available) insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return checksumMismatch(); + required TResult Function() noRecipients, + required TResult Function(String errorMessage) psbt, + required TResult Function(String key) missingKeyOrigin, + required TResult Function(String outpoint) unknownUtxo, + required TResult Function(String outpoint) missingNonWitnessUtxo, + required TResult Function(String errorMessage) miniscriptPsbt, + }) { + return policy(errorMessage); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, + TResult? Function(String txid)? transactionNotFound, + TResult? Function(String txid)? transactionConfirmed, + TResult? Function(String txid)? irreplaceableTransaction, + TResult? Function()? feeRateUnavailable, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? descriptor, + TResult? Function(String errorMessage)? policy, + TResult? Function(String kind)? spendingPolicyRequired, + TResult? Function()? version0, + TResult? Function()? version1Csv, + TResult? Function(String requestedTime, String requiredTime)? lockTime, + TResult? Function()? rbfSequence, + TResult? Function(String rbf, String csv)? rbfSequenceCsv, + TResult? Function(String feeRequired)? feeTooLow, + TResult? Function(String feeRateRequired)? feeRateTooLow, TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt index)? outputBelowDustLimit, + TResult? Function()? changePolicyDescriptor, + TResult? Function(String errorMessage)? coinSelection, TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return checksumMismatch?.call(); + TResult? Function()? noRecipients, + TResult? Function(String errorMessage)? psbt, + TResult? Function(String key)? missingKeyOrigin, + TResult? Function(String outpoint)? unknownUtxo, + TResult? Function(String outpoint)? missingNonWitnessUtxo, + TResult? Function(String errorMessage)? miniscriptPsbt, + }) { + return policy?.call(errorMessage); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, + TResult Function(String txid)? transactionNotFound, + TResult Function(String txid)? transactionConfirmed, + TResult Function(String txid)? irreplaceableTransaction, + TResult Function()? feeRateUnavailable, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? descriptor, + TResult Function(String errorMessage)? policy, + TResult Function(String kind)? spendingPolicyRequired, + TResult Function()? version0, + TResult Function()? version1Csv, + TResult Function(String requestedTime, String requiredTime)? lockTime, + TResult Function()? rbfSequence, + TResult Function(String rbf, String csv)? rbfSequenceCsv, + TResult Function(String feeRequired)? feeTooLow, + TResult Function(String feeRateRequired)? feeRateTooLow, TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt index)? outputBelowDustLimit, + TResult Function()? changePolicyDescriptor, + TResult Function(String errorMessage)? coinSelection, TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (checksumMismatch != null) { - return checksumMismatch(); + TResult Function()? noRecipients, + TResult Function(String errorMessage)? psbt, + TResult Function(String key)? missingKeyOrigin, + TResult Function(String outpoint)? unknownUtxo, + TResult Function(String outpoint)? missingNonWitnessUtxo, + TResult Function(String errorMessage)? miniscriptPsbt, + required TResult orElse(), + }) { + if (policy != null) { + return policy(errorMessage); } return orElse(); } @@ -13895,431 +8366,316 @@ class _$BdkError_ChecksumMismatchImpl extends BdkError_ChecksumMismatch { @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) + required TResult Function(CreateTxError_TransactionNotFound value) transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) + required TResult Function(CreateTxError_TransactionConfirmed value) transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) + required TResult Function(CreateTxError_IrreplaceableTransaction value) irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) + required TResult Function(CreateTxError_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) + required TResult Function(CreateTxError_Generic value) generic, + required TResult Function(CreateTxError_Descriptor value) descriptor, + required TResult Function(CreateTxError_Policy value) policy, + required TResult Function(CreateTxError_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); + required TResult Function(CreateTxError_Version0 value) version0, + required TResult Function(CreateTxError_Version1Csv value) version1Csv, + required TResult Function(CreateTxError_LockTime value) lockTime, + required TResult Function(CreateTxError_RbfSequence value) rbfSequence, + required TResult Function(CreateTxError_RbfSequenceCsv value) + rbfSequenceCsv, + required TResult Function(CreateTxError_FeeTooLow value) feeTooLow, + required TResult Function(CreateTxError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(CreateTxError_NoUtxosSelected value) + noUtxosSelected, + required TResult Function(CreateTxError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(CreateTxError_ChangePolicyDescriptor value) + changePolicyDescriptor, + required TResult Function(CreateTxError_CoinSelection value) coinSelection, + required TResult Function(CreateTxError_InsufficientFunds value) + insufficientFunds, + required TResult Function(CreateTxError_NoRecipients value) noRecipients, + required TResult Function(CreateTxError_Psbt value) psbt, + required TResult Function(CreateTxError_MissingKeyOrigin value) + missingKeyOrigin, + required TResult Function(CreateTxError_UnknownUtxo value) unknownUtxo, + required TResult Function(CreateTxError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(CreateTxError_MiniscriptPsbt value) + miniscriptPsbt, + }) { + return policy(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? + TResult? Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(CreateTxError_TransactionConfirmed value)? transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? + TResult? Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? + TResult? Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult? Function(CreateTxError_Generic value)? generic, + TResult? Function(CreateTxError_Descriptor value)? descriptor, + TResult? Function(CreateTxError_Policy value)? policy, + TResult? Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - 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); + TResult? Function(CreateTxError_Version0 value)? version0, + TResult? Function(CreateTxError_Version1Csv value)? version1Csv, + TResult? Function(CreateTxError_LockTime value)? lockTime, + TResult? Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult? Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult? Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult? Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult? Function(CreateTxError_CoinSelection value)? coinSelection, + TResult? Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult? Function(CreateTxError_NoRecipients value)? noRecipients, + TResult? Function(CreateTxError_Psbt value)? psbt, + TResult? Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult? Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, + }) { + return policy?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? + TResult Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult Function(CreateTxError_TransactionConfirmed value)? + transactionConfirmed, + TResult Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? + TResult Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult Function(CreateTxError_Generic value)? generic, + TResult Function(CreateTxError_Descriptor value)? descriptor, + TResult Function(CreateTxError_Policy value)? policy, + TResult Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult Function(CreateTxError_Version0 value)? version0, + TResult Function(CreateTxError_Version1Csv value)? version1Csv, + TResult Function(CreateTxError_LockTime value)? lockTime, + TResult Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult Function(CreateTxError_CoinSelection value)? coinSelection, + TResult Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult Function(CreateTxError_NoRecipients value)? noRecipients, + TResult Function(CreateTxError_Psbt value)? psbt, + TResult Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, required TResult orElse(), }) { - if (checksumMismatch != null) { - return checksumMismatch(this); + if (policy != null) { + return policy(this); } return orElse(); } } -abstract class BdkError_ChecksumMismatch extends BdkError { - const factory BdkError_ChecksumMismatch() = _$BdkError_ChecksumMismatchImpl; - const BdkError_ChecksumMismatch._() : super._(); +abstract class CreateTxError_Policy extends CreateTxError { + const factory CreateTxError_Policy({required final String errorMessage}) = + _$CreateTxError_PolicyImpl; + const CreateTxError_Policy._() : super._(); + + String get errorMessage; + @JsonKey(ignore: true) + _$$CreateTxError_PolicyImplCopyWith<_$CreateTxError_PolicyImpl> + get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$BdkError_SpendingPolicyRequiredImplCopyWith<$Res> { - factory _$$BdkError_SpendingPolicyRequiredImplCopyWith( - _$BdkError_SpendingPolicyRequiredImpl value, - $Res Function(_$BdkError_SpendingPolicyRequiredImpl) then) = - __$$BdkError_SpendingPolicyRequiredImplCopyWithImpl<$Res>; +abstract class _$$CreateTxError_SpendingPolicyRequiredImplCopyWith<$Res> { + factory _$$CreateTxError_SpendingPolicyRequiredImplCopyWith( + _$CreateTxError_SpendingPolicyRequiredImpl value, + $Res Function(_$CreateTxError_SpendingPolicyRequiredImpl) then) = + __$$CreateTxError_SpendingPolicyRequiredImplCopyWithImpl<$Res>; @useResult - $Res call({KeychainKind field0}); + $Res call({String kind}); } /// @nodoc -class __$$BdkError_SpendingPolicyRequiredImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_SpendingPolicyRequiredImpl> - implements _$$BdkError_SpendingPolicyRequiredImplCopyWith<$Res> { - __$$BdkError_SpendingPolicyRequiredImplCopyWithImpl( - _$BdkError_SpendingPolicyRequiredImpl _value, - $Res Function(_$BdkError_SpendingPolicyRequiredImpl) _then) +class __$$CreateTxError_SpendingPolicyRequiredImplCopyWithImpl<$Res> + extends _$CreateTxErrorCopyWithImpl<$Res, + _$CreateTxError_SpendingPolicyRequiredImpl> + implements _$$CreateTxError_SpendingPolicyRequiredImplCopyWith<$Res> { + __$$CreateTxError_SpendingPolicyRequiredImplCopyWithImpl( + _$CreateTxError_SpendingPolicyRequiredImpl _value, + $Res Function(_$CreateTxError_SpendingPolicyRequiredImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? field0 = null, + Object? kind = null, }) { - return _then(_$BdkError_SpendingPolicyRequiredImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as KeychainKind, + return _then(_$CreateTxError_SpendingPolicyRequiredImpl( + kind: null == kind + ? _value.kind + : kind // ignore: cast_nullable_to_non_nullable + as String, )); } } /// @nodoc -class _$BdkError_SpendingPolicyRequiredImpl - extends BdkError_SpendingPolicyRequired { - const _$BdkError_SpendingPolicyRequiredImpl(this.field0) : super._(); +class _$CreateTxError_SpendingPolicyRequiredImpl + extends CreateTxError_SpendingPolicyRequired { + const _$CreateTxError_SpendingPolicyRequiredImpl({required this.kind}) + : super._(); @override - final KeychainKind field0; + final String kind; @override String toString() { - return 'BdkError.spendingPolicyRequired(field0: $field0)'; + return 'CreateTxError.spendingPolicyRequired(kind: $kind)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_SpendingPolicyRequiredImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$CreateTxError_SpendingPolicyRequiredImpl && + (identical(other.kind, kind) || other.kind == kind)); } @override - int get hashCode => Object.hash(runtimeType, field0); + int get hashCode => Object.hash(runtimeType, kind); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$BdkError_SpendingPolicyRequiredImplCopyWith< - _$BdkError_SpendingPolicyRequiredImpl> - get copyWith => __$$BdkError_SpendingPolicyRequiredImplCopyWithImpl< - _$BdkError_SpendingPolicyRequiredImpl>(this, _$identity); + _$$CreateTxError_SpendingPolicyRequiredImplCopyWith< + _$CreateTxError_SpendingPolicyRequiredImpl> + get copyWith => __$$CreateTxError_SpendingPolicyRequiredImplCopyWithImpl< + _$CreateTxError_SpendingPolicyRequiredImpl>(this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, + required TResult Function(String txid) transactionNotFound, + required TResult Function(String txid) transactionConfirmed, + required TResult Function(String txid) irreplaceableTransaction, + required TResult Function() feeRateUnavailable, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) descriptor, + required TResult Function(String errorMessage) policy, + required TResult Function(String kind) spendingPolicyRequired, + required TResult Function() version0, + required TResult Function() version1Csv, + required TResult Function(String requestedTime, String requiredTime) + lockTime, + required TResult Function() rbfSequence, + required TResult Function(String rbf, String csv) rbfSequenceCsv, + required TResult Function(String feeRequired) feeTooLow, + required TResult Function(String feeRateRequired) feeRateTooLow, required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt index) outputBelowDustLimit, + required TResult Function() changePolicyDescriptor, + required TResult Function(String errorMessage) coinSelection, required TResult Function(BigInt needed, BigInt available) insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return spendingPolicyRequired(field0); + required TResult Function() noRecipients, + required TResult Function(String errorMessage) psbt, + required TResult Function(String key) missingKeyOrigin, + required TResult Function(String outpoint) unknownUtxo, + required TResult Function(String outpoint) missingNonWitnessUtxo, + required TResult Function(String errorMessage) miniscriptPsbt, + }) { + return spendingPolicyRequired(kind); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, + TResult? Function(String txid)? transactionNotFound, + TResult? Function(String txid)? transactionConfirmed, + TResult? Function(String txid)? irreplaceableTransaction, + TResult? Function()? feeRateUnavailable, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? descriptor, + TResult? Function(String errorMessage)? policy, + TResult? Function(String kind)? spendingPolicyRequired, + TResult? Function()? version0, + TResult? Function()? version1Csv, + TResult? Function(String requestedTime, String requiredTime)? lockTime, + TResult? Function()? rbfSequence, + TResult? Function(String rbf, String csv)? rbfSequenceCsv, + TResult? Function(String feeRequired)? feeTooLow, + TResult? Function(String feeRateRequired)? feeRateTooLow, TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt index)? outputBelowDustLimit, + TResult? Function()? changePolicyDescriptor, + TResult? Function(String errorMessage)? coinSelection, TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return spendingPolicyRequired?.call(field0); + TResult? Function()? noRecipients, + TResult? Function(String errorMessage)? psbt, + TResult? Function(String key)? missingKeyOrigin, + TResult? Function(String outpoint)? unknownUtxo, + TResult? Function(String outpoint)? missingNonWitnessUtxo, + TResult? Function(String errorMessage)? miniscriptPsbt, + }) { + return spendingPolicyRequired?.call(kind); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, + TResult Function(String txid)? transactionNotFound, + TResult Function(String txid)? transactionConfirmed, + TResult Function(String txid)? irreplaceableTransaction, + TResult Function()? feeRateUnavailable, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? descriptor, + TResult Function(String errorMessage)? policy, + TResult Function(String kind)? spendingPolicyRequired, + TResult Function()? version0, + TResult Function()? version1Csv, + TResult Function(String requestedTime, String requiredTime)? lockTime, + TResult Function()? rbfSequence, + TResult Function(String rbf, String csv)? rbfSequenceCsv, + TResult Function(String feeRequired)? feeTooLow, + TResult Function(String feeRateRequired)? feeRateTooLow, TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt index)? outputBelowDustLimit, + TResult Function()? changePolicyDescriptor, + TResult Function(String errorMessage)? coinSelection, TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, + TResult Function()? noRecipients, + TResult Function(String errorMessage)? psbt, + TResult Function(String key)? missingKeyOrigin, + TResult Function(String outpoint)? unknownUtxo, + TResult Function(String outpoint)? missingNonWitnessUtxo, + TResult Function(String errorMessage)? miniscriptPsbt, required TResult orElse(), }) { if (spendingPolicyRequired != null) { - return spendingPolicyRequired(field0); + return spendingPolicyRequired(kind); } return orElse(); } @@ -14327,66 +8683,45 @@ class _$BdkError_SpendingPolicyRequiredImpl @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) + required TResult Function(CreateTxError_TransactionNotFound value) transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) + required TResult Function(CreateTxError_TransactionConfirmed value) transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) + required TResult Function(CreateTxError_IrreplaceableTransaction value) irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) + required TResult Function(CreateTxError_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) + required TResult Function(CreateTxError_Generic value) generic, + required TResult Function(CreateTxError_Descriptor value) descriptor, + required TResult Function(CreateTxError_Policy value) policy, + required TResult Function(CreateTxError_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, + required TResult Function(CreateTxError_Version0 value) version0, + required TResult Function(CreateTxError_Version1Csv value) version1Csv, + required TResult Function(CreateTxError_LockTime value) lockTime, + required TResult Function(CreateTxError_RbfSequence value) rbfSequence, + required TResult Function(CreateTxError_RbfSequenceCsv value) + rbfSequenceCsv, + required TResult Function(CreateTxError_FeeTooLow value) feeTooLow, + required TResult Function(CreateTxError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(CreateTxError_NoUtxosSelected value) + noUtxosSelected, + required TResult Function(CreateTxError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(CreateTxError_ChangePolicyDescriptor value) + changePolicyDescriptor, + required TResult Function(CreateTxError_CoinSelection value) coinSelection, + required TResult Function(CreateTxError_InsufficientFunds value) + insufficientFunds, + required TResult Function(CreateTxError_NoRecipients value) noRecipients, + required TResult Function(CreateTxError_Psbt value) psbt, + required TResult Function(CreateTxError_MissingKeyOrigin value) + missingKeyOrigin, + required TResult Function(CreateTxError_UnknownUtxo value) unknownUtxo, + required TResult Function(CreateTxError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(CreateTxError_MiniscriptPsbt value) + miniscriptPsbt, }) { return spendingPolicyRequired(this); } @@ -14394,61 +8729,40 @@ class _$BdkError_SpendingPolicyRequiredImpl @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? + TResult? Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(CreateTxError_TransactionConfirmed value)? transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? + TResult? Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? + TResult? Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult? Function(CreateTxError_Generic value)? generic, + TResult? Function(CreateTxError_Descriptor value)? descriptor, + TResult? Function(CreateTxError_Policy value)? policy, + TResult? Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult? Function(CreateTxError_Version0 value)? version0, + TResult? Function(CreateTxError_Version1Csv value)? version1Csv, + TResult? Function(CreateTxError_LockTime value)? lockTime, + TResult? Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult? Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult? Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult? Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult? Function(CreateTxError_CoinSelection value)? coinSelection, + TResult? Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult? Function(CreateTxError_NoRecipients value)? noRecipients, + TResult? Function(CreateTxError_Psbt value)? psbt, + TResult? Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult? Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, }) { return spendingPolicyRequired?.call(this); } @@ -14456,58 +8770,40 @@ class _$BdkError_SpendingPolicyRequiredImpl @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? + TResult Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult Function(CreateTxError_TransactionConfirmed value)? + transactionConfirmed, + TResult Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? + TResult Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult Function(CreateTxError_Generic value)? generic, + TResult Function(CreateTxError_Descriptor value)? descriptor, + TResult Function(CreateTxError_Policy value)? policy, + TResult Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult Function(CreateTxError_Version0 value)? version0, + TResult Function(CreateTxError_Version1Csv value)? version1Csv, + TResult Function(CreateTxError_LockTime value)? lockTime, + TResult Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult Function(CreateTxError_CoinSelection value)? coinSelection, + TResult Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult Function(CreateTxError_NoRecipients value)? noRecipients, + TResult Function(CreateTxError_Psbt value)? psbt, + TResult Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, required TResult orElse(), }) { if (spendingPolicyRequired != null) { @@ -14517,248 +8813,158 @@ class _$BdkError_SpendingPolicyRequiredImpl } } -abstract class BdkError_SpendingPolicyRequired extends BdkError { - const factory BdkError_SpendingPolicyRequired(final KeychainKind field0) = - _$BdkError_SpendingPolicyRequiredImpl; - const BdkError_SpendingPolicyRequired._() : super._(); +abstract class CreateTxError_SpendingPolicyRequired extends CreateTxError { + const factory CreateTxError_SpendingPolicyRequired( + {required final String kind}) = + _$CreateTxError_SpendingPolicyRequiredImpl; + const CreateTxError_SpendingPolicyRequired._() : super._(); - KeychainKind get field0; + String get kind; @JsonKey(ignore: true) - _$$BdkError_SpendingPolicyRequiredImplCopyWith< - _$BdkError_SpendingPolicyRequiredImpl> + _$$CreateTxError_SpendingPolicyRequiredImplCopyWith< + _$CreateTxError_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}); +abstract class _$$CreateTxError_Version0ImplCopyWith<$Res> { + factory _$$CreateTxError_Version0ImplCopyWith( + _$CreateTxError_Version0Impl value, + $Res Function(_$CreateTxError_Version0Impl) then) = + __$$CreateTxError_Version0ImplCopyWithImpl<$Res>; } /// @nodoc -class __$$BdkError_InvalidPolicyPathErrorImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_InvalidPolicyPathErrorImpl> - implements _$$BdkError_InvalidPolicyPathErrorImplCopyWith<$Res> { - __$$BdkError_InvalidPolicyPathErrorImplCopyWithImpl( - _$BdkError_InvalidPolicyPathErrorImpl _value, - $Res Function(_$BdkError_InvalidPolicyPathErrorImpl) _then) +class __$$CreateTxError_Version0ImplCopyWithImpl<$Res> + extends _$CreateTxErrorCopyWithImpl<$Res, _$CreateTxError_Version0Impl> + implements _$$CreateTxError_Version0ImplCopyWith<$Res> { + __$$CreateTxError_Version0ImplCopyWithImpl( + _$CreateTxError_Version0Impl _value, + $Res Function(_$CreateTxError_Version0Impl) _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; +class _$CreateTxError_Version0Impl extends CreateTxError_Version0 { + const _$CreateTxError_Version0Impl() : super._(); @override String toString() { - return 'BdkError.invalidPolicyPathError(field0: $field0)'; + return 'CreateTxError.version0()'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_InvalidPolicyPathErrorImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$CreateTxError_Version0Impl); } @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); + int get hashCode => runtimeType.hashCode; @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, + required TResult Function(String txid) transactionNotFound, + required TResult Function(String txid) transactionConfirmed, + required TResult Function(String txid) irreplaceableTransaction, + required TResult Function() feeRateUnavailable, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) descriptor, + required TResult Function(String errorMessage) policy, + required TResult Function(String kind) spendingPolicyRequired, + required TResult Function() version0, + required TResult Function() version1Csv, + required TResult Function(String requestedTime, String requiredTime) + lockTime, + required TResult Function() rbfSequence, + required TResult Function(String rbf, String csv) rbfSequenceCsv, + required TResult Function(String feeRequired) feeTooLow, + required TResult Function(String feeRateRequired) feeRateTooLow, required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt index) outputBelowDustLimit, + required TResult Function() changePolicyDescriptor, + required TResult Function(String errorMessage) coinSelection, required TResult Function(BigInt needed, BigInt available) insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return invalidPolicyPathError(field0); + required TResult Function() noRecipients, + required TResult Function(String errorMessage) psbt, + required TResult Function(String key) missingKeyOrigin, + required TResult Function(String outpoint) unknownUtxo, + required TResult Function(String outpoint) missingNonWitnessUtxo, + required TResult Function(String errorMessage) miniscriptPsbt, + }) { + return version0(); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, + TResult? Function(String txid)? transactionNotFound, + TResult? Function(String txid)? transactionConfirmed, + TResult? Function(String txid)? irreplaceableTransaction, + TResult? Function()? feeRateUnavailable, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? descriptor, + TResult? Function(String errorMessage)? policy, + TResult? Function(String kind)? spendingPolicyRequired, + TResult? Function()? version0, + TResult? Function()? version1Csv, + TResult? Function(String requestedTime, String requiredTime)? lockTime, + TResult? Function()? rbfSequence, + TResult? Function(String rbf, String csv)? rbfSequenceCsv, + TResult? Function(String feeRequired)? feeTooLow, + TResult? Function(String feeRateRequired)? feeRateTooLow, TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt index)? outputBelowDustLimit, + TResult? Function()? changePolicyDescriptor, + TResult? Function(String errorMessage)? coinSelection, TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return invalidPolicyPathError?.call(field0); + TResult? Function()? noRecipients, + TResult? Function(String errorMessage)? psbt, + TResult? Function(String key)? missingKeyOrigin, + TResult? Function(String outpoint)? unknownUtxo, + TResult? Function(String outpoint)? missingNonWitnessUtxo, + TResult? Function(String errorMessage)? miniscriptPsbt, + }) { + return version0?.call(); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, + TResult Function(String txid)? transactionNotFound, + TResult Function(String txid)? transactionConfirmed, + TResult Function(String txid)? irreplaceableTransaction, + TResult Function()? feeRateUnavailable, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? descriptor, + TResult Function(String errorMessage)? policy, + TResult Function(String kind)? spendingPolicyRequired, + TResult Function()? version0, + TResult Function()? version1Csv, + TResult Function(String requestedTime, String requiredTime)? lockTime, + TResult Function()? rbfSequence, + TResult Function(String rbf, String csv)? rbfSequenceCsv, + TResult Function(String feeRequired)? feeTooLow, + TResult Function(String feeRateRequired)? feeRateTooLow, TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt index)? outputBelowDustLimit, + TResult Function()? changePolicyDescriptor, + TResult Function(String errorMessage)? coinSelection, TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (invalidPolicyPathError != null) { - return invalidPolicyPathError(field0); + TResult Function()? noRecipients, + TResult Function(String errorMessage)? psbt, + TResult Function(String key)? missingKeyOrigin, + TResult Function(String outpoint)? unknownUtxo, + TResult Function(String outpoint)? missingNonWitnessUtxo, + TResult Function(String errorMessage)? miniscriptPsbt, + required TResult orElse(), + }) { + if (version0 != null) { + return version0(); } return orElse(); } @@ -14766,434 +8972,280 @@ class _$BdkError_InvalidPolicyPathErrorImpl @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) + required TResult Function(CreateTxError_TransactionNotFound value) transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) + required TResult Function(CreateTxError_TransactionConfirmed value) transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) + required TResult Function(CreateTxError_IrreplaceableTransaction value) irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) + required TResult Function(CreateTxError_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) + required TResult Function(CreateTxError_Generic value) generic, + required TResult Function(CreateTxError_Descriptor value) descriptor, + required TResult Function(CreateTxError_Policy value) policy, + required TResult Function(CreateTxError_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); + required TResult Function(CreateTxError_Version0 value) version0, + required TResult Function(CreateTxError_Version1Csv value) version1Csv, + required TResult Function(CreateTxError_LockTime value) lockTime, + required TResult Function(CreateTxError_RbfSequence value) rbfSequence, + required TResult Function(CreateTxError_RbfSequenceCsv value) + rbfSequenceCsv, + required TResult Function(CreateTxError_FeeTooLow value) feeTooLow, + required TResult Function(CreateTxError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(CreateTxError_NoUtxosSelected value) + noUtxosSelected, + required TResult Function(CreateTxError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(CreateTxError_ChangePolicyDescriptor value) + changePolicyDescriptor, + required TResult Function(CreateTxError_CoinSelection value) coinSelection, + required TResult Function(CreateTxError_InsufficientFunds value) + insufficientFunds, + required TResult Function(CreateTxError_NoRecipients value) noRecipients, + required TResult Function(CreateTxError_Psbt value) psbt, + required TResult Function(CreateTxError_MissingKeyOrigin value) + missingKeyOrigin, + required TResult Function(CreateTxError_UnknownUtxo value) unknownUtxo, + required TResult Function(CreateTxError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(CreateTxError_MiniscriptPsbt value) + miniscriptPsbt, + }) { + return version0(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? + TResult? Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(CreateTxError_TransactionConfirmed value)? transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? + TResult? Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? + TResult? Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult? Function(CreateTxError_Generic value)? generic, + TResult? Function(CreateTxError_Descriptor value)? descriptor, + TResult? Function(CreateTxError_Policy value)? policy, + TResult? Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - 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); + TResult? Function(CreateTxError_Version0 value)? version0, + TResult? Function(CreateTxError_Version1Csv value)? version1Csv, + TResult? Function(CreateTxError_LockTime value)? lockTime, + TResult? Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult? Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult? Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult? Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult? Function(CreateTxError_CoinSelection value)? coinSelection, + TResult? Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult? Function(CreateTxError_NoRecipients value)? noRecipients, + TResult? Function(CreateTxError_Psbt value)? psbt, + TResult? Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult? Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, + }) { + return version0?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? + TResult Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult Function(CreateTxError_TransactionConfirmed value)? + transactionConfirmed, + TResult Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? + TResult Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult Function(CreateTxError_Generic value)? generic, + TResult Function(CreateTxError_Descriptor value)? descriptor, + TResult Function(CreateTxError_Policy value)? policy, + TResult Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - 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; + TResult Function(CreateTxError_Version0 value)? version0, + TResult Function(CreateTxError_Version1Csv value)? version1Csv, + TResult Function(CreateTxError_LockTime value)? lockTime, + TResult Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult Function(CreateTxError_CoinSelection value)? coinSelection, + TResult Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult Function(CreateTxError_NoRecipients value)? noRecipients, + TResult Function(CreateTxError_Psbt value)? psbt, + TResult Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, + required TResult orElse(), + }) { + if (version0 != null) { + return version0(this); + } + return orElse(); + } } -/// @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}); +abstract class CreateTxError_Version0 extends CreateTxError { + const factory CreateTxError_Version0() = _$CreateTxError_Version0Impl; + const CreateTxError_Version0._() : super._(); } /// @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, - )); - } +abstract class _$$CreateTxError_Version1CsvImplCopyWith<$Res> { + factory _$$CreateTxError_Version1CsvImplCopyWith( + _$CreateTxError_Version1CsvImpl value, + $Res Function(_$CreateTxError_Version1CsvImpl) then) = + __$$CreateTxError_Version1CsvImplCopyWithImpl<$Res>; } /// @nodoc +class __$$CreateTxError_Version1CsvImplCopyWithImpl<$Res> + extends _$CreateTxErrorCopyWithImpl<$Res, _$CreateTxError_Version1CsvImpl> + implements _$$CreateTxError_Version1CsvImplCopyWith<$Res> { + __$$CreateTxError_Version1CsvImplCopyWithImpl( + _$CreateTxError_Version1CsvImpl _value, + $Res Function(_$CreateTxError_Version1CsvImpl) _then) + : super(_value, _then); +} -class _$BdkError_SignerImpl extends BdkError_Signer { - const _$BdkError_SignerImpl(this.field0) : super._(); +/// @nodoc - @override - final String field0; +class _$CreateTxError_Version1CsvImpl extends CreateTxError_Version1Csv { + const _$CreateTxError_Version1CsvImpl() : super._(); @override String toString() { - return 'BdkError.signer(field0: $field0)'; + return 'CreateTxError.version1Csv()'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_SignerImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$CreateTxError_Version1CsvImpl); } @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); + int get hashCode => runtimeType.hashCode; @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, + required TResult Function(String txid) transactionNotFound, + required TResult Function(String txid) transactionConfirmed, + required TResult Function(String txid) irreplaceableTransaction, + required TResult Function() feeRateUnavailable, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) descriptor, + required TResult Function(String errorMessage) policy, + required TResult Function(String kind) spendingPolicyRequired, + required TResult Function() version0, + required TResult Function() version1Csv, + required TResult Function(String requestedTime, String requiredTime) + lockTime, + required TResult Function() rbfSequence, + required TResult Function(String rbf, String csv) rbfSequenceCsv, + required TResult Function(String feeRequired) feeTooLow, + required TResult Function(String feeRateRequired) feeRateTooLow, required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt index) outputBelowDustLimit, + required TResult Function() changePolicyDescriptor, + required TResult Function(String errorMessage) coinSelection, required TResult Function(BigInt needed, BigInt available) insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return signer(field0); + required TResult Function() noRecipients, + required TResult Function(String errorMessage) psbt, + required TResult Function(String key) missingKeyOrigin, + required TResult Function(String outpoint) unknownUtxo, + required TResult Function(String outpoint) missingNonWitnessUtxo, + required TResult Function(String errorMessage) miniscriptPsbt, + }) { + return version1Csv(); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, + TResult? Function(String txid)? transactionNotFound, + TResult? Function(String txid)? transactionConfirmed, + TResult? Function(String txid)? irreplaceableTransaction, + TResult? Function()? feeRateUnavailable, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? descriptor, + TResult? Function(String errorMessage)? policy, + TResult? Function(String kind)? spendingPolicyRequired, + TResult? Function()? version0, + TResult? Function()? version1Csv, + TResult? Function(String requestedTime, String requiredTime)? lockTime, + TResult? Function()? rbfSequence, + TResult? Function(String rbf, String csv)? rbfSequenceCsv, + TResult? Function(String feeRequired)? feeTooLow, + TResult? Function(String feeRateRequired)? feeRateTooLow, TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt index)? outputBelowDustLimit, + TResult? Function()? changePolicyDescriptor, + TResult? Function(String errorMessage)? coinSelection, TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return signer?.call(field0); + TResult? Function()? noRecipients, + TResult? Function(String errorMessage)? psbt, + TResult? Function(String key)? missingKeyOrigin, + TResult? Function(String outpoint)? unknownUtxo, + TResult? Function(String outpoint)? missingNonWitnessUtxo, + TResult? Function(String errorMessage)? miniscriptPsbt, + }) { + return version1Csv?.call(); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, + TResult Function(String txid)? transactionNotFound, + TResult Function(String txid)? transactionConfirmed, + TResult Function(String txid)? irreplaceableTransaction, + TResult Function()? feeRateUnavailable, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? descriptor, + TResult Function(String errorMessage)? policy, + TResult Function(String kind)? spendingPolicyRequired, + TResult Function()? version0, + TResult Function()? version1Csv, + TResult Function(String requestedTime, String requiredTime)? lockTime, + TResult Function()? rbfSequence, + TResult Function(String rbf, String csv)? rbfSequenceCsv, + TResult Function(String feeRequired)? feeTooLow, + TResult Function(String feeRateRequired)? feeRateTooLow, TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt index)? outputBelowDustLimit, + TResult Function()? changePolicyDescriptor, + TResult Function(String errorMessage)? coinSelection, TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (signer != null) { - return signer(field0); + TResult Function()? noRecipients, + TResult Function(String errorMessage)? psbt, + TResult Function(String key)? missingKeyOrigin, + TResult Function(String outpoint)? unknownUtxo, + TResult Function(String outpoint)? missingNonWitnessUtxo, + TResult Function(String errorMessage)? miniscriptPsbt, + required TResult orElse(), + }) { + if (version1Csv != null) { + return version1Csv(); } return orElse(); } @@ -15201,448 +9253,318 @@ class _$BdkError_SignerImpl extends BdkError_Signer { @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) + required TResult Function(CreateTxError_TransactionNotFound value) transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) + required TResult Function(CreateTxError_TransactionConfirmed value) transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) + required TResult Function(CreateTxError_IrreplaceableTransaction value) irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) + required TResult Function(CreateTxError_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) + required TResult Function(CreateTxError_Generic value) generic, + required TResult Function(CreateTxError_Descriptor value) descriptor, + required TResult Function(CreateTxError_Policy value) policy, + required TResult Function(CreateTxError_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); + required TResult Function(CreateTxError_Version0 value) version0, + required TResult Function(CreateTxError_Version1Csv value) version1Csv, + required TResult Function(CreateTxError_LockTime value) lockTime, + required TResult Function(CreateTxError_RbfSequence value) rbfSequence, + required TResult Function(CreateTxError_RbfSequenceCsv value) + rbfSequenceCsv, + required TResult Function(CreateTxError_FeeTooLow value) feeTooLow, + required TResult Function(CreateTxError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(CreateTxError_NoUtxosSelected value) + noUtxosSelected, + required TResult Function(CreateTxError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(CreateTxError_ChangePolicyDescriptor value) + changePolicyDescriptor, + required TResult Function(CreateTxError_CoinSelection value) coinSelection, + required TResult Function(CreateTxError_InsufficientFunds value) + insufficientFunds, + required TResult Function(CreateTxError_NoRecipients value) noRecipients, + required TResult Function(CreateTxError_Psbt value) psbt, + required TResult Function(CreateTxError_MissingKeyOrigin value) + missingKeyOrigin, + required TResult Function(CreateTxError_UnknownUtxo value) unknownUtxo, + required TResult Function(CreateTxError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(CreateTxError_MiniscriptPsbt value) + miniscriptPsbt, + }) { + return version1Csv(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? + TResult? Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(CreateTxError_TransactionConfirmed value)? transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? + TResult? Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? + TResult? Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult? Function(CreateTxError_Generic value)? generic, + TResult? Function(CreateTxError_Descriptor value)? descriptor, + TResult? Function(CreateTxError_Policy value)? policy, + TResult? Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - 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); + TResult? Function(CreateTxError_Version0 value)? version0, + TResult? Function(CreateTxError_Version1Csv value)? version1Csv, + TResult? Function(CreateTxError_LockTime value)? lockTime, + TResult? Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult? Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult? Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult? Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult? Function(CreateTxError_CoinSelection value)? coinSelection, + TResult? Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult? Function(CreateTxError_NoRecipients value)? noRecipients, + TResult? Function(CreateTxError_Psbt value)? psbt, + TResult? Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult? Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, + }) { + return version1Csv?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? + TResult Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult Function(CreateTxError_TransactionConfirmed value)? + transactionConfirmed, + TResult Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? + TResult Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult Function(CreateTxError_Generic value)? generic, + TResult Function(CreateTxError_Descriptor value)? descriptor, + TResult Function(CreateTxError_Policy value)? policy, + TResult Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - 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; + TResult Function(CreateTxError_Version0 value)? version0, + TResult Function(CreateTxError_Version1Csv value)? version1Csv, + TResult Function(CreateTxError_LockTime value)? lockTime, + TResult Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult Function(CreateTxError_CoinSelection value)? coinSelection, + TResult Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult Function(CreateTxError_NoRecipients value)? noRecipients, + TResult Function(CreateTxError_Psbt value)? psbt, + TResult Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, + required TResult orElse(), + }) { + if (version1Csv != null) { + return version1Csv(this); + } + return orElse(); + } +} + +abstract class CreateTxError_Version1Csv extends CreateTxError { + const factory CreateTxError_Version1Csv() = _$CreateTxError_Version1CsvImpl; + const CreateTxError_Version1Csv._() : super._(); } /// @nodoc -abstract class _$$BdkError_InvalidNetworkImplCopyWith<$Res> { - factory _$$BdkError_InvalidNetworkImplCopyWith( - _$BdkError_InvalidNetworkImpl value, - $Res Function(_$BdkError_InvalidNetworkImpl) then) = - __$$BdkError_InvalidNetworkImplCopyWithImpl<$Res>; +abstract class _$$CreateTxError_LockTimeImplCopyWith<$Res> { + factory _$$CreateTxError_LockTimeImplCopyWith( + _$CreateTxError_LockTimeImpl value, + $Res Function(_$CreateTxError_LockTimeImpl) then) = + __$$CreateTxError_LockTimeImplCopyWithImpl<$Res>; @useResult - $Res call({Network requested, Network found}); + $Res call({String requestedTime, String requiredTime}); } /// @nodoc -class __$$BdkError_InvalidNetworkImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_InvalidNetworkImpl> - implements _$$BdkError_InvalidNetworkImplCopyWith<$Res> { - __$$BdkError_InvalidNetworkImplCopyWithImpl( - _$BdkError_InvalidNetworkImpl _value, - $Res Function(_$BdkError_InvalidNetworkImpl) _then) +class __$$CreateTxError_LockTimeImplCopyWithImpl<$Res> + extends _$CreateTxErrorCopyWithImpl<$Res, _$CreateTxError_LockTimeImpl> + implements _$$CreateTxError_LockTimeImplCopyWith<$Res> { + __$$CreateTxError_LockTimeImplCopyWithImpl( + _$CreateTxError_LockTimeImpl _value, + $Res Function(_$CreateTxError_LockTimeImpl) _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, + Object? requestedTime = null, + Object? requiredTime = null, + }) { + return _then(_$CreateTxError_LockTimeImpl( + requestedTime: null == requestedTime + ? _value.requestedTime + : requestedTime // ignore: cast_nullable_to_non_nullable + as String, + requiredTime: null == requiredTime + ? _value.requiredTime + : requiredTime // ignore: cast_nullable_to_non_nullable + as String, )); } } /// @nodoc -class _$BdkError_InvalidNetworkImpl extends BdkError_InvalidNetwork { - const _$BdkError_InvalidNetworkImpl( - {required this.requested, required this.found}) +class _$CreateTxError_LockTimeImpl extends CreateTxError_LockTime { + const _$CreateTxError_LockTimeImpl( + {required this.requestedTime, required this.requiredTime}) : 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 + final String requestedTime; @override - final Network found; + final String requiredTime; @override String toString() { - return 'BdkError.invalidNetwork(requested: $requested, found: $found)'; + return 'CreateTxError.lockTime(requestedTime: $requestedTime, requiredTime: $requiredTime)'; } @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)); + other is _$CreateTxError_LockTimeImpl && + (identical(other.requestedTime, requestedTime) || + other.requestedTime == requestedTime) && + (identical(other.requiredTime, requiredTime) || + other.requiredTime == requiredTime)); } @override - int get hashCode => Object.hash(runtimeType, requested, found); + int get hashCode => Object.hash(runtimeType, requestedTime, requiredTime); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$BdkError_InvalidNetworkImplCopyWith<_$BdkError_InvalidNetworkImpl> - get copyWith => __$$BdkError_InvalidNetworkImplCopyWithImpl< - _$BdkError_InvalidNetworkImpl>(this, _$identity); + _$$CreateTxError_LockTimeImplCopyWith<_$CreateTxError_LockTimeImpl> + get copyWith => __$$CreateTxError_LockTimeImplCopyWithImpl< + _$CreateTxError_LockTimeImpl>(this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, + required TResult Function(String txid) transactionNotFound, + required TResult Function(String txid) transactionConfirmed, + required TResult Function(String txid) irreplaceableTransaction, + required TResult Function() feeRateUnavailable, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) descriptor, + required TResult Function(String errorMessage) policy, + required TResult Function(String kind) spendingPolicyRequired, + required TResult Function() version0, + required TResult Function() version1Csv, + required TResult Function(String requestedTime, String requiredTime) + lockTime, + required TResult Function() rbfSequence, + required TResult Function(String rbf, String csv) rbfSequenceCsv, + required TResult Function(String feeRequired) feeTooLow, + required TResult Function(String feeRateRequired) feeRateTooLow, required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt index) outputBelowDustLimit, + required TResult Function() changePolicyDescriptor, + required TResult Function(String errorMessage) coinSelection, required TResult Function(BigInt needed, BigInt available) insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return invalidNetwork(requested, found); + required TResult Function() noRecipients, + required TResult Function(String errorMessage) psbt, + required TResult Function(String key) missingKeyOrigin, + required TResult Function(String outpoint) unknownUtxo, + required TResult Function(String outpoint) missingNonWitnessUtxo, + required TResult Function(String errorMessage) miniscriptPsbt, + }) { + return lockTime(requestedTime, requiredTime); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, + TResult? Function(String txid)? transactionNotFound, + TResult? Function(String txid)? transactionConfirmed, + TResult? Function(String txid)? irreplaceableTransaction, + TResult? Function()? feeRateUnavailable, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? descriptor, + TResult? Function(String errorMessage)? policy, + TResult? Function(String kind)? spendingPolicyRequired, + TResult? Function()? version0, + TResult? Function()? version1Csv, + TResult? Function(String requestedTime, String requiredTime)? lockTime, + TResult? Function()? rbfSequence, + TResult? Function(String rbf, String csv)? rbfSequenceCsv, + TResult? Function(String feeRequired)? feeTooLow, + TResult? Function(String feeRateRequired)? feeRateTooLow, TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt index)? outputBelowDustLimit, + TResult? Function()? changePolicyDescriptor, + TResult? Function(String errorMessage)? coinSelection, TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return invalidNetwork?.call(requested, found); + TResult? Function()? noRecipients, + TResult? Function(String errorMessage)? psbt, + TResult? Function(String key)? missingKeyOrigin, + TResult? Function(String outpoint)? unknownUtxo, + TResult? Function(String outpoint)? missingNonWitnessUtxo, + TResult? Function(String errorMessage)? miniscriptPsbt, + }) { + return lockTime?.call(requestedTime, requiredTime); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, + TResult Function(String txid)? transactionNotFound, + TResult Function(String txid)? transactionConfirmed, + TResult Function(String txid)? irreplaceableTransaction, + TResult Function()? feeRateUnavailable, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? descriptor, + TResult Function(String errorMessage)? policy, + TResult Function(String kind)? spendingPolicyRequired, + TResult Function()? version0, + TResult Function()? version1Csv, + TResult Function(String requestedTime, String requiredTime)? lockTime, + TResult Function()? rbfSequence, + TResult Function(String rbf, String csv)? rbfSequenceCsv, + TResult Function(String feeRequired)? feeTooLow, + TResult Function(String feeRateRequired)? feeRateTooLow, TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt index)? outputBelowDustLimit, + TResult Function()? changePolicyDescriptor, + TResult Function(String errorMessage)? coinSelection, TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (invalidNetwork != null) { - return invalidNetwork(requested, found); + TResult Function()? noRecipients, + TResult Function(String errorMessage)? psbt, + TResult Function(String key)? missingKeyOrigin, + TResult Function(String outpoint)? unknownUtxo, + TResult Function(String outpoint)? missingNonWitnessUtxo, + TResult Function(String errorMessage)? miniscriptPsbt, + required TResult orElse(), + }) { + if (lockTime != null) { + return lockTime(requestedTime, requiredTime); } return orElse(); } @@ -15650,440 +9572,288 @@ class _$BdkError_InvalidNetworkImpl extends BdkError_InvalidNetwork { @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) + required TResult Function(CreateTxError_TransactionNotFound value) transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) + required TResult Function(CreateTxError_TransactionConfirmed value) transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) + required TResult Function(CreateTxError_IrreplaceableTransaction value) irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) + required TResult Function(CreateTxError_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) + required TResult Function(CreateTxError_Generic value) generic, + required TResult Function(CreateTxError_Descriptor value) descriptor, + required TResult Function(CreateTxError_Policy value) policy, + required TResult Function(CreateTxError_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); + required TResult Function(CreateTxError_Version0 value) version0, + required TResult Function(CreateTxError_Version1Csv value) version1Csv, + required TResult Function(CreateTxError_LockTime value) lockTime, + required TResult Function(CreateTxError_RbfSequence value) rbfSequence, + required TResult Function(CreateTxError_RbfSequenceCsv value) + rbfSequenceCsv, + required TResult Function(CreateTxError_FeeTooLow value) feeTooLow, + required TResult Function(CreateTxError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(CreateTxError_NoUtxosSelected value) + noUtxosSelected, + required TResult Function(CreateTxError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(CreateTxError_ChangePolicyDescriptor value) + changePolicyDescriptor, + required TResult Function(CreateTxError_CoinSelection value) coinSelection, + required TResult Function(CreateTxError_InsufficientFunds value) + insufficientFunds, + required TResult Function(CreateTxError_NoRecipients value) noRecipients, + required TResult Function(CreateTxError_Psbt value) psbt, + required TResult Function(CreateTxError_MissingKeyOrigin value) + missingKeyOrigin, + required TResult Function(CreateTxError_UnknownUtxo value) unknownUtxo, + required TResult Function(CreateTxError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(CreateTxError_MiniscriptPsbt value) + miniscriptPsbt, + }) { + return lockTime(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? + TResult? Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(CreateTxError_TransactionConfirmed value)? transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? + TResult? Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? + TResult? Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult? Function(CreateTxError_Generic value)? generic, + TResult? Function(CreateTxError_Descriptor value)? descriptor, + TResult? Function(CreateTxError_Policy value)? policy, + TResult? Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - 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); + TResult? Function(CreateTxError_Version0 value)? version0, + TResult? Function(CreateTxError_Version1Csv value)? version1Csv, + TResult? Function(CreateTxError_LockTime value)? lockTime, + TResult? Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult? Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult? Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult? Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult? Function(CreateTxError_CoinSelection value)? coinSelection, + TResult? Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult? Function(CreateTxError_NoRecipients value)? noRecipients, + TResult? Function(CreateTxError_Psbt value)? psbt, + TResult? Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult? Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, + }) { + return lockTime?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? + TResult Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult Function(CreateTxError_TransactionConfirmed value)? + transactionConfirmed, + TResult Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? + TResult Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult Function(CreateTxError_Generic value)? generic, + TResult Function(CreateTxError_Descriptor value)? descriptor, + TResult Function(CreateTxError_Policy value)? policy, + TResult Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - 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; + TResult Function(CreateTxError_Version0 value)? version0, + TResult Function(CreateTxError_Version1Csv value)? version1Csv, + TResult Function(CreateTxError_LockTime value)? lockTime, + TResult Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult Function(CreateTxError_CoinSelection value)? coinSelection, + TResult Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult Function(CreateTxError_NoRecipients value)? noRecipients, + TResult Function(CreateTxError_Psbt value)? psbt, + TResult Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, + required TResult orElse(), + }) { + if (lockTime != null) { + return lockTime(this); + } + return orElse(); + } +} + +abstract class CreateTxError_LockTime extends CreateTxError { + const factory CreateTxError_LockTime( + {required final String requestedTime, + required final String requiredTime}) = _$CreateTxError_LockTimeImpl; + const CreateTxError_LockTime._() : super._(); + + String get requestedTime; + String get requiredTime; @JsonKey(ignore: true) - _$$BdkError_InvalidNetworkImplCopyWith<_$BdkError_InvalidNetworkImpl> + _$$CreateTxError_LockTimeImplCopyWith<_$CreateTxError_LockTimeImpl> 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}); +abstract class _$$CreateTxError_RbfSequenceImplCopyWith<$Res> { + factory _$$CreateTxError_RbfSequenceImplCopyWith( + _$CreateTxError_RbfSequenceImpl value, + $Res Function(_$CreateTxError_RbfSequenceImpl) then) = + __$$CreateTxError_RbfSequenceImplCopyWithImpl<$Res>; } /// @nodoc -class __$$BdkError_InvalidOutpointImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_InvalidOutpointImpl> - implements _$$BdkError_InvalidOutpointImplCopyWith<$Res> { - __$$BdkError_InvalidOutpointImplCopyWithImpl( - _$BdkError_InvalidOutpointImpl _value, - $Res Function(_$BdkError_InvalidOutpointImpl) _then) +class __$$CreateTxError_RbfSequenceImplCopyWithImpl<$Res> + extends _$CreateTxErrorCopyWithImpl<$Res, _$CreateTxError_RbfSequenceImpl> + implements _$$CreateTxError_RbfSequenceImplCopyWith<$Res> { + __$$CreateTxError_RbfSequenceImplCopyWithImpl( + _$CreateTxError_RbfSequenceImpl _value, + $Res Function(_$CreateTxError_RbfSequenceImpl) _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; +class _$CreateTxError_RbfSequenceImpl extends CreateTxError_RbfSequence { + const _$CreateTxError_RbfSequenceImpl() : super._(); @override String toString() { - return 'BdkError.invalidOutpoint(field0: $field0)'; + return 'CreateTxError.rbfSequence()'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_InvalidOutpointImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$CreateTxError_RbfSequenceImpl); } @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); + int get hashCode => runtimeType.hashCode; @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, + required TResult Function(String txid) transactionNotFound, + required TResult Function(String txid) transactionConfirmed, + required TResult Function(String txid) irreplaceableTransaction, + required TResult Function() feeRateUnavailable, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) descriptor, + required TResult Function(String errorMessage) policy, + required TResult Function(String kind) spendingPolicyRequired, + required TResult Function() version0, + required TResult Function() version1Csv, + required TResult Function(String requestedTime, String requiredTime) + lockTime, + required TResult Function() rbfSequence, + required TResult Function(String rbf, String csv) rbfSequenceCsv, + required TResult Function(String feeRequired) feeTooLow, + required TResult Function(String feeRateRequired) feeRateTooLow, required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt index) outputBelowDustLimit, + required TResult Function() changePolicyDescriptor, + required TResult Function(String errorMessage) coinSelection, required TResult Function(BigInt needed, BigInt available) insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return invalidOutpoint(field0); + required TResult Function() noRecipients, + required TResult Function(String errorMessage) psbt, + required TResult Function(String key) missingKeyOrigin, + required TResult Function(String outpoint) unknownUtxo, + required TResult Function(String outpoint) missingNonWitnessUtxo, + required TResult Function(String errorMessage) miniscriptPsbt, + }) { + return rbfSequence(); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, + TResult? Function(String txid)? transactionNotFound, + TResult? Function(String txid)? transactionConfirmed, + TResult? Function(String txid)? irreplaceableTransaction, + TResult? Function()? feeRateUnavailable, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? descriptor, + TResult? Function(String errorMessage)? policy, + TResult? Function(String kind)? spendingPolicyRequired, + TResult? Function()? version0, + TResult? Function()? version1Csv, + TResult? Function(String requestedTime, String requiredTime)? lockTime, + TResult? Function()? rbfSequence, + TResult? Function(String rbf, String csv)? rbfSequenceCsv, + TResult? Function(String feeRequired)? feeTooLow, + TResult? Function(String feeRateRequired)? feeRateTooLow, TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt index)? outputBelowDustLimit, + TResult? Function()? changePolicyDescriptor, + TResult? Function(String errorMessage)? coinSelection, TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return invalidOutpoint?.call(field0); + TResult? Function()? noRecipients, + TResult? Function(String errorMessage)? psbt, + TResult? Function(String key)? missingKeyOrigin, + TResult? Function(String outpoint)? unknownUtxo, + TResult? Function(String outpoint)? missingNonWitnessUtxo, + TResult? Function(String errorMessage)? miniscriptPsbt, + }) { + return rbfSequence?.call(); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, + TResult Function(String txid)? transactionNotFound, + TResult Function(String txid)? transactionConfirmed, + TResult Function(String txid)? irreplaceableTransaction, + TResult Function()? feeRateUnavailable, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? descriptor, + TResult Function(String errorMessage)? policy, + TResult Function(String kind)? spendingPolicyRequired, + TResult Function()? version0, + TResult Function()? version1Csv, + TResult Function(String requestedTime, String requiredTime)? lockTime, + TResult Function()? rbfSequence, + TResult Function(String rbf, String csv)? rbfSequenceCsv, + TResult Function(String feeRequired)? feeTooLow, + TResult Function(String feeRateRequired)? feeRateTooLow, TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt index)? outputBelowDustLimit, + TResult Function()? changePolicyDescriptor, + TResult Function(String errorMessage)? coinSelection, TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (invalidOutpoint != null) { - return invalidOutpoint(field0); + TResult Function()? noRecipients, + TResult Function(String errorMessage)? psbt, + TResult Function(String key)? missingKeyOrigin, + TResult Function(String outpoint)? unknownUtxo, + TResult Function(String outpoint)? missingNonWitnessUtxo, + TResult Function(String errorMessage)? miniscriptPsbt, + required TResult orElse(), + }) { + if (rbfSequence != null) { + return rbfSequence(); } return orElse(); } @@ -16091,233 +9861,175 @@ class _$BdkError_InvalidOutpointImpl extends BdkError_InvalidOutpoint { @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) + required TResult Function(CreateTxError_TransactionNotFound value) transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) + required TResult Function(CreateTxError_TransactionConfirmed value) transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) + required TResult Function(CreateTxError_IrreplaceableTransaction value) irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) + required TResult Function(CreateTxError_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) + required TResult Function(CreateTxError_Generic value) generic, + required TResult Function(CreateTxError_Descriptor value) descriptor, + required TResult Function(CreateTxError_Policy value) policy, + required TResult Function(CreateTxError_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); + required TResult Function(CreateTxError_Version0 value) version0, + required TResult Function(CreateTxError_Version1Csv value) version1Csv, + required TResult Function(CreateTxError_LockTime value) lockTime, + required TResult Function(CreateTxError_RbfSequence value) rbfSequence, + required TResult Function(CreateTxError_RbfSequenceCsv value) + rbfSequenceCsv, + required TResult Function(CreateTxError_FeeTooLow value) feeTooLow, + required TResult Function(CreateTxError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(CreateTxError_NoUtxosSelected value) + noUtxosSelected, + required TResult Function(CreateTxError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(CreateTxError_ChangePolicyDescriptor value) + changePolicyDescriptor, + required TResult Function(CreateTxError_CoinSelection value) coinSelection, + required TResult Function(CreateTxError_InsufficientFunds value) + insufficientFunds, + required TResult Function(CreateTxError_NoRecipients value) noRecipients, + required TResult Function(CreateTxError_Psbt value) psbt, + required TResult Function(CreateTxError_MissingKeyOrigin value) + missingKeyOrigin, + required TResult Function(CreateTxError_UnknownUtxo value) unknownUtxo, + required TResult Function(CreateTxError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(CreateTxError_MiniscriptPsbt value) + miniscriptPsbt, + }) { + return rbfSequence(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? + TResult? Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(CreateTxError_TransactionConfirmed value)? transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? + TResult? Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? + TResult? Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult? Function(CreateTxError_Generic value)? generic, + TResult? Function(CreateTxError_Descriptor value)? descriptor, + TResult? Function(CreateTxError_Policy value)? policy, + TResult? Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - 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); + TResult? Function(CreateTxError_Version0 value)? version0, + TResult? Function(CreateTxError_Version1Csv value)? version1Csv, + TResult? Function(CreateTxError_LockTime value)? lockTime, + TResult? Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult? Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult? Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult? Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult? Function(CreateTxError_CoinSelection value)? coinSelection, + TResult? Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult? Function(CreateTxError_NoRecipients value)? noRecipients, + TResult? Function(CreateTxError_Psbt value)? psbt, + TResult? Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult? Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, + }) { + return rbfSequence?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? + TResult Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult Function(CreateTxError_TransactionConfirmed value)? + transactionConfirmed, + TResult Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? + TResult Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult Function(CreateTxError_Generic value)? generic, + TResult Function(CreateTxError_Descriptor value)? descriptor, + TResult Function(CreateTxError_Policy value)? policy, + TResult Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - 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; + TResult Function(CreateTxError_Version0 value)? version0, + TResult Function(CreateTxError_Version1Csv value)? version1Csv, + TResult Function(CreateTxError_LockTime value)? lockTime, + TResult Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult Function(CreateTxError_CoinSelection value)? coinSelection, + TResult Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult Function(CreateTxError_NoRecipients value)? noRecipients, + TResult Function(CreateTxError_Psbt value)? psbt, + TResult Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, + required TResult orElse(), + }) { + if (rbfSequence != null) { + return rbfSequence(this); + } + return orElse(); + } +} + +abstract class CreateTxError_RbfSequence extends CreateTxError { + const factory CreateTxError_RbfSequence() = _$CreateTxError_RbfSequenceImpl; + const CreateTxError_RbfSequence._() : super._(); } /// @nodoc -abstract class _$$BdkError_EncodeImplCopyWith<$Res> { - factory _$$BdkError_EncodeImplCopyWith(_$BdkError_EncodeImpl value, - $Res Function(_$BdkError_EncodeImpl) then) = - __$$BdkError_EncodeImplCopyWithImpl<$Res>; +abstract class _$$CreateTxError_RbfSequenceCsvImplCopyWith<$Res> { + factory _$$CreateTxError_RbfSequenceCsvImplCopyWith( + _$CreateTxError_RbfSequenceCsvImpl value, + $Res Function(_$CreateTxError_RbfSequenceCsvImpl) then) = + __$$CreateTxError_RbfSequenceCsvImplCopyWithImpl<$Res>; @useResult - $Res call({String field0}); + $Res call({String rbf, String csv}); } /// @nodoc -class __$$BdkError_EncodeImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_EncodeImpl> - implements _$$BdkError_EncodeImplCopyWith<$Res> { - __$$BdkError_EncodeImplCopyWithImpl( - _$BdkError_EncodeImpl _value, $Res Function(_$BdkError_EncodeImpl) _then) +class __$$CreateTxError_RbfSequenceCsvImplCopyWithImpl<$Res> + extends _$CreateTxErrorCopyWithImpl<$Res, + _$CreateTxError_RbfSequenceCsvImpl> + implements _$$CreateTxError_RbfSequenceCsvImplCopyWith<$Res> { + __$$CreateTxError_RbfSequenceCsvImplCopyWithImpl( + _$CreateTxError_RbfSequenceCsvImpl _value, + $Res Function(_$CreateTxError_RbfSequenceCsvImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? field0 = null, + Object? rbf = null, + Object? csv = null, }) { - return _then(_$BdkError_EncodeImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable + return _then(_$CreateTxError_RbfSequenceCsvImpl( + rbf: null == rbf + ? _value.rbf + : rbf // ignore: cast_nullable_to_non_nullable + as String, + csv: null == csv + ? _value.csv + : csv // ignore: cast_nullable_to_non_nullable as String, )); } @@ -16325,199 +10037,142 @@ class __$$BdkError_EncodeImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_EncodeImpl extends BdkError_Encode { - const _$BdkError_EncodeImpl(this.field0) : super._(); +class _$CreateTxError_RbfSequenceCsvImpl extends CreateTxError_RbfSequenceCsv { + const _$CreateTxError_RbfSequenceCsvImpl( + {required this.rbf, required this.csv}) + : super._(); @override - final String field0; + final String rbf; + @override + final String csv; @override String toString() { - return 'BdkError.encode(field0: $field0)'; + return 'CreateTxError.rbfSequenceCsv(rbf: $rbf, csv: $csv)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_EncodeImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$CreateTxError_RbfSequenceCsvImpl && + (identical(other.rbf, rbf) || other.rbf == rbf) && + (identical(other.csv, csv) || other.csv == csv)); } @override - int get hashCode => Object.hash(runtimeType, field0); + int get hashCode => Object.hash(runtimeType, rbf, csv); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$BdkError_EncodeImplCopyWith<_$BdkError_EncodeImpl> get copyWith => - __$$BdkError_EncodeImplCopyWithImpl<_$BdkError_EncodeImpl>( - this, _$identity); + _$$CreateTxError_RbfSequenceCsvImplCopyWith< + _$CreateTxError_RbfSequenceCsvImpl> + get copyWith => __$$CreateTxError_RbfSequenceCsvImplCopyWithImpl< + _$CreateTxError_RbfSequenceCsvImpl>(this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, + required TResult Function(String txid) transactionNotFound, + required TResult Function(String txid) transactionConfirmed, + required TResult Function(String txid) irreplaceableTransaction, + required TResult Function() feeRateUnavailable, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) descriptor, + required TResult Function(String errorMessage) policy, + required TResult Function(String kind) spendingPolicyRequired, + required TResult Function() version0, + required TResult Function() version1Csv, + required TResult Function(String requestedTime, String requiredTime) + lockTime, + required TResult Function() rbfSequence, + required TResult Function(String rbf, String csv) rbfSequenceCsv, + required TResult Function(String feeRequired) feeTooLow, + required TResult Function(String feeRateRequired) feeRateTooLow, required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt index) outputBelowDustLimit, + required TResult Function() changePolicyDescriptor, + required TResult Function(String errorMessage) coinSelection, required TResult Function(BigInt needed, BigInt available) insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return encode(field0); + required TResult Function() noRecipients, + required TResult Function(String errorMessage) psbt, + required TResult Function(String key) missingKeyOrigin, + required TResult Function(String outpoint) unknownUtxo, + required TResult Function(String outpoint) missingNonWitnessUtxo, + required TResult Function(String errorMessage) miniscriptPsbt, + }) { + return rbfSequenceCsv(rbf, csv); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, + TResult? Function(String txid)? transactionNotFound, + TResult? Function(String txid)? transactionConfirmed, + TResult? Function(String txid)? irreplaceableTransaction, + TResult? Function()? feeRateUnavailable, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? descriptor, + TResult? Function(String errorMessage)? policy, + TResult? Function(String kind)? spendingPolicyRequired, + TResult? Function()? version0, + TResult? Function()? version1Csv, + TResult? Function(String requestedTime, String requiredTime)? lockTime, + TResult? Function()? rbfSequence, + TResult? Function(String rbf, String csv)? rbfSequenceCsv, + TResult? Function(String feeRequired)? feeTooLow, + TResult? Function(String feeRateRequired)? feeRateTooLow, TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt index)? outputBelowDustLimit, + TResult? Function()? changePolicyDescriptor, + TResult? Function(String errorMessage)? coinSelection, TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return encode?.call(field0); + TResult? Function()? noRecipients, + TResult? Function(String errorMessage)? psbt, + TResult? Function(String key)? missingKeyOrigin, + TResult? Function(String outpoint)? unknownUtxo, + TResult? Function(String outpoint)? missingNonWitnessUtxo, + TResult? Function(String errorMessage)? miniscriptPsbt, + }) { + return rbfSequenceCsv?.call(rbf, csv); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, + TResult Function(String txid)? transactionNotFound, + TResult Function(String txid)? transactionConfirmed, + TResult Function(String txid)? irreplaceableTransaction, + TResult Function()? feeRateUnavailable, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? descriptor, + TResult Function(String errorMessage)? policy, + TResult Function(String kind)? spendingPolicyRequired, + TResult Function()? version0, + TResult Function()? version1Csv, + TResult Function(String requestedTime, String requiredTime)? lockTime, + TResult Function()? rbfSequence, + TResult Function(String rbf, String csv)? rbfSequenceCsv, + TResult Function(String feeRequired)? feeTooLow, + TResult Function(String feeRateRequired)? feeRateTooLow, TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt index)? outputBelowDustLimit, + TResult Function()? changePolicyDescriptor, + TResult Function(String errorMessage)? coinSelection, TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (encode != null) { - return encode(field0); + TResult Function()? noRecipients, + TResult Function(String errorMessage)? psbt, + TResult Function(String key)? missingKeyOrigin, + TResult Function(String outpoint)? unknownUtxo, + TResult Function(String outpoint)? missingNonWitnessUtxo, + TResult Function(String errorMessage)? miniscriptPsbt, + required TResult orElse(), + }) { + if (rbfSequenceCsv != null) { + return rbfSequenceCsv(rbf, csv); } return orElse(); } @@ -16525,232 +10180,178 @@ class _$BdkError_EncodeImpl extends BdkError_Encode { @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) + required TResult Function(CreateTxError_TransactionNotFound value) transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) + required TResult Function(CreateTxError_TransactionConfirmed value) transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) + required TResult Function(CreateTxError_IrreplaceableTransaction value) irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) + required TResult Function(CreateTxError_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) + required TResult Function(CreateTxError_Generic value) generic, + required TResult Function(CreateTxError_Descriptor value) descriptor, + required TResult Function(CreateTxError_Policy value) policy, + required TResult Function(CreateTxError_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); + required TResult Function(CreateTxError_Version0 value) version0, + required TResult Function(CreateTxError_Version1Csv value) version1Csv, + required TResult Function(CreateTxError_LockTime value) lockTime, + required TResult Function(CreateTxError_RbfSequence value) rbfSequence, + required TResult Function(CreateTxError_RbfSequenceCsv value) + rbfSequenceCsv, + required TResult Function(CreateTxError_FeeTooLow value) feeTooLow, + required TResult Function(CreateTxError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(CreateTxError_NoUtxosSelected value) + noUtxosSelected, + required TResult Function(CreateTxError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(CreateTxError_ChangePolicyDescriptor value) + changePolicyDescriptor, + required TResult Function(CreateTxError_CoinSelection value) coinSelection, + required TResult Function(CreateTxError_InsufficientFunds value) + insufficientFunds, + required TResult Function(CreateTxError_NoRecipients value) noRecipients, + required TResult Function(CreateTxError_Psbt value) psbt, + required TResult Function(CreateTxError_MissingKeyOrigin value) + missingKeyOrigin, + required TResult Function(CreateTxError_UnknownUtxo value) unknownUtxo, + required TResult Function(CreateTxError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(CreateTxError_MiniscriptPsbt value) + miniscriptPsbt, + }) { + return rbfSequenceCsv(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? + TResult? Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(CreateTxError_TransactionConfirmed value)? transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? + TResult? Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? + TResult? Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult? Function(CreateTxError_Generic value)? generic, + TResult? Function(CreateTxError_Descriptor value)? descriptor, + TResult? Function(CreateTxError_Policy value)? policy, + TResult? Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - 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); + TResult? Function(CreateTxError_Version0 value)? version0, + TResult? Function(CreateTxError_Version1Csv value)? version1Csv, + TResult? Function(CreateTxError_LockTime value)? lockTime, + TResult? Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult? Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult? Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult? Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult? Function(CreateTxError_CoinSelection value)? coinSelection, + TResult? Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult? Function(CreateTxError_NoRecipients value)? noRecipients, + TResult? Function(CreateTxError_Psbt value)? psbt, + TResult? Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult? Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, + }) { + return rbfSequenceCsv?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? + TResult Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult Function(CreateTxError_TransactionConfirmed value)? + transactionConfirmed, + TResult Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? + TResult Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult Function(CreateTxError_Generic value)? generic, + TResult Function(CreateTxError_Descriptor value)? descriptor, + TResult Function(CreateTxError_Policy value)? policy, + TResult Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - 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; + TResult Function(CreateTxError_Version0 value)? version0, + TResult Function(CreateTxError_Version1Csv value)? version1Csv, + TResult Function(CreateTxError_LockTime value)? lockTime, + TResult Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult Function(CreateTxError_CoinSelection value)? coinSelection, + TResult Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult Function(CreateTxError_NoRecipients value)? noRecipients, + TResult Function(CreateTxError_Psbt value)? psbt, + TResult Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, + required TResult orElse(), + }) { + if (rbfSequenceCsv != null) { + return rbfSequenceCsv(this); + } + return orElse(); + } +} + +abstract class CreateTxError_RbfSequenceCsv extends CreateTxError { + const factory CreateTxError_RbfSequenceCsv( + {required final String rbf, + required final String csv}) = _$CreateTxError_RbfSequenceCsvImpl; + const CreateTxError_RbfSequenceCsv._() : super._(); + + String get rbf; + String get csv; @JsonKey(ignore: true) - _$$BdkError_EncodeImplCopyWith<_$BdkError_EncodeImpl> get copyWith => - throw _privateConstructorUsedError; + _$$CreateTxError_RbfSequenceCsvImplCopyWith< + _$CreateTxError_RbfSequenceCsvImpl> + get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$BdkError_MiniscriptImplCopyWith<$Res> { - factory _$$BdkError_MiniscriptImplCopyWith(_$BdkError_MiniscriptImpl value, - $Res Function(_$BdkError_MiniscriptImpl) then) = - __$$BdkError_MiniscriptImplCopyWithImpl<$Res>; +abstract class _$$CreateTxError_FeeTooLowImplCopyWith<$Res> { + factory _$$CreateTxError_FeeTooLowImplCopyWith( + _$CreateTxError_FeeTooLowImpl value, + $Res Function(_$CreateTxError_FeeTooLowImpl) then) = + __$$CreateTxError_FeeTooLowImplCopyWithImpl<$Res>; @useResult - $Res call({String field0}); + $Res call({String feeRequired}); } /// @nodoc -class __$$BdkError_MiniscriptImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_MiniscriptImpl> - implements _$$BdkError_MiniscriptImplCopyWith<$Res> { - __$$BdkError_MiniscriptImplCopyWithImpl(_$BdkError_MiniscriptImpl _value, - $Res Function(_$BdkError_MiniscriptImpl) _then) +class __$$CreateTxError_FeeTooLowImplCopyWithImpl<$Res> + extends _$CreateTxErrorCopyWithImpl<$Res, _$CreateTxError_FeeTooLowImpl> + implements _$$CreateTxError_FeeTooLowImplCopyWith<$Res> { + __$$CreateTxError_FeeTooLowImplCopyWithImpl( + _$CreateTxError_FeeTooLowImpl _value, + $Res Function(_$CreateTxError_FeeTooLowImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? field0 = null, + Object? feeRequired = null, }) { - return _then(_$BdkError_MiniscriptImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable + return _then(_$CreateTxError_FeeTooLowImpl( + feeRequired: null == feeRequired + ? _value.feeRequired + : feeRequired // ignore: cast_nullable_to_non_nullable as String, )); } @@ -16758,199 +10359,137 @@ class __$$BdkError_MiniscriptImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_MiniscriptImpl extends BdkError_Miniscript { - const _$BdkError_MiniscriptImpl(this.field0) : super._(); +class _$CreateTxError_FeeTooLowImpl extends CreateTxError_FeeTooLow { + const _$CreateTxError_FeeTooLowImpl({required this.feeRequired}) : super._(); @override - final String field0; + final String feeRequired; @override String toString() { - return 'BdkError.miniscript(field0: $field0)'; + return 'CreateTxError.feeTooLow(feeRequired: $feeRequired)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_MiniscriptImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$CreateTxError_FeeTooLowImpl && + (identical(other.feeRequired, feeRequired) || + other.feeRequired == feeRequired)); } @override - int get hashCode => Object.hash(runtimeType, field0); + int get hashCode => Object.hash(runtimeType, feeRequired); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$BdkError_MiniscriptImplCopyWith<_$BdkError_MiniscriptImpl> get copyWith => - __$$BdkError_MiniscriptImplCopyWithImpl<_$BdkError_MiniscriptImpl>( - this, _$identity); + _$$CreateTxError_FeeTooLowImplCopyWith<_$CreateTxError_FeeTooLowImpl> + get copyWith => __$$CreateTxError_FeeTooLowImplCopyWithImpl< + _$CreateTxError_FeeTooLowImpl>(this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, + required TResult Function(String txid) transactionNotFound, + required TResult Function(String txid) transactionConfirmed, + required TResult Function(String txid) irreplaceableTransaction, + required TResult Function() feeRateUnavailable, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) descriptor, + required TResult Function(String errorMessage) policy, + required TResult Function(String kind) spendingPolicyRequired, + required TResult Function() version0, + required TResult Function() version1Csv, + required TResult Function(String requestedTime, String requiredTime) + lockTime, + required TResult Function() rbfSequence, + required TResult Function(String rbf, String csv) rbfSequenceCsv, + required TResult Function(String feeRequired) feeTooLow, + required TResult Function(String feeRateRequired) feeRateTooLow, required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt index) outputBelowDustLimit, + required TResult Function() changePolicyDescriptor, + required TResult Function(String errorMessage) coinSelection, required TResult Function(BigInt needed, BigInt available) insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return miniscript(field0); + required TResult Function() noRecipients, + required TResult Function(String errorMessage) psbt, + required TResult Function(String key) missingKeyOrigin, + required TResult Function(String outpoint) unknownUtxo, + required TResult Function(String outpoint) missingNonWitnessUtxo, + required TResult Function(String errorMessage) miniscriptPsbt, + }) { + return feeTooLow(feeRequired); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, + TResult? Function(String txid)? transactionNotFound, + TResult? Function(String txid)? transactionConfirmed, + TResult? Function(String txid)? irreplaceableTransaction, + TResult? Function()? feeRateUnavailable, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? descriptor, + TResult? Function(String errorMessage)? policy, + TResult? Function(String kind)? spendingPolicyRequired, + TResult? Function()? version0, + TResult? Function()? version1Csv, + TResult? Function(String requestedTime, String requiredTime)? lockTime, + TResult? Function()? rbfSequence, + TResult? Function(String rbf, String csv)? rbfSequenceCsv, + TResult? Function(String feeRequired)? feeTooLow, + TResult? Function(String feeRateRequired)? feeRateTooLow, TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt index)? outputBelowDustLimit, + TResult? Function()? changePolicyDescriptor, + TResult? Function(String errorMessage)? coinSelection, TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return miniscript?.call(field0); + TResult? Function()? noRecipients, + TResult? Function(String errorMessage)? psbt, + TResult? Function(String key)? missingKeyOrigin, + TResult? Function(String outpoint)? unknownUtxo, + TResult? Function(String outpoint)? missingNonWitnessUtxo, + TResult? Function(String errorMessage)? miniscriptPsbt, + }) { + return feeTooLow?.call(feeRequired); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, + TResult Function(String txid)? transactionNotFound, + TResult Function(String txid)? transactionConfirmed, + TResult Function(String txid)? irreplaceableTransaction, + TResult Function()? feeRateUnavailable, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? descriptor, + TResult Function(String errorMessage)? policy, + TResult Function(String kind)? spendingPolicyRequired, + TResult Function()? version0, + TResult Function()? version1Csv, + TResult Function(String requestedTime, String requiredTime)? lockTime, + TResult Function()? rbfSequence, + TResult Function(String rbf, String csv)? rbfSequenceCsv, + TResult Function(String feeRequired)? feeTooLow, + TResult Function(String feeRateRequired)? feeRateTooLow, TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt index)? outputBelowDustLimit, + TResult Function()? changePolicyDescriptor, + TResult Function(String errorMessage)? coinSelection, TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, + TResult Function()? noRecipients, + TResult Function(String errorMessage)? psbt, + TResult Function(String key)? missingKeyOrigin, + TResult Function(String outpoint)? unknownUtxo, + TResult Function(String outpoint)? missingNonWitnessUtxo, + TResult Function(String errorMessage)? miniscriptPsbt, required TResult orElse(), }) { - if (miniscript != null) { - return miniscript(field0); + if (feeTooLow != null) { + return feeTooLow(feeRequired); } return orElse(); } @@ -16958,235 +10497,175 @@ class _$BdkError_MiniscriptImpl extends BdkError_Miniscript { @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) + required TResult Function(CreateTxError_TransactionNotFound value) transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) + required TResult Function(CreateTxError_TransactionConfirmed value) transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) + required TResult Function(CreateTxError_IrreplaceableTransaction value) irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) + required TResult Function(CreateTxError_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) + required TResult Function(CreateTxError_Generic value) generic, + required TResult Function(CreateTxError_Descriptor value) descriptor, + required TResult Function(CreateTxError_Policy value) policy, + required TResult Function(CreateTxError_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, + required TResult Function(CreateTxError_Version0 value) version0, + required TResult Function(CreateTxError_Version1Csv value) version1Csv, + required TResult Function(CreateTxError_LockTime value) lockTime, + required TResult Function(CreateTxError_RbfSequence value) rbfSequence, + required TResult Function(CreateTxError_RbfSequenceCsv value) + rbfSequenceCsv, + required TResult Function(CreateTxError_FeeTooLow value) feeTooLow, + required TResult Function(CreateTxError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(CreateTxError_NoUtxosSelected value) + noUtxosSelected, + required TResult Function(CreateTxError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(CreateTxError_ChangePolicyDescriptor value) + changePolicyDescriptor, + required TResult Function(CreateTxError_CoinSelection value) coinSelection, + required TResult Function(CreateTxError_InsufficientFunds value) + insufficientFunds, + required TResult Function(CreateTxError_NoRecipients value) noRecipients, + required TResult Function(CreateTxError_Psbt value) psbt, + required TResult Function(CreateTxError_MissingKeyOrigin value) + missingKeyOrigin, + required TResult Function(CreateTxError_UnknownUtxo value) unknownUtxo, + required TResult Function(CreateTxError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(CreateTxError_MiniscriptPsbt value) + miniscriptPsbt, }) { - return miniscript(this); + return feeTooLow(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? + TResult? Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(CreateTxError_TransactionConfirmed value)? transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? + TResult? Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? + TResult? Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult? Function(CreateTxError_Generic value)? generic, + TResult? Function(CreateTxError_Descriptor value)? descriptor, + TResult? Function(CreateTxError_Policy value)? policy, + TResult? Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult? Function(CreateTxError_Version0 value)? version0, + TResult? Function(CreateTxError_Version1Csv value)? version1Csv, + TResult? Function(CreateTxError_LockTime value)? lockTime, + TResult? Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult? Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult? Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult? Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult? Function(CreateTxError_CoinSelection value)? coinSelection, + TResult? Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult? Function(CreateTxError_NoRecipients value)? noRecipients, + TResult? Function(CreateTxError_Psbt value)? psbt, + TResult? Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult? Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, }) { - return miniscript?.call(this); + return feeTooLow?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? + TResult Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult Function(CreateTxError_TransactionConfirmed value)? + transactionConfirmed, + TResult Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? + TResult Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult Function(CreateTxError_Generic value)? generic, + TResult Function(CreateTxError_Descriptor value)? descriptor, + TResult Function(CreateTxError_Policy value)? policy, + TResult Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult Function(CreateTxError_Version0 value)? version0, + TResult Function(CreateTxError_Version1Csv value)? version1Csv, + TResult Function(CreateTxError_LockTime value)? lockTime, + TResult Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult Function(CreateTxError_CoinSelection value)? coinSelection, + TResult Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult Function(CreateTxError_NoRecipients value)? noRecipients, + TResult Function(CreateTxError_Psbt value)? psbt, + TResult Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, required TResult orElse(), }) { - if (miniscript != null) { - return miniscript(this); + if (feeTooLow != null) { + return feeTooLow(this); } return orElse(); } } -abstract class BdkError_Miniscript extends BdkError { - const factory BdkError_Miniscript(final String field0) = - _$BdkError_MiniscriptImpl; - const BdkError_Miniscript._() : super._(); +abstract class CreateTxError_FeeTooLow extends CreateTxError { + const factory CreateTxError_FeeTooLow({required final String feeRequired}) = + _$CreateTxError_FeeTooLowImpl; + const CreateTxError_FeeTooLow._() : super._(); - String get field0; + String get feeRequired; @JsonKey(ignore: true) - _$$BdkError_MiniscriptImplCopyWith<_$BdkError_MiniscriptImpl> get copyWith => - throw _privateConstructorUsedError; + _$$CreateTxError_FeeTooLowImplCopyWith<_$CreateTxError_FeeTooLowImpl> + get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$BdkError_MiniscriptPsbtImplCopyWith<$Res> { - factory _$$BdkError_MiniscriptPsbtImplCopyWith( - _$BdkError_MiniscriptPsbtImpl value, - $Res Function(_$BdkError_MiniscriptPsbtImpl) then) = - __$$BdkError_MiniscriptPsbtImplCopyWithImpl<$Res>; +abstract class _$$CreateTxError_FeeRateTooLowImplCopyWith<$Res> { + factory _$$CreateTxError_FeeRateTooLowImplCopyWith( + _$CreateTxError_FeeRateTooLowImpl value, + $Res Function(_$CreateTxError_FeeRateTooLowImpl) then) = + __$$CreateTxError_FeeRateTooLowImplCopyWithImpl<$Res>; @useResult - $Res call({String field0}); + $Res call({String feeRateRequired}); } /// @nodoc -class __$$BdkError_MiniscriptPsbtImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_MiniscriptPsbtImpl> - implements _$$BdkError_MiniscriptPsbtImplCopyWith<$Res> { - __$$BdkError_MiniscriptPsbtImplCopyWithImpl( - _$BdkError_MiniscriptPsbtImpl _value, - $Res Function(_$BdkError_MiniscriptPsbtImpl) _then) +class __$$CreateTxError_FeeRateTooLowImplCopyWithImpl<$Res> + extends _$CreateTxErrorCopyWithImpl<$Res, _$CreateTxError_FeeRateTooLowImpl> + implements _$$CreateTxError_FeeRateTooLowImplCopyWith<$Res> { + __$$CreateTxError_FeeRateTooLowImplCopyWithImpl( + _$CreateTxError_FeeRateTooLowImpl _value, + $Res Function(_$CreateTxError_FeeRateTooLowImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? field0 = null, + Object? feeRateRequired = null, }) { - return _then(_$BdkError_MiniscriptPsbtImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable + return _then(_$CreateTxError_FeeRateTooLowImpl( + feeRateRequired: null == feeRateRequired + ? _value.feeRateRequired + : feeRateRequired // ignore: cast_nullable_to_non_nullable as String, )); } @@ -17194,199 +10673,138 @@ class __$$BdkError_MiniscriptPsbtImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_MiniscriptPsbtImpl extends BdkError_MiniscriptPsbt { - const _$BdkError_MiniscriptPsbtImpl(this.field0) : super._(); +class _$CreateTxError_FeeRateTooLowImpl extends CreateTxError_FeeRateTooLow { + const _$CreateTxError_FeeRateTooLowImpl({required this.feeRateRequired}) + : super._(); @override - final String field0; + final String feeRateRequired; @override String toString() { - return 'BdkError.miniscriptPsbt(field0: $field0)'; + return 'CreateTxError.feeRateTooLow(feeRateRequired: $feeRateRequired)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_MiniscriptPsbtImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$CreateTxError_FeeRateTooLowImpl && + (identical(other.feeRateRequired, feeRateRequired) || + other.feeRateRequired == feeRateRequired)); } @override - int get hashCode => Object.hash(runtimeType, field0); + int get hashCode => Object.hash(runtimeType, feeRateRequired); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$BdkError_MiniscriptPsbtImplCopyWith<_$BdkError_MiniscriptPsbtImpl> - get copyWith => __$$BdkError_MiniscriptPsbtImplCopyWithImpl< - _$BdkError_MiniscriptPsbtImpl>(this, _$identity); + _$$CreateTxError_FeeRateTooLowImplCopyWith<_$CreateTxError_FeeRateTooLowImpl> + get copyWith => __$$CreateTxError_FeeRateTooLowImplCopyWithImpl< + _$CreateTxError_FeeRateTooLowImpl>(this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, + required TResult Function(String txid) transactionNotFound, + required TResult Function(String txid) transactionConfirmed, + required TResult Function(String txid) irreplaceableTransaction, + required TResult Function() feeRateUnavailable, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) descriptor, + required TResult Function(String errorMessage) policy, + required TResult Function(String kind) spendingPolicyRequired, + required TResult Function() version0, + required TResult Function() version1Csv, + required TResult Function(String requestedTime, String requiredTime) + lockTime, + required TResult Function() rbfSequence, + required TResult Function(String rbf, String csv) rbfSequenceCsv, + required TResult Function(String feeRequired) feeTooLow, + required TResult Function(String feeRateRequired) feeRateTooLow, required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt index) outputBelowDustLimit, + required TResult Function() changePolicyDescriptor, + required TResult Function(String errorMessage) coinSelection, required TResult Function(BigInt needed, BigInt available) insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return miniscriptPsbt(field0); + required TResult Function() noRecipients, + required TResult Function(String errorMessage) psbt, + required TResult Function(String key) missingKeyOrigin, + required TResult Function(String outpoint) unknownUtxo, + required TResult Function(String outpoint) missingNonWitnessUtxo, + required TResult Function(String errorMessage) miniscriptPsbt, + }) { + return feeRateTooLow(feeRateRequired); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, + TResult? Function(String txid)? transactionNotFound, + TResult? Function(String txid)? transactionConfirmed, + TResult? Function(String txid)? irreplaceableTransaction, + TResult? Function()? feeRateUnavailable, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? descriptor, + TResult? Function(String errorMessage)? policy, + TResult? Function(String kind)? spendingPolicyRequired, + TResult? Function()? version0, + TResult? Function()? version1Csv, + TResult? Function(String requestedTime, String requiredTime)? lockTime, + TResult? Function()? rbfSequence, + TResult? Function(String rbf, String csv)? rbfSequenceCsv, + TResult? Function(String feeRequired)? feeTooLow, + TResult? Function(String feeRateRequired)? feeRateTooLow, TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt index)? outputBelowDustLimit, + TResult? Function()? changePolicyDescriptor, + TResult? Function(String errorMessage)? coinSelection, TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return miniscriptPsbt?.call(field0); + TResult? Function()? noRecipients, + TResult? Function(String errorMessage)? psbt, + TResult? Function(String key)? missingKeyOrigin, + TResult? Function(String outpoint)? unknownUtxo, + TResult? Function(String outpoint)? missingNonWitnessUtxo, + TResult? Function(String errorMessage)? miniscriptPsbt, + }) { + return feeRateTooLow?.call(feeRateRequired); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, + TResult Function(String txid)? transactionNotFound, + TResult Function(String txid)? transactionConfirmed, + TResult Function(String txid)? irreplaceableTransaction, + TResult Function()? feeRateUnavailable, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? descriptor, + TResult Function(String errorMessage)? policy, + TResult Function(String kind)? spendingPolicyRequired, + TResult Function()? version0, + TResult Function()? version1Csv, + TResult Function(String requestedTime, String requiredTime)? lockTime, + TResult Function()? rbfSequence, + TResult Function(String rbf, String csv)? rbfSequenceCsv, + TResult Function(String feeRequired)? feeTooLow, + TResult Function(String feeRateRequired)? feeRateTooLow, TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt index)? outputBelowDustLimit, + TResult Function()? changePolicyDescriptor, + TResult Function(String errorMessage)? coinSelection, TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, + TResult Function()? noRecipients, + TResult Function(String errorMessage)? psbt, + TResult Function(String key)? missingKeyOrigin, + TResult Function(String outpoint)? unknownUtxo, + TResult Function(String outpoint)? missingNonWitnessUtxo, + TResult Function(String errorMessage)? miniscriptPsbt, required TResult orElse(), }) { - if (miniscriptPsbt != null) { - return miniscriptPsbt(field0); + if (feeRateTooLow != null) { + return feeRateTooLow(feeRateRequired); } return orElse(); } @@ -17394,433 +10812,289 @@ class _$BdkError_MiniscriptPsbtImpl extends BdkError_MiniscriptPsbt { @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) + required TResult Function(CreateTxError_TransactionNotFound value) transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) + required TResult Function(CreateTxError_TransactionConfirmed value) transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) + required TResult Function(CreateTxError_IrreplaceableTransaction value) irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) + required TResult Function(CreateTxError_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) + required TResult Function(CreateTxError_Generic value) generic, + required TResult Function(CreateTxError_Descriptor value) descriptor, + required TResult Function(CreateTxError_Policy value) policy, + required TResult Function(CreateTxError_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, + required TResult Function(CreateTxError_Version0 value) version0, + required TResult Function(CreateTxError_Version1Csv value) version1Csv, + required TResult Function(CreateTxError_LockTime value) lockTime, + required TResult Function(CreateTxError_RbfSequence value) rbfSequence, + required TResult Function(CreateTxError_RbfSequenceCsv value) + rbfSequenceCsv, + required TResult Function(CreateTxError_FeeTooLow value) feeTooLow, + required TResult Function(CreateTxError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(CreateTxError_NoUtxosSelected value) + noUtxosSelected, + required TResult Function(CreateTxError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(CreateTxError_ChangePolicyDescriptor value) + changePolicyDescriptor, + required TResult Function(CreateTxError_CoinSelection value) coinSelection, + required TResult Function(CreateTxError_InsufficientFunds value) + insufficientFunds, + required TResult Function(CreateTxError_NoRecipients value) noRecipients, + required TResult Function(CreateTxError_Psbt value) psbt, + required TResult Function(CreateTxError_MissingKeyOrigin value) + missingKeyOrigin, + required TResult Function(CreateTxError_UnknownUtxo value) unknownUtxo, + required TResult Function(CreateTxError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(CreateTxError_MiniscriptPsbt value) + miniscriptPsbt, }) { - return miniscriptPsbt(this); + return feeRateTooLow(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? + TResult? Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(CreateTxError_TransactionConfirmed value)? transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? + TResult? Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? + TResult? Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult? Function(CreateTxError_Generic value)? generic, + TResult? Function(CreateTxError_Descriptor value)? descriptor, + TResult? Function(CreateTxError_Policy value)? policy, + TResult? Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult? Function(CreateTxError_Version0 value)? version0, + TResult? Function(CreateTxError_Version1Csv value)? version1Csv, + TResult? Function(CreateTxError_LockTime value)? lockTime, + TResult? Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult? Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult? Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult? Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult? Function(CreateTxError_CoinSelection value)? coinSelection, + TResult? Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult? Function(CreateTxError_NoRecipients value)? noRecipients, + TResult? Function(CreateTxError_Psbt value)? psbt, + TResult? Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult? Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, }) { - return miniscriptPsbt?.call(this); + return feeRateTooLow?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? + TResult Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult Function(CreateTxError_TransactionConfirmed value)? + transactionConfirmed, + TResult Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? + TResult Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult Function(CreateTxError_Generic value)? generic, + TResult Function(CreateTxError_Descriptor value)? descriptor, + TResult Function(CreateTxError_Policy value)? policy, + TResult Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult Function(CreateTxError_Version0 value)? version0, + TResult Function(CreateTxError_Version1Csv value)? version1Csv, + TResult Function(CreateTxError_LockTime value)? lockTime, + TResult Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult Function(CreateTxError_CoinSelection value)? coinSelection, + TResult Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult Function(CreateTxError_NoRecipients value)? noRecipients, + TResult Function(CreateTxError_Psbt value)? psbt, + TResult Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, required TResult orElse(), }) { - if (miniscriptPsbt != null) { - return miniscriptPsbt(this); + if (feeRateTooLow != null) { + return feeRateTooLow(this); } return orElse(); } } -abstract class BdkError_MiniscriptPsbt extends BdkError { - const factory BdkError_MiniscriptPsbt(final String field0) = - _$BdkError_MiniscriptPsbtImpl; - const BdkError_MiniscriptPsbt._() : super._(); +abstract class CreateTxError_FeeRateTooLow extends CreateTxError { + const factory CreateTxError_FeeRateTooLow( + {required final String feeRateRequired}) = + _$CreateTxError_FeeRateTooLowImpl; + const CreateTxError_FeeRateTooLow._() : super._(); - String get field0; + String get feeRateRequired; @JsonKey(ignore: true) - _$$BdkError_MiniscriptPsbtImplCopyWith<_$BdkError_MiniscriptPsbtImpl> + _$$CreateTxError_FeeRateTooLowImplCopyWith<_$CreateTxError_FeeRateTooLowImpl> 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}); +abstract class _$$CreateTxError_NoUtxosSelectedImplCopyWith<$Res> { + factory _$$CreateTxError_NoUtxosSelectedImplCopyWith( + _$CreateTxError_NoUtxosSelectedImpl value, + $Res Function(_$CreateTxError_NoUtxosSelectedImpl) then) = + __$$CreateTxError_NoUtxosSelectedImplCopyWithImpl<$Res>; } /// @nodoc -class __$$BdkError_Bip32ImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_Bip32Impl> - implements _$$BdkError_Bip32ImplCopyWith<$Res> { - __$$BdkError_Bip32ImplCopyWithImpl( - _$BdkError_Bip32Impl _value, $Res Function(_$BdkError_Bip32Impl) _then) +class __$$CreateTxError_NoUtxosSelectedImplCopyWithImpl<$Res> + extends _$CreateTxErrorCopyWithImpl<$Res, + _$CreateTxError_NoUtxosSelectedImpl> + implements _$$CreateTxError_NoUtxosSelectedImplCopyWith<$Res> { + __$$CreateTxError_NoUtxosSelectedImplCopyWithImpl( + _$CreateTxError_NoUtxosSelectedImpl _value, + $Res Function(_$CreateTxError_NoUtxosSelectedImpl) _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; +class _$CreateTxError_NoUtxosSelectedImpl + extends CreateTxError_NoUtxosSelected { + const _$CreateTxError_NoUtxosSelectedImpl() : super._(); @override String toString() { - return 'BdkError.bip32(field0: $field0)'; + return 'CreateTxError.noUtxosSelected()'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_Bip32Impl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$CreateTxError_NoUtxosSelectedImpl); } @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); + int get hashCode => runtimeType.hashCode; @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, + required TResult Function(String txid) transactionNotFound, + required TResult Function(String txid) transactionConfirmed, + required TResult Function(String txid) irreplaceableTransaction, + required TResult Function() feeRateUnavailable, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) descriptor, + required TResult Function(String errorMessage) policy, + required TResult Function(String kind) spendingPolicyRequired, + required TResult Function() version0, + required TResult Function() version1Csv, + required TResult Function(String requestedTime, String requiredTime) + lockTime, + required TResult Function() rbfSequence, + required TResult Function(String rbf, String csv) rbfSequenceCsv, + required TResult Function(String feeRequired) feeTooLow, + required TResult Function(String feeRateRequired) feeRateTooLow, required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt index) outputBelowDustLimit, + required TResult Function() changePolicyDescriptor, + required TResult Function(String errorMessage) coinSelection, required TResult Function(BigInt needed, BigInt available) insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return bip32(field0); + required TResult Function() noRecipients, + required TResult Function(String errorMessage) psbt, + required TResult Function(String key) missingKeyOrigin, + required TResult Function(String outpoint) unknownUtxo, + required TResult Function(String outpoint) missingNonWitnessUtxo, + required TResult Function(String errorMessage) miniscriptPsbt, + }) { + return noUtxosSelected(); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, + TResult? Function(String txid)? transactionNotFound, + TResult? Function(String txid)? transactionConfirmed, + TResult? Function(String txid)? irreplaceableTransaction, + TResult? Function()? feeRateUnavailable, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? descriptor, + TResult? Function(String errorMessage)? policy, + TResult? Function(String kind)? spendingPolicyRequired, + TResult? Function()? version0, + TResult? Function()? version1Csv, + TResult? Function(String requestedTime, String requiredTime)? lockTime, + TResult? Function()? rbfSequence, + TResult? Function(String rbf, String csv)? rbfSequenceCsv, + TResult? Function(String feeRequired)? feeTooLow, + TResult? Function(String feeRateRequired)? feeRateTooLow, TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt index)? outputBelowDustLimit, + TResult? Function()? changePolicyDescriptor, + TResult? Function(String errorMessage)? coinSelection, TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return bip32?.call(field0); + TResult? Function()? noRecipients, + TResult? Function(String errorMessage)? psbt, + TResult? Function(String key)? missingKeyOrigin, + TResult? Function(String outpoint)? unknownUtxo, + TResult? Function(String outpoint)? missingNonWitnessUtxo, + TResult? Function(String errorMessage)? miniscriptPsbt, + }) { + return noUtxosSelected?.call(); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, + TResult Function(String txid)? transactionNotFound, + TResult Function(String txid)? transactionConfirmed, + TResult Function(String txid)? irreplaceableTransaction, + TResult Function()? feeRateUnavailable, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? descriptor, + TResult Function(String errorMessage)? policy, + TResult Function(String kind)? spendingPolicyRequired, + TResult Function()? version0, + TResult Function()? version1Csv, + TResult Function(String requestedTime, String requiredTime)? lockTime, + TResult Function()? rbfSequence, + TResult Function(String rbf, String csv)? rbfSequenceCsv, + TResult Function(String feeRequired)? feeTooLow, + TResult Function(String feeRateRequired)? feeRateTooLow, TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt index)? outputBelowDustLimit, + TResult Function()? changePolicyDescriptor, + TResult Function(String errorMessage)? coinSelection, TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, + TResult Function()? noRecipients, + TResult Function(String errorMessage)? psbt, + TResult Function(String key)? missingKeyOrigin, + TResult Function(String outpoint)? unknownUtxo, + TResult Function(String outpoint)? missingNonWitnessUtxo, + TResult Function(String errorMessage)? miniscriptPsbt, required TResult orElse(), }) { - if (bip32 != null) { - return bip32(field0); + if (noUtxosSelected != null) { + return noUtxosSelected(); } return orElse(); } @@ -17828,432 +11102,311 @@ class _$BdkError_Bip32Impl extends BdkError_Bip32 { @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) + required TResult Function(CreateTxError_TransactionNotFound value) transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) + required TResult Function(CreateTxError_TransactionConfirmed value) transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) + required TResult Function(CreateTxError_IrreplaceableTransaction value) irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) + required TResult Function(CreateTxError_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) + required TResult Function(CreateTxError_Generic value) generic, + required TResult Function(CreateTxError_Descriptor value) descriptor, + required TResult Function(CreateTxError_Policy value) policy, + required TResult Function(CreateTxError_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, + required TResult Function(CreateTxError_Version0 value) version0, + required TResult Function(CreateTxError_Version1Csv value) version1Csv, + required TResult Function(CreateTxError_LockTime value) lockTime, + required TResult Function(CreateTxError_RbfSequence value) rbfSequence, + required TResult Function(CreateTxError_RbfSequenceCsv value) + rbfSequenceCsv, + required TResult Function(CreateTxError_FeeTooLow value) feeTooLow, + required TResult Function(CreateTxError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(CreateTxError_NoUtxosSelected value) + noUtxosSelected, + required TResult Function(CreateTxError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(CreateTxError_ChangePolicyDescriptor value) + changePolicyDescriptor, + required TResult Function(CreateTxError_CoinSelection value) coinSelection, + required TResult Function(CreateTxError_InsufficientFunds value) + insufficientFunds, + required TResult Function(CreateTxError_NoRecipients value) noRecipients, + required TResult Function(CreateTxError_Psbt value) psbt, + required TResult Function(CreateTxError_MissingKeyOrigin value) + missingKeyOrigin, + required TResult Function(CreateTxError_UnknownUtxo value) unknownUtxo, + required TResult Function(CreateTxError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(CreateTxError_MiniscriptPsbt value) + miniscriptPsbt, }) { - return bip32(this); + return noUtxosSelected(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? + TResult? Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(CreateTxError_TransactionConfirmed value)? transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? + TResult? Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? + TResult? Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult? Function(CreateTxError_Generic value)? generic, + TResult? Function(CreateTxError_Descriptor value)? descriptor, + TResult? Function(CreateTxError_Policy value)? policy, + TResult? Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult? Function(CreateTxError_Version0 value)? version0, + TResult? Function(CreateTxError_Version1Csv value)? version1Csv, + TResult? Function(CreateTxError_LockTime value)? lockTime, + TResult? Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult? Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult? Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult? Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult? Function(CreateTxError_CoinSelection value)? coinSelection, + TResult? Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult? Function(CreateTxError_NoRecipients value)? noRecipients, + TResult? Function(CreateTxError_Psbt value)? psbt, + TResult? Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult? Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, }) { - return bip32?.call(this); + return noUtxosSelected?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? + TResult Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult Function(CreateTxError_TransactionConfirmed value)? + transactionConfirmed, + TResult Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? + TResult Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult Function(CreateTxError_Generic value)? generic, + TResult Function(CreateTxError_Descriptor value)? descriptor, + TResult Function(CreateTxError_Policy value)? policy, + TResult Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult Function(CreateTxError_Version0 value)? version0, + TResult Function(CreateTxError_Version1Csv value)? version1Csv, + TResult Function(CreateTxError_LockTime value)? lockTime, + TResult Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult Function(CreateTxError_CoinSelection value)? coinSelection, + TResult Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult Function(CreateTxError_NoRecipients value)? noRecipients, + TResult Function(CreateTxError_Psbt value)? psbt, + TResult Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, required TResult orElse(), }) { - if (bip32 != null) { - return bip32(this); + if (noUtxosSelected != null) { + return noUtxosSelected(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; +abstract class CreateTxError_NoUtxosSelected extends CreateTxError { + const factory CreateTxError_NoUtxosSelected() = + _$CreateTxError_NoUtxosSelectedImpl; + const CreateTxError_NoUtxosSelected._() : super._(); } /// @nodoc -abstract class _$$BdkError_Bip39ImplCopyWith<$Res> { - factory _$$BdkError_Bip39ImplCopyWith(_$BdkError_Bip39Impl value, - $Res Function(_$BdkError_Bip39Impl) then) = - __$$BdkError_Bip39ImplCopyWithImpl<$Res>; +abstract class _$$CreateTxError_OutputBelowDustLimitImplCopyWith<$Res> { + factory _$$CreateTxError_OutputBelowDustLimitImplCopyWith( + _$CreateTxError_OutputBelowDustLimitImpl value, + $Res Function(_$CreateTxError_OutputBelowDustLimitImpl) then) = + __$$CreateTxError_OutputBelowDustLimitImplCopyWithImpl<$Res>; @useResult - $Res call({String field0}); + $Res call({BigInt index}); } /// @nodoc -class __$$BdkError_Bip39ImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_Bip39Impl> - implements _$$BdkError_Bip39ImplCopyWith<$Res> { - __$$BdkError_Bip39ImplCopyWithImpl( - _$BdkError_Bip39Impl _value, $Res Function(_$BdkError_Bip39Impl) _then) +class __$$CreateTxError_OutputBelowDustLimitImplCopyWithImpl<$Res> + extends _$CreateTxErrorCopyWithImpl<$Res, + _$CreateTxError_OutputBelowDustLimitImpl> + implements _$$CreateTxError_OutputBelowDustLimitImplCopyWith<$Res> { + __$$CreateTxError_OutputBelowDustLimitImplCopyWithImpl( + _$CreateTxError_OutputBelowDustLimitImpl _value, + $Res Function(_$CreateTxError_OutputBelowDustLimitImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? field0 = null, + Object? index = null, }) { - return _then(_$BdkError_Bip39Impl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, + return _then(_$CreateTxError_OutputBelowDustLimitImpl( + index: null == index + ? _value.index + : index // ignore: cast_nullable_to_non_nullable + as BigInt, )); } } /// @nodoc -class _$BdkError_Bip39Impl extends BdkError_Bip39 { - const _$BdkError_Bip39Impl(this.field0) : super._(); +class _$CreateTxError_OutputBelowDustLimitImpl + extends CreateTxError_OutputBelowDustLimit { + const _$CreateTxError_OutputBelowDustLimitImpl({required this.index}) + : super._(); @override - final String field0; + final BigInt index; @override String toString() { - return 'BdkError.bip39(field0: $field0)'; + return 'CreateTxError.outputBelowDustLimit(index: $index)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_Bip39Impl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$CreateTxError_OutputBelowDustLimitImpl && + (identical(other.index, index) || other.index == index)); } @override - int get hashCode => Object.hash(runtimeType, field0); + int get hashCode => Object.hash(runtimeType, index); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$BdkError_Bip39ImplCopyWith<_$BdkError_Bip39Impl> get copyWith => - __$$BdkError_Bip39ImplCopyWithImpl<_$BdkError_Bip39Impl>( - this, _$identity); + _$$CreateTxError_OutputBelowDustLimitImplCopyWith< + _$CreateTxError_OutputBelowDustLimitImpl> + get copyWith => __$$CreateTxError_OutputBelowDustLimitImplCopyWithImpl< + _$CreateTxError_OutputBelowDustLimitImpl>(this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, + required TResult Function(String txid) transactionNotFound, + required TResult Function(String txid) transactionConfirmed, + required TResult Function(String txid) irreplaceableTransaction, + required TResult Function() feeRateUnavailable, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) descriptor, + required TResult Function(String errorMessage) policy, + required TResult Function(String kind) spendingPolicyRequired, + required TResult Function() version0, + required TResult Function() version1Csv, + required TResult Function(String requestedTime, String requiredTime) + lockTime, + required TResult Function() rbfSequence, + required TResult Function(String rbf, String csv) rbfSequenceCsv, + required TResult Function(String feeRequired) feeTooLow, + required TResult Function(String feeRateRequired) feeRateTooLow, required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt index) outputBelowDustLimit, + required TResult Function() changePolicyDescriptor, + required TResult Function(String errorMessage) coinSelection, required TResult Function(BigInt needed, BigInt available) insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return bip39(field0); + required TResult Function() noRecipients, + required TResult Function(String errorMessage) psbt, + required TResult Function(String key) missingKeyOrigin, + required TResult Function(String outpoint) unknownUtxo, + required TResult Function(String outpoint) missingNonWitnessUtxo, + required TResult Function(String errorMessage) miniscriptPsbt, + }) { + return outputBelowDustLimit(index); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, + TResult? Function(String txid)? transactionNotFound, + TResult? Function(String txid)? transactionConfirmed, + TResult? Function(String txid)? irreplaceableTransaction, + TResult? Function()? feeRateUnavailable, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? descriptor, + TResult? Function(String errorMessage)? policy, + TResult? Function(String kind)? spendingPolicyRequired, + TResult? Function()? version0, + TResult? Function()? version1Csv, + TResult? Function(String requestedTime, String requiredTime)? lockTime, + TResult? Function()? rbfSequence, + TResult? Function(String rbf, String csv)? rbfSequenceCsv, + TResult? Function(String feeRequired)? feeTooLow, + TResult? Function(String feeRateRequired)? feeRateTooLow, TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt index)? outputBelowDustLimit, + TResult? Function()? changePolicyDescriptor, + TResult? Function(String errorMessage)? coinSelection, TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return bip39?.call(field0); + TResult? Function()? noRecipients, + TResult? Function(String errorMessage)? psbt, + TResult? Function(String key)? missingKeyOrigin, + TResult? Function(String outpoint)? unknownUtxo, + TResult? Function(String outpoint)? missingNonWitnessUtxo, + TResult? Function(String errorMessage)? miniscriptPsbt, + }) { + return outputBelowDustLimit?.call(index); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, + TResult Function(String txid)? transactionNotFound, + TResult Function(String txid)? transactionConfirmed, + TResult Function(String txid)? irreplaceableTransaction, + TResult Function()? feeRateUnavailable, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? descriptor, + TResult Function(String errorMessage)? policy, + TResult Function(String kind)? spendingPolicyRequired, + TResult Function()? version0, + TResult Function()? version1Csv, + TResult Function(String requestedTime, String requiredTime)? lockTime, + TResult Function()? rbfSequence, + TResult Function(String rbf, String csv)? rbfSequenceCsv, + TResult Function(String feeRequired)? feeTooLow, + TResult Function(String feeRateRequired)? feeRateTooLow, TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt index)? outputBelowDustLimit, + TResult Function()? changePolicyDescriptor, + TResult Function(String errorMessage)? coinSelection, TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (bip39 != null) { - return bip39(field0); + TResult Function()? noRecipients, + TResult Function(String errorMessage)? psbt, + TResult Function(String key)? missingKeyOrigin, + TResult Function(String outpoint)? unknownUtxo, + TResult Function(String outpoint)? missingNonWitnessUtxo, + TResult Function(String errorMessage)? miniscriptPsbt, + required TResult orElse(), + }) { + if (outputBelowDustLimit != null) { + return outputBelowDustLimit(index); } return orElse(); } @@ -18261,432 +11414,289 @@ class _$BdkError_Bip39Impl extends BdkError_Bip39 { @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) + required TResult Function(CreateTxError_TransactionNotFound value) transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) + required TResult Function(CreateTxError_TransactionConfirmed value) transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) + required TResult Function(CreateTxError_IrreplaceableTransaction value) irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) + required TResult Function(CreateTxError_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) + required TResult Function(CreateTxError_Generic value) generic, + required TResult Function(CreateTxError_Descriptor value) descriptor, + required TResult Function(CreateTxError_Policy value) policy, + required TResult Function(CreateTxError_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); + required TResult Function(CreateTxError_Version0 value) version0, + required TResult Function(CreateTxError_Version1Csv value) version1Csv, + required TResult Function(CreateTxError_LockTime value) lockTime, + required TResult Function(CreateTxError_RbfSequence value) rbfSequence, + required TResult Function(CreateTxError_RbfSequenceCsv value) + rbfSequenceCsv, + required TResult Function(CreateTxError_FeeTooLow value) feeTooLow, + required TResult Function(CreateTxError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(CreateTxError_NoUtxosSelected value) + noUtxosSelected, + required TResult Function(CreateTxError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(CreateTxError_ChangePolicyDescriptor value) + changePolicyDescriptor, + required TResult Function(CreateTxError_CoinSelection value) coinSelection, + required TResult Function(CreateTxError_InsufficientFunds value) + insufficientFunds, + required TResult Function(CreateTxError_NoRecipients value) noRecipients, + required TResult Function(CreateTxError_Psbt value) psbt, + required TResult Function(CreateTxError_MissingKeyOrigin value) + missingKeyOrigin, + required TResult Function(CreateTxError_UnknownUtxo value) unknownUtxo, + required TResult Function(CreateTxError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(CreateTxError_MiniscriptPsbt value) + miniscriptPsbt, + }) { + return outputBelowDustLimit(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? + TResult? Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(CreateTxError_TransactionConfirmed value)? transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? + TResult? Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? + TResult? Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult? Function(CreateTxError_Generic value)? generic, + TResult? Function(CreateTxError_Descriptor value)? descriptor, + TResult? Function(CreateTxError_Policy value)? policy, + TResult? Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - 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); + TResult? Function(CreateTxError_Version0 value)? version0, + TResult? Function(CreateTxError_Version1Csv value)? version1Csv, + TResult? Function(CreateTxError_LockTime value)? lockTime, + TResult? Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult? Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult? Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult? Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult? Function(CreateTxError_CoinSelection value)? coinSelection, + TResult? Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult? Function(CreateTxError_NoRecipients value)? noRecipients, + TResult? Function(CreateTxError_Psbt value)? psbt, + TResult? Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult? Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, + }) { + return outputBelowDustLimit?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? + TResult Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult Function(CreateTxError_TransactionConfirmed value)? + transactionConfirmed, + TResult Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? + TResult Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult Function(CreateTxError_Generic value)? generic, + TResult Function(CreateTxError_Descriptor value)? descriptor, + TResult Function(CreateTxError_Policy value)? policy, + TResult Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - 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; + TResult Function(CreateTxError_Version0 value)? version0, + TResult Function(CreateTxError_Version1Csv value)? version1Csv, + TResult Function(CreateTxError_LockTime value)? lockTime, + TResult Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult Function(CreateTxError_CoinSelection value)? coinSelection, + TResult Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult Function(CreateTxError_NoRecipients value)? noRecipients, + TResult Function(CreateTxError_Psbt value)? psbt, + TResult Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, + required TResult orElse(), + }) { + if (outputBelowDustLimit != null) { + return outputBelowDustLimit(this); + } + return orElse(); + } +} + +abstract class CreateTxError_OutputBelowDustLimit extends CreateTxError { + const factory CreateTxError_OutputBelowDustLimit( + {required final BigInt index}) = _$CreateTxError_OutputBelowDustLimitImpl; + const CreateTxError_OutputBelowDustLimit._() : super._(); + + BigInt get index; @JsonKey(ignore: true) - _$$BdkError_Bip39ImplCopyWith<_$BdkError_Bip39Impl> get copyWith => - throw _privateConstructorUsedError; + _$$CreateTxError_OutputBelowDustLimitImplCopyWith< + _$CreateTxError_OutputBelowDustLimitImpl> + 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}); +abstract class _$$CreateTxError_ChangePolicyDescriptorImplCopyWith<$Res> { + factory _$$CreateTxError_ChangePolicyDescriptorImplCopyWith( + _$CreateTxError_ChangePolicyDescriptorImpl value, + $Res Function(_$CreateTxError_ChangePolicyDescriptorImpl) then) = + __$$CreateTxError_ChangePolicyDescriptorImplCopyWithImpl<$Res>; } /// @nodoc -class __$$BdkError_Secp256k1ImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_Secp256k1Impl> - implements _$$BdkError_Secp256k1ImplCopyWith<$Res> { - __$$BdkError_Secp256k1ImplCopyWithImpl(_$BdkError_Secp256k1Impl _value, - $Res Function(_$BdkError_Secp256k1Impl) _then) +class __$$CreateTxError_ChangePolicyDescriptorImplCopyWithImpl<$Res> + extends _$CreateTxErrorCopyWithImpl<$Res, + _$CreateTxError_ChangePolicyDescriptorImpl> + implements _$$CreateTxError_ChangePolicyDescriptorImplCopyWith<$Res> { + __$$CreateTxError_ChangePolicyDescriptorImplCopyWithImpl( + _$CreateTxError_ChangePolicyDescriptorImpl _value, + $Res Function(_$CreateTxError_ChangePolicyDescriptorImpl) _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; +class _$CreateTxError_ChangePolicyDescriptorImpl + extends CreateTxError_ChangePolicyDescriptor { + const _$CreateTxError_ChangePolicyDescriptorImpl() : super._(); @override String toString() { - return 'BdkError.secp256K1(field0: $field0)'; + return 'CreateTxError.changePolicyDescriptor()'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_Secp256k1Impl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$CreateTxError_ChangePolicyDescriptorImpl); } @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); + int get hashCode => runtimeType.hashCode; @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, + required TResult Function(String txid) transactionNotFound, + required TResult Function(String txid) transactionConfirmed, + required TResult Function(String txid) irreplaceableTransaction, + required TResult Function() feeRateUnavailable, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) descriptor, + required TResult Function(String errorMessage) policy, + required TResult Function(String kind) spendingPolicyRequired, + required TResult Function() version0, + required TResult Function() version1Csv, + required TResult Function(String requestedTime, String requiredTime) + lockTime, + required TResult Function() rbfSequence, + required TResult Function(String rbf, String csv) rbfSequenceCsv, + required TResult Function(String feeRequired) feeTooLow, + required TResult Function(String feeRateRequired) feeRateTooLow, required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt index) outputBelowDustLimit, + required TResult Function() changePolicyDescriptor, + required TResult Function(String errorMessage) coinSelection, required TResult Function(BigInt needed, BigInt available) insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return secp256K1(field0); + required TResult Function() noRecipients, + required TResult Function(String errorMessage) psbt, + required TResult Function(String key) missingKeyOrigin, + required TResult Function(String outpoint) unknownUtxo, + required TResult Function(String outpoint) missingNonWitnessUtxo, + required TResult Function(String errorMessage) miniscriptPsbt, + }) { + return changePolicyDescriptor(); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, + TResult? Function(String txid)? transactionNotFound, + TResult? Function(String txid)? transactionConfirmed, + TResult? Function(String txid)? irreplaceableTransaction, + TResult? Function()? feeRateUnavailable, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? descriptor, + TResult? Function(String errorMessage)? policy, + TResult? Function(String kind)? spendingPolicyRequired, + TResult? Function()? version0, + TResult? Function()? version1Csv, + TResult? Function(String requestedTime, String requiredTime)? lockTime, + TResult? Function()? rbfSequence, + TResult? Function(String rbf, String csv)? rbfSequenceCsv, + TResult? Function(String feeRequired)? feeTooLow, + TResult? Function(String feeRateRequired)? feeRateTooLow, TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt index)? outputBelowDustLimit, + TResult? Function()? changePolicyDescriptor, + TResult? Function(String errorMessage)? coinSelection, TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return secp256K1?.call(field0); + TResult? Function()? noRecipients, + TResult? Function(String errorMessage)? psbt, + TResult? Function(String key)? missingKeyOrigin, + TResult? Function(String outpoint)? unknownUtxo, + TResult? Function(String outpoint)? missingNonWitnessUtxo, + TResult? Function(String errorMessage)? miniscriptPsbt, + }) { + return changePolicyDescriptor?.call(); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, + TResult Function(String txid)? transactionNotFound, + TResult Function(String txid)? transactionConfirmed, + TResult Function(String txid)? irreplaceableTransaction, + TResult Function()? feeRateUnavailable, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? descriptor, + TResult Function(String errorMessage)? policy, + TResult Function(String kind)? spendingPolicyRequired, + TResult Function()? version0, + TResult Function()? version1Csv, + TResult Function(String requestedTime, String requiredTime)? lockTime, + TResult Function()? rbfSequence, + TResult Function(String rbf, String csv)? rbfSequenceCsv, + TResult Function(String feeRequired)? feeTooLow, + TResult Function(String feeRateRequired)? feeRateTooLow, TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt index)? outputBelowDustLimit, + TResult Function()? changePolicyDescriptor, + TResult Function(String errorMessage)? coinSelection, TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, + TResult Function()? noRecipients, + TResult Function(String errorMessage)? psbt, + TResult Function(String key)? missingKeyOrigin, + TResult Function(String outpoint)? unknownUtxo, + TResult Function(String outpoint)? missingNonWitnessUtxo, + TResult Function(String errorMessage)? miniscriptPsbt, required TResult orElse(), }) { - if (secp256K1 != null) { - return secp256K1(field0); + if (changePolicyDescriptor != null) { + return changePolicyDescriptor(); } return orElse(); } @@ -18694,233 +11704,170 @@ class _$BdkError_Secp256k1Impl extends BdkError_Secp256k1 { @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) + required TResult Function(CreateTxError_TransactionNotFound value) transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) + required TResult Function(CreateTxError_TransactionConfirmed value) transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) + required TResult Function(CreateTxError_IrreplaceableTransaction value) irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) + required TResult Function(CreateTxError_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) + required TResult Function(CreateTxError_Generic value) generic, + required TResult Function(CreateTxError_Descriptor value) descriptor, + required TResult Function(CreateTxError_Policy value) policy, + required TResult Function(CreateTxError_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, + required TResult Function(CreateTxError_Version0 value) version0, + required TResult Function(CreateTxError_Version1Csv value) version1Csv, + required TResult Function(CreateTxError_LockTime value) lockTime, + required TResult Function(CreateTxError_RbfSequence value) rbfSequence, + required TResult Function(CreateTxError_RbfSequenceCsv value) + rbfSequenceCsv, + required TResult Function(CreateTxError_FeeTooLow value) feeTooLow, + required TResult Function(CreateTxError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(CreateTxError_NoUtxosSelected value) + noUtxosSelected, + required TResult Function(CreateTxError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(CreateTxError_ChangePolicyDescriptor value) + changePolicyDescriptor, + required TResult Function(CreateTxError_CoinSelection value) coinSelection, + required TResult Function(CreateTxError_InsufficientFunds value) + insufficientFunds, + required TResult Function(CreateTxError_NoRecipients value) noRecipients, + required TResult Function(CreateTxError_Psbt value) psbt, + required TResult Function(CreateTxError_MissingKeyOrigin value) + missingKeyOrigin, + required TResult Function(CreateTxError_UnknownUtxo value) unknownUtxo, + required TResult Function(CreateTxError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(CreateTxError_MiniscriptPsbt value) + miniscriptPsbt, }) { - return secp256K1(this); + return changePolicyDescriptor(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? + TResult? Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(CreateTxError_TransactionConfirmed value)? transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? + TResult? Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? + TResult? Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult? Function(CreateTxError_Generic value)? generic, + TResult? Function(CreateTxError_Descriptor value)? descriptor, + TResult? Function(CreateTxError_Policy value)? policy, + TResult? Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult? Function(CreateTxError_Version0 value)? version0, + TResult? Function(CreateTxError_Version1Csv value)? version1Csv, + TResult? Function(CreateTxError_LockTime value)? lockTime, + TResult? Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult? Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult? Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult? Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult? Function(CreateTxError_CoinSelection value)? coinSelection, + TResult? Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult? Function(CreateTxError_NoRecipients value)? noRecipients, + TResult? Function(CreateTxError_Psbt value)? psbt, + TResult? Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult? Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, }) { - return secp256K1?.call(this); + return changePolicyDescriptor?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? + TResult Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult Function(CreateTxError_TransactionConfirmed value)? + transactionConfirmed, + TResult Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? + TResult Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult Function(CreateTxError_Generic value)? generic, + TResult Function(CreateTxError_Descriptor value)? descriptor, + TResult Function(CreateTxError_Policy value)? policy, + TResult Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult Function(CreateTxError_Version0 value)? version0, + TResult Function(CreateTxError_Version1Csv value)? version1Csv, + TResult Function(CreateTxError_LockTime value)? lockTime, + TResult Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult Function(CreateTxError_CoinSelection value)? coinSelection, + TResult Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult Function(CreateTxError_NoRecipients value)? noRecipients, + TResult Function(CreateTxError_Psbt value)? psbt, + TResult Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, required TResult orElse(), }) { - if (secp256K1 != null) { - return secp256K1(this); + if (changePolicyDescriptor != null) { + return changePolicyDescriptor(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; +abstract class CreateTxError_ChangePolicyDescriptor extends CreateTxError { + const factory CreateTxError_ChangePolicyDescriptor() = + _$CreateTxError_ChangePolicyDescriptorImpl; + const CreateTxError_ChangePolicyDescriptor._() : super._(); } /// @nodoc -abstract class _$$BdkError_JsonImplCopyWith<$Res> { - factory _$$BdkError_JsonImplCopyWith( - _$BdkError_JsonImpl value, $Res Function(_$BdkError_JsonImpl) then) = - __$$BdkError_JsonImplCopyWithImpl<$Res>; +abstract class _$$CreateTxError_CoinSelectionImplCopyWith<$Res> { + factory _$$CreateTxError_CoinSelectionImplCopyWith( + _$CreateTxError_CoinSelectionImpl value, + $Res Function(_$CreateTxError_CoinSelectionImpl) then) = + __$$CreateTxError_CoinSelectionImplCopyWithImpl<$Res>; @useResult - $Res call({String field0}); + $Res call({String errorMessage}); } /// @nodoc -class __$$BdkError_JsonImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_JsonImpl> - implements _$$BdkError_JsonImplCopyWith<$Res> { - __$$BdkError_JsonImplCopyWithImpl( - _$BdkError_JsonImpl _value, $Res Function(_$BdkError_JsonImpl) _then) +class __$$CreateTxError_CoinSelectionImplCopyWithImpl<$Res> + extends _$CreateTxErrorCopyWithImpl<$Res, _$CreateTxError_CoinSelectionImpl> + implements _$$CreateTxError_CoinSelectionImplCopyWith<$Res> { + __$$CreateTxError_CoinSelectionImplCopyWithImpl( + _$CreateTxError_CoinSelectionImpl _value, + $Res Function(_$CreateTxError_CoinSelectionImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? field0 = null, + Object? errorMessage = null, }) { - return _then(_$BdkError_JsonImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable + return _then(_$CreateTxError_CoinSelectionImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable as String, )); } @@ -18928,198 +11875,138 @@ class __$$BdkError_JsonImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_JsonImpl extends BdkError_Json { - const _$BdkError_JsonImpl(this.field0) : super._(); +class _$CreateTxError_CoinSelectionImpl extends CreateTxError_CoinSelection { + const _$CreateTxError_CoinSelectionImpl({required this.errorMessage}) + : super._(); @override - final String field0; + final String errorMessage; @override String toString() { - return 'BdkError.json(field0: $field0)'; + return 'CreateTxError.coinSelection(errorMessage: $errorMessage)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_JsonImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$CreateTxError_CoinSelectionImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); } @override - int get hashCode => Object.hash(runtimeType, field0); + int get hashCode => Object.hash(runtimeType, errorMessage); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$BdkError_JsonImplCopyWith<_$BdkError_JsonImpl> get copyWith => - __$$BdkError_JsonImplCopyWithImpl<_$BdkError_JsonImpl>(this, _$identity); + _$$CreateTxError_CoinSelectionImplCopyWith<_$CreateTxError_CoinSelectionImpl> + get copyWith => __$$CreateTxError_CoinSelectionImplCopyWithImpl< + _$CreateTxError_CoinSelectionImpl>(this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, + required TResult Function(String txid) transactionNotFound, + required TResult Function(String txid) transactionConfirmed, + required TResult Function(String txid) irreplaceableTransaction, + required TResult Function() feeRateUnavailable, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) descriptor, + required TResult Function(String errorMessage) policy, + required TResult Function(String kind) spendingPolicyRequired, + required TResult Function() version0, + required TResult Function() version1Csv, + required TResult Function(String requestedTime, String requiredTime) + lockTime, + required TResult Function() rbfSequence, + required TResult Function(String rbf, String csv) rbfSequenceCsv, + required TResult Function(String feeRequired) feeTooLow, + required TResult Function(String feeRateRequired) feeRateTooLow, required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt index) outputBelowDustLimit, + required TResult Function() changePolicyDescriptor, + required TResult Function(String errorMessage) coinSelection, required TResult Function(BigInt needed, BigInt available) insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return json(field0); + required TResult Function() noRecipients, + required TResult Function(String errorMessage) psbt, + required TResult Function(String key) missingKeyOrigin, + required TResult Function(String outpoint) unknownUtxo, + required TResult Function(String outpoint) missingNonWitnessUtxo, + required TResult Function(String errorMessage) miniscriptPsbt, + }) { + return coinSelection(errorMessage); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, + TResult? Function(String txid)? transactionNotFound, + TResult? Function(String txid)? transactionConfirmed, + TResult? Function(String txid)? irreplaceableTransaction, + TResult? Function()? feeRateUnavailable, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? descriptor, + TResult? Function(String errorMessage)? policy, + TResult? Function(String kind)? spendingPolicyRequired, + TResult? Function()? version0, + TResult? Function()? version1Csv, + TResult? Function(String requestedTime, String requiredTime)? lockTime, + TResult? Function()? rbfSequence, + TResult? Function(String rbf, String csv)? rbfSequenceCsv, + TResult? Function(String feeRequired)? feeTooLow, + TResult? Function(String feeRateRequired)? feeRateTooLow, TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt index)? outputBelowDustLimit, + TResult? Function()? changePolicyDescriptor, + TResult? Function(String errorMessage)? coinSelection, TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return json?.call(field0); + TResult? Function()? noRecipients, + TResult? Function(String errorMessage)? psbt, + TResult? Function(String key)? missingKeyOrigin, + TResult? Function(String outpoint)? unknownUtxo, + TResult? Function(String outpoint)? missingNonWitnessUtxo, + TResult? Function(String errorMessage)? miniscriptPsbt, + }) { + return coinSelection?.call(errorMessage); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, + TResult Function(String txid)? transactionNotFound, + TResult Function(String txid)? transactionConfirmed, + TResult Function(String txid)? irreplaceableTransaction, + TResult Function()? feeRateUnavailable, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? descriptor, + TResult Function(String errorMessage)? policy, + TResult Function(String kind)? spendingPolicyRequired, + TResult Function()? version0, + TResult Function()? version1Csv, + TResult Function(String requestedTime, String requiredTime)? lockTime, + TResult Function()? rbfSequence, + TResult Function(String rbf, String csv)? rbfSequenceCsv, + TResult Function(String feeRequired)? feeTooLow, + TResult Function(String feeRateRequired)? feeRateTooLow, TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt index)? outputBelowDustLimit, + TResult Function()? changePolicyDescriptor, + TResult Function(String errorMessage)? coinSelection, TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, + TResult Function()? noRecipients, + TResult Function(String errorMessage)? psbt, + TResult Function(String key)? missingKeyOrigin, + TResult Function(String outpoint)? unknownUtxo, + TResult Function(String outpoint)? missingNonWitnessUtxo, + TResult Function(String errorMessage)? miniscriptPsbt, required TResult orElse(), }) { - if (json != null) { - return json(field0); + if (coinSelection != null) { + return coinSelection(errorMessage); } return orElse(); } @@ -19127,431 +12014,326 @@ class _$BdkError_JsonImpl extends BdkError_Json { @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) + required TResult Function(CreateTxError_TransactionNotFound value) transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) + required TResult Function(CreateTxError_TransactionConfirmed value) transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) + required TResult Function(CreateTxError_IrreplaceableTransaction value) irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) + required TResult Function(CreateTxError_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) + required TResult Function(CreateTxError_Generic value) generic, + required TResult Function(CreateTxError_Descriptor value) descriptor, + required TResult Function(CreateTxError_Policy value) policy, + required TResult Function(CreateTxError_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, + required TResult Function(CreateTxError_Version0 value) version0, + required TResult Function(CreateTxError_Version1Csv value) version1Csv, + required TResult Function(CreateTxError_LockTime value) lockTime, + required TResult Function(CreateTxError_RbfSequence value) rbfSequence, + required TResult Function(CreateTxError_RbfSequenceCsv value) + rbfSequenceCsv, + required TResult Function(CreateTxError_FeeTooLow value) feeTooLow, + required TResult Function(CreateTxError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(CreateTxError_NoUtxosSelected value) + noUtxosSelected, + required TResult Function(CreateTxError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(CreateTxError_ChangePolicyDescriptor value) + changePolicyDescriptor, + required TResult Function(CreateTxError_CoinSelection value) coinSelection, + required TResult Function(CreateTxError_InsufficientFunds value) + insufficientFunds, + required TResult Function(CreateTxError_NoRecipients value) noRecipients, + required TResult Function(CreateTxError_Psbt value) psbt, + required TResult Function(CreateTxError_MissingKeyOrigin value) + missingKeyOrigin, + required TResult Function(CreateTxError_UnknownUtxo value) unknownUtxo, + required TResult Function(CreateTxError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(CreateTxError_MiniscriptPsbt value) + miniscriptPsbt, }) { - return json(this); + return coinSelection(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? + TResult? Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(CreateTxError_TransactionConfirmed value)? transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? + TResult? Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? + TResult? Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult? Function(CreateTxError_Generic value)? generic, + TResult? Function(CreateTxError_Descriptor value)? descriptor, + TResult? Function(CreateTxError_Policy value)? policy, + TResult? Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult? Function(CreateTxError_Version0 value)? version0, + TResult? Function(CreateTxError_Version1Csv value)? version1Csv, + TResult? Function(CreateTxError_LockTime value)? lockTime, + TResult? Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult? Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult? Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult? Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult? Function(CreateTxError_CoinSelection value)? coinSelection, + TResult? Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult? Function(CreateTxError_NoRecipients value)? noRecipients, + TResult? Function(CreateTxError_Psbt value)? psbt, + TResult? Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult? Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, }) { - return json?.call(this); + return coinSelection?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? + TResult Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult Function(CreateTxError_TransactionConfirmed value)? + transactionConfirmed, + TResult Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? + TResult Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult Function(CreateTxError_Generic value)? generic, + TResult Function(CreateTxError_Descriptor value)? descriptor, + TResult Function(CreateTxError_Policy value)? policy, + TResult Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult Function(CreateTxError_Version0 value)? version0, + TResult Function(CreateTxError_Version1Csv value)? version1Csv, + TResult Function(CreateTxError_LockTime value)? lockTime, + TResult Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult Function(CreateTxError_CoinSelection value)? coinSelection, + TResult Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult Function(CreateTxError_NoRecipients value)? noRecipients, + TResult Function(CreateTxError_Psbt value)? psbt, + TResult Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, required TResult orElse(), }) { - if (json != null) { - return json(this); + if (coinSelection != null) { + return coinSelection(this); } return orElse(); } } -abstract class BdkError_Json extends BdkError { - const factory BdkError_Json(final String field0) = _$BdkError_JsonImpl; - const BdkError_Json._() : super._(); +abstract class CreateTxError_CoinSelection extends CreateTxError { + const factory CreateTxError_CoinSelection( + {required final String errorMessage}) = _$CreateTxError_CoinSelectionImpl; + const CreateTxError_CoinSelection._() : super._(); - String get field0; + String get errorMessage; @JsonKey(ignore: true) - _$$BdkError_JsonImplCopyWith<_$BdkError_JsonImpl> get copyWith => - throw _privateConstructorUsedError; + _$$CreateTxError_CoinSelectionImplCopyWith<_$CreateTxError_CoinSelectionImpl> + get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$BdkError_PsbtImplCopyWith<$Res> { - factory _$$BdkError_PsbtImplCopyWith( - _$BdkError_PsbtImpl value, $Res Function(_$BdkError_PsbtImpl) then) = - __$$BdkError_PsbtImplCopyWithImpl<$Res>; +abstract class _$$CreateTxError_InsufficientFundsImplCopyWith<$Res> { + factory _$$CreateTxError_InsufficientFundsImplCopyWith( + _$CreateTxError_InsufficientFundsImpl value, + $Res Function(_$CreateTxError_InsufficientFundsImpl) then) = + __$$CreateTxError_InsufficientFundsImplCopyWithImpl<$Res>; @useResult - $Res call({String field0}); + $Res call({BigInt needed, BigInt available}); } /// @nodoc -class __$$BdkError_PsbtImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_PsbtImpl> - implements _$$BdkError_PsbtImplCopyWith<$Res> { - __$$BdkError_PsbtImplCopyWithImpl( - _$BdkError_PsbtImpl _value, $Res Function(_$BdkError_PsbtImpl) _then) +class __$$CreateTxError_InsufficientFundsImplCopyWithImpl<$Res> + extends _$CreateTxErrorCopyWithImpl<$Res, + _$CreateTxError_InsufficientFundsImpl> + implements _$$CreateTxError_InsufficientFundsImplCopyWith<$Res> { + __$$CreateTxError_InsufficientFundsImplCopyWithImpl( + _$CreateTxError_InsufficientFundsImpl _value, + $Res Function(_$CreateTxError_InsufficientFundsImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? field0 = null, + Object? needed = null, + Object? available = null, }) { - return _then(_$BdkError_PsbtImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, + return _then(_$CreateTxError_InsufficientFundsImpl( + needed: null == needed + ? _value.needed + : needed // ignore: cast_nullable_to_non_nullable + as BigInt, + available: null == available + ? _value.available + : available // ignore: cast_nullable_to_non_nullable + as BigInt, )); } } /// @nodoc -class _$BdkError_PsbtImpl extends BdkError_Psbt { - const _$BdkError_PsbtImpl(this.field0) : super._(); +class _$CreateTxError_InsufficientFundsImpl + extends CreateTxError_InsufficientFunds { + const _$CreateTxError_InsufficientFundsImpl( + {required this.needed, required this.available}) + : super._(); @override - final String field0; - + final BigInt needed; + @override + final BigInt available; + @override String toString() { - return 'BdkError.psbt(field0: $field0)'; + return 'CreateTxError.insufficientFunds(needed: $needed, available: $available)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_PsbtImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$CreateTxError_InsufficientFundsImpl && + (identical(other.needed, needed) || other.needed == needed) && + (identical(other.available, available) || + other.available == available)); } @override - int get hashCode => Object.hash(runtimeType, field0); + int get hashCode => Object.hash(runtimeType, needed, available); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$BdkError_PsbtImplCopyWith<_$BdkError_PsbtImpl> get copyWith => - __$$BdkError_PsbtImplCopyWithImpl<_$BdkError_PsbtImpl>(this, _$identity); + _$$CreateTxError_InsufficientFundsImplCopyWith< + _$CreateTxError_InsufficientFundsImpl> + get copyWith => __$$CreateTxError_InsufficientFundsImplCopyWithImpl< + _$CreateTxError_InsufficientFundsImpl>(this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, + required TResult Function(String txid) transactionNotFound, + required TResult Function(String txid) transactionConfirmed, + required TResult Function(String txid) irreplaceableTransaction, + required TResult Function() feeRateUnavailable, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) descriptor, + required TResult Function(String errorMessage) policy, + required TResult Function(String kind) spendingPolicyRequired, + required TResult Function() version0, + required TResult Function() version1Csv, + required TResult Function(String requestedTime, String requiredTime) + lockTime, + required TResult Function() rbfSequence, + required TResult Function(String rbf, String csv) rbfSequenceCsv, + required TResult Function(String feeRequired) feeTooLow, + required TResult Function(String feeRateRequired) feeRateTooLow, required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt index) outputBelowDustLimit, + required TResult Function() changePolicyDescriptor, + required TResult Function(String errorMessage) coinSelection, required TResult Function(BigInt needed, BigInt available) insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return psbt(field0); + required TResult Function() noRecipients, + required TResult Function(String errorMessage) psbt, + required TResult Function(String key) missingKeyOrigin, + required TResult Function(String outpoint) unknownUtxo, + required TResult Function(String outpoint) missingNonWitnessUtxo, + required TResult Function(String errorMessage) miniscriptPsbt, + }) { + return insufficientFunds(needed, available); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, + TResult? Function(String txid)? transactionNotFound, + TResult? Function(String txid)? transactionConfirmed, + TResult? Function(String txid)? irreplaceableTransaction, + TResult? Function()? feeRateUnavailable, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? descriptor, + TResult? Function(String errorMessage)? policy, + TResult? Function(String kind)? spendingPolicyRequired, + TResult? Function()? version0, + TResult? Function()? version1Csv, + TResult? Function(String requestedTime, String requiredTime)? lockTime, + TResult? Function()? rbfSequence, + TResult? Function(String rbf, String csv)? rbfSequenceCsv, + TResult? Function(String feeRequired)? feeTooLow, + TResult? Function(String feeRateRequired)? feeRateTooLow, TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt index)? outputBelowDustLimit, + TResult? Function()? changePolicyDescriptor, + TResult? Function(String errorMessage)? coinSelection, TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return psbt?.call(field0); + TResult? Function()? noRecipients, + TResult? Function(String errorMessage)? psbt, + TResult? Function(String key)? missingKeyOrigin, + TResult? Function(String outpoint)? unknownUtxo, + TResult? Function(String outpoint)? missingNonWitnessUtxo, + TResult? Function(String errorMessage)? miniscriptPsbt, + }) { + return insufficientFunds?.call(needed, available); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, + TResult Function(String txid)? transactionNotFound, + TResult Function(String txid)? transactionConfirmed, + TResult Function(String txid)? irreplaceableTransaction, + TResult Function()? feeRateUnavailable, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? descriptor, + TResult Function(String errorMessage)? policy, + TResult Function(String kind)? spendingPolicyRequired, + TResult Function()? version0, + TResult Function()? version1Csv, + TResult Function(String requestedTime, String requiredTime)? lockTime, + TResult Function()? rbfSequence, + TResult Function(String rbf, String csv)? rbfSequenceCsv, + TResult Function(String feeRequired)? feeTooLow, + TResult Function(String feeRateRequired)? feeRateTooLow, TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt index)? outputBelowDustLimit, + TResult Function()? changePolicyDescriptor, + TResult Function(String errorMessage)? coinSelection, TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, + TResult Function()? noRecipients, + TResult Function(String errorMessage)? psbt, + TResult Function(String key)? missingKeyOrigin, + TResult Function(String outpoint)? unknownUtxo, + TResult Function(String outpoint)? missingNonWitnessUtxo, + TResult Function(String errorMessage)? miniscriptPsbt, required TResult orElse(), }) { - if (psbt != null) { - return psbt(field0); + if (insufficientFunds != null) { + return insufficientFunds(needed, available); } return orElse(); } @@ -19559,432 +12341,289 @@ class _$BdkError_PsbtImpl extends BdkError_Psbt { @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) + required TResult Function(CreateTxError_TransactionNotFound value) transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) + required TResult Function(CreateTxError_TransactionConfirmed value) transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) + required TResult Function(CreateTxError_IrreplaceableTransaction value) irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) + required TResult Function(CreateTxError_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) + required TResult Function(CreateTxError_Generic value) generic, + required TResult Function(CreateTxError_Descriptor value) descriptor, + required TResult Function(CreateTxError_Policy value) policy, + required TResult Function(CreateTxError_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, + required TResult Function(CreateTxError_Version0 value) version0, + required TResult Function(CreateTxError_Version1Csv value) version1Csv, + required TResult Function(CreateTxError_LockTime value) lockTime, + required TResult Function(CreateTxError_RbfSequence value) rbfSequence, + required TResult Function(CreateTxError_RbfSequenceCsv value) + rbfSequenceCsv, + required TResult Function(CreateTxError_FeeTooLow value) feeTooLow, + required TResult Function(CreateTxError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(CreateTxError_NoUtxosSelected value) + noUtxosSelected, + required TResult Function(CreateTxError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(CreateTxError_ChangePolicyDescriptor value) + changePolicyDescriptor, + required TResult Function(CreateTxError_CoinSelection value) coinSelection, + required TResult Function(CreateTxError_InsufficientFunds value) + insufficientFunds, + required TResult Function(CreateTxError_NoRecipients value) noRecipients, + required TResult Function(CreateTxError_Psbt value) psbt, + required TResult Function(CreateTxError_MissingKeyOrigin value) + missingKeyOrigin, + required TResult Function(CreateTxError_UnknownUtxo value) unknownUtxo, + required TResult Function(CreateTxError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(CreateTxError_MiniscriptPsbt value) + miniscriptPsbt, }) { - return psbt(this); + return insufficientFunds(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? + TResult? Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(CreateTxError_TransactionConfirmed value)? transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? + TResult? Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? + TResult? Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult? Function(CreateTxError_Generic value)? generic, + TResult? Function(CreateTxError_Descriptor value)? descriptor, + TResult? Function(CreateTxError_Policy value)? policy, + TResult? Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult? Function(CreateTxError_Version0 value)? version0, + TResult? Function(CreateTxError_Version1Csv value)? version1Csv, + TResult? Function(CreateTxError_LockTime value)? lockTime, + TResult? Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult? Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult? Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult? Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult? Function(CreateTxError_CoinSelection value)? coinSelection, + TResult? Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult? Function(CreateTxError_NoRecipients value)? noRecipients, + TResult? Function(CreateTxError_Psbt value)? psbt, + TResult? Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult? Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, }) { - return psbt?.call(this); + return insufficientFunds?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? + TResult Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult Function(CreateTxError_TransactionConfirmed value)? + transactionConfirmed, + TResult Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? + TResult Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult Function(CreateTxError_Generic value)? generic, + TResult Function(CreateTxError_Descriptor value)? descriptor, + TResult Function(CreateTxError_Policy value)? policy, + TResult Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, + TResult Function(CreateTxError_Version0 value)? version0, + TResult Function(CreateTxError_Version1Csv value)? version1Csv, + TResult Function(CreateTxError_LockTime value)? lockTime, + TResult Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult Function(CreateTxError_CoinSelection value)? coinSelection, + TResult Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult Function(CreateTxError_NoRecipients value)? noRecipients, + TResult Function(CreateTxError_Psbt value)? psbt, + TResult Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, required TResult orElse(), }) { - if (psbt != null) { - return psbt(this); + if (insufficientFunds != null) { + return insufficientFunds(this); } return orElse(); } } -abstract class BdkError_Psbt extends BdkError { - const factory BdkError_Psbt(final String field0) = _$BdkError_PsbtImpl; - const BdkError_Psbt._() : super._(); +abstract class CreateTxError_InsufficientFunds extends CreateTxError { + const factory CreateTxError_InsufficientFunds( + {required final BigInt needed, + required final BigInt available}) = _$CreateTxError_InsufficientFundsImpl; + const CreateTxError_InsufficientFunds._() : super._(); - String get field0; + BigInt get needed; + BigInt get available; @JsonKey(ignore: true) - _$$BdkError_PsbtImplCopyWith<_$BdkError_PsbtImpl> get copyWith => - throw _privateConstructorUsedError; + _$$CreateTxError_InsufficientFundsImplCopyWith< + _$CreateTxError_InsufficientFundsImpl> + 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}); +abstract class _$$CreateTxError_NoRecipientsImplCopyWith<$Res> { + factory _$$CreateTxError_NoRecipientsImplCopyWith( + _$CreateTxError_NoRecipientsImpl value, + $Res Function(_$CreateTxError_NoRecipientsImpl) then) = + __$$CreateTxError_NoRecipientsImplCopyWithImpl<$Res>; } /// @nodoc -class __$$BdkError_PsbtParseImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_PsbtParseImpl> - implements _$$BdkError_PsbtParseImplCopyWith<$Res> { - __$$BdkError_PsbtParseImplCopyWithImpl(_$BdkError_PsbtParseImpl _value, - $Res Function(_$BdkError_PsbtParseImpl) _then) +class __$$CreateTxError_NoRecipientsImplCopyWithImpl<$Res> + extends _$CreateTxErrorCopyWithImpl<$Res, _$CreateTxError_NoRecipientsImpl> + implements _$$CreateTxError_NoRecipientsImplCopyWith<$Res> { + __$$CreateTxError_NoRecipientsImplCopyWithImpl( + _$CreateTxError_NoRecipientsImpl _value, + $Res Function(_$CreateTxError_NoRecipientsImpl) _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; +class _$CreateTxError_NoRecipientsImpl extends CreateTxError_NoRecipients { + const _$CreateTxError_NoRecipientsImpl() : super._(); @override String toString() { - return 'BdkError.psbtParse(field0: $field0)'; + return 'CreateTxError.noRecipients()'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_PsbtParseImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$CreateTxError_NoRecipientsImpl); } @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); + int get hashCode => runtimeType.hashCode; @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, + required TResult Function(String txid) transactionNotFound, + required TResult Function(String txid) transactionConfirmed, + required TResult Function(String txid) irreplaceableTransaction, + required TResult Function() feeRateUnavailable, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) descriptor, + required TResult Function(String errorMessage) policy, + required TResult Function(String kind) spendingPolicyRequired, + required TResult Function() version0, + required TResult Function() version1Csv, + required TResult Function(String requestedTime, String requiredTime) + lockTime, + required TResult Function() rbfSequence, + required TResult Function(String rbf, String csv) rbfSequenceCsv, + required TResult Function(String feeRequired) feeTooLow, + required TResult Function(String feeRateRequired) feeRateTooLow, required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt index) outputBelowDustLimit, + required TResult Function() changePolicyDescriptor, + required TResult Function(String errorMessage) coinSelection, required TResult Function(BigInt needed, BigInt available) insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return psbtParse(field0); + required TResult Function() noRecipients, + required TResult Function(String errorMessage) psbt, + required TResult Function(String key) missingKeyOrigin, + required TResult Function(String outpoint) unknownUtxo, + required TResult Function(String outpoint) missingNonWitnessUtxo, + required TResult Function(String errorMessage) miniscriptPsbt, + }) { + return noRecipients(); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, + TResult? Function(String txid)? transactionNotFound, + TResult? Function(String txid)? transactionConfirmed, + TResult? Function(String txid)? irreplaceableTransaction, + TResult? Function()? feeRateUnavailable, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? descriptor, + TResult? Function(String errorMessage)? policy, + TResult? Function(String kind)? spendingPolicyRequired, + TResult? Function()? version0, + TResult? Function()? version1Csv, + TResult? Function(String requestedTime, String requiredTime)? lockTime, + TResult? Function()? rbfSequence, + TResult? Function(String rbf, String csv)? rbfSequenceCsv, + TResult? Function(String feeRequired)? feeTooLow, + TResult? Function(String feeRateRequired)? feeRateTooLow, TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt index)? outputBelowDustLimit, + TResult? Function()? changePolicyDescriptor, + TResult? Function(String errorMessage)? coinSelection, TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return psbtParse?.call(field0); + TResult? Function()? noRecipients, + TResult? Function(String errorMessage)? psbt, + TResult? Function(String key)? missingKeyOrigin, + TResult? Function(String outpoint)? unknownUtxo, + TResult? Function(String outpoint)? missingNonWitnessUtxo, + TResult? Function(String errorMessage)? miniscriptPsbt, + }) { + return noRecipients?.call(); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, + TResult Function(String txid)? transactionNotFound, + TResult Function(String txid)? transactionConfirmed, + TResult Function(String txid)? irreplaceableTransaction, + TResult Function()? feeRateUnavailable, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? descriptor, + TResult Function(String errorMessage)? policy, + TResult Function(String kind)? spendingPolicyRequired, + TResult Function()? version0, + TResult Function()? version1Csv, + TResult Function(String requestedTime, String requiredTime)? lockTime, + TResult Function()? rbfSequence, + TResult Function(String rbf, String csv)? rbfSequenceCsv, + TResult Function(String feeRequired)? feeTooLow, + TResult Function(String feeRateRequired)? feeRateTooLow, TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt index)? outputBelowDustLimit, + TResult Function()? changePolicyDescriptor, + TResult Function(String errorMessage)? coinSelection, TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (psbtParse != null) { - return psbtParse(field0); + TResult Function()? noRecipients, + TResult Function(String errorMessage)? psbt, + TResult Function(String key)? missingKeyOrigin, + TResult Function(String outpoint)? unknownUtxo, + TResult Function(String outpoint)? missingNonWitnessUtxo, + TResult Function(String errorMessage)? miniscriptPsbt, + required TResult orElse(), + }) { + if (noRecipients != null) { + return noRecipients(); } return orElse(); } @@ -19992,446 +12631,305 @@ class _$BdkError_PsbtParseImpl extends BdkError_PsbtParse { @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) + required TResult Function(CreateTxError_TransactionNotFound value) transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) + required TResult Function(CreateTxError_TransactionConfirmed value) transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) + required TResult Function(CreateTxError_IrreplaceableTransaction value) irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) + required TResult Function(CreateTxError_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) + required TResult Function(CreateTxError_Generic value) generic, + required TResult Function(CreateTxError_Descriptor value) descriptor, + required TResult Function(CreateTxError_Policy value) policy, + required TResult Function(CreateTxError_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); + required TResult Function(CreateTxError_Version0 value) version0, + required TResult Function(CreateTxError_Version1Csv value) version1Csv, + required TResult Function(CreateTxError_LockTime value) lockTime, + required TResult Function(CreateTxError_RbfSequence value) rbfSequence, + required TResult Function(CreateTxError_RbfSequenceCsv value) + rbfSequenceCsv, + required TResult Function(CreateTxError_FeeTooLow value) feeTooLow, + required TResult Function(CreateTxError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(CreateTxError_NoUtxosSelected value) + noUtxosSelected, + required TResult Function(CreateTxError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(CreateTxError_ChangePolicyDescriptor value) + changePolicyDescriptor, + required TResult Function(CreateTxError_CoinSelection value) coinSelection, + required TResult Function(CreateTxError_InsufficientFunds value) + insufficientFunds, + required TResult Function(CreateTxError_NoRecipients value) noRecipients, + required TResult Function(CreateTxError_Psbt value) psbt, + required TResult Function(CreateTxError_MissingKeyOrigin value) + missingKeyOrigin, + required TResult Function(CreateTxError_UnknownUtxo value) unknownUtxo, + required TResult Function(CreateTxError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(CreateTxError_MiniscriptPsbt value) + miniscriptPsbt, + }) { + return noRecipients(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? + TResult? Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(CreateTxError_TransactionConfirmed value)? transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? + TResult? Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? + TResult? Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult? Function(CreateTxError_Generic value)? generic, + TResult? Function(CreateTxError_Descriptor value)? descriptor, + TResult? Function(CreateTxError_Policy value)? policy, + TResult? Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - 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); + TResult? Function(CreateTxError_Version0 value)? version0, + TResult? Function(CreateTxError_Version1Csv value)? version1Csv, + TResult? Function(CreateTxError_LockTime value)? lockTime, + TResult? Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult? Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult? Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult? Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult? Function(CreateTxError_CoinSelection value)? coinSelection, + TResult? Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult? Function(CreateTxError_NoRecipients value)? noRecipients, + TResult? Function(CreateTxError_Psbt value)? psbt, + TResult? Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult? Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, + }) { + return noRecipients?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? + TResult Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult Function(CreateTxError_TransactionConfirmed value)? + transactionConfirmed, + TResult Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? + TResult Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult Function(CreateTxError_Generic value)? generic, + TResult Function(CreateTxError_Descriptor value)? descriptor, + TResult Function(CreateTxError_Policy value)? policy, + TResult Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - 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; + TResult Function(CreateTxError_Version0 value)? version0, + TResult Function(CreateTxError_Version1Csv value)? version1Csv, + TResult Function(CreateTxError_LockTime value)? lockTime, + TResult Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult Function(CreateTxError_CoinSelection value)? coinSelection, + TResult Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult Function(CreateTxError_NoRecipients value)? noRecipients, + TResult Function(CreateTxError_Psbt value)? psbt, + TResult Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, + required TResult orElse(), + }) { + if (noRecipients != null) { + return noRecipients(this); + } + return orElse(); + } +} + +abstract class CreateTxError_NoRecipients extends CreateTxError { + const factory CreateTxError_NoRecipients() = _$CreateTxError_NoRecipientsImpl; + const CreateTxError_NoRecipients._() : super._(); } /// @nodoc -abstract class _$$BdkError_MissingCachedScriptsImplCopyWith<$Res> { - factory _$$BdkError_MissingCachedScriptsImplCopyWith( - _$BdkError_MissingCachedScriptsImpl value, - $Res Function(_$BdkError_MissingCachedScriptsImpl) then) = - __$$BdkError_MissingCachedScriptsImplCopyWithImpl<$Res>; +abstract class _$$CreateTxError_PsbtImplCopyWith<$Res> { + factory _$$CreateTxError_PsbtImplCopyWith(_$CreateTxError_PsbtImpl value, + $Res Function(_$CreateTxError_PsbtImpl) then) = + __$$CreateTxError_PsbtImplCopyWithImpl<$Res>; @useResult - $Res call({BigInt field0, BigInt field1}); + $Res call({String errorMessage}); } /// @nodoc -class __$$BdkError_MissingCachedScriptsImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_MissingCachedScriptsImpl> - implements _$$BdkError_MissingCachedScriptsImplCopyWith<$Res> { - __$$BdkError_MissingCachedScriptsImplCopyWithImpl( - _$BdkError_MissingCachedScriptsImpl _value, - $Res Function(_$BdkError_MissingCachedScriptsImpl) _then) +class __$$CreateTxError_PsbtImplCopyWithImpl<$Res> + extends _$CreateTxErrorCopyWithImpl<$Res, _$CreateTxError_PsbtImpl> + implements _$$CreateTxError_PsbtImplCopyWith<$Res> { + __$$CreateTxError_PsbtImplCopyWithImpl(_$CreateTxError_PsbtImpl _value, + $Res Function(_$CreateTxError_PsbtImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? field0 = null, - Object? field1 = null, + Object? errorMessage = null, }) { - return _then(_$BdkError_MissingCachedScriptsImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as BigInt, - null == field1 - ? _value.field1 - : field1 // ignore: cast_nullable_to_non_nullable - as BigInt, + return _then(_$CreateTxError_PsbtImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, )); } } /// @nodoc -class _$BdkError_MissingCachedScriptsImpl - extends BdkError_MissingCachedScripts { - const _$BdkError_MissingCachedScriptsImpl(this.field0, this.field1) - : super._(); +class _$CreateTxError_PsbtImpl extends CreateTxError_Psbt { + const _$CreateTxError_PsbtImpl({required this.errorMessage}) : super._(); @override - final BigInt field0; - @override - final BigInt field1; + final String errorMessage; @override String toString() { - return 'BdkError.missingCachedScripts(field0: $field0, field1: $field1)'; + return 'CreateTxError.psbt(errorMessage: $errorMessage)'; } @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)); + other is _$CreateTxError_PsbtImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); } @override - int get hashCode => Object.hash(runtimeType, field0, field1); + int get hashCode => Object.hash(runtimeType, errorMessage); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$BdkError_MissingCachedScriptsImplCopyWith< - _$BdkError_MissingCachedScriptsImpl> - get copyWith => __$$BdkError_MissingCachedScriptsImplCopyWithImpl< - _$BdkError_MissingCachedScriptsImpl>(this, _$identity); + _$$CreateTxError_PsbtImplCopyWith<_$CreateTxError_PsbtImpl> get copyWith => + __$$CreateTxError_PsbtImplCopyWithImpl<_$CreateTxError_PsbtImpl>( + this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, + required TResult Function(String txid) transactionNotFound, + required TResult Function(String txid) transactionConfirmed, + required TResult Function(String txid) irreplaceableTransaction, + required TResult Function() feeRateUnavailable, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) descriptor, + required TResult Function(String errorMessage) policy, + required TResult Function(String kind) spendingPolicyRequired, + required TResult Function() version0, + required TResult Function() version1Csv, + required TResult Function(String requestedTime, String requiredTime) + lockTime, + required TResult Function() rbfSequence, + required TResult Function(String rbf, String csv) rbfSequenceCsv, + required TResult Function(String feeRequired) feeTooLow, + required TResult Function(String feeRateRequired) feeRateTooLow, required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt index) outputBelowDustLimit, + required TResult Function() changePolicyDescriptor, + required TResult Function(String errorMessage) coinSelection, required TResult Function(BigInt needed, BigInt available) insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return missingCachedScripts(field0, field1); + required TResult Function() noRecipients, + required TResult Function(String errorMessage) psbt, + required TResult Function(String key) missingKeyOrigin, + required TResult Function(String outpoint) unknownUtxo, + required TResult Function(String outpoint) missingNonWitnessUtxo, + required TResult Function(String errorMessage) miniscriptPsbt, + }) { + return psbt(errorMessage); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, + TResult? Function(String txid)? transactionNotFound, + TResult? Function(String txid)? transactionConfirmed, + TResult? Function(String txid)? irreplaceableTransaction, + TResult? Function()? feeRateUnavailable, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? descriptor, + TResult? Function(String errorMessage)? policy, + TResult? Function(String kind)? spendingPolicyRequired, + TResult? Function()? version0, + TResult? Function()? version1Csv, + TResult? Function(String requestedTime, String requiredTime)? lockTime, + TResult? Function()? rbfSequence, + TResult? Function(String rbf, String csv)? rbfSequenceCsv, + TResult? Function(String feeRequired)? feeTooLow, + TResult? Function(String feeRateRequired)? feeRateTooLow, TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt index)? outputBelowDustLimit, + TResult? Function()? changePolicyDescriptor, + TResult? Function(String errorMessage)? coinSelection, TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return missingCachedScripts?.call(field0, field1); + TResult? Function()? noRecipients, + TResult? Function(String errorMessage)? psbt, + TResult? Function(String key)? missingKeyOrigin, + TResult? Function(String outpoint)? unknownUtxo, + TResult? Function(String outpoint)? missingNonWitnessUtxo, + TResult? Function(String errorMessage)? miniscriptPsbt, + }) { + return psbt?.call(errorMessage); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, + TResult Function(String txid)? transactionNotFound, + TResult Function(String txid)? transactionConfirmed, + TResult Function(String txid)? irreplaceableTransaction, + TResult Function()? feeRateUnavailable, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? descriptor, + TResult Function(String errorMessage)? policy, + TResult Function(String kind)? spendingPolicyRequired, + TResult Function()? version0, + TResult Function()? version1Csv, + TResult Function(String requestedTime, String requiredTime)? lockTime, + TResult Function()? rbfSequence, + TResult Function(String rbf, String csv)? rbfSequenceCsv, + TResult Function(String feeRequired)? feeTooLow, + TResult Function(String feeRateRequired)? feeRateTooLow, TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt index)? outputBelowDustLimit, + TResult Function()? changePolicyDescriptor, + TResult Function(String errorMessage)? coinSelection, TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (missingCachedScripts != null) { - return missingCachedScripts(field0, field1); + TResult Function()? noRecipients, + TResult Function(String errorMessage)? psbt, + TResult Function(String key)? missingKeyOrigin, + TResult Function(String outpoint)? unknownUtxo, + TResult Function(String outpoint)? missingNonWitnessUtxo, + TResult Function(String errorMessage)? miniscriptPsbt, + required TResult orElse(), + }) { + if (psbt != null) { + return psbt(errorMessage); } return orElse(); } @@ -20439,236 +12937,176 @@ class _$BdkError_MissingCachedScriptsImpl @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) + required TResult Function(CreateTxError_TransactionNotFound value) transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) + required TResult Function(CreateTxError_TransactionConfirmed value) transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) + required TResult Function(CreateTxError_IrreplaceableTransaction value) irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) + required TResult Function(CreateTxError_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) + required TResult Function(CreateTxError_Generic value) generic, + required TResult Function(CreateTxError_Descriptor value) descriptor, + required TResult Function(CreateTxError_Policy value) policy, + required TResult Function(CreateTxError_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); + required TResult Function(CreateTxError_Version0 value) version0, + required TResult Function(CreateTxError_Version1Csv value) version1Csv, + required TResult Function(CreateTxError_LockTime value) lockTime, + required TResult Function(CreateTxError_RbfSequence value) rbfSequence, + required TResult Function(CreateTxError_RbfSequenceCsv value) + rbfSequenceCsv, + required TResult Function(CreateTxError_FeeTooLow value) feeTooLow, + required TResult Function(CreateTxError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(CreateTxError_NoUtxosSelected value) + noUtxosSelected, + required TResult Function(CreateTxError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(CreateTxError_ChangePolicyDescriptor value) + changePolicyDescriptor, + required TResult Function(CreateTxError_CoinSelection value) coinSelection, + required TResult Function(CreateTxError_InsufficientFunds value) + insufficientFunds, + required TResult Function(CreateTxError_NoRecipients value) noRecipients, + required TResult Function(CreateTxError_Psbt value) psbt, + required TResult Function(CreateTxError_MissingKeyOrigin value) + missingKeyOrigin, + required TResult Function(CreateTxError_UnknownUtxo value) unknownUtxo, + required TResult Function(CreateTxError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(CreateTxError_MiniscriptPsbt value) + miniscriptPsbt, + }) { + return psbt(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? + TResult? Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(CreateTxError_TransactionConfirmed value)? transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? + TResult? Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? + TResult? Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult? Function(CreateTxError_Generic value)? generic, + TResult? Function(CreateTxError_Descriptor value)? descriptor, + TResult? Function(CreateTxError_Policy value)? policy, + TResult? Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - 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); + TResult? Function(CreateTxError_Version0 value)? version0, + TResult? Function(CreateTxError_Version1Csv value)? version1Csv, + TResult? Function(CreateTxError_LockTime value)? lockTime, + TResult? Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult? Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult? Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult? Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult? Function(CreateTxError_CoinSelection value)? coinSelection, + TResult? Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult? Function(CreateTxError_NoRecipients value)? noRecipients, + TResult? Function(CreateTxError_Psbt value)? psbt, + TResult? Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult? Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, + }) { + return psbt?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? + TResult Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult Function(CreateTxError_TransactionConfirmed value)? + transactionConfirmed, + TResult Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? + TResult Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult Function(CreateTxError_Generic value)? generic, + TResult Function(CreateTxError_Descriptor value)? descriptor, + TResult Function(CreateTxError_Policy value)? policy, + TResult Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (missingCachedScripts != null) { - return missingCachedScripts(this); - } - return orElse(); - } -} - -abstract class BdkError_MissingCachedScripts extends BdkError { - const factory BdkError_MissingCachedScripts( - final BigInt field0, final BigInt field1) = - _$BdkError_MissingCachedScriptsImpl; - const BdkError_MissingCachedScripts._() : super._(); - - BigInt get field0; - BigInt get field1; + TResult Function(CreateTxError_Version0 value)? version0, + TResult Function(CreateTxError_Version1Csv value)? version1Csv, + TResult Function(CreateTxError_LockTime value)? lockTime, + TResult Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult Function(CreateTxError_CoinSelection value)? coinSelection, + TResult Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult Function(CreateTxError_NoRecipients value)? noRecipients, + TResult Function(CreateTxError_Psbt value)? psbt, + TResult Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, + required TResult orElse(), + }) { + if (psbt != null) { + return psbt(this); + } + return orElse(); + } +} + +abstract class CreateTxError_Psbt extends CreateTxError { + const factory CreateTxError_Psbt({required final String errorMessage}) = + _$CreateTxError_PsbtImpl; + const CreateTxError_Psbt._() : super._(); + + String get errorMessage; @JsonKey(ignore: true) - _$$BdkError_MissingCachedScriptsImplCopyWith< - _$BdkError_MissingCachedScriptsImpl> - get copyWith => throw _privateConstructorUsedError; + _$$CreateTxError_PsbtImplCopyWith<_$CreateTxError_PsbtImpl> get copyWith => + throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$BdkError_ElectrumImplCopyWith<$Res> { - factory _$$BdkError_ElectrumImplCopyWith(_$BdkError_ElectrumImpl value, - $Res Function(_$BdkError_ElectrumImpl) then) = - __$$BdkError_ElectrumImplCopyWithImpl<$Res>; +abstract class _$$CreateTxError_MissingKeyOriginImplCopyWith<$Res> { + factory _$$CreateTxError_MissingKeyOriginImplCopyWith( + _$CreateTxError_MissingKeyOriginImpl value, + $Res Function(_$CreateTxError_MissingKeyOriginImpl) then) = + __$$CreateTxError_MissingKeyOriginImplCopyWithImpl<$Res>; @useResult - $Res call({String field0}); + $Res call({String key}); } /// @nodoc -class __$$BdkError_ElectrumImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_ElectrumImpl> - implements _$$BdkError_ElectrumImplCopyWith<$Res> { - __$$BdkError_ElectrumImplCopyWithImpl(_$BdkError_ElectrumImpl _value, - $Res Function(_$BdkError_ElectrumImpl) _then) +class __$$CreateTxError_MissingKeyOriginImplCopyWithImpl<$Res> + extends _$CreateTxErrorCopyWithImpl<$Res, + _$CreateTxError_MissingKeyOriginImpl> + implements _$$CreateTxError_MissingKeyOriginImplCopyWith<$Res> { + __$$CreateTxError_MissingKeyOriginImplCopyWithImpl( + _$CreateTxError_MissingKeyOriginImpl _value, + $Res Function(_$CreateTxError_MissingKeyOriginImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? field0 = null, + Object? key = null, }) { - return _then(_$BdkError_ElectrumImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable + return _then(_$CreateTxError_MissingKeyOriginImpl( + key: null == key + ? _value.key + : key // ignore: cast_nullable_to_non_nullable as String, )); } @@ -20676,199 +13114,138 @@ class __$$BdkError_ElectrumImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_ElectrumImpl extends BdkError_Electrum { - const _$BdkError_ElectrumImpl(this.field0) : super._(); +class _$CreateTxError_MissingKeyOriginImpl + extends CreateTxError_MissingKeyOrigin { + const _$CreateTxError_MissingKeyOriginImpl({required this.key}) : super._(); @override - final String field0; + final String key; @override String toString() { - return 'BdkError.electrum(field0: $field0)'; + return 'CreateTxError.missingKeyOrigin(key: $key)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_ElectrumImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$CreateTxError_MissingKeyOriginImpl && + (identical(other.key, key) || other.key == key)); } @override - int get hashCode => Object.hash(runtimeType, field0); + int get hashCode => Object.hash(runtimeType, key); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$BdkError_ElectrumImplCopyWith<_$BdkError_ElectrumImpl> get copyWith => - __$$BdkError_ElectrumImplCopyWithImpl<_$BdkError_ElectrumImpl>( - this, _$identity); + _$$CreateTxError_MissingKeyOriginImplCopyWith< + _$CreateTxError_MissingKeyOriginImpl> + get copyWith => __$$CreateTxError_MissingKeyOriginImplCopyWithImpl< + _$CreateTxError_MissingKeyOriginImpl>(this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, + required TResult Function(String txid) transactionNotFound, + required TResult Function(String txid) transactionConfirmed, + required TResult Function(String txid) irreplaceableTransaction, + required TResult Function() feeRateUnavailable, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) descriptor, + required TResult Function(String errorMessage) policy, + required TResult Function(String kind) spendingPolicyRequired, + required TResult Function() version0, + required TResult Function() version1Csv, + required TResult Function(String requestedTime, String requiredTime) + lockTime, + required TResult Function() rbfSequence, + required TResult Function(String rbf, String csv) rbfSequenceCsv, + required TResult Function(String feeRequired) feeTooLow, + required TResult Function(String feeRateRequired) feeRateTooLow, required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt index) outputBelowDustLimit, + required TResult Function() changePolicyDescriptor, + required TResult Function(String errorMessage) coinSelection, required TResult Function(BigInt needed, BigInt available) insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return electrum(field0); + required TResult Function() noRecipients, + required TResult Function(String errorMessage) psbt, + required TResult Function(String key) missingKeyOrigin, + required TResult Function(String outpoint) unknownUtxo, + required TResult Function(String outpoint) missingNonWitnessUtxo, + required TResult Function(String errorMessage) miniscriptPsbt, + }) { + return missingKeyOrigin(key); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, + TResult? Function(String txid)? transactionNotFound, + TResult? Function(String txid)? transactionConfirmed, + TResult? Function(String txid)? irreplaceableTransaction, + TResult? Function()? feeRateUnavailable, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? descriptor, + TResult? Function(String errorMessage)? policy, + TResult? Function(String kind)? spendingPolicyRequired, + TResult? Function()? version0, + TResult? Function()? version1Csv, + TResult? Function(String requestedTime, String requiredTime)? lockTime, + TResult? Function()? rbfSequence, + TResult? Function(String rbf, String csv)? rbfSequenceCsv, + TResult? Function(String feeRequired)? feeTooLow, + TResult? Function(String feeRateRequired)? feeRateTooLow, TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt index)? outputBelowDustLimit, + TResult? Function()? changePolicyDescriptor, + TResult? Function(String errorMessage)? coinSelection, TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return electrum?.call(field0); + TResult? Function()? noRecipients, + TResult? Function(String errorMessage)? psbt, + TResult? Function(String key)? missingKeyOrigin, + TResult? Function(String outpoint)? unknownUtxo, + TResult? Function(String outpoint)? missingNonWitnessUtxo, + TResult? Function(String errorMessage)? miniscriptPsbt, + }) { + return missingKeyOrigin?.call(key); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, + TResult Function(String txid)? transactionNotFound, + TResult Function(String txid)? transactionConfirmed, + TResult Function(String txid)? irreplaceableTransaction, + TResult Function()? feeRateUnavailable, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? descriptor, + TResult Function(String errorMessage)? policy, + TResult Function(String kind)? spendingPolicyRequired, + TResult Function()? version0, + TResult Function()? version1Csv, + TResult Function(String requestedTime, String requiredTime)? lockTime, + TResult Function()? rbfSequence, + TResult Function(String rbf, String csv)? rbfSequenceCsv, + TResult Function(String feeRequired)? feeTooLow, + TResult Function(String feeRateRequired)? feeRateTooLow, TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt index)? outputBelowDustLimit, + TResult Function()? changePolicyDescriptor, + TResult Function(String errorMessage)? coinSelection, TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (electrum != null) { - return electrum(field0); + TResult Function()? noRecipients, + TResult Function(String errorMessage)? psbt, + TResult Function(String key)? missingKeyOrigin, + TResult Function(String outpoint)? unknownUtxo, + TResult Function(String outpoint)? missingNonWitnessUtxo, + TResult Function(String errorMessage)? miniscriptPsbt, + required TResult orElse(), + }) { + if (missingKeyOrigin != null) { + return missingKeyOrigin(key); } return orElse(); } @@ -20876,233 +13253,176 @@ class _$BdkError_ElectrumImpl extends BdkError_Electrum { @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) + required TResult Function(CreateTxError_TransactionNotFound value) transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) + required TResult Function(CreateTxError_TransactionConfirmed value) transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) + required TResult Function(CreateTxError_IrreplaceableTransaction value) irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) + required TResult Function(CreateTxError_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) + required TResult Function(CreateTxError_Generic value) generic, + required TResult Function(CreateTxError_Descriptor value) descriptor, + required TResult Function(CreateTxError_Policy value) policy, + required TResult Function(CreateTxError_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); + required TResult Function(CreateTxError_Version0 value) version0, + required TResult Function(CreateTxError_Version1Csv value) version1Csv, + required TResult Function(CreateTxError_LockTime value) lockTime, + required TResult Function(CreateTxError_RbfSequence value) rbfSequence, + required TResult Function(CreateTxError_RbfSequenceCsv value) + rbfSequenceCsv, + required TResult Function(CreateTxError_FeeTooLow value) feeTooLow, + required TResult Function(CreateTxError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(CreateTxError_NoUtxosSelected value) + noUtxosSelected, + required TResult Function(CreateTxError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(CreateTxError_ChangePolicyDescriptor value) + changePolicyDescriptor, + required TResult Function(CreateTxError_CoinSelection value) coinSelection, + required TResult Function(CreateTxError_InsufficientFunds value) + insufficientFunds, + required TResult Function(CreateTxError_NoRecipients value) noRecipients, + required TResult Function(CreateTxError_Psbt value) psbt, + required TResult Function(CreateTxError_MissingKeyOrigin value) + missingKeyOrigin, + required TResult Function(CreateTxError_UnknownUtxo value) unknownUtxo, + required TResult Function(CreateTxError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(CreateTxError_MiniscriptPsbt value) + miniscriptPsbt, + }) { + return missingKeyOrigin(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? + TResult? Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(CreateTxError_TransactionConfirmed value)? transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? + TResult? Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? + TResult? Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult? Function(CreateTxError_Generic value)? generic, + TResult? Function(CreateTxError_Descriptor value)? descriptor, + TResult? Function(CreateTxError_Policy value)? policy, + TResult? Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - 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); + TResult? Function(CreateTxError_Version0 value)? version0, + TResult? Function(CreateTxError_Version1Csv value)? version1Csv, + TResult? Function(CreateTxError_LockTime value)? lockTime, + TResult? Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult? Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult? Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult? Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult? Function(CreateTxError_CoinSelection value)? coinSelection, + TResult? Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult? Function(CreateTxError_NoRecipients value)? noRecipients, + TResult? Function(CreateTxError_Psbt value)? psbt, + TResult? Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult? Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, + }) { + return missingKeyOrigin?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? + TResult Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult Function(CreateTxError_TransactionConfirmed value)? + transactionConfirmed, + TResult Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? + TResult Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult Function(CreateTxError_Generic value)? generic, + TResult Function(CreateTxError_Descriptor value)? descriptor, + TResult Function(CreateTxError_Policy value)? policy, + TResult Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - 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; + TResult Function(CreateTxError_Version0 value)? version0, + TResult Function(CreateTxError_Version1Csv value)? version1Csv, + TResult Function(CreateTxError_LockTime value)? lockTime, + TResult Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult Function(CreateTxError_CoinSelection value)? coinSelection, + TResult Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult Function(CreateTxError_NoRecipients value)? noRecipients, + TResult Function(CreateTxError_Psbt value)? psbt, + TResult Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, + required TResult orElse(), + }) { + if (missingKeyOrigin != null) { + return missingKeyOrigin(this); + } + return orElse(); + } +} + +abstract class CreateTxError_MissingKeyOrigin extends CreateTxError { + const factory CreateTxError_MissingKeyOrigin({required final String key}) = + _$CreateTxError_MissingKeyOriginImpl; + const CreateTxError_MissingKeyOrigin._() : super._(); + + String get key; @JsonKey(ignore: true) - _$$BdkError_ElectrumImplCopyWith<_$BdkError_ElectrumImpl> get copyWith => - throw _privateConstructorUsedError; + _$$CreateTxError_MissingKeyOriginImplCopyWith< + _$CreateTxError_MissingKeyOriginImpl> + get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$BdkError_EsploraImplCopyWith<$Res> { - factory _$$BdkError_EsploraImplCopyWith(_$BdkError_EsploraImpl value, - $Res Function(_$BdkError_EsploraImpl) then) = - __$$BdkError_EsploraImplCopyWithImpl<$Res>; +abstract class _$$CreateTxError_UnknownUtxoImplCopyWith<$Res> { + factory _$$CreateTxError_UnknownUtxoImplCopyWith( + _$CreateTxError_UnknownUtxoImpl value, + $Res Function(_$CreateTxError_UnknownUtxoImpl) then) = + __$$CreateTxError_UnknownUtxoImplCopyWithImpl<$Res>; @useResult - $Res call({String field0}); + $Res call({String outpoint}); } /// @nodoc -class __$$BdkError_EsploraImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_EsploraImpl> - implements _$$BdkError_EsploraImplCopyWith<$Res> { - __$$BdkError_EsploraImplCopyWithImpl(_$BdkError_EsploraImpl _value, - $Res Function(_$BdkError_EsploraImpl) _then) +class __$$CreateTxError_UnknownUtxoImplCopyWithImpl<$Res> + extends _$CreateTxErrorCopyWithImpl<$Res, _$CreateTxError_UnknownUtxoImpl> + implements _$$CreateTxError_UnknownUtxoImplCopyWith<$Res> { + __$$CreateTxError_UnknownUtxoImplCopyWithImpl( + _$CreateTxError_UnknownUtxoImpl _value, + $Res Function(_$CreateTxError_UnknownUtxoImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? field0 = null, + Object? outpoint = null, }) { - return _then(_$BdkError_EsploraImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable + return _then(_$CreateTxError_UnknownUtxoImpl( + outpoint: null == outpoint + ? _value.outpoint + : outpoint // ignore: cast_nullable_to_non_nullable as String, )); } @@ -21110,199 +13430,137 @@ class __$$BdkError_EsploraImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_EsploraImpl extends BdkError_Esplora { - const _$BdkError_EsploraImpl(this.field0) : super._(); +class _$CreateTxError_UnknownUtxoImpl extends CreateTxError_UnknownUtxo { + const _$CreateTxError_UnknownUtxoImpl({required this.outpoint}) : super._(); @override - final String field0; + final String outpoint; @override String toString() { - return 'BdkError.esplora(field0: $field0)'; + return 'CreateTxError.unknownUtxo(outpoint: $outpoint)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_EsploraImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$CreateTxError_UnknownUtxoImpl && + (identical(other.outpoint, outpoint) || + other.outpoint == outpoint)); } @override - int get hashCode => Object.hash(runtimeType, field0); + int get hashCode => Object.hash(runtimeType, outpoint); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$BdkError_EsploraImplCopyWith<_$BdkError_EsploraImpl> get copyWith => - __$$BdkError_EsploraImplCopyWithImpl<_$BdkError_EsploraImpl>( - this, _$identity); + _$$CreateTxError_UnknownUtxoImplCopyWith<_$CreateTxError_UnknownUtxoImpl> + get copyWith => __$$CreateTxError_UnknownUtxoImplCopyWithImpl< + _$CreateTxError_UnknownUtxoImpl>(this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, + required TResult Function(String txid) transactionNotFound, + required TResult Function(String txid) transactionConfirmed, + required TResult Function(String txid) irreplaceableTransaction, + required TResult Function() feeRateUnavailable, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) descriptor, + required TResult Function(String errorMessage) policy, + required TResult Function(String kind) spendingPolicyRequired, + required TResult Function() version0, + required TResult Function() version1Csv, + required TResult Function(String requestedTime, String requiredTime) + lockTime, + required TResult Function() rbfSequence, + required TResult Function(String rbf, String csv) rbfSequenceCsv, + required TResult Function(String feeRequired) feeTooLow, + required TResult Function(String feeRateRequired) feeRateTooLow, required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt index) outputBelowDustLimit, + required TResult Function() changePolicyDescriptor, + required TResult Function(String errorMessage) coinSelection, required TResult Function(BigInt needed, BigInt available) insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return esplora(field0); + required TResult Function() noRecipients, + required TResult Function(String errorMessage) psbt, + required TResult Function(String key) missingKeyOrigin, + required TResult Function(String outpoint) unknownUtxo, + required TResult Function(String outpoint) missingNonWitnessUtxo, + required TResult Function(String errorMessage) miniscriptPsbt, + }) { + return unknownUtxo(outpoint); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, + TResult? Function(String txid)? transactionNotFound, + TResult? Function(String txid)? transactionConfirmed, + TResult? Function(String txid)? irreplaceableTransaction, + TResult? Function()? feeRateUnavailable, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? descriptor, + TResult? Function(String errorMessage)? policy, + TResult? Function(String kind)? spendingPolicyRequired, + TResult? Function()? version0, + TResult? Function()? version1Csv, + TResult? Function(String requestedTime, String requiredTime)? lockTime, + TResult? Function()? rbfSequence, + TResult? Function(String rbf, String csv)? rbfSequenceCsv, + TResult? Function(String feeRequired)? feeTooLow, + TResult? Function(String feeRateRequired)? feeRateTooLow, TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt index)? outputBelowDustLimit, + TResult? Function()? changePolicyDescriptor, + TResult? Function(String errorMessage)? coinSelection, TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return esplora?.call(field0); + TResult? Function()? noRecipients, + TResult? Function(String errorMessage)? psbt, + TResult? Function(String key)? missingKeyOrigin, + TResult? Function(String outpoint)? unknownUtxo, + TResult? Function(String outpoint)? missingNonWitnessUtxo, + TResult? Function(String errorMessage)? miniscriptPsbt, + }) { + return unknownUtxo?.call(outpoint); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, + TResult Function(String txid)? transactionNotFound, + TResult Function(String txid)? transactionConfirmed, + TResult Function(String txid)? irreplaceableTransaction, + TResult Function()? feeRateUnavailable, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? descriptor, + TResult Function(String errorMessage)? policy, + TResult Function(String kind)? spendingPolicyRequired, + TResult Function()? version0, + TResult Function()? version1Csv, + TResult Function(String requestedTime, String requiredTime)? lockTime, + TResult Function()? rbfSequence, + TResult Function(String rbf, String csv)? rbfSequenceCsv, + TResult Function(String feeRequired)? feeTooLow, + TResult Function(String feeRateRequired)? feeRateTooLow, TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt index)? outputBelowDustLimit, + TResult Function()? changePolicyDescriptor, + TResult Function(String errorMessage)? coinSelection, TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (esplora != null) { - return esplora(field0); + TResult Function()? noRecipients, + TResult Function(String errorMessage)? psbt, + TResult Function(String key)? missingKeyOrigin, + TResult Function(String outpoint)? unknownUtxo, + TResult Function(String outpoint)? missingNonWitnessUtxo, + TResult Function(String errorMessage)? miniscriptPsbt, + required TResult orElse(), + }) { + if (unknownUtxo != null) { + return unknownUtxo(outpoint); } return orElse(); } @@ -21310,232 +13568,176 @@ class _$BdkError_EsploraImpl extends BdkError_Esplora { @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) + required TResult Function(CreateTxError_TransactionNotFound value) transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) + required TResult Function(CreateTxError_TransactionConfirmed value) transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) + required TResult Function(CreateTxError_IrreplaceableTransaction value) irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) + required TResult Function(CreateTxError_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) + required TResult Function(CreateTxError_Generic value) generic, + required TResult Function(CreateTxError_Descriptor value) descriptor, + required TResult Function(CreateTxError_Policy value) policy, + required TResult Function(CreateTxError_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); + required TResult Function(CreateTxError_Version0 value) version0, + required TResult Function(CreateTxError_Version1Csv value) version1Csv, + required TResult Function(CreateTxError_LockTime value) lockTime, + required TResult Function(CreateTxError_RbfSequence value) rbfSequence, + required TResult Function(CreateTxError_RbfSequenceCsv value) + rbfSequenceCsv, + required TResult Function(CreateTxError_FeeTooLow value) feeTooLow, + required TResult Function(CreateTxError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(CreateTxError_NoUtxosSelected value) + noUtxosSelected, + required TResult Function(CreateTxError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(CreateTxError_ChangePolicyDescriptor value) + changePolicyDescriptor, + required TResult Function(CreateTxError_CoinSelection value) coinSelection, + required TResult Function(CreateTxError_InsufficientFunds value) + insufficientFunds, + required TResult Function(CreateTxError_NoRecipients value) noRecipients, + required TResult Function(CreateTxError_Psbt value) psbt, + required TResult Function(CreateTxError_MissingKeyOrigin value) + missingKeyOrigin, + required TResult Function(CreateTxError_UnknownUtxo value) unknownUtxo, + required TResult Function(CreateTxError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(CreateTxError_MiniscriptPsbt value) + miniscriptPsbt, + }) { + return unknownUtxo(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? + TResult? Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(CreateTxError_TransactionConfirmed value)? transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? + TResult? Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? + TResult? Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult? Function(CreateTxError_Generic value)? generic, + TResult? Function(CreateTxError_Descriptor value)? descriptor, + TResult? Function(CreateTxError_Policy value)? policy, + TResult? Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - 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); - } + TResult? Function(CreateTxError_Version0 value)? version0, + TResult? Function(CreateTxError_Version1Csv value)? version1Csv, + TResult? Function(CreateTxError_LockTime value)? lockTime, + TResult? Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult? Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult? Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult? Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult? Function(CreateTxError_CoinSelection value)? coinSelection, + TResult? Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult? Function(CreateTxError_NoRecipients value)? noRecipients, + TResult? Function(CreateTxError_Psbt value)? psbt, + TResult? Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult? Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, + }) { + return unknownUtxo?.call(this); + } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? + TResult Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult Function(CreateTxError_TransactionConfirmed value)? + transactionConfirmed, + TResult Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? + TResult Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult Function(CreateTxError_Generic value)? generic, + TResult Function(CreateTxError_Descriptor value)? descriptor, + TResult Function(CreateTxError_Policy value)? policy, + TResult Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - 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; + TResult Function(CreateTxError_Version0 value)? version0, + TResult Function(CreateTxError_Version1Csv value)? version1Csv, + TResult Function(CreateTxError_LockTime value)? lockTime, + TResult Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult Function(CreateTxError_CoinSelection value)? coinSelection, + TResult Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult Function(CreateTxError_NoRecipients value)? noRecipients, + TResult Function(CreateTxError_Psbt value)? psbt, + TResult Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, + required TResult orElse(), + }) { + if (unknownUtxo != null) { + return unknownUtxo(this); + } + return orElse(); + } +} + +abstract class CreateTxError_UnknownUtxo extends CreateTxError { + const factory CreateTxError_UnknownUtxo({required final String outpoint}) = + _$CreateTxError_UnknownUtxoImpl; + const CreateTxError_UnknownUtxo._() : super._(); + + String get outpoint; @JsonKey(ignore: true) - _$$BdkError_EsploraImplCopyWith<_$BdkError_EsploraImpl> get copyWith => - throw _privateConstructorUsedError; + _$$CreateTxError_UnknownUtxoImplCopyWith<_$CreateTxError_UnknownUtxoImpl> + get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$BdkError_SledImplCopyWith<$Res> { - factory _$$BdkError_SledImplCopyWith( - _$BdkError_SledImpl value, $Res Function(_$BdkError_SledImpl) then) = - __$$BdkError_SledImplCopyWithImpl<$Res>; +abstract class _$$CreateTxError_MissingNonWitnessUtxoImplCopyWith<$Res> { + factory _$$CreateTxError_MissingNonWitnessUtxoImplCopyWith( + _$CreateTxError_MissingNonWitnessUtxoImpl value, + $Res Function(_$CreateTxError_MissingNonWitnessUtxoImpl) then) = + __$$CreateTxError_MissingNonWitnessUtxoImplCopyWithImpl<$Res>; @useResult - $Res call({String field0}); + $Res call({String outpoint}); } /// @nodoc -class __$$BdkError_SledImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_SledImpl> - implements _$$BdkError_SledImplCopyWith<$Res> { - __$$BdkError_SledImplCopyWithImpl( - _$BdkError_SledImpl _value, $Res Function(_$BdkError_SledImpl) _then) +class __$$CreateTxError_MissingNonWitnessUtxoImplCopyWithImpl<$Res> + extends _$CreateTxErrorCopyWithImpl<$Res, + _$CreateTxError_MissingNonWitnessUtxoImpl> + implements _$$CreateTxError_MissingNonWitnessUtxoImplCopyWith<$Res> { + __$$CreateTxError_MissingNonWitnessUtxoImplCopyWithImpl( + _$CreateTxError_MissingNonWitnessUtxoImpl _value, + $Res Function(_$CreateTxError_MissingNonWitnessUtxoImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? field0 = null, + Object? outpoint = null, }) { - return _then(_$BdkError_SledImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable + return _then(_$CreateTxError_MissingNonWitnessUtxoImpl( + outpoint: null == outpoint + ? _value.outpoint + : outpoint // ignore: cast_nullable_to_non_nullable as String, )); } @@ -21543,198 +13745,140 @@ class __$$BdkError_SledImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_SledImpl extends BdkError_Sled { - const _$BdkError_SledImpl(this.field0) : super._(); +class _$CreateTxError_MissingNonWitnessUtxoImpl + extends CreateTxError_MissingNonWitnessUtxo { + const _$CreateTxError_MissingNonWitnessUtxoImpl({required this.outpoint}) + : super._(); @override - final String field0; + final String outpoint; @override String toString() { - return 'BdkError.sled(field0: $field0)'; + return 'CreateTxError.missingNonWitnessUtxo(outpoint: $outpoint)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_SledImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$CreateTxError_MissingNonWitnessUtxoImpl && + (identical(other.outpoint, outpoint) || + other.outpoint == outpoint)); } @override - int get hashCode => Object.hash(runtimeType, field0); + int get hashCode => Object.hash(runtimeType, outpoint); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$BdkError_SledImplCopyWith<_$BdkError_SledImpl> get copyWith => - __$$BdkError_SledImplCopyWithImpl<_$BdkError_SledImpl>(this, _$identity); + _$$CreateTxError_MissingNonWitnessUtxoImplCopyWith< + _$CreateTxError_MissingNonWitnessUtxoImpl> + get copyWith => __$$CreateTxError_MissingNonWitnessUtxoImplCopyWithImpl< + _$CreateTxError_MissingNonWitnessUtxoImpl>(this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, + required TResult Function(String txid) transactionNotFound, + required TResult Function(String txid) transactionConfirmed, + required TResult Function(String txid) irreplaceableTransaction, + required TResult Function() feeRateUnavailable, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) descriptor, + required TResult Function(String errorMessage) policy, + required TResult Function(String kind) spendingPolicyRequired, + required TResult Function() version0, + required TResult Function() version1Csv, + required TResult Function(String requestedTime, String requiredTime) + lockTime, + required TResult Function() rbfSequence, + required TResult Function(String rbf, String csv) rbfSequenceCsv, + required TResult Function(String feeRequired) feeTooLow, + required TResult Function(String feeRateRequired) feeRateTooLow, required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt index) outputBelowDustLimit, + required TResult Function() changePolicyDescriptor, + required TResult Function(String errorMessage) coinSelection, required TResult Function(BigInt needed, BigInt available) insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return sled(field0); + required TResult Function() noRecipients, + required TResult Function(String errorMessage) psbt, + required TResult Function(String key) missingKeyOrigin, + required TResult Function(String outpoint) unknownUtxo, + required TResult Function(String outpoint) missingNonWitnessUtxo, + required TResult Function(String errorMessage) miniscriptPsbt, + }) { + return missingNonWitnessUtxo(outpoint); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, + TResult? Function(String txid)? transactionNotFound, + TResult? Function(String txid)? transactionConfirmed, + TResult? Function(String txid)? irreplaceableTransaction, + TResult? Function()? feeRateUnavailable, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? descriptor, + TResult? Function(String errorMessage)? policy, + TResult? Function(String kind)? spendingPolicyRequired, + TResult? Function()? version0, + TResult? Function()? version1Csv, + TResult? Function(String requestedTime, String requiredTime)? lockTime, + TResult? Function()? rbfSequence, + TResult? Function(String rbf, String csv)? rbfSequenceCsv, + TResult? Function(String feeRequired)? feeTooLow, + TResult? Function(String feeRateRequired)? feeRateTooLow, TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt index)? outputBelowDustLimit, + TResult? Function()? changePolicyDescriptor, + TResult? Function(String errorMessage)? coinSelection, TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return sled?.call(field0); + TResult? Function()? noRecipients, + TResult? Function(String errorMessage)? psbt, + TResult? Function(String key)? missingKeyOrigin, + TResult? Function(String outpoint)? unknownUtxo, + TResult? Function(String outpoint)? missingNonWitnessUtxo, + TResult? Function(String errorMessage)? miniscriptPsbt, + }) { + return missingNonWitnessUtxo?.call(outpoint); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, + TResult Function(String txid)? transactionNotFound, + TResult Function(String txid)? transactionConfirmed, + TResult Function(String txid)? irreplaceableTransaction, + TResult Function()? feeRateUnavailable, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? descriptor, + TResult Function(String errorMessage)? policy, + TResult Function(String kind)? spendingPolicyRequired, + TResult Function()? version0, + TResult Function()? version1Csv, + TResult Function(String requestedTime, String requiredTime)? lockTime, + TResult Function()? rbfSequence, + TResult Function(String rbf, String csv)? rbfSequenceCsv, + TResult Function(String feeRequired)? feeTooLow, + TResult Function(String feeRateRequired)? feeRateTooLow, TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt index)? outputBelowDustLimit, + TResult Function()? changePolicyDescriptor, + TResult Function(String errorMessage)? coinSelection, TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (sled != null) { - return sled(field0); + TResult Function()? noRecipients, + TResult Function(String errorMessage)? psbt, + TResult Function(String key)? missingKeyOrigin, + TResult Function(String outpoint)? unknownUtxo, + TResult Function(String outpoint)? missingNonWitnessUtxo, + TResult Function(String errorMessage)? miniscriptPsbt, + required TResult orElse(), + }) { + if (missingNonWitnessUtxo != null) { + return missingNonWitnessUtxo(outpoint); } return orElse(); } @@ -21742,232 +13886,178 @@ class _$BdkError_SledImpl extends BdkError_Sled { @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) + required TResult Function(CreateTxError_TransactionNotFound value) transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) + required TResult Function(CreateTxError_TransactionConfirmed value) transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) + required TResult Function(CreateTxError_IrreplaceableTransaction value) irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) + required TResult Function(CreateTxError_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) + required TResult Function(CreateTxError_Generic value) generic, + required TResult Function(CreateTxError_Descriptor value) descriptor, + required TResult Function(CreateTxError_Policy value) policy, + required TResult Function(CreateTxError_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); + required TResult Function(CreateTxError_Version0 value) version0, + required TResult Function(CreateTxError_Version1Csv value) version1Csv, + required TResult Function(CreateTxError_LockTime value) lockTime, + required TResult Function(CreateTxError_RbfSequence value) rbfSequence, + required TResult Function(CreateTxError_RbfSequenceCsv value) + rbfSequenceCsv, + required TResult Function(CreateTxError_FeeTooLow value) feeTooLow, + required TResult Function(CreateTxError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(CreateTxError_NoUtxosSelected value) + noUtxosSelected, + required TResult Function(CreateTxError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(CreateTxError_ChangePolicyDescriptor value) + changePolicyDescriptor, + required TResult Function(CreateTxError_CoinSelection value) coinSelection, + required TResult Function(CreateTxError_InsufficientFunds value) + insufficientFunds, + required TResult Function(CreateTxError_NoRecipients value) noRecipients, + required TResult Function(CreateTxError_Psbt value) psbt, + required TResult Function(CreateTxError_MissingKeyOrigin value) + missingKeyOrigin, + required TResult Function(CreateTxError_UnknownUtxo value) unknownUtxo, + required TResult Function(CreateTxError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(CreateTxError_MiniscriptPsbt value) + miniscriptPsbt, + }) { + return missingNonWitnessUtxo(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? + TResult? Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(CreateTxError_TransactionConfirmed value)? transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? + TResult? Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? + TResult? Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult? Function(CreateTxError_Generic value)? generic, + TResult? Function(CreateTxError_Descriptor value)? descriptor, + TResult? Function(CreateTxError_Policy value)? policy, + TResult? Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - 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); + TResult? Function(CreateTxError_Version0 value)? version0, + TResult? Function(CreateTxError_Version1Csv value)? version1Csv, + TResult? Function(CreateTxError_LockTime value)? lockTime, + TResult? Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult? Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult? Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult? Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult? Function(CreateTxError_CoinSelection value)? coinSelection, + TResult? Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult? Function(CreateTxError_NoRecipients value)? noRecipients, + TResult? Function(CreateTxError_Psbt value)? psbt, + TResult? Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult? Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, + }) { + return missingNonWitnessUtxo?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? + TResult Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult Function(CreateTxError_TransactionConfirmed value)? + transactionConfirmed, + TResult Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? + TResult Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult Function(CreateTxError_Generic value)? generic, + TResult Function(CreateTxError_Descriptor value)? descriptor, + TResult Function(CreateTxError_Policy value)? policy, + TResult Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - 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; + TResult Function(CreateTxError_Version0 value)? version0, + TResult Function(CreateTxError_Version1Csv value)? version1Csv, + TResult Function(CreateTxError_LockTime value)? lockTime, + TResult Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult Function(CreateTxError_CoinSelection value)? coinSelection, + TResult Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult Function(CreateTxError_NoRecipients value)? noRecipients, + TResult Function(CreateTxError_Psbt value)? psbt, + TResult Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, + required TResult orElse(), + }) { + if (missingNonWitnessUtxo != null) { + return missingNonWitnessUtxo(this); + } + return orElse(); + } +} + +abstract class CreateTxError_MissingNonWitnessUtxo extends CreateTxError { + const factory CreateTxError_MissingNonWitnessUtxo( + {required final String outpoint}) = + _$CreateTxError_MissingNonWitnessUtxoImpl; + const CreateTxError_MissingNonWitnessUtxo._() : super._(); + + String get outpoint; @JsonKey(ignore: true) - _$$BdkError_SledImplCopyWith<_$BdkError_SledImpl> get copyWith => - throw _privateConstructorUsedError; + _$$CreateTxError_MissingNonWitnessUtxoImplCopyWith< + _$CreateTxError_MissingNonWitnessUtxoImpl> + get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$BdkError_RpcImplCopyWith<$Res> { - factory _$$BdkError_RpcImplCopyWith( - _$BdkError_RpcImpl value, $Res Function(_$BdkError_RpcImpl) then) = - __$$BdkError_RpcImplCopyWithImpl<$Res>; +abstract class _$$CreateTxError_MiniscriptPsbtImplCopyWith<$Res> { + factory _$$CreateTxError_MiniscriptPsbtImplCopyWith( + _$CreateTxError_MiniscriptPsbtImpl value, + $Res Function(_$CreateTxError_MiniscriptPsbtImpl) then) = + __$$CreateTxError_MiniscriptPsbtImplCopyWithImpl<$Res>; @useResult - $Res call({String field0}); + $Res call({String errorMessage}); } /// @nodoc -class __$$BdkError_RpcImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_RpcImpl> - implements _$$BdkError_RpcImplCopyWith<$Res> { - __$$BdkError_RpcImplCopyWithImpl( - _$BdkError_RpcImpl _value, $Res Function(_$BdkError_RpcImpl) _then) +class __$$CreateTxError_MiniscriptPsbtImplCopyWithImpl<$Res> + extends _$CreateTxErrorCopyWithImpl<$Res, + _$CreateTxError_MiniscriptPsbtImpl> + implements _$$CreateTxError_MiniscriptPsbtImplCopyWith<$Res> { + __$$CreateTxError_MiniscriptPsbtImplCopyWithImpl( + _$CreateTxError_MiniscriptPsbtImpl _value, + $Res Function(_$CreateTxError_MiniscriptPsbtImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? field0 = null, + Object? errorMessage = null, }) { - return _then(_$BdkError_RpcImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable + return _then(_$CreateTxError_MiniscriptPsbtImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable as String, )); } @@ -21975,198 +14065,139 @@ class __$$BdkError_RpcImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_RpcImpl extends BdkError_Rpc { - const _$BdkError_RpcImpl(this.field0) : super._(); +class _$CreateTxError_MiniscriptPsbtImpl extends CreateTxError_MiniscriptPsbt { + const _$CreateTxError_MiniscriptPsbtImpl({required this.errorMessage}) + : super._(); @override - final String field0; + final String errorMessage; @override String toString() { - return 'BdkError.rpc(field0: $field0)'; + return 'CreateTxError.miniscriptPsbt(errorMessage: $errorMessage)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_RpcImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$CreateTxError_MiniscriptPsbtImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); } @override - int get hashCode => Object.hash(runtimeType, field0); + int get hashCode => Object.hash(runtimeType, errorMessage); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$BdkError_RpcImplCopyWith<_$BdkError_RpcImpl> get copyWith => - __$$BdkError_RpcImplCopyWithImpl<_$BdkError_RpcImpl>(this, _$identity); + _$$CreateTxError_MiniscriptPsbtImplCopyWith< + _$CreateTxError_MiniscriptPsbtImpl> + get copyWith => __$$CreateTxError_MiniscriptPsbtImplCopyWithImpl< + _$CreateTxError_MiniscriptPsbtImpl>(this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, + required TResult Function(String txid) transactionNotFound, + required TResult Function(String txid) transactionConfirmed, + required TResult Function(String txid) irreplaceableTransaction, + required TResult Function() feeRateUnavailable, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) descriptor, + required TResult Function(String errorMessage) policy, + required TResult Function(String kind) spendingPolicyRequired, + required TResult Function() version0, + required TResult Function() version1Csv, + required TResult Function(String requestedTime, String requiredTime) + lockTime, + required TResult Function() rbfSequence, + required TResult Function(String rbf, String csv) rbfSequenceCsv, + required TResult Function(String feeRequired) feeTooLow, + required TResult Function(String feeRateRequired) feeRateTooLow, required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, + required TResult Function(BigInt index) outputBelowDustLimit, + required TResult Function() changePolicyDescriptor, + required TResult Function(String errorMessage) coinSelection, required TResult Function(BigInt needed, BigInt available) insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return rpc(field0); + required TResult Function() noRecipients, + required TResult Function(String errorMessage) psbt, + required TResult Function(String key) missingKeyOrigin, + required TResult Function(String outpoint) unknownUtxo, + required TResult Function(String outpoint) missingNonWitnessUtxo, + required TResult Function(String errorMessage) miniscriptPsbt, + }) { + return miniscriptPsbt(errorMessage); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, + TResult? Function(String txid)? transactionNotFound, + TResult? Function(String txid)? transactionConfirmed, + TResult? Function(String txid)? irreplaceableTransaction, + TResult? Function()? feeRateUnavailable, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? descriptor, + TResult? Function(String errorMessage)? policy, + TResult? Function(String kind)? spendingPolicyRequired, + TResult? Function()? version0, + TResult? Function()? version1Csv, + TResult? Function(String requestedTime, String requiredTime)? lockTime, + TResult? Function()? rbfSequence, + TResult? Function(String rbf, String csv)? rbfSequenceCsv, + TResult? Function(String feeRequired)? feeTooLow, + TResult? Function(String feeRateRequired)? feeRateTooLow, TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, + TResult? Function(BigInt index)? outputBelowDustLimit, + TResult? Function()? changePolicyDescriptor, + TResult? Function(String errorMessage)? coinSelection, TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return rpc?.call(field0); + TResult? Function()? noRecipients, + TResult? Function(String errorMessage)? psbt, + TResult? Function(String key)? missingKeyOrigin, + TResult? Function(String outpoint)? unknownUtxo, + TResult? Function(String outpoint)? missingNonWitnessUtxo, + TResult? Function(String errorMessage)? miniscriptPsbt, + }) { + return miniscriptPsbt?.call(errorMessage); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, + TResult Function(String txid)? transactionNotFound, + TResult Function(String txid)? transactionConfirmed, + TResult Function(String txid)? irreplaceableTransaction, + TResult Function()? feeRateUnavailable, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? descriptor, + TResult Function(String errorMessage)? policy, + TResult Function(String kind)? spendingPolicyRequired, + TResult Function()? version0, + TResult Function()? version1Csv, + TResult Function(String requestedTime, String requiredTime)? lockTime, + TResult Function()? rbfSequence, + TResult Function(String rbf, String csv)? rbfSequenceCsv, + TResult Function(String feeRequired)? feeTooLow, + TResult Function(String feeRateRequired)? feeRateTooLow, TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, + TResult Function(BigInt index)? outputBelowDustLimit, + TResult Function()? changePolicyDescriptor, + TResult Function(String errorMessage)? coinSelection, TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (rpc != null) { - return rpc(field0); + TResult Function()? noRecipients, + TResult Function(String errorMessage)? psbt, + TResult Function(String key)? missingKeyOrigin, + TResult Function(String outpoint)? unknownUtxo, + TResult Function(String outpoint)? missingNonWitnessUtxo, + TResult Function(String errorMessage)? miniscriptPsbt, + required TResult orElse(), + }) { + if (miniscriptPsbt != null) { + return miniscriptPsbt(errorMessage); } return orElse(); } @@ -22174,232 +14205,249 @@ class _$BdkError_RpcImpl extends BdkError_Rpc { @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) + required TResult Function(CreateTxError_TransactionNotFound value) transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) + required TResult Function(CreateTxError_TransactionConfirmed value) transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) + required TResult Function(CreateTxError_IrreplaceableTransaction value) irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) + required TResult Function(CreateTxError_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) + required TResult Function(CreateTxError_Generic value) generic, + required TResult Function(CreateTxError_Descriptor value) descriptor, + required TResult Function(CreateTxError_Policy value) policy, + required TResult Function(CreateTxError_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); + required TResult Function(CreateTxError_Version0 value) version0, + required TResult Function(CreateTxError_Version1Csv value) version1Csv, + required TResult Function(CreateTxError_LockTime value) lockTime, + required TResult Function(CreateTxError_RbfSequence value) rbfSequence, + required TResult Function(CreateTxError_RbfSequenceCsv value) + rbfSequenceCsv, + required TResult Function(CreateTxError_FeeTooLow value) feeTooLow, + required TResult Function(CreateTxError_FeeRateTooLow value) feeRateTooLow, + required TResult Function(CreateTxError_NoUtxosSelected value) + noUtxosSelected, + required TResult Function(CreateTxError_OutputBelowDustLimit value) + outputBelowDustLimit, + required TResult Function(CreateTxError_ChangePolicyDescriptor value) + changePolicyDescriptor, + required TResult Function(CreateTxError_CoinSelection value) coinSelection, + required TResult Function(CreateTxError_InsufficientFunds value) + insufficientFunds, + required TResult Function(CreateTxError_NoRecipients value) noRecipients, + required TResult Function(CreateTxError_Psbt value) psbt, + required TResult Function(CreateTxError_MissingKeyOrigin value) + missingKeyOrigin, + required TResult Function(CreateTxError_UnknownUtxo value) unknownUtxo, + required TResult Function(CreateTxError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(CreateTxError_MiniscriptPsbt value) + miniscriptPsbt, + }) { + return miniscriptPsbt(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? + TResult? Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(CreateTxError_TransactionConfirmed value)? transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? + TResult? Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? + TResult? Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult? Function(CreateTxError_Generic value)? generic, + TResult? Function(CreateTxError_Descriptor value)? descriptor, + TResult? Function(CreateTxError_Policy value)? policy, + TResult? Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - 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); + TResult? Function(CreateTxError_Version0 value)? version0, + TResult? Function(CreateTxError_Version1Csv value)? version1Csv, + TResult? Function(CreateTxError_LockTime value)? lockTime, + TResult? Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult? Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult? Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult? Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult? Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult? Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult? Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult? Function(CreateTxError_CoinSelection value)? coinSelection, + TResult? Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult? Function(CreateTxError_NoRecipients value)? noRecipients, + TResult? Function(CreateTxError_Psbt value)? psbt, + TResult? Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult? Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult? Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, + }) { + return miniscriptPsbt?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? + TResult Function(CreateTxError_TransactionNotFound value)? + transactionNotFound, + TResult Function(CreateTxError_TransactionConfirmed value)? + transactionConfirmed, + TResult Function(CreateTxError_IrreplaceableTransaction value)? irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? + TResult Function(CreateTxError_FeeRateUnavailable value)? + feeRateUnavailable, + TResult Function(CreateTxError_Generic value)? generic, + TResult Function(CreateTxError_Descriptor value)? descriptor, + TResult Function(CreateTxError_Policy value)? policy, + TResult Function(CreateTxError_SpendingPolicyRequired value)? spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - 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; + TResult Function(CreateTxError_Version0 value)? version0, + TResult Function(CreateTxError_Version1Csv value)? version1Csv, + TResult Function(CreateTxError_LockTime value)? lockTime, + TResult Function(CreateTxError_RbfSequence value)? rbfSequence, + TResult Function(CreateTxError_RbfSequenceCsv value)? rbfSequenceCsv, + TResult Function(CreateTxError_FeeTooLow value)? feeTooLow, + TResult Function(CreateTxError_FeeRateTooLow value)? feeRateTooLow, + TResult Function(CreateTxError_NoUtxosSelected value)? noUtxosSelected, + TResult Function(CreateTxError_OutputBelowDustLimit value)? + outputBelowDustLimit, + TResult Function(CreateTxError_ChangePolicyDescriptor value)? + changePolicyDescriptor, + TResult Function(CreateTxError_CoinSelection value)? coinSelection, + TResult Function(CreateTxError_InsufficientFunds value)? insufficientFunds, + TResult Function(CreateTxError_NoRecipients value)? noRecipients, + TResult Function(CreateTxError_Psbt value)? psbt, + TResult Function(CreateTxError_MissingKeyOrigin value)? missingKeyOrigin, + TResult Function(CreateTxError_UnknownUtxo value)? unknownUtxo, + TResult Function(CreateTxError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(CreateTxError_MiniscriptPsbt value)? miniscriptPsbt, + required TResult orElse(), + }) { + if (miniscriptPsbt != null) { + return miniscriptPsbt(this); + } + return orElse(); + } +} + +abstract class CreateTxError_MiniscriptPsbt extends CreateTxError { + const factory CreateTxError_MiniscriptPsbt( + {required final String errorMessage}) = + _$CreateTxError_MiniscriptPsbtImpl; + const CreateTxError_MiniscriptPsbt._() : super._(); + + String get errorMessage; @JsonKey(ignore: true) - _$$BdkError_RpcImplCopyWith<_$BdkError_RpcImpl> get copyWith => + _$$CreateTxError_MiniscriptPsbtImplCopyWith< + _$CreateTxError_MiniscriptPsbtImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +mixin _$CreateWithPersistError { + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) persist, + required TResult Function() dataAlreadyExists, + required TResult Function(String errorMessage) descriptor, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? persist, + TResult? Function()? dataAlreadyExists, + TResult? Function(String errorMessage)? descriptor, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? persist, + TResult Function()? dataAlreadyExists, + TResult Function(String errorMessage)? descriptor, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(CreateWithPersistError_Persist value) persist, + required TResult Function(CreateWithPersistError_DataAlreadyExists value) + dataAlreadyExists, + required TResult Function(CreateWithPersistError_Descriptor value) + descriptor, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(CreateWithPersistError_Persist value)? persist, + TResult? Function(CreateWithPersistError_DataAlreadyExists value)? + dataAlreadyExists, + TResult? Function(CreateWithPersistError_Descriptor value)? descriptor, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(CreateWithPersistError_Persist value)? persist, + TResult Function(CreateWithPersistError_DataAlreadyExists value)? + dataAlreadyExists, + TResult Function(CreateWithPersistError_Descriptor value)? descriptor, + required TResult orElse(), + }) => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$BdkError_RusqliteImplCopyWith<$Res> { - factory _$$BdkError_RusqliteImplCopyWith(_$BdkError_RusqliteImpl value, - $Res Function(_$BdkError_RusqliteImpl) then) = - __$$BdkError_RusqliteImplCopyWithImpl<$Res>; +abstract class $CreateWithPersistErrorCopyWith<$Res> { + factory $CreateWithPersistErrorCopyWith(CreateWithPersistError value, + $Res Function(CreateWithPersistError) then) = + _$CreateWithPersistErrorCopyWithImpl<$Res, CreateWithPersistError>; +} + +/// @nodoc +class _$CreateWithPersistErrorCopyWithImpl<$Res, + $Val extends CreateWithPersistError> + implements $CreateWithPersistErrorCopyWith<$Res> { + _$CreateWithPersistErrorCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; +} + +/// @nodoc +abstract class _$$CreateWithPersistError_PersistImplCopyWith<$Res> { + factory _$$CreateWithPersistError_PersistImplCopyWith( + _$CreateWithPersistError_PersistImpl value, + $Res Function(_$CreateWithPersistError_PersistImpl) then) = + __$$CreateWithPersistError_PersistImplCopyWithImpl<$Res>; @useResult - $Res call({String field0}); + $Res call({String errorMessage}); } /// @nodoc -class __$$BdkError_RusqliteImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_RusqliteImpl> - implements _$$BdkError_RusqliteImplCopyWith<$Res> { - __$$BdkError_RusqliteImplCopyWithImpl(_$BdkError_RusqliteImpl _value, - $Res Function(_$BdkError_RusqliteImpl) _then) +class __$$CreateWithPersistError_PersistImplCopyWithImpl<$Res> + extends _$CreateWithPersistErrorCopyWithImpl<$Res, + _$CreateWithPersistError_PersistImpl> + implements _$$CreateWithPersistError_PersistImplCopyWith<$Res> { + __$$CreateWithPersistError_PersistImplCopyWithImpl( + _$CreateWithPersistError_PersistImpl _value, + $Res Function(_$CreateWithPersistError_PersistImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? field0 = null, + Object? errorMessage = null, }) { - return _then(_$BdkError_RusqliteImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable + return _then(_$CreateWithPersistError_PersistImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable as String, )); } @@ -22407,199 +14455,69 @@ class __$$BdkError_RusqliteImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_RusqliteImpl extends BdkError_Rusqlite { - const _$BdkError_RusqliteImpl(this.field0) : super._(); +class _$CreateWithPersistError_PersistImpl + extends CreateWithPersistError_Persist { + const _$CreateWithPersistError_PersistImpl({required this.errorMessage}) + : super._(); @override - final String field0; + final String errorMessage; @override String toString() { - return 'BdkError.rusqlite(field0: $field0)'; + return 'CreateWithPersistError.persist(errorMessage: $errorMessage)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_RusqliteImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$CreateWithPersistError_PersistImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); } @override - int get hashCode => Object.hash(runtimeType, field0); + int get hashCode => Object.hash(runtimeType, errorMessage); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$BdkError_RusqliteImplCopyWith<_$BdkError_RusqliteImpl> get copyWith => - __$$BdkError_RusqliteImplCopyWithImpl<_$BdkError_RusqliteImpl>( - this, _$identity); + _$$CreateWithPersistError_PersistImplCopyWith< + _$CreateWithPersistError_PersistImpl> + get copyWith => __$$CreateWithPersistError_PersistImplCopyWithImpl< + _$CreateWithPersistError_PersistImpl>(this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return rusqlite(field0); + required TResult Function(String errorMessage) persist, + required TResult Function() dataAlreadyExists, + required TResult Function(String errorMessage) descriptor, + }) { + return persist(errorMessage); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return rusqlite?.call(field0); + TResult? Function(String errorMessage)? persist, + TResult? Function()? dataAlreadyExists, + TResult? Function(String errorMessage)? descriptor, + }) { + return persist?.call(errorMessage); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (rusqlite != null) { - return rusqlite(field0); + TResult Function(String errorMessage)? persist, + TResult Function()? dataAlreadyExists, + TResult Function(String errorMessage)? descriptor, + required TResult orElse(), + }) { + if (persist != null) { + return persist(errorMessage); } return orElse(); } @@ -22607,434 +14525,125 @@ class _$BdkError_RusqliteImpl extends BdkError_Rusqlite { @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return rusqlite(this); + required TResult Function(CreateWithPersistError_Persist value) persist, + required TResult Function(CreateWithPersistError_DataAlreadyExists value) + dataAlreadyExists, + required TResult Function(CreateWithPersistError_Descriptor value) + descriptor, + }) { + return persist(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return rusqlite?.call(this); + TResult? Function(CreateWithPersistError_Persist value)? persist, + TResult? Function(CreateWithPersistError_DataAlreadyExists value)? + dataAlreadyExists, + TResult? Function(CreateWithPersistError_Descriptor value)? descriptor, + }) { + return persist?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (rusqlite != null) { - return rusqlite(this); - } - return orElse(); - } -} - -abstract class BdkError_Rusqlite extends BdkError { - const factory BdkError_Rusqlite(final String field0) = - _$BdkError_RusqliteImpl; - const BdkError_Rusqlite._() : super._(); - - String get field0; + TResult Function(CreateWithPersistError_Persist value)? persist, + TResult Function(CreateWithPersistError_DataAlreadyExists value)? + dataAlreadyExists, + TResult Function(CreateWithPersistError_Descriptor value)? descriptor, + required TResult orElse(), + }) { + if (persist != null) { + return persist(this); + } + return orElse(); + } +} + +abstract class CreateWithPersistError_Persist extends CreateWithPersistError { + const factory CreateWithPersistError_Persist( + {required final String errorMessage}) = + _$CreateWithPersistError_PersistImpl; + const CreateWithPersistError_Persist._() : super._(); + + String get errorMessage; @JsonKey(ignore: true) - _$$BdkError_RusqliteImplCopyWith<_$BdkError_RusqliteImpl> get copyWith => - throw _privateConstructorUsedError; + _$$CreateWithPersistError_PersistImplCopyWith< + _$CreateWithPersistError_PersistImpl> + 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}); +abstract class _$$CreateWithPersistError_DataAlreadyExistsImplCopyWith<$Res> { + factory _$$CreateWithPersistError_DataAlreadyExistsImplCopyWith( + _$CreateWithPersistError_DataAlreadyExistsImpl value, + $Res Function(_$CreateWithPersistError_DataAlreadyExistsImpl) then) = + __$$CreateWithPersistError_DataAlreadyExistsImplCopyWithImpl<$Res>; } /// @nodoc -class __$$BdkError_InvalidInputImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_InvalidInputImpl> - implements _$$BdkError_InvalidInputImplCopyWith<$Res> { - __$$BdkError_InvalidInputImplCopyWithImpl(_$BdkError_InvalidInputImpl _value, - $Res Function(_$BdkError_InvalidInputImpl) _then) +class __$$CreateWithPersistError_DataAlreadyExistsImplCopyWithImpl<$Res> + extends _$CreateWithPersistErrorCopyWithImpl<$Res, + _$CreateWithPersistError_DataAlreadyExistsImpl> + implements _$$CreateWithPersistError_DataAlreadyExistsImplCopyWith<$Res> { + __$$CreateWithPersistError_DataAlreadyExistsImplCopyWithImpl( + _$CreateWithPersistError_DataAlreadyExistsImpl _value, + $Res Function(_$CreateWithPersistError_DataAlreadyExistsImpl) _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; +class _$CreateWithPersistError_DataAlreadyExistsImpl + extends CreateWithPersistError_DataAlreadyExists { + const _$CreateWithPersistError_DataAlreadyExistsImpl() : super._(); @override String toString() { - return 'BdkError.invalidInput(field0: $field0)'; + return 'CreateWithPersistError.dataAlreadyExists()'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_InvalidInputImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$CreateWithPersistError_DataAlreadyExistsImpl); } @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); + int get hashCode => runtimeType.hashCode; @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return invalidInput(field0); + required TResult Function(String errorMessage) persist, + required TResult Function() dataAlreadyExists, + required TResult Function(String errorMessage) descriptor, + }) { + return dataAlreadyExists(); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return invalidInput?.call(field0); + TResult? Function(String errorMessage)? persist, + TResult? Function()? dataAlreadyExists, + TResult? Function(String errorMessage)? descriptor, + }) { + return dataAlreadyExists?.call(); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (invalidInput != null) { - return invalidInput(field0); + TResult Function(String errorMessage)? persist, + TResult Function()? dataAlreadyExists, + TResult Function(String errorMessage)? descriptor, + required TResult orElse(), + }) { + if (dataAlreadyExists != null) { + return dataAlreadyExists(); } return orElse(); } @@ -23042,235 +14651,78 @@ class _$BdkError_InvalidInputImpl extends BdkError_InvalidInput { @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return invalidInput(this); + required TResult Function(CreateWithPersistError_Persist value) persist, + required TResult Function(CreateWithPersistError_DataAlreadyExists value) + dataAlreadyExists, + required TResult Function(CreateWithPersistError_Descriptor value) + descriptor, + }) { + return dataAlreadyExists(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return invalidInput?.call(this); + TResult? Function(CreateWithPersistError_Persist value)? persist, + TResult? Function(CreateWithPersistError_DataAlreadyExists value)? + dataAlreadyExists, + TResult? Function(CreateWithPersistError_Descriptor value)? descriptor, + }) { + return dataAlreadyExists?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (invalidInput != null) { - return invalidInput(this); - } - return orElse(); - } -} - -abstract class BdkError_InvalidInput extends BdkError { - const factory BdkError_InvalidInput(final String field0) = - _$BdkError_InvalidInputImpl; - const BdkError_InvalidInput._() : super._(); - - String get field0; - @JsonKey(ignore: true) - _$$BdkError_InvalidInputImplCopyWith<_$BdkError_InvalidInputImpl> - get copyWith => throw _privateConstructorUsedError; + TResult Function(CreateWithPersistError_Persist value)? persist, + TResult Function(CreateWithPersistError_DataAlreadyExists value)? + dataAlreadyExists, + TResult Function(CreateWithPersistError_Descriptor value)? descriptor, + required TResult orElse(), + }) { + if (dataAlreadyExists != null) { + return dataAlreadyExists(this); + } + return orElse(); + } +} + +abstract class CreateWithPersistError_DataAlreadyExists + extends CreateWithPersistError { + const factory CreateWithPersistError_DataAlreadyExists() = + _$CreateWithPersistError_DataAlreadyExistsImpl; + const CreateWithPersistError_DataAlreadyExists._() : super._(); } /// @nodoc -abstract class _$$BdkError_InvalidLockTimeImplCopyWith<$Res> { - factory _$$BdkError_InvalidLockTimeImplCopyWith( - _$BdkError_InvalidLockTimeImpl value, - $Res Function(_$BdkError_InvalidLockTimeImpl) then) = - __$$BdkError_InvalidLockTimeImplCopyWithImpl<$Res>; +abstract class _$$CreateWithPersistError_DescriptorImplCopyWith<$Res> { + factory _$$CreateWithPersistError_DescriptorImplCopyWith( + _$CreateWithPersistError_DescriptorImpl value, + $Res Function(_$CreateWithPersistError_DescriptorImpl) then) = + __$$CreateWithPersistError_DescriptorImplCopyWithImpl<$Res>; @useResult - $Res call({String field0}); + $Res call({String errorMessage}); } /// @nodoc -class __$$BdkError_InvalidLockTimeImplCopyWithImpl<$Res> - extends _$BdkErrorCopyWithImpl<$Res, _$BdkError_InvalidLockTimeImpl> - implements _$$BdkError_InvalidLockTimeImplCopyWith<$Res> { - __$$BdkError_InvalidLockTimeImplCopyWithImpl( - _$BdkError_InvalidLockTimeImpl _value, - $Res Function(_$BdkError_InvalidLockTimeImpl) _then) +class __$$CreateWithPersistError_DescriptorImplCopyWithImpl<$Res> + extends _$CreateWithPersistErrorCopyWithImpl<$Res, + _$CreateWithPersistError_DescriptorImpl> + implements _$$CreateWithPersistError_DescriptorImplCopyWith<$Res> { + __$$CreateWithPersistError_DescriptorImplCopyWithImpl( + _$CreateWithPersistError_DescriptorImpl _value, + $Res Function(_$CreateWithPersistError_DescriptorImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? field0 = null, + Object? errorMessage = null, }) { - return _then(_$BdkError_InvalidLockTimeImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable + return _then(_$CreateWithPersistError_DescriptorImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable as String, )); } @@ -23278,199 +14730,69 @@ class __$$BdkError_InvalidLockTimeImplCopyWithImpl<$Res> /// @nodoc -class _$BdkError_InvalidLockTimeImpl extends BdkError_InvalidLockTime { - const _$BdkError_InvalidLockTimeImpl(this.field0) : super._(); +class _$CreateWithPersistError_DescriptorImpl + extends CreateWithPersistError_Descriptor { + const _$CreateWithPersistError_DescriptorImpl({required this.errorMessage}) + : super._(); @override - final String field0; + final String errorMessage; @override String toString() { - return 'BdkError.invalidLockTime(field0: $field0)'; + return 'CreateWithPersistError.descriptor(errorMessage: $errorMessage)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$BdkError_InvalidLockTimeImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$CreateWithPersistError_DescriptorImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); } @override - int get hashCode => Object.hash(runtimeType, field0); + int get hashCode => Object.hash(runtimeType, errorMessage); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$BdkError_InvalidLockTimeImplCopyWith<_$BdkError_InvalidLockTimeImpl> - get copyWith => __$$BdkError_InvalidLockTimeImplCopyWithImpl< - _$BdkError_InvalidLockTimeImpl>(this, _$identity); + _$$CreateWithPersistError_DescriptorImplCopyWith< + _$CreateWithPersistError_DescriptorImpl> + get copyWith => __$$CreateWithPersistError_DescriptorImplCopyWithImpl< + _$CreateWithPersistError_DescriptorImpl>(this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return invalidLockTime(field0); + required TResult Function(String errorMessage) persist, + required TResult Function() dataAlreadyExists, + required TResult Function(String errorMessage) descriptor, + }) { + return descriptor(errorMessage); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return invalidLockTime?.call(field0); + TResult? Function(String errorMessage)? persist, + TResult? Function()? dataAlreadyExists, + TResult? Function(String errorMessage)? descriptor, + }) { + return descriptor?.call(errorMessage); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (invalidLockTime != null) { - return invalidLockTime(field0); + TResult Function(String errorMessage)? persist, + TResult Function()? dataAlreadyExists, + TResult Function(String errorMessage)? descriptor, + required TResult orElse(), + }) { + if (descriptor != null) { + return descriptor(errorMessage); } return orElse(); } @@ -23478,730 +14800,204 @@ class _$BdkError_InvalidLockTimeImpl extends BdkError_InvalidLockTime { @override @optionalTypeArgs TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return invalidLockTime(this); + required TResult Function(CreateWithPersistError_Persist value) persist, + required TResult Function(CreateWithPersistError_DataAlreadyExists value) + dataAlreadyExists, + required TResult Function(CreateWithPersistError_Descriptor value) + descriptor, + }) { + return descriptor(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return invalidLockTime?.call(this); + TResult? Function(CreateWithPersistError_Persist value)? persist, + TResult? Function(CreateWithPersistError_DataAlreadyExists value)? + dataAlreadyExists, + TResult? Function(CreateWithPersistError_Descriptor value)? descriptor, + }) { + return descriptor?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (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, + TResult Function(CreateWithPersistError_Persist value)? persist, + TResult Function(CreateWithPersistError_DataAlreadyExists value)? + dataAlreadyExists, + TResult Function(CreateWithPersistError_Descriptor value)? descriptor, + required TResult orElse(), }) { - return _then(_$BdkError_InvalidTransactionImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$BdkError_InvalidTransactionImpl extends BdkError_InvalidTransaction { - const _$BdkError_InvalidTransactionImpl(this.field0) : super._(); - - @override - final String field0; - - @override - String toString() { - return 'BdkError.invalidTransaction(field0: $field0)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BdkError_InvalidTransactionImpl && - (identical(other.field0, field0) || other.field0 == field0)); - } - - @override - int get hashCode => Object.hash(runtimeType, field0); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BdkError_InvalidTransactionImplCopyWith<_$BdkError_InvalidTransactionImpl> - get copyWith => __$$BdkError_InvalidTransactionImplCopyWithImpl< - _$BdkError_InvalidTransactionImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(HexError field0) hex, - required TResult Function(ConsensusError field0) consensus, - required TResult Function(String field0) verifyTransaction, - required TResult Function(AddressError field0) address, - required TResult Function(DescriptorError field0) descriptor, - required TResult Function(Uint8List field0) invalidU32Bytes, - required TResult Function(String field0) generic, - required TResult Function() scriptDoesntHaveAddressForm, - required TResult Function() noRecipients, - required TResult Function() noUtxosSelected, - required TResult Function(BigInt field0) outputBelowDustLimit, - required TResult Function(BigInt needed, BigInt available) - insufficientFunds, - required TResult Function() bnBTotalTriesExceeded, - required TResult Function() bnBNoExactMatch, - required TResult Function() unknownUtxo, - required TResult Function() transactionNotFound, - required TResult Function() transactionConfirmed, - required TResult Function() irreplaceableTransaction, - required TResult Function(double needed) feeRateTooLow, - required TResult Function(BigInt needed) feeTooLow, - required TResult Function() feeRateUnavailable, - required TResult Function(String field0) missingKeyOrigin, - required TResult Function(String field0) key, - required TResult Function() checksumMismatch, - required TResult Function(KeychainKind field0) spendingPolicyRequired, - required TResult Function(String field0) invalidPolicyPathError, - required TResult Function(String field0) signer, - required TResult Function(Network requested, Network found) invalidNetwork, - required TResult Function(OutPoint field0) invalidOutpoint, - required TResult Function(String field0) encode, - required TResult Function(String field0) miniscript, - required TResult Function(String field0) miniscriptPsbt, - required TResult Function(String field0) bip32, - required TResult Function(String field0) bip39, - required TResult Function(String field0) secp256K1, - required TResult Function(String field0) json, - required TResult Function(String field0) psbt, - required TResult Function(String field0) psbtParse, - required TResult Function(BigInt field0, BigInt field1) - missingCachedScripts, - required TResult Function(String field0) electrum, - required TResult Function(String field0) esplora, - required TResult Function(String field0) sled, - required TResult Function(String field0) rpc, - required TResult Function(String field0) rusqlite, - required TResult Function(String field0) invalidInput, - required TResult Function(String field0) invalidLockTime, - required TResult Function(String field0) invalidTransaction, - }) { - return invalidTransaction(field0); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(HexError field0)? hex, - TResult? Function(ConsensusError field0)? consensus, - TResult? Function(String field0)? verifyTransaction, - TResult? Function(AddressError field0)? address, - TResult? Function(DescriptorError field0)? descriptor, - TResult? Function(Uint8List field0)? invalidU32Bytes, - TResult? Function(String field0)? generic, - TResult? Function()? scriptDoesntHaveAddressForm, - TResult? Function()? noRecipients, - TResult? Function()? noUtxosSelected, - TResult? Function(BigInt field0)? outputBelowDustLimit, - TResult? Function(BigInt needed, BigInt available)? insufficientFunds, - TResult? Function()? bnBTotalTriesExceeded, - TResult? Function()? bnBNoExactMatch, - TResult? Function()? unknownUtxo, - TResult? Function()? transactionNotFound, - TResult? Function()? transactionConfirmed, - TResult? Function()? irreplaceableTransaction, - TResult? Function(double needed)? feeRateTooLow, - TResult? Function(BigInt needed)? feeTooLow, - TResult? Function()? feeRateUnavailable, - TResult? Function(String field0)? missingKeyOrigin, - TResult? Function(String field0)? key, - TResult? Function()? checksumMismatch, - TResult? Function(KeychainKind field0)? spendingPolicyRequired, - TResult? Function(String field0)? invalidPolicyPathError, - TResult? Function(String field0)? signer, - TResult? Function(Network requested, Network found)? invalidNetwork, - TResult? Function(OutPoint field0)? invalidOutpoint, - TResult? Function(String field0)? encode, - TResult? Function(String field0)? miniscript, - TResult? Function(String field0)? miniscriptPsbt, - TResult? Function(String field0)? bip32, - TResult? Function(String field0)? bip39, - TResult? Function(String field0)? secp256K1, - TResult? Function(String field0)? json, - TResult? Function(String field0)? psbt, - TResult? Function(String field0)? psbtParse, - TResult? Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult? Function(String field0)? electrum, - TResult? Function(String field0)? esplora, - TResult? Function(String field0)? sled, - TResult? Function(String field0)? rpc, - TResult? Function(String field0)? rusqlite, - TResult? Function(String field0)? invalidInput, - TResult? Function(String field0)? invalidLockTime, - TResult? Function(String field0)? invalidTransaction, - }) { - return invalidTransaction?.call(field0); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(HexError field0)? hex, - TResult Function(ConsensusError field0)? consensus, - TResult Function(String field0)? verifyTransaction, - TResult Function(AddressError field0)? address, - TResult Function(DescriptorError field0)? descriptor, - TResult Function(Uint8List field0)? invalidU32Bytes, - TResult Function(String field0)? generic, - TResult Function()? scriptDoesntHaveAddressForm, - TResult Function()? noRecipients, - TResult Function()? noUtxosSelected, - TResult Function(BigInt field0)? outputBelowDustLimit, - TResult Function(BigInt needed, BigInt available)? insufficientFunds, - TResult Function()? bnBTotalTriesExceeded, - TResult Function()? bnBNoExactMatch, - TResult Function()? unknownUtxo, - TResult Function()? transactionNotFound, - TResult Function()? transactionConfirmed, - TResult Function()? irreplaceableTransaction, - TResult Function(double needed)? feeRateTooLow, - TResult Function(BigInt needed)? feeTooLow, - TResult Function()? feeRateUnavailable, - TResult Function(String field0)? missingKeyOrigin, - TResult Function(String field0)? key, - TResult Function()? checksumMismatch, - TResult Function(KeychainKind field0)? spendingPolicyRequired, - TResult Function(String field0)? invalidPolicyPathError, - TResult Function(String field0)? signer, - TResult Function(Network requested, Network found)? invalidNetwork, - TResult Function(OutPoint field0)? invalidOutpoint, - TResult Function(String field0)? encode, - TResult Function(String field0)? miniscript, - TResult Function(String field0)? miniscriptPsbt, - TResult Function(String field0)? bip32, - TResult Function(String field0)? bip39, - TResult Function(String field0)? secp256K1, - TResult Function(String field0)? json, - TResult Function(String field0)? psbt, - TResult Function(String field0)? psbtParse, - TResult Function(BigInt field0, BigInt field1)? missingCachedScripts, - TResult Function(String field0)? electrum, - TResult Function(String field0)? esplora, - TResult Function(String field0)? sled, - TResult Function(String field0)? rpc, - TResult Function(String field0)? rusqlite, - TResult Function(String field0)? invalidInput, - TResult Function(String field0)? invalidLockTime, - TResult Function(String field0)? invalidTransaction, - required TResult orElse(), - }) { - if (invalidTransaction != null) { - return invalidTransaction(field0); + if (descriptor != null) { + return descriptor(this); } return orElse(); } +} - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BdkError_Hex value) hex, - required TResult Function(BdkError_Consensus value) consensus, - required TResult Function(BdkError_VerifyTransaction value) - verifyTransaction, - required TResult Function(BdkError_Address value) address, - required TResult Function(BdkError_Descriptor value) descriptor, - required TResult Function(BdkError_InvalidU32Bytes value) invalidU32Bytes, - required TResult Function(BdkError_Generic value) generic, - required TResult Function(BdkError_ScriptDoesntHaveAddressForm value) - scriptDoesntHaveAddressForm, - required TResult Function(BdkError_NoRecipients value) noRecipients, - required TResult Function(BdkError_NoUtxosSelected value) noUtxosSelected, - required TResult Function(BdkError_OutputBelowDustLimit value) - outputBelowDustLimit, - required TResult Function(BdkError_InsufficientFunds value) - insufficientFunds, - required TResult Function(BdkError_BnBTotalTriesExceeded value) - bnBTotalTriesExceeded, - required TResult Function(BdkError_BnBNoExactMatch value) bnBNoExactMatch, - required TResult Function(BdkError_UnknownUtxo value) unknownUtxo, - required TResult Function(BdkError_TransactionNotFound value) - transactionNotFound, - required TResult Function(BdkError_TransactionConfirmed value) - transactionConfirmed, - required TResult Function(BdkError_IrreplaceableTransaction value) - irreplaceableTransaction, - required TResult Function(BdkError_FeeRateTooLow value) feeRateTooLow, - required TResult Function(BdkError_FeeTooLow value) feeTooLow, - required TResult Function(BdkError_FeeRateUnavailable value) - feeRateUnavailable, - required TResult Function(BdkError_MissingKeyOrigin value) missingKeyOrigin, - required TResult Function(BdkError_Key value) key, - required TResult Function(BdkError_ChecksumMismatch value) checksumMismatch, - required TResult Function(BdkError_SpendingPolicyRequired value) - spendingPolicyRequired, - required TResult Function(BdkError_InvalidPolicyPathError value) - invalidPolicyPathError, - required TResult Function(BdkError_Signer value) signer, - required TResult Function(BdkError_InvalidNetwork value) invalidNetwork, - required TResult Function(BdkError_InvalidOutpoint value) invalidOutpoint, - required TResult Function(BdkError_Encode value) encode, - required TResult Function(BdkError_Miniscript value) miniscript, - required TResult Function(BdkError_MiniscriptPsbt value) miniscriptPsbt, - required TResult Function(BdkError_Bip32 value) bip32, - required TResult Function(BdkError_Bip39 value) bip39, - required TResult Function(BdkError_Secp256k1 value) secp256K1, - required TResult Function(BdkError_Json value) json, - required TResult Function(BdkError_Psbt value) psbt, - required TResult Function(BdkError_PsbtParse value) psbtParse, - required TResult Function(BdkError_MissingCachedScripts value) - missingCachedScripts, - required TResult Function(BdkError_Electrum value) electrum, - required TResult Function(BdkError_Esplora value) esplora, - required TResult Function(BdkError_Sled value) sled, - required TResult Function(BdkError_Rpc value) rpc, - required TResult Function(BdkError_Rusqlite value) rusqlite, - required TResult Function(BdkError_InvalidInput value) invalidInput, - required TResult Function(BdkError_InvalidLockTime value) invalidLockTime, - required TResult Function(BdkError_InvalidTransaction value) - invalidTransaction, - }) { - return invalidTransaction(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BdkError_Hex value)? hex, - TResult? Function(BdkError_Consensus value)? consensus, - TResult? Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult? Function(BdkError_Address value)? address, - TResult? Function(BdkError_Descriptor value)? descriptor, - TResult? Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult? Function(BdkError_Generic value)? generic, - TResult? Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult? Function(BdkError_NoRecipients value)? noRecipients, - TResult? Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult? Function(BdkError_OutputBelowDustLimit value)? - outputBelowDustLimit, - TResult? Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult? Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult? Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult? Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult? Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult? Function(BdkError_TransactionConfirmed value)? - transactionConfirmed, - TResult? Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult? Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult? Function(BdkError_FeeTooLow value)? feeTooLow, - TResult? Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult? Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult? Function(BdkError_Key value)? key, - TResult? Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult? Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult? Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult? Function(BdkError_Signer value)? signer, - TResult? Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult? Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult? Function(BdkError_Encode value)? encode, - TResult? Function(BdkError_Miniscript value)? miniscript, - TResult? Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult? Function(BdkError_Bip32 value)? bip32, - TResult? Function(BdkError_Bip39 value)? bip39, - TResult? Function(BdkError_Secp256k1 value)? secp256K1, - TResult? Function(BdkError_Json value)? json, - TResult? Function(BdkError_Psbt value)? psbt, - TResult? Function(BdkError_PsbtParse value)? psbtParse, - TResult? Function(BdkError_MissingCachedScripts value)? - missingCachedScripts, - TResult? Function(BdkError_Electrum value)? electrum, - TResult? Function(BdkError_Esplora value)? esplora, - TResult? Function(BdkError_Sled value)? sled, - TResult? Function(BdkError_Rpc value)? rpc, - TResult? Function(BdkError_Rusqlite value)? rusqlite, - TResult? Function(BdkError_InvalidInput value)? invalidInput, - TResult? Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult? Function(BdkError_InvalidTransaction value)? invalidTransaction, - }) { - return invalidTransaction?.call(this); - } +abstract class CreateWithPersistError_Descriptor + extends CreateWithPersistError { + const factory CreateWithPersistError_Descriptor( + {required final String errorMessage}) = + _$CreateWithPersistError_DescriptorImpl; + const CreateWithPersistError_Descriptor._() : super._(); - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BdkError_Hex value)? hex, - TResult Function(BdkError_Consensus value)? consensus, - TResult Function(BdkError_VerifyTransaction value)? verifyTransaction, - TResult Function(BdkError_Address value)? address, - TResult Function(BdkError_Descriptor value)? descriptor, - TResult Function(BdkError_InvalidU32Bytes value)? invalidU32Bytes, - TResult Function(BdkError_Generic value)? generic, - TResult Function(BdkError_ScriptDoesntHaveAddressForm value)? - scriptDoesntHaveAddressForm, - TResult Function(BdkError_NoRecipients value)? noRecipients, - TResult Function(BdkError_NoUtxosSelected value)? noUtxosSelected, - TResult Function(BdkError_OutputBelowDustLimit value)? outputBelowDustLimit, - TResult Function(BdkError_InsufficientFunds value)? insufficientFunds, - TResult Function(BdkError_BnBTotalTriesExceeded value)? - bnBTotalTriesExceeded, - TResult Function(BdkError_BnBNoExactMatch value)? bnBNoExactMatch, - TResult Function(BdkError_UnknownUtxo value)? unknownUtxo, - TResult Function(BdkError_TransactionNotFound value)? transactionNotFound, - TResult Function(BdkError_TransactionConfirmed value)? transactionConfirmed, - TResult Function(BdkError_IrreplaceableTransaction value)? - irreplaceableTransaction, - TResult Function(BdkError_FeeRateTooLow value)? feeRateTooLow, - TResult Function(BdkError_FeeTooLow value)? feeTooLow, - TResult Function(BdkError_FeeRateUnavailable value)? feeRateUnavailable, - TResult Function(BdkError_MissingKeyOrigin value)? missingKeyOrigin, - TResult Function(BdkError_Key value)? key, - TResult Function(BdkError_ChecksumMismatch value)? checksumMismatch, - TResult Function(BdkError_SpendingPolicyRequired value)? - spendingPolicyRequired, - TResult Function(BdkError_InvalidPolicyPathError value)? - invalidPolicyPathError, - TResult Function(BdkError_Signer value)? signer, - TResult Function(BdkError_InvalidNetwork value)? invalidNetwork, - TResult Function(BdkError_InvalidOutpoint value)? invalidOutpoint, - TResult Function(BdkError_Encode value)? encode, - TResult Function(BdkError_Miniscript value)? miniscript, - TResult Function(BdkError_MiniscriptPsbt value)? miniscriptPsbt, - TResult Function(BdkError_Bip32 value)? bip32, - TResult Function(BdkError_Bip39 value)? bip39, - TResult Function(BdkError_Secp256k1 value)? secp256K1, - TResult Function(BdkError_Json value)? json, - TResult Function(BdkError_Psbt value)? psbt, - TResult Function(BdkError_PsbtParse value)? psbtParse, - TResult Function(BdkError_MissingCachedScripts value)? missingCachedScripts, - TResult Function(BdkError_Electrum value)? electrum, - TResult Function(BdkError_Esplora value)? esplora, - TResult Function(BdkError_Sled value)? sled, - TResult Function(BdkError_Rpc value)? rpc, - TResult Function(BdkError_Rusqlite value)? rusqlite, - TResult Function(BdkError_InvalidInput value)? invalidInput, - TResult Function(BdkError_InvalidLockTime value)? invalidLockTime, - TResult Function(BdkError_InvalidTransaction value)? invalidTransaction, - required TResult orElse(), - }) { - if (invalidTransaction != null) { - return invalidTransaction(this); - } - return orElse(); - } -} - -abstract class BdkError_InvalidTransaction extends BdkError { - const factory BdkError_InvalidTransaction(final String field0) = - _$BdkError_InvalidTransactionImpl; - const BdkError_InvalidTransaction._() : super._(); - - String get field0; + String get errorMessage; @JsonKey(ignore: true) - _$$BdkError_InvalidTransactionImplCopyWith<_$BdkError_InvalidTransactionImpl> + _$$CreateWithPersistError_DescriptorImplCopyWith< + _$CreateWithPersistError_DescriptorImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -mixin _$ConsensusError { +mixin _$DescriptorError { @optionalTypeArgs TResult when({ - required TResult Function(String field0) io, - required TResult Function(BigInt requested, BigInt max) - oversizedVectorAllocation, - required TResult Function(U8Array4 expected, U8Array4 actual) - invalidChecksum, - required TResult Function() nonMinimalVarInt, - required TResult Function(String field0) parseFailed, - required TResult Function(int field0) unsupportedSegwitFlag, + required TResult Function() invalidHdKeyPath, + required TResult Function() missingPrivateData, + required TResult Function() invalidDescriptorChecksum, + required TResult Function() hardenedDerivationXpub, + required TResult Function() multiPath, + required TResult Function(String errorMessage) key, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) policy, + required TResult Function(String charector) invalidDescriptorCharacter, + required TResult Function(String errorMessage) bip32, + required TResult Function(String errorMessage) base58, + required TResult Function(String errorMessage) pk, + required TResult Function(String errorMessage) miniscript, + required TResult Function(String errorMessage) hex, + required TResult Function() externalAndInternalAreTheSame, }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(String field0)? io, - TResult? Function(BigInt requested, BigInt max)? oversizedVectorAllocation, - TResult? Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, - TResult? Function()? nonMinimalVarInt, - TResult? Function(String field0)? parseFailed, - TResult? Function(int field0)? unsupportedSegwitFlag, + TResult? Function()? invalidHdKeyPath, + TResult? Function()? missingPrivateData, + TResult? Function()? invalidDescriptorChecksum, + TResult? Function()? hardenedDerivationXpub, + TResult? Function()? multiPath, + TResult? Function(String errorMessage)? key, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? policy, + TResult? Function(String charector)? invalidDescriptorCharacter, + TResult? Function(String errorMessage)? bip32, + TResult? Function(String errorMessage)? base58, + TResult? Function(String errorMessage)? pk, + TResult? Function(String errorMessage)? miniscript, + TResult? Function(String errorMessage)? hex, + TResult? Function()? externalAndInternalAreTheSame, }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeWhen({ - TResult Function(String field0)? io, - TResult Function(BigInt requested, BigInt max)? oversizedVectorAllocation, - TResult Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, - TResult Function()? nonMinimalVarInt, - TResult Function(String field0)? parseFailed, - TResult Function(int field0)? unsupportedSegwitFlag, + TResult Function()? invalidHdKeyPath, + TResult Function()? missingPrivateData, + TResult Function()? invalidDescriptorChecksum, + TResult Function()? hardenedDerivationXpub, + TResult Function()? multiPath, + TResult Function(String errorMessage)? key, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? policy, + TResult Function(String charector)? invalidDescriptorCharacter, + TResult Function(String errorMessage)? bip32, + TResult Function(String errorMessage)? base58, + TResult Function(String errorMessage)? pk, + TResult Function(String errorMessage)? miniscript, + TResult Function(String errorMessage)? hex, + TResult Function()? externalAndInternalAreTheSame, 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, + required TResult Function(DescriptorError_InvalidHdKeyPath value) + invalidHdKeyPath, + required TResult Function(DescriptorError_MissingPrivateData value) + missingPrivateData, + 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_Generic value) generic, + 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, + required TResult Function( + DescriptorError_ExternalAndInternalAreTheSame value) + externalAndInternalAreTheSame, }) => 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, + TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult? Function(DescriptorError_MissingPrivateData value)? + missingPrivateData, + 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_Generic value)? generic, + 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, + TResult? Function(DescriptorError_ExternalAndInternalAreTheSame value)? + externalAndInternalAreTheSame, }) => 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, + TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult Function(DescriptorError_MissingPrivateData value)? + missingPrivateData, + 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_Generic value)? generic, + 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, + TResult Function(DescriptorError_ExternalAndInternalAreTheSame value)? + externalAndInternalAreTheSame, required TResult orElse(), }) => throw _privateConstructorUsedError; } /// @nodoc -abstract class $ConsensusErrorCopyWith<$Res> { - factory $ConsensusErrorCopyWith( - ConsensusError value, $Res Function(ConsensusError) then) = - _$ConsensusErrorCopyWithImpl<$Res, ConsensusError>; +abstract class $DescriptorErrorCopyWith<$Res> { + factory $DescriptorErrorCopyWith( + DescriptorError value, $Res Function(DescriptorError) then) = + _$DescriptorErrorCopyWithImpl<$Res, DescriptorError>; } /// @nodoc -class _$ConsensusErrorCopyWithImpl<$Res, $Val extends ConsensusError> - implements $ConsensusErrorCopyWith<$Res> { - _$ConsensusErrorCopyWithImpl(this._value, this._then); +class _$DescriptorErrorCopyWithImpl<$Res, $Val extends DescriptorError> + implements $DescriptorErrorCopyWith<$Res> { + _$DescriptorErrorCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -24210,108 +15006,111 @@ class _$ConsensusErrorCopyWithImpl<$Res, $Val extends ConsensusError> } /// @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}); +abstract class _$$DescriptorError_InvalidHdKeyPathImplCopyWith<$Res> { + factory _$$DescriptorError_InvalidHdKeyPathImplCopyWith( + _$DescriptorError_InvalidHdKeyPathImpl value, + $Res Function(_$DescriptorError_InvalidHdKeyPathImpl) then) = + __$$DescriptorError_InvalidHdKeyPathImplCopyWithImpl<$Res>; } /// @nodoc -class __$$ConsensusError_IoImplCopyWithImpl<$Res> - extends _$ConsensusErrorCopyWithImpl<$Res, _$ConsensusError_IoImpl> - implements _$$ConsensusError_IoImplCopyWith<$Res> { - __$$ConsensusError_IoImplCopyWithImpl(_$ConsensusError_IoImpl _value, - $Res Function(_$ConsensusError_IoImpl) _then) +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); - - @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; +class _$DescriptorError_InvalidHdKeyPathImpl + extends DescriptorError_InvalidHdKeyPath { + const _$DescriptorError_InvalidHdKeyPathImpl() : super._(); @override String toString() { - return 'ConsensusError.io(field0: $field0)'; + return 'DescriptorError.invalidHdKeyPath()'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$ConsensusError_IoImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$DescriptorError_InvalidHdKeyPathImpl); } @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); + int get hashCode => runtimeType.hashCode; @override @optionalTypeArgs TResult when({ - required TResult Function(String field0) io, - required TResult Function(BigInt requested, BigInt max) - oversizedVectorAllocation, - required TResult Function(U8Array4 expected, U8Array4 actual) - invalidChecksum, - required TResult Function() nonMinimalVarInt, - required TResult Function(String field0) parseFailed, - required TResult Function(int field0) unsupportedSegwitFlag, + required TResult Function() invalidHdKeyPath, + required TResult Function() missingPrivateData, + required TResult Function() invalidDescriptorChecksum, + required TResult Function() hardenedDerivationXpub, + required TResult Function() multiPath, + required TResult Function(String errorMessage) key, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) policy, + required TResult Function(String charector) invalidDescriptorCharacter, + required TResult Function(String errorMessage) bip32, + required TResult Function(String errorMessage) base58, + required TResult Function(String errorMessage) pk, + required TResult Function(String errorMessage) miniscript, + required TResult Function(String errorMessage) hex, + required TResult Function() externalAndInternalAreTheSame, }) { - return io(field0); + return invalidHdKeyPath(); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(String field0)? io, - TResult? Function(BigInt requested, BigInt max)? oversizedVectorAllocation, - TResult? Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, - TResult? Function()? nonMinimalVarInt, - TResult? Function(String field0)? parseFailed, - TResult? Function(int field0)? unsupportedSegwitFlag, + TResult? Function()? invalidHdKeyPath, + TResult? Function()? missingPrivateData, + TResult? Function()? invalidDescriptorChecksum, + TResult? Function()? hardenedDerivationXpub, + TResult? Function()? multiPath, + TResult? Function(String errorMessage)? key, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? policy, + TResult? Function(String charector)? invalidDescriptorCharacter, + TResult? Function(String errorMessage)? bip32, + TResult? Function(String errorMessage)? base58, + TResult? Function(String errorMessage)? pk, + TResult? Function(String errorMessage)? miniscript, + TResult? Function(String errorMessage)? hex, + TResult? Function()? externalAndInternalAreTheSame, }) { - return io?.call(field0); + return invalidHdKeyPath?.call(); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(String field0)? io, - TResult Function(BigInt requested, BigInt max)? oversizedVectorAllocation, - TResult Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, - TResult Function()? nonMinimalVarInt, - TResult Function(String field0)? parseFailed, - TResult Function(int field0)? unsupportedSegwitFlag, + TResult Function()? invalidHdKeyPath, + TResult Function()? missingPrivateData, + TResult Function()? invalidDescriptorChecksum, + TResult Function()? hardenedDerivationXpub, + TResult Function()? multiPath, + TResult Function(String errorMessage)? key, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? policy, + TResult Function(String charector)? invalidDescriptorCharacter, + TResult Function(String errorMessage)? bip32, + TResult Function(String errorMessage)? base58, + TResult Function(String errorMessage)? pk, + TResult Function(String errorMessage)? miniscript, + TResult Function(String errorMessage)? hex, + TResult Function()? externalAndInternalAreTheSame, required TResult orElse(), }) { - if (io != null) { - return io(field0); + if (invalidHdKeyPath != null) { + return invalidHdKeyPath(); } return orElse(); } @@ -24319,186 +15118,203 @@ class _$ConsensusError_IoImpl extends ConsensusError_Io { @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, + required TResult Function(DescriptorError_InvalidHdKeyPath value) + invalidHdKeyPath, + required TResult Function(DescriptorError_MissingPrivateData value) + missingPrivateData, + 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_Generic value) generic, + 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, + required TResult Function( + DescriptorError_ExternalAndInternalAreTheSame value) + externalAndInternalAreTheSame, }) { - return io(this); + return invalidHdKeyPath(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, + TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult? Function(DescriptorError_MissingPrivateData value)? + missingPrivateData, + 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_Generic value)? generic, + 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, + TResult? Function(DescriptorError_ExternalAndInternalAreTheSame value)? + externalAndInternalAreTheSame, }) { - return io?.call(this); + return invalidHdKeyPath?.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, + TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult Function(DescriptorError_MissingPrivateData value)? + missingPrivateData, + 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_Generic value)? generic, + 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, + TResult Function(DescriptorError_ExternalAndInternalAreTheSame value)? + externalAndInternalAreTheSame, required TResult orElse(), }) { - if (io != null) { - return io(this); + if (invalidHdKeyPath != null) { + return invalidHdKeyPath(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; +abstract class DescriptorError_InvalidHdKeyPath extends DescriptorError { + const factory DescriptorError_InvalidHdKeyPath() = + _$DescriptorError_InvalidHdKeyPathImpl; + const DescriptorError_InvalidHdKeyPath._() : super._(); } /// @nodoc -abstract class _$$ConsensusError_OversizedVectorAllocationImplCopyWith<$Res> { - factory _$$ConsensusError_OversizedVectorAllocationImplCopyWith( - _$ConsensusError_OversizedVectorAllocationImpl value, - $Res Function(_$ConsensusError_OversizedVectorAllocationImpl) then) = - __$$ConsensusError_OversizedVectorAllocationImplCopyWithImpl<$Res>; - @useResult - $Res call({BigInt requested, BigInt max}); +abstract class _$$DescriptorError_MissingPrivateDataImplCopyWith<$Res> { + factory _$$DescriptorError_MissingPrivateDataImplCopyWith( + _$DescriptorError_MissingPrivateDataImpl value, + $Res Function(_$DescriptorError_MissingPrivateDataImpl) then) = + __$$DescriptorError_MissingPrivateDataImplCopyWithImpl<$Res>; } /// @nodoc -class __$$ConsensusError_OversizedVectorAllocationImplCopyWithImpl<$Res> - extends _$ConsensusErrorCopyWithImpl<$Res, - _$ConsensusError_OversizedVectorAllocationImpl> - implements _$$ConsensusError_OversizedVectorAllocationImplCopyWith<$Res> { - __$$ConsensusError_OversizedVectorAllocationImplCopyWithImpl( - _$ConsensusError_OversizedVectorAllocationImpl _value, - $Res Function(_$ConsensusError_OversizedVectorAllocationImpl) _then) +class __$$DescriptorError_MissingPrivateDataImplCopyWithImpl<$Res> + extends _$DescriptorErrorCopyWithImpl<$Res, + _$DescriptorError_MissingPrivateDataImpl> + implements _$$DescriptorError_MissingPrivateDataImplCopyWith<$Res> { + __$$DescriptorError_MissingPrivateDataImplCopyWithImpl( + _$DescriptorError_MissingPrivateDataImpl _value, + $Res Function(_$DescriptorError_MissingPrivateDataImpl) _then) : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? requested = null, - Object? max = null, - }) { - return _then(_$ConsensusError_OversizedVectorAllocationImpl( - requested: null == requested - ? _value.requested - : requested // ignore: cast_nullable_to_non_nullable - as BigInt, - max: null == max - ? _value.max - : max // ignore: cast_nullable_to_non_nullable - as BigInt, - )); - } } /// @nodoc -class _$ConsensusError_OversizedVectorAllocationImpl - extends ConsensusError_OversizedVectorAllocation { - const _$ConsensusError_OversizedVectorAllocationImpl( - {required this.requested, required this.max}) - : super._(); - - @override - final BigInt requested; - @override - final BigInt max; +class _$DescriptorError_MissingPrivateDataImpl + extends DescriptorError_MissingPrivateData { + const _$DescriptorError_MissingPrivateDataImpl() : super._(); @override String toString() { - return 'ConsensusError.oversizedVectorAllocation(requested: $requested, max: $max)'; + return 'DescriptorError.missingPrivateData()'; } @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)); + other is _$DescriptorError_MissingPrivateDataImpl); } @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); + int get hashCode => runtimeType.hashCode; @override @optionalTypeArgs TResult when({ - required TResult Function(String field0) io, - required TResult Function(BigInt requested, BigInt max) - oversizedVectorAllocation, - required TResult Function(U8Array4 expected, U8Array4 actual) - invalidChecksum, - required TResult Function() nonMinimalVarInt, - required TResult Function(String field0) parseFailed, - required TResult Function(int field0) unsupportedSegwitFlag, + required TResult Function() invalidHdKeyPath, + required TResult Function() missingPrivateData, + required TResult Function() invalidDescriptorChecksum, + required TResult Function() hardenedDerivationXpub, + required TResult Function() multiPath, + required TResult Function(String errorMessage) key, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) policy, + required TResult Function(String charector) invalidDescriptorCharacter, + required TResult Function(String errorMessage) bip32, + required TResult Function(String errorMessage) base58, + required TResult Function(String errorMessage) pk, + required TResult Function(String errorMessage) miniscript, + required TResult Function(String errorMessage) hex, + required TResult Function() externalAndInternalAreTheSame, }) { - return oversizedVectorAllocation(requested, max); + return missingPrivateData(); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(String field0)? io, - TResult? Function(BigInt requested, BigInt max)? oversizedVectorAllocation, - TResult? Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, - TResult? Function()? nonMinimalVarInt, - TResult? Function(String field0)? parseFailed, - TResult? Function(int field0)? unsupportedSegwitFlag, + TResult? Function()? invalidHdKeyPath, + TResult? Function()? missingPrivateData, + TResult? Function()? invalidDescriptorChecksum, + TResult? Function()? hardenedDerivationXpub, + TResult? Function()? multiPath, + TResult? Function(String errorMessage)? key, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? policy, + TResult? Function(String charector)? invalidDescriptorCharacter, + TResult? Function(String errorMessage)? bip32, + TResult? Function(String errorMessage)? base58, + TResult? Function(String errorMessage)? pk, + TResult? Function(String errorMessage)? miniscript, + TResult? Function(String errorMessage)? hex, + TResult? Function()? externalAndInternalAreTheSame, }) { - return oversizedVectorAllocation?.call(requested, max); + return missingPrivateData?.call(); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(String field0)? io, - TResult Function(BigInt requested, BigInt max)? oversizedVectorAllocation, - TResult Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, - TResult Function()? nonMinimalVarInt, - TResult Function(String field0)? parseFailed, - TResult Function(int field0)? unsupportedSegwitFlag, + TResult Function()? invalidHdKeyPath, + TResult Function()? missingPrivateData, + TResult Function()? invalidDescriptorChecksum, + TResult Function()? hardenedDerivationXpub, + TResult Function()? multiPath, + TResult Function(String errorMessage)? key, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? policy, + TResult Function(String charector)? invalidDescriptorCharacter, + TResult Function(String errorMessage)? bip32, + TResult Function(String errorMessage)? base58, + TResult Function(String errorMessage)? pk, + TResult Function(String errorMessage)? miniscript, + TResult Function(String errorMessage)? hex, + TResult Function()? externalAndInternalAreTheSame, required TResult orElse(), }) { - if (oversizedVectorAllocation != null) { - return oversizedVectorAllocation(requested, max); + if (missingPrivateData != null) { + return missingPrivateData(); } return orElse(); } @@ -24506,190 +15322,203 @@ class _$ConsensusError_OversizedVectorAllocationImpl @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, + required TResult Function(DescriptorError_InvalidHdKeyPath value) + invalidHdKeyPath, + required TResult Function(DescriptorError_MissingPrivateData value) + missingPrivateData, + 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_Generic value) generic, + 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, + required TResult Function( + DescriptorError_ExternalAndInternalAreTheSame value) + externalAndInternalAreTheSame, }) { - return oversizedVectorAllocation(this); + return missingPrivateData(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, + TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult? Function(DescriptorError_MissingPrivateData value)? + missingPrivateData, + 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_Generic value)? generic, + 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, + TResult? Function(DescriptorError_ExternalAndInternalAreTheSame value)? + externalAndInternalAreTheSame, }) { - return oversizedVectorAllocation?.call(this); + return missingPrivateData?.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, + TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult Function(DescriptorError_MissingPrivateData value)? + missingPrivateData, + 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_Generic value)? generic, + 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, + TResult Function(DescriptorError_ExternalAndInternalAreTheSame value)? + externalAndInternalAreTheSame, required TResult orElse(), }) { - if (oversizedVectorAllocation != null) { - return oversizedVectorAllocation(this); + if (missingPrivateData != null) { + return missingPrivateData(this); } return orElse(); } } -abstract class ConsensusError_OversizedVectorAllocation extends ConsensusError { - const factory ConsensusError_OversizedVectorAllocation( - {required final BigInt requested, required final BigInt max}) = - _$ConsensusError_OversizedVectorAllocationImpl; - const ConsensusError_OversizedVectorAllocation._() : super._(); - - BigInt get requested; - BigInt get max; - @JsonKey(ignore: true) - _$$ConsensusError_OversizedVectorAllocationImplCopyWith< - _$ConsensusError_OversizedVectorAllocationImpl> - get copyWith => throw _privateConstructorUsedError; +abstract class DescriptorError_MissingPrivateData extends DescriptorError { + const factory DescriptorError_MissingPrivateData() = + _$DescriptorError_MissingPrivateDataImpl; + const DescriptorError_MissingPrivateData._() : super._(); } /// @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}); +abstract class _$$DescriptorError_InvalidDescriptorChecksumImplCopyWith<$Res> { + factory _$$DescriptorError_InvalidDescriptorChecksumImplCopyWith( + _$DescriptorError_InvalidDescriptorChecksumImpl value, + $Res Function(_$DescriptorError_InvalidDescriptorChecksumImpl) then) = + __$$DescriptorError_InvalidDescriptorChecksumImplCopyWithImpl<$Res>; } /// @nodoc -class __$$ConsensusError_InvalidChecksumImplCopyWithImpl<$Res> - extends _$ConsensusErrorCopyWithImpl<$Res, - _$ConsensusError_InvalidChecksumImpl> - implements _$$ConsensusError_InvalidChecksumImplCopyWith<$Res> { - __$$ConsensusError_InvalidChecksumImplCopyWithImpl( - _$ConsensusError_InvalidChecksumImpl _value, - $Res Function(_$ConsensusError_InvalidChecksumImpl) _then) +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); - - @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; +class _$DescriptorError_InvalidDescriptorChecksumImpl + extends DescriptorError_InvalidDescriptorChecksum { + const _$DescriptorError_InvalidDescriptorChecksumImpl() : super._(); @override String toString() { - return 'ConsensusError.invalidChecksum(expected: $expected, actual: $actual)'; + return 'DescriptorError.invalidDescriptorChecksum()'; } @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)); + other is _$DescriptorError_InvalidDescriptorChecksumImpl); } @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); + int get hashCode => runtimeType.hashCode; @override @optionalTypeArgs TResult when({ - required TResult Function(String field0) io, - required TResult Function(BigInt requested, BigInt max) - oversizedVectorAllocation, - required TResult Function(U8Array4 expected, U8Array4 actual) - invalidChecksum, - required TResult Function() nonMinimalVarInt, - required TResult Function(String field0) parseFailed, - required TResult Function(int field0) unsupportedSegwitFlag, + required TResult Function() invalidHdKeyPath, + required TResult Function() missingPrivateData, + required TResult Function() invalidDescriptorChecksum, + required TResult Function() hardenedDerivationXpub, + required TResult Function() multiPath, + required TResult Function(String errorMessage) key, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) policy, + required TResult Function(String charector) invalidDescriptorCharacter, + required TResult Function(String errorMessage) bip32, + required TResult Function(String errorMessage) base58, + required TResult Function(String errorMessage) pk, + required TResult Function(String errorMessage) miniscript, + required TResult Function(String errorMessage) hex, + required TResult Function() externalAndInternalAreTheSame, }) { - return invalidChecksum(expected, actual); + return invalidDescriptorChecksum(); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(String field0)? io, - TResult? Function(BigInt requested, BigInt max)? oversizedVectorAllocation, - TResult? Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, - TResult? Function()? nonMinimalVarInt, - TResult? Function(String field0)? parseFailed, - TResult? Function(int field0)? unsupportedSegwitFlag, + TResult? Function()? invalidHdKeyPath, + TResult? Function()? missingPrivateData, + TResult? Function()? invalidDescriptorChecksum, + TResult? Function()? hardenedDerivationXpub, + TResult? Function()? multiPath, + TResult? Function(String errorMessage)? key, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? policy, + TResult? Function(String charector)? invalidDescriptorCharacter, + TResult? Function(String errorMessage)? bip32, + TResult? Function(String errorMessage)? base58, + TResult? Function(String errorMessage)? pk, + TResult? Function(String errorMessage)? miniscript, + TResult? Function(String errorMessage)? hex, + TResult? Function()? externalAndInternalAreTheSame, }) { - return invalidChecksum?.call(expected, actual); + return invalidDescriptorChecksum?.call(); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(String field0)? io, - TResult Function(BigInt requested, BigInt max)? oversizedVectorAllocation, - TResult Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, - TResult Function()? nonMinimalVarInt, - TResult Function(String field0)? parseFailed, - TResult Function(int field0)? unsupportedSegwitFlag, + TResult Function()? invalidHdKeyPath, + TResult Function()? missingPrivateData, + TResult Function()? invalidDescriptorChecksum, + TResult Function()? hardenedDerivationXpub, + TResult Function()? multiPath, + TResult Function(String errorMessage)? key, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? policy, + TResult Function(String charector)? invalidDescriptorCharacter, + TResult Function(String errorMessage)? bip32, + TResult Function(String errorMessage)? base58, + TResult Function(String errorMessage)? pk, + TResult Function(String errorMessage)? miniscript, + TResult Function(String errorMessage)? hex, + TResult Function()? externalAndInternalAreTheSame, required TResult orElse(), }) { - if (invalidChecksum != null) { - return invalidChecksum(expected, actual); + if (invalidDescriptorChecksum != null) { + return invalidDescriptorChecksum(); } return orElse(); } @@ -24697,104 +15526,133 @@ class _$ConsensusError_InvalidChecksumImpl @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, + required TResult Function(DescriptorError_InvalidHdKeyPath value) + invalidHdKeyPath, + required TResult Function(DescriptorError_MissingPrivateData value) + missingPrivateData, + 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_Generic value) generic, + 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, + required TResult Function( + DescriptorError_ExternalAndInternalAreTheSame value) + externalAndInternalAreTheSame, }) { - return invalidChecksum(this); + return invalidDescriptorChecksum(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, + TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult? Function(DescriptorError_MissingPrivateData value)? + missingPrivateData, + 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_Generic value)? generic, + 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, + TResult? Function(DescriptorError_ExternalAndInternalAreTheSame value)? + externalAndInternalAreTheSame, }) { - return invalidChecksum?.call(this); + return invalidDescriptorChecksum?.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, + TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult Function(DescriptorError_MissingPrivateData value)? + missingPrivateData, + 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_Generic value)? generic, + 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, + TResult Function(DescriptorError_ExternalAndInternalAreTheSame value)? + externalAndInternalAreTheSame, required TResult orElse(), }) { - if (invalidChecksum != null) { - return invalidChecksum(this); + if (invalidDescriptorChecksum != null) { + return invalidDescriptorChecksum(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; +abstract class DescriptorError_InvalidDescriptorChecksum + extends DescriptorError { + const factory DescriptorError_InvalidDescriptorChecksum() = + _$DescriptorError_InvalidDescriptorChecksumImpl; + const DescriptorError_InvalidDescriptorChecksum._() : super._(); } /// @nodoc -abstract class _$$ConsensusError_NonMinimalVarIntImplCopyWith<$Res> { - factory _$$ConsensusError_NonMinimalVarIntImplCopyWith( - _$ConsensusError_NonMinimalVarIntImpl value, - $Res Function(_$ConsensusError_NonMinimalVarIntImpl) then) = - __$$ConsensusError_NonMinimalVarIntImplCopyWithImpl<$Res>; +abstract class _$$DescriptorError_HardenedDerivationXpubImplCopyWith<$Res> { + factory _$$DescriptorError_HardenedDerivationXpubImplCopyWith( + _$DescriptorError_HardenedDerivationXpubImpl value, + $Res Function(_$DescriptorError_HardenedDerivationXpubImpl) then) = + __$$DescriptorError_HardenedDerivationXpubImplCopyWithImpl<$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) +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 _$ConsensusError_NonMinimalVarIntImpl - extends ConsensusError_NonMinimalVarInt { - const _$ConsensusError_NonMinimalVarIntImpl() : super._(); +class _$DescriptorError_HardenedDerivationXpubImpl + extends DescriptorError_HardenedDerivationXpub { + const _$DescriptorError_HardenedDerivationXpubImpl() : super._(); @override String toString() { - return 'ConsensusError.nonMinimalVarInt()'; + return 'DescriptorError.hardenedDerivationXpub()'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$ConsensusError_NonMinimalVarIntImpl); + other is _$DescriptorError_HardenedDerivationXpubImpl); } @override @@ -24803,44 +15661,69 @@ class _$ConsensusError_NonMinimalVarIntImpl @override @optionalTypeArgs TResult when({ - required TResult Function(String field0) io, - required TResult Function(BigInt requested, BigInt max) - oversizedVectorAllocation, - required TResult Function(U8Array4 expected, U8Array4 actual) - invalidChecksum, - required TResult Function() nonMinimalVarInt, - required TResult Function(String field0) parseFailed, - required TResult Function(int field0) unsupportedSegwitFlag, + required TResult Function() invalidHdKeyPath, + required TResult Function() missingPrivateData, + required TResult Function() invalidDescriptorChecksum, + required TResult Function() hardenedDerivationXpub, + required TResult Function() multiPath, + required TResult Function(String errorMessage) key, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) policy, + required TResult Function(String charector) invalidDescriptorCharacter, + required TResult Function(String errorMessage) bip32, + required TResult Function(String errorMessage) base58, + required TResult Function(String errorMessage) pk, + required TResult Function(String errorMessage) miniscript, + required TResult Function(String errorMessage) hex, + required TResult Function() externalAndInternalAreTheSame, }) { - return nonMinimalVarInt(); + return hardenedDerivationXpub(); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(String field0)? io, - TResult? Function(BigInt requested, BigInt max)? oversizedVectorAllocation, - TResult? Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, - TResult? Function()? nonMinimalVarInt, - TResult? Function(String field0)? parseFailed, - TResult? Function(int field0)? unsupportedSegwitFlag, + TResult? Function()? invalidHdKeyPath, + TResult? Function()? missingPrivateData, + TResult? Function()? invalidDescriptorChecksum, + TResult? Function()? hardenedDerivationXpub, + TResult? Function()? multiPath, + TResult? Function(String errorMessage)? key, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? policy, + TResult? Function(String charector)? invalidDescriptorCharacter, + TResult? Function(String errorMessage)? bip32, + TResult? Function(String errorMessage)? base58, + TResult? Function(String errorMessage)? pk, + TResult? Function(String errorMessage)? miniscript, + TResult? Function(String errorMessage)? hex, + TResult? Function()? externalAndInternalAreTheSame, }) { - return nonMinimalVarInt?.call(); + return hardenedDerivationXpub?.call(); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(String field0)? io, - TResult Function(BigInt requested, BigInt max)? oversizedVectorAllocation, - TResult Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, - TResult Function()? nonMinimalVarInt, - TResult Function(String field0)? parseFailed, - TResult Function(int field0)? unsupportedSegwitFlag, + TResult Function()? invalidHdKeyPath, + TResult Function()? missingPrivateData, + TResult Function()? invalidDescriptorChecksum, + TResult Function()? hardenedDerivationXpub, + TResult Function()? multiPath, + TResult Function(String errorMessage)? key, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? policy, + TResult Function(String charector)? invalidDescriptorCharacter, + TResult Function(String errorMessage)? bip32, + TResult Function(String errorMessage)? base58, + TResult Function(String errorMessage)? pk, + TResult Function(String errorMessage)? miniscript, + TResult Function(String errorMessage)? hex, + TResult Function()? externalAndInternalAreTheSame, required TResult orElse(), }) { - if (nonMinimalVarInt != null) { - return nonMinimalVarInt(); + if (hardenedDerivationXpub != null) { + return hardenedDerivationXpub(); } return orElse(); } @@ -24848,166 +15731,201 @@ class _$ConsensusError_NonMinimalVarIntImpl @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, + required TResult Function(DescriptorError_InvalidHdKeyPath value) + invalidHdKeyPath, + required TResult Function(DescriptorError_MissingPrivateData value) + missingPrivateData, + 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_Generic value) generic, + 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, + required TResult Function( + DescriptorError_ExternalAndInternalAreTheSame value) + externalAndInternalAreTheSame, }) { - return nonMinimalVarInt(this); + return hardenedDerivationXpub(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, + TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult? Function(DescriptorError_MissingPrivateData value)? + missingPrivateData, + 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_Generic value)? generic, + 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, + TResult? Function(DescriptorError_ExternalAndInternalAreTheSame value)? + externalAndInternalAreTheSame, }) { - return nonMinimalVarInt?.call(this); + return hardenedDerivationXpub?.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, + TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult Function(DescriptorError_MissingPrivateData value)? + missingPrivateData, + 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_Generic value)? generic, + 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, + TResult Function(DescriptorError_ExternalAndInternalAreTheSame value)? + externalAndInternalAreTheSame, required TResult orElse(), }) { - if (nonMinimalVarInt != null) { - return nonMinimalVarInt(this); + if (hardenedDerivationXpub != null) { + return hardenedDerivationXpub(this); } return orElse(); } } -abstract class ConsensusError_NonMinimalVarInt extends ConsensusError { - const factory ConsensusError_NonMinimalVarInt() = - _$ConsensusError_NonMinimalVarIntImpl; - const ConsensusError_NonMinimalVarInt._() : super._(); +abstract class DescriptorError_HardenedDerivationXpub extends DescriptorError { + const factory DescriptorError_HardenedDerivationXpub() = + _$DescriptorError_HardenedDerivationXpubImpl; + const DescriptorError_HardenedDerivationXpub._() : 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}); +abstract class _$$DescriptorError_MultiPathImplCopyWith<$Res> { + factory _$$DescriptorError_MultiPathImplCopyWith( + _$DescriptorError_MultiPathImpl value, + $Res Function(_$DescriptorError_MultiPathImpl) then) = + __$$DescriptorError_MultiPathImplCopyWithImpl<$Res>; } /// @nodoc -class __$$ConsensusError_ParseFailedImplCopyWithImpl<$Res> - extends _$ConsensusErrorCopyWithImpl<$Res, _$ConsensusError_ParseFailedImpl> - implements _$$ConsensusError_ParseFailedImplCopyWith<$Res> { - __$$ConsensusError_ParseFailedImplCopyWithImpl( - _$ConsensusError_ParseFailedImpl _value, - $Res Function(_$ConsensusError_ParseFailedImpl) _then) +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); - - @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; +class _$DescriptorError_MultiPathImpl extends DescriptorError_MultiPath { + const _$DescriptorError_MultiPathImpl() : super._(); @override String toString() { - return 'ConsensusError.parseFailed(field0: $field0)'; + return 'DescriptorError.multiPath()'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$ConsensusError_ParseFailedImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$DescriptorError_MultiPathImpl); } @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); + int get hashCode => runtimeType.hashCode; @override @optionalTypeArgs TResult when({ - required TResult Function(String field0) io, - required TResult Function(BigInt requested, BigInt max) - oversizedVectorAllocation, - required TResult Function(U8Array4 expected, U8Array4 actual) - invalidChecksum, - required TResult Function() nonMinimalVarInt, - required TResult Function(String field0) parseFailed, - required TResult Function(int field0) unsupportedSegwitFlag, + required TResult Function() invalidHdKeyPath, + required TResult Function() missingPrivateData, + required TResult Function() invalidDescriptorChecksum, + required TResult Function() hardenedDerivationXpub, + required TResult Function() multiPath, + required TResult Function(String errorMessage) key, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) policy, + required TResult Function(String charector) invalidDescriptorCharacter, + required TResult Function(String errorMessage) bip32, + required TResult Function(String errorMessage) base58, + required TResult Function(String errorMessage) pk, + required TResult Function(String errorMessage) miniscript, + required TResult Function(String errorMessage) hex, + required TResult Function() externalAndInternalAreTheSame, }) { - return parseFailed(field0); + return multiPath(); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(String field0)? io, - TResult? Function(BigInt requested, BigInt max)? oversizedVectorAllocation, - TResult? Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, - TResult? Function()? nonMinimalVarInt, - TResult? Function(String field0)? parseFailed, - TResult? Function(int field0)? unsupportedSegwitFlag, + TResult? Function()? invalidHdKeyPath, + TResult? Function()? missingPrivateData, + TResult? Function()? invalidDescriptorChecksum, + TResult? Function()? hardenedDerivationXpub, + TResult? Function()? multiPath, + TResult? Function(String errorMessage)? key, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? policy, + TResult? Function(String charector)? invalidDescriptorCharacter, + TResult? Function(String errorMessage)? bip32, + TResult? Function(String errorMessage)? base58, + TResult? Function(String errorMessage)? pk, + TResult? Function(String errorMessage)? miniscript, + TResult? Function(String errorMessage)? hex, + TResult? Function()? externalAndInternalAreTheSame, }) { - return parseFailed?.call(field0); + return multiPath?.call(); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(String field0)? io, - TResult Function(BigInt requested, BigInt max)? oversizedVectorAllocation, - TResult Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, - TResult Function()? nonMinimalVarInt, - TResult Function(String field0)? parseFailed, - TResult Function(int field0)? unsupportedSegwitFlag, + TResult Function()? invalidHdKeyPath, + TResult Function()? missingPrivateData, + TResult Function()? invalidDescriptorChecksum, + TResult Function()? hardenedDerivationXpub, + TResult Function()? multiPath, + TResult Function(String errorMessage)? key, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? policy, + TResult Function(String charector)? invalidDescriptorCharacter, + TResult Function(String errorMessage)? bip32, + TResult Function(String errorMessage)? base58, + TResult Function(String errorMessage)? pk, + TResult Function(String errorMessage)? miniscript, + TResult Function(String errorMessage)? hex, + TResult Function()? externalAndInternalAreTheSame, required TResult orElse(), }) { - if (parseFailed != null) { - return parseFailed(field0); + if (multiPath != null) { + return multiPath(); } return orElse(); } @@ -25015,303 +15933,243 @@ class _$ConsensusError_ParseFailedImpl extends ConsensusError_ParseFailed { @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, + required TResult Function(DescriptorError_InvalidHdKeyPath value) + invalidHdKeyPath, + required TResult Function(DescriptorError_MissingPrivateData value) + missingPrivateData, + 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_Generic value) generic, + 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, + required TResult Function( + DescriptorError_ExternalAndInternalAreTheSame value) + externalAndInternalAreTheSame, }) { - return parseFailed(this); + return multiPath(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, + TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult? Function(DescriptorError_MissingPrivateData value)? + missingPrivateData, + 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_Generic value)? generic, + 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, + TResult? Function(DescriptorError_ExternalAndInternalAreTheSame value)? + externalAndInternalAreTheSame, }) { - return parseFailed?.call(this); + return multiPath?.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, + TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult Function(DescriptorError_MissingPrivateData value)? + missingPrivateData, + 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_Generic value)? generic, + 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, + TResult Function(DescriptorError_ExternalAndInternalAreTheSame value)? + externalAndInternalAreTheSame, required TResult orElse(), }) { - if (parseFailed != null) { - return parseFailed(this); + if (multiPath != null) { + return multiPath(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; +abstract class DescriptorError_MultiPath extends DescriptorError { + const factory DescriptorError_MultiPath() = _$DescriptorError_MultiPathImpl; + const DescriptorError_MultiPath._() : super._(); } /// @nodoc -abstract class _$$ConsensusError_UnsupportedSegwitFlagImplCopyWith<$Res> { - factory _$$ConsensusError_UnsupportedSegwitFlagImplCopyWith( - _$ConsensusError_UnsupportedSegwitFlagImpl value, - $Res Function(_$ConsensusError_UnsupportedSegwitFlagImpl) then) = - __$$ConsensusError_UnsupportedSegwitFlagImplCopyWithImpl<$Res>; +abstract class _$$DescriptorError_KeyImplCopyWith<$Res> { + factory _$$DescriptorError_KeyImplCopyWith(_$DescriptorError_KeyImpl value, + $Res Function(_$DescriptorError_KeyImpl) then) = + __$$DescriptorError_KeyImplCopyWithImpl<$Res>; @useResult - $Res call({int field0}); + $Res call({String errorMessage}); } /// @nodoc -class __$$ConsensusError_UnsupportedSegwitFlagImplCopyWithImpl<$Res> - extends _$ConsensusErrorCopyWithImpl<$Res, - _$ConsensusError_UnsupportedSegwitFlagImpl> - implements _$$ConsensusError_UnsupportedSegwitFlagImplCopyWith<$Res> { - __$$ConsensusError_UnsupportedSegwitFlagImplCopyWithImpl( - _$ConsensusError_UnsupportedSegwitFlagImpl _value, - $Res Function(_$ConsensusError_UnsupportedSegwitFlagImpl) _then) +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, + Object? errorMessage = null, }) { - return _then(_$ConsensusError_UnsupportedSegwitFlagImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as int, + return _then(_$DescriptorError_KeyImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, )); } } /// @nodoc -class _$ConsensusError_UnsupportedSegwitFlagImpl - extends ConsensusError_UnsupportedSegwitFlag { - const _$ConsensusError_UnsupportedSegwitFlagImpl(this.field0) : super._(); +class _$DescriptorError_KeyImpl extends DescriptorError_Key { + const _$DescriptorError_KeyImpl({required this.errorMessage}) : super._(); @override - final int field0; + final String errorMessage; @override String toString() { - return 'ConsensusError.unsupportedSegwitFlag(field0: $field0)'; + return 'DescriptorError.key(errorMessage: $errorMessage)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$ConsensusError_UnsupportedSegwitFlagImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$DescriptorError_KeyImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); } @override - int get hashCode => Object.hash(runtimeType, field0); + int get hashCode => Object.hash(runtimeType, errorMessage); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$ConsensusError_UnsupportedSegwitFlagImplCopyWith< - _$ConsensusError_UnsupportedSegwitFlagImpl> - get copyWith => __$$ConsensusError_UnsupportedSegwitFlagImplCopyWithImpl< - _$ConsensusError_UnsupportedSegwitFlagImpl>(this, _$identity); + _$$DescriptorError_KeyImplCopyWith<_$DescriptorError_KeyImpl> get copyWith => + __$$DescriptorError_KeyImplCopyWithImpl<_$DescriptorError_KeyImpl>( + this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(String field0) io, - required TResult Function(BigInt requested, BigInt max) - oversizedVectorAllocation, - required TResult Function(U8Array4 expected, U8Array4 actual) - invalidChecksum, - required TResult Function() nonMinimalVarInt, - required TResult Function(String field0) parseFailed, - required TResult Function(int field0) unsupportedSegwitFlag, + required TResult Function() invalidHdKeyPath, + required TResult Function() missingPrivateData, + required TResult Function() invalidDescriptorChecksum, + required TResult Function() hardenedDerivationXpub, + required TResult Function() multiPath, + required TResult Function(String errorMessage) key, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) policy, + required TResult Function(String charector) invalidDescriptorCharacter, + required TResult Function(String errorMessage) bip32, + required TResult Function(String errorMessage) base58, + required TResult Function(String errorMessage) pk, + required TResult Function(String errorMessage) miniscript, + required TResult Function(String errorMessage) hex, + required TResult Function() externalAndInternalAreTheSame, }) { - return unsupportedSegwitFlag(field0); + return key(errorMessage); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(String field0)? io, - TResult? Function(BigInt requested, BigInt max)? oversizedVectorAllocation, - TResult? Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, - TResult? Function()? nonMinimalVarInt, - TResult? Function(String field0)? parseFailed, - TResult? Function(int field0)? unsupportedSegwitFlag, + TResult? Function()? invalidHdKeyPath, + TResult? Function()? missingPrivateData, + TResult? Function()? invalidDescriptorChecksum, + TResult? Function()? hardenedDerivationXpub, + TResult? Function()? multiPath, + TResult? Function(String errorMessage)? key, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? policy, + TResult? Function(String charector)? invalidDescriptorCharacter, + TResult? Function(String errorMessage)? bip32, + TResult? Function(String errorMessage)? base58, + TResult? Function(String errorMessage)? pk, + TResult? Function(String errorMessage)? miniscript, + TResult? Function(String errorMessage)? hex, + TResult? Function()? externalAndInternalAreTheSame, }) { - return unsupportedSegwitFlag?.call(field0); + return key?.call(errorMessage); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(String field0)? io, - TResult Function(BigInt requested, BigInt max)? oversizedVectorAllocation, - TResult Function(U8Array4 expected, U8Array4 actual)? invalidChecksum, - TResult Function()? nonMinimalVarInt, - TResult Function(String field0)? parseFailed, - TResult Function(int field0)? unsupportedSegwitFlag, + TResult Function()? invalidHdKeyPath, + TResult Function()? missingPrivateData, + TResult Function()? invalidDescriptorChecksum, + TResult Function()? hardenedDerivationXpub, + TResult Function()? multiPath, + TResult Function(String errorMessage)? key, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? policy, + TResult Function(String charector)? invalidDescriptorCharacter, + TResult Function(String errorMessage)? bip32, + TResult Function(String errorMessage)? base58, + TResult Function(String errorMessage)? pk, + TResult Function(String errorMessage)? miniscript, + TResult Function(String errorMessage)? hex, + TResult Function()? externalAndInternalAreTheSame, required TResult orElse(), }) { - if (unsupportedSegwitFlag != null) { - return unsupportedSegwitFlag(field0); + if (key != null) { + return key(errorMessage); } 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_MissingPrivateData value) + missingPrivateData, 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_Generic value) generic, required TResult Function(DescriptorError_Policy value) policy, required TResult Function(DescriptorError_InvalidDescriptorCharacter value) invalidDescriptorCharacter, @@ -25320,17 +16178,26 @@ mixin _$DescriptorError { required TResult Function(DescriptorError_Pk value) pk, required TResult Function(DescriptorError_Miniscript value) miniscript, required TResult Function(DescriptorError_Hex value) hex, - }) => - throw _privateConstructorUsedError; + required TResult Function( + DescriptorError_ExternalAndInternalAreTheSame value) + externalAndInternalAreTheSame, + }) { + return key(this); + } + + @override @optionalTypeArgs TResult? mapOrNull({ TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult? Function(DescriptorError_MissingPrivateData value)? + missingPrivateData, 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_Generic value)? generic, TResult? Function(DescriptorError_Policy value)? policy, TResult? Function(DescriptorError_InvalidDescriptorCharacter value)? invalidDescriptorCharacter, @@ -25339,17 +16206,25 @@ mixin _$DescriptorError { TResult? Function(DescriptorError_Pk value)? pk, TResult? Function(DescriptorError_Miniscript value)? miniscript, TResult? Function(DescriptorError_Hex value)? hex, - }) => - throw _privateConstructorUsedError; + TResult? Function(DescriptorError_ExternalAndInternalAreTheSame value)? + externalAndInternalAreTheSame, + }) { + return key?.call(this); + } + + @override @optionalTypeArgs TResult maybeMap({ TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult Function(DescriptorError_MissingPrivateData value)? + missingPrivateData, 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_Generic value)? generic, TResult Function(DescriptorError_Policy value)? policy, TResult Function(DescriptorError_InvalidDescriptorCharacter value)? invalidDescriptorCharacter, @@ -25358,126 +16233,159 @@ mixin _$DescriptorError { TResult Function(DescriptorError_Pk value)? pk, TResult Function(DescriptorError_Miniscript value)? miniscript, TResult Function(DescriptorError_Hex value)? hex, + TResult Function(DescriptorError_ExternalAndInternalAreTheSame value)? + externalAndInternalAreTheSame, required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $DescriptorErrorCopyWith<$Res> { - factory $DescriptorErrorCopyWith( - DescriptorError value, $Res Function(DescriptorError) then) = - _$DescriptorErrorCopyWithImpl<$Res, DescriptorError>; + }) { + if (key != null) { + return key(this); + } + return orElse(); + } } -/// @nodoc -class _$DescriptorErrorCopyWithImpl<$Res, $Val extends DescriptorError> - implements $DescriptorErrorCopyWith<$Res> { - _$DescriptorErrorCopyWithImpl(this._value, this._then); +abstract class DescriptorError_Key extends DescriptorError { + const factory DescriptorError_Key({required final String errorMessage}) = + _$DescriptorError_KeyImpl; + const DescriptorError_Key._() : super._(); - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + String get errorMessage; + @JsonKey(ignore: true) + _$$DescriptorError_KeyImplCopyWith<_$DescriptorError_KeyImpl> get copyWith => + throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$DescriptorError_InvalidHdKeyPathImplCopyWith<$Res> { - factory _$$DescriptorError_InvalidHdKeyPathImplCopyWith( - _$DescriptorError_InvalidHdKeyPathImpl value, - $Res Function(_$DescriptorError_InvalidHdKeyPathImpl) then) = - __$$DescriptorError_InvalidHdKeyPathImplCopyWithImpl<$Res>; +abstract class _$$DescriptorError_GenericImplCopyWith<$Res> { + factory _$$DescriptorError_GenericImplCopyWith( + _$DescriptorError_GenericImpl value, + $Res Function(_$DescriptorError_GenericImpl) then) = + __$$DescriptorError_GenericImplCopyWithImpl<$Res>; + @useResult + $Res call({String errorMessage}); } /// @nodoc -class __$$DescriptorError_InvalidHdKeyPathImplCopyWithImpl<$Res> - extends _$DescriptorErrorCopyWithImpl<$Res, - _$DescriptorError_InvalidHdKeyPathImpl> - implements _$$DescriptorError_InvalidHdKeyPathImplCopyWith<$Res> { - __$$DescriptorError_InvalidHdKeyPathImplCopyWithImpl( - _$DescriptorError_InvalidHdKeyPathImpl _value, - $Res Function(_$DescriptorError_InvalidHdKeyPathImpl) _then) +class __$$DescriptorError_GenericImplCopyWithImpl<$Res> + extends _$DescriptorErrorCopyWithImpl<$Res, _$DescriptorError_GenericImpl> + implements _$$DescriptorError_GenericImplCopyWith<$Res> { + __$$DescriptorError_GenericImplCopyWithImpl( + _$DescriptorError_GenericImpl _value, + $Res Function(_$DescriptorError_GenericImpl) _then) : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? errorMessage = null, + }) { + return _then(_$DescriptorError_GenericImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } } /// @nodoc -class _$DescriptorError_InvalidHdKeyPathImpl - extends DescriptorError_InvalidHdKeyPath { - const _$DescriptorError_InvalidHdKeyPathImpl() : super._(); +class _$DescriptorError_GenericImpl extends DescriptorError_Generic { + const _$DescriptorError_GenericImpl({required this.errorMessage}) : super._(); + + @override + final String errorMessage; @override String toString() { - return 'DescriptorError.invalidHdKeyPath()'; + return 'DescriptorError.generic(errorMessage: $errorMessage)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$DescriptorError_InvalidHdKeyPathImpl); + other is _$DescriptorError_GenericImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); } @override - int get hashCode => runtimeType.hashCode; + int get hashCode => Object.hash(runtimeType, errorMessage); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$DescriptorError_GenericImplCopyWith<_$DescriptorError_GenericImpl> + get copyWith => __$$DescriptorError_GenericImplCopyWithImpl< + _$DescriptorError_GenericImpl>(this, _$identity); @override @optionalTypeArgs TResult when({ required TResult Function() invalidHdKeyPath, + required TResult Function() missingPrivateData, 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, + required TResult Function(String errorMessage) key, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) policy, + required TResult Function(String charector) invalidDescriptorCharacter, + required TResult Function(String errorMessage) bip32, + required TResult Function(String errorMessage) base58, + required TResult Function(String errorMessage) pk, + required TResult Function(String errorMessage) miniscript, + required TResult Function(String errorMessage) hex, + required TResult Function() externalAndInternalAreTheSame, }) { - return invalidHdKeyPath(); + return generic(errorMessage); } @override @optionalTypeArgs TResult? whenOrNull({ TResult? Function()? invalidHdKeyPath, + TResult? Function()? missingPrivateData, 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, + TResult? Function(String errorMessage)? key, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? policy, + TResult? Function(String charector)? invalidDescriptorCharacter, + TResult? Function(String errorMessage)? bip32, + TResult? Function(String errorMessage)? base58, + TResult? Function(String errorMessage)? pk, + TResult? Function(String errorMessage)? miniscript, + TResult? Function(String errorMessage)? hex, + TResult? Function()? externalAndInternalAreTheSame, }) { - return invalidHdKeyPath?.call(); + return generic?.call(errorMessage); } @override @optionalTypeArgs TResult maybeWhen({ TResult Function()? invalidHdKeyPath, + TResult Function()? missingPrivateData, 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, + TResult Function(String errorMessage)? key, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? policy, + TResult Function(String charector)? invalidDescriptorCharacter, + TResult Function(String errorMessage)? bip32, + TResult Function(String errorMessage)? base58, + TResult Function(String errorMessage)? pk, + TResult Function(String errorMessage)? miniscript, + TResult Function(String errorMessage)? hex, + TResult Function()? externalAndInternalAreTheSame, required TResult orElse(), }) { - if (invalidHdKeyPath != null) { - return invalidHdKeyPath(); + if (generic != null) { + return generic(errorMessage); } return orElse(); } @@ -25487,12 +16395,15 @@ class _$DescriptorError_InvalidHdKeyPathImpl TResult map({ required TResult Function(DescriptorError_InvalidHdKeyPath value) invalidHdKeyPath, + required TResult Function(DescriptorError_MissingPrivateData value) + missingPrivateData, 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_Generic value) generic, required TResult Function(DescriptorError_Policy value) policy, required TResult Function(DescriptorError_InvalidDescriptorCharacter value) invalidDescriptorCharacter, @@ -25501,20 +16412,26 @@ class _$DescriptorError_InvalidHdKeyPathImpl required TResult Function(DescriptorError_Pk value) pk, required TResult Function(DescriptorError_Miniscript value) miniscript, required TResult Function(DescriptorError_Hex value) hex, + required TResult Function( + DescriptorError_ExternalAndInternalAreTheSame value) + externalAndInternalAreTheSame, }) { - return invalidHdKeyPath(this); + return generic(this); } @override @optionalTypeArgs TResult? mapOrNull({ TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult? Function(DescriptorError_MissingPrivateData value)? + missingPrivateData, 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_Generic value)? generic, TResult? Function(DescriptorError_Policy value)? policy, TResult? Function(DescriptorError_InvalidDescriptorCharacter value)? invalidDescriptorCharacter, @@ -25523,20 +16440,25 @@ class _$DescriptorError_InvalidHdKeyPathImpl TResult? Function(DescriptorError_Pk value)? pk, TResult? Function(DescriptorError_Miniscript value)? miniscript, TResult? Function(DescriptorError_Hex value)? hex, + TResult? Function(DescriptorError_ExternalAndInternalAreTheSame value)? + externalAndInternalAreTheSame, }) { - return invalidHdKeyPath?.call(this); + return generic?.call(this); } @override @optionalTypeArgs TResult maybeMap({ TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult Function(DescriptorError_MissingPrivateData value)? + missingPrivateData, 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_Generic value)? generic, TResult Function(DescriptorError_Policy value)? policy, TResult Function(DescriptorError_InvalidDescriptorCharacter value)? invalidDescriptorCharacter, @@ -25545,118 +16467,159 @@ class _$DescriptorError_InvalidHdKeyPathImpl TResult Function(DescriptorError_Pk value)? pk, TResult Function(DescriptorError_Miniscript value)? miniscript, TResult Function(DescriptorError_Hex value)? hex, + TResult Function(DescriptorError_ExternalAndInternalAreTheSame value)? + externalAndInternalAreTheSame, required TResult orElse(), }) { - if (invalidHdKeyPath != null) { - return invalidHdKeyPath(this); + if (generic != null) { + return generic(this); } return orElse(); } } -abstract class DescriptorError_InvalidHdKeyPath extends DescriptorError { - const factory DescriptorError_InvalidHdKeyPath() = - _$DescriptorError_InvalidHdKeyPathImpl; - const DescriptorError_InvalidHdKeyPath._() : super._(); -} +abstract class DescriptorError_Generic extends DescriptorError { + const factory DescriptorError_Generic({required final String errorMessage}) = + _$DescriptorError_GenericImpl; + const DescriptorError_Generic._() : super._(); -/// @nodoc -abstract class _$$DescriptorError_InvalidDescriptorChecksumImplCopyWith<$Res> { - factory _$$DescriptorError_InvalidDescriptorChecksumImplCopyWith( - _$DescriptorError_InvalidDescriptorChecksumImpl value, - $Res Function(_$DescriptorError_InvalidDescriptorChecksumImpl) then) = - __$$DescriptorError_InvalidDescriptorChecksumImplCopyWithImpl<$Res>; + String get errorMessage; + @JsonKey(ignore: true) + _$$DescriptorError_GenericImplCopyWith<_$DescriptorError_GenericImpl> + get copyWith => throw _privateConstructorUsedError; } /// @nodoc -class __$$DescriptorError_InvalidDescriptorChecksumImplCopyWithImpl<$Res> - extends _$DescriptorErrorCopyWithImpl<$Res, - _$DescriptorError_InvalidDescriptorChecksumImpl> - implements _$$DescriptorError_InvalidDescriptorChecksumImplCopyWith<$Res> { - __$$DescriptorError_InvalidDescriptorChecksumImplCopyWithImpl( - _$DescriptorError_InvalidDescriptorChecksumImpl _value, - $Res Function(_$DescriptorError_InvalidDescriptorChecksumImpl) _then) +abstract class _$$DescriptorError_PolicyImplCopyWith<$Res> { + factory _$$DescriptorError_PolicyImplCopyWith( + _$DescriptorError_PolicyImpl value, + $Res Function(_$DescriptorError_PolicyImpl) then) = + __$$DescriptorError_PolicyImplCopyWithImpl<$Res>; + @useResult + $Res call({String errorMessage}); +} + +/// @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? errorMessage = null, + }) { + return _then(_$DescriptorError_PolicyImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } } /// @nodoc -class _$DescriptorError_InvalidDescriptorChecksumImpl - extends DescriptorError_InvalidDescriptorChecksum { - const _$DescriptorError_InvalidDescriptorChecksumImpl() : super._(); +class _$DescriptorError_PolicyImpl extends DescriptorError_Policy { + const _$DescriptorError_PolicyImpl({required this.errorMessage}) : super._(); + + @override + final String errorMessage; @override String toString() { - return 'DescriptorError.invalidDescriptorChecksum()'; + return 'DescriptorError.policy(errorMessage: $errorMessage)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$DescriptorError_InvalidDescriptorChecksumImpl); + other is _$DescriptorError_PolicyImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); } @override - int get hashCode => runtimeType.hashCode; + int get hashCode => Object.hash(runtimeType, errorMessage); + + @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() missingPrivateData, 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, + required TResult Function(String errorMessage) key, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) policy, + required TResult Function(String charector) invalidDescriptorCharacter, + required TResult Function(String errorMessage) bip32, + required TResult Function(String errorMessage) base58, + required TResult Function(String errorMessage) pk, + required TResult Function(String errorMessage) miniscript, + required TResult Function(String errorMessage) hex, + required TResult Function() externalAndInternalAreTheSame, }) { - return invalidDescriptorChecksum(); + return policy(errorMessage); } @override @optionalTypeArgs TResult? whenOrNull({ TResult? Function()? invalidHdKeyPath, + TResult? Function()? missingPrivateData, 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, + TResult? Function(String errorMessage)? key, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? policy, + TResult? Function(String charector)? invalidDescriptorCharacter, + TResult? Function(String errorMessage)? bip32, + TResult? Function(String errorMessage)? base58, + TResult? Function(String errorMessage)? pk, + TResult? Function(String errorMessage)? miniscript, + TResult? Function(String errorMessage)? hex, + TResult? Function()? externalAndInternalAreTheSame, }) { - return invalidDescriptorChecksum?.call(); + return policy?.call(errorMessage); } @override @optionalTypeArgs TResult maybeWhen({ TResult Function()? invalidHdKeyPath, + TResult Function()? missingPrivateData, 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, + TResult Function(String errorMessage)? key, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? policy, + TResult Function(String charector)? invalidDescriptorCharacter, + TResult Function(String errorMessage)? bip32, + TResult Function(String errorMessage)? base58, + TResult Function(String errorMessage)? pk, + TResult Function(String errorMessage)? miniscript, + TResult Function(String errorMessage)? hex, + TResult Function()? externalAndInternalAreTheSame, required TResult orElse(), }) { - if (invalidDescriptorChecksum != null) { - return invalidDescriptorChecksum(); + if (policy != null) { + return policy(errorMessage); } return orElse(); } @@ -25666,12 +16629,15 @@ class _$DescriptorError_InvalidDescriptorChecksumImpl TResult map({ required TResult Function(DescriptorError_InvalidHdKeyPath value) invalidHdKeyPath, + required TResult Function(DescriptorError_MissingPrivateData value) + missingPrivateData, 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_Generic value) generic, required TResult Function(DescriptorError_Policy value) policy, required TResult Function(DescriptorError_InvalidDescriptorCharacter value) invalidDescriptorCharacter, @@ -25680,20 +16646,26 @@ class _$DescriptorError_InvalidDescriptorChecksumImpl required TResult Function(DescriptorError_Pk value) pk, required TResult Function(DescriptorError_Miniscript value) miniscript, required TResult Function(DescriptorError_Hex value) hex, + required TResult Function( + DescriptorError_ExternalAndInternalAreTheSame value) + externalAndInternalAreTheSame, }) { - return invalidDescriptorChecksum(this); + return policy(this); } @override @optionalTypeArgs TResult? mapOrNull({ TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult? Function(DescriptorError_MissingPrivateData value)? + missingPrivateData, 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_Generic value)? generic, TResult? Function(DescriptorError_Policy value)? policy, TResult? Function(DescriptorError_InvalidDescriptorCharacter value)? invalidDescriptorCharacter, @@ -25702,20 +16674,25 @@ class _$DescriptorError_InvalidDescriptorChecksumImpl TResult? Function(DescriptorError_Pk value)? pk, TResult? Function(DescriptorError_Miniscript value)? miniscript, TResult? Function(DescriptorError_Hex value)? hex, + TResult? Function(DescriptorError_ExternalAndInternalAreTheSame value)? + externalAndInternalAreTheSame, }) { - return invalidDescriptorChecksum?.call(this); + return policy?.call(this); } @override @optionalTypeArgs TResult maybeMap({ TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult Function(DescriptorError_MissingPrivateData value)? + missingPrivateData, 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_Generic value)? generic, TResult Function(DescriptorError_Policy value)? policy, TResult Function(DescriptorError_InvalidDescriptorCharacter value)? invalidDescriptorCharacter, @@ -25724,119 +16701,167 @@ class _$DescriptorError_InvalidDescriptorChecksumImpl TResult Function(DescriptorError_Pk value)? pk, TResult Function(DescriptorError_Miniscript value)? miniscript, TResult Function(DescriptorError_Hex value)? hex, + TResult Function(DescriptorError_ExternalAndInternalAreTheSame value)? + externalAndInternalAreTheSame, required TResult orElse(), }) { - if (invalidDescriptorChecksum != null) { - return invalidDescriptorChecksum(this); + if (policy != null) { + return policy(this); } return orElse(); } } -abstract class DescriptorError_InvalidDescriptorChecksum - extends DescriptorError { - const factory DescriptorError_InvalidDescriptorChecksum() = - _$DescriptorError_InvalidDescriptorChecksumImpl; - const DescriptorError_InvalidDescriptorChecksum._() : super._(); +abstract class DescriptorError_Policy extends DescriptorError { + const factory DescriptorError_Policy({required final String errorMessage}) = + _$DescriptorError_PolicyImpl; + const DescriptorError_Policy._() : super._(); + + String get errorMessage; + @JsonKey(ignore: true) + _$$DescriptorError_PolicyImplCopyWith<_$DescriptorError_PolicyImpl> + get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$DescriptorError_HardenedDerivationXpubImplCopyWith<$Res> { - factory _$$DescriptorError_HardenedDerivationXpubImplCopyWith( - _$DescriptorError_HardenedDerivationXpubImpl value, - $Res Function(_$DescriptorError_HardenedDerivationXpubImpl) then) = - __$$DescriptorError_HardenedDerivationXpubImplCopyWithImpl<$Res>; +abstract class _$$DescriptorError_InvalidDescriptorCharacterImplCopyWith<$Res> { + factory _$$DescriptorError_InvalidDescriptorCharacterImplCopyWith( + _$DescriptorError_InvalidDescriptorCharacterImpl value, + $Res Function(_$DescriptorError_InvalidDescriptorCharacterImpl) + then) = + __$$DescriptorError_InvalidDescriptorCharacterImplCopyWithImpl<$Res>; + @useResult + $Res call({String charector}); } /// @nodoc -class __$$DescriptorError_HardenedDerivationXpubImplCopyWithImpl<$Res> +class __$$DescriptorError_InvalidDescriptorCharacterImplCopyWithImpl<$Res> extends _$DescriptorErrorCopyWithImpl<$Res, - _$DescriptorError_HardenedDerivationXpubImpl> - implements _$$DescriptorError_HardenedDerivationXpubImplCopyWith<$Res> { - __$$DescriptorError_HardenedDerivationXpubImplCopyWithImpl( - _$DescriptorError_HardenedDerivationXpubImpl _value, - $Res Function(_$DescriptorError_HardenedDerivationXpubImpl) _then) + _$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? charector = null, + }) { + return _then(_$DescriptorError_InvalidDescriptorCharacterImpl( + charector: null == charector + ? _value.charector + : charector // ignore: cast_nullable_to_non_nullable + as String, + )); + } } /// @nodoc -class _$DescriptorError_HardenedDerivationXpubImpl - extends DescriptorError_HardenedDerivationXpub { - const _$DescriptorError_HardenedDerivationXpubImpl() : super._(); +class _$DescriptorError_InvalidDescriptorCharacterImpl + extends DescriptorError_InvalidDescriptorCharacter { + const _$DescriptorError_InvalidDescriptorCharacterImpl( + {required this.charector}) + : super._(); + + @override + final String charector; @override String toString() { - return 'DescriptorError.hardenedDerivationXpub()'; + return 'DescriptorError.invalidDescriptorCharacter(charector: $charector)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$DescriptorError_HardenedDerivationXpubImpl); + other is _$DescriptorError_InvalidDescriptorCharacterImpl && + (identical(other.charector, charector) || + other.charector == charector)); } @override - int get hashCode => runtimeType.hashCode; + int get hashCode => Object.hash(runtimeType, charector); + + @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() missingPrivateData, 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, + required TResult Function(String errorMessage) key, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) policy, + required TResult Function(String charector) invalidDescriptorCharacter, + required TResult Function(String errorMessage) bip32, + required TResult Function(String errorMessage) base58, + required TResult Function(String errorMessage) pk, + required TResult Function(String errorMessage) miniscript, + required TResult Function(String errorMessage) hex, + required TResult Function() externalAndInternalAreTheSame, }) { - return hardenedDerivationXpub(); + return invalidDescriptorCharacter(charector); } @override @optionalTypeArgs TResult? whenOrNull({ TResult? Function()? invalidHdKeyPath, + TResult? Function()? missingPrivateData, 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, + TResult? Function(String errorMessage)? key, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? policy, + TResult? Function(String charector)? invalidDescriptorCharacter, + TResult? Function(String errorMessage)? bip32, + TResult? Function(String errorMessage)? base58, + TResult? Function(String errorMessage)? pk, + TResult? Function(String errorMessage)? miniscript, + TResult? Function(String errorMessage)? hex, + TResult? Function()? externalAndInternalAreTheSame, }) { - return hardenedDerivationXpub?.call(); + return invalidDescriptorCharacter?.call(charector); } @override @optionalTypeArgs TResult maybeWhen({ TResult Function()? invalidHdKeyPath, + TResult Function()? missingPrivateData, 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, + TResult Function(String errorMessage)? key, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? policy, + TResult Function(String charector)? invalidDescriptorCharacter, + TResult Function(String errorMessage)? bip32, + TResult Function(String errorMessage)? base58, + TResult Function(String errorMessage)? pk, + TResult Function(String errorMessage)? miniscript, + TResult Function(String errorMessage)? hex, + TResult Function()? externalAndInternalAreTheSame, required TResult orElse(), }) { - if (hardenedDerivationXpub != null) { - return hardenedDerivationXpub(); + if (invalidDescriptorCharacter != null) { + return invalidDescriptorCharacter(charector); } return orElse(); } @@ -25846,12 +16871,15 @@ class _$DescriptorError_HardenedDerivationXpubImpl TResult map({ required TResult Function(DescriptorError_InvalidHdKeyPath value) invalidHdKeyPath, + required TResult Function(DescriptorError_MissingPrivateData value) + missingPrivateData, 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_Generic value) generic, required TResult Function(DescriptorError_Policy value) policy, required TResult Function(DescriptorError_InvalidDescriptorCharacter value) invalidDescriptorCharacter, @@ -25860,20 +16888,26 @@ class _$DescriptorError_HardenedDerivationXpubImpl required TResult Function(DescriptorError_Pk value) pk, required TResult Function(DescriptorError_Miniscript value) miniscript, required TResult Function(DescriptorError_Hex value) hex, + required TResult Function( + DescriptorError_ExternalAndInternalAreTheSame value) + externalAndInternalAreTheSame, }) { - return hardenedDerivationXpub(this); + return invalidDescriptorCharacter(this); } @override @optionalTypeArgs TResult? mapOrNull({ TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult? Function(DescriptorError_MissingPrivateData value)? + missingPrivateData, 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_Generic value)? generic, TResult? Function(DescriptorError_Policy value)? policy, TResult? Function(DescriptorError_InvalidDescriptorCharacter value)? invalidDescriptorCharacter, @@ -25882,20 +16916,25 @@ class _$DescriptorError_HardenedDerivationXpubImpl TResult? Function(DescriptorError_Pk value)? pk, TResult? Function(DescriptorError_Miniscript value)? miniscript, TResult? Function(DescriptorError_Hex value)? hex, + TResult? Function(DescriptorError_ExternalAndInternalAreTheSame value)? + externalAndInternalAreTheSame, }) { - return hardenedDerivationXpub?.call(this); + return invalidDescriptorCharacter?.call(this); } @override @optionalTypeArgs TResult maybeMap({ TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult Function(DescriptorError_MissingPrivateData value)? + missingPrivateData, 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_Generic value)? generic, TResult Function(DescriptorError_Policy value)? policy, TResult Function(DescriptorError_InvalidDescriptorCharacter value)? invalidDescriptorCharacter, @@ -25904,116 +16943,161 @@ class _$DescriptorError_HardenedDerivationXpubImpl TResult Function(DescriptorError_Pk value)? pk, TResult Function(DescriptorError_Miniscript value)? miniscript, TResult Function(DescriptorError_Hex value)? hex, + TResult Function(DescriptorError_ExternalAndInternalAreTheSame value)? + externalAndInternalAreTheSame, required TResult orElse(), }) { - if (hardenedDerivationXpub != null) { - return hardenedDerivationXpub(this); + if (invalidDescriptorCharacter != null) { + return invalidDescriptorCharacter(this); } return orElse(); } } -abstract class DescriptorError_HardenedDerivationXpub extends DescriptorError { - const factory DescriptorError_HardenedDerivationXpub() = - _$DescriptorError_HardenedDerivationXpubImpl; - const DescriptorError_HardenedDerivationXpub._() : super._(); +abstract class DescriptorError_InvalidDescriptorCharacter + extends DescriptorError { + const factory DescriptorError_InvalidDescriptorCharacter( + {required final String charector}) = + _$DescriptorError_InvalidDescriptorCharacterImpl; + const DescriptorError_InvalidDescriptorCharacter._() : super._(); + + String get charector; + @JsonKey(ignore: true) + _$$DescriptorError_InvalidDescriptorCharacterImplCopyWith< + _$DescriptorError_InvalidDescriptorCharacterImpl> + get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$DescriptorError_MultiPathImplCopyWith<$Res> { - factory _$$DescriptorError_MultiPathImplCopyWith( - _$DescriptorError_MultiPathImpl value, - $Res Function(_$DescriptorError_MultiPathImpl) then) = - __$$DescriptorError_MultiPathImplCopyWithImpl<$Res>; +abstract class _$$DescriptorError_Bip32ImplCopyWith<$Res> { + factory _$$DescriptorError_Bip32ImplCopyWith( + _$DescriptorError_Bip32Impl value, + $Res Function(_$DescriptorError_Bip32Impl) then) = + __$$DescriptorError_Bip32ImplCopyWithImpl<$Res>; + @useResult + $Res call({String errorMessage}); } /// @nodoc -class __$$DescriptorError_MultiPathImplCopyWithImpl<$Res> - extends _$DescriptorErrorCopyWithImpl<$Res, _$DescriptorError_MultiPathImpl> - implements _$$DescriptorError_MultiPathImplCopyWith<$Res> { - __$$DescriptorError_MultiPathImplCopyWithImpl( - _$DescriptorError_MultiPathImpl _value, - $Res Function(_$DescriptorError_MultiPathImpl) _then) +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? errorMessage = null, + }) { + return _then(_$DescriptorError_Bip32Impl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } } /// @nodoc -class _$DescriptorError_MultiPathImpl extends DescriptorError_MultiPath { - const _$DescriptorError_MultiPathImpl() : super._(); +class _$DescriptorError_Bip32Impl extends DescriptorError_Bip32 { + const _$DescriptorError_Bip32Impl({required this.errorMessage}) : super._(); + + @override + final String errorMessage; @override String toString() { - return 'DescriptorError.multiPath()'; + return 'DescriptorError.bip32(errorMessage: $errorMessage)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$DescriptorError_MultiPathImpl); + other is _$DescriptorError_Bip32Impl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); } @override - int get hashCode => runtimeType.hashCode; + int get hashCode => Object.hash(runtimeType, errorMessage); + + @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() missingPrivateData, 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, + required TResult Function(String errorMessage) key, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) policy, + required TResult Function(String charector) invalidDescriptorCharacter, + required TResult Function(String errorMessage) bip32, + required TResult Function(String errorMessage) base58, + required TResult Function(String errorMessage) pk, + required TResult Function(String errorMessage) miniscript, + required TResult Function(String errorMessage) hex, + required TResult Function() externalAndInternalAreTheSame, }) { - return multiPath(); + return bip32(errorMessage); } @override @optionalTypeArgs TResult? whenOrNull({ TResult? Function()? invalidHdKeyPath, + TResult? Function()? missingPrivateData, 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, + TResult? Function(String errorMessage)? key, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? policy, + TResult? Function(String charector)? invalidDescriptorCharacter, + TResult? Function(String errorMessage)? bip32, + TResult? Function(String errorMessage)? base58, + TResult? Function(String errorMessage)? pk, + TResult? Function(String errorMessage)? miniscript, + TResult? Function(String errorMessage)? hex, + TResult? Function()? externalAndInternalAreTheSame, }) { - return multiPath?.call(); + return bip32?.call(errorMessage); } @override @optionalTypeArgs TResult maybeWhen({ TResult Function()? invalidHdKeyPath, + TResult Function()? missingPrivateData, 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, + TResult Function(String errorMessage)? key, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? policy, + TResult Function(String charector)? invalidDescriptorCharacter, + TResult Function(String errorMessage)? bip32, + TResult Function(String errorMessage)? base58, + TResult Function(String errorMessage)? pk, + TResult Function(String errorMessage)? miniscript, + TResult Function(String errorMessage)? hex, + TResult Function()? externalAndInternalAreTheSame, required TResult orElse(), }) { - if (multiPath != null) { - return multiPath(); + if (bip32 != null) { + return bip32(errorMessage); } return orElse(); } @@ -26023,12 +17107,15 @@ class _$DescriptorError_MultiPathImpl extends DescriptorError_MultiPath { TResult map({ required TResult Function(DescriptorError_InvalidHdKeyPath value) invalidHdKeyPath, + required TResult Function(DescriptorError_MissingPrivateData value) + missingPrivateData, 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_Generic value) generic, required TResult Function(DescriptorError_Policy value) policy, required TResult Function(DescriptorError_InvalidDescriptorCharacter value) invalidDescriptorCharacter, @@ -26037,20 +17124,26 @@ class _$DescriptorError_MultiPathImpl extends DescriptorError_MultiPath { required TResult Function(DescriptorError_Pk value) pk, required TResult Function(DescriptorError_Miniscript value) miniscript, required TResult Function(DescriptorError_Hex value) hex, + required TResult Function( + DescriptorError_ExternalAndInternalAreTheSame value) + externalAndInternalAreTheSame, }) { - return multiPath(this); + return bip32(this); } @override @optionalTypeArgs TResult? mapOrNull({ TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult? Function(DescriptorError_MissingPrivateData value)? + missingPrivateData, 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_Generic value)? generic, TResult? Function(DescriptorError_Policy value)? policy, TResult? Function(DescriptorError_InvalidDescriptorCharacter value)? invalidDescriptorCharacter, @@ -26059,20 +17152,25 @@ class _$DescriptorError_MultiPathImpl extends DescriptorError_MultiPath { TResult? Function(DescriptorError_Pk value)? pk, TResult? Function(DescriptorError_Miniscript value)? miniscript, TResult? Function(DescriptorError_Hex value)? hex, + TResult? Function(DescriptorError_ExternalAndInternalAreTheSame value)? + externalAndInternalAreTheSame, }) { - return multiPath?.call(this); + return bip32?.call(this); } @override @optionalTypeArgs TResult maybeMap({ TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult Function(DescriptorError_MissingPrivateData value)? + missingPrivateData, 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_Generic value)? generic, TResult Function(DescriptorError_Policy value)? policy, TResult Function(DescriptorError_InvalidDescriptorCharacter value)? invalidDescriptorCharacter, @@ -26081,46 +17179,56 @@ class _$DescriptorError_MultiPathImpl extends DescriptorError_MultiPath { TResult Function(DescriptorError_Pk value)? pk, TResult Function(DescriptorError_Miniscript value)? miniscript, TResult Function(DescriptorError_Hex value)? hex, + TResult Function(DescriptorError_ExternalAndInternalAreTheSame value)? + externalAndInternalAreTheSame, required TResult orElse(), }) { - if (multiPath != null) { - return multiPath(this); + if (bip32 != null) { + return bip32(this); } return orElse(); } } -abstract class DescriptorError_MultiPath extends DescriptorError { - const factory DescriptorError_MultiPath() = _$DescriptorError_MultiPathImpl; - const DescriptorError_MultiPath._() : super._(); +abstract class DescriptorError_Bip32 extends DescriptorError { + const factory DescriptorError_Bip32({required final String errorMessage}) = + _$DescriptorError_Bip32Impl; + const DescriptorError_Bip32._() : super._(); + + String get errorMessage; + @JsonKey(ignore: true) + _$$DescriptorError_Bip32ImplCopyWith<_$DescriptorError_Bip32Impl> + get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$DescriptorError_KeyImplCopyWith<$Res> { - factory _$$DescriptorError_KeyImplCopyWith(_$DescriptorError_KeyImpl value, - $Res Function(_$DescriptorError_KeyImpl) then) = - __$$DescriptorError_KeyImplCopyWithImpl<$Res>; +abstract class _$$DescriptorError_Base58ImplCopyWith<$Res> { + factory _$$DescriptorError_Base58ImplCopyWith( + _$DescriptorError_Base58Impl value, + $Res Function(_$DescriptorError_Base58Impl) then) = + __$$DescriptorError_Base58ImplCopyWithImpl<$Res>; @useResult - $Res call({String field0}); + $Res call({String errorMessage}); } /// @nodoc -class __$$DescriptorError_KeyImplCopyWithImpl<$Res> - extends _$DescriptorErrorCopyWithImpl<$Res, _$DescriptorError_KeyImpl> - implements _$$DescriptorError_KeyImplCopyWith<$Res> { - __$$DescriptorError_KeyImplCopyWithImpl(_$DescriptorError_KeyImpl _value, - $Res Function(_$DescriptorError_KeyImpl) _then) +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, + Object? errorMessage = null, }) { - return _then(_$DescriptorError_KeyImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable + return _then(_$DescriptorError_Base58Impl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable as String, )); } @@ -26128,92 +17236,102 @@ class __$$DescriptorError_KeyImplCopyWithImpl<$Res> /// @nodoc -class _$DescriptorError_KeyImpl extends DescriptorError_Key { - const _$DescriptorError_KeyImpl(this.field0) : super._(); +class _$DescriptorError_Base58Impl extends DescriptorError_Base58 { + const _$DescriptorError_Base58Impl({required this.errorMessage}) : super._(); @override - final String field0; + final String errorMessage; @override String toString() { - return 'DescriptorError.key(field0: $field0)'; + return 'DescriptorError.base58(errorMessage: $errorMessage)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$DescriptorError_KeyImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$DescriptorError_Base58Impl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); } @override - int get hashCode => Object.hash(runtimeType, field0); + int get hashCode => Object.hash(runtimeType, errorMessage); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$DescriptorError_KeyImplCopyWith<_$DescriptorError_KeyImpl> get copyWith => - __$$DescriptorError_KeyImplCopyWithImpl<_$DescriptorError_KeyImpl>( - this, _$identity); + _$$DescriptorError_Base58ImplCopyWith<_$DescriptorError_Base58Impl> + get copyWith => __$$DescriptorError_Base58ImplCopyWithImpl< + _$DescriptorError_Base58Impl>(this, _$identity); @override @optionalTypeArgs TResult when({ required TResult Function() invalidHdKeyPath, + required TResult Function() missingPrivateData, 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, + required TResult Function(String errorMessage) key, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) policy, + required TResult Function(String charector) invalidDescriptorCharacter, + required TResult Function(String errorMessage) bip32, + required TResult Function(String errorMessage) base58, + required TResult Function(String errorMessage) pk, + required TResult Function(String errorMessage) miniscript, + required TResult Function(String errorMessage) hex, + required TResult Function() externalAndInternalAreTheSame, }) { - return key(field0); + return base58(errorMessage); } @override @optionalTypeArgs TResult? whenOrNull({ TResult? Function()? invalidHdKeyPath, + TResult? Function()? missingPrivateData, 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, + TResult? Function(String errorMessage)? key, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? policy, + TResult? Function(String charector)? invalidDescriptorCharacter, + TResult? Function(String errorMessage)? bip32, + TResult? Function(String errorMessage)? base58, + TResult? Function(String errorMessage)? pk, + TResult? Function(String errorMessage)? miniscript, + TResult? Function(String errorMessage)? hex, + TResult? Function()? externalAndInternalAreTheSame, }) { - return key?.call(field0); + return base58?.call(errorMessage); } @override @optionalTypeArgs TResult maybeWhen({ TResult Function()? invalidHdKeyPath, + TResult Function()? missingPrivateData, 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, + TResult Function(String errorMessage)? key, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? policy, + TResult Function(String charector)? invalidDescriptorCharacter, + TResult Function(String errorMessage)? bip32, + TResult Function(String errorMessage)? base58, + TResult Function(String errorMessage)? pk, + TResult Function(String errorMessage)? miniscript, + TResult Function(String errorMessage)? hex, + TResult Function()? externalAndInternalAreTheSame, required TResult orElse(), }) { - if (key != null) { - return key(field0); + if (base58 != null) { + return base58(errorMessage); } return orElse(); } @@ -26223,12 +17341,15 @@ class _$DescriptorError_KeyImpl extends DescriptorError_Key { TResult map({ required TResult Function(DescriptorError_InvalidHdKeyPath value) invalidHdKeyPath, + required TResult Function(DescriptorError_MissingPrivateData value) + missingPrivateData, 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_Generic value) generic, required TResult Function(DescriptorError_Policy value) policy, required TResult Function(DescriptorError_InvalidDescriptorCharacter value) invalidDescriptorCharacter, @@ -26237,20 +17358,26 @@ class _$DescriptorError_KeyImpl extends DescriptorError_Key { required TResult Function(DescriptorError_Pk value) pk, required TResult Function(DescriptorError_Miniscript value) miniscript, required TResult Function(DescriptorError_Hex value) hex, + required TResult Function( + DescriptorError_ExternalAndInternalAreTheSame value) + externalAndInternalAreTheSame, }) { - return key(this); + return base58(this); } @override @optionalTypeArgs TResult? mapOrNull({ TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult? Function(DescriptorError_MissingPrivateData value)? + missingPrivateData, 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_Generic value)? generic, TResult? Function(DescriptorError_Policy value)? policy, TResult? Function(DescriptorError_InvalidDescriptorCharacter value)? invalidDescriptorCharacter, @@ -26259,20 +17386,25 @@ class _$DescriptorError_KeyImpl extends DescriptorError_Key { TResult? Function(DescriptorError_Pk value)? pk, TResult? Function(DescriptorError_Miniscript value)? miniscript, TResult? Function(DescriptorError_Hex value)? hex, + TResult? Function(DescriptorError_ExternalAndInternalAreTheSame value)? + externalAndInternalAreTheSame, }) { - return key?.call(this); + return base58?.call(this); } @override @optionalTypeArgs TResult maybeMap({ TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult Function(DescriptorError_MissingPrivateData value)? + missingPrivateData, 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_Generic value)? generic, TResult Function(DescriptorError_Policy value)? policy, TResult Function(DescriptorError_InvalidDescriptorCharacter value)? invalidDescriptorCharacter, @@ -26281,54 +17413,54 @@ class _$DescriptorError_KeyImpl extends DescriptorError_Key { TResult Function(DescriptorError_Pk value)? pk, TResult Function(DescriptorError_Miniscript value)? miniscript, TResult Function(DescriptorError_Hex value)? hex, + TResult Function(DescriptorError_ExternalAndInternalAreTheSame value)? + externalAndInternalAreTheSame, required TResult orElse(), }) { - if (key != null) { - return key(this); + if (base58 != null) { + return base58(this); } return orElse(); } } -abstract class DescriptorError_Key extends DescriptorError { - const factory DescriptorError_Key(final String field0) = - _$DescriptorError_KeyImpl; - const DescriptorError_Key._() : super._(); +abstract class DescriptorError_Base58 extends DescriptorError { + const factory DescriptorError_Base58({required final String errorMessage}) = + _$DescriptorError_Base58Impl; + const DescriptorError_Base58._() : super._(); - String get field0; + String get errorMessage; @JsonKey(ignore: true) - _$$DescriptorError_KeyImplCopyWith<_$DescriptorError_KeyImpl> get copyWith => - throw _privateConstructorUsedError; + _$$DescriptorError_Base58ImplCopyWith<_$DescriptorError_Base58Impl> + get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$DescriptorError_PolicyImplCopyWith<$Res> { - factory _$$DescriptorError_PolicyImplCopyWith( - _$DescriptorError_PolicyImpl value, - $Res Function(_$DescriptorError_PolicyImpl) then) = - __$$DescriptorError_PolicyImplCopyWithImpl<$Res>; +abstract class _$$DescriptorError_PkImplCopyWith<$Res> { + factory _$$DescriptorError_PkImplCopyWith(_$DescriptorError_PkImpl value, + $Res Function(_$DescriptorError_PkImpl) then) = + __$$DescriptorError_PkImplCopyWithImpl<$Res>; @useResult - $Res call({String field0}); + $Res call({String errorMessage}); } /// @nodoc -class __$$DescriptorError_PolicyImplCopyWithImpl<$Res> - extends _$DescriptorErrorCopyWithImpl<$Res, _$DescriptorError_PolicyImpl> - implements _$$DescriptorError_PolicyImplCopyWith<$Res> { - __$$DescriptorError_PolicyImplCopyWithImpl( - _$DescriptorError_PolicyImpl _value, - $Res Function(_$DescriptorError_PolicyImpl) _then) +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, + Object? errorMessage = null, }) { - return _then(_$DescriptorError_PolicyImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable + return _then(_$DescriptorError_PkImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable as String, )); } @@ -26336,92 +17468,102 @@ class __$$DescriptorError_PolicyImplCopyWithImpl<$Res> /// @nodoc -class _$DescriptorError_PolicyImpl extends DescriptorError_Policy { - const _$DescriptorError_PolicyImpl(this.field0) : super._(); +class _$DescriptorError_PkImpl extends DescriptorError_Pk { + const _$DescriptorError_PkImpl({required this.errorMessage}) : super._(); @override - final String field0; + final String errorMessage; @override String toString() { - return 'DescriptorError.policy(field0: $field0)'; + return 'DescriptorError.pk(errorMessage: $errorMessage)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$DescriptorError_PolicyImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$DescriptorError_PkImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); } @override - int get hashCode => Object.hash(runtimeType, field0); + int get hashCode => Object.hash(runtimeType, errorMessage); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$DescriptorError_PolicyImplCopyWith<_$DescriptorError_PolicyImpl> - get copyWith => __$$DescriptorError_PolicyImplCopyWithImpl< - _$DescriptorError_PolicyImpl>(this, _$identity); + _$$DescriptorError_PkImplCopyWith<_$DescriptorError_PkImpl> get copyWith => + __$$DescriptorError_PkImplCopyWithImpl<_$DescriptorError_PkImpl>( + this, _$identity); @override @optionalTypeArgs TResult when({ required TResult Function() invalidHdKeyPath, + required TResult Function() missingPrivateData, 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, + required TResult Function(String errorMessage) key, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) policy, + required TResult Function(String charector) invalidDescriptorCharacter, + required TResult Function(String errorMessage) bip32, + required TResult Function(String errorMessage) base58, + required TResult Function(String errorMessage) pk, + required TResult Function(String errorMessage) miniscript, + required TResult Function(String errorMessage) hex, + required TResult Function() externalAndInternalAreTheSame, }) { - return policy(field0); + return pk(errorMessage); } @override @optionalTypeArgs TResult? whenOrNull({ TResult? Function()? invalidHdKeyPath, + TResult? Function()? missingPrivateData, 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, + TResult? Function(String errorMessage)? key, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? policy, + TResult? Function(String charector)? invalidDescriptorCharacter, + TResult? Function(String errorMessage)? bip32, + TResult? Function(String errorMessage)? base58, + TResult? Function(String errorMessage)? pk, + TResult? Function(String errorMessage)? miniscript, + TResult? Function(String errorMessage)? hex, + TResult? Function()? externalAndInternalAreTheSame, }) { - return policy?.call(field0); + return pk?.call(errorMessage); } @override @optionalTypeArgs TResult maybeWhen({ TResult Function()? invalidHdKeyPath, + TResult Function()? missingPrivateData, 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, + TResult Function(String errorMessage)? key, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? policy, + TResult Function(String charector)? invalidDescriptorCharacter, + TResult Function(String errorMessage)? bip32, + TResult Function(String errorMessage)? base58, + TResult Function(String errorMessage)? pk, + TResult Function(String errorMessage)? miniscript, + TResult Function(String errorMessage)? hex, + TResult Function()? externalAndInternalAreTheSame, required TResult orElse(), }) { - if (policy != null) { - return policy(field0); + if (pk != null) { + return pk(errorMessage); } return orElse(); } @@ -26431,12 +17573,15 @@ class _$DescriptorError_PolicyImpl extends DescriptorError_Policy { TResult map({ required TResult Function(DescriptorError_InvalidHdKeyPath value) invalidHdKeyPath, + required TResult Function(DescriptorError_MissingPrivateData value) + missingPrivateData, 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_Generic value) generic, required TResult Function(DescriptorError_Policy value) policy, required TResult Function(DescriptorError_InvalidDescriptorCharacter value) invalidDescriptorCharacter, @@ -26445,20 +17590,26 @@ class _$DescriptorError_PolicyImpl extends DescriptorError_Policy { required TResult Function(DescriptorError_Pk value) pk, required TResult Function(DescriptorError_Miniscript value) miniscript, required TResult Function(DescriptorError_Hex value) hex, + required TResult Function( + DescriptorError_ExternalAndInternalAreTheSame value) + externalAndInternalAreTheSame, }) { - return policy(this); + return pk(this); } @override @optionalTypeArgs TResult? mapOrNull({ TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult? Function(DescriptorError_MissingPrivateData value)? + missingPrivateData, 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_Generic value)? generic, TResult? Function(DescriptorError_Policy value)? policy, TResult? Function(DescriptorError_InvalidDescriptorCharacter value)? invalidDescriptorCharacter, @@ -26467,20 +17618,25 @@ class _$DescriptorError_PolicyImpl extends DescriptorError_Policy { TResult? Function(DescriptorError_Pk value)? pk, TResult? Function(DescriptorError_Miniscript value)? miniscript, TResult? Function(DescriptorError_Hex value)? hex, + TResult? Function(DescriptorError_ExternalAndInternalAreTheSame value)? + externalAndInternalAreTheSame, }) { - return policy?.call(this); + return pk?.call(this); } @override @optionalTypeArgs TResult maybeMap({ TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult Function(DescriptorError_MissingPrivateData value)? + missingPrivateData, 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_Generic value)? generic, TResult Function(DescriptorError_Policy value)? policy, TResult Function(DescriptorError_InvalidDescriptorCharacter value)? invalidDescriptorCharacter, @@ -26489,154 +17645,161 @@ class _$DescriptorError_PolicyImpl extends DescriptorError_Policy { TResult Function(DescriptorError_Pk value)? pk, TResult Function(DescriptorError_Miniscript value)? miniscript, TResult Function(DescriptorError_Hex value)? hex, + TResult Function(DescriptorError_ExternalAndInternalAreTheSame value)? + externalAndInternalAreTheSame, required TResult orElse(), }) { - if (policy != null) { - return policy(this); + if (pk != null) { + return pk(this); } return orElse(); } } -abstract class DescriptorError_Policy extends DescriptorError { - const factory DescriptorError_Policy(final String field0) = - _$DescriptorError_PolicyImpl; - const DescriptorError_Policy._() : super._(); +abstract class DescriptorError_Pk extends DescriptorError { + const factory DescriptorError_Pk({required final String errorMessage}) = + _$DescriptorError_PkImpl; + const DescriptorError_Pk._() : super._(); - String get field0; + String get errorMessage; @JsonKey(ignore: true) - _$$DescriptorError_PolicyImplCopyWith<_$DescriptorError_PolicyImpl> - get copyWith => throw _privateConstructorUsedError; + _$$DescriptorError_PkImplCopyWith<_$DescriptorError_PkImpl> get copyWith => + throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$DescriptorError_InvalidDescriptorCharacterImplCopyWith<$Res> { - factory _$$DescriptorError_InvalidDescriptorCharacterImplCopyWith( - _$DescriptorError_InvalidDescriptorCharacterImpl value, - $Res Function(_$DescriptorError_InvalidDescriptorCharacterImpl) - then) = - __$$DescriptorError_InvalidDescriptorCharacterImplCopyWithImpl<$Res>; +abstract class _$$DescriptorError_MiniscriptImplCopyWith<$Res> { + factory _$$DescriptorError_MiniscriptImplCopyWith( + _$DescriptorError_MiniscriptImpl value, + $Res Function(_$DescriptorError_MiniscriptImpl) then) = + __$$DescriptorError_MiniscriptImplCopyWithImpl<$Res>; @useResult - $Res call({int field0}); + $Res call({String errorMessage}); } /// @nodoc -class __$$DescriptorError_InvalidDescriptorCharacterImplCopyWithImpl<$Res> +class __$$DescriptorError_MiniscriptImplCopyWithImpl<$Res> extends _$DescriptorErrorCopyWithImpl<$Res, - _$DescriptorError_InvalidDescriptorCharacterImpl> - implements _$$DescriptorError_InvalidDescriptorCharacterImplCopyWith<$Res> { - __$$DescriptorError_InvalidDescriptorCharacterImplCopyWithImpl( - _$DescriptorError_InvalidDescriptorCharacterImpl _value, - $Res Function(_$DescriptorError_InvalidDescriptorCharacterImpl) _then) + _$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, + Object? errorMessage = null, }) { - return _then(_$DescriptorError_InvalidDescriptorCharacterImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as int, + return _then(_$DescriptorError_MiniscriptImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, )); } } /// @nodoc -class _$DescriptorError_InvalidDescriptorCharacterImpl - extends DescriptorError_InvalidDescriptorCharacter { - const _$DescriptorError_InvalidDescriptorCharacterImpl(this.field0) +class _$DescriptorError_MiniscriptImpl extends DescriptorError_Miniscript { + const _$DescriptorError_MiniscriptImpl({required this.errorMessage}) : super._(); @override - final int field0; + final String errorMessage; @override String toString() { - return 'DescriptorError.invalidDescriptorCharacter(field0: $field0)'; + return 'DescriptorError.miniscript(errorMessage: $errorMessage)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$DescriptorError_InvalidDescriptorCharacterImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$DescriptorError_MiniscriptImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); } @override - int get hashCode => Object.hash(runtimeType, field0); + int get hashCode => Object.hash(runtimeType, errorMessage); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$DescriptorError_InvalidDescriptorCharacterImplCopyWith< - _$DescriptorError_InvalidDescriptorCharacterImpl> - get copyWith => - __$$DescriptorError_InvalidDescriptorCharacterImplCopyWithImpl< - _$DescriptorError_InvalidDescriptorCharacterImpl>( - this, _$identity); + _$$DescriptorError_MiniscriptImplCopyWith<_$DescriptorError_MiniscriptImpl> + get copyWith => __$$DescriptorError_MiniscriptImplCopyWithImpl< + _$DescriptorError_MiniscriptImpl>(this, _$identity); @override @optionalTypeArgs TResult when({ required TResult Function() invalidHdKeyPath, + required TResult Function() missingPrivateData, 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, + required TResult Function(String errorMessage) key, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) policy, + required TResult Function(String charector) invalidDescriptorCharacter, + required TResult Function(String errorMessage) bip32, + required TResult Function(String errorMessage) base58, + required TResult Function(String errorMessage) pk, + required TResult Function(String errorMessage) miniscript, + required TResult Function(String errorMessage) hex, + required TResult Function() externalAndInternalAreTheSame, }) { - return invalidDescriptorCharacter(field0); + return miniscript(errorMessage); } @override @optionalTypeArgs TResult? whenOrNull({ TResult? Function()? invalidHdKeyPath, + TResult? Function()? missingPrivateData, 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, + TResult? Function(String errorMessage)? key, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? policy, + TResult? Function(String charector)? invalidDescriptorCharacter, + TResult? Function(String errorMessage)? bip32, + TResult? Function(String errorMessage)? base58, + TResult? Function(String errorMessage)? pk, + TResult? Function(String errorMessage)? miniscript, + TResult? Function(String errorMessage)? hex, + TResult? Function()? externalAndInternalAreTheSame, }) { - return invalidDescriptorCharacter?.call(field0); + return miniscript?.call(errorMessage); } @override @optionalTypeArgs TResult maybeWhen({ TResult Function()? invalidHdKeyPath, + TResult Function()? missingPrivateData, 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, + TResult Function(String errorMessage)? key, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? policy, + TResult Function(String charector)? invalidDescriptorCharacter, + TResult Function(String errorMessage)? bip32, + TResult Function(String errorMessage)? base58, + TResult Function(String errorMessage)? pk, + TResult Function(String errorMessage)? miniscript, + TResult Function(String errorMessage)? hex, + TResult Function()? externalAndInternalAreTheSame, required TResult orElse(), }) { - if (invalidDescriptorCharacter != null) { - return invalidDescriptorCharacter(field0); + if (miniscript != null) { + return miniscript(errorMessage); } return orElse(); } @@ -26646,12 +17809,15 @@ class _$DescriptorError_InvalidDescriptorCharacterImpl TResult map({ required TResult Function(DescriptorError_InvalidHdKeyPath value) invalidHdKeyPath, + required TResult Function(DescriptorError_MissingPrivateData value) + missingPrivateData, 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_Generic value) generic, required TResult Function(DescriptorError_Policy value) policy, required TResult Function(DescriptorError_InvalidDescriptorCharacter value) invalidDescriptorCharacter, @@ -26660,20 +17826,26 @@ class _$DescriptorError_InvalidDescriptorCharacterImpl required TResult Function(DescriptorError_Pk value) pk, required TResult Function(DescriptorError_Miniscript value) miniscript, required TResult Function(DescriptorError_Hex value) hex, + required TResult Function( + DescriptorError_ExternalAndInternalAreTheSame value) + externalAndInternalAreTheSame, }) { - return invalidDescriptorCharacter(this); + return miniscript(this); } @override @optionalTypeArgs TResult? mapOrNull({ TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult? Function(DescriptorError_MissingPrivateData value)? + missingPrivateData, 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_Generic value)? generic, TResult? Function(DescriptorError_Policy value)? policy, TResult? Function(DescriptorError_InvalidDescriptorCharacter value)? invalidDescriptorCharacter, @@ -26682,20 +17854,25 @@ class _$DescriptorError_InvalidDescriptorCharacterImpl TResult? Function(DescriptorError_Pk value)? pk, TResult? Function(DescriptorError_Miniscript value)? miniscript, TResult? Function(DescriptorError_Hex value)? hex, + TResult? Function(DescriptorError_ExternalAndInternalAreTheSame value)? + externalAndInternalAreTheSame, }) { - return invalidDescriptorCharacter?.call(this); + return miniscript?.call(this); } @override @optionalTypeArgs TResult maybeMap({ TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult Function(DescriptorError_MissingPrivateData value)? + missingPrivateData, 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_Generic value)? generic, TResult Function(DescriptorError_Policy value)? policy, TResult Function(DescriptorError_InvalidDescriptorCharacter value)? invalidDescriptorCharacter, @@ -26704,55 +17881,54 @@ class _$DescriptorError_InvalidDescriptorCharacterImpl TResult Function(DescriptorError_Pk value)? pk, TResult Function(DescriptorError_Miniscript value)? miniscript, TResult Function(DescriptorError_Hex value)? hex, + TResult Function(DescriptorError_ExternalAndInternalAreTheSame value)? + externalAndInternalAreTheSame, required TResult orElse(), }) { - if (invalidDescriptorCharacter != null) { - return invalidDescriptorCharacter(this); + if (miniscript != null) { + return miniscript(this); } return orElse(); } } -abstract class DescriptorError_InvalidDescriptorCharacter - extends DescriptorError { - const factory DescriptorError_InvalidDescriptorCharacter(final int field0) = - _$DescriptorError_InvalidDescriptorCharacterImpl; - const DescriptorError_InvalidDescriptorCharacter._() : super._(); +abstract class DescriptorError_Miniscript extends DescriptorError { + const factory DescriptorError_Miniscript( + {required final String errorMessage}) = _$DescriptorError_MiniscriptImpl; + const DescriptorError_Miniscript._() : super._(); - int get field0; + String get errorMessage; @JsonKey(ignore: true) - _$$DescriptorError_InvalidDescriptorCharacterImplCopyWith< - _$DescriptorError_InvalidDescriptorCharacterImpl> + _$$DescriptorError_MiniscriptImplCopyWith<_$DescriptorError_MiniscriptImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$DescriptorError_Bip32ImplCopyWith<$Res> { - factory _$$DescriptorError_Bip32ImplCopyWith( - _$DescriptorError_Bip32Impl value, - $Res Function(_$DescriptorError_Bip32Impl) then) = - __$$DescriptorError_Bip32ImplCopyWithImpl<$Res>; +abstract class _$$DescriptorError_HexImplCopyWith<$Res> { + factory _$$DescriptorError_HexImplCopyWith(_$DescriptorError_HexImpl value, + $Res Function(_$DescriptorError_HexImpl) then) = + __$$DescriptorError_HexImplCopyWithImpl<$Res>; @useResult - $Res call({String field0}); + $Res call({String errorMessage}); } /// @nodoc -class __$$DescriptorError_Bip32ImplCopyWithImpl<$Res> - extends _$DescriptorErrorCopyWithImpl<$Res, _$DescriptorError_Bip32Impl> - implements _$$DescriptorError_Bip32ImplCopyWith<$Res> { - __$$DescriptorError_Bip32ImplCopyWithImpl(_$DescriptorError_Bip32Impl _value, - $Res Function(_$DescriptorError_Bip32Impl) _then) +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, + Object? errorMessage = null, }) { - return _then(_$DescriptorError_Bip32Impl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable + return _then(_$DescriptorError_HexImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable as String, )); } @@ -26760,92 +17936,102 @@ class __$$DescriptorError_Bip32ImplCopyWithImpl<$Res> /// @nodoc -class _$DescriptorError_Bip32Impl extends DescriptorError_Bip32 { - const _$DescriptorError_Bip32Impl(this.field0) : super._(); +class _$DescriptorError_HexImpl extends DescriptorError_Hex { + const _$DescriptorError_HexImpl({required this.errorMessage}) : super._(); @override - final String field0; + final String errorMessage; @override String toString() { - return 'DescriptorError.bip32(field0: $field0)'; + return 'DescriptorError.hex(errorMessage: $errorMessage)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$DescriptorError_Bip32Impl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$DescriptorError_HexImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); } @override - int get hashCode => Object.hash(runtimeType, field0); + int get hashCode => Object.hash(runtimeType, errorMessage); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$DescriptorError_Bip32ImplCopyWith<_$DescriptorError_Bip32Impl> - get copyWith => __$$DescriptorError_Bip32ImplCopyWithImpl< - _$DescriptorError_Bip32Impl>(this, _$identity); + _$$DescriptorError_HexImplCopyWith<_$DescriptorError_HexImpl> get copyWith => + __$$DescriptorError_HexImplCopyWithImpl<_$DescriptorError_HexImpl>( + this, _$identity); @override @optionalTypeArgs TResult when({ required TResult Function() invalidHdKeyPath, + required TResult Function() missingPrivateData, 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, + required TResult Function(String errorMessage) key, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) policy, + required TResult Function(String charector) invalidDescriptorCharacter, + required TResult Function(String errorMessage) bip32, + required TResult Function(String errorMessage) base58, + required TResult Function(String errorMessage) pk, + required TResult Function(String errorMessage) miniscript, + required TResult Function(String errorMessage) hex, + required TResult Function() externalAndInternalAreTheSame, }) { - return bip32(field0); + return hex(errorMessage); } @override @optionalTypeArgs TResult? whenOrNull({ TResult? Function()? invalidHdKeyPath, + TResult? Function()? missingPrivateData, 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, + TResult? Function(String errorMessage)? key, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? policy, + TResult? Function(String charector)? invalidDescriptorCharacter, + TResult? Function(String errorMessage)? bip32, + TResult? Function(String errorMessage)? base58, + TResult? Function(String errorMessage)? pk, + TResult? Function(String errorMessage)? miniscript, + TResult? Function(String errorMessage)? hex, + TResult? Function()? externalAndInternalAreTheSame, }) { - return bip32?.call(field0); + return hex?.call(errorMessage); } @override @optionalTypeArgs TResult maybeWhen({ TResult Function()? invalidHdKeyPath, + TResult Function()? missingPrivateData, 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, + TResult Function(String errorMessage)? key, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? policy, + TResult Function(String charector)? invalidDescriptorCharacter, + TResult Function(String errorMessage)? bip32, + TResult Function(String errorMessage)? base58, + TResult Function(String errorMessage)? pk, + TResult Function(String errorMessage)? miniscript, + TResult Function(String errorMessage)? hex, + TResult Function()? externalAndInternalAreTheSame, required TResult orElse(), }) { - if (bip32 != null) { - return bip32(field0); + if (hex != null) { + return hex(errorMessage); } return orElse(); } @@ -26855,12 +18041,15 @@ class _$DescriptorError_Bip32Impl extends DescriptorError_Bip32 { TResult map({ required TResult Function(DescriptorError_InvalidHdKeyPath value) invalidHdKeyPath, + required TResult Function(DescriptorError_MissingPrivateData value) + missingPrivateData, 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_Generic value) generic, required TResult Function(DescriptorError_Policy value) policy, required TResult Function(DescriptorError_InvalidDescriptorCharacter value) invalidDescriptorCharacter, @@ -26869,20 +18058,26 @@ class _$DescriptorError_Bip32Impl extends DescriptorError_Bip32 { required TResult Function(DescriptorError_Pk value) pk, required TResult Function(DescriptorError_Miniscript value) miniscript, required TResult Function(DescriptorError_Hex value) hex, + required TResult Function( + DescriptorError_ExternalAndInternalAreTheSame value) + externalAndInternalAreTheSame, }) { - return bip32(this); + return hex(this); } @override @optionalTypeArgs TResult? mapOrNull({ TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult? Function(DescriptorError_MissingPrivateData value)? + missingPrivateData, 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_Generic value)? generic, TResult? Function(DescriptorError_Policy value)? policy, TResult? Function(DescriptorError_InvalidDescriptorCharacter value)? invalidDescriptorCharacter, @@ -26891,20 +18086,25 @@ class _$DescriptorError_Bip32Impl extends DescriptorError_Bip32 { TResult? Function(DescriptorError_Pk value)? pk, TResult? Function(DescriptorError_Miniscript value)? miniscript, TResult? Function(DescriptorError_Hex value)? hex, + TResult? Function(DescriptorError_ExternalAndInternalAreTheSame value)? + externalAndInternalAreTheSame, }) { - return bip32?.call(this); + return hex?.call(this); } @override @optionalTypeArgs TResult maybeMap({ TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult Function(DescriptorError_MissingPrivateData value)? + missingPrivateData, 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_Generic value)? generic, TResult Function(DescriptorError_Policy value)? policy, TResult Function(DescriptorError_InvalidDescriptorCharacter value)? invalidDescriptorCharacter, @@ -26913,147 +18113,137 @@ class _$DescriptorError_Bip32Impl extends DescriptorError_Bip32 { TResult Function(DescriptorError_Pk value)? pk, TResult Function(DescriptorError_Miniscript value)? miniscript, TResult Function(DescriptorError_Hex value)? hex, + TResult Function(DescriptorError_ExternalAndInternalAreTheSame value)? + externalAndInternalAreTheSame, required TResult orElse(), }) { - if (bip32 != null) { - return bip32(this); + if (hex != null) { + return hex(this); } return orElse(); } } -abstract class DescriptorError_Bip32 extends DescriptorError { - const factory DescriptorError_Bip32(final String field0) = - _$DescriptorError_Bip32Impl; - const DescriptorError_Bip32._() : super._(); +abstract class DescriptorError_Hex extends DescriptorError { + const factory DescriptorError_Hex({required final String errorMessage}) = + _$DescriptorError_HexImpl; + const DescriptorError_Hex._() : super._(); - String get field0; + String get errorMessage; @JsonKey(ignore: true) - _$$DescriptorError_Bip32ImplCopyWith<_$DescriptorError_Bip32Impl> - get copyWith => throw _privateConstructorUsedError; + _$$DescriptorError_HexImplCopyWith<_$DescriptorError_HexImpl> 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}); +abstract class _$$DescriptorError_ExternalAndInternalAreTheSameImplCopyWith< + $Res> { + factory _$$DescriptorError_ExternalAndInternalAreTheSameImplCopyWith( + _$DescriptorError_ExternalAndInternalAreTheSameImpl value, + $Res Function(_$DescriptorError_ExternalAndInternalAreTheSameImpl) + then) = + __$$DescriptorError_ExternalAndInternalAreTheSameImplCopyWithImpl<$Res>; } /// @nodoc -class __$$DescriptorError_Base58ImplCopyWithImpl<$Res> - extends _$DescriptorErrorCopyWithImpl<$Res, _$DescriptorError_Base58Impl> - implements _$$DescriptorError_Base58ImplCopyWith<$Res> { - __$$DescriptorError_Base58ImplCopyWithImpl( - _$DescriptorError_Base58Impl _value, - $Res Function(_$DescriptorError_Base58Impl) _then) +class __$$DescriptorError_ExternalAndInternalAreTheSameImplCopyWithImpl<$Res> + extends _$DescriptorErrorCopyWithImpl<$Res, + _$DescriptorError_ExternalAndInternalAreTheSameImpl> + implements + _$$DescriptorError_ExternalAndInternalAreTheSameImplCopyWith<$Res> { + __$$DescriptorError_ExternalAndInternalAreTheSameImplCopyWithImpl( + _$DescriptorError_ExternalAndInternalAreTheSameImpl _value, + $Res Function(_$DescriptorError_ExternalAndInternalAreTheSameImpl) _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; +class _$DescriptorError_ExternalAndInternalAreTheSameImpl + extends DescriptorError_ExternalAndInternalAreTheSame { + const _$DescriptorError_ExternalAndInternalAreTheSameImpl() : super._(); @override String toString() { - return 'DescriptorError.base58(field0: $field0)'; + return 'DescriptorError.externalAndInternalAreTheSame()'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$DescriptorError_Base58Impl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$DescriptorError_ExternalAndInternalAreTheSameImpl); } @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); + int get hashCode => runtimeType.hashCode; @override @optionalTypeArgs TResult when({ required TResult Function() invalidHdKeyPath, + required TResult Function() missingPrivateData, 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, + required TResult Function(String errorMessage) key, + required TResult Function(String errorMessage) generic, + required TResult Function(String errorMessage) policy, + required TResult Function(String charector) invalidDescriptorCharacter, + required TResult Function(String errorMessage) bip32, + required TResult Function(String errorMessage) base58, + required TResult Function(String errorMessage) pk, + required TResult Function(String errorMessage) miniscript, + required TResult Function(String errorMessage) hex, + required TResult Function() externalAndInternalAreTheSame, }) { - return base58(field0); + return externalAndInternalAreTheSame(); } @override @optionalTypeArgs TResult? whenOrNull({ TResult? Function()? invalidHdKeyPath, + TResult? Function()? missingPrivateData, 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, + TResult? Function(String errorMessage)? key, + TResult? Function(String errorMessage)? generic, + TResult? Function(String errorMessage)? policy, + TResult? Function(String charector)? invalidDescriptorCharacter, + TResult? Function(String errorMessage)? bip32, + TResult? Function(String errorMessage)? base58, + TResult? Function(String errorMessage)? pk, + TResult? Function(String errorMessage)? miniscript, + TResult? Function(String errorMessage)? hex, + TResult? Function()? externalAndInternalAreTheSame, }) { - return base58?.call(field0); + return externalAndInternalAreTheSame?.call(); } @override @optionalTypeArgs TResult maybeWhen({ TResult Function()? invalidHdKeyPath, + TResult Function()? missingPrivateData, 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, + TResult Function(String errorMessage)? key, + TResult Function(String errorMessage)? generic, + TResult Function(String errorMessage)? policy, + TResult Function(String charector)? invalidDescriptorCharacter, + TResult Function(String errorMessage)? bip32, + TResult Function(String errorMessage)? base58, + TResult Function(String errorMessage)? pk, + TResult Function(String errorMessage)? miniscript, + TResult Function(String errorMessage)? hex, + TResult Function()? externalAndInternalAreTheSame, required TResult orElse(), }) { - if (base58 != null) { - return base58(field0); + if (externalAndInternalAreTheSame != null) { + return externalAndInternalAreTheSame(); } return orElse(); } @@ -27063,12 +18253,15 @@ class _$DescriptorError_Base58Impl extends DescriptorError_Base58 { TResult map({ required TResult Function(DescriptorError_InvalidHdKeyPath value) invalidHdKeyPath, + required TResult Function(DescriptorError_MissingPrivateData value) + missingPrivateData, 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_Generic value) generic, required TResult Function(DescriptorError_Policy value) policy, required TResult Function(DescriptorError_InvalidDescriptorCharacter value) invalidDescriptorCharacter, @@ -27077,20 +18270,26 @@ class _$DescriptorError_Base58Impl extends DescriptorError_Base58 { required TResult Function(DescriptorError_Pk value) pk, required TResult Function(DescriptorError_Miniscript value) miniscript, required TResult Function(DescriptorError_Hex value) hex, + required TResult Function( + DescriptorError_ExternalAndInternalAreTheSame value) + externalAndInternalAreTheSame, }) { - return base58(this); + return externalAndInternalAreTheSame(this); } @override @optionalTypeArgs TResult? mapOrNull({ TResult? Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult? Function(DescriptorError_MissingPrivateData value)? + missingPrivateData, 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_Generic value)? generic, TResult? Function(DescriptorError_Policy value)? policy, TResult? Function(DescriptorError_InvalidDescriptorCharacter value)? invalidDescriptorCharacter, @@ -27099,20 +18298,25 @@ class _$DescriptorError_Base58Impl extends DescriptorError_Base58 { TResult? Function(DescriptorError_Pk value)? pk, TResult? Function(DescriptorError_Miniscript value)? miniscript, TResult? Function(DescriptorError_Hex value)? hex, + TResult? Function(DescriptorError_ExternalAndInternalAreTheSame value)? + externalAndInternalAreTheSame, }) { - return base58?.call(this); + return externalAndInternalAreTheSame?.call(this); } @override @optionalTypeArgs TResult maybeMap({ TResult Function(DescriptorError_InvalidHdKeyPath value)? invalidHdKeyPath, + TResult Function(DescriptorError_MissingPrivateData value)? + missingPrivateData, 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_Generic value)? generic, TResult Function(DescriptorError_Policy value)? policy, TResult Function(DescriptorError_InvalidDescriptorCharacter value)? invalidDescriptorCharacter, @@ -27121,52 +18325,120 @@ class _$DescriptorError_Base58Impl extends DescriptorError_Base58 { TResult Function(DescriptorError_Pk value)? pk, TResult Function(DescriptorError_Miniscript value)? miniscript, TResult Function(DescriptorError_Hex value)? hex, + TResult Function(DescriptorError_ExternalAndInternalAreTheSame value)? + externalAndInternalAreTheSame, required TResult orElse(), }) { - if (base58 != null) { - return base58(this); + if (externalAndInternalAreTheSame != null) { + return externalAndInternalAreTheSame(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}); +abstract class DescriptorError_ExternalAndInternalAreTheSame + extends DescriptorError { + const factory DescriptorError_ExternalAndInternalAreTheSame() = + _$DescriptorError_ExternalAndInternalAreTheSameImpl; + const DescriptorError_ExternalAndInternalAreTheSame._() : super._(); } /// @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 +mixin _$DescriptorKeyError { + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) parse, + required TResult Function() invalidKeyType, + required TResult Function(String errorMessage) bip32, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? parse, + TResult? Function()? invalidKeyType, + TResult? Function(String errorMessage)? bip32, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? parse, + TResult Function()? invalidKeyType, + TResult Function(String errorMessage)? bip32, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(DescriptorKeyError_Parse value) parse, + required TResult Function(DescriptorKeyError_InvalidKeyType value) + invalidKeyType, + required TResult Function(DescriptorKeyError_Bip32 value) bip32, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(DescriptorKeyError_Parse value)? parse, + TResult? Function(DescriptorKeyError_InvalidKeyType value)? invalidKeyType, + TResult? Function(DescriptorKeyError_Bip32 value)? bip32, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(DescriptorKeyError_Parse value)? parse, + TResult Function(DescriptorKeyError_InvalidKeyType value)? invalidKeyType, + TResult Function(DescriptorKeyError_Bip32 value)? bip32, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $DescriptorKeyErrorCopyWith<$Res> { + factory $DescriptorKeyErrorCopyWith( + DescriptorKeyError value, $Res Function(DescriptorKeyError) then) = + _$DescriptorKeyErrorCopyWithImpl<$Res, DescriptorKeyError>; +} + +/// @nodoc +class _$DescriptorKeyErrorCopyWithImpl<$Res, $Val extends DescriptorKeyError> + implements $DescriptorKeyErrorCopyWith<$Res> { + _$DescriptorKeyErrorCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; +} + +/// @nodoc +abstract class _$$DescriptorKeyError_ParseImplCopyWith<$Res> { + factory _$$DescriptorKeyError_ParseImplCopyWith( + _$DescriptorKeyError_ParseImpl value, + $Res Function(_$DescriptorKeyError_ParseImpl) then) = + __$$DescriptorKeyError_ParseImplCopyWithImpl<$Res>; + @useResult + $Res call({String errorMessage}); +} + +/// @nodoc +class __$$DescriptorKeyError_ParseImplCopyWithImpl<$Res> + extends _$DescriptorKeyErrorCopyWithImpl<$Res, + _$DescriptorKeyError_ParseImpl> + implements _$$DescriptorKeyError_ParseImplCopyWith<$Res> { + __$$DescriptorKeyError_ParseImplCopyWithImpl( + _$DescriptorKeyError_ParseImpl _value, + $Res Function(_$DescriptorKeyError_ParseImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? errorMessage = null, + }) { + return _then(_$DescriptorKeyError_ParseImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable as String, )); } @@ -27174,92 +18446,67 @@ class __$$DescriptorError_PkImplCopyWithImpl<$Res> /// @nodoc -class _$DescriptorError_PkImpl extends DescriptorError_Pk { - const _$DescriptorError_PkImpl(this.field0) : super._(); +class _$DescriptorKeyError_ParseImpl extends DescriptorKeyError_Parse { + const _$DescriptorKeyError_ParseImpl({required this.errorMessage}) + : super._(); @override - final String field0; + final String errorMessage; @override String toString() { - return 'DescriptorError.pk(field0: $field0)'; + return 'DescriptorKeyError.parse(errorMessage: $errorMessage)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$DescriptorError_PkImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$DescriptorKeyError_ParseImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); } @override - int get hashCode => Object.hash(runtimeType, field0); + int get hashCode => Object.hash(runtimeType, errorMessage); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$DescriptorError_PkImplCopyWith<_$DescriptorError_PkImpl> get copyWith => - __$$DescriptorError_PkImplCopyWithImpl<_$DescriptorError_PkImpl>( - this, _$identity); + _$$DescriptorKeyError_ParseImplCopyWith<_$DescriptorKeyError_ParseImpl> + get copyWith => __$$DescriptorKeyError_ParseImplCopyWithImpl< + _$DescriptorKeyError_ParseImpl>(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, + required TResult Function(String errorMessage) parse, + required TResult Function() invalidKeyType, + required TResult Function(String errorMessage) bip32, }) { - return pk(field0); + return parse(errorMessage); } @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, + TResult? Function(String errorMessage)? parse, + TResult? Function()? invalidKeyType, + TResult? Function(String errorMessage)? bip32, }) { - return pk?.call(field0); + return parse?.call(errorMessage); } @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, + TResult Function(String errorMessage)? parse, + TResult Function()? invalidKeyType, + TResult Function(String errorMessage)? bip32, required TResult orElse(), }) { - if (pk != null) { - return pk(field0); + if (parse != null) { + return parse(errorMessage); } return orElse(); } @@ -27267,208 +18514,120 @@ class _$DescriptorError_PkImpl extends DescriptorError_Pk { @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, + required TResult Function(DescriptorKeyError_Parse value) parse, + required TResult Function(DescriptorKeyError_InvalidKeyType value) + invalidKeyType, + required TResult Function(DescriptorKeyError_Bip32 value) bip32, }) { - return pk(this); + return parse(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, + TResult? Function(DescriptorKeyError_Parse value)? parse, + TResult? Function(DescriptorKeyError_InvalidKeyType value)? invalidKeyType, + TResult? Function(DescriptorKeyError_Bip32 value)? bip32, }) { - return pk?.call(this); + return parse?.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, + TResult Function(DescriptorKeyError_Parse value)? parse, + TResult Function(DescriptorKeyError_InvalidKeyType value)? invalidKeyType, + TResult Function(DescriptorKeyError_Bip32 value)? bip32, required TResult orElse(), }) { - if (pk != null) { - return pk(this); + if (parse != null) { + return parse(this); } return orElse(); } } -abstract class DescriptorError_Pk extends DescriptorError { - const factory DescriptorError_Pk(final String field0) = - _$DescriptorError_PkImpl; - const DescriptorError_Pk._() : super._(); +abstract class DescriptorKeyError_Parse extends DescriptorKeyError { + const factory DescriptorKeyError_Parse({required final String errorMessage}) = + _$DescriptorKeyError_ParseImpl; + const DescriptorKeyError_Parse._() : super._(); - String get field0; + String get errorMessage; @JsonKey(ignore: true) - _$$DescriptorError_PkImplCopyWith<_$DescriptorError_PkImpl> get copyWith => - throw _privateConstructorUsedError; + _$$DescriptorKeyError_ParseImplCopyWith<_$DescriptorKeyError_ParseImpl> + 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}); +abstract class _$$DescriptorKeyError_InvalidKeyTypeImplCopyWith<$Res> { + factory _$$DescriptorKeyError_InvalidKeyTypeImplCopyWith( + _$DescriptorKeyError_InvalidKeyTypeImpl value, + $Res Function(_$DescriptorKeyError_InvalidKeyTypeImpl) then) = + __$$DescriptorKeyError_InvalidKeyTypeImplCopyWithImpl<$Res>; } /// @nodoc -class __$$DescriptorError_MiniscriptImplCopyWithImpl<$Res> - extends _$DescriptorErrorCopyWithImpl<$Res, - _$DescriptorError_MiniscriptImpl> - implements _$$DescriptorError_MiniscriptImplCopyWith<$Res> { - __$$DescriptorError_MiniscriptImplCopyWithImpl( - _$DescriptorError_MiniscriptImpl _value, - $Res Function(_$DescriptorError_MiniscriptImpl) _then) +class __$$DescriptorKeyError_InvalidKeyTypeImplCopyWithImpl<$Res> + extends _$DescriptorKeyErrorCopyWithImpl<$Res, + _$DescriptorKeyError_InvalidKeyTypeImpl> + implements _$$DescriptorKeyError_InvalidKeyTypeImplCopyWith<$Res> { + __$$DescriptorKeyError_InvalidKeyTypeImplCopyWithImpl( + _$DescriptorKeyError_InvalidKeyTypeImpl _value, + $Res Function(_$DescriptorKeyError_InvalidKeyTypeImpl) _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; +class _$DescriptorKeyError_InvalidKeyTypeImpl + extends DescriptorKeyError_InvalidKeyType { + const _$DescriptorKeyError_InvalidKeyTypeImpl() : super._(); @override String toString() { - return 'DescriptorError.miniscript(field0: $field0)'; + return 'DescriptorKeyError.invalidKeyType()'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$DescriptorError_MiniscriptImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$DescriptorKeyError_InvalidKeyTypeImpl); } @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); + 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, + required TResult Function(String errorMessage) parse, + required TResult Function() invalidKeyType, + required TResult Function(String errorMessage) bip32, }) { - return miniscript(field0); + return invalidKeyType(); } @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, + TResult? Function(String errorMessage)? parse, + TResult? Function()? invalidKeyType, + TResult? Function(String errorMessage)? bip32, }) { - return miniscript?.call(field0); + return invalidKeyType?.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, + TResult Function(String errorMessage)? parse, + TResult Function()? invalidKeyType, + TResult Function(String errorMessage)? bip32, required TResult orElse(), }) { - if (miniscript != null) { - return miniscript(field0); + if (invalidKeyType != null) { + return invalidKeyType(); } return orElse(); } @@ -27476,112 +18635,74 @@ class _$DescriptorError_MiniscriptImpl extends DescriptorError_Miniscript { @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, + required TResult Function(DescriptorKeyError_Parse value) parse, + required TResult Function(DescriptorKeyError_InvalidKeyType value) + invalidKeyType, + required TResult Function(DescriptorKeyError_Bip32 value) bip32, }) { - return miniscript(this); + return invalidKeyType(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, + TResult? Function(DescriptorKeyError_Parse value)? parse, + TResult? Function(DescriptorKeyError_InvalidKeyType value)? invalidKeyType, + TResult? Function(DescriptorKeyError_Bip32 value)? bip32, }) { - return miniscript?.call(this); + return invalidKeyType?.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, + TResult Function(DescriptorKeyError_Parse value)? parse, + TResult Function(DescriptorKeyError_InvalidKeyType value)? invalidKeyType, + TResult Function(DescriptorKeyError_Bip32 value)? bip32, required TResult orElse(), }) { - if (miniscript != null) { - return miniscript(this); + if (invalidKeyType != null) { + return invalidKeyType(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; +abstract class DescriptorKeyError_InvalidKeyType extends DescriptorKeyError { + const factory DescriptorKeyError_InvalidKeyType() = + _$DescriptorKeyError_InvalidKeyTypeImpl; + const DescriptorKeyError_InvalidKeyType._() : super._(); } /// @nodoc -abstract class _$$DescriptorError_HexImplCopyWith<$Res> { - factory _$$DescriptorError_HexImplCopyWith(_$DescriptorError_HexImpl value, - $Res Function(_$DescriptorError_HexImpl) then) = - __$$DescriptorError_HexImplCopyWithImpl<$Res>; +abstract class _$$DescriptorKeyError_Bip32ImplCopyWith<$Res> { + factory _$$DescriptorKeyError_Bip32ImplCopyWith( + _$DescriptorKeyError_Bip32Impl value, + $Res Function(_$DescriptorKeyError_Bip32Impl) then) = + __$$DescriptorKeyError_Bip32ImplCopyWithImpl<$Res>; @useResult - $Res call({String field0}); + $Res call({String errorMessage}); } /// @nodoc -class __$$DescriptorError_HexImplCopyWithImpl<$Res> - extends _$DescriptorErrorCopyWithImpl<$Res, _$DescriptorError_HexImpl> - implements _$$DescriptorError_HexImplCopyWith<$Res> { - __$$DescriptorError_HexImplCopyWithImpl(_$DescriptorError_HexImpl _value, - $Res Function(_$DescriptorError_HexImpl) _then) +class __$$DescriptorKeyError_Bip32ImplCopyWithImpl<$Res> + extends _$DescriptorKeyErrorCopyWithImpl<$Res, + _$DescriptorKeyError_Bip32Impl> + implements _$$DescriptorKeyError_Bip32ImplCopyWith<$Res> { + __$$DescriptorKeyError_Bip32ImplCopyWithImpl( + _$DescriptorKeyError_Bip32Impl _value, + $Res Function(_$DescriptorKeyError_Bip32Impl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? field0 = null, + Object? errorMessage = null, }) { - return _then(_$DescriptorError_HexImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable + return _then(_$DescriptorKeyError_Bip32Impl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable as String, )); } @@ -27589,92 +18710,26198 @@ class __$$DescriptorError_HexImplCopyWithImpl<$Res> /// @nodoc -class _$DescriptorError_HexImpl extends DescriptorError_Hex { - const _$DescriptorError_HexImpl(this.field0) : super._(); +class _$DescriptorKeyError_Bip32Impl extends DescriptorKeyError_Bip32 { + const _$DescriptorKeyError_Bip32Impl({required this.errorMessage}) + : super._(); + + @override + final String errorMessage; + + @override + String toString() { + return 'DescriptorKeyError.bip32(errorMessage: $errorMessage)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$DescriptorKeyError_Bip32Impl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); + } + + @override + int get hashCode => Object.hash(runtimeType, errorMessage); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$DescriptorKeyError_Bip32ImplCopyWith<_$DescriptorKeyError_Bip32Impl> + get copyWith => __$$DescriptorKeyError_Bip32ImplCopyWithImpl< + _$DescriptorKeyError_Bip32Impl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) parse, + required TResult Function() invalidKeyType, + required TResult Function(String errorMessage) bip32, + }) { + return bip32(errorMessage); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? parse, + TResult? Function()? invalidKeyType, + TResult? Function(String errorMessage)? bip32, + }) { + return bip32?.call(errorMessage); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? parse, + TResult Function()? invalidKeyType, + TResult Function(String errorMessage)? bip32, + required TResult orElse(), + }) { + if (bip32 != null) { + return bip32(errorMessage); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(DescriptorKeyError_Parse value) parse, + required TResult Function(DescriptorKeyError_InvalidKeyType value) + invalidKeyType, + required TResult Function(DescriptorKeyError_Bip32 value) bip32, + }) { + return bip32(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(DescriptorKeyError_Parse value)? parse, + TResult? Function(DescriptorKeyError_InvalidKeyType value)? invalidKeyType, + TResult? Function(DescriptorKeyError_Bip32 value)? bip32, + }) { + return bip32?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(DescriptorKeyError_Parse value)? parse, + TResult Function(DescriptorKeyError_InvalidKeyType value)? invalidKeyType, + TResult Function(DescriptorKeyError_Bip32 value)? bip32, + required TResult orElse(), + }) { + if (bip32 != null) { + return bip32(this); + } + return orElse(); + } +} + +abstract class DescriptorKeyError_Bip32 extends DescriptorKeyError { + const factory DescriptorKeyError_Bip32({required final String errorMessage}) = + _$DescriptorKeyError_Bip32Impl; + const DescriptorKeyError_Bip32._() : super._(); + + String get errorMessage; + @JsonKey(ignore: true) + _$$DescriptorKeyError_Bip32ImplCopyWith<_$DescriptorKeyError_Bip32Impl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +mixin _$ElectrumError { + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) ioError, + required TResult Function(String errorMessage) json, + required TResult Function(String errorMessage) hex, + required TResult Function(String errorMessage) protocol, + required TResult Function(String errorMessage) bitcoin, + required TResult Function() alreadySubscribed, + required TResult Function() notSubscribed, + required TResult Function(String errorMessage) invalidResponse, + required TResult Function(String errorMessage) message, + required TResult Function(String domain) invalidDnsNameError, + required TResult Function() missingDomain, + required TResult Function() allAttemptsErrored, + required TResult Function(String errorMessage) sharedIoError, + required TResult Function() couldntLockReader, + required TResult Function() mpsc, + required TResult Function(String errorMessage) couldNotCreateConnection, + required TResult Function() requestAlreadyConsumed, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? ioError, + TResult? Function(String errorMessage)? json, + TResult? Function(String errorMessage)? hex, + TResult? Function(String errorMessage)? protocol, + TResult? Function(String errorMessage)? bitcoin, + TResult? Function()? alreadySubscribed, + TResult? Function()? notSubscribed, + TResult? Function(String errorMessage)? invalidResponse, + TResult? Function(String errorMessage)? message, + TResult? Function(String domain)? invalidDnsNameError, + TResult? Function()? missingDomain, + TResult? Function()? allAttemptsErrored, + TResult? Function(String errorMessage)? sharedIoError, + TResult? Function()? couldntLockReader, + TResult? Function()? mpsc, + TResult? Function(String errorMessage)? couldNotCreateConnection, + TResult? Function()? requestAlreadyConsumed, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? ioError, + TResult Function(String errorMessage)? json, + TResult Function(String errorMessage)? hex, + TResult Function(String errorMessage)? protocol, + TResult Function(String errorMessage)? bitcoin, + TResult Function()? alreadySubscribed, + TResult Function()? notSubscribed, + TResult Function(String errorMessage)? invalidResponse, + TResult Function(String errorMessage)? message, + TResult Function(String domain)? invalidDnsNameError, + TResult Function()? missingDomain, + TResult Function()? allAttemptsErrored, + TResult Function(String errorMessage)? sharedIoError, + TResult Function()? couldntLockReader, + TResult Function()? mpsc, + TResult Function(String errorMessage)? couldNotCreateConnection, + TResult Function()? requestAlreadyConsumed, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(ElectrumError_IOError value) ioError, + required TResult Function(ElectrumError_Json value) json, + required TResult Function(ElectrumError_Hex value) hex, + required TResult Function(ElectrumError_Protocol value) protocol, + required TResult Function(ElectrumError_Bitcoin value) bitcoin, + required TResult Function(ElectrumError_AlreadySubscribed value) + alreadySubscribed, + required TResult Function(ElectrumError_NotSubscribed value) notSubscribed, + required TResult Function(ElectrumError_InvalidResponse value) + invalidResponse, + required TResult Function(ElectrumError_Message value) message, + required TResult Function(ElectrumError_InvalidDNSNameError value) + invalidDnsNameError, + required TResult Function(ElectrumError_MissingDomain value) missingDomain, + required TResult Function(ElectrumError_AllAttemptsErrored value) + allAttemptsErrored, + required TResult Function(ElectrumError_SharedIOError value) sharedIoError, + required TResult Function(ElectrumError_CouldntLockReader value) + couldntLockReader, + required TResult Function(ElectrumError_Mpsc value) mpsc, + required TResult Function(ElectrumError_CouldNotCreateConnection value) + couldNotCreateConnection, + required TResult Function(ElectrumError_RequestAlreadyConsumed value) + requestAlreadyConsumed, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(ElectrumError_IOError value)? ioError, + TResult? Function(ElectrumError_Json value)? json, + TResult? Function(ElectrumError_Hex value)? hex, + TResult? Function(ElectrumError_Protocol value)? protocol, + TResult? Function(ElectrumError_Bitcoin value)? bitcoin, + TResult? Function(ElectrumError_AlreadySubscribed value)? alreadySubscribed, + TResult? Function(ElectrumError_NotSubscribed value)? notSubscribed, + TResult? Function(ElectrumError_InvalidResponse value)? invalidResponse, + TResult? Function(ElectrumError_Message value)? message, + TResult? Function(ElectrumError_InvalidDNSNameError value)? + invalidDnsNameError, + TResult? Function(ElectrumError_MissingDomain value)? missingDomain, + TResult? Function(ElectrumError_AllAttemptsErrored value)? + allAttemptsErrored, + TResult? Function(ElectrumError_SharedIOError value)? sharedIoError, + TResult? Function(ElectrumError_CouldntLockReader value)? couldntLockReader, + TResult? Function(ElectrumError_Mpsc value)? mpsc, + TResult? Function(ElectrumError_CouldNotCreateConnection value)? + couldNotCreateConnection, + TResult? Function(ElectrumError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ElectrumError_IOError value)? ioError, + TResult Function(ElectrumError_Json value)? json, + TResult Function(ElectrumError_Hex value)? hex, + TResult Function(ElectrumError_Protocol value)? protocol, + TResult Function(ElectrumError_Bitcoin value)? bitcoin, + TResult Function(ElectrumError_AlreadySubscribed value)? alreadySubscribed, + TResult Function(ElectrumError_NotSubscribed value)? notSubscribed, + TResult Function(ElectrumError_InvalidResponse value)? invalidResponse, + TResult Function(ElectrumError_Message value)? message, + TResult Function(ElectrumError_InvalidDNSNameError value)? + invalidDnsNameError, + TResult Function(ElectrumError_MissingDomain value)? missingDomain, + TResult Function(ElectrumError_AllAttemptsErrored value)? + allAttemptsErrored, + TResult Function(ElectrumError_SharedIOError value)? sharedIoError, + TResult Function(ElectrumError_CouldntLockReader value)? couldntLockReader, + TResult Function(ElectrumError_Mpsc value)? mpsc, + TResult Function(ElectrumError_CouldNotCreateConnection value)? + couldNotCreateConnection, + TResult Function(ElectrumError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $ElectrumErrorCopyWith<$Res> { + factory $ElectrumErrorCopyWith( + ElectrumError value, $Res Function(ElectrumError) then) = + _$ElectrumErrorCopyWithImpl<$Res, ElectrumError>; +} + +/// @nodoc +class _$ElectrumErrorCopyWithImpl<$Res, $Val extends ElectrumError> + implements $ElectrumErrorCopyWith<$Res> { + _$ElectrumErrorCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; +} + +/// @nodoc +abstract class _$$ElectrumError_IOErrorImplCopyWith<$Res> { + factory _$$ElectrumError_IOErrorImplCopyWith( + _$ElectrumError_IOErrorImpl value, + $Res Function(_$ElectrumError_IOErrorImpl) then) = + __$$ElectrumError_IOErrorImplCopyWithImpl<$Res>; + @useResult + $Res call({String errorMessage}); +} + +/// @nodoc +class __$$ElectrumError_IOErrorImplCopyWithImpl<$Res> + extends _$ElectrumErrorCopyWithImpl<$Res, _$ElectrumError_IOErrorImpl> + implements _$$ElectrumError_IOErrorImplCopyWith<$Res> { + __$$ElectrumError_IOErrorImplCopyWithImpl(_$ElectrumError_IOErrorImpl _value, + $Res Function(_$ElectrumError_IOErrorImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? errorMessage = null, + }) { + return _then(_$ElectrumError_IOErrorImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$ElectrumError_IOErrorImpl extends ElectrumError_IOError { + const _$ElectrumError_IOErrorImpl({required this.errorMessage}) : super._(); + + @override + final String errorMessage; + + @override + String toString() { + return 'ElectrumError.ioError(errorMessage: $errorMessage)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$ElectrumError_IOErrorImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); + } + + @override + int get hashCode => Object.hash(runtimeType, errorMessage); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$ElectrumError_IOErrorImplCopyWith<_$ElectrumError_IOErrorImpl> + get copyWith => __$$ElectrumError_IOErrorImplCopyWithImpl< + _$ElectrumError_IOErrorImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) ioError, + required TResult Function(String errorMessage) json, + required TResult Function(String errorMessage) hex, + required TResult Function(String errorMessage) protocol, + required TResult Function(String errorMessage) bitcoin, + required TResult Function() alreadySubscribed, + required TResult Function() notSubscribed, + required TResult Function(String errorMessage) invalidResponse, + required TResult Function(String errorMessage) message, + required TResult Function(String domain) invalidDnsNameError, + required TResult Function() missingDomain, + required TResult Function() allAttemptsErrored, + required TResult Function(String errorMessage) sharedIoError, + required TResult Function() couldntLockReader, + required TResult Function() mpsc, + required TResult Function(String errorMessage) couldNotCreateConnection, + required TResult Function() requestAlreadyConsumed, + }) { + return ioError(errorMessage); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? ioError, + TResult? Function(String errorMessage)? json, + TResult? Function(String errorMessage)? hex, + TResult? Function(String errorMessage)? protocol, + TResult? Function(String errorMessage)? bitcoin, + TResult? Function()? alreadySubscribed, + TResult? Function()? notSubscribed, + TResult? Function(String errorMessage)? invalidResponse, + TResult? Function(String errorMessage)? message, + TResult? Function(String domain)? invalidDnsNameError, + TResult? Function()? missingDomain, + TResult? Function()? allAttemptsErrored, + TResult? Function(String errorMessage)? sharedIoError, + TResult? Function()? couldntLockReader, + TResult? Function()? mpsc, + TResult? Function(String errorMessage)? couldNotCreateConnection, + TResult? Function()? requestAlreadyConsumed, + }) { + return ioError?.call(errorMessage); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? ioError, + TResult Function(String errorMessage)? json, + TResult Function(String errorMessage)? hex, + TResult Function(String errorMessage)? protocol, + TResult Function(String errorMessage)? bitcoin, + TResult Function()? alreadySubscribed, + TResult Function()? notSubscribed, + TResult Function(String errorMessage)? invalidResponse, + TResult Function(String errorMessage)? message, + TResult Function(String domain)? invalidDnsNameError, + TResult Function()? missingDomain, + TResult Function()? allAttemptsErrored, + TResult Function(String errorMessage)? sharedIoError, + TResult Function()? couldntLockReader, + TResult Function()? mpsc, + TResult Function(String errorMessage)? couldNotCreateConnection, + TResult Function()? requestAlreadyConsumed, + required TResult orElse(), + }) { + if (ioError != null) { + return ioError(errorMessage); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(ElectrumError_IOError value) ioError, + required TResult Function(ElectrumError_Json value) json, + required TResult Function(ElectrumError_Hex value) hex, + required TResult Function(ElectrumError_Protocol value) protocol, + required TResult Function(ElectrumError_Bitcoin value) bitcoin, + required TResult Function(ElectrumError_AlreadySubscribed value) + alreadySubscribed, + required TResult Function(ElectrumError_NotSubscribed value) notSubscribed, + required TResult Function(ElectrumError_InvalidResponse value) + invalidResponse, + required TResult Function(ElectrumError_Message value) message, + required TResult Function(ElectrumError_InvalidDNSNameError value) + invalidDnsNameError, + required TResult Function(ElectrumError_MissingDomain value) missingDomain, + required TResult Function(ElectrumError_AllAttemptsErrored value) + allAttemptsErrored, + required TResult Function(ElectrumError_SharedIOError value) sharedIoError, + required TResult Function(ElectrumError_CouldntLockReader value) + couldntLockReader, + required TResult Function(ElectrumError_Mpsc value) mpsc, + required TResult Function(ElectrumError_CouldNotCreateConnection value) + couldNotCreateConnection, + required TResult Function(ElectrumError_RequestAlreadyConsumed value) + requestAlreadyConsumed, + }) { + return ioError(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(ElectrumError_IOError value)? ioError, + TResult? Function(ElectrumError_Json value)? json, + TResult? Function(ElectrumError_Hex value)? hex, + TResult? Function(ElectrumError_Protocol value)? protocol, + TResult? Function(ElectrumError_Bitcoin value)? bitcoin, + TResult? Function(ElectrumError_AlreadySubscribed value)? alreadySubscribed, + TResult? Function(ElectrumError_NotSubscribed value)? notSubscribed, + TResult? Function(ElectrumError_InvalidResponse value)? invalidResponse, + TResult? Function(ElectrumError_Message value)? message, + TResult? Function(ElectrumError_InvalidDNSNameError value)? + invalidDnsNameError, + TResult? Function(ElectrumError_MissingDomain value)? missingDomain, + TResult? Function(ElectrumError_AllAttemptsErrored value)? + allAttemptsErrored, + TResult? Function(ElectrumError_SharedIOError value)? sharedIoError, + TResult? Function(ElectrumError_CouldntLockReader value)? couldntLockReader, + TResult? Function(ElectrumError_Mpsc value)? mpsc, + TResult? Function(ElectrumError_CouldNotCreateConnection value)? + couldNotCreateConnection, + TResult? Function(ElectrumError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + }) { + return ioError?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ElectrumError_IOError value)? ioError, + TResult Function(ElectrumError_Json value)? json, + TResult Function(ElectrumError_Hex value)? hex, + TResult Function(ElectrumError_Protocol value)? protocol, + TResult Function(ElectrumError_Bitcoin value)? bitcoin, + TResult Function(ElectrumError_AlreadySubscribed value)? alreadySubscribed, + TResult Function(ElectrumError_NotSubscribed value)? notSubscribed, + TResult Function(ElectrumError_InvalidResponse value)? invalidResponse, + TResult Function(ElectrumError_Message value)? message, + TResult Function(ElectrumError_InvalidDNSNameError value)? + invalidDnsNameError, + TResult Function(ElectrumError_MissingDomain value)? missingDomain, + TResult Function(ElectrumError_AllAttemptsErrored value)? + allAttemptsErrored, + TResult Function(ElectrumError_SharedIOError value)? sharedIoError, + TResult Function(ElectrumError_CouldntLockReader value)? couldntLockReader, + TResult Function(ElectrumError_Mpsc value)? mpsc, + TResult Function(ElectrumError_CouldNotCreateConnection value)? + couldNotCreateConnection, + TResult Function(ElectrumError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + required TResult orElse(), + }) { + if (ioError != null) { + return ioError(this); + } + return orElse(); + } +} + +abstract class ElectrumError_IOError extends ElectrumError { + const factory ElectrumError_IOError({required final String errorMessage}) = + _$ElectrumError_IOErrorImpl; + const ElectrumError_IOError._() : super._(); + + String get errorMessage; + @JsonKey(ignore: true) + _$$ElectrumError_IOErrorImplCopyWith<_$ElectrumError_IOErrorImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$ElectrumError_JsonImplCopyWith<$Res> { + factory _$$ElectrumError_JsonImplCopyWith(_$ElectrumError_JsonImpl value, + $Res Function(_$ElectrumError_JsonImpl) then) = + __$$ElectrumError_JsonImplCopyWithImpl<$Res>; + @useResult + $Res call({String errorMessage}); +} + +/// @nodoc +class __$$ElectrumError_JsonImplCopyWithImpl<$Res> + extends _$ElectrumErrorCopyWithImpl<$Res, _$ElectrumError_JsonImpl> + implements _$$ElectrumError_JsonImplCopyWith<$Res> { + __$$ElectrumError_JsonImplCopyWithImpl(_$ElectrumError_JsonImpl _value, + $Res Function(_$ElectrumError_JsonImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? errorMessage = null, + }) { + return _then(_$ElectrumError_JsonImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$ElectrumError_JsonImpl extends ElectrumError_Json { + const _$ElectrumError_JsonImpl({required this.errorMessage}) : super._(); + + @override + final String errorMessage; + + @override + String toString() { + return 'ElectrumError.json(errorMessage: $errorMessage)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$ElectrumError_JsonImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); + } + + @override + int get hashCode => Object.hash(runtimeType, errorMessage); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$ElectrumError_JsonImplCopyWith<_$ElectrumError_JsonImpl> get copyWith => + __$$ElectrumError_JsonImplCopyWithImpl<_$ElectrumError_JsonImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) ioError, + required TResult Function(String errorMessage) json, + required TResult Function(String errorMessage) hex, + required TResult Function(String errorMessage) protocol, + required TResult Function(String errorMessage) bitcoin, + required TResult Function() alreadySubscribed, + required TResult Function() notSubscribed, + required TResult Function(String errorMessage) invalidResponse, + required TResult Function(String errorMessage) message, + required TResult Function(String domain) invalidDnsNameError, + required TResult Function() missingDomain, + required TResult Function() allAttemptsErrored, + required TResult Function(String errorMessage) sharedIoError, + required TResult Function() couldntLockReader, + required TResult Function() mpsc, + required TResult Function(String errorMessage) couldNotCreateConnection, + required TResult Function() requestAlreadyConsumed, + }) { + return json(errorMessage); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? ioError, + TResult? Function(String errorMessage)? json, + TResult? Function(String errorMessage)? hex, + TResult? Function(String errorMessage)? protocol, + TResult? Function(String errorMessage)? bitcoin, + TResult? Function()? alreadySubscribed, + TResult? Function()? notSubscribed, + TResult? Function(String errorMessage)? invalidResponse, + TResult? Function(String errorMessage)? message, + TResult? Function(String domain)? invalidDnsNameError, + TResult? Function()? missingDomain, + TResult? Function()? allAttemptsErrored, + TResult? Function(String errorMessage)? sharedIoError, + TResult? Function()? couldntLockReader, + TResult? Function()? mpsc, + TResult? Function(String errorMessage)? couldNotCreateConnection, + TResult? Function()? requestAlreadyConsumed, + }) { + return json?.call(errorMessage); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? ioError, + TResult Function(String errorMessage)? json, + TResult Function(String errorMessage)? hex, + TResult Function(String errorMessage)? protocol, + TResult Function(String errorMessage)? bitcoin, + TResult Function()? alreadySubscribed, + TResult Function()? notSubscribed, + TResult Function(String errorMessage)? invalidResponse, + TResult Function(String errorMessage)? message, + TResult Function(String domain)? invalidDnsNameError, + TResult Function()? missingDomain, + TResult Function()? allAttemptsErrored, + TResult Function(String errorMessage)? sharedIoError, + TResult Function()? couldntLockReader, + TResult Function()? mpsc, + TResult Function(String errorMessage)? couldNotCreateConnection, + TResult Function()? requestAlreadyConsumed, + required TResult orElse(), + }) { + if (json != null) { + return json(errorMessage); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(ElectrumError_IOError value) ioError, + required TResult Function(ElectrumError_Json value) json, + required TResult Function(ElectrumError_Hex value) hex, + required TResult Function(ElectrumError_Protocol value) protocol, + required TResult Function(ElectrumError_Bitcoin value) bitcoin, + required TResult Function(ElectrumError_AlreadySubscribed value) + alreadySubscribed, + required TResult Function(ElectrumError_NotSubscribed value) notSubscribed, + required TResult Function(ElectrumError_InvalidResponse value) + invalidResponse, + required TResult Function(ElectrumError_Message value) message, + required TResult Function(ElectrumError_InvalidDNSNameError value) + invalidDnsNameError, + required TResult Function(ElectrumError_MissingDomain value) missingDomain, + required TResult Function(ElectrumError_AllAttemptsErrored value) + allAttemptsErrored, + required TResult Function(ElectrumError_SharedIOError value) sharedIoError, + required TResult Function(ElectrumError_CouldntLockReader value) + couldntLockReader, + required TResult Function(ElectrumError_Mpsc value) mpsc, + required TResult Function(ElectrumError_CouldNotCreateConnection value) + couldNotCreateConnection, + required TResult Function(ElectrumError_RequestAlreadyConsumed value) + requestAlreadyConsumed, + }) { + return json(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(ElectrumError_IOError value)? ioError, + TResult? Function(ElectrumError_Json value)? json, + TResult? Function(ElectrumError_Hex value)? hex, + TResult? Function(ElectrumError_Protocol value)? protocol, + TResult? Function(ElectrumError_Bitcoin value)? bitcoin, + TResult? Function(ElectrumError_AlreadySubscribed value)? alreadySubscribed, + TResult? Function(ElectrumError_NotSubscribed value)? notSubscribed, + TResult? Function(ElectrumError_InvalidResponse value)? invalidResponse, + TResult? Function(ElectrumError_Message value)? message, + TResult? Function(ElectrumError_InvalidDNSNameError value)? + invalidDnsNameError, + TResult? Function(ElectrumError_MissingDomain value)? missingDomain, + TResult? Function(ElectrumError_AllAttemptsErrored value)? + allAttemptsErrored, + TResult? Function(ElectrumError_SharedIOError value)? sharedIoError, + TResult? Function(ElectrumError_CouldntLockReader value)? couldntLockReader, + TResult? Function(ElectrumError_Mpsc value)? mpsc, + TResult? Function(ElectrumError_CouldNotCreateConnection value)? + couldNotCreateConnection, + TResult? Function(ElectrumError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + }) { + return json?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ElectrumError_IOError value)? ioError, + TResult Function(ElectrumError_Json value)? json, + TResult Function(ElectrumError_Hex value)? hex, + TResult Function(ElectrumError_Protocol value)? protocol, + TResult Function(ElectrumError_Bitcoin value)? bitcoin, + TResult Function(ElectrumError_AlreadySubscribed value)? alreadySubscribed, + TResult Function(ElectrumError_NotSubscribed value)? notSubscribed, + TResult Function(ElectrumError_InvalidResponse value)? invalidResponse, + TResult Function(ElectrumError_Message value)? message, + TResult Function(ElectrumError_InvalidDNSNameError value)? + invalidDnsNameError, + TResult Function(ElectrumError_MissingDomain value)? missingDomain, + TResult Function(ElectrumError_AllAttemptsErrored value)? + allAttemptsErrored, + TResult Function(ElectrumError_SharedIOError value)? sharedIoError, + TResult Function(ElectrumError_CouldntLockReader value)? couldntLockReader, + TResult Function(ElectrumError_Mpsc value)? mpsc, + TResult Function(ElectrumError_CouldNotCreateConnection value)? + couldNotCreateConnection, + TResult Function(ElectrumError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + required TResult orElse(), + }) { + if (json != null) { + return json(this); + } + return orElse(); + } +} + +abstract class ElectrumError_Json extends ElectrumError { + const factory ElectrumError_Json({required final String errorMessage}) = + _$ElectrumError_JsonImpl; + const ElectrumError_Json._() : super._(); + + String get errorMessage; + @JsonKey(ignore: true) + _$$ElectrumError_JsonImplCopyWith<_$ElectrumError_JsonImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$ElectrumError_HexImplCopyWith<$Res> { + factory _$$ElectrumError_HexImplCopyWith(_$ElectrumError_HexImpl value, + $Res Function(_$ElectrumError_HexImpl) then) = + __$$ElectrumError_HexImplCopyWithImpl<$Res>; + @useResult + $Res call({String errorMessage}); +} + +/// @nodoc +class __$$ElectrumError_HexImplCopyWithImpl<$Res> + extends _$ElectrumErrorCopyWithImpl<$Res, _$ElectrumError_HexImpl> + implements _$$ElectrumError_HexImplCopyWith<$Res> { + __$$ElectrumError_HexImplCopyWithImpl(_$ElectrumError_HexImpl _value, + $Res Function(_$ElectrumError_HexImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? errorMessage = null, + }) { + return _then(_$ElectrumError_HexImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$ElectrumError_HexImpl extends ElectrumError_Hex { + const _$ElectrumError_HexImpl({required this.errorMessage}) : super._(); + + @override + final String errorMessage; + + @override + String toString() { + return 'ElectrumError.hex(errorMessage: $errorMessage)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$ElectrumError_HexImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); + } + + @override + int get hashCode => Object.hash(runtimeType, errorMessage); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$ElectrumError_HexImplCopyWith<_$ElectrumError_HexImpl> get copyWith => + __$$ElectrumError_HexImplCopyWithImpl<_$ElectrumError_HexImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) ioError, + required TResult Function(String errorMessage) json, + required TResult Function(String errorMessage) hex, + required TResult Function(String errorMessage) protocol, + required TResult Function(String errorMessage) bitcoin, + required TResult Function() alreadySubscribed, + required TResult Function() notSubscribed, + required TResult Function(String errorMessage) invalidResponse, + required TResult Function(String errorMessage) message, + required TResult Function(String domain) invalidDnsNameError, + required TResult Function() missingDomain, + required TResult Function() allAttemptsErrored, + required TResult Function(String errorMessage) sharedIoError, + required TResult Function() couldntLockReader, + required TResult Function() mpsc, + required TResult Function(String errorMessage) couldNotCreateConnection, + required TResult Function() requestAlreadyConsumed, + }) { + return hex(errorMessage); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? ioError, + TResult? Function(String errorMessage)? json, + TResult? Function(String errorMessage)? hex, + TResult? Function(String errorMessage)? protocol, + TResult? Function(String errorMessage)? bitcoin, + TResult? Function()? alreadySubscribed, + TResult? Function()? notSubscribed, + TResult? Function(String errorMessage)? invalidResponse, + TResult? Function(String errorMessage)? message, + TResult? Function(String domain)? invalidDnsNameError, + TResult? Function()? missingDomain, + TResult? Function()? allAttemptsErrored, + TResult? Function(String errorMessage)? sharedIoError, + TResult? Function()? couldntLockReader, + TResult? Function()? mpsc, + TResult? Function(String errorMessage)? couldNotCreateConnection, + TResult? Function()? requestAlreadyConsumed, + }) { + return hex?.call(errorMessage); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? ioError, + TResult Function(String errorMessage)? json, + TResult Function(String errorMessage)? hex, + TResult Function(String errorMessage)? protocol, + TResult Function(String errorMessage)? bitcoin, + TResult Function()? alreadySubscribed, + TResult Function()? notSubscribed, + TResult Function(String errorMessage)? invalidResponse, + TResult Function(String errorMessage)? message, + TResult Function(String domain)? invalidDnsNameError, + TResult Function()? missingDomain, + TResult Function()? allAttemptsErrored, + TResult Function(String errorMessage)? sharedIoError, + TResult Function()? couldntLockReader, + TResult Function()? mpsc, + TResult Function(String errorMessage)? couldNotCreateConnection, + TResult Function()? requestAlreadyConsumed, + required TResult orElse(), + }) { + if (hex != null) { + return hex(errorMessage); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(ElectrumError_IOError value) ioError, + required TResult Function(ElectrumError_Json value) json, + required TResult Function(ElectrumError_Hex value) hex, + required TResult Function(ElectrumError_Protocol value) protocol, + required TResult Function(ElectrumError_Bitcoin value) bitcoin, + required TResult Function(ElectrumError_AlreadySubscribed value) + alreadySubscribed, + required TResult Function(ElectrumError_NotSubscribed value) notSubscribed, + required TResult Function(ElectrumError_InvalidResponse value) + invalidResponse, + required TResult Function(ElectrumError_Message value) message, + required TResult Function(ElectrumError_InvalidDNSNameError value) + invalidDnsNameError, + required TResult Function(ElectrumError_MissingDomain value) missingDomain, + required TResult Function(ElectrumError_AllAttemptsErrored value) + allAttemptsErrored, + required TResult Function(ElectrumError_SharedIOError value) sharedIoError, + required TResult Function(ElectrumError_CouldntLockReader value) + couldntLockReader, + required TResult Function(ElectrumError_Mpsc value) mpsc, + required TResult Function(ElectrumError_CouldNotCreateConnection value) + couldNotCreateConnection, + required TResult Function(ElectrumError_RequestAlreadyConsumed value) + requestAlreadyConsumed, + }) { + return hex(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(ElectrumError_IOError value)? ioError, + TResult? Function(ElectrumError_Json value)? json, + TResult? Function(ElectrumError_Hex value)? hex, + TResult? Function(ElectrumError_Protocol value)? protocol, + TResult? Function(ElectrumError_Bitcoin value)? bitcoin, + TResult? Function(ElectrumError_AlreadySubscribed value)? alreadySubscribed, + TResult? Function(ElectrumError_NotSubscribed value)? notSubscribed, + TResult? Function(ElectrumError_InvalidResponse value)? invalidResponse, + TResult? Function(ElectrumError_Message value)? message, + TResult? Function(ElectrumError_InvalidDNSNameError value)? + invalidDnsNameError, + TResult? Function(ElectrumError_MissingDomain value)? missingDomain, + TResult? Function(ElectrumError_AllAttemptsErrored value)? + allAttemptsErrored, + TResult? Function(ElectrumError_SharedIOError value)? sharedIoError, + TResult? Function(ElectrumError_CouldntLockReader value)? couldntLockReader, + TResult? Function(ElectrumError_Mpsc value)? mpsc, + TResult? Function(ElectrumError_CouldNotCreateConnection value)? + couldNotCreateConnection, + TResult? Function(ElectrumError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + }) { + return hex?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ElectrumError_IOError value)? ioError, + TResult Function(ElectrumError_Json value)? json, + TResult Function(ElectrumError_Hex value)? hex, + TResult Function(ElectrumError_Protocol value)? protocol, + TResult Function(ElectrumError_Bitcoin value)? bitcoin, + TResult Function(ElectrumError_AlreadySubscribed value)? alreadySubscribed, + TResult Function(ElectrumError_NotSubscribed value)? notSubscribed, + TResult Function(ElectrumError_InvalidResponse value)? invalidResponse, + TResult Function(ElectrumError_Message value)? message, + TResult Function(ElectrumError_InvalidDNSNameError value)? + invalidDnsNameError, + TResult Function(ElectrumError_MissingDomain value)? missingDomain, + TResult Function(ElectrumError_AllAttemptsErrored value)? + allAttemptsErrored, + TResult Function(ElectrumError_SharedIOError value)? sharedIoError, + TResult Function(ElectrumError_CouldntLockReader value)? couldntLockReader, + TResult Function(ElectrumError_Mpsc value)? mpsc, + TResult Function(ElectrumError_CouldNotCreateConnection value)? + couldNotCreateConnection, + TResult Function(ElectrumError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + required TResult orElse(), + }) { + if (hex != null) { + return hex(this); + } + return orElse(); + } +} + +abstract class ElectrumError_Hex extends ElectrumError { + const factory ElectrumError_Hex({required final String errorMessage}) = + _$ElectrumError_HexImpl; + const ElectrumError_Hex._() : super._(); + + String get errorMessage; + @JsonKey(ignore: true) + _$$ElectrumError_HexImplCopyWith<_$ElectrumError_HexImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$ElectrumError_ProtocolImplCopyWith<$Res> { + factory _$$ElectrumError_ProtocolImplCopyWith( + _$ElectrumError_ProtocolImpl value, + $Res Function(_$ElectrumError_ProtocolImpl) then) = + __$$ElectrumError_ProtocolImplCopyWithImpl<$Res>; + @useResult + $Res call({String errorMessage}); +} + +/// @nodoc +class __$$ElectrumError_ProtocolImplCopyWithImpl<$Res> + extends _$ElectrumErrorCopyWithImpl<$Res, _$ElectrumError_ProtocolImpl> + implements _$$ElectrumError_ProtocolImplCopyWith<$Res> { + __$$ElectrumError_ProtocolImplCopyWithImpl( + _$ElectrumError_ProtocolImpl _value, + $Res Function(_$ElectrumError_ProtocolImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? errorMessage = null, + }) { + return _then(_$ElectrumError_ProtocolImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$ElectrumError_ProtocolImpl extends ElectrumError_Protocol { + const _$ElectrumError_ProtocolImpl({required this.errorMessage}) : super._(); + + @override + final String errorMessage; + + @override + String toString() { + return 'ElectrumError.protocol(errorMessage: $errorMessage)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$ElectrumError_ProtocolImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); + } + + @override + int get hashCode => Object.hash(runtimeType, errorMessage); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$ElectrumError_ProtocolImplCopyWith<_$ElectrumError_ProtocolImpl> + get copyWith => __$$ElectrumError_ProtocolImplCopyWithImpl< + _$ElectrumError_ProtocolImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) ioError, + required TResult Function(String errorMessage) json, + required TResult Function(String errorMessage) hex, + required TResult Function(String errorMessage) protocol, + required TResult Function(String errorMessage) bitcoin, + required TResult Function() alreadySubscribed, + required TResult Function() notSubscribed, + required TResult Function(String errorMessage) invalidResponse, + required TResult Function(String errorMessage) message, + required TResult Function(String domain) invalidDnsNameError, + required TResult Function() missingDomain, + required TResult Function() allAttemptsErrored, + required TResult Function(String errorMessage) sharedIoError, + required TResult Function() couldntLockReader, + required TResult Function() mpsc, + required TResult Function(String errorMessage) couldNotCreateConnection, + required TResult Function() requestAlreadyConsumed, + }) { + return protocol(errorMessage); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? ioError, + TResult? Function(String errorMessage)? json, + TResult? Function(String errorMessage)? hex, + TResult? Function(String errorMessage)? protocol, + TResult? Function(String errorMessage)? bitcoin, + TResult? Function()? alreadySubscribed, + TResult? Function()? notSubscribed, + TResult? Function(String errorMessage)? invalidResponse, + TResult? Function(String errorMessage)? message, + TResult? Function(String domain)? invalidDnsNameError, + TResult? Function()? missingDomain, + TResult? Function()? allAttemptsErrored, + TResult? Function(String errorMessage)? sharedIoError, + TResult? Function()? couldntLockReader, + TResult? Function()? mpsc, + TResult? Function(String errorMessage)? couldNotCreateConnection, + TResult? Function()? requestAlreadyConsumed, + }) { + return protocol?.call(errorMessage); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? ioError, + TResult Function(String errorMessage)? json, + TResult Function(String errorMessage)? hex, + TResult Function(String errorMessage)? protocol, + TResult Function(String errorMessage)? bitcoin, + TResult Function()? alreadySubscribed, + TResult Function()? notSubscribed, + TResult Function(String errorMessage)? invalidResponse, + TResult Function(String errorMessage)? message, + TResult Function(String domain)? invalidDnsNameError, + TResult Function()? missingDomain, + TResult Function()? allAttemptsErrored, + TResult Function(String errorMessage)? sharedIoError, + TResult Function()? couldntLockReader, + TResult Function()? mpsc, + TResult Function(String errorMessage)? couldNotCreateConnection, + TResult Function()? requestAlreadyConsumed, + required TResult orElse(), + }) { + if (protocol != null) { + return protocol(errorMessage); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(ElectrumError_IOError value) ioError, + required TResult Function(ElectrumError_Json value) json, + required TResult Function(ElectrumError_Hex value) hex, + required TResult Function(ElectrumError_Protocol value) protocol, + required TResult Function(ElectrumError_Bitcoin value) bitcoin, + required TResult Function(ElectrumError_AlreadySubscribed value) + alreadySubscribed, + required TResult Function(ElectrumError_NotSubscribed value) notSubscribed, + required TResult Function(ElectrumError_InvalidResponse value) + invalidResponse, + required TResult Function(ElectrumError_Message value) message, + required TResult Function(ElectrumError_InvalidDNSNameError value) + invalidDnsNameError, + required TResult Function(ElectrumError_MissingDomain value) missingDomain, + required TResult Function(ElectrumError_AllAttemptsErrored value) + allAttemptsErrored, + required TResult Function(ElectrumError_SharedIOError value) sharedIoError, + required TResult Function(ElectrumError_CouldntLockReader value) + couldntLockReader, + required TResult Function(ElectrumError_Mpsc value) mpsc, + required TResult Function(ElectrumError_CouldNotCreateConnection value) + couldNotCreateConnection, + required TResult Function(ElectrumError_RequestAlreadyConsumed value) + requestAlreadyConsumed, + }) { + return protocol(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(ElectrumError_IOError value)? ioError, + TResult? Function(ElectrumError_Json value)? json, + TResult? Function(ElectrumError_Hex value)? hex, + TResult? Function(ElectrumError_Protocol value)? protocol, + TResult? Function(ElectrumError_Bitcoin value)? bitcoin, + TResult? Function(ElectrumError_AlreadySubscribed value)? alreadySubscribed, + TResult? Function(ElectrumError_NotSubscribed value)? notSubscribed, + TResult? Function(ElectrumError_InvalidResponse value)? invalidResponse, + TResult? Function(ElectrumError_Message value)? message, + TResult? Function(ElectrumError_InvalidDNSNameError value)? + invalidDnsNameError, + TResult? Function(ElectrumError_MissingDomain value)? missingDomain, + TResult? Function(ElectrumError_AllAttemptsErrored value)? + allAttemptsErrored, + TResult? Function(ElectrumError_SharedIOError value)? sharedIoError, + TResult? Function(ElectrumError_CouldntLockReader value)? couldntLockReader, + TResult? Function(ElectrumError_Mpsc value)? mpsc, + TResult? Function(ElectrumError_CouldNotCreateConnection value)? + couldNotCreateConnection, + TResult? Function(ElectrumError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + }) { + return protocol?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ElectrumError_IOError value)? ioError, + TResult Function(ElectrumError_Json value)? json, + TResult Function(ElectrumError_Hex value)? hex, + TResult Function(ElectrumError_Protocol value)? protocol, + TResult Function(ElectrumError_Bitcoin value)? bitcoin, + TResult Function(ElectrumError_AlreadySubscribed value)? alreadySubscribed, + TResult Function(ElectrumError_NotSubscribed value)? notSubscribed, + TResult Function(ElectrumError_InvalidResponse value)? invalidResponse, + TResult Function(ElectrumError_Message value)? message, + TResult Function(ElectrumError_InvalidDNSNameError value)? + invalidDnsNameError, + TResult Function(ElectrumError_MissingDomain value)? missingDomain, + TResult Function(ElectrumError_AllAttemptsErrored value)? + allAttemptsErrored, + TResult Function(ElectrumError_SharedIOError value)? sharedIoError, + TResult Function(ElectrumError_CouldntLockReader value)? couldntLockReader, + TResult Function(ElectrumError_Mpsc value)? mpsc, + TResult Function(ElectrumError_CouldNotCreateConnection value)? + couldNotCreateConnection, + TResult Function(ElectrumError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + required TResult orElse(), + }) { + if (protocol != null) { + return protocol(this); + } + return orElse(); + } +} + +abstract class ElectrumError_Protocol extends ElectrumError { + const factory ElectrumError_Protocol({required final String errorMessage}) = + _$ElectrumError_ProtocolImpl; + const ElectrumError_Protocol._() : super._(); + + String get errorMessage; + @JsonKey(ignore: true) + _$$ElectrumError_ProtocolImplCopyWith<_$ElectrumError_ProtocolImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$ElectrumError_BitcoinImplCopyWith<$Res> { + factory _$$ElectrumError_BitcoinImplCopyWith( + _$ElectrumError_BitcoinImpl value, + $Res Function(_$ElectrumError_BitcoinImpl) then) = + __$$ElectrumError_BitcoinImplCopyWithImpl<$Res>; + @useResult + $Res call({String errorMessage}); +} + +/// @nodoc +class __$$ElectrumError_BitcoinImplCopyWithImpl<$Res> + extends _$ElectrumErrorCopyWithImpl<$Res, _$ElectrumError_BitcoinImpl> + implements _$$ElectrumError_BitcoinImplCopyWith<$Res> { + __$$ElectrumError_BitcoinImplCopyWithImpl(_$ElectrumError_BitcoinImpl _value, + $Res Function(_$ElectrumError_BitcoinImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? errorMessage = null, + }) { + return _then(_$ElectrumError_BitcoinImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$ElectrumError_BitcoinImpl extends ElectrumError_Bitcoin { + const _$ElectrumError_BitcoinImpl({required this.errorMessage}) : super._(); + + @override + final String errorMessage; + + @override + String toString() { + return 'ElectrumError.bitcoin(errorMessage: $errorMessage)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$ElectrumError_BitcoinImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); + } + + @override + int get hashCode => Object.hash(runtimeType, errorMessage); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$ElectrumError_BitcoinImplCopyWith<_$ElectrumError_BitcoinImpl> + get copyWith => __$$ElectrumError_BitcoinImplCopyWithImpl< + _$ElectrumError_BitcoinImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) ioError, + required TResult Function(String errorMessage) json, + required TResult Function(String errorMessage) hex, + required TResult Function(String errorMessage) protocol, + required TResult Function(String errorMessage) bitcoin, + required TResult Function() alreadySubscribed, + required TResult Function() notSubscribed, + required TResult Function(String errorMessage) invalidResponse, + required TResult Function(String errorMessage) message, + required TResult Function(String domain) invalidDnsNameError, + required TResult Function() missingDomain, + required TResult Function() allAttemptsErrored, + required TResult Function(String errorMessage) sharedIoError, + required TResult Function() couldntLockReader, + required TResult Function() mpsc, + required TResult Function(String errorMessage) couldNotCreateConnection, + required TResult Function() requestAlreadyConsumed, + }) { + return bitcoin(errorMessage); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? ioError, + TResult? Function(String errorMessage)? json, + TResult? Function(String errorMessage)? hex, + TResult? Function(String errorMessage)? protocol, + TResult? Function(String errorMessage)? bitcoin, + TResult? Function()? alreadySubscribed, + TResult? Function()? notSubscribed, + TResult? Function(String errorMessage)? invalidResponse, + TResult? Function(String errorMessage)? message, + TResult? Function(String domain)? invalidDnsNameError, + TResult? Function()? missingDomain, + TResult? Function()? allAttemptsErrored, + TResult? Function(String errorMessage)? sharedIoError, + TResult? Function()? couldntLockReader, + TResult? Function()? mpsc, + TResult? Function(String errorMessage)? couldNotCreateConnection, + TResult? Function()? requestAlreadyConsumed, + }) { + return bitcoin?.call(errorMessage); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? ioError, + TResult Function(String errorMessage)? json, + TResult Function(String errorMessage)? hex, + TResult Function(String errorMessage)? protocol, + TResult Function(String errorMessage)? bitcoin, + TResult Function()? alreadySubscribed, + TResult Function()? notSubscribed, + TResult Function(String errorMessage)? invalidResponse, + TResult Function(String errorMessage)? message, + TResult Function(String domain)? invalidDnsNameError, + TResult Function()? missingDomain, + TResult Function()? allAttemptsErrored, + TResult Function(String errorMessage)? sharedIoError, + TResult Function()? couldntLockReader, + TResult Function()? mpsc, + TResult Function(String errorMessage)? couldNotCreateConnection, + TResult Function()? requestAlreadyConsumed, + required TResult orElse(), + }) { + if (bitcoin != null) { + return bitcoin(errorMessage); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(ElectrumError_IOError value) ioError, + required TResult Function(ElectrumError_Json value) json, + required TResult Function(ElectrumError_Hex value) hex, + required TResult Function(ElectrumError_Protocol value) protocol, + required TResult Function(ElectrumError_Bitcoin value) bitcoin, + required TResult Function(ElectrumError_AlreadySubscribed value) + alreadySubscribed, + required TResult Function(ElectrumError_NotSubscribed value) notSubscribed, + required TResult Function(ElectrumError_InvalidResponse value) + invalidResponse, + required TResult Function(ElectrumError_Message value) message, + required TResult Function(ElectrumError_InvalidDNSNameError value) + invalidDnsNameError, + required TResult Function(ElectrumError_MissingDomain value) missingDomain, + required TResult Function(ElectrumError_AllAttemptsErrored value) + allAttemptsErrored, + required TResult Function(ElectrumError_SharedIOError value) sharedIoError, + required TResult Function(ElectrumError_CouldntLockReader value) + couldntLockReader, + required TResult Function(ElectrumError_Mpsc value) mpsc, + required TResult Function(ElectrumError_CouldNotCreateConnection value) + couldNotCreateConnection, + required TResult Function(ElectrumError_RequestAlreadyConsumed value) + requestAlreadyConsumed, + }) { + return bitcoin(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(ElectrumError_IOError value)? ioError, + TResult? Function(ElectrumError_Json value)? json, + TResult? Function(ElectrumError_Hex value)? hex, + TResult? Function(ElectrumError_Protocol value)? protocol, + TResult? Function(ElectrumError_Bitcoin value)? bitcoin, + TResult? Function(ElectrumError_AlreadySubscribed value)? alreadySubscribed, + TResult? Function(ElectrumError_NotSubscribed value)? notSubscribed, + TResult? Function(ElectrumError_InvalidResponse value)? invalidResponse, + TResult? Function(ElectrumError_Message value)? message, + TResult? Function(ElectrumError_InvalidDNSNameError value)? + invalidDnsNameError, + TResult? Function(ElectrumError_MissingDomain value)? missingDomain, + TResult? Function(ElectrumError_AllAttemptsErrored value)? + allAttemptsErrored, + TResult? Function(ElectrumError_SharedIOError value)? sharedIoError, + TResult? Function(ElectrumError_CouldntLockReader value)? couldntLockReader, + TResult? Function(ElectrumError_Mpsc value)? mpsc, + TResult? Function(ElectrumError_CouldNotCreateConnection value)? + couldNotCreateConnection, + TResult? Function(ElectrumError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + }) { + return bitcoin?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ElectrumError_IOError value)? ioError, + TResult Function(ElectrumError_Json value)? json, + TResult Function(ElectrumError_Hex value)? hex, + TResult Function(ElectrumError_Protocol value)? protocol, + TResult Function(ElectrumError_Bitcoin value)? bitcoin, + TResult Function(ElectrumError_AlreadySubscribed value)? alreadySubscribed, + TResult Function(ElectrumError_NotSubscribed value)? notSubscribed, + TResult Function(ElectrumError_InvalidResponse value)? invalidResponse, + TResult Function(ElectrumError_Message value)? message, + TResult Function(ElectrumError_InvalidDNSNameError value)? + invalidDnsNameError, + TResult Function(ElectrumError_MissingDomain value)? missingDomain, + TResult Function(ElectrumError_AllAttemptsErrored value)? + allAttemptsErrored, + TResult Function(ElectrumError_SharedIOError value)? sharedIoError, + TResult Function(ElectrumError_CouldntLockReader value)? couldntLockReader, + TResult Function(ElectrumError_Mpsc value)? mpsc, + TResult Function(ElectrumError_CouldNotCreateConnection value)? + couldNotCreateConnection, + TResult Function(ElectrumError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + required TResult orElse(), + }) { + if (bitcoin != null) { + return bitcoin(this); + } + return orElse(); + } +} + +abstract class ElectrumError_Bitcoin extends ElectrumError { + const factory ElectrumError_Bitcoin({required final String errorMessage}) = + _$ElectrumError_BitcoinImpl; + const ElectrumError_Bitcoin._() : super._(); + + String get errorMessage; + @JsonKey(ignore: true) + _$$ElectrumError_BitcoinImplCopyWith<_$ElectrumError_BitcoinImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$ElectrumError_AlreadySubscribedImplCopyWith<$Res> { + factory _$$ElectrumError_AlreadySubscribedImplCopyWith( + _$ElectrumError_AlreadySubscribedImpl value, + $Res Function(_$ElectrumError_AlreadySubscribedImpl) then) = + __$$ElectrumError_AlreadySubscribedImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$ElectrumError_AlreadySubscribedImplCopyWithImpl<$Res> + extends _$ElectrumErrorCopyWithImpl<$Res, + _$ElectrumError_AlreadySubscribedImpl> + implements _$$ElectrumError_AlreadySubscribedImplCopyWith<$Res> { + __$$ElectrumError_AlreadySubscribedImplCopyWithImpl( + _$ElectrumError_AlreadySubscribedImpl _value, + $Res Function(_$ElectrumError_AlreadySubscribedImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$ElectrumError_AlreadySubscribedImpl + extends ElectrumError_AlreadySubscribed { + const _$ElectrumError_AlreadySubscribedImpl() : super._(); + + @override + String toString() { + return 'ElectrumError.alreadySubscribed()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$ElectrumError_AlreadySubscribedImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) ioError, + required TResult Function(String errorMessage) json, + required TResult Function(String errorMessage) hex, + required TResult Function(String errorMessage) protocol, + required TResult Function(String errorMessage) bitcoin, + required TResult Function() alreadySubscribed, + required TResult Function() notSubscribed, + required TResult Function(String errorMessage) invalidResponse, + required TResult Function(String errorMessage) message, + required TResult Function(String domain) invalidDnsNameError, + required TResult Function() missingDomain, + required TResult Function() allAttemptsErrored, + required TResult Function(String errorMessage) sharedIoError, + required TResult Function() couldntLockReader, + required TResult Function() mpsc, + required TResult Function(String errorMessage) couldNotCreateConnection, + required TResult Function() requestAlreadyConsumed, + }) { + return alreadySubscribed(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? ioError, + TResult? Function(String errorMessage)? json, + TResult? Function(String errorMessage)? hex, + TResult? Function(String errorMessage)? protocol, + TResult? Function(String errorMessage)? bitcoin, + TResult? Function()? alreadySubscribed, + TResult? Function()? notSubscribed, + TResult? Function(String errorMessage)? invalidResponse, + TResult? Function(String errorMessage)? message, + TResult? Function(String domain)? invalidDnsNameError, + TResult? Function()? missingDomain, + TResult? Function()? allAttemptsErrored, + TResult? Function(String errorMessage)? sharedIoError, + TResult? Function()? couldntLockReader, + TResult? Function()? mpsc, + TResult? Function(String errorMessage)? couldNotCreateConnection, + TResult? Function()? requestAlreadyConsumed, + }) { + return alreadySubscribed?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? ioError, + TResult Function(String errorMessage)? json, + TResult Function(String errorMessage)? hex, + TResult Function(String errorMessage)? protocol, + TResult Function(String errorMessage)? bitcoin, + TResult Function()? alreadySubscribed, + TResult Function()? notSubscribed, + TResult Function(String errorMessage)? invalidResponse, + TResult Function(String errorMessage)? message, + TResult Function(String domain)? invalidDnsNameError, + TResult Function()? missingDomain, + TResult Function()? allAttemptsErrored, + TResult Function(String errorMessage)? sharedIoError, + TResult Function()? couldntLockReader, + TResult Function()? mpsc, + TResult Function(String errorMessage)? couldNotCreateConnection, + TResult Function()? requestAlreadyConsumed, + required TResult orElse(), + }) { + if (alreadySubscribed != null) { + return alreadySubscribed(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(ElectrumError_IOError value) ioError, + required TResult Function(ElectrumError_Json value) json, + required TResult Function(ElectrumError_Hex value) hex, + required TResult Function(ElectrumError_Protocol value) protocol, + required TResult Function(ElectrumError_Bitcoin value) bitcoin, + required TResult Function(ElectrumError_AlreadySubscribed value) + alreadySubscribed, + required TResult Function(ElectrumError_NotSubscribed value) notSubscribed, + required TResult Function(ElectrumError_InvalidResponse value) + invalidResponse, + required TResult Function(ElectrumError_Message value) message, + required TResult Function(ElectrumError_InvalidDNSNameError value) + invalidDnsNameError, + required TResult Function(ElectrumError_MissingDomain value) missingDomain, + required TResult Function(ElectrumError_AllAttemptsErrored value) + allAttemptsErrored, + required TResult Function(ElectrumError_SharedIOError value) sharedIoError, + required TResult Function(ElectrumError_CouldntLockReader value) + couldntLockReader, + required TResult Function(ElectrumError_Mpsc value) mpsc, + required TResult Function(ElectrumError_CouldNotCreateConnection value) + couldNotCreateConnection, + required TResult Function(ElectrumError_RequestAlreadyConsumed value) + requestAlreadyConsumed, + }) { + return alreadySubscribed(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(ElectrumError_IOError value)? ioError, + TResult? Function(ElectrumError_Json value)? json, + TResult? Function(ElectrumError_Hex value)? hex, + TResult? Function(ElectrumError_Protocol value)? protocol, + TResult? Function(ElectrumError_Bitcoin value)? bitcoin, + TResult? Function(ElectrumError_AlreadySubscribed value)? alreadySubscribed, + TResult? Function(ElectrumError_NotSubscribed value)? notSubscribed, + TResult? Function(ElectrumError_InvalidResponse value)? invalidResponse, + TResult? Function(ElectrumError_Message value)? message, + TResult? Function(ElectrumError_InvalidDNSNameError value)? + invalidDnsNameError, + TResult? Function(ElectrumError_MissingDomain value)? missingDomain, + TResult? Function(ElectrumError_AllAttemptsErrored value)? + allAttemptsErrored, + TResult? Function(ElectrumError_SharedIOError value)? sharedIoError, + TResult? Function(ElectrumError_CouldntLockReader value)? couldntLockReader, + TResult? Function(ElectrumError_Mpsc value)? mpsc, + TResult? Function(ElectrumError_CouldNotCreateConnection value)? + couldNotCreateConnection, + TResult? Function(ElectrumError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + }) { + return alreadySubscribed?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ElectrumError_IOError value)? ioError, + TResult Function(ElectrumError_Json value)? json, + TResult Function(ElectrumError_Hex value)? hex, + TResult Function(ElectrumError_Protocol value)? protocol, + TResult Function(ElectrumError_Bitcoin value)? bitcoin, + TResult Function(ElectrumError_AlreadySubscribed value)? alreadySubscribed, + TResult Function(ElectrumError_NotSubscribed value)? notSubscribed, + TResult Function(ElectrumError_InvalidResponse value)? invalidResponse, + TResult Function(ElectrumError_Message value)? message, + TResult Function(ElectrumError_InvalidDNSNameError value)? + invalidDnsNameError, + TResult Function(ElectrumError_MissingDomain value)? missingDomain, + TResult Function(ElectrumError_AllAttemptsErrored value)? + allAttemptsErrored, + TResult Function(ElectrumError_SharedIOError value)? sharedIoError, + TResult Function(ElectrumError_CouldntLockReader value)? couldntLockReader, + TResult Function(ElectrumError_Mpsc value)? mpsc, + TResult Function(ElectrumError_CouldNotCreateConnection value)? + couldNotCreateConnection, + TResult Function(ElectrumError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + required TResult orElse(), + }) { + if (alreadySubscribed != null) { + return alreadySubscribed(this); + } + return orElse(); + } +} + +abstract class ElectrumError_AlreadySubscribed extends ElectrumError { + const factory ElectrumError_AlreadySubscribed() = + _$ElectrumError_AlreadySubscribedImpl; + const ElectrumError_AlreadySubscribed._() : super._(); +} + +/// @nodoc +abstract class _$$ElectrumError_NotSubscribedImplCopyWith<$Res> { + factory _$$ElectrumError_NotSubscribedImplCopyWith( + _$ElectrumError_NotSubscribedImpl value, + $Res Function(_$ElectrumError_NotSubscribedImpl) then) = + __$$ElectrumError_NotSubscribedImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$ElectrumError_NotSubscribedImplCopyWithImpl<$Res> + extends _$ElectrumErrorCopyWithImpl<$Res, _$ElectrumError_NotSubscribedImpl> + implements _$$ElectrumError_NotSubscribedImplCopyWith<$Res> { + __$$ElectrumError_NotSubscribedImplCopyWithImpl( + _$ElectrumError_NotSubscribedImpl _value, + $Res Function(_$ElectrumError_NotSubscribedImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$ElectrumError_NotSubscribedImpl extends ElectrumError_NotSubscribed { + const _$ElectrumError_NotSubscribedImpl() : super._(); + + @override + String toString() { + return 'ElectrumError.notSubscribed()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$ElectrumError_NotSubscribedImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) ioError, + required TResult Function(String errorMessage) json, + required TResult Function(String errorMessage) hex, + required TResult Function(String errorMessage) protocol, + required TResult Function(String errorMessage) bitcoin, + required TResult Function() alreadySubscribed, + required TResult Function() notSubscribed, + required TResult Function(String errorMessage) invalidResponse, + required TResult Function(String errorMessage) message, + required TResult Function(String domain) invalidDnsNameError, + required TResult Function() missingDomain, + required TResult Function() allAttemptsErrored, + required TResult Function(String errorMessage) sharedIoError, + required TResult Function() couldntLockReader, + required TResult Function() mpsc, + required TResult Function(String errorMessage) couldNotCreateConnection, + required TResult Function() requestAlreadyConsumed, + }) { + return notSubscribed(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? ioError, + TResult? Function(String errorMessage)? json, + TResult? Function(String errorMessage)? hex, + TResult? Function(String errorMessage)? protocol, + TResult? Function(String errorMessage)? bitcoin, + TResult? Function()? alreadySubscribed, + TResult? Function()? notSubscribed, + TResult? Function(String errorMessage)? invalidResponse, + TResult? Function(String errorMessage)? message, + TResult? Function(String domain)? invalidDnsNameError, + TResult? Function()? missingDomain, + TResult? Function()? allAttemptsErrored, + TResult? Function(String errorMessage)? sharedIoError, + TResult? Function()? couldntLockReader, + TResult? Function()? mpsc, + TResult? Function(String errorMessage)? couldNotCreateConnection, + TResult? Function()? requestAlreadyConsumed, + }) { + return notSubscribed?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? ioError, + TResult Function(String errorMessage)? json, + TResult Function(String errorMessage)? hex, + TResult Function(String errorMessage)? protocol, + TResult Function(String errorMessage)? bitcoin, + TResult Function()? alreadySubscribed, + TResult Function()? notSubscribed, + TResult Function(String errorMessage)? invalidResponse, + TResult Function(String errorMessage)? message, + TResult Function(String domain)? invalidDnsNameError, + TResult Function()? missingDomain, + TResult Function()? allAttemptsErrored, + TResult Function(String errorMessage)? sharedIoError, + TResult Function()? couldntLockReader, + TResult Function()? mpsc, + TResult Function(String errorMessage)? couldNotCreateConnection, + TResult Function()? requestAlreadyConsumed, + required TResult orElse(), + }) { + if (notSubscribed != null) { + return notSubscribed(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(ElectrumError_IOError value) ioError, + required TResult Function(ElectrumError_Json value) json, + required TResult Function(ElectrumError_Hex value) hex, + required TResult Function(ElectrumError_Protocol value) protocol, + required TResult Function(ElectrumError_Bitcoin value) bitcoin, + required TResult Function(ElectrumError_AlreadySubscribed value) + alreadySubscribed, + required TResult Function(ElectrumError_NotSubscribed value) notSubscribed, + required TResult Function(ElectrumError_InvalidResponse value) + invalidResponse, + required TResult Function(ElectrumError_Message value) message, + required TResult Function(ElectrumError_InvalidDNSNameError value) + invalidDnsNameError, + required TResult Function(ElectrumError_MissingDomain value) missingDomain, + required TResult Function(ElectrumError_AllAttemptsErrored value) + allAttemptsErrored, + required TResult Function(ElectrumError_SharedIOError value) sharedIoError, + required TResult Function(ElectrumError_CouldntLockReader value) + couldntLockReader, + required TResult Function(ElectrumError_Mpsc value) mpsc, + required TResult Function(ElectrumError_CouldNotCreateConnection value) + couldNotCreateConnection, + required TResult Function(ElectrumError_RequestAlreadyConsumed value) + requestAlreadyConsumed, + }) { + return notSubscribed(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(ElectrumError_IOError value)? ioError, + TResult? Function(ElectrumError_Json value)? json, + TResult? Function(ElectrumError_Hex value)? hex, + TResult? Function(ElectrumError_Protocol value)? protocol, + TResult? Function(ElectrumError_Bitcoin value)? bitcoin, + TResult? Function(ElectrumError_AlreadySubscribed value)? alreadySubscribed, + TResult? Function(ElectrumError_NotSubscribed value)? notSubscribed, + TResult? Function(ElectrumError_InvalidResponse value)? invalidResponse, + TResult? Function(ElectrumError_Message value)? message, + TResult? Function(ElectrumError_InvalidDNSNameError value)? + invalidDnsNameError, + TResult? Function(ElectrumError_MissingDomain value)? missingDomain, + TResult? Function(ElectrumError_AllAttemptsErrored value)? + allAttemptsErrored, + TResult? Function(ElectrumError_SharedIOError value)? sharedIoError, + TResult? Function(ElectrumError_CouldntLockReader value)? couldntLockReader, + TResult? Function(ElectrumError_Mpsc value)? mpsc, + TResult? Function(ElectrumError_CouldNotCreateConnection value)? + couldNotCreateConnection, + TResult? Function(ElectrumError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + }) { + return notSubscribed?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ElectrumError_IOError value)? ioError, + TResult Function(ElectrumError_Json value)? json, + TResult Function(ElectrumError_Hex value)? hex, + TResult Function(ElectrumError_Protocol value)? protocol, + TResult Function(ElectrumError_Bitcoin value)? bitcoin, + TResult Function(ElectrumError_AlreadySubscribed value)? alreadySubscribed, + TResult Function(ElectrumError_NotSubscribed value)? notSubscribed, + TResult Function(ElectrumError_InvalidResponse value)? invalidResponse, + TResult Function(ElectrumError_Message value)? message, + TResult Function(ElectrumError_InvalidDNSNameError value)? + invalidDnsNameError, + TResult Function(ElectrumError_MissingDomain value)? missingDomain, + TResult Function(ElectrumError_AllAttemptsErrored value)? + allAttemptsErrored, + TResult Function(ElectrumError_SharedIOError value)? sharedIoError, + TResult Function(ElectrumError_CouldntLockReader value)? couldntLockReader, + TResult Function(ElectrumError_Mpsc value)? mpsc, + TResult Function(ElectrumError_CouldNotCreateConnection value)? + couldNotCreateConnection, + TResult Function(ElectrumError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + required TResult orElse(), + }) { + if (notSubscribed != null) { + return notSubscribed(this); + } + return orElse(); + } +} + +abstract class ElectrumError_NotSubscribed extends ElectrumError { + const factory ElectrumError_NotSubscribed() = + _$ElectrumError_NotSubscribedImpl; + const ElectrumError_NotSubscribed._() : super._(); +} + +/// @nodoc +abstract class _$$ElectrumError_InvalidResponseImplCopyWith<$Res> { + factory _$$ElectrumError_InvalidResponseImplCopyWith( + _$ElectrumError_InvalidResponseImpl value, + $Res Function(_$ElectrumError_InvalidResponseImpl) then) = + __$$ElectrumError_InvalidResponseImplCopyWithImpl<$Res>; + @useResult + $Res call({String errorMessage}); +} + +/// @nodoc +class __$$ElectrumError_InvalidResponseImplCopyWithImpl<$Res> + extends _$ElectrumErrorCopyWithImpl<$Res, + _$ElectrumError_InvalidResponseImpl> + implements _$$ElectrumError_InvalidResponseImplCopyWith<$Res> { + __$$ElectrumError_InvalidResponseImplCopyWithImpl( + _$ElectrumError_InvalidResponseImpl _value, + $Res Function(_$ElectrumError_InvalidResponseImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? errorMessage = null, + }) { + return _then(_$ElectrumError_InvalidResponseImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$ElectrumError_InvalidResponseImpl + extends ElectrumError_InvalidResponse { + const _$ElectrumError_InvalidResponseImpl({required this.errorMessage}) + : super._(); + + @override + final String errorMessage; + + @override + String toString() { + return 'ElectrumError.invalidResponse(errorMessage: $errorMessage)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$ElectrumError_InvalidResponseImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); + } + + @override + int get hashCode => Object.hash(runtimeType, errorMessage); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$ElectrumError_InvalidResponseImplCopyWith< + _$ElectrumError_InvalidResponseImpl> + get copyWith => __$$ElectrumError_InvalidResponseImplCopyWithImpl< + _$ElectrumError_InvalidResponseImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) ioError, + required TResult Function(String errorMessage) json, + required TResult Function(String errorMessage) hex, + required TResult Function(String errorMessage) protocol, + required TResult Function(String errorMessage) bitcoin, + required TResult Function() alreadySubscribed, + required TResult Function() notSubscribed, + required TResult Function(String errorMessage) invalidResponse, + required TResult Function(String errorMessage) message, + required TResult Function(String domain) invalidDnsNameError, + required TResult Function() missingDomain, + required TResult Function() allAttemptsErrored, + required TResult Function(String errorMessage) sharedIoError, + required TResult Function() couldntLockReader, + required TResult Function() mpsc, + required TResult Function(String errorMessage) couldNotCreateConnection, + required TResult Function() requestAlreadyConsumed, + }) { + return invalidResponse(errorMessage); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? ioError, + TResult? Function(String errorMessage)? json, + TResult? Function(String errorMessage)? hex, + TResult? Function(String errorMessage)? protocol, + TResult? Function(String errorMessage)? bitcoin, + TResult? Function()? alreadySubscribed, + TResult? Function()? notSubscribed, + TResult? Function(String errorMessage)? invalidResponse, + TResult? Function(String errorMessage)? message, + TResult? Function(String domain)? invalidDnsNameError, + TResult? Function()? missingDomain, + TResult? Function()? allAttemptsErrored, + TResult? Function(String errorMessage)? sharedIoError, + TResult? Function()? couldntLockReader, + TResult? Function()? mpsc, + TResult? Function(String errorMessage)? couldNotCreateConnection, + TResult? Function()? requestAlreadyConsumed, + }) { + return invalidResponse?.call(errorMessage); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? ioError, + TResult Function(String errorMessage)? json, + TResult Function(String errorMessage)? hex, + TResult Function(String errorMessage)? protocol, + TResult Function(String errorMessage)? bitcoin, + TResult Function()? alreadySubscribed, + TResult Function()? notSubscribed, + TResult Function(String errorMessage)? invalidResponse, + TResult Function(String errorMessage)? message, + TResult Function(String domain)? invalidDnsNameError, + TResult Function()? missingDomain, + TResult Function()? allAttemptsErrored, + TResult Function(String errorMessage)? sharedIoError, + TResult Function()? couldntLockReader, + TResult Function()? mpsc, + TResult Function(String errorMessage)? couldNotCreateConnection, + TResult Function()? requestAlreadyConsumed, + required TResult orElse(), + }) { + if (invalidResponse != null) { + return invalidResponse(errorMessage); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(ElectrumError_IOError value) ioError, + required TResult Function(ElectrumError_Json value) json, + required TResult Function(ElectrumError_Hex value) hex, + required TResult Function(ElectrumError_Protocol value) protocol, + required TResult Function(ElectrumError_Bitcoin value) bitcoin, + required TResult Function(ElectrumError_AlreadySubscribed value) + alreadySubscribed, + required TResult Function(ElectrumError_NotSubscribed value) notSubscribed, + required TResult Function(ElectrumError_InvalidResponse value) + invalidResponse, + required TResult Function(ElectrumError_Message value) message, + required TResult Function(ElectrumError_InvalidDNSNameError value) + invalidDnsNameError, + required TResult Function(ElectrumError_MissingDomain value) missingDomain, + required TResult Function(ElectrumError_AllAttemptsErrored value) + allAttemptsErrored, + required TResult Function(ElectrumError_SharedIOError value) sharedIoError, + required TResult Function(ElectrumError_CouldntLockReader value) + couldntLockReader, + required TResult Function(ElectrumError_Mpsc value) mpsc, + required TResult Function(ElectrumError_CouldNotCreateConnection value) + couldNotCreateConnection, + required TResult Function(ElectrumError_RequestAlreadyConsumed value) + requestAlreadyConsumed, + }) { + return invalidResponse(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(ElectrumError_IOError value)? ioError, + TResult? Function(ElectrumError_Json value)? json, + TResult? Function(ElectrumError_Hex value)? hex, + TResult? Function(ElectrumError_Protocol value)? protocol, + TResult? Function(ElectrumError_Bitcoin value)? bitcoin, + TResult? Function(ElectrumError_AlreadySubscribed value)? alreadySubscribed, + TResult? Function(ElectrumError_NotSubscribed value)? notSubscribed, + TResult? Function(ElectrumError_InvalidResponse value)? invalidResponse, + TResult? Function(ElectrumError_Message value)? message, + TResult? Function(ElectrumError_InvalidDNSNameError value)? + invalidDnsNameError, + TResult? Function(ElectrumError_MissingDomain value)? missingDomain, + TResult? Function(ElectrumError_AllAttemptsErrored value)? + allAttemptsErrored, + TResult? Function(ElectrumError_SharedIOError value)? sharedIoError, + TResult? Function(ElectrumError_CouldntLockReader value)? couldntLockReader, + TResult? Function(ElectrumError_Mpsc value)? mpsc, + TResult? Function(ElectrumError_CouldNotCreateConnection value)? + couldNotCreateConnection, + TResult? Function(ElectrumError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + }) { + return invalidResponse?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ElectrumError_IOError value)? ioError, + TResult Function(ElectrumError_Json value)? json, + TResult Function(ElectrumError_Hex value)? hex, + TResult Function(ElectrumError_Protocol value)? protocol, + TResult Function(ElectrumError_Bitcoin value)? bitcoin, + TResult Function(ElectrumError_AlreadySubscribed value)? alreadySubscribed, + TResult Function(ElectrumError_NotSubscribed value)? notSubscribed, + TResult Function(ElectrumError_InvalidResponse value)? invalidResponse, + TResult Function(ElectrumError_Message value)? message, + TResult Function(ElectrumError_InvalidDNSNameError value)? + invalidDnsNameError, + TResult Function(ElectrumError_MissingDomain value)? missingDomain, + TResult Function(ElectrumError_AllAttemptsErrored value)? + allAttemptsErrored, + TResult Function(ElectrumError_SharedIOError value)? sharedIoError, + TResult Function(ElectrumError_CouldntLockReader value)? couldntLockReader, + TResult Function(ElectrumError_Mpsc value)? mpsc, + TResult Function(ElectrumError_CouldNotCreateConnection value)? + couldNotCreateConnection, + TResult Function(ElectrumError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + required TResult orElse(), + }) { + if (invalidResponse != null) { + return invalidResponse(this); + } + return orElse(); + } +} + +abstract class ElectrumError_InvalidResponse extends ElectrumError { + const factory ElectrumError_InvalidResponse( + {required final String errorMessage}) = + _$ElectrumError_InvalidResponseImpl; + const ElectrumError_InvalidResponse._() : super._(); + + String get errorMessage; + @JsonKey(ignore: true) + _$$ElectrumError_InvalidResponseImplCopyWith< + _$ElectrumError_InvalidResponseImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$ElectrumError_MessageImplCopyWith<$Res> { + factory _$$ElectrumError_MessageImplCopyWith( + _$ElectrumError_MessageImpl value, + $Res Function(_$ElectrumError_MessageImpl) then) = + __$$ElectrumError_MessageImplCopyWithImpl<$Res>; + @useResult + $Res call({String errorMessage}); +} + +/// @nodoc +class __$$ElectrumError_MessageImplCopyWithImpl<$Res> + extends _$ElectrumErrorCopyWithImpl<$Res, _$ElectrumError_MessageImpl> + implements _$$ElectrumError_MessageImplCopyWith<$Res> { + __$$ElectrumError_MessageImplCopyWithImpl(_$ElectrumError_MessageImpl _value, + $Res Function(_$ElectrumError_MessageImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? errorMessage = null, + }) { + return _then(_$ElectrumError_MessageImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$ElectrumError_MessageImpl extends ElectrumError_Message { + const _$ElectrumError_MessageImpl({required this.errorMessage}) : super._(); + + @override + final String errorMessage; + + @override + String toString() { + return 'ElectrumError.message(errorMessage: $errorMessage)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$ElectrumError_MessageImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); + } + + @override + int get hashCode => Object.hash(runtimeType, errorMessage); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$ElectrumError_MessageImplCopyWith<_$ElectrumError_MessageImpl> + get copyWith => __$$ElectrumError_MessageImplCopyWithImpl< + _$ElectrumError_MessageImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) ioError, + required TResult Function(String errorMessage) json, + required TResult Function(String errorMessage) hex, + required TResult Function(String errorMessage) protocol, + required TResult Function(String errorMessage) bitcoin, + required TResult Function() alreadySubscribed, + required TResult Function() notSubscribed, + required TResult Function(String errorMessage) invalidResponse, + required TResult Function(String errorMessage) message, + required TResult Function(String domain) invalidDnsNameError, + required TResult Function() missingDomain, + required TResult Function() allAttemptsErrored, + required TResult Function(String errorMessage) sharedIoError, + required TResult Function() couldntLockReader, + required TResult Function() mpsc, + required TResult Function(String errorMessage) couldNotCreateConnection, + required TResult Function() requestAlreadyConsumed, + }) { + return message(errorMessage); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? ioError, + TResult? Function(String errorMessage)? json, + TResult? Function(String errorMessage)? hex, + TResult? Function(String errorMessage)? protocol, + TResult? Function(String errorMessage)? bitcoin, + TResult? Function()? alreadySubscribed, + TResult? Function()? notSubscribed, + TResult? Function(String errorMessage)? invalidResponse, + TResult? Function(String errorMessage)? message, + TResult? Function(String domain)? invalidDnsNameError, + TResult? Function()? missingDomain, + TResult? Function()? allAttemptsErrored, + TResult? Function(String errorMessage)? sharedIoError, + TResult? Function()? couldntLockReader, + TResult? Function()? mpsc, + TResult? Function(String errorMessage)? couldNotCreateConnection, + TResult? Function()? requestAlreadyConsumed, + }) { + return message?.call(errorMessage); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? ioError, + TResult Function(String errorMessage)? json, + TResult Function(String errorMessage)? hex, + TResult Function(String errorMessage)? protocol, + TResult Function(String errorMessage)? bitcoin, + TResult Function()? alreadySubscribed, + TResult Function()? notSubscribed, + TResult Function(String errorMessage)? invalidResponse, + TResult Function(String errorMessage)? message, + TResult Function(String domain)? invalidDnsNameError, + TResult Function()? missingDomain, + TResult Function()? allAttemptsErrored, + TResult Function(String errorMessage)? sharedIoError, + TResult Function()? couldntLockReader, + TResult Function()? mpsc, + TResult Function(String errorMessage)? couldNotCreateConnection, + TResult Function()? requestAlreadyConsumed, + required TResult orElse(), + }) { + if (message != null) { + return message(errorMessage); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(ElectrumError_IOError value) ioError, + required TResult Function(ElectrumError_Json value) json, + required TResult Function(ElectrumError_Hex value) hex, + required TResult Function(ElectrumError_Protocol value) protocol, + required TResult Function(ElectrumError_Bitcoin value) bitcoin, + required TResult Function(ElectrumError_AlreadySubscribed value) + alreadySubscribed, + required TResult Function(ElectrumError_NotSubscribed value) notSubscribed, + required TResult Function(ElectrumError_InvalidResponse value) + invalidResponse, + required TResult Function(ElectrumError_Message value) message, + required TResult Function(ElectrumError_InvalidDNSNameError value) + invalidDnsNameError, + required TResult Function(ElectrumError_MissingDomain value) missingDomain, + required TResult Function(ElectrumError_AllAttemptsErrored value) + allAttemptsErrored, + required TResult Function(ElectrumError_SharedIOError value) sharedIoError, + required TResult Function(ElectrumError_CouldntLockReader value) + couldntLockReader, + required TResult Function(ElectrumError_Mpsc value) mpsc, + required TResult Function(ElectrumError_CouldNotCreateConnection value) + couldNotCreateConnection, + required TResult Function(ElectrumError_RequestAlreadyConsumed value) + requestAlreadyConsumed, + }) { + return message(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(ElectrumError_IOError value)? ioError, + TResult? Function(ElectrumError_Json value)? json, + TResult? Function(ElectrumError_Hex value)? hex, + TResult? Function(ElectrumError_Protocol value)? protocol, + TResult? Function(ElectrumError_Bitcoin value)? bitcoin, + TResult? Function(ElectrumError_AlreadySubscribed value)? alreadySubscribed, + TResult? Function(ElectrumError_NotSubscribed value)? notSubscribed, + TResult? Function(ElectrumError_InvalidResponse value)? invalidResponse, + TResult? Function(ElectrumError_Message value)? message, + TResult? Function(ElectrumError_InvalidDNSNameError value)? + invalidDnsNameError, + TResult? Function(ElectrumError_MissingDomain value)? missingDomain, + TResult? Function(ElectrumError_AllAttemptsErrored value)? + allAttemptsErrored, + TResult? Function(ElectrumError_SharedIOError value)? sharedIoError, + TResult? Function(ElectrumError_CouldntLockReader value)? couldntLockReader, + TResult? Function(ElectrumError_Mpsc value)? mpsc, + TResult? Function(ElectrumError_CouldNotCreateConnection value)? + couldNotCreateConnection, + TResult? Function(ElectrumError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + }) { + return message?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ElectrumError_IOError value)? ioError, + TResult Function(ElectrumError_Json value)? json, + TResult Function(ElectrumError_Hex value)? hex, + TResult Function(ElectrumError_Protocol value)? protocol, + TResult Function(ElectrumError_Bitcoin value)? bitcoin, + TResult Function(ElectrumError_AlreadySubscribed value)? alreadySubscribed, + TResult Function(ElectrumError_NotSubscribed value)? notSubscribed, + TResult Function(ElectrumError_InvalidResponse value)? invalidResponse, + TResult Function(ElectrumError_Message value)? message, + TResult Function(ElectrumError_InvalidDNSNameError value)? + invalidDnsNameError, + TResult Function(ElectrumError_MissingDomain value)? missingDomain, + TResult Function(ElectrumError_AllAttemptsErrored value)? + allAttemptsErrored, + TResult Function(ElectrumError_SharedIOError value)? sharedIoError, + TResult Function(ElectrumError_CouldntLockReader value)? couldntLockReader, + TResult Function(ElectrumError_Mpsc value)? mpsc, + TResult Function(ElectrumError_CouldNotCreateConnection value)? + couldNotCreateConnection, + TResult Function(ElectrumError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + required TResult orElse(), + }) { + if (message != null) { + return message(this); + } + return orElse(); + } +} + +abstract class ElectrumError_Message extends ElectrumError { + const factory ElectrumError_Message({required final String errorMessage}) = + _$ElectrumError_MessageImpl; + const ElectrumError_Message._() : super._(); + + String get errorMessage; + @JsonKey(ignore: true) + _$$ElectrumError_MessageImplCopyWith<_$ElectrumError_MessageImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$ElectrumError_InvalidDNSNameErrorImplCopyWith<$Res> { + factory _$$ElectrumError_InvalidDNSNameErrorImplCopyWith( + _$ElectrumError_InvalidDNSNameErrorImpl value, + $Res Function(_$ElectrumError_InvalidDNSNameErrorImpl) then) = + __$$ElectrumError_InvalidDNSNameErrorImplCopyWithImpl<$Res>; + @useResult + $Res call({String domain}); +} + +/// @nodoc +class __$$ElectrumError_InvalidDNSNameErrorImplCopyWithImpl<$Res> + extends _$ElectrumErrorCopyWithImpl<$Res, + _$ElectrumError_InvalidDNSNameErrorImpl> + implements _$$ElectrumError_InvalidDNSNameErrorImplCopyWith<$Res> { + __$$ElectrumError_InvalidDNSNameErrorImplCopyWithImpl( + _$ElectrumError_InvalidDNSNameErrorImpl _value, + $Res Function(_$ElectrumError_InvalidDNSNameErrorImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? domain = null, + }) { + return _then(_$ElectrumError_InvalidDNSNameErrorImpl( + domain: null == domain + ? _value.domain + : domain // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$ElectrumError_InvalidDNSNameErrorImpl + extends ElectrumError_InvalidDNSNameError { + const _$ElectrumError_InvalidDNSNameErrorImpl({required this.domain}) + : super._(); + + @override + final String domain; + + @override + String toString() { + return 'ElectrumError.invalidDnsNameError(domain: $domain)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$ElectrumError_InvalidDNSNameErrorImpl && + (identical(other.domain, domain) || other.domain == domain)); + } + + @override + int get hashCode => Object.hash(runtimeType, domain); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$ElectrumError_InvalidDNSNameErrorImplCopyWith< + _$ElectrumError_InvalidDNSNameErrorImpl> + get copyWith => __$$ElectrumError_InvalidDNSNameErrorImplCopyWithImpl< + _$ElectrumError_InvalidDNSNameErrorImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) ioError, + required TResult Function(String errorMessage) json, + required TResult Function(String errorMessage) hex, + required TResult Function(String errorMessage) protocol, + required TResult Function(String errorMessage) bitcoin, + required TResult Function() alreadySubscribed, + required TResult Function() notSubscribed, + required TResult Function(String errorMessage) invalidResponse, + required TResult Function(String errorMessage) message, + required TResult Function(String domain) invalidDnsNameError, + required TResult Function() missingDomain, + required TResult Function() allAttemptsErrored, + required TResult Function(String errorMessage) sharedIoError, + required TResult Function() couldntLockReader, + required TResult Function() mpsc, + required TResult Function(String errorMessage) couldNotCreateConnection, + required TResult Function() requestAlreadyConsumed, + }) { + return invalidDnsNameError(domain); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? ioError, + TResult? Function(String errorMessage)? json, + TResult? Function(String errorMessage)? hex, + TResult? Function(String errorMessage)? protocol, + TResult? Function(String errorMessage)? bitcoin, + TResult? Function()? alreadySubscribed, + TResult? Function()? notSubscribed, + TResult? Function(String errorMessage)? invalidResponse, + TResult? Function(String errorMessage)? message, + TResult? Function(String domain)? invalidDnsNameError, + TResult? Function()? missingDomain, + TResult? Function()? allAttemptsErrored, + TResult? Function(String errorMessage)? sharedIoError, + TResult? Function()? couldntLockReader, + TResult? Function()? mpsc, + TResult? Function(String errorMessage)? couldNotCreateConnection, + TResult? Function()? requestAlreadyConsumed, + }) { + return invalidDnsNameError?.call(domain); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? ioError, + TResult Function(String errorMessage)? json, + TResult Function(String errorMessage)? hex, + TResult Function(String errorMessage)? protocol, + TResult Function(String errorMessage)? bitcoin, + TResult Function()? alreadySubscribed, + TResult Function()? notSubscribed, + TResult Function(String errorMessage)? invalidResponse, + TResult Function(String errorMessage)? message, + TResult Function(String domain)? invalidDnsNameError, + TResult Function()? missingDomain, + TResult Function()? allAttemptsErrored, + TResult Function(String errorMessage)? sharedIoError, + TResult Function()? couldntLockReader, + TResult Function()? mpsc, + TResult Function(String errorMessage)? couldNotCreateConnection, + TResult Function()? requestAlreadyConsumed, + required TResult orElse(), + }) { + if (invalidDnsNameError != null) { + return invalidDnsNameError(domain); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(ElectrumError_IOError value) ioError, + required TResult Function(ElectrumError_Json value) json, + required TResult Function(ElectrumError_Hex value) hex, + required TResult Function(ElectrumError_Protocol value) protocol, + required TResult Function(ElectrumError_Bitcoin value) bitcoin, + required TResult Function(ElectrumError_AlreadySubscribed value) + alreadySubscribed, + required TResult Function(ElectrumError_NotSubscribed value) notSubscribed, + required TResult Function(ElectrumError_InvalidResponse value) + invalidResponse, + required TResult Function(ElectrumError_Message value) message, + required TResult Function(ElectrumError_InvalidDNSNameError value) + invalidDnsNameError, + required TResult Function(ElectrumError_MissingDomain value) missingDomain, + required TResult Function(ElectrumError_AllAttemptsErrored value) + allAttemptsErrored, + required TResult Function(ElectrumError_SharedIOError value) sharedIoError, + required TResult Function(ElectrumError_CouldntLockReader value) + couldntLockReader, + required TResult Function(ElectrumError_Mpsc value) mpsc, + required TResult Function(ElectrumError_CouldNotCreateConnection value) + couldNotCreateConnection, + required TResult Function(ElectrumError_RequestAlreadyConsumed value) + requestAlreadyConsumed, + }) { + return invalidDnsNameError(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(ElectrumError_IOError value)? ioError, + TResult? Function(ElectrumError_Json value)? json, + TResult? Function(ElectrumError_Hex value)? hex, + TResult? Function(ElectrumError_Protocol value)? protocol, + TResult? Function(ElectrumError_Bitcoin value)? bitcoin, + TResult? Function(ElectrumError_AlreadySubscribed value)? alreadySubscribed, + TResult? Function(ElectrumError_NotSubscribed value)? notSubscribed, + TResult? Function(ElectrumError_InvalidResponse value)? invalidResponse, + TResult? Function(ElectrumError_Message value)? message, + TResult? Function(ElectrumError_InvalidDNSNameError value)? + invalidDnsNameError, + TResult? Function(ElectrumError_MissingDomain value)? missingDomain, + TResult? Function(ElectrumError_AllAttemptsErrored value)? + allAttemptsErrored, + TResult? Function(ElectrumError_SharedIOError value)? sharedIoError, + TResult? Function(ElectrumError_CouldntLockReader value)? couldntLockReader, + TResult? Function(ElectrumError_Mpsc value)? mpsc, + TResult? Function(ElectrumError_CouldNotCreateConnection value)? + couldNotCreateConnection, + TResult? Function(ElectrumError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + }) { + return invalidDnsNameError?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ElectrumError_IOError value)? ioError, + TResult Function(ElectrumError_Json value)? json, + TResult Function(ElectrumError_Hex value)? hex, + TResult Function(ElectrumError_Protocol value)? protocol, + TResult Function(ElectrumError_Bitcoin value)? bitcoin, + TResult Function(ElectrumError_AlreadySubscribed value)? alreadySubscribed, + TResult Function(ElectrumError_NotSubscribed value)? notSubscribed, + TResult Function(ElectrumError_InvalidResponse value)? invalidResponse, + TResult Function(ElectrumError_Message value)? message, + TResult Function(ElectrumError_InvalidDNSNameError value)? + invalidDnsNameError, + TResult Function(ElectrumError_MissingDomain value)? missingDomain, + TResult Function(ElectrumError_AllAttemptsErrored value)? + allAttemptsErrored, + TResult Function(ElectrumError_SharedIOError value)? sharedIoError, + TResult Function(ElectrumError_CouldntLockReader value)? couldntLockReader, + TResult Function(ElectrumError_Mpsc value)? mpsc, + TResult Function(ElectrumError_CouldNotCreateConnection value)? + couldNotCreateConnection, + TResult Function(ElectrumError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + required TResult orElse(), + }) { + if (invalidDnsNameError != null) { + return invalidDnsNameError(this); + } + return orElse(); + } +} + +abstract class ElectrumError_InvalidDNSNameError extends ElectrumError { + const factory ElectrumError_InvalidDNSNameError( + {required final String domain}) = _$ElectrumError_InvalidDNSNameErrorImpl; + const ElectrumError_InvalidDNSNameError._() : super._(); + + String get domain; + @JsonKey(ignore: true) + _$$ElectrumError_InvalidDNSNameErrorImplCopyWith< + _$ElectrumError_InvalidDNSNameErrorImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$ElectrumError_MissingDomainImplCopyWith<$Res> { + factory _$$ElectrumError_MissingDomainImplCopyWith( + _$ElectrumError_MissingDomainImpl value, + $Res Function(_$ElectrumError_MissingDomainImpl) then) = + __$$ElectrumError_MissingDomainImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$ElectrumError_MissingDomainImplCopyWithImpl<$Res> + extends _$ElectrumErrorCopyWithImpl<$Res, _$ElectrumError_MissingDomainImpl> + implements _$$ElectrumError_MissingDomainImplCopyWith<$Res> { + __$$ElectrumError_MissingDomainImplCopyWithImpl( + _$ElectrumError_MissingDomainImpl _value, + $Res Function(_$ElectrumError_MissingDomainImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$ElectrumError_MissingDomainImpl extends ElectrumError_MissingDomain { + const _$ElectrumError_MissingDomainImpl() : super._(); + + @override + String toString() { + return 'ElectrumError.missingDomain()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$ElectrumError_MissingDomainImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) ioError, + required TResult Function(String errorMessage) json, + required TResult Function(String errorMessage) hex, + required TResult Function(String errorMessage) protocol, + required TResult Function(String errorMessage) bitcoin, + required TResult Function() alreadySubscribed, + required TResult Function() notSubscribed, + required TResult Function(String errorMessage) invalidResponse, + required TResult Function(String errorMessage) message, + required TResult Function(String domain) invalidDnsNameError, + required TResult Function() missingDomain, + required TResult Function() allAttemptsErrored, + required TResult Function(String errorMessage) sharedIoError, + required TResult Function() couldntLockReader, + required TResult Function() mpsc, + required TResult Function(String errorMessage) couldNotCreateConnection, + required TResult Function() requestAlreadyConsumed, + }) { + return missingDomain(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? ioError, + TResult? Function(String errorMessage)? json, + TResult? Function(String errorMessage)? hex, + TResult? Function(String errorMessage)? protocol, + TResult? Function(String errorMessage)? bitcoin, + TResult? Function()? alreadySubscribed, + TResult? Function()? notSubscribed, + TResult? Function(String errorMessage)? invalidResponse, + TResult? Function(String errorMessage)? message, + TResult? Function(String domain)? invalidDnsNameError, + TResult? Function()? missingDomain, + TResult? Function()? allAttemptsErrored, + TResult? Function(String errorMessage)? sharedIoError, + TResult? Function()? couldntLockReader, + TResult? Function()? mpsc, + TResult? Function(String errorMessage)? couldNotCreateConnection, + TResult? Function()? requestAlreadyConsumed, + }) { + return missingDomain?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? ioError, + TResult Function(String errorMessage)? json, + TResult Function(String errorMessage)? hex, + TResult Function(String errorMessage)? protocol, + TResult Function(String errorMessage)? bitcoin, + TResult Function()? alreadySubscribed, + TResult Function()? notSubscribed, + TResult Function(String errorMessage)? invalidResponse, + TResult Function(String errorMessage)? message, + TResult Function(String domain)? invalidDnsNameError, + TResult Function()? missingDomain, + TResult Function()? allAttemptsErrored, + TResult Function(String errorMessage)? sharedIoError, + TResult Function()? couldntLockReader, + TResult Function()? mpsc, + TResult Function(String errorMessage)? couldNotCreateConnection, + TResult Function()? requestAlreadyConsumed, + required TResult orElse(), + }) { + if (missingDomain != null) { + return missingDomain(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(ElectrumError_IOError value) ioError, + required TResult Function(ElectrumError_Json value) json, + required TResult Function(ElectrumError_Hex value) hex, + required TResult Function(ElectrumError_Protocol value) protocol, + required TResult Function(ElectrumError_Bitcoin value) bitcoin, + required TResult Function(ElectrumError_AlreadySubscribed value) + alreadySubscribed, + required TResult Function(ElectrumError_NotSubscribed value) notSubscribed, + required TResult Function(ElectrumError_InvalidResponse value) + invalidResponse, + required TResult Function(ElectrumError_Message value) message, + required TResult Function(ElectrumError_InvalidDNSNameError value) + invalidDnsNameError, + required TResult Function(ElectrumError_MissingDomain value) missingDomain, + required TResult Function(ElectrumError_AllAttemptsErrored value) + allAttemptsErrored, + required TResult Function(ElectrumError_SharedIOError value) sharedIoError, + required TResult Function(ElectrumError_CouldntLockReader value) + couldntLockReader, + required TResult Function(ElectrumError_Mpsc value) mpsc, + required TResult Function(ElectrumError_CouldNotCreateConnection value) + couldNotCreateConnection, + required TResult Function(ElectrumError_RequestAlreadyConsumed value) + requestAlreadyConsumed, + }) { + return missingDomain(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(ElectrumError_IOError value)? ioError, + TResult? Function(ElectrumError_Json value)? json, + TResult? Function(ElectrumError_Hex value)? hex, + TResult? Function(ElectrumError_Protocol value)? protocol, + TResult? Function(ElectrumError_Bitcoin value)? bitcoin, + TResult? Function(ElectrumError_AlreadySubscribed value)? alreadySubscribed, + TResult? Function(ElectrumError_NotSubscribed value)? notSubscribed, + TResult? Function(ElectrumError_InvalidResponse value)? invalidResponse, + TResult? Function(ElectrumError_Message value)? message, + TResult? Function(ElectrumError_InvalidDNSNameError value)? + invalidDnsNameError, + TResult? Function(ElectrumError_MissingDomain value)? missingDomain, + TResult? Function(ElectrumError_AllAttemptsErrored value)? + allAttemptsErrored, + TResult? Function(ElectrumError_SharedIOError value)? sharedIoError, + TResult? Function(ElectrumError_CouldntLockReader value)? couldntLockReader, + TResult? Function(ElectrumError_Mpsc value)? mpsc, + TResult? Function(ElectrumError_CouldNotCreateConnection value)? + couldNotCreateConnection, + TResult? Function(ElectrumError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + }) { + return missingDomain?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ElectrumError_IOError value)? ioError, + TResult Function(ElectrumError_Json value)? json, + TResult Function(ElectrumError_Hex value)? hex, + TResult Function(ElectrumError_Protocol value)? protocol, + TResult Function(ElectrumError_Bitcoin value)? bitcoin, + TResult Function(ElectrumError_AlreadySubscribed value)? alreadySubscribed, + TResult Function(ElectrumError_NotSubscribed value)? notSubscribed, + TResult Function(ElectrumError_InvalidResponse value)? invalidResponse, + TResult Function(ElectrumError_Message value)? message, + TResult Function(ElectrumError_InvalidDNSNameError value)? + invalidDnsNameError, + TResult Function(ElectrumError_MissingDomain value)? missingDomain, + TResult Function(ElectrumError_AllAttemptsErrored value)? + allAttemptsErrored, + TResult Function(ElectrumError_SharedIOError value)? sharedIoError, + TResult Function(ElectrumError_CouldntLockReader value)? couldntLockReader, + TResult Function(ElectrumError_Mpsc value)? mpsc, + TResult Function(ElectrumError_CouldNotCreateConnection value)? + couldNotCreateConnection, + TResult Function(ElectrumError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + required TResult orElse(), + }) { + if (missingDomain != null) { + return missingDomain(this); + } + return orElse(); + } +} + +abstract class ElectrumError_MissingDomain extends ElectrumError { + const factory ElectrumError_MissingDomain() = + _$ElectrumError_MissingDomainImpl; + const ElectrumError_MissingDomain._() : super._(); +} + +/// @nodoc +abstract class _$$ElectrumError_AllAttemptsErroredImplCopyWith<$Res> { + factory _$$ElectrumError_AllAttemptsErroredImplCopyWith( + _$ElectrumError_AllAttemptsErroredImpl value, + $Res Function(_$ElectrumError_AllAttemptsErroredImpl) then) = + __$$ElectrumError_AllAttemptsErroredImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$ElectrumError_AllAttemptsErroredImplCopyWithImpl<$Res> + extends _$ElectrumErrorCopyWithImpl<$Res, + _$ElectrumError_AllAttemptsErroredImpl> + implements _$$ElectrumError_AllAttemptsErroredImplCopyWith<$Res> { + __$$ElectrumError_AllAttemptsErroredImplCopyWithImpl( + _$ElectrumError_AllAttemptsErroredImpl _value, + $Res Function(_$ElectrumError_AllAttemptsErroredImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$ElectrumError_AllAttemptsErroredImpl + extends ElectrumError_AllAttemptsErrored { + const _$ElectrumError_AllAttemptsErroredImpl() : super._(); + + @override + String toString() { + return 'ElectrumError.allAttemptsErrored()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$ElectrumError_AllAttemptsErroredImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) ioError, + required TResult Function(String errorMessage) json, + required TResult Function(String errorMessage) hex, + required TResult Function(String errorMessage) protocol, + required TResult Function(String errorMessage) bitcoin, + required TResult Function() alreadySubscribed, + required TResult Function() notSubscribed, + required TResult Function(String errorMessage) invalidResponse, + required TResult Function(String errorMessage) message, + required TResult Function(String domain) invalidDnsNameError, + required TResult Function() missingDomain, + required TResult Function() allAttemptsErrored, + required TResult Function(String errorMessage) sharedIoError, + required TResult Function() couldntLockReader, + required TResult Function() mpsc, + required TResult Function(String errorMessage) couldNotCreateConnection, + required TResult Function() requestAlreadyConsumed, + }) { + return allAttemptsErrored(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? ioError, + TResult? Function(String errorMessage)? json, + TResult? Function(String errorMessage)? hex, + TResult? Function(String errorMessage)? protocol, + TResult? Function(String errorMessage)? bitcoin, + TResult? Function()? alreadySubscribed, + TResult? Function()? notSubscribed, + TResult? Function(String errorMessage)? invalidResponse, + TResult? Function(String errorMessage)? message, + TResult? Function(String domain)? invalidDnsNameError, + TResult? Function()? missingDomain, + TResult? Function()? allAttemptsErrored, + TResult? Function(String errorMessage)? sharedIoError, + TResult? Function()? couldntLockReader, + TResult? Function()? mpsc, + TResult? Function(String errorMessage)? couldNotCreateConnection, + TResult? Function()? requestAlreadyConsumed, + }) { + return allAttemptsErrored?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? ioError, + TResult Function(String errorMessage)? json, + TResult Function(String errorMessage)? hex, + TResult Function(String errorMessage)? protocol, + TResult Function(String errorMessage)? bitcoin, + TResult Function()? alreadySubscribed, + TResult Function()? notSubscribed, + TResult Function(String errorMessage)? invalidResponse, + TResult Function(String errorMessage)? message, + TResult Function(String domain)? invalidDnsNameError, + TResult Function()? missingDomain, + TResult Function()? allAttemptsErrored, + TResult Function(String errorMessage)? sharedIoError, + TResult Function()? couldntLockReader, + TResult Function()? mpsc, + TResult Function(String errorMessage)? couldNotCreateConnection, + TResult Function()? requestAlreadyConsumed, + required TResult orElse(), + }) { + if (allAttemptsErrored != null) { + return allAttemptsErrored(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(ElectrumError_IOError value) ioError, + required TResult Function(ElectrumError_Json value) json, + required TResult Function(ElectrumError_Hex value) hex, + required TResult Function(ElectrumError_Protocol value) protocol, + required TResult Function(ElectrumError_Bitcoin value) bitcoin, + required TResult Function(ElectrumError_AlreadySubscribed value) + alreadySubscribed, + required TResult Function(ElectrumError_NotSubscribed value) notSubscribed, + required TResult Function(ElectrumError_InvalidResponse value) + invalidResponse, + required TResult Function(ElectrumError_Message value) message, + required TResult Function(ElectrumError_InvalidDNSNameError value) + invalidDnsNameError, + required TResult Function(ElectrumError_MissingDomain value) missingDomain, + required TResult Function(ElectrumError_AllAttemptsErrored value) + allAttemptsErrored, + required TResult Function(ElectrumError_SharedIOError value) sharedIoError, + required TResult Function(ElectrumError_CouldntLockReader value) + couldntLockReader, + required TResult Function(ElectrumError_Mpsc value) mpsc, + required TResult Function(ElectrumError_CouldNotCreateConnection value) + couldNotCreateConnection, + required TResult Function(ElectrumError_RequestAlreadyConsumed value) + requestAlreadyConsumed, + }) { + return allAttemptsErrored(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(ElectrumError_IOError value)? ioError, + TResult? Function(ElectrumError_Json value)? json, + TResult? Function(ElectrumError_Hex value)? hex, + TResult? Function(ElectrumError_Protocol value)? protocol, + TResult? Function(ElectrumError_Bitcoin value)? bitcoin, + TResult? Function(ElectrumError_AlreadySubscribed value)? alreadySubscribed, + TResult? Function(ElectrumError_NotSubscribed value)? notSubscribed, + TResult? Function(ElectrumError_InvalidResponse value)? invalidResponse, + TResult? Function(ElectrumError_Message value)? message, + TResult? Function(ElectrumError_InvalidDNSNameError value)? + invalidDnsNameError, + TResult? Function(ElectrumError_MissingDomain value)? missingDomain, + TResult? Function(ElectrumError_AllAttemptsErrored value)? + allAttemptsErrored, + TResult? Function(ElectrumError_SharedIOError value)? sharedIoError, + TResult? Function(ElectrumError_CouldntLockReader value)? couldntLockReader, + TResult? Function(ElectrumError_Mpsc value)? mpsc, + TResult? Function(ElectrumError_CouldNotCreateConnection value)? + couldNotCreateConnection, + TResult? Function(ElectrumError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + }) { + return allAttemptsErrored?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ElectrumError_IOError value)? ioError, + TResult Function(ElectrumError_Json value)? json, + TResult Function(ElectrumError_Hex value)? hex, + TResult Function(ElectrumError_Protocol value)? protocol, + TResult Function(ElectrumError_Bitcoin value)? bitcoin, + TResult Function(ElectrumError_AlreadySubscribed value)? alreadySubscribed, + TResult Function(ElectrumError_NotSubscribed value)? notSubscribed, + TResult Function(ElectrumError_InvalidResponse value)? invalidResponse, + TResult Function(ElectrumError_Message value)? message, + TResult Function(ElectrumError_InvalidDNSNameError value)? + invalidDnsNameError, + TResult Function(ElectrumError_MissingDomain value)? missingDomain, + TResult Function(ElectrumError_AllAttemptsErrored value)? + allAttemptsErrored, + TResult Function(ElectrumError_SharedIOError value)? sharedIoError, + TResult Function(ElectrumError_CouldntLockReader value)? couldntLockReader, + TResult Function(ElectrumError_Mpsc value)? mpsc, + TResult Function(ElectrumError_CouldNotCreateConnection value)? + couldNotCreateConnection, + TResult Function(ElectrumError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + required TResult orElse(), + }) { + if (allAttemptsErrored != null) { + return allAttemptsErrored(this); + } + return orElse(); + } +} + +abstract class ElectrumError_AllAttemptsErrored extends ElectrumError { + const factory ElectrumError_AllAttemptsErrored() = + _$ElectrumError_AllAttemptsErroredImpl; + const ElectrumError_AllAttemptsErrored._() : super._(); +} + +/// @nodoc +abstract class _$$ElectrumError_SharedIOErrorImplCopyWith<$Res> { + factory _$$ElectrumError_SharedIOErrorImplCopyWith( + _$ElectrumError_SharedIOErrorImpl value, + $Res Function(_$ElectrumError_SharedIOErrorImpl) then) = + __$$ElectrumError_SharedIOErrorImplCopyWithImpl<$Res>; + @useResult + $Res call({String errorMessage}); +} + +/// @nodoc +class __$$ElectrumError_SharedIOErrorImplCopyWithImpl<$Res> + extends _$ElectrumErrorCopyWithImpl<$Res, _$ElectrumError_SharedIOErrorImpl> + implements _$$ElectrumError_SharedIOErrorImplCopyWith<$Res> { + __$$ElectrumError_SharedIOErrorImplCopyWithImpl( + _$ElectrumError_SharedIOErrorImpl _value, + $Res Function(_$ElectrumError_SharedIOErrorImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? errorMessage = null, + }) { + return _then(_$ElectrumError_SharedIOErrorImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$ElectrumError_SharedIOErrorImpl extends ElectrumError_SharedIOError { + const _$ElectrumError_SharedIOErrorImpl({required this.errorMessage}) + : super._(); + + @override + final String errorMessage; + + @override + String toString() { + return 'ElectrumError.sharedIoError(errorMessage: $errorMessage)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$ElectrumError_SharedIOErrorImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); + } + + @override + int get hashCode => Object.hash(runtimeType, errorMessage); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$ElectrumError_SharedIOErrorImplCopyWith<_$ElectrumError_SharedIOErrorImpl> + get copyWith => __$$ElectrumError_SharedIOErrorImplCopyWithImpl< + _$ElectrumError_SharedIOErrorImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) ioError, + required TResult Function(String errorMessage) json, + required TResult Function(String errorMessage) hex, + required TResult Function(String errorMessage) protocol, + required TResult Function(String errorMessage) bitcoin, + required TResult Function() alreadySubscribed, + required TResult Function() notSubscribed, + required TResult Function(String errorMessage) invalidResponse, + required TResult Function(String errorMessage) message, + required TResult Function(String domain) invalidDnsNameError, + required TResult Function() missingDomain, + required TResult Function() allAttemptsErrored, + required TResult Function(String errorMessage) sharedIoError, + required TResult Function() couldntLockReader, + required TResult Function() mpsc, + required TResult Function(String errorMessage) couldNotCreateConnection, + required TResult Function() requestAlreadyConsumed, + }) { + return sharedIoError(errorMessage); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? ioError, + TResult? Function(String errorMessage)? json, + TResult? Function(String errorMessage)? hex, + TResult? Function(String errorMessage)? protocol, + TResult? Function(String errorMessage)? bitcoin, + TResult? Function()? alreadySubscribed, + TResult? Function()? notSubscribed, + TResult? Function(String errorMessage)? invalidResponse, + TResult? Function(String errorMessage)? message, + TResult? Function(String domain)? invalidDnsNameError, + TResult? Function()? missingDomain, + TResult? Function()? allAttemptsErrored, + TResult? Function(String errorMessage)? sharedIoError, + TResult? Function()? couldntLockReader, + TResult? Function()? mpsc, + TResult? Function(String errorMessage)? couldNotCreateConnection, + TResult? Function()? requestAlreadyConsumed, + }) { + return sharedIoError?.call(errorMessage); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? ioError, + TResult Function(String errorMessage)? json, + TResult Function(String errorMessage)? hex, + TResult Function(String errorMessage)? protocol, + TResult Function(String errorMessage)? bitcoin, + TResult Function()? alreadySubscribed, + TResult Function()? notSubscribed, + TResult Function(String errorMessage)? invalidResponse, + TResult Function(String errorMessage)? message, + TResult Function(String domain)? invalidDnsNameError, + TResult Function()? missingDomain, + TResult Function()? allAttemptsErrored, + TResult Function(String errorMessage)? sharedIoError, + TResult Function()? couldntLockReader, + TResult Function()? mpsc, + TResult Function(String errorMessage)? couldNotCreateConnection, + TResult Function()? requestAlreadyConsumed, + required TResult orElse(), + }) { + if (sharedIoError != null) { + return sharedIoError(errorMessage); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(ElectrumError_IOError value) ioError, + required TResult Function(ElectrumError_Json value) json, + required TResult Function(ElectrumError_Hex value) hex, + required TResult Function(ElectrumError_Protocol value) protocol, + required TResult Function(ElectrumError_Bitcoin value) bitcoin, + required TResult Function(ElectrumError_AlreadySubscribed value) + alreadySubscribed, + required TResult Function(ElectrumError_NotSubscribed value) notSubscribed, + required TResult Function(ElectrumError_InvalidResponse value) + invalidResponse, + required TResult Function(ElectrumError_Message value) message, + required TResult Function(ElectrumError_InvalidDNSNameError value) + invalidDnsNameError, + required TResult Function(ElectrumError_MissingDomain value) missingDomain, + required TResult Function(ElectrumError_AllAttemptsErrored value) + allAttemptsErrored, + required TResult Function(ElectrumError_SharedIOError value) sharedIoError, + required TResult Function(ElectrumError_CouldntLockReader value) + couldntLockReader, + required TResult Function(ElectrumError_Mpsc value) mpsc, + required TResult Function(ElectrumError_CouldNotCreateConnection value) + couldNotCreateConnection, + required TResult Function(ElectrumError_RequestAlreadyConsumed value) + requestAlreadyConsumed, + }) { + return sharedIoError(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(ElectrumError_IOError value)? ioError, + TResult? Function(ElectrumError_Json value)? json, + TResult? Function(ElectrumError_Hex value)? hex, + TResult? Function(ElectrumError_Protocol value)? protocol, + TResult? Function(ElectrumError_Bitcoin value)? bitcoin, + TResult? Function(ElectrumError_AlreadySubscribed value)? alreadySubscribed, + TResult? Function(ElectrumError_NotSubscribed value)? notSubscribed, + TResult? Function(ElectrumError_InvalidResponse value)? invalidResponse, + TResult? Function(ElectrumError_Message value)? message, + TResult? Function(ElectrumError_InvalidDNSNameError value)? + invalidDnsNameError, + TResult? Function(ElectrumError_MissingDomain value)? missingDomain, + TResult? Function(ElectrumError_AllAttemptsErrored value)? + allAttemptsErrored, + TResult? Function(ElectrumError_SharedIOError value)? sharedIoError, + TResult? Function(ElectrumError_CouldntLockReader value)? couldntLockReader, + TResult? Function(ElectrumError_Mpsc value)? mpsc, + TResult? Function(ElectrumError_CouldNotCreateConnection value)? + couldNotCreateConnection, + TResult? Function(ElectrumError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + }) { + return sharedIoError?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ElectrumError_IOError value)? ioError, + TResult Function(ElectrumError_Json value)? json, + TResult Function(ElectrumError_Hex value)? hex, + TResult Function(ElectrumError_Protocol value)? protocol, + TResult Function(ElectrumError_Bitcoin value)? bitcoin, + TResult Function(ElectrumError_AlreadySubscribed value)? alreadySubscribed, + TResult Function(ElectrumError_NotSubscribed value)? notSubscribed, + TResult Function(ElectrumError_InvalidResponse value)? invalidResponse, + TResult Function(ElectrumError_Message value)? message, + TResult Function(ElectrumError_InvalidDNSNameError value)? + invalidDnsNameError, + TResult Function(ElectrumError_MissingDomain value)? missingDomain, + TResult Function(ElectrumError_AllAttemptsErrored value)? + allAttemptsErrored, + TResult Function(ElectrumError_SharedIOError value)? sharedIoError, + TResult Function(ElectrumError_CouldntLockReader value)? couldntLockReader, + TResult Function(ElectrumError_Mpsc value)? mpsc, + TResult Function(ElectrumError_CouldNotCreateConnection value)? + couldNotCreateConnection, + TResult Function(ElectrumError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + required TResult orElse(), + }) { + if (sharedIoError != null) { + return sharedIoError(this); + } + return orElse(); + } +} + +abstract class ElectrumError_SharedIOError extends ElectrumError { + const factory ElectrumError_SharedIOError( + {required final String errorMessage}) = _$ElectrumError_SharedIOErrorImpl; + const ElectrumError_SharedIOError._() : super._(); + + String get errorMessage; + @JsonKey(ignore: true) + _$$ElectrumError_SharedIOErrorImplCopyWith<_$ElectrumError_SharedIOErrorImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$ElectrumError_CouldntLockReaderImplCopyWith<$Res> { + factory _$$ElectrumError_CouldntLockReaderImplCopyWith( + _$ElectrumError_CouldntLockReaderImpl value, + $Res Function(_$ElectrumError_CouldntLockReaderImpl) then) = + __$$ElectrumError_CouldntLockReaderImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$ElectrumError_CouldntLockReaderImplCopyWithImpl<$Res> + extends _$ElectrumErrorCopyWithImpl<$Res, + _$ElectrumError_CouldntLockReaderImpl> + implements _$$ElectrumError_CouldntLockReaderImplCopyWith<$Res> { + __$$ElectrumError_CouldntLockReaderImplCopyWithImpl( + _$ElectrumError_CouldntLockReaderImpl _value, + $Res Function(_$ElectrumError_CouldntLockReaderImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$ElectrumError_CouldntLockReaderImpl + extends ElectrumError_CouldntLockReader { + const _$ElectrumError_CouldntLockReaderImpl() : super._(); + + @override + String toString() { + return 'ElectrumError.couldntLockReader()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$ElectrumError_CouldntLockReaderImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) ioError, + required TResult Function(String errorMessage) json, + required TResult Function(String errorMessage) hex, + required TResult Function(String errorMessage) protocol, + required TResult Function(String errorMessage) bitcoin, + required TResult Function() alreadySubscribed, + required TResult Function() notSubscribed, + required TResult Function(String errorMessage) invalidResponse, + required TResult Function(String errorMessage) message, + required TResult Function(String domain) invalidDnsNameError, + required TResult Function() missingDomain, + required TResult Function() allAttemptsErrored, + required TResult Function(String errorMessage) sharedIoError, + required TResult Function() couldntLockReader, + required TResult Function() mpsc, + required TResult Function(String errorMessage) couldNotCreateConnection, + required TResult Function() requestAlreadyConsumed, + }) { + return couldntLockReader(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? ioError, + TResult? Function(String errorMessage)? json, + TResult? Function(String errorMessage)? hex, + TResult? Function(String errorMessage)? protocol, + TResult? Function(String errorMessage)? bitcoin, + TResult? Function()? alreadySubscribed, + TResult? Function()? notSubscribed, + TResult? Function(String errorMessage)? invalidResponse, + TResult? Function(String errorMessage)? message, + TResult? Function(String domain)? invalidDnsNameError, + TResult? Function()? missingDomain, + TResult? Function()? allAttemptsErrored, + TResult? Function(String errorMessage)? sharedIoError, + TResult? Function()? couldntLockReader, + TResult? Function()? mpsc, + TResult? Function(String errorMessage)? couldNotCreateConnection, + TResult? Function()? requestAlreadyConsumed, + }) { + return couldntLockReader?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? ioError, + TResult Function(String errorMessage)? json, + TResult Function(String errorMessage)? hex, + TResult Function(String errorMessage)? protocol, + TResult Function(String errorMessage)? bitcoin, + TResult Function()? alreadySubscribed, + TResult Function()? notSubscribed, + TResult Function(String errorMessage)? invalidResponse, + TResult Function(String errorMessage)? message, + TResult Function(String domain)? invalidDnsNameError, + TResult Function()? missingDomain, + TResult Function()? allAttemptsErrored, + TResult Function(String errorMessage)? sharedIoError, + TResult Function()? couldntLockReader, + TResult Function()? mpsc, + TResult Function(String errorMessage)? couldNotCreateConnection, + TResult Function()? requestAlreadyConsumed, + required TResult orElse(), + }) { + if (couldntLockReader != null) { + return couldntLockReader(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(ElectrumError_IOError value) ioError, + required TResult Function(ElectrumError_Json value) json, + required TResult Function(ElectrumError_Hex value) hex, + required TResult Function(ElectrumError_Protocol value) protocol, + required TResult Function(ElectrumError_Bitcoin value) bitcoin, + required TResult Function(ElectrumError_AlreadySubscribed value) + alreadySubscribed, + required TResult Function(ElectrumError_NotSubscribed value) notSubscribed, + required TResult Function(ElectrumError_InvalidResponse value) + invalidResponse, + required TResult Function(ElectrumError_Message value) message, + required TResult Function(ElectrumError_InvalidDNSNameError value) + invalidDnsNameError, + required TResult Function(ElectrumError_MissingDomain value) missingDomain, + required TResult Function(ElectrumError_AllAttemptsErrored value) + allAttemptsErrored, + required TResult Function(ElectrumError_SharedIOError value) sharedIoError, + required TResult Function(ElectrumError_CouldntLockReader value) + couldntLockReader, + required TResult Function(ElectrumError_Mpsc value) mpsc, + required TResult Function(ElectrumError_CouldNotCreateConnection value) + couldNotCreateConnection, + required TResult Function(ElectrumError_RequestAlreadyConsumed value) + requestAlreadyConsumed, + }) { + return couldntLockReader(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(ElectrumError_IOError value)? ioError, + TResult? Function(ElectrumError_Json value)? json, + TResult? Function(ElectrumError_Hex value)? hex, + TResult? Function(ElectrumError_Protocol value)? protocol, + TResult? Function(ElectrumError_Bitcoin value)? bitcoin, + TResult? Function(ElectrumError_AlreadySubscribed value)? alreadySubscribed, + TResult? Function(ElectrumError_NotSubscribed value)? notSubscribed, + TResult? Function(ElectrumError_InvalidResponse value)? invalidResponse, + TResult? Function(ElectrumError_Message value)? message, + TResult? Function(ElectrumError_InvalidDNSNameError value)? + invalidDnsNameError, + TResult? Function(ElectrumError_MissingDomain value)? missingDomain, + TResult? Function(ElectrumError_AllAttemptsErrored value)? + allAttemptsErrored, + TResult? Function(ElectrumError_SharedIOError value)? sharedIoError, + TResult? Function(ElectrumError_CouldntLockReader value)? couldntLockReader, + TResult? Function(ElectrumError_Mpsc value)? mpsc, + TResult? Function(ElectrumError_CouldNotCreateConnection value)? + couldNotCreateConnection, + TResult? Function(ElectrumError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + }) { + return couldntLockReader?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ElectrumError_IOError value)? ioError, + TResult Function(ElectrumError_Json value)? json, + TResult Function(ElectrumError_Hex value)? hex, + TResult Function(ElectrumError_Protocol value)? protocol, + TResult Function(ElectrumError_Bitcoin value)? bitcoin, + TResult Function(ElectrumError_AlreadySubscribed value)? alreadySubscribed, + TResult Function(ElectrumError_NotSubscribed value)? notSubscribed, + TResult Function(ElectrumError_InvalidResponse value)? invalidResponse, + TResult Function(ElectrumError_Message value)? message, + TResult Function(ElectrumError_InvalidDNSNameError value)? + invalidDnsNameError, + TResult Function(ElectrumError_MissingDomain value)? missingDomain, + TResult Function(ElectrumError_AllAttemptsErrored value)? + allAttemptsErrored, + TResult Function(ElectrumError_SharedIOError value)? sharedIoError, + TResult Function(ElectrumError_CouldntLockReader value)? couldntLockReader, + TResult Function(ElectrumError_Mpsc value)? mpsc, + TResult Function(ElectrumError_CouldNotCreateConnection value)? + couldNotCreateConnection, + TResult Function(ElectrumError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + required TResult orElse(), + }) { + if (couldntLockReader != null) { + return couldntLockReader(this); + } + return orElse(); + } +} + +abstract class ElectrumError_CouldntLockReader extends ElectrumError { + const factory ElectrumError_CouldntLockReader() = + _$ElectrumError_CouldntLockReaderImpl; + const ElectrumError_CouldntLockReader._() : super._(); +} + +/// @nodoc +abstract class _$$ElectrumError_MpscImplCopyWith<$Res> { + factory _$$ElectrumError_MpscImplCopyWith(_$ElectrumError_MpscImpl value, + $Res Function(_$ElectrumError_MpscImpl) then) = + __$$ElectrumError_MpscImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$ElectrumError_MpscImplCopyWithImpl<$Res> + extends _$ElectrumErrorCopyWithImpl<$Res, _$ElectrumError_MpscImpl> + implements _$$ElectrumError_MpscImplCopyWith<$Res> { + __$$ElectrumError_MpscImplCopyWithImpl(_$ElectrumError_MpscImpl _value, + $Res Function(_$ElectrumError_MpscImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$ElectrumError_MpscImpl extends ElectrumError_Mpsc { + const _$ElectrumError_MpscImpl() : super._(); + + @override + String toString() { + return 'ElectrumError.mpsc()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && other is _$ElectrumError_MpscImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) ioError, + required TResult Function(String errorMessage) json, + required TResult Function(String errorMessage) hex, + required TResult Function(String errorMessage) protocol, + required TResult Function(String errorMessage) bitcoin, + required TResult Function() alreadySubscribed, + required TResult Function() notSubscribed, + required TResult Function(String errorMessage) invalidResponse, + required TResult Function(String errorMessage) message, + required TResult Function(String domain) invalidDnsNameError, + required TResult Function() missingDomain, + required TResult Function() allAttemptsErrored, + required TResult Function(String errorMessage) sharedIoError, + required TResult Function() couldntLockReader, + required TResult Function() mpsc, + required TResult Function(String errorMessage) couldNotCreateConnection, + required TResult Function() requestAlreadyConsumed, + }) { + return mpsc(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? ioError, + TResult? Function(String errorMessage)? json, + TResult? Function(String errorMessage)? hex, + TResult? Function(String errorMessage)? protocol, + TResult? Function(String errorMessage)? bitcoin, + TResult? Function()? alreadySubscribed, + TResult? Function()? notSubscribed, + TResult? Function(String errorMessage)? invalidResponse, + TResult? Function(String errorMessage)? message, + TResult? Function(String domain)? invalidDnsNameError, + TResult? Function()? missingDomain, + TResult? Function()? allAttemptsErrored, + TResult? Function(String errorMessage)? sharedIoError, + TResult? Function()? couldntLockReader, + TResult? Function()? mpsc, + TResult? Function(String errorMessage)? couldNotCreateConnection, + TResult? Function()? requestAlreadyConsumed, + }) { + return mpsc?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? ioError, + TResult Function(String errorMessage)? json, + TResult Function(String errorMessage)? hex, + TResult Function(String errorMessage)? protocol, + TResult Function(String errorMessage)? bitcoin, + TResult Function()? alreadySubscribed, + TResult Function()? notSubscribed, + TResult Function(String errorMessage)? invalidResponse, + TResult Function(String errorMessage)? message, + TResult Function(String domain)? invalidDnsNameError, + TResult Function()? missingDomain, + TResult Function()? allAttemptsErrored, + TResult Function(String errorMessage)? sharedIoError, + TResult Function()? couldntLockReader, + TResult Function()? mpsc, + TResult Function(String errorMessage)? couldNotCreateConnection, + TResult Function()? requestAlreadyConsumed, + required TResult orElse(), + }) { + if (mpsc != null) { + return mpsc(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(ElectrumError_IOError value) ioError, + required TResult Function(ElectrumError_Json value) json, + required TResult Function(ElectrumError_Hex value) hex, + required TResult Function(ElectrumError_Protocol value) protocol, + required TResult Function(ElectrumError_Bitcoin value) bitcoin, + required TResult Function(ElectrumError_AlreadySubscribed value) + alreadySubscribed, + required TResult Function(ElectrumError_NotSubscribed value) notSubscribed, + required TResult Function(ElectrumError_InvalidResponse value) + invalidResponse, + required TResult Function(ElectrumError_Message value) message, + required TResult Function(ElectrumError_InvalidDNSNameError value) + invalidDnsNameError, + required TResult Function(ElectrumError_MissingDomain value) missingDomain, + required TResult Function(ElectrumError_AllAttemptsErrored value) + allAttemptsErrored, + required TResult Function(ElectrumError_SharedIOError value) sharedIoError, + required TResult Function(ElectrumError_CouldntLockReader value) + couldntLockReader, + required TResult Function(ElectrumError_Mpsc value) mpsc, + required TResult Function(ElectrumError_CouldNotCreateConnection value) + couldNotCreateConnection, + required TResult Function(ElectrumError_RequestAlreadyConsumed value) + requestAlreadyConsumed, + }) { + return mpsc(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(ElectrumError_IOError value)? ioError, + TResult? Function(ElectrumError_Json value)? json, + TResult? Function(ElectrumError_Hex value)? hex, + TResult? Function(ElectrumError_Protocol value)? protocol, + TResult? Function(ElectrumError_Bitcoin value)? bitcoin, + TResult? Function(ElectrumError_AlreadySubscribed value)? alreadySubscribed, + TResult? Function(ElectrumError_NotSubscribed value)? notSubscribed, + TResult? Function(ElectrumError_InvalidResponse value)? invalidResponse, + TResult? Function(ElectrumError_Message value)? message, + TResult? Function(ElectrumError_InvalidDNSNameError value)? + invalidDnsNameError, + TResult? Function(ElectrumError_MissingDomain value)? missingDomain, + TResult? Function(ElectrumError_AllAttemptsErrored value)? + allAttemptsErrored, + TResult? Function(ElectrumError_SharedIOError value)? sharedIoError, + TResult? Function(ElectrumError_CouldntLockReader value)? couldntLockReader, + TResult? Function(ElectrumError_Mpsc value)? mpsc, + TResult? Function(ElectrumError_CouldNotCreateConnection value)? + couldNotCreateConnection, + TResult? Function(ElectrumError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + }) { + return mpsc?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ElectrumError_IOError value)? ioError, + TResult Function(ElectrumError_Json value)? json, + TResult Function(ElectrumError_Hex value)? hex, + TResult Function(ElectrumError_Protocol value)? protocol, + TResult Function(ElectrumError_Bitcoin value)? bitcoin, + TResult Function(ElectrumError_AlreadySubscribed value)? alreadySubscribed, + TResult Function(ElectrumError_NotSubscribed value)? notSubscribed, + TResult Function(ElectrumError_InvalidResponse value)? invalidResponse, + TResult Function(ElectrumError_Message value)? message, + TResult Function(ElectrumError_InvalidDNSNameError value)? + invalidDnsNameError, + TResult Function(ElectrumError_MissingDomain value)? missingDomain, + TResult Function(ElectrumError_AllAttemptsErrored value)? + allAttemptsErrored, + TResult Function(ElectrumError_SharedIOError value)? sharedIoError, + TResult Function(ElectrumError_CouldntLockReader value)? couldntLockReader, + TResult Function(ElectrumError_Mpsc value)? mpsc, + TResult Function(ElectrumError_CouldNotCreateConnection value)? + couldNotCreateConnection, + TResult Function(ElectrumError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + required TResult orElse(), + }) { + if (mpsc != null) { + return mpsc(this); + } + return orElse(); + } +} + +abstract class ElectrumError_Mpsc extends ElectrumError { + const factory ElectrumError_Mpsc() = _$ElectrumError_MpscImpl; + const ElectrumError_Mpsc._() : super._(); +} + +/// @nodoc +abstract class _$$ElectrumError_CouldNotCreateConnectionImplCopyWith<$Res> { + factory _$$ElectrumError_CouldNotCreateConnectionImplCopyWith( + _$ElectrumError_CouldNotCreateConnectionImpl value, + $Res Function(_$ElectrumError_CouldNotCreateConnectionImpl) then) = + __$$ElectrumError_CouldNotCreateConnectionImplCopyWithImpl<$Res>; + @useResult + $Res call({String errorMessage}); +} + +/// @nodoc +class __$$ElectrumError_CouldNotCreateConnectionImplCopyWithImpl<$Res> + extends _$ElectrumErrorCopyWithImpl<$Res, + _$ElectrumError_CouldNotCreateConnectionImpl> + implements _$$ElectrumError_CouldNotCreateConnectionImplCopyWith<$Res> { + __$$ElectrumError_CouldNotCreateConnectionImplCopyWithImpl( + _$ElectrumError_CouldNotCreateConnectionImpl _value, + $Res Function(_$ElectrumError_CouldNotCreateConnectionImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? errorMessage = null, + }) { + return _then(_$ElectrumError_CouldNotCreateConnectionImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$ElectrumError_CouldNotCreateConnectionImpl + extends ElectrumError_CouldNotCreateConnection { + const _$ElectrumError_CouldNotCreateConnectionImpl( + {required this.errorMessage}) + : super._(); + + @override + final String errorMessage; + + @override + String toString() { + return 'ElectrumError.couldNotCreateConnection(errorMessage: $errorMessage)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$ElectrumError_CouldNotCreateConnectionImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); + } + + @override + int get hashCode => Object.hash(runtimeType, errorMessage); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$ElectrumError_CouldNotCreateConnectionImplCopyWith< + _$ElectrumError_CouldNotCreateConnectionImpl> + get copyWith => + __$$ElectrumError_CouldNotCreateConnectionImplCopyWithImpl< + _$ElectrumError_CouldNotCreateConnectionImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) ioError, + required TResult Function(String errorMessage) json, + required TResult Function(String errorMessage) hex, + required TResult Function(String errorMessage) protocol, + required TResult Function(String errorMessage) bitcoin, + required TResult Function() alreadySubscribed, + required TResult Function() notSubscribed, + required TResult Function(String errorMessage) invalidResponse, + required TResult Function(String errorMessage) message, + required TResult Function(String domain) invalidDnsNameError, + required TResult Function() missingDomain, + required TResult Function() allAttemptsErrored, + required TResult Function(String errorMessage) sharedIoError, + required TResult Function() couldntLockReader, + required TResult Function() mpsc, + required TResult Function(String errorMessage) couldNotCreateConnection, + required TResult Function() requestAlreadyConsumed, + }) { + return couldNotCreateConnection(errorMessage); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? ioError, + TResult? Function(String errorMessage)? json, + TResult? Function(String errorMessage)? hex, + TResult? Function(String errorMessage)? protocol, + TResult? Function(String errorMessage)? bitcoin, + TResult? Function()? alreadySubscribed, + TResult? Function()? notSubscribed, + TResult? Function(String errorMessage)? invalidResponse, + TResult? Function(String errorMessage)? message, + TResult? Function(String domain)? invalidDnsNameError, + TResult? Function()? missingDomain, + TResult? Function()? allAttemptsErrored, + TResult? Function(String errorMessage)? sharedIoError, + TResult? Function()? couldntLockReader, + TResult? Function()? mpsc, + TResult? Function(String errorMessage)? couldNotCreateConnection, + TResult? Function()? requestAlreadyConsumed, + }) { + return couldNotCreateConnection?.call(errorMessage); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? ioError, + TResult Function(String errorMessage)? json, + TResult Function(String errorMessage)? hex, + TResult Function(String errorMessage)? protocol, + TResult Function(String errorMessage)? bitcoin, + TResult Function()? alreadySubscribed, + TResult Function()? notSubscribed, + TResult Function(String errorMessage)? invalidResponse, + TResult Function(String errorMessage)? message, + TResult Function(String domain)? invalidDnsNameError, + TResult Function()? missingDomain, + TResult Function()? allAttemptsErrored, + TResult Function(String errorMessage)? sharedIoError, + TResult Function()? couldntLockReader, + TResult Function()? mpsc, + TResult Function(String errorMessage)? couldNotCreateConnection, + TResult Function()? requestAlreadyConsumed, + required TResult orElse(), + }) { + if (couldNotCreateConnection != null) { + return couldNotCreateConnection(errorMessage); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(ElectrumError_IOError value) ioError, + required TResult Function(ElectrumError_Json value) json, + required TResult Function(ElectrumError_Hex value) hex, + required TResult Function(ElectrumError_Protocol value) protocol, + required TResult Function(ElectrumError_Bitcoin value) bitcoin, + required TResult Function(ElectrumError_AlreadySubscribed value) + alreadySubscribed, + required TResult Function(ElectrumError_NotSubscribed value) notSubscribed, + required TResult Function(ElectrumError_InvalidResponse value) + invalidResponse, + required TResult Function(ElectrumError_Message value) message, + required TResult Function(ElectrumError_InvalidDNSNameError value) + invalidDnsNameError, + required TResult Function(ElectrumError_MissingDomain value) missingDomain, + required TResult Function(ElectrumError_AllAttemptsErrored value) + allAttemptsErrored, + required TResult Function(ElectrumError_SharedIOError value) sharedIoError, + required TResult Function(ElectrumError_CouldntLockReader value) + couldntLockReader, + required TResult Function(ElectrumError_Mpsc value) mpsc, + required TResult Function(ElectrumError_CouldNotCreateConnection value) + couldNotCreateConnection, + required TResult Function(ElectrumError_RequestAlreadyConsumed value) + requestAlreadyConsumed, + }) { + return couldNotCreateConnection(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(ElectrumError_IOError value)? ioError, + TResult? Function(ElectrumError_Json value)? json, + TResult? Function(ElectrumError_Hex value)? hex, + TResult? Function(ElectrumError_Protocol value)? protocol, + TResult? Function(ElectrumError_Bitcoin value)? bitcoin, + TResult? Function(ElectrumError_AlreadySubscribed value)? alreadySubscribed, + TResult? Function(ElectrumError_NotSubscribed value)? notSubscribed, + TResult? Function(ElectrumError_InvalidResponse value)? invalidResponse, + TResult? Function(ElectrumError_Message value)? message, + TResult? Function(ElectrumError_InvalidDNSNameError value)? + invalidDnsNameError, + TResult? Function(ElectrumError_MissingDomain value)? missingDomain, + TResult? Function(ElectrumError_AllAttemptsErrored value)? + allAttemptsErrored, + TResult? Function(ElectrumError_SharedIOError value)? sharedIoError, + TResult? Function(ElectrumError_CouldntLockReader value)? couldntLockReader, + TResult? Function(ElectrumError_Mpsc value)? mpsc, + TResult? Function(ElectrumError_CouldNotCreateConnection value)? + couldNotCreateConnection, + TResult? Function(ElectrumError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + }) { + return couldNotCreateConnection?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ElectrumError_IOError value)? ioError, + TResult Function(ElectrumError_Json value)? json, + TResult Function(ElectrumError_Hex value)? hex, + TResult Function(ElectrumError_Protocol value)? protocol, + TResult Function(ElectrumError_Bitcoin value)? bitcoin, + TResult Function(ElectrumError_AlreadySubscribed value)? alreadySubscribed, + TResult Function(ElectrumError_NotSubscribed value)? notSubscribed, + TResult Function(ElectrumError_InvalidResponse value)? invalidResponse, + TResult Function(ElectrumError_Message value)? message, + TResult Function(ElectrumError_InvalidDNSNameError value)? + invalidDnsNameError, + TResult Function(ElectrumError_MissingDomain value)? missingDomain, + TResult Function(ElectrumError_AllAttemptsErrored value)? + allAttemptsErrored, + TResult Function(ElectrumError_SharedIOError value)? sharedIoError, + TResult Function(ElectrumError_CouldntLockReader value)? couldntLockReader, + TResult Function(ElectrumError_Mpsc value)? mpsc, + TResult Function(ElectrumError_CouldNotCreateConnection value)? + couldNotCreateConnection, + TResult Function(ElectrumError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + required TResult orElse(), + }) { + if (couldNotCreateConnection != null) { + return couldNotCreateConnection(this); + } + return orElse(); + } +} + +abstract class ElectrumError_CouldNotCreateConnection extends ElectrumError { + const factory ElectrumError_CouldNotCreateConnection( + {required final String errorMessage}) = + _$ElectrumError_CouldNotCreateConnectionImpl; + const ElectrumError_CouldNotCreateConnection._() : super._(); + + String get errorMessage; + @JsonKey(ignore: true) + _$$ElectrumError_CouldNotCreateConnectionImplCopyWith< + _$ElectrumError_CouldNotCreateConnectionImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$ElectrumError_RequestAlreadyConsumedImplCopyWith<$Res> { + factory _$$ElectrumError_RequestAlreadyConsumedImplCopyWith( + _$ElectrumError_RequestAlreadyConsumedImpl value, + $Res Function(_$ElectrumError_RequestAlreadyConsumedImpl) then) = + __$$ElectrumError_RequestAlreadyConsumedImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$ElectrumError_RequestAlreadyConsumedImplCopyWithImpl<$Res> + extends _$ElectrumErrorCopyWithImpl<$Res, + _$ElectrumError_RequestAlreadyConsumedImpl> + implements _$$ElectrumError_RequestAlreadyConsumedImplCopyWith<$Res> { + __$$ElectrumError_RequestAlreadyConsumedImplCopyWithImpl( + _$ElectrumError_RequestAlreadyConsumedImpl _value, + $Res Function(_$ElectrumError_RequestAlreadyConsumedImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$ElectrumError_RequestAlreadyConsumedImpl + extends ElectrumError_RequestAlreadyConsumed { + const _$ElectrumError_RequestAlreadyConsumedImpl() : super._(); + + @override + String toString() { + return 'ElectrumError.requestAlreadyConsumed()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$ElectrumError_RequestAlreadyConsumedImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) ioError, + required TResult Function(String errorMessage) json, + required TResult Function(String errorMessage) hex, + required TResult Function(String errorMessage) protocol, + required TResult Function(String errorMessage) bitcoin, + required TResult Function() alreadySubscribed, + required TResult Function() notSubscribed, + required TResult Function(String errorMessage) invalidResponse, + required TResult Function(String errorMessage) message, + required TResult Function(String domain) invalidDnsNameError, + required TResult Function() missingDomain, + required TResult Function() allAttemptsErrored, + required TResult Function(String errorMessage) sharedIoError, + required TResult Function() couldntLockReader, + required TResult Function() mpsc, + required TResult Function(String errorMessage) couldNotCreateConnection, + required TResult Function() requestAlreadyConsumed, + }) { + return requestAlreadyConsumed(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? ioError, + TResult? Function(String errorMessage)? json, + TResult? Function(String errorMessage)? hex, + TResult? Function(String errorMessage)? protocol, + TResult? Function(String errorMessage)? bitcoin, + TResult? Function()? alreadySubscribed, + TResult? Function()? notSubscribed, + TResult? Function(String errorMessage)? invalidResponse, + TResult? Function(String errorMessage)? message, + TResult? Function(String domain)? invalidDnsNameError, + TResult? Function()? missingDomain, + TResult? Function()? allAttemptsErrored, + TResult? Function(String errorMessage)? sharedIoError, + TResult? Function()? couldntLockReader, + TResult? Function()? mpsc, + TResult? Function(String errorMessage)? couldNotCreateConnection, + TResult? Function()? requestAlreadyConsumed, + }) { + return requestAlreadyConsumed?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? ioError, + TResult Function(String errorMessage)? json, + TResult Function(String errorMessage)? hex, + TResult Function(String errorMessage)? protocol, + TResult Function(String errorMessage)? bitcoin, + TResult Function()? alreadySubscribed, + TResult Function()? notSubscribed, + TResult Function(String errorMessage)? invalidResponse, + TResult Function(String errorMessage)? message, + TResult Function(String domain)? invalidDnsNameError, + TResult Function()? missingDomain, + TResult Function()? allAttemptsErrored, + TResult Function(String errorMessage)? sharedIoError, + TResult Function()? couldntLockReader, + TResult Function()? mpsc, + TResult Function(String errorMessage)? couldNotCreateConnection, + TResult Function()? requestAlreadyConsumed, + required TResult orElse(), + }) { + if (requestAlreadyConsumed != null) { + return requestAlreadyConsumed(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(ElectrumError_IOError value) ioError, + required TResult Function(ElectrumError_Json value) json, + required TResult Function(ElectrumError_Hex value) hex, + required TResult Function(ElectrumError_Protocol value) protocol, + required TResult Function(ElectrumError_Bitcoin value) bitcoin, + required TResult Function(ElectrumError_AlreadySubscribed value) + alreadySubscribed, + required TResult Function(ElectrumError_NotSubscribed value) notSubscribed, + required TResult Function(ElectrumError_InvalidResponse value) + invalidResponse, + required TResult Function(ElectrumError_Message value) message, + required TResult Function(ElectrumError_InvalidDNSNameError value) + invalidDnsNameError, + required TResult Function(ElectrumError_MissingDomain value) missingDomain, + required TResult Function(ElectrumError_AllAttemptsErrored value) + allAttemptsErrored, + required TResult Function(ElectrumError_SharedIOError value) sharedIoError, + required TResult Function(ElectrumError_CouldntLockReader value) + couldntLockReader, + required TResult Function(ElectrumError_Mpsc value) mpsc, + required TResult Function(ElectrumError_CouldNotCreateConnection value) + couldNotCreateConnection, + required TResult Function(ElectrumError_RequestAlreadyConsumed value) + requestAlreadyConsumed, + }) { + return requestAlreadyConsumed(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(ElectrumError_IOError value)? ioError, + TResult? Function(ElectrumError_Json value)? json, + TResult? Function(ElectrumError_Hex value)? hex, + TResult? Function(ElectrumError_Protocol value)? protocol, + TResult? Function(ElectrumError_Bitcoin value)? bitcoin, + TResult? Function(ElectrumError_AlreadySubscribed value)? alreadySubscribed, + TResult? Function(ElectrumError_NotSubscribed value)? notSubscribed, + TResult? Function(ElectrumError_InvalidResponse value)? invalidResponse, + TResult? Function(ElectrumError_Message value)? message, + TResult? Function(ElectrumError_InvalidDNSNameError value)? + invalidDnsNameError, + TResult? Function(ElectrumError_MissingDomain value)? missingDomain, + TResult? Function(ElectrumError_AllAttemptsErrored value)? + allAttemptsErrored, + TResult? Function(ElectrumError_SharedIOError value)? sharedIoError, + TResult? Function(ElectrumError_CouldntLockReader value)? couldntLockReader, + TResult? Function(ElectrumError_Mpsc value)? mpsc, + TResult? Function(ElectrumError_CouldNotCreateConnection value)? + couldNotCreateConnection, + TResult? Function(ElectrumError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + }) { + return requestAlreadyConsumed?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ElectrumError_IOError value)? ioError, + TResult Function(ElectrumError_Json value)? json, + TResult Function(ElectrumError_Hex value)? hex, + TResult Function(ElectrumError_Protocol value)? protocol, + TResult Function(ElectrumError_Bitcoin value)? bitcoin, + TResult Function(ElectrumError_AlreadySubscribed value)? alreadySubscribed, + TResult Function(ElectrumError_NotSubscribed value)? notSubscribed, + TResult Function(ElectrumError_InvalidResponse value)? invalidResponse, + TResult Function(ElectrumError_Message value)? message, + TResult Function(ElectrumError_InvalidDNSNameError value)? + invalidDnsNameError, + TResult Function(ElectrumError_MissingDomain value)? missingDomain, + TResult Function(ElectrumError_AllAttemptsErrored value)? + allAttemptsErrored, + TResult Function(ElectrumError_SharedIOError value)? sharedIoError, + TResult Function(ElectrumError_CouldntLockReader value)? couldntLockReader, + TResult Function(ElectrumError_Mpsc value)? mpsc, + TResult Function(ElectrumError_CouldNotCreateConnection value)? + couldNotCreateConnection, + TResult Function(ElectrumError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + required TResult orElse(), + }) { + if (requestAlreadyConsumed != null) { + return requestAlreadyConsumed(this); + } + return orElse(); + } +} + +abstract class ElectrumError_RequestAlreadyConsumed extends ElectrumError { + const factory ElectrumError_RequestAlreadyConsumed() = + _$ElectrumError_RequestAlreadyConsumedImpl; + const ElectrumError_RequestAlreadyConsumed._() : super._(); +} + +/// @nodoc +mixin _$EsploraError { + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) minreq, + required TResult Function(int status, String errorMessage) httpResponse, + required TResult Function(String errorMessage) parsing, + required TResult Function(String errorMessage) statusCode, + required TResult Function(String errorMessage) bitcoinEncoding, + required TResult Function(String errorMessage) hexToArray, + required TResult Function(String errorMessage) hexToBytes, + required TResult Function() transactionNotFound, + required TResult Function(int height) headerHeightNotFound, + required TResult Function() headerHashNotFound, + required TResult Function(String name) invalidHttpHeaderName, + required TResult Function(String value) invalidHttpHeaderValue, + required TResult Function() requestAlreadyConsumed, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? minreq, + TResult? Function(int status, String errorMessage)? httpResponse, + TResult? Function(String errorMessage)? parsing, + TResult? Function(String errorMessage)? statusCode, + TResult? Function(String errorMessage)? bitcoinEncoding, + TResult? Function(String errorMessage)? hexToArray, + TResult? Function(String errorMessage)? hexToBytes, + TResult? Function()? transactionNotFound, + TResult? Function(int height)? headerHeightNotFound, + TResult? Function()? headerHashNotFound, + TResult? Function(String name)? invalidHttpHeaderName, + TResult? Function(String value)? invalidHttpHeaderValue, + TResult? Function()? requestAlreadyConsumed, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? minreq, + TResult Function(int status, String errorMessage)? httpResponse, + TResult Function(String errorMessage)? parsing, + TResult Function(String errorMessage)? statusCode, + TResult Function(String errorMessage)? bitcoinEncoding, + TResult Function(String errorMessage)? hexToArray, + TResult Function(String errorMessage)? hexToBytes, + TResult Function()? transactionNotFound, + TResult Function(int height)? headerHeightNotFound, + TResult Function()? headerHashNotFound, + TResult Function(String name)? invalidHttpHeaderName, + TResult Function(String value)? invalidHttpHeaderValue, + TResult Function()? requestAlreadyConsumed, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(EsploraError_Minreq value) minreq, + required TResult Function(EsploraError_HttpResponse value) httpResponse, + required TResult Function(EsploraError_Parsing value) parsing, + required TResult Function(EsploraError_StatusCode value) statusCode, + required TResult Function(EsploraError_BitcoinEncoding value) + bitcoinEncoding, + required TResult Function(EsploraError_HexToArray value) hexToArray, + required TResult Function(EsploraError_HexToBytes value) hexToBytes, + required TResult Function(EsploraError_TransactionNotFound value) + transactionNotFound, + required TResult Function(EsploraError_HeaderHeightNotFound value) + headerHeightNotFound, + required TResult Function(EsploraError_HeaderHashNotFound value) + headerHashNotFound, + required TResult Function(EsploraError_InvalidHttpHeaderName value) + invalidHttpHeaderName, + required TResult Function(EsploraError_InvalidHttpHeaderValue value) + invalidHttpHeaderValue, + required TResult Function(EsploraError_RequestAlreadyConsumed value) + requestAlreadyConsumed, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(EsploraError_Minreq value)? minreq, + TResult? Function(EsploraError_HttpResponse value)? httpResponse, + TResult? Function(EsploraError_Parsing value)? parsing, + TResult? Function(EsploraError_StatusCode value)? statusCode, + TResult? Function(EsploraError_BitcoinEncoding value)? bitcoinEncoding, + TResult? Function(EsploraError_HexToArray value)? hexToArray, + TResult? Function(EsploraError_HexToBytes value)? hexToBytes, + TResult? Function(EsploraError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(EsploraError_HeaderHeightNotFound value)? + headerHeightNotFound, + TResult? Function(EsploraError_HeaderHashNotFound value)? + headerHashNotFound, + TResult? Function(EsploraError_InvalidHttpHeaderName value)? + invalidHttpHeaderName, + TResult? Function(EsploraError_InvalidHttpHeaderValue value)? + invalidHttpHeaderValue, + TResult? Function(EsploraError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(EsploraError_Minreq value)? minreq, + TResult Function(EsploraError_HttpResponse value)? httpResponse, + TResult Function(EsploraError_Parsing value)? parsing, + TResult Function(EsploraError_StatusCode value)? statusCode, + TResult Function(EsploraError_BitcoinEncoding value)? bitcoinEncoding, + TResult Function(EsploraError_HexToArray value)? hexToArray, + TResult Function(EsploraError_HexToBytes value)? hexToBytes, + TResult Function(EsploraError_TransactionNotFound value)? + transactionNotFound, + TResult Function(EsploraError_HeaderHeightNotFound value)? + headerHeightNotFound, + TResult Function(EsploraError_HeaderHashNotFound value)? headerHashNotFound, + TResult Function(EsploraError_InvalidHttpHeaderName value)? + invalidHttpHeaderName, + TResult Function(EsploraError_InvalidHttpHeaderValue value)? + invalidHttpHeaderValue, + TResult Function(EsploraError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $EsploraErrorCopyWith<$Res> { + factory $EsploraErrorCopyWith( + EsploraError value, $Res Function(EsploraError) then) = + _$EsploraErrorCopyWithImpl<$Res, EsploraError>; +} + +/// @nodoc +class _$EsploraErrorCopyWithImpl<$Res, $Val extends EsploraError> + implements $EsploraErrorCopyWith<$Res> { + _$EsploraErrorCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; +} + +/// @nodoc +abstract class _$$EsploraError_MinreqImplCopyWith<$Res> { + factory _$$EsploraError_MinreqImplCopyWith(_$EsploraError_MinreqImpl value, + $Res Function(_$EsploraError_MinreqImpl) then) = + __$$EsploraError_MinreqImplCopyWithImpl<$Res>; + @useResult + $Res call({String errorMessage}); +} + +/// @nodoc +class __$$EsploraError_MinreqImplCopyWithImpl<$Res> + extends _$EsploraErrorCopyWithImpl<$Res, _$EsploraError_MinreqImpl> + implements _$$EsploraError_MinreqImplCopyWith<$Res> { + __$$EsploraError_MinreqImplCopyWithImpl(_$EsploraError_MinreqImpl _value, + $Res Function(_$EsploraError_MinreqImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? errorMessage = null, + }) { + return _then(_$EsploraError_MinreqImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$EsploraError_MinreqImpl extends EsploraError_Minreq { + const _$EsploraError_MinreqImpl({required this.errorMessage}) : super._(); + + @override + final String errorMessage; + + @override + String toString() { + return 'EsploraError.minreq(errorMessage: $errorMessage)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$EsploraError_MinreqImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); + } + + @override + int get hashCode => Object.hash(runtimeType, errorMessage); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$EsploraError_MinreqImplCopyWith<_$EsploraError_MinreqImpl> get copyWith => + __$$EsploraError_MinreqImplCopyWithImpl<_$EsploraError_MinreqImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) minreq, + required TResult Function(int status, String errorMessage) httpResponse, + required TResult Function(String errorMessage) parsing, + required TResult Function(String errorMessage) statusCode, + required TResult Function(String errorMessage) bitcoinEncoding, + required TResult Function(String errorMessage) hexToArray, + required TResult Function(String errorMessage) hexToBytes, + required TResult Function() transactionNotFound, + required TResult Function(int height) headerHeightNotFound, + required TResult Function() headerHashNotFound, + required TResult Function(String name) invalidHttpHeaderName, + required TResult Function(String value) invalidHttpHeaderValue, + required TResult Function() requestAlreadyConsumed, + }) { + return minreq(errorMessage); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? minreq, + TResult? Function(int status, String errorMessage)? httpResponse, + TResult? Function(String errorMessage)? parsing, + TResult? Function(String errorMessage)? statusCode, + TResult? Function(String errorMessage)? bitcoinEncoding, + TResult? Function(String errorMessage)? hexToArray, + TResult? Function(String errorMessage)? hexToBytes, + TResult? Function()? transactionNotFound, + TResult? Function(int height)? headerHeightNotFound, + TResult? Function()? headerHashNotFound, + TResult? Function(String name)? invalidHttpHeaderName, + TResult? Function(String value)? invalidHttpHeaderValue, + TResult? Function()? requestAlreadyConsumed, + }) { + return minreq?.call(errorMessage); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? minreq, + TResult Function(int status, String errorMessage)? httpResponse, + TResult Function(String errorMessage)? parsing, + TResult Function(String errorMessage)? statusCode, + TResult Function(String errorMessage)? bitcoinEncoding, + TResult Function(String errorMessage)? hexToArray, + TResult Function(String errorMessage)? hexToBytes, + TResult Function()? transactionNotFound, + TResult Function(int height)? headerHeightNotFound, + TResult Function()? headerHashNotFound, + TResult Function(String name)? invalidHttpHeaderName, + TResult Function(String value)? invalidHttpHeaderValue, + TResult Function()? requestAlreadyConsumed, + required TResult orElse(), + }) { + if (minreq != null) { + return minreq(errorMessage); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(EsploraError_Minreq value) minreq, + required TResult Function(EsploraError_HttpResponse value) httpResponse, + required TResult Function(EsploraError_Parsing value) parsing, + required TResult Function(EsploraError_StatusCode value) statusCode, + required TResult Function(EsploraError_BitcoinEncoding value) + bitcoinEncoding, + required TResult Function(EsploraError_HexToArray value) hexToArray, + required TResult Function(EsploraError_HexToBytes value) hexToBytes, + required TResult Function(EsploraError_TransactionNotFound value) + transactionNotFound, + required TResult Function(EsploraError_HeaderHeightNotFound value) + headerHeightNotFound, + required TResult Function(EsploraError_HeaderHashNotFound value) + headerHashNotFound, + required TResult Function(EsploraError_InvalidHttpHeaderName value) + invalidHttpHeaderName, + required TResult Function(EsploraError_InvalidHttpHeaderValue value) + invalidHttpHeaderValue, + required TResult Function(EsploraError_RequestAlreadyConsumed value) + requestAlreadyConsumed, + }) { + return minreq(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(EsploraError_Minreq value)? minreq, + TResult? Function(EsploraError_HttpResponse value)? httpResponse, + TResult? Function(EsploraError_Parsing value)? parsing, + TResult? Function(EsploraError_StatusCode value)? statusCode, + TResult? Function(EsploraError_BitcoinEncoding value)? bitcoinEncoding, + TResult? Function(EsploraError_HexToArray value)? hexToArray, + TResult? Function(EsploraError_HexToBytes value)? hexToBytes, + TResult? Function(EsploraError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(EsploraError_HeaderHeightNotFound value)? + headerHeightNotFound, + TResult? Function(EsploraError_HeaderHashNotFound value)? + headerHashNotFound, + TResult? Function(EsploraError_InvalidHttpHeaderName value)? + invalidHttpHeaderName, + TResult? Function(EsploraError_InvalidHttpHeaderValue value)? + invalidHttpHeaderValue, + TResult? Function(EsploraError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + }) { + return minreq?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(EsploraError_Minreq value)? minreq, + TResult Function(EsploraError_HttpResponse value)? httpResponse, + TResult Function(EsploraError_Parsing value)? parsing, + TResult Function(EsploraError_StatusCode value)? statusCode, + TResult Function(EsploraError_BitcoinEncoding value)? bitcoinEncoding, + TResult Function(EsploraError_HexToArray value)? hexToArray, + TResult Function(EsploraError_HexToBytes value)? hexToBytes, + TResult Function(EsploraError_TransactionNotFound value)? + transactionNotFound, + TResult Function(EsploraError_HeaderHeightNotFound value)? + headerHeightNotFound, + TResult Function(EsploraError_HeaderHashNotFound value)? headerHashNotFound, + TResult Function(EsploraError_InvalidHttpHeaderName value)? + invalidHttpHeaderName, + TResult Function(EsploraError_InvalidHttpHeaderValue value)? + invalidHttpHeaderValue, + TResult Function(EsploraError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + required TResult orElse(), + }) { + if (minreq != null) { + return minreq(this); + } + return orElse(); + } +} + +abstract class EsploraError_Minreq extends EsploraError { + const factory EsploraError_Minreq({required final String errorMessage}) = + _$EsploraError_MinreqImpl; + const EsploraError_Minreq._() : super._(); + + String get errorMessage; + @JsonKey(ignore: true) + _$$EsploraError_MinreqImplCopyWith<_$EsploraError_MinreqImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$EsploraError_HttpResponseImplCopyWith<$Res> { + factory _$$EsploraError_HttpResponseImplCopyWith( + _$EsploraError_HttpResponseImpl value, + $Res Function(_$EsploraError_HttpResponseImpl) then) = + __$$EsploraError_HttpResponseImplCopyWithImpl<$Res>; + @useResult + $Res call({int status, String errorMessage}); +} + +/// @nodoc +class __$$EsploraError_HttpResponseImplCopyWithImpl<$Res> + extends _$EsploraErrorCopyWithImpl<$Res, _$EsploraError_HttpResponseImpl> + implements _$$EsploraError_HttpResponseImplCopyWith<$Res> { + __$$EsploraError_HttpResponseImplCopyWithImpl( + _$EsploraError_HttpResponseImpl _value, + $Res Function(_$EsploraError_HttpResponseImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? status = null, + Object? errorMessage = null, + }) { + return _then(_$EsploraError_HttpResponseImpl( + status: null == status + ? _value.status + : status // ignore: cast_nullable_to_non_nullable + as int, + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$EsploraError_HttpResponseImpl extends EsploraError_HttpResponse { + const _$EsploraError_HttpResponseImpl( + {required this.status, required this.errorMessage}) + : super._(); + + @override + final int status; + @override + final String errorMessage; + + @override + String toString() { + return 'EsploraError.httpResponse(status: $status, errorMessage: $errorMessage)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$EsploraError_HttpResponseImpl && + (identical(other.status, status) || other.status == status) && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); + } + + @override + int get hashCode => Object.hash(runtimeType, status, errorMessage); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$EsploraError_HttpResponseImplCopyWith<_$EsploraError_HttpResponseImpl> + get copyWith => __$$EsploraError_HttpResponseImplCopyWithImpl< + _$EsploraError_HttpResponseImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) minreq, + required TResult Function(int status, String errorMessage) httpResponse, + required TResult Function(String errorMessage) parsing, + required TResult Function(String errorMessage) statusCode, + required TResult Function(String errorMessage) bitcoinEncoding, + required TResult Function(String errorMessage) hexToArray, + required TResult Function(String errorMessage) hexToBytes, + required TResult Function() transactionNotFound, + required TResult Function(int height) headerHeightNotFound, + required TResult Function() headerHashNotFound, + required TResult Function(String name) invalidHttpHeaderName, + required TResult Function(String value) invalidHttpHeaderValue, + required TResult Function() requestAlreadyConsumed, + }) { + return httpResponse(status, errorMessage); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? minreq, + TResult? Function(int status, String errorMessage)? httpResponse, + TResult? Function(String errorMessage)? parsing, + TResult? Function(String errorMessage)? statusCode, + TResult? Function(String errorMessage)? bitcoinEncoding, + TResult? Function(String errorMessage)? hexToArray, + TResult? Function(String errorMessage)? hexToBytes, + TResult? Function()? transactionNotFound, + TResult? Function(int height)? headerHeightNotFound, + TResult? Function()? headerHashNotFound, + TResult? Function(String name)? invalidHttpHeaderName, + TResult? Function(String value)? invalidHttpHeaderValue, + TResult? Function()? requestAlreadyConsumed, + }) { + return httpResponse?.call(status, errorMessage); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? minreq, + TResult Function(int status, String errorMessage)? httpResponse, + TResult Function(String errorMessage)? parsing, + TResult Function(String errorMessage)? statusCode, + TResult Function(String errorMessage)? bitcoinEncoding, + TResult Function(String errorMessage)? hexToArray, + TResult Function(String errorMessage)? hexToBytes, + TResult Function()? transactionNotFound, + TResult Function(int height)? headerHeightNotFound, + TResult Function()? headerHashNotFound, + TResult Function(String name)? invalidHttpHeaderName, + TResult Function(String value)? invalidHttpHeaderValue, + TResult Function()? requestAlreadyConsumed, + required TResult orElse(), + }) { + if (httpResponse != null) { + return httpResponse(status, errorMessage); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(EsploraError_Minreq value) minreq, + required TResult Function(EsploraError_HttpResponse value) httpResponse, + required TResult Function(EsploraError_Parsing value) parsing, + required TResult Function(EsploraError_StatusCode value) statusCode, + required TResult Function(EsploraError_BitcoinEncoding value) + bitcoinEncoding, + required TResult Function(EsploraError_HexToArray value) hexToArray, + required TResult Function(EsploraError_HexToBytes value) hexToBytes, + required TResult Function(EsploraError_TransactionNotFound value) + transactionNotFound, + required TResult Function(EsploraError_HeaderHeightNotFound value) + headerHeightNotFound, + required TResult Function(EsploraError_HeaderHashNotFound value) + headerHashNotFound, + required TResult Function(EsploraError_InvalidHttpHeaderName value) + invalidHttpHeaderName, + required TResult Function(EsploraError_InvalidHttpHeaderValue value) + invalidHttpHeaderValue, + required TResult Function(EsploraError_RequestAlreadyConsumed value) + requestAlreadyConsumed, + }) { + return httpResponse(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(EsploraError_Minreq value)? minreq, + TResult? Function(EsploraError_HttpResponse value)? httpResponse, + TResult? Function(EsploraError_Parsing value)? parsing, + TResult? Function(EsploraError_StatusCode value)? statusCode, + TResult? Function(EsploraError_BitcoinEncoding value)? bitcoinEncoding, + TResult? Function(EsploraError_HexToArray value)? hexToArray, + TResult? Function(EsploraError_HexToBytes value)? hexToBytes, + TResult? Function(EsploraError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(EsploraError_HeaderHeightNotFound value)? + headerHeightNotFound, + TResult? Function(EsploraError_HeaderHashNotFound value)? + headerHashNotFound, + TResult? Function(EsploraError_InvalidHttpHeaderName value)? + invalidHttpHeaderName, + TResult? Function(EsploraError_InvalidHttpHeaderValue value)? + invalidHttpHeaderValue, + TResult? Function(EsploraError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + }) { + return httpResponse?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(EsploraError_Minreq value)? minreq, + TResult Function(EsploraError_HttpResponse value)? httpResponse, + TResult Function(EsploraError_Parsing value)? parsing, + TResult Function(EsploraError_StatusCode value)? statusCode, + TResult Function(EsploraError_BitcoinEncoding value)? bitcoinEncoding, + TResult Function(EsploraError_HexToArray value)? hexToArray, + TResult Function(EsploraError_HexToBytes value)? hexToBytes, + TResult Function(EsploraError_TransactionNotFound value)? + transactionNotFound, + TResult Function(EsploraError_HeaderHeightNotFound value)? + headerHeightNotFound, + TResult Function(EsploraError_HeaderHashNotFound value)? headerHashNotFound, + TResult Function(EsploraError_InvalidHttpHeaderName value)? + invalidHttpHeaderName, + TResult Function(EsploraError_InvalidHttpHeaderValue value)? + invalidHttpHeaderValue, + TResult Function(EsploraError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + required TResult orElse(), + }) { + if (httpResponse != null) { + return httpResponse(this); + } + return orElse(); + } +} + +abstract class EsploraError_HttpResponse extends EsploraError { + const factory EsploraError_HttpResponse( + {required final int status, + required final String errorMessage}) = _$EsploraError_HttpResponseImpl; + const EsploraError_HttpResponse._() : super._(); + + int get status; + String get errorMessage; + @JsonKey(ignore: true) + _$$EsploraError_HttpResponseImplCopyWith<_$EsploraError_HttpResponseImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$EsploraError_ParsingImplCopyWith<$Res> { + factory _$$EsploraError_ParsingImplCopyWith(_$EsploraError_ParsingImpl value, + $Res Function(_$EsploraError_ParsingImpl) then) = + __$$EsploraError_ParsingImplCopyWithImpl<$Res>; + @useResult + $Res call({String errorMessage}); +} + +/// @nodoc +class __$$EsploraError_ParsingImplCopyWithImpl<$Res> + extends _$EsploraErrorCopyWithImpl<$Res, _$EsploraError_ParsingImpl> + implements _$$EsploraError_ParsingImplCopyWith<$Res> { + __$$EsploraError_ParsingImplCopyWithImpl(_$EsploraError_ParsingImpl _value, + $Res Function(_$EsploraError_ParsingImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? errorMessage = null, + }) { + return _then(_$EsploraError_ParsingImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$EsploraError_ParsingImpl extends EsploraError_Parsing { + const _$EsploraError_ParsingImpl({required this.errorMessage}) : super._(); + + @override + final String errorMessage; + + @override + String toString() { + return 'EsploraError.parsing(errorMessage: $errorMessage)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$EsploraError_ParsingImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); + } + + @override + int get hashCode => Object.hash(runtimeType, errorMessage); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$EsploraError_ParsingImplCopyWith<_$EsploraError_ParsingImpl> + get copyWith => + __$$EsploraError_ParsingImplCopyWithImpl<_$EsploraError_ParsingImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) minreq, + required TResult Function(int status, String errorMessage) httpResponse, + required TResult Function(String errorMessage) parsing, + required TResult Function(String errorMessage) statusCode, + required TResult Function(String errorMessage) bitcoinEncoding, + required TResult Function(String errorMessage) hexToArray, + required TResult Function(String errorMessage) hexToBytes, + required TResult Function() transactionNotFound, + required TResult Function(int height) headerHeightNotFound, + required TResult Function() headerHashNotFound, + required TResult Function(String name) invalidHttpHeaderName, + required TResult Function(String value) invalidHttpHeaderValue, + required TResult Function() requestAlreadyConsumed, + }) { + return parsing(errorMessage); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? minreq, + TResult? Function(int status, String errorMessage)? httpResponse, + TResult? Function(String errorMessage)? parsing, + TResult? Function(String errorMessage)? statusCode, + TResult? Function(String errorMessage)? bitcoinEncoding, + TResult? Function(String errorMessage)? hexToArray, + TResult? Function(String errorMessage)? hexToBytes, + TResult? Function()? transactionNotFound, + TResult? Function(int height)? headerHeightNotFound, + TResult? Function()? headerHashNotFound, + TResult? Function(String name)? invalidHttpHeaderName, + TResult? Function(String value)? invalidHttpHeaderValue, + TResult? Function()? requestAlreadyConsumed, + }) { + return parsing?.call(errorMessage); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? minreq, + TResult Function(int status, String errorMessage)? httpResponse, + TResult Function(String errorMessage)? parsing, + TResult Function(String errorMessage)? statusCode, + TResult Function(String errorMessage)? bitcoinEncoding, + TResult Function(String errorMessage)? hexToArray, + TResult Function(String errorMessage)? hexToBytes, + TResult Function()? transactionNotFound, + TResult Function(int height)? headerHeightNotFound, + TResult Function()? headerHashNotFound, + TResult Function(String name)? invalidHttpHeaderName, + TResult Function(String value)? invalidHttpHeaderValue, + TResult Function()? requestAlreadyConsumed, + required TResult orElse(), + }) { + if (parsing != null) { + return parsing(errorMessage); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(EsploraError_Minreq value) minreq, + required TResult Function(EsploraError_HttpResponse value) httpResponse, + required TResult Function(EsploraError_Parsing value) parsing, + required TResult Function(EsploraError_StatusCode value) statusCode, + required TResult Function(EsploraError_BitcoinEncoding value) + bitcoinEncoding, + required TResult Function(EsploraError_HexToArray value) hexToArray, + required TResult Function(EsploraError_HexToBytes value) hexToBytes, + required TResult Function(EsploraError_TransactionNotFound value) + transactionNotFound, + required TResult Function(EsploraError_HeaderHeightNotFound value) + headerHeightNotFound, + required TResult Function(EsploraError_HeaderHashNotFound value) + headerHashNotFound, + required TResult Function(EsploraError_InvalidHttpHeaderName value) + invalidHttpHeaderName, + required TResult Function(EsploraError_InvalidHttpHeaderValue value) + invalidHttpHeaderValue, + required TResult Function(EsploraError_RequestAlreadyConsumed value) + requestAlreadyConsumed, + }) { + return parsing(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(EsploraError_Minreq value)? minreq, + TResult? Function(EsploraError_HttpResponse value)? httpResponse, + TResult? Function(EsploraError_Parsing value)? parsing, + TResult? Function(EsploraError_StatusCode value)? statusCode, + TResult? Function(EsploraError_BitcoinEncoding value)? bitcoinEncoding, + TResult? Function(EsploraError_HexToArray value)? hexToArray, + TResult? Function(EsploraError_HexToBytes value)? hexToBytes, + TResult? Function(EsploraError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(EsploraError_HeaderHeightNotFound value)? + headerHeightNotFound, + TResult? Function(EsploraError_HeaderHashNotFound value)? + headerHashNotFound, + TResult? Function(EsploraError_InvalidHttpHeaderName value)? + invalidHttpHeaderName, + TResult? Function(EsploraError_InvalidHttpHeaderValue value)? + invalidHttpHeaderValue, + TResult? Function(EsploraError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + }) { + return parsing?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(EsploraError_Minreq value)? minreq, + TResult Function(EsploraError_HttpResponse value)? httpResponse, + TResult Function(EsploraError_Parsing value)? parsing, + TResult Function(EsploraError_StatusCode value)? statusCode, + TResult Function(EsploraError_BitcoinEncoding value)? bitcoinEncoding, + TResult Function(EsploraError_HexToArray value)? hexToArray, + TResult Function(EsploraError_HexToBytes value)? hexToBytes, + TResult Function(EsploraError_TransactionNotFound value)? + transactionNotFound, + TResult Function(EsploraError_HeaderHeightNotFound value)? + headerHeightNotFound, + TResult Function(EsploraError_HeaderHashNotFound value)? headerHashNotFound, + TResult Function(EsploraError_InvalidHttpHeaderName value)? + invalidHttpHeaderName, + TResult Function(EsploraError_InvalidHttpHeaderValue value)? + invalidHttpHeaderValue, + TResult Function(EsploraError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + required TResult orElse(), + }) { + if (parsing != null) { + return parsing(this); + } + return orElse(); + } +} + +abstract class EsploraError_Parsing extends EsploraError { + const factory EsploraError_Parsing({required final String errorMessage}) = + _$EsploraError_ParsingImpl; + const EsploraError_Parsing._() : super._(); + + String get errorMessage; + @JsonKey(ignore: true) + _$$EsploraError_ParsingImplCopyWith<_$EsploraError_ParsingImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$EsploraError_StatusCodeImplCopyWith<$Res> { + factory _$$EsploraError_StatusCodeImplCopyWith( + _$EsploraError_StatusCodeImpl value, + $Res Function(_$EsploraError_StatusCodeImpl) then) = + __$$EsploraError_StatusCodeImplCopyWithImpl<$Res>; + @useResult + $Res call({String errorMessage}); +} + +/// @nodoc +class __$$EsploraError_StatusCodeImplCopyWithImpl<$Res> + extends _$EsploraErrorCopyWithImpl<$Res, _$EsploraError_StatusCodeImpl> + implements _$$EsploraError_StatusCodeImplCopyWith<$Res> { + __$$EsploraError_StatusCodeImplCopyWithImpl( + _$EsploraError_StatusCodeImpl _value, + $Res Function(_$EsploraError_StatusCodeImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? errorMessage = null, + }) { + return _then(_$EsploraError_StatusCodeImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$EsploraError_StatusCodeImpl extends EsploraError_StatusCode { + const _$EsploraError_StatusCodeImpl({required this.errorMessage}) : super._(); + + @override + final String errorMessage; + + @override + String toString() { + return 'EsploraError.statusCode(errorMessage: $errorMessage)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$EsploraError_StatusCodeImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); + } + + @override + int get hashCode => Object.hash(runtimeType, errorMessage); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$EsploraError_StatusCodeImplCopyWith<_$EsploraError_StatusCodeImpl> + get copyWith => __$$EsploraError_StatusCodeImplCopyWithImpl< + _$EsploraError_StatusCodeImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) minreq, + required TResult Function(int status, String errorMessage) httpResponse, + required TResult Function(String errorMessage) parsing, + required TResult Function(String errorMessage) statusCode, + required TResult Function(String errorMessage) bitcoinEncoding, + required TResult Function(String errorMessage) hexToArray, + required TResult Function(String errorMessage) hexToBytes, + required TResult Function() transactionNotFound, + required TResult Function(int height) headerHeightNotFound, + required TResult Function() headerHashNotFound, + required TResult Function(String name) invalidHttpHeaderName, + required TResult Function(String value) invalidHttpHeaderValue, + required TResult Function() requestAlreadyConsumed, + }) { + return statusCode(errorMessage); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? minreq, + TResult? Function(int status, String errorMessage)? httpResponse, + TResult? Function(String errorMessage)? parsing, + TResult? Function(String errorMessage)? statusCode, + TResult? Function(String errorMessage)? bitcoinEncoding, + TResult? Function(String errorMessage)? hexToArray, + TResult? Function(String errorMessage)? hexToBytes, + TResult? Function()? transactionNotFound, + TResult? Function(int height)? headerHeightNotFound, + TResult? Function()? headerHashNotFound, + TResult? Function(String name)? invalidHttpHeaderName, + TResult? Function(String value)? invalidHttpHeaderValue, + TResult? Function()? requestAlreadyConsumed, + }) { + return statusCode?.call(errorMessage); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? minreq, + TResult Function(int status, String errorMessage)? httpResponse, + TResult Function(String errorMessage)? parsing, + TResult Function(String errorMessage)? statusCode, + TResult Function(String errorMessage)? bitcoinEncoding, + TResult Function(String errorMessage)? hexToArray, + TResult Function(String errorMessage)? hexToBytes, + TResult Function()? transactionNotFound, + TResult Function(int height)? headerHeightNotFound, + TResult Function()? headerHashNotFound, + TResult Function(String name)? invalidHttpHeaderName, + TResult Function(String value)? invalidHttpHeaderValue, + TResult Function()? requestAlreadyConsumed, + required TResult orElse(), + }) { + if (statusCode != null) { + return statusCode(errorMessage); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(EsploraError_Minreq value) minreq, + required TResult Function(EsploraError_HttpResponse value) httpResponse, + required TResult Function(EsploraError_Parsing value) parsing, + required TResult Function(EsploraError_StatusCode value) statusCode, + required TResult Function(EsploraError_BitcoinEncoding value) + bitcoinEncoding, + required TResult Function(EsploraError_HexToArray value) hexToArray, + required TResult Function(EsploraError_HexToBytes value) hexToBytes, + required TResult Function(EsploraError_TransactionNotFound value) + transactionNotFound, + required TResult Function(EsploraError_HeaderHeightNotFound value) + headerHeightNotFound, + required TResult Function(EsploraError_HeaderHashNotFound value) + headerHashNotFound, + required TResult Function(EsploraError_InvalidHttpHeaderName value) + invalidHttpHeaderName, + required TResult Function(EsploraError_InvalidHttpHeaderValue value) + invalidHttpHeaderValue, + required TResult Function(EsploraError_RequestAlreadyConsumed value) + requestAlreadyConsumed, + }) { + return statusCode(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(EsploraError_Minreq value)? minreq, + TResult? Function(EsploraError_HttpResponse value)? httpResponse, + TResult? Function(EsploraError_Parsing value)? parsing, + TResult? Function(EsploraError_StatusCode value)? statusCode, + TResult? Function(EsploraError_BitcoinEncoding value)? bitcoinEncoding, + TResult? Function(EsploraError_HexToArray value)? hexToArray, + TResult? Function(EsploraError_HexToBytes value)? hexToBytes, + TResult? Function(EsploraError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(EsploraError_HeaderHeightNotFound value)? + headerHeightNotFound, + TResult? Function(EsploraError_HeaderHashNotFound value)? + headerHashNotFound, + TResult? Function(EsploraError_InvalidHttpHeaderName value)? + invalidHttpHeaderName, + TResult? Function(EsploraError_InvalidHttpHeaderValue value)? + invalidHttpHeaderValue, + TResult? Function(EsploraError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + }) { + return statusCode?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(EsploraError_Minreq value)? minreq, + TResult Function(EsploraError_HttpResponse value)? httpResponse, + TResult Function(EsploraError_Parsing value)? parsing, + TResult Function(EsploraError_StatusCode value)? statusCode, + TResult Function(EsploraError_BitcoinEncoding value)? bitcoinEncoding, + TResult Function(EsploraError_HexToArray value)? hexToArray, + TResult Function(EsploraError_HexToBytes value)? hexToBytes, + TResult Function(EsploraError_TransactionNotFound value)? + transactionNotFound, + TResult Function(EsploraError_HeaderHeightNotFound value)? + headerHeightNotFound, + TResult Function(EsploraError_HeaderHashNotFound value)? headerHashNotFound, + TResult Function(EsploraError_InvalidHttpHeaderName value)? + invalidHttpHeaderName, + TResult Function(EsploraError_InvalidHttpHeaderValue value)? + invalidHttpHeaderValue, + TResult Function(EsploraError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + required TResult orElse(), + }) { + if (statusCode != null) { + return statusCode(this); + } + return orElse(); + } +} + +abstract class EsploraError_StatusCode extends EsploraError { + const factory EsploraError_StatusCode({required final String errorMessage}) = + _$EsploraError_StatusCodeImpl; + const EsploraError_StatusCode._() : super._(); + + String get errorMessage; + @JsonKey(ignore: true) + _$$EsploraError_StatusCodeImplCopyWith<_$EsploraError_StatusCodeImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$EsploraError_BitcoinEncodingImplCopyWith<$Res> { + factory _$$EsploraError_BitcoinEncodingImplCopyWith( + _$EsploraError_BitcoinEncodingImpl value, + $Res Function(_$EsploraError_BitcoinEncodingImpl) then) = + __$$EsploraError_BitcoinEncodingImplCopyWithImpl<$Res>; + @useResult + $Res call({String errorMessage}); +} + +/// @nodoc +class __$$EsploraError_BitcoinEncodingImplCopyWithImpl<$Res> + extends _$EsploraErrorCopyWithImpl<$Res, _$EsploraError_BitcoinEncodingImpl> + implements _$$EsploraError_BitcoinEncodingImplCopyWith<$Res> { + __$$EsploraError_BitcoinEncodingImplCopyWithImpl( + _$EsploraError_BitcoinEncodingImpl _value, + $Res Function(_$EsploraError_BitcoinEncodingImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? errorMessage = null, + }) { + return _then(_$EsploraError_BitcoinEncodingImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$EsploraError_BitcoinEncodingImpl extends EsploraError_BitcoinEncoding { + const _$EsploraError_BitcoinEncodingImpl({required this.errorMessage}) + : super._(); + + @override + final String errorMessage; + + @override + String toString() { + return 'EsploraError.bitcoinEncoding(errorMessage: $errorMessage)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$EsploraError_BitcoinEncodingImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); + } + + @override + int get hashCode => Object.hash(runtimeType, errorMessage); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$EsploraError_BitcoinEncodingImplCopyWith< + _$EsploraError_BitcoinEncodingImpl> + get copyWith => __$$EsploraError_BitcoinEncodingImplCopyWithImpl< + _$EsploraError_BitcoinEncodingImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) minreq, + required TResult Function(int status, String errorMessage) httpResponse, + required TResult Function(String errorMessage) parsing, + required TResult Function(String errorMessage) statusCode, + required TResult Function(String errorMessage) bitcoinEncoding, + required TResult Function(String errorMessage) hexToArray, + required TResult Function(String errorMessage) hexToBytes, + required TResult Function() transactionNotFound, + required TResult Function(int height) headerHeightNotFound, + required TResult Function() headerHashNotFound, + required TResult Function(String name) invalidHttpHeaderName, + required TResult Function(String value) invalidHttpHeaderValue, + required TResult Function() requestAlreadyConsumed, + }) { + return bitcoinEncoding(errorMessage); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? minreq, + TResult? Function(int status, String errorMessage)? httpResponse, + TResult? Function(String errorMessage)? parsing, + TResult? Function(String errorMessage)? statusCode, + TResult? Function(String errorMessage)? bitcoinEncoding, + TResult? Function(String errorMessage)? hexToArray, + TResult? Function(String errorMessage)? hexToBytes, + TResult? Function()? transactionNotFound, + TResult? Function(int height)? headerHeightNotFound, + TResult? Function()? headerHashNotFound, + TResult? Function(String name)? invalidHttpHeaderName, + TResult? Function(String value)? invalidHttpHeaderValue, + TResult? Function()? requestAlreadyConsumed, + }) { + return bitcoinEncoding?.call(errorMessage); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? minreq, + TResult Function(int status, String errorMessage)? httpResponse, + TResult Function(String errorMessage)? parsing, + TResult Function(String errorMessage)? statusCode, + TResult Function(String errorMessage)? bitcoinEncoding, + TResult Function(String errorMessage)? hexToArray, + TResult Function(String errorMessage)? hexToBytes, + TResult Function()? transactionNotFound, + TResult Function(int height)? headerHeightNotFound, + TResult Function()? headerHashNotFound, + TResult Function(String name)? invalidHttpHeaderName, + TResult Function(String value)? invalidHttpHeaderValue, + TResult Function()? requestAlreadyConsumed, + required TResult orElse(), + }) { + if (bitcoinEncoding != null) { + return bitcoinEncoding(errorMessage); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(EsploraError_Minreq value) minreq, + required TResult Function(EsploraError_HttpResponse value) httpResponse, + required TResult Function(EsploraError_Parsing value) parsing, + required TResult Function(EsploraError_StatusCode value) statusCode, + required TResult Function(EsploraError_BitcoinEncoding value) + bitcoinEncoding, + required TResult Function(EsploraError_HexToArray value) hexToArray, + required TResult Function(EsploraError_HexToBytes value) hexToBytes, + required TResult Function(EsploraError_TransactionNotFound value) + transactionNotFound, + required TResult Function(EsploraError_HeaderHeightNotFound value) + headerHeightNotFound, + required TResult Function(EsploraError_HeaderHashNotFound value) + headerHashNotFound, + required TResult Function(EsploraError_InvalidHttpHeaderName value) + invalidHttpHeaderName, + required TResult Function(EsploraError_InvalidHttpHeaderValue value) + invalidHttpHeaderValue, + required TResult Function(EsploraError_RequestAlreadyConsumed value) + requestAlreadyConsumed, + }) { + return bitcoinEncoding(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(EsploraError_Minreq value)? minreq, + TResult? Function(EsploraError_HttpResponse value)? httpResponse, + TResult? Function(EsploraError_Parsing value)? parsing, + TResult? Function(EsploraError_StatusCode value)? statusCode, + TResult? Function(EsploraError_BitcoinEncoding value)? bitcoinEncoding, + TResult? Function(EsploraError_HexToArray value)? hexToArray, + TResult? Function(EsploraError_HexToBytes value)? hexToBytes, + TResult? Function(EsploraError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(EsploraError_HeaderHeightNotFound value)? + headerHeightNotFound, + TResult? Function(EsploraError_HeaderHashNotFound value)? + headerHashNotFound, + TResult? Function(EsploraError_InvalidHttpHeaderName value)? + invalidHttpHeaderName, + TResult? Function(EsploraError_InvalidHttpHeaderValue value)? + invalidHttpHeaderValue, + TResult? Function(EsploraError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + }) { + return bitcoinEncoding?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(EsploraError_Minreq value)? minreq, + TResult Function(EsploraError_HttpResponse value)? httpResponse, + TResult Function(EsploraError_Parsing value)? parsing, + TResult Function(EsploraError_StatusCode value)? statusCode, + TResult Function(EsploraError_BitcoinEncoding value)? bitcoinEncoding, + TResult Function(EsploraError_HexToArray value)? hexToArray, + TResult Function(EsploraError_HexToBytes value)? hexToBytes, + TResult Function(EsploraError_TransactionNotFound value)? + transactionNotFound, + TResult Function(EsploraError_HeaderHeightNotFound value)? + headerHeightNotFound, + TResult Function(EsploraError_HeaderHashNotFound value)? headerHashNotFound, + TResult Function(EsploraError_InvalidHttpHeaderName value)? + invalidHttpHeaderName, + TResult Function(EsploraError_InvalidHttpHeaderValue value)? + invalidHttpHeaderValue, + TResult Function(EsploraError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + required TResult orElse(), + }) { + if (bitcoinEncoding != null) { + return bitcoinEncoding(this); + } + return orElse(); + } +} + +abstract class EsploraError_BitcoinEncoding extends EsploraError { + const factory EsploraError_BitcoinEncoding( + {required final String errorMessage}) = + _$EsploraError_BitcoinEncodingImpl; + const EsploraError_BitcoinEncoding._() : super._(); + + String get errorMessage; + @JsonKey(ignore: true) + _$$EsploraError_BitcoinEncodingImplCopyWith< + _$EsploraError_BitcoinEncodingImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$EsploraError_HexToArrayImplCopyWith<$Res> { + factory _$$EsploraError_HexToArrayImplCopyWith( + _$EsploraError_HexToArrayImpl value, + $Res Function(_$EsploraError_HexToArrayImpl) then) = + __$$EsploraError_HexToArrayImplCopyWithImpl<$Res>; + @useResult + $Res call({String errorMessage}); +} + +/// @nodoc +class __$$EsploraError_HexToArrayImplCopyWithImpl<$Res> + extends _$EsploraErrorCopyWithImpl<$Res, _$EsploraError_HexToArrayImpl> + implements _$$EsploraError_HexToArrayImplCopyWith<$Res> { + __$$EsploraError_HexToArrayImplCopyWithImpl( + _$EsploraError_HexToArrayImpl _value, + $Res Function(_$EsploraError_HexToArrayImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? errorMessage = null, + }) { + return _then(_$EsploraError_HexToArrayImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$EsploraError_HexToArrayImpl extends EsploraError_HexToArray { + const _$EsploraError_HexToArrayImpl({required this.errorMessage}) : super._(); + + @override + final String errorMessage; + + @override + String toString() { + return 'EsploraError.hexToArray(errorMessage: $errorMessage)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$EsploraError_HexToArrayImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); + } + + @override + int get hashCode => Object.hash(runtimeType, errorMessage); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$EsploraError_HexToArrayImplCopyWith<_$EsploraError_HexToArrayImpl> + get copyWith => __$$EsploraError_HexToArrayImplCopyWithImpl< + _$EsploraError_HexToArrayImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) minreq, + required TResult Function(int status, String errorMessage) httpResponse, + required TResult Function(String errorMessage) parsing, + required TResult Function(String errorMessage) statusCode, + required TResult Function(String errorMessage) bitcoinEncoding, + required TResult Function(String errorMessage) hexToArray, + required TResult Function(String errorMessage) hexToBytes, + required TResult Function() transactionNotFound, + required TResult Function(int height) headerHeightNotFound, + required TResult Function() headerHashNotFound, + required TResult Function(String name) invalidHttpHeaderName, + required TResult Function(String value) invalidHttpHeaderValue, + required TResult Function() requestAlreadyConsumed, + }) { + return hexToArray(errorMessage); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? minreq, + TResult? Function(int status, String errorMessage)? httpResponse, + TResult? Function(String errorMessage)? parsing, + TResult? Function(String errorMessage)? statusCode, + TResult? Function(String errorMessage)? bitcoinEncoding, + TResult? Function(String errorMessage)? hexToArray, + TResult? Function(String errorMessage)? hexToBytes, + TResult? Function()? transactionNotFound, + TResult? Function(int height)? headerHeightNotFound, + TResult? Function()? headerHashNotFound, + TResult? Function(String name)? invalidHttpHeaderName, + TResult? Function(String value)? invalidHttpHeaderValue, + TResult? Function()? requestAlreadyConsumed, + }) { + return hexToArray?.call(errorMessage); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? minreq, + TResult Function(int status, String errorMessage)? httpResponse, + TResult Function(String errorMessage)? parsing, + TResult Function(String errorMessage)? statusCode, + TResult Function(String errorMessage)? bitcoinEncoding, + TResult Function(String errorMessage)? hexToArray, + TResult Function(String errorMessage)? hexToBytes, + TResult Function()? transactionNotFound, + TResult Function(int height)? headerHeightNotFound, + TResult Function()? headerHashNotFound, + TResult Function(String name)? invalidHttpHeaderName, + TResult Function(String value)? invalidHttpHeaderValue, + TResult Function()? requestAlreadyConsumed, + required TResult orElse(), + }) { + if (hexToArray != null) { + return hexToArray(errorMessage); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(EsploraError_Minreq value) minreq, + required TResult Function(EsploraError_HttpResponse value) httpResponse, + required TResult Function(EsploraError_Parsing value) parsing, + required TResult Function(EsploraError_StatusCode value) statusCode, + required TResult Function(EsploraError_BitcoinEncoding value) + bitcoinEncoding, + required TResult Function(EsploraError_HexToArray value) hexToArray, + required TResult Function(EsploraError_HexToBytes value) hexToBytes, + required TResult Function(EsploraError_TransactionNotFound value) + transactionNotFound, + required TResult Function(EsploraError_HeaderHeightNotFound value) + headerHeightNotFound, + required TResult Function(EsploraError_HeaderHashNotFound value) + headerHashNotFound, + required TResult Function(EsploraError_InvalidHttpHeaderName value) + invalidHttpHeaderName, + required TResult Function(EsploraError_InvalidHttpHeaderValue value) + invalidHttpHeaderValue, + required TResult Function(EsploraError_RequestAlreadyConsumed value) + requestAlreadyConsumed, + }) { + return hexToArray(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(EsploraError_Minreq value)? minreq, + TResult? Function(EsploraError_HttpResponse value)? httpResponse, + TResult? Function(EsploraError_Parsing value)? parsing, + TResult? Function(EsploraError_StatusCode value)? statusCode, + TResult? Function(EsploraError_BitcoinEncoding value)? bitcoinEncoding, + TResult? Function(EsploraError_HexToArray value)? hexToArray, + TResult? Function(EsploraError_HexToBytes value)? hexToBytes, + TResult? Function(EsploraError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(EsploraError_HeaderHeightNotFound value)? + headerHeightNotFound, + TResult? Function(EsploraError_HeaderHashNotFound value)? + headerHashNotFound, + TResult? Function(EsploraError_InvalidHttpHeaderName value)? + invalidHttpHeaderName, + TResult? Function(EsploraError_InvalidHttpHeaderValue value)? + invalidHttpHeaderValue, + TResult? Function(EsploraError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + }) { + return hexToArray?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(EsploraError_Minreq value)? minreq, + TResult Function(EsploraError_HttpResponse value)? httpResponse, + TResult Function(EsploraError_Parsing value)? parsing, + TResult Function(EsploraError_StatusCode value)? statusCode, + TResult Function(EsploraError_BitcoinEncoding value)? bitcoinEncoding, + TResult Function(EsploraError_HexToArray value)? hexToArray, + TResult Function(EsploraError_HexToBytes value)? hexToBytes, + TResult Function(EsploraError_TransactionNotFound value)? + transactionNotFound, + TResult Function(EsploraError_HeaderHeightNotFound value)? + headerHeightNotFound, + TResult Function(EsploraError_HeaderHashNotFound value)? headerHashNotFound, + TResult Function(EsploraError_InvalidHttpHeaderName value)? + invalidHttpHeaderName, + TResult Function(EsploraError_InvalidHttpHeaderValue value)? + invalidHttpHeaderValue, + TResult Function(EsploraError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + required TResult orElse(), + }) { + if (hexToArray != null) { + return hexToArray(this); + } + return orElse(); + } +} + +abstract class EsploraError_HexToArray extends EsploraError { + const factory EsploraError_HexToArray({required final String errorMessage}) = + _$EsploraError_HexToArrayImpl; + const EsploraError_HexToArray._() : super._(); + + String get errorMessage; + @JsonKey(ignore: true) + _$$EsploraError_HexToArrayImplCopyWith<_$EsploraError_HexToArrayImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$EsploraError_HexToBytesImplCopyWith<$Res> { + factory _$$EsploraError_HexToBytesImplCopyWith( + _$EsploraError_HexToBytesImpl value, + $Res Function(_$EsploraError_HexToBytesImpl) then) = + __$$EsploraError_HexToBytesImplCopyWithImpl<$Res>; + @useResult + $Res call({String errorMessage}); +} + +/// @nodoc +class __$$EsploraError_HexToBytesImplCopyWithImpl<$Res> + extends _$EsploraErrorCopyWithImpl<$Res, _$EsploraError_HexToBytesImpl> + implements _$$EsploraError_HexToBytesImplCopyWith<$Res> { + __$$EsploraError_HexToBytesImplCopyWithImpl( + _$EsploraError_HexToBytesImpl _value, + $Res Function(_$EsploraError_HexToBytesImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? errorMessage = null, + }) { + return _then(_$EsploraError_HexToBytesImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$EsploraError_HexToBytesImpl extends EsploraError_HexToBytes { + const _$EsploraError_HexToBytesImpl({required this.errorMessage}) : super._(); + + @override + final String errorMessage; + + @override + String toString() { + return 'EsploraError.hexToBytes(errorMessage: $errorMessage)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$EsploraError_HexToBytesImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); + } + + @override + int get hashCode => Object.hash(runtimeType, errorMessage); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$EsploraError_HexToBytesImplCopyWith<_$EsploraError_HexToBytesImpl> + get copyWith => __$$EsploraError_HexToBytesImplCopyWithImpl< + _$EsploraError_HexToBytesImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) minreq, + required TResult Function(int status, String errorMessage) httpResponse, + required TResult Function(String errorMessage) parsing, + required TResult Function(String errorMessage) statusCode, + required TResult Function(String errorMessage) bitcoinEncoding, + required TResult Function(String errorMessage) hexToArray, + required TResult Function(String errorMessage) hexToBytes, + required TResult Function() transactionNotFound, + required TResult Function(int height) headerHeightNotFound, + required TResult Function() headerHashNotFound, + required TResult Function(String name) invalidHttpHeaderName, + required TResult Function(String value) invalidHttpHeaderValue, + required TResult Function() requestAlreadyConsumed, + }) { + return hexToBytes(errorMessage); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? minreq, + TResult? Function(int status, String errorMessage)? httpResponse, + TResult? Function(String errorMessage)? parsing, + TResult? Function(String errorMessage)? statusCode, + TResult? Function(String errorMessage)? bitcoinEncoding, + TResult? Function(String errorMessage)? hexToArray, + TResult? Function(String errorMessage)? hexToBytes, + TResult? Function()? transactionNotFound, + TResult? Function(int height)? headerHeightNotFound, + TResult? Function()? headerHashNotFound, + TResult? Function(String name)? invalidHttpHeaderName, + TResult? Function(String value)? invalidHttpHeaderValue, + TResult? Function()? requestAlreadyConsumed, + }) { + return hexToBytes?.call(errorMessage); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? minreq, + TResult Function(int status, String errorMessage)? httpResponse, + TResult Function(String errorMessage)? parsing, + TResult Function(String errorMessage)? statusCode, + TResult Function(String errorMessage)? bitcoinEncoding, + TResult Function(String errorMessage)? hexToArray, + TResult Function(String errorMessage)? hexToBytes, + TResult Function()? transactionNotFound, + TResult Function(int height)? headerHeightNotFound, + TResult Function()? headerHashNotFound, + TResult Function(String name)? invalidHttpHeaderName, + TResult Function(String value)? invalidHttpHeaderValue, + TResult Function()? requestAlreadyConsumed, + required TResult orElse(), + }) { + if (hexToBytes != null) { + return hexToBytes(errorMessage); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(EsploraError_Minreq value) minreq, + required TResult Function(EsploraError_HttpResponse value) httpResponse, + required TResult Function(EsploraError_Parsing value) parsing, + required TResult Function(EsploraError_StatusCode value) statusCode, + required TResult Function(EsploraError_BitcoinEncoding value) + bitcoinEncoding, + required TResult Function(EsploraError_HexToArray value) hexToArray, + required TResult Function(EsploraError_HexToBytes value) hexToBytes, + required TResult Function(EsploraError_TransactionNotFound value) + transactionNotFound, + required TResult Function(EsploraError_HeaderHeightNotFound value) + headerHeightNotFound, + required TResult Function(EsploraError_HeaderHashNotFound value) + headerHashNotFound, + required TResult Function(EsploraError_InvalidHttpHeaderName value) + invalidHttpHeaderName, + required TResult Function(EsploraError_InvalidHttpHeaderValue value) + invalidHttpHeaderValue, + required TResult Function(EsploraError_RequestAlreadyConsumed value) + requestAlreadyConsumed, + }) { + return hexToBytes(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(EsploraError_Minreq value)? minreq, + TResult? Function(EsploraError_HttpResponse value)? httpResponse, + TResult? Function(EsploraError_Parsing value)? parsing, + TResult? Function(EsploraError_StatusCode value)? statusCode, + TResult? Function(EsploraError_BitcoinEncoding value)? bitcoinEncoding, + TResult? Function(EsploraError_HexToArray value)? hexToArray, + TResult? Function(EsploraError_HexToBytes value)? hexToBytes, + TResult? Function(EsploraError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(EsploraError_HeaderHeightNotFound value)? + headerHeightNotFound, + TResult? Function(EsploraError_HeaderHashNotFound value)? + headerHashNotFound, + TResult? Function(EsploraError_InvalidHttpHeaderName value)? + invalidHttpHeaderName, + TResult? Function(EsploraError_InvalidHttpHeaderValue value)? + invalidHttpHeaderValue, + TResult? Function(EsploraError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + }) { + return hexToBytes?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(EsploraError_Minreq value)? minreq, + TResult Function(EsploraError_HttpResponse value)? httpResponse, + TResult Function(EsploraError_Parsing value)? parsing, + TResult Function(EsploraError_StatusCode value)? statusCode, + TResult Function(EsploraError_BitcoinEncoding value)? bitcoinEncoding, + TResult Function(EsploraError_HexToArray value)? hexToArray, + TResult Function(EsploraError_HexToBytes value)? hexToBytes, + TResult Function(EsploraError_TransactionNotFound value)? + transactionNotFound, + TResult Function(EsploraError_HeaderHeightNotFound value)? + headerHeightNotFound, + TResult Function(EsploraError_HeaderHashNotFound value)? headerHashNotFound, + TResult Function(EsploraError_InvalidHttpHeaderName value)? + invalidHttpHeaderName, + TResult Function(EsploraError_InvalidHttpHeaderValue value)? + invalidHttpHeaderValue, + TResult Function(EsploraError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + required TResult orElse(), + }) { + if (hexToBytes != null) { + return hexToBytes(this); + } + return orElse(); + } +} + +abstract class EsploraError_HexToBytes extends EsploraError { + const factory EsploraError_HexToBytes({required final String errorMessage}) = + _$EsploraError_HexToBytesImpl; + const EsploraError_HexToBytes._() : super._(); + + String get errorMessage; + @JsonKey(ignore: true) + _$$EsploraError_HexToBytesImplCopyWith<_$EsploraError_HexToBytesImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$EsploraError_TransactionNotFoundImplCopyWith<$Res> { + factory _$$EsploraError_TransactionNotFoundImplCopyWith( + _$EsploraError_TransactionNotFoundImpl value, + $Res Function(_$EsploraError_TransactionNotFoundImpl) then) = + __$$EsploraError_TransactionNotFoundImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$EsploraError_TransactionNotFoundImplCopyWithImpl<$Res> + extends _$EsploraErrorCopyWithImpl<$Res, + _$EsploraError_TransactionNotFoundImpl> + implements _$$EsploraError_TransactionNotFoundImplCopyWith<$Res> { + __$$EsploraError_TransactionNotFoundImplCopyWithImpl( + _$EsploraError_TransactionNotFoundImpl _value, + $Res Function(_$EsploraError_TransactionNotFoundImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$EsploraError_TransactionNotFoundImpl + extends EsploraError_TransactionNotFound { + const _$EsploraError_TransactionNotFoundImpl() : super._(); + + @override + String toString() { + return 'EsploraError.transactionNotFound()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$EsploraError_TransactionNotFoundImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) minreq, + required TResult Function(int status, String errorMessage) httpResponse, + required TResult Function(String errorMessage) parsing, + required TResult Function(String errorMessage) statusCode, + required TResult Function(String errorMessage) bitcoinEncoding, + required TResult Function(String errorMessage) hexToArray, + required TResult Function(String errorMessage) hexToBytes, + required TResult Function() transactionNotFound, + required TResult Function(int height) headerHeightNotFound, + required TResult Function() headerHashNotFound, + required TResult Function(String name) invalidHttpHeaderName, + required TResult Function(String value) invalidHttpHeaderValue, + required TResult Function() requestAlreadyConsumed, + }) { + return transactionNotFound(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? minreq, + TResult? Function(int status, String errorMessage)? httpResponse, + TResult? Function(String errorMessage)? parsing, + TResult? Function(String errorMessage)? statusCode, + TResult? Function(String errorMessage)? bitcoinEncoding, + TResult? Function(String errorMessage)? hexToArray, + TResult? Function(String errorMessage)? hexToBytes, + TResult? Function()? transactionNotFound, + TResult? Function(int height)? headerHeightNotFound, + TResult? Function()? headerHashNotFound, + TResult? Function(String name)? invalidHttpHeaderName, + TResult? Function(String value)? invalidHttpHeaderValue, + TResult? Function()? requestAlreadyConsumed, + }) { + return transactionNotFound?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? minreq, + TResult Function(int status, String errorMessage)? httpResponse, + TResult Function(String errorMessage)? parsing, + TResult Function(String errorMessage)? statusCode, + TResult Function(String errorMessage)? bitcoinEncoding, + TResult Function(String errorMessage)? hexToArray, + TResult Function(String errorMessage)? hexToBytes, + TResult Function()? transactionNotFound, + TResult Function(int height)? headerHeightNotFound, + TResult Function()? headerHashNotFound, + TResult Function(String name)? invalidHttpHeaderName, + TResult Function(String value)? invalidHttpHeaderValue, + TResult Function()? requestAlreadyConsumed, + required TResult orElse(), + }) { + if (transactionNotFound != null) { + return transactionNotFound(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(EsploraError_Minreq value) minreq, + required TResult Function(EsploraError_HttpResponse value) httpResponse, + required TResult Function(EsploraError_Parsing value) parsing, + required TResult Function(EsploraError_StatusCode value) statusCode, + required TResult Function(EsploraError_BitcoinEncoding value) + bitcoinEncoding, + required TResult Function(EsploraError_HexToArray value) hexToArray, + required TResult Function(EsploraError_HexToBytes value) hexToBytes, + required TResult Function(EsploraError_TransactionNotFound value) + transactionNotFound, + required TResult Function(EsploraError_HeaderHeightNotFound value) + headerHeightNotFound, + required TResult Function(EsploraError_HeaderHashNotFound value) + headerHashNotFound, + required TResult Function(EsploraError_InvalidHttpHeaderName value) + invalidHttpHeaderName, + required TResult Function(EsploraError_InvalidHttpHeaderValue value) + invalidHttpHeaderValue, + required TResult Function(EsploraError_RequestAlreadyConsumed value) + requestAlreadyConsumed, + }) { + return transactionNotFound(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(EsploraError_Minreq value)? minreq, + TResult? Function(EsploraError_HttpResponse value)? httpResponse, + TResult? Function(EsploraError_Parsing value)? parsing, + TResult? Function(EsploraError_StatusCode value)? statusCode, + TResult? Function(EsploraError_BitcoinEncoding value)? bitcoinEncoding, + TResult? Function(EsploraError_HexToArray value)? hexToArray, + TResult? Function(EsploraError_HexToBytes value)? hexToBytes, + TResult? Function(EsploraError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(EsploraError_HeaderHeightNotFound value)? + headerHeightNotFound, + TResult? Function(EsploraError_HeaderHashNotFound value)? + headerHashNotFound, + TResult? Function(EsploraError_InvalidHttpHeaderName value)? + invalidHttpHeaderName, + TResult? Function(EsploraError_InvalidHttpHeaderValue value)? + invalidHttpHeaderValue, + TResult? Function(EsploraError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + }) { + return transactionNotFound?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(EsploraError_Minreq value)? minreq, + TResult Function(EsploraError_HttpResponse value)? httpResponse, + TResult Function(EsploraError_Parsing value)? parsing, + TResult Function(EsploraError_StatusCode value)? statusCode, + TResult Function(EsploraError_BitcoinEncoding value)? bitcoinEncoding, + TResult Function(EsploraError_HexToArray value)? hexToArray, + TResult Function(EsploraError_HexToBytes value)? hexToBytes, + TResult Function(EsploraError_TransactionNotFound value)? + transactionNotFound, + TResult Function(EsploraError_HeaderHeightNotFound value)? + headerHeightNotFound, + TResult Function(EsploraError_HeaderHashNotFound value)? headerHashNotFound, + TResult Function(EsploraError_InvalidHttpHeaderName value)? + invalidHttpHeaderName, + TResult Function(EsploraError_InvalidHttpHeaderValue value)? + invalidHttpHeaderValue, + TResult Function(EsploraError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + required TResult orElse(), + }) { + if (transactionNotFound != null) { + return transactionNotFound(this); + } + return orElse(); + } +} + +abstract class EsploraError_TransactionNotFound extends EsploraError { + const factory EsploraError_TransactionNotFound() = + _$EsploraError_TransactionNotFoundImpl; + const EsploraError_TransactionNotFound._() : super._(); +} + +/// @nodoc +abstract class _$$EsploraError_HeaderHeightNotFoundImplCopyWith<$Res> { + factory _$$EsploraError_HeaderHeightNotFoundImplCopyWith( + _$EsploraError_HeaderHeightNotFoundImpl value, + $Res Function(_$EsploraError_HeaderHeightNotFoundImpl) then) = + __$$EsploraError_HeaderHeightNotFoundImplCopyWithImpl<$Res>; + @useResult + $Res call({int height}); +} + +/// @nodoc +class __$$EsploraError_HeaderHeightNotFoundImplCopyWithImpl<$Res> + extends _$EsploraErrorCopyWithImpl<$Res, + _$EsploraError_HeaderHeightNotFoundImpl> + implements _$$EsploraError_HeaderHeightNotFoundImplCopyWith<$Res> { + __$$EsploraError_HeaderHeightNotFoundImplCopyWithImpl( + _$EsploraError_HeaderHeightNotFoundImpl _value, + $Res Function(_$EsploraError_HeaderHeightNotFoundImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? height = null, + }) { + return _then(_$EsploraError_HeaderHeightNotFoundImpl( + height: null == height + ? _value.height + : height // ignore: cast_nullable_to_non_nullable + as int, + )); + } +} + +/// @nodoc + +class _$EsploraError_HeaderHeightNotFoundImpl + extends EsploraError_HeaderHeightNotFound { + const _$EsploraError_HeaderHeightNotFoundImpl({required this.height}) + : super._(); + + @override + final int height; + + @override + String toString() { + return 'EsploraError.headerHeightNotFound(height: $height)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$EsploraError_HeaderHeightNotFoundImpl && + (identical(other.height, height) || other.height == height)); + } + + @override + int get hashCode => Object.hash(runtimeType, height); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$EsploraError_HeaderHeightNotFoundImplCopyWith< + _$EsploraError_HeaderHeightNotFoundImpl> + get copyWith => __$$EsploraError_HeaderHeightNotFoundImplCopyWithImpl< + _$EsploraError_HeaderHeightNotFoundImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) minreq, + required TResult Function(int status, String errorMessage) httpResponse, + required TResult Function(String errorMessage) parsing, + required TResult Function(String errorMessage) statusCode, + required TResult Function(String errorMessage) bitcoinEncoding, + required TResult Function(String errorMessage) hexToArray, + required TResult Function(String errorMessage) hexToBytes, + required TResult Function() transactionNotFound, + required TResult Function(int height) headerHeightNotFound, + required TResult Function() headerHashNotFound, + required TResult Function(String name) invalidHttpHeaderName, + required TResult Function(String value) invalidHttpHeaderValue, + required TResult Function() requestAlreadyConsumed, + }) { + return headerHeightNotFound(height); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? minreq, + TResult? Function(int status, String errorMessage)? httpResponse, + TResult? Function(String errorMessage)? parsing, + TResult? Function(String errorMessage)? statusCode, + TResult? Function(String errorMessage)? bitcoinEncoding, + TResult? Function(String errorMessage)? hexToArray, + TResult? Function(String errorMessage)? hexToBytes, + TResult? Function()? transactionNotFound, + TResult? Function(int height)? headerHeightNotFound, + TResult? Function()? headerHashNotFound, + TResult? Function(String name)? invalidHttpHeaderName, + TResult? Function(String value)? invalidHttpHeaderValue, + TResult? Function()? requestAlreadyConsumed, + }) { + return headerHeightNotFound?.call(height); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? minreq, + TResult Function(int status, String errorMessage)? httpResponse, + TResult Function(String errorMessage)? parsing, + TResult Function(String errorMessage)? statusCode, + TResult Function(String errorMessage)? bitcoinEncoding, + TResult Function(String errorMessage)? hexToArray, + TResult Function(String errorMessage)? hexToBytes, + TResult Function()? transactionNotFound, + TResult Function(int height)? headerHeightNotFound, + TResult Function()? headerHashNotFound, + TResult Function(String name)? invalidHttpHeaderName, + TResult Function(String value)? invalidHttpHeaderValue, + TResult Function()? requestAlreadyConsumed, + required TResult orElse(), + }) { + if (headerHeightNotFound != null) { + return headerHeightNotFound(height); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(EsploraError_Minreq value) minreq, + required TResult Function(EsploraError_HttpResponse value) httpResponse, + required TResult Function(EsploraError_Parsing value) parsing, + required TResult Function(EsploraError_StatusCode value) statusCode, + required TResult Function(EsploraError_BitcoinEncoding value) + bitcoinEncoding, + required TResult Function(EsploraError_HexToArray value) hexToArray, + required TResult Function(EsploraError_HexToBytes value) hexToBytes, + required TResult Function(EsploraError_TransactionNotFound value) + transactionNotFound, + required TResult Function(EsploraError_HeaderHeightNotFound value) + headerHeightNotFound, + required TResult Function(EsploraError_HeaderHashNotFound value) + headerHashNotFound, + required TResult Function(EsploraError_InvalidHttpHeaderName value) + invalidHttpHeaderName, + required TResult Function(EsploraError_InvalidHttpHeaderValue value) + invalidHttpHeaderValue, + required TResult Function(EsploraError_RequestAlreadyConsumed value) + requestAlreadyConsumed, + }) { + return headerHeightNotFound(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(EsploraError_Minreq value)? minreq, + TResult? Function(EsploraError_HttpResponse value)? httpResponse, + TResult? Function(EsploraError_Parsing value)? parsing, + TResult? Function(EsploraError_StatusCode value)? statusCode, + TResult? Function(EsploraError_BitcoinEncoding value)? bitcoinEncoding, + TResult? Function(EsploraError_HexToArray value)? hexToArray, + TResult? Function(EsploraError_HexToBytes value)? hexToBytes, + TResult? Function(EsploraError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(EsploraError_HeaderHeightNotFound value)? + headerHeightNotFound, + TResult? Function(EsploraError_HeaderHashNotFound value)? + headerHashNotFound, + TResult? Function(EsploraError_InvalidHttpHeaderName value)? + invalidHttpHeaderName, + TResult? Function(EsploraError_InvalidHttpHeaderValue value)? + invalidHttpHeaderValue, + TResult? Function(EsploraError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + }) { + return headerHeightNotFound?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(EsploraError_Minreq value)? minreq, + TResult Function(EsploraError_HttpResponse value)? httpResponse, + TResult Function(EsploraError_Parsing value)? parsing, + TResult Function(EsploraError_StatusCode value)? statusCode, + TResult Function(EsploraError_BitcoinEncoding value)? bitcoinEncoding, + TResult Function(EsploraError_HexToArray value)? hexToArray, + TResult Function(EsploraError_HexToBytes value)? hexToBytes, + TResult Function(EsploraError_TransactionNotFound value)? + transactionNotFound, + TResult Function(EsploraError_HeaderHeightNotFound value)? + headerHeightNotFound, + TResult Function(EsploraError_HeaderHashNotFound value)? headerHashNotFound, + TResult Function(EsploraError_InvalidHttpHeaderName value)? + invalidHttpHeaderName, + TResult Function(EsploraError_InvalidHttpHeaderValue value)? + invalidHttpHeaderValue, + TResult Function(EsploraError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + required TResult orElse(), + }) { + if (headerHeightNotFound != null) { + return headerHeightNotFound(this); + } + return orElse(); + } +} + +abstract class EsploraError_HeaderHeightNotFound extends EsploraError { + const factory EsploraError_HeaderHeightNotFound({required final int height}) = + _$EsploraError_HeaderHeightNotFoundImpl; + const EsploraError_HeaderHeightNotFound._() : super._(); + + int get height; + @JsonKey(ignore: true) + _$$EsploraError_HeaderHeightNotFoundImplCopyWith< + _$EsploraError_HeaderHeightNotFoundImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$EsploraError_HeaderHashNotFoundImplCopyWith<$Res> { + factory _$$EsploraError_HeaderHashNotFoundImplCopyWith( + _$EsploraError_HeaderHashNotFoundImpl value, + $Res Function(_$EsploraError_HeaderHashNotFoundImpl) then) = + __$$EsploraError_HeaderHashNotFoundImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$EsploraError_HeaderHashNotFoundImplCopyWithImpl<$Res> + extends _$EsploraErrorCopyWithImpl<$Res, + _$EsploraError_HeaderHashNotFoundImpl> + implements _$$EsploraError_HeaderHashNotFoundImplCopyWith<$Res> { + __$$EsploraError_HeaderHashNotFoundImplCopyWithImpl( + _$EsploraError_HeaderHashNotFoundImpl _value, + $Res Function(_$EsploraError_HeaderHashNotFoundImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$EsploraError_HeaderHashNotFoundImpl + extends EsploraError_HeaderHashNotFound { + const _$EsploraError_HeaderHashNotFoundImpl() : super._(); + + @override + String toString() { + return 'EsploraError.headerHashNotFound()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$EsploraError_HeaderHashNotFoundImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) minreq, + required TResult Function(int status, String errorMessage) httpResponse, + required TResult Function(String errorMessage) parsing, + required TResult Function(String errorMessage) statusCode, + required TResult Function(String errorMessage) bitcoinEncoding, + required TResult Function(String errorMessage) hexToArray, + required TResult Function(String errorMessage) hexToBytes, + required TResult Function() transactionNotFound, + required TResult Function(int height) headerHeightNotFound, + required TResult Function() headerHashNotFound, + required TResult Function(String name) invalidHttpHeaderName, + required TResult Function(String value) invalidHttpHeaderValue, + required TResult Function() requestAlreadyConsumed, + }) { + return headerHashNotFound(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? minreq, + TResult? Function(int status, String errorMessage)? httpResponse, + TResult? Function(String errorMessage)? parsing, + TResult? Function(String errorMessage)? statusCode, + TResult? Function(String errorMessage)? bitcoinEncoding, + TResult? Function(String errorMessage)? hexToArray, + TResult? Function(String errorMessage)? hexToBytes, + TResult? Function()? transactionNotFound, + TResult? Function(int height)? headerHeightNotFound, + TResult? Function()? headerHashNotFound, + TResult? Function(String name)? invalidHttpHeaderName, + TResult? Function(String value)? invalidHttpHeaderValue, + TResult? Function()? requestAlreadyConsumed, + }) { + return headerHashNotFound?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? minreq, + TResult Function(int status, String errorMessage)? httpResponse, + TResult Function(String errorMessage)? parsing, + TResult Function(String errorMessage)? statusCode, + TResult Function(String errorMessage)? bitcoinEncoding, + TResult Function(String errorMessage)? hexToArray, + TResult Function(String errorMessage)? hexToBytes, + TResult Function()? transactionNotFound, + TResult Function(int height)? headerHeightNotFound, + TResult Function()? headerHashNotFound, + TResult Function(String name)? invalidHttpHeaderName, + TResult Function(String value)? invalidHttpHeaderValue, + TResult Function()? requestAlreadyConsumed, + required TResult orElse(), + }) { + if (headerHashNotFound != null) { + return headerHashNotFound(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(EsploraError_Minreq value) minreq, + required TResult Function(EsploraError_HttpResponse value) httpResponse, + required TResult Function(EsploraError_Parsing value) parsing, + required TResult Function(EsploraError_StatusCode value) statusCode, + required TResult Function(EsploraError_BitcoinEncoding value) + bitcoinEncoding, + required TResult Function(EsploraError_HexToArray value) hexToArray, + required TResult Function(EsploraError_HexToBytes value) hexToBytes, + required TResult Function(EsploraError_TransactionNotFound value) + transactionNotFound, + required TResult Function(EsploraError_HeaderHeightNotFound value) + headerHeightNotFound, + required TResult Function(EsploraError_HeaderHashNotFound value) + headerHashNotFound, + required TResult Function(EsploraError_InvalidHttpHeaderName value) + invalidHttpHeaderName, + required TResult Function(EsploraError_InvalidHttpHeaderValue value) + invalidHttpHeaderValue, + required TResult Function(EsploraError_RequestAlreadyConsumed value) + requestAlreadyConsumed, + }) { + return headerHashNotFound(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(EsploraError_Minreq value)? minreq, + TResult? Function(EsploraError_HttpResponse value)? httpResponse, + TResult? Function(EsploraError_Parsing value)? parsing, + TResult? Function(EsploraError_StatusCode value)? statusCode, + TResult? Function(EsploraError_BitcoinEncoding value)? bitcoinEncoding, + TResult? Function(EsploraError_HexToArray value)? hexToArray, + TResult? Function(EsploraError_HexToBytes value)? hexToBytes, + TResult? Function(EsploraError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(EsploraError_HeaderHeightNotFound value)? + headerHeightNotFound, + TResult? Function(EsploraError_HeaderHashNotFound value)? + headerHashNotFound, + TResult? Function(EsploraError_InvalidHttpHeaderName value)? + invalidHttpHeaderName, + TResult? Function(EsploraError_InvalidHttpHeaderValue value)? + invalidHttpHeaderValue, + TResult? Function(EsploraError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + }) { + return headerHashNotFound?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(EsploraError_Minreq value)? minreq, + TResult Function(EsploraError_HttpResponse value)? httpResponse, + TResult Function(EsploraError_Parsing value)? parsing, + TResult Function(EsploraError_StatusCode value)? statusCode, + TResult Function(EsploraError_BitcoinEncoding value)? bitcoinEncoding, + TResult Function(EsploraError_HexToArray value)? hexToArray, + TResult Function(EsploraError_HexToBytes value)? hexToBytes, + TResult Function(EsploraError_TransactionNotFound value)? + transactionNotFound, + TResult Function(EsploraError_HeaderHeightNotFound value)? + headerHeightNotFound, + TResult Function(EsploraError_HeaderHashNotFound value)? headerHashNotFound, + TResult Function(EsploraError_InvalidHttpHeaderName value)? + invalidHttpHeaderName, + TResult Function(EsploraError_InvalidHttpHeaderValue value)? + invalidHttpHeaderValue, + TResult Function(EsploraError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + required TResult orElse(), + }) { + if (headerHashNotFound != null) { + return headerHashNotFound(this); + } + return orElse(); + } +} + +abstract class EsploraError_HeaderHashNotFound extends EsploraError { + const factory EsploraError_HeaderHashNotFound() = + _$EsploraError_HeaderHashNotFoundImpl; + const EsploraError_HeaderHashNotFound._() : super._(); +} + +/// @nodoc +abstract class _$$EsploraError_InvalidHttpHeaderNameImplCopyWith<$Res> { + factory _$$EsploraError_InvalidHttpHeaderNameImplCopyWith( + _$EsploraError_InvalidHttpHeaderNameImpl value, + $Res Function(_$EsploraError_InvalidHttpHeaderNameImpl) then) = + __$$EsploraError_InvalidHttpHeaderNameImplCopyWithImpl<$Res>; + @useResult + $Res call({String name}); +} + +/// @nodoc +class __$$EsploraError_InvalidHttpHeaderNameImplCopyWithImpl<$Res> + extends _$EsploraErrorCopyWithImpl<$Res, + _$EsploraError_InvalidHttpHeaderNameImpl> + implements _$$EsploraError_InvalidHttpHeaderNameImplCopyWith<$Res> { + __$$EsploraError_InvalidHttpHeaderNameImplCopyWithImpl( + _$EsploraError_InvalidHttpHeaderNameImpl _value, + $Res Function(_$EsploraError_InvalidHttpHeaderNameImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? name = null, + }) { + return _then(_$EsploraError_InvalidHttpHeaderNameImpl( + name: null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$EsploraError_InvalidHttpHeaderNameImpl + extends EsploraError_InvalidHttpHeaderName { + const _$EsploraError_InvalidHttpHeaderNameImpl({required this.name}) + : super._(); + + @override + final String name; + + @override + String toString() { + return 'EsploraError.invalidHttpHeaderName(name: $name)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$EsploraError_InvalidHttpHeaderNameImpl && + (identical(other.name, name) || other.name == name)); + } + + @override + int get hashCode => Object.hash(runtimeType, name); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$EsploraError_InvalidHttpHeaderNameImplCopyWith< + _$EsploraError_InvalidHttpHeaderNameImpl> + get copyWith => __$$EsploraError_InvalidHttpHeaderNameImplCopyWithImpl< + _$EsploraError_InvalidHttpHeaderNameImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) minreq, + required TResult Function(int status, String errorMessage) httpResponse, + required TResult Function(String errorMessage) parsing, + required TResult Function(String errorMessage) statusCode, + required TResult Function(String errorMessage) bitcoinEncoding, + required TResult Function(String errorMessage) hexToArray, + required TResult Function(String errorMessage) hexToBytes, + required TResult Function() transactionNotFound, + required TResult Function(int height) headerHeightNotFound, + required TResult Function() headerHashNotFound, + required TResult Function(String name) invalidHttpHeaderName, + required TResult Function(String value) invalidHttpHeaderValue, + required TResult Function() requestAlreadyConsumed, + }) { + return invalidHttpHeaderName(name); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? minreq, + TResult? Function(int status, String errorMessage)? httpResponse, + TResult? Function(String errorMessage)? parsing, + TResult? Function(String errorMessage)? statusCode, + TResult? Function(String errorMessage)? bitcoinEncoding, + TResult? Function(String errorMessage)? hexToArray, + TResult? Function(String errorMessage)? hexToBytes, + TResult? Function()? transactionNotFound, + TResult? Function(int height)? headerHeightNotFound, + TResult? Function()? headerHashNotFound, + TResult? Function(String name)? invalidHttpHeaderName, + TResult? Function(String value)? invalidHttpHeaderValue, + TResult? Function()? requestAlreadyConsumed, + }) { + return invalidHttpHeaderName?.call(name); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? minreq, + TResult Function(int status, String errorMessage)? httpResponse, + TResult Function(String errorMessage)? parsing, + TResult Function(String errorMessage)? statusCode, + TResult Function(String errorMessage)? bitcoinEncoding, + TResult Function(String errorMessage)? hexToArray, + TResult Function(String errorMessage)? hexToBytes, + TResult Function()? transactionNotFound, + TResult Function(int height)? headerHeightNotFound, + TResult Function()? headerHashNotFound, + TResult Function(String name)? invalidHttpHeaderName, + TResult Function(String value)? invalidHttpHeaderValue, + TResult Function()? requestAlreadyConsumed, + required TResult orElse(), + }) { + if (invalidHttpHeaderName != null) { + return invalidHttpHeaderName(name); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(EsploraError_Minreq value) minreq, + required TResult Function(EsploraError_HttpResponse value) httpResponse, + required TResult Function(EsploraError_Parsing value) parsing, + required TResult Function(EsploraError_StatusCode value) statusCode, + required TResult Function(EsploraError_BitcoinEncoding value) + bitcoinEncoding, + required TResult Function(EsploraError_HexToArray value) hexToArray, + required TResult Function(EsploraError_HexToBytes value) hexToBytes, + required TResult Function(EsploraError_TransactionNotFound value) + transactionNotFound, + required TResult Function(EsploraError_HeaderHeightNotFound value) + headerHeightNotFound, + required TResult Function(EsploraError_HeaderHashNotFound value) + headerHashNotFound, + required TResult Function(EsploraError_InvalidHttpHeaderName value) + invalidHttpHeaderName, + required TResult Function(EsploraError_InvalidHttpHeaderValue value) + invalidHttpHeaderValue, + required TResult Function(EsploraError_RequestAlreadyConsumed value) + requestAlreadyConsumed, + }) { + return invalidHttpHeaderName(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(EsploraError_Minreq value)? minreq, + TResult? Function(EsploraError_HttpResponse value)? httpResponse, + TResult? Function(EsploraError_Parsing value)? parsing, + TResult? Function(EsploraError_StatusCode value)? statusCode, + TResult? Function(EsploraError_BitcoinEncoding value)? bitcoinEncoding, + TResult? Function(EsploraError_HexToArray value)? hexToArray, + TResult? Function(EsploraError_HexToBytes value)? hexToBytes, + TResult? Function(EsploraError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(EsploraError_HeaderHeightNotFound value)? + headerHeightNotFound, + TResult? Function(EsploraError_HeaderHashNotFound value)? + headerHashNotFound, + TResult? Function(EsploraError_InvalidHttpHeaderName value)? + invalidHttpHeaderName, + TResult? Function(EsploraError_InvalidHttpHeaderValue value)? + invalidHttpHeaderValue, + TResult? Function(EsploraError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + }) { + return invalidHttpHeaderName?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(EsploraError_Minreq value)? minreq, + TResult Function(EsploraError_HttpResponse value)? httpResponse, + TResult Function(EsploraError_Parsing value)? parsing, + TResult Function(EsploraError_StatusCode value)? statusCode, + TResult Function(EsploraError_BitcoinEncoding value)? bitcoinEncoding, + TResult Function(EsploraError_HexToArray value)? hexToArray, + TResult Function(EsploraError_HexToBytes value)? hexToBytes, + TResult Function(EsploraError_TransactionNotFound value)? + transactionNotFound, + TResult Function(EsploraError_HeaderHeightNotFound value)? + headerHeightNotFound, + TResult Function(EsploraError_HeaderHashNotFound value)? headerHashNotFound, + TResult Function(EsploraError_InvalidHttpHeaderName value)? + invalidHttpHeaderName, + TResult Function(EsploraError_InvalidHttpHeaderValue value)? + invalidHttpHeaderValue, + TResult Function(EsploraError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + required TResult orElse(), + }) { + if (invalidHttpHeaderName != null) { + return invalidHttpHeaderName(this); + } + return orElse(); + } +} + +abstract class EsploraError_InvalidHttpHeaderName extends EsploraError { + const factory EsploraError_InvalidHttpHeaderName( + {required final String name}) = _$EsploraError_InvalidHttpHeaderNameImpl; + const EsploraError_InvalidHttpHeaderName._() : super._(); + + String get name; + @JsonKey(ignore: true) + _$$EsploraError_InvalidHttpHeaderNameImplCopyWith< + _$EsploraError_InvalidHttpHeaderNameImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$EsploraError_InvalidHttpHeaderValueImplCopyWith<$Res> { + factory _$$EsploraError_InvalidHttpHeaderValueImplCopyWith( + _$EsploraError_InvalidHttpHeaderValueImpl value, + $Res Function(_$EsploraError_InvalidHttpHeaderValueImpl) then) = + __$$EsploraError_InvalidHttpHeaderValueImplCopyWithImpl<$Res>; + @useResult + $Res call({String value}); +} + +/// @nodoc +class __$$EsploraError_InvalidHttpHeaderValueImplCopyWithImpl<$Res> + extends _$EsploraErrorCopyWithImpl<$Res, + _$EsploraError_InvalidHttpHeaderValueImpl> + implements _$$EsploraError_InvalidHttpHeaderValueImplCopyWith<$Res> { + __$$EsploraError_InvalidHttpHeaderValueImplCopyWithImpl( + _$EsploraError_InvalidHttpHeaderValueImpl _value, + $Res Function(_$EsploraError_InvalidHttpHeaderValueImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? value = null, + }) { + return _then(_$EsploraError_InvalidHttpHeaderValueImpl( + value: null == value + ? _value.value + : value // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$EsploraError_InvalidHttpHeaderValueImpl + extends EsploraError_InvalidHttpHeaderValue { + const _$EsploraError_InvalidHttpHeaderValueImpl({required this.value}) + : super._(); + + @override + final String value; + + @override + String toString() { + return 'EsploraError.invalidHttpHeaderValue(value: $value)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$EsploraError_InvalidHttpHeaderValueImpl && + (identical(other.value, value) || other.value == value)); + } + + @override + int get hashCode => Object.hash(runtimeType, value); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$EsploraError_InvalidHttpHeaderValueImplCopyWith< + _$EsploraError_InvalidHttpHeaderValueImpl> + get copyWith => __$$EsploraError_InvalidHttpHeaderValueImplCopyWithImpl< + _$EsploraError_InvalidHttpHeaderValueImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) minreq, + required TResult Function(int status, String errorMessage) httpResponse, + required TResult Function(String errorMessage) parsing, + required TResult Function(String errorMessage) statusCode, + required TResult Function(String errorMessage) bitcoinEncoding, + required TResult Function(String errorMessage) hexToArray, + required TResult Function(String errorMessage) hexToBytes, + required TResult Function() transactionNotFound, + required TResult Function(int height) headerHeightNotFound, + required TResult Function() headerHashNotFound, + required TResult Function(String name) invalidHttpHeaderName, + required TResult Function(String value) invalidHttpHeaderValue, + required TResult Function() requestAlreadyConsumed, + }) { + return invalidHttpHeaderValue(value); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? minreq, + TResult? Function(int status, String errorMessage)? httpResponse, + TResult? Function(String errorMessage)? parsing, + TResult? Function(String errorMessage)? statusCode, + TResult? Function(String errorMessage)? bitcoinEncoding, + TResult? Function(String errorMessage)? hexToArray, + TResult? Function(String errorMessage)? hexToBytes, + TResult? Function()? transactionNotFound, + TResult? Function(int height)? headerHeightNotFound, + TResult? Function()? headerHashNotFound, + TResult? Function(String name)? invalidHttpHeaderName, + TResult? Function(String value)? invalidHttpHeaderValue, + TResult? Function()? requestAlreadyConsumed, + }) { + return invalidHttpHeaderValue?.call(value); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? minreq, + TResult Function(int status, String errorMessage)? httpResponse, + TResult Function(String errorMessage)? parsing, + TResult Function(String errorMessage)? statusCode, + TResult Function(String errorMessage)? bitcoinEncoding, + TResult Function(String errorMessage)? hexToArray, + TResult Function(String errorMessage)? hexToBytes, + TResult Function()? transactionNotFound, + TResult Function(int height)? headerHeightNotFound, + TResult Function()? headerHashNotFound, + TResult Function(String name)? invalidHttpHeaderName, + TResult Function(String value)? invalidHttpHeaderValue, + TResult Function()? requestAlreadyConsumed, + required TResult orElse(), + }) { + if (invalidHttpHeaderValue != null) { + return invalidHttpHeaderValue(value); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(EsploraError_Minreq value) minreq, + required TResult Function(EsploraError_HttpResponse value) httpResponse, + required TResult Function(EsploraError_Parsing value) parsing, + required TResult Function(EsploraError_StatusCode value) statusCode, + required TResult Function(EsploraError_BitcoinEncoding value) + bitcoinEncoding, + required TResult Function(EsploraError_HexToArray value) hexToArray, + required TResult Function(EsploraError_HexToBytes value) hexToBytes, + required TResult Function(EsploraError_TransactionNotFound value) + transactionNotFound, + required TResult Function(EsploraError_HeaderHeightNotFound value) + headerHeightNotFound, + required TResult Function(EsploraError_HeaderHashNotFound value) + headerHashNotFound, + required TResult Function(EsploraError_InvalidHttpHeaderName value) + invalidHttpHeaderName, + required TResult Function(EsploraError_InvalidHttpHeaderValue value) + invalidHttpHeaderValue, + required TResult Function(EsploraError_RequestAlreadyConsumed value) + requestAlreadyConsumed, + }) { + return invalidHttpHeaderValue(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(EsploraError_Minreq value)? minreq, + TResult? Function(EsploraError_HttpResponse value)? httpResponse, + TResult? Function(EsploraError_Parsing value)? parsing, + TResult? Function(EsploraError_StatusCode value)? statusCode, + TResult? Function(EsploraError_BitcoinEncoding value)? bitcoinEncoding, + TResult? Function(EsploraError_HexToArray value)? hexToArray, + TResult? Function(EsploraError_HexToBytes value)? hexToBytes, + TResult? Function(EsploraError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(EsploraError_HeaderHeightNotFound value)? + headerHeightNotFound, + TResult? Function(EsploraError_HeaderHashNotFound value)? + headerHashNotFound, + TResult? Function(EsploraError_InvalidHttpHeaderName value)? + invalidHttpHeaderName, + TResult? Function(EsploraError_InvalidHttpHeaderValue value)? + invalidHttpHeaderValue, + TResult? Function(EsploraError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + }) { + return invalidHttpHeaderValue?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(EsploraError_Minreq value)? minreq, + TResult Function(EsploraError_HttpResponse value)? httpResponse, + TResult Function(EsploraError_Parsing value)? parsing, + TResult Function(EsploraError_StatusCode value)? statusCode, + TResult Function(EsploraError_BitcoinEncoding value)? bitcoinEncoding, + TResult Function(EsploraError_HexToArray value)? hexToArray, + TResult Function(EsploraError_HexToBytes value)? hexToBytes, + TResult Function(EsploraError_TransactionNotFound value)? + transactionNotFound, + TResult Function(EsploraError_HeaderHeightNotFound value)? + headerHeightNotFound, + TResult Function(EsploraError_HeaderHashNotFound value)? headerHashNotFound, + TResult Function(EsploraError_InvalidHttpHeaderName value)? + invalidHttpHeaderName, + TResult Function(EsploraError_InvalidHttpHeaderValue value)? + invalidHttpHeaderValue, + TResult Function(EsploraError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + required TResult orElse(), + }) { + if (invalidHttpHeaderValue != null) { + return invalidHttpHeaderValue(this); + } + return orElse(); + } +} + +abstract class EsploraError_InvalidHttpHeaderValue extends EsploraError { + const factory EsploraError_InvalidHttpHeaderValue( + {required final String value}) = + _$EsploraError_InvalidHttpHeaderValueImpl; + const EsploraError_InvalidHttpHeaderValue._() : super._(); + + String get value; + @JsonKey(ignore: true) + _$$EsploraError_InvalidHttpHeaderValueImplCopyWith< + _$EsploraError_InvalidHttpHeaderValueImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$EsploraError_RequestAlreadyConsumedImplCopyWith<$Res> { + factory _$$EsploraError_RequestAlreadyConsumedImplCopyWith( + _$EsploraError_RequestAlreadyConsumedImpl value, + $Res Function(_$EsploraError_RequestAlreadyConsumedImpl) then) = + __$$EsploraError_RequestAlreadyConsumedImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$EsploraError_RequestAlreadyConsumedImplCopyWithImpl<$Res> + extends _$EsploraErrorCopyWithImpl<$Res, + _$EsploraError_RequestAlreadyConsumedImpl> + implements _$$EsploraError_RequestAlreadyConsumedImplCopyWith<$Res> { + __$$EsploraError_RequestAlreadyConsumedImplCopyWithImpl( + _$EsploraError_RequestAlreadyConsumedImpl _value, + $Res Function(_$EsploraError_RequestAlreadyConsumedImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$EsploraError_RequestAlreadyConsumedImpl + extends EsploraError_RequestAlreadyConsumed { + const _$EsploraError_RequestAlreadyConsumedImpl() : super._(); + + @override + String toString() { + return 'EsploraError.requestAlreadyConsumed()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$EsploraError_RequestAlreadyConsumedImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) minreq, + required TResult Function(int status, String errorMessage) httpResponse, + required TResult Function(String errorMessage) parsing, + required TResult Function(String errorMessage) statusCode, + required TResult Function(String errorMessage) bitcoinEncoding, + required TResult Function(String errorMessage) hexToArray, + required TResult Function(String errorMessage) hexToBytes, + required TResult Function() transactionNotFound, + required TResult Function(int height) headerHeightNotFound, + required TResult Function() headerHashNotFound, + required TResult Function(String name) invalidHttpHeaderName, + required TResult Function(String value) invalidHttpHeaderValue, + required TResult Function() requestAlreadyConsumed, + }) { + return requestAlreadyConsumed(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? minreq, + TResult? Function(int status, String errorMessage)? httpResponse, + TResult? Function(String errorMessage)? parsing, + TResult? Function(String errorMessage)? statusCode, + TResult? Function(String errorMessage)? bitcoinEncoding, + TResult? Function(String errorMessage)? hexToArray, + TResult? Function(String errorMessage)? hexToBytes, + TResult? Function()? transactionNotFound, + TResult? Function(int height)? headerHeightNotFound, + TResult? Function()? headerHashNotFound, + TResult? Function(String name)? invalidHttpHeaderName, + TResult? Function(String value)? invalidHttpHeaderValue, + TResult? Function()? requestAlreadyConsumed, + }) { + return requestAlreadyConsumed?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? minreq, + TResult Function(int status, String errorMessage)? httpResponse, + TResult Function(String errorMessage)? parsing, + TResult Function(String errorMessage)? statusCode, + TResult Function(String errorMessage)? bitcoinEncoding, + TResult Function(String errorMessage)? hexToArray, + TResult Function(String errorMessage)? hexToBytes, + TResult Function()? transactionNotFound, + TResult Function(int height)? headerHeightNotFound, + TResult Function()? headerHashNotFound, + TResult Function(String name)? invalidHttpHeaderName, + TResult Function(String value)? invalidHttpHeaderValue, + TResult Function()? requestAlreadyConsumed, + required TResult orElse(), + }) { + if (requestAlreadyConsumed != null) { + return requestAlreadyConsumed(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(EsploraError_Minreq value) minreq, + required TResult Function(EsploraError_HttpResponse value) httpResponse, + required TResult Function(EsploraError_Parsing value) parsing, + required TResult Function(EsploraError_StatusCode value) statusCode, + required TResult Function(EsploraError_BitcoinEncoding value) + bitcoinEncoding, + required TResult Function(EsploraError_HexToArray value) hexToArray, + required TResult Function(EsploraError_HexToBytes value) hexToBytes, + required TResult Function(EsploraError_TransactionNotFound value) + transactionNotFound, + required TResult Function(EsploraError_HeaderHeightNotFound value) + headerHeightNotFound, + required TResult Function(EsploraError_HeaderHashNotFound value) + headerHashNotFound, + required TResult Function(EsploraError_InvalidHttpHeaderName value) + invalidHttpHeaderName, + required TResult Function(EsploraError_InvalidHttpHeaderValue value) + invalidHttpHeaderValue, + required TResult Function(EsploraError_RequestAlreadyConsumed value) + requestAlreadyConsumed, + }) { + return requestAlreadyConsumed(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(EsploraError_Minreq value)? minreq, + TResult? Function(EsploraError_HttpResponse value)? httpResponse, + TResult? Function(EsploraError_Parsing value)? parsing, + TResult? Function(EsploraError_StatusCode value)? statusCode, + TResult? Function(EsploraError_BitcoinEncoding value)? bitcoinEncoding, + TResult? Function(EsploraError_HexToArray value)? hexToArray, + TResult? Function(EsploraError_HexToBytes value)? hexToBytes, + TResult? Function(EsploraError_TransactionNotFound value)? + transactionNotFound, + TResult? Function(EsploraError_HeaderHeightNotFound value)? + headerHeightNotFound, + TResult? Function(EsploraError_HeaderHashNotFound value)? + headerHashNotFound, + TResult? Function(EsploraError_InvalidHttpHeaderName value)? + invalidHttpHeaderName, + TResult? Function(EsploraError_InvalidHttpHeaderValue value)? + invalidHttpHeaderValue, + TResult? Function(EsploraError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + }) { + return requestAlreadyConsumed?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(EsploraError_Minreq value)? minreq, + TResult Function(EsploraError_HttpResponse value)? httpResponse, + TResult Function(EsploraError_Parsing value)? parsing, + TResult Function(EsploraError_StatusCode value)? statusCode, + TResult Function(EsploraError_BitcoinEncoding value)? bitcoinEncoding, + TResult Function(EsploraError_HexToArray value)? hexToArray, + TResult Function(EsploraError_HexToBytes value)? hexToBytes, + TResult Function(EsploraError_TransactionNotFound value)? + transactionNotFound, + TResult Function(EsploraError_HeaderHeightNotFound value)? + headerHeightNotFound, + TResult Function(EsploraError_HeaderHashNotFound value)? headerHashNotFound, + TResult Function(EsploraError_InvalidHttpHeaderName value)? + invalidHttpHeaderName, + TResult Function(EsploraError_InvalidHttpHeaderValue value)? + invalidHttpHeaderValue, + TResult Function(EsploraError_RequestAlreadyConsumed value)? + requestAlreadyConsumed, + required TResult orElse(), + }) { + if (requestAlreadyConsumed != null) { + return requestAlreadyConsumed(this); + } + return orElse(); + } +} + +abstract class EsploraError_RequestAlreadyConsumed extends EsploraError { + const factory EsploraError_RequestAlreadyConsumed() = + _$EsploraError_RequestAlreadyConsumedImpl; + const EsploraError_RequestAlreadyConsumed._() : super._(); +} + +/// @nodoc +mixin _$ExtractTxError { + @optionalTypeArgs + TResult when({ + required TResult Function(BigInt feeRate) absurdFeeRate, + required TResult Function() missingInputValue, + required TResult Function() sendingTooMuch, + required TResult Function() otherExtractTxErr, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(BigInt feeRate)? absurdFeeRate, + TResult? Function()? missingInputValue, + TResult? Function()? sendingTooMuch, + TResult? Function()? otherExtractTxErr, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(BigInt feeRate)? absurdFeeRate, + TResult Function()? missingInputValue, + TResult Function()? sendingTooMuch, + TResult Function()? otherExtractTxErr, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(ExtractTxError_AbsurdFeeRate value) absurdFeeRate, + required TResult Function(ExtractTxError_MissingInputValue value) + missingInputValue, + required TResult Function(ExtractTxError_SendingTooMuch value) + sendingTooMuch, + required TResult Function(ExtractTxError_OtherExtractTxErr value) + otherExtractTxErr, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(ExtractTxError_AbsurdFeeRate value)? absurdFeeRate, + TResult? Function(ExtractTxError_MissingInputValue value)? + missingInputValue, + TResult? Function(ExtractTxError_SendingTooMuch value)? sendingTooMuch, + TResult? Function(ExtractTxError_OtherExtractTxErr value)? + otherExtractTxErr, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ExtractTxError_AbsurdFeeRate value)? absurdFeeRate, + TResult Function(ExtractTxError_MissingInputValue value)? missingInputValue, + TResult Function(ExtractTxError_SendingTooMuch value)? sendingTooMuch, + TResult Function(ExtractTxError_OtherExtractTxErr value)? otherExtractTxErr, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $ExtractTxErrorCopyWith<$Res> { + factory $ExtractTxErrorCopyWith( + ExtractTxError value, $Res Function(ExtractTxError) then) = + _$ExtractTxErrorCopyWithImpl<$Res, ExtractTxError>; +} + +/// @nodoc +class _$ExtractTxErrorCopyWithImpl<$Res, $Val extends ExtractTxError> + implements $ExtractTxErrorCopyWith<$Res> { + _$ExtractTxErrorCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; +} + +/// @nodoc +abstract class _$$ExtractTxError_AbsurdFeeRateImplCopyWith<$Res> { + factory _$$ExtractTxError_AbsurdFeeRateImplCopyWith( + _$ExtractTxError_AbsurdFeeRateImpl value, + $Res Function(_$ExtractTxError_AbsurdFeeRateImpl) then) = + __$$ExtractTxError_AbsurdFeeRateImplCopyWithImpl<$Res>; + @useResult + $Res call({BigInt feeRate}); +} + +/// @nodoc +class __$$ExtractTxError_AbsurdFeeRateImplCopyWithImpl<$Res> + extends _$ExtractTxErrorCopyWithImpl<$Res, + _$ExtractTxError_AbsurdFeeRateImpl> + implements _$$ExtractTxError_AbsurdFeeRateImplCopyWith<$Res> { + __$$ExtractTxError_AbsurdFeeRateImplCopyWithImpl( + _$ExtractTxError_AbsurdFeeRateImpl _value, + $Res Function(_$ExtractTxError_AbsurdFeeRateImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? feeRate = null, + }) { + return _then(_$ExtractTxError_AbsurdFeeRateImpl( + feeRate: null == feeRate + ? _value.feeRate + : feeRate // ignore: cast_nullable_to_non_nullable + as BigInt, + )); + } +} + +/// @nodoc + +class _$ExtractTxError_AbsurdFeeRateImpl extends ExtractTxError_AbsurdFeeRate { + const _$ExtractTxError_AbsurdFeeRateImpl({required this.feeRate}) : super._(); + + @override + final BigInt feeRate; + + @override + String toString() { + return 'ExtractTxError.absurdFeeRate(feeRate: $feeRate)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$ExtractTxError_AbsurdFeeRateImpl && + (identical(other.feeRate, feeRate) || other.feeRate == feeRate)); + } + + @override + int get hashCode => Object.hash(runtimeType, feeRate); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$ExtractTxError_AbsurdFeeRateImplCopyWith< + _$ExtractTxError_AbsurdFeeRateImpl> + get copyWith => __$$ExtractTxError_AbsurdFeeRateImplCopyWithImpl< + _$ExtractTxError_AbsurdFeeRateImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(BigInt feeRate) absurdFeeRate, + required TResult Function() missingInputValue, + required TResult Function() sendingTooMuch, + required TResult Function() otherExtractTxErr, + }) { + return absurdFeeRate(feeRate); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(BigInt feeRate)? absurdFeeRate, + TResult? Function()? missingInputValue, + TResult? Function()? sendingTooMuch, + TResult? Function()? otherExtractTxErr, + }) { + return absurdFeeRate?.call(feeRate); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(BigInt feeRate)? absurdFeeRate, + TResult Function()? missingInputValue, + TResult Function()? sendingTooMuch, + TResult Function()? otherExtractTxErr, + required TResult orElse(), + }) { + if (absurdFeeRate != null) { + return absurdFeeRate(feeRate); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(ExtractTxError_AbsurdFeeRate value) absurdFeeRate, + required TResult Function(ExtractTxError_MissingInputValue value) + missingInputValue, + required TResult Function(ExtractTxError_SendingTooMuch value) + sendingTooMuch, + required TResult Function(ExtractTxError_OtherExtractTxErr value) + otherExtractTxErr, + }) { + return absurdFeeRate(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(ExtractTxError_AbsurdFeeRate value)? absurdFeeRate, + TResult? Function(ExtractTxError_MissingInputValue value)? + missingInputValue, + TResult? Function(ExtractTxError_SendingTooMuch value)? sendingTooMuch, + TResult? Function(ExtractTxError_OtherExtractTxErr value)? + otherExtractTxErr, + }) { + return absurdFeeRate?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ExtractTxError_AbsurdFeeRate value)? absurdFeeRate, + TResult Function(ExtractTxError_MissingInputValue value)? missingInputValue, + TResult Function(ExtractTxError_SendingTooMuch value)? sendingTooMuch, + TResult Function(ExtractTxError_OtherExtractTxErr value)? otherExtractTxErr, + required TResult orElse(), + }) { + if (absurdFeeRate != null) { + return absurdFeeRate(this); + } + return orElse(); + } +} + +abstract class ExtractTxError_AbsurdFeeRate extends ExtractTxError { + const factory ExtractTxError_AbsurdFeeRate({required final BigInt feeRate}) = + _$ExtractTxError_AbsurdFeeRateImpl; + const ExtractTxError_AbsurdFeeRate._() : super._(); + + BigInt get feeRate; + @JsonKey(ignore: true) + _$$ExtractTxError_AbsurdFeeRateImplCopyWith< + _$ExtractTxError_AbsurdFeeRateImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$ExtractTxError_MissingInputValueImplCopyWith<$Res> { + factory _$$ExtractTxError_MissingInputValueImplCopyWith( + _$ExtractTxError_MissingInputValueImpl value, + $Res Function(_$ExtractTxError_MissingInputValueImpl) then) = + __$$ExtractTxError_MissingInputValueImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$ExtractTxError_MissingInputValueImplCopyWithImpl<$Res> + extends _$ExtractTxErrorCopyWithImpl<$Res, + _$ExtractTxError_MissingInputValueImpl> + implements _$$ExtractTxError_MissingInputValueImplCopyWith<$Res> { + __$$ExtractTxError_MissingInputValueImplCopyWithImpl( + _$ExtractTxError_MissingInputValueImpl _value, + $Res Function(_$ExtractTxError_MissingInputValueImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$ExtractTxError_MissingInputValueImpl + extends ExtractTxError_MissingInputValue { + const _$ExtractTxError_MissingInputValueImpl() : super._(); + + @override + String toString() { + return 'ExtractTxError.missingInputValue()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$ExtractTxError_MissingInputValueImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(BigInt feeRate) absurdFeeRate, + required TResult Function() missingInputValue, + required TResult Function() sendingTooMuch, + required TResult Function() otherExtractTxErr, + }) { + return missingInputValue(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(BigInt feeRate)? absurdFeeRate, + TResult? Function()? missingInputValue, + TResult? Function()? sendingTooMuch, + TResult? Function()? otherExtractTxErr, + }) { + return missingInputValue?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(BigInt feeRate)? absurdFeeRate, + TResult Function()? missingInputValue, + TResult Function()? sendingTooMuch, + TResult Function()? otherExtractTxErr, + required TResult orElse(), + }) { + if (missingInputValue != null) { + return missingInputValue(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(ExtractTxError_AbsurdFeeRate value) absurdFeeRate, + required TResult Function(ExtractTxError_MissingInputValue value) + missingInputValue, + required TResult Function(ExtractTxError_SendingTooMuch value) + sendingTooMuch, + required TResult Function(ExtractTxError_OtherExtractTxErr value) + otherExtractTxErr, + }) { + return missingInputValue(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(ExtractTxError_AbsurdFeeRate value)? absurdFeeRate, + TResult? Function(ExtractTxError_MissingInputValue value)? + missingInputValue, + TResult? Function(ExtractTxError_SendingTooMuch value)? sendingTooMuch, + TResult? Function(ExtractTxError_OtherExtractTxErr value)? + otherExtractTxErr, + }) { + return missingInputValue?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ExtractTxError_AbsurdFeeRate value)? absurdFeeRate, + TResult Function(ExtractTxError_MissingInputValue value)? missingInputValue, + TResult Function(ExtractTxError_SendingTooMuch value)? sendingTooMuch, + TResult Function(ExtractTxError_OtherExtractTxErr value)? otherExtractTxErr, + required TResult orElse(), + }) { + if (missingInputValue != null) { + return missingInputValue(this); + } + return orElse(); + } +} + +abstract class ExtractTxError_MissingInputValue extends ExtractTxError { + const factory ExtractTxError_MissingInputValue() = + _$ExtractTxError_MissingInputValueImpl; + const ExtractTxError_MissingInputValue._() : super._(); +} + +/// @nodoc +abstract class _$$ExtractTxError_SendingTooMuchImplCopyWith<$Res> { + factory _$$ExtractTxError_SendingTooMuchImplCopyWith( + _$ExtractTxError_SendingTooMuchImpl value, + $Res Function(_$ExtractTxError_SendingTooMuchImpl) then) = + __$$ExtractTxError_SendingTooMuchImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$ExtractTxError_SendingTooMuchImplCopyWithImpl<$Res> + extends _$ExtractTxErrorCopyWithImpl<$Res, + _$ExtractTxError_SendingTooMuchImpl> + implements _$$ExtractTxError_SendingTooMuchImplCopyWith<$Res> { + __$$ExtractTxError_SendingTooMuchImplCopyWithImpl( + _$ExtractTxError_SendingTooMuchImpl _value, + $Res Function(_$ExtractTxError_SendingTooMuchImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$ExtractTxError_SendingTooMuchImpl + extends ExtractTxError_SendingTooMuch { + const _$ExtractTxError_SendingTooMuchImpl() : super._(); + + @override + String toString() { + return 'ExtractTxError.sendingTooMuch()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$ExtractTxError_SendingTooMuchImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(BigInt feeRate) absurdFeeRate, + required TResult Function() missingInputValue, + required TResult Function() sendingTooMuch, + required TResult Function() otherExtractTxErr, + }) { + return sendingTooMuch(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(BigInt feeRate)? absurdFeeRate, + TResult? Function()? missingInputValue, + TResult? Function()? sendingTooMuch, + TResult? Function()? otherExtractTxErr, + }) { + return sendingTooMuch?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(BigInt feeRate)? absurdFeeRate, + TResult Function()? missingInputValue, + TResult Function()? sendingTooMuch, + TResult Function()? otherExtractTxErr, + required TResult orElse(), + }) { + if (sendingTooMuch != null) { + return sendingTooMuch(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(ExtractTxError_AbsurdFeeRate value) absurdFeeRate, + required TResult Function(ExtractTxError_MissingInputValue value) + missingInputValue, + required TResult Function(ExtractTxError_SendingTooMuch value) + sendingTooMuch, + required TResult Function(ExtractTxError_OtherExtractTxErr value) + otherExtractTxErr, + }) { + return sendingTooMuch(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(ExtractTxError_AbsurdFeeRate value)? absurdFeeRate, + TResult? Function(ExtractTxError_MissingInputValue value)? + missingInputValue, + TResult? Function(ExtractTxError_SendingTooMuch value)? sendingTooMuch, + TResult? Function(ExtractTxError_OtherExtractTxErr value)? + otherExtractTxErr, + }) { + return sendingTooMuch?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ExtractTxError_AbsurdFeeRate value)? absurdFeeRate, + TResult Function(ExtractTxError_MissingInputValue value)? missingInputValue, + TResult Function(ExtractTxError_SendingTooMuch value)? sendingTooMuch, + TResult Function(ExtractTxError_OtherExtractTxErr value)? otherExtractTxErr, + required TResult orElse(), + }) { + if (sendingTooMuch != null) { + return sendingTooMuch(this); + } + return orElse(); + } +} + +abstract class ExtractTxError_SendingTooMuch extends ExtractTxError { + const factory ExtractTxError_SendingTooMuch() = + _$ExtractTxError_SendingTooMuchImpl; + const ExtractTxError_SendingTooMuch._() : super._(); +} + +/// @nodoc +abstract class _$$ExtractTxError_OtherExtractTxErrImplCopyWith<$Res> { + factory _$$ExtractTxError_OtherExtractTxErrImplCopyWith( + _$ExtractTxError_OtherExtractTxErrImpl value, + $Res Function(_$ExtractTxError_OtherExtractTxErrImpl) then) = + __$$ExtractTxError_OtherExtractTxErrImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$ExtractTxError_OtherExtractTxErrImplCopyWithImpl<$Res> + extends _$ExtractTxErrorCopyWithImpl<$Res, + _$ExtractTxError_OtherExtractTxErrImpl> + implements _$$ExtractTxError_OtherExtractTxErrImplCopyWith<$Res> { + __$$ExtractTxError_OtherExtractTxErrImplCopyWithImpl( + _$ExtractTxError_OtherExtractTxErrImpl _value, + $Res Function(_$ExtractTxError_OtherExtractTxErrImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$ExtractTxError_OtherExtractTxErrImpl + extends ExtractTxError_OtherExtractTxErr { + const _$ExtractTxError_OtherExtractTxErrImpl() : super._(); + + @override + String toString() { + return 'ExtractTxError.otherExtractTxErr()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$ExtractTxError_OtherExtractTxErrImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(BigInt feeRate) absurdFeeRate, + required TResult Function() missingInputValue, + required TResult Function() sendingTooMuch, + required TResult Function() otherExtractTxErr, + }) { + return otherExtractTxErr(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(BigInt feeRate)? absurdFeeRate, + TResult? Function()? missingInputValue, + TResult? Function()? sendingTooMuch, + TResult? Function()? otherExtractTxErr, + }) { + return otherExtractTxErr?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(BigInt feeRate)? absurdFeeRate, + TResult Function()? missingInputValue, + TResult Function()? sendingTooMuch, + TResult Function()? otherExtractTxErr, + required TResult orElse(), + }) { + if (otherExtractTxErr != null) { + return otherExtractTxErr(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(ExtractTxError_AbsurdFeeRate value) absurdFeeRate, + required TResult Function(ExtractTxError_MissingInputValue value) + missingInputValue, + required TResult Function(ExtractTxError_SendingTooMuch value) + sendingTooMuch, + required TResult Function(ExtractTxError_OtherExtractTxErr value) + otherExtractTxErr, + }) { + return otherExtractTxErr(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(ExtractTxError_AbsurdFeeRate value)? absurdFeeRate, + TResult? Function(ExtractTxError_MissingInputValue value)? + missingInputValue, + TResult? Function(ExtractTxError_SendingTooMuch value)? sendingTooMuch, + TResult? Function(ExtractTxError_OtherExtractTxErr value)? + otherExtractTxErr, + }) { + return otherExtractTxErr?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ExtractTxError_AbsurdFeeRate value)? absurdFeeRate, + TResult Function(ExtractTxError_MissingInputValue value)? missingInputValue, + TResult Function(ExtractTxError_SendingTooMuch value)? sendingTooMuch, + TResult Function(ExtractTxError_OtherExtractTxErr value)? otherExtractTxErr, + required TResult orElse(), + }) { + if (otherExtractTxErr != null) { + return otherExtractTxErr(this); + } + return orElse(); + } +} + +abstract class ExtractTxError_OtherExtractTxErr extends ExtractTxError { + const factory ExtractTxError_OtherExtractTxErr() = + _$ExtractTxError_OtherExtractTxErrImpl; + const ExtractTxError_OtherExtractTxErr._() : super._(); +} + +/// @nodoc +mixin _$FromScriptError { + @optionalTypeArgs + TResult when({ + required TResult Function() unrecognizedScript, + required TResult Function(String errorMessage) witnessProgram, + required TResult Function(String errorMessage) witnessVersion, + required TResult Function() otherFromScriptErr, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? unrecognizedScript, + TResult? Function(String errorMessage)? witnessProgram, + TResult? Function(String errorMessage)? witnessVersion, + TResult? Function()? otherFromScriptErr, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? unrecognizedScript, + TResult Function(String errorMessage)? witnessProgram, + TResult Function(String errorMessage)? witnessVersion, + TResult Function()? otherFromScriptErr, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(FromScriptError_UnrecognizedScript value) + unrecognizedScript, + required TResult Function(FromScriptError_WitnessProgram value) + witnessProgram, + required TResult Function(FromScriptError_WitnessVersion value) + witnessVersion, + required TResult Function(FromScriptError_OtherFromScriptErr value) + otherFromScriptErr, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(FromScriptError_UnrecognizedScript value)? + unrecognizedScript, + TResult? Function(FromScriptError_WitnessProgram value)? witnessProgram, + TResult? Function(FromScriptError_WitnessVersion value)? witnessVersion, + TResult? Function(FromScriptError_OtherFromScriptErr value)? + otherFromScriptErr, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(FromScriptError_UnrecognizedScript value)? + unrecognizedScript, + TResult Function(FromScriptError_WitnessProgram value)? witnessProgram, + TResult Function(FromScriptError_WitnessVersion value)? witnessVersion, + TResult Function(FromScriptError_OtherFromScriptErr value)? + otherFromScriptErr, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $FromScriptErrorCopyWith<$Res> { + factory $FromScriptErrorCopyWith( + FromScriptError value, $Res Function(FromScriptError) then) = + _$FromScriptErrorCopyWithImpl<$Res, FromScriptError>; +} + +/// @nodoc +class _$FromScriptErrorCopyWithImpl<$Res, $Val extends FromScriptError> + implements $FromScriptErrorCopyWith<$Res> { + _$FromScriptErrorCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; +} + +/// @nodoc +abstract class _$$FromScriptError_UnrecognizedScriptImplCopyWith<$Res> { + factory _$$FromScriptError_UnrecognizedScriptImplCopyWith( + _$FromScriptError_UnrecognizedScriptImpl value, + $Res Function(_$FromScriptError_UnrecognizedScriptImpl) then) = + __$$FromScriptError_UnrecognizedScriptImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$FromScriptError_UnrecognizedScriptImplCopyWithImpl<$Res> + extends _$FromScriptErrorCopyWithImpl<$Res, + _$FromScriptError_UnrecognizedScriptImpl> + implements _$$FromScriptError_UnrecognizedScriptImplCopyWith<$Res> { + __$$FromScriptError_UnrecognizedScriptImplCopyWithImpl( + _$FromScriptError_UnrecognizedScriptImpl _value, + $Res Function(_$FromScriptError_UnrecognizedScriptImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$FromScriptError_UnrecognizedScriptImpl + extends FromScriptError_UnrecognizedScript { + const _$FromScriptError_UnrecognizedScriptImpl() : super._(); + + @override + String toString() { + return 'FromScriptError.unrecognizedScript()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$FromScriptError_UnrecognizedScriptImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() unrecognizedScript, + required TResult Function(String errorMessage) witnessProgram, + required TResult Function(String errorMessage) witnessVersion, + required TResult Function() otherFromScriptErr, + }) { + return unrecognizedScript(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? unrecognizedScript, + TResult? Function(String errorMessage)? witnessProgram, + TResult? Function(String errorMessage)? witnessVersion, + TResult? Function()? otherFromScriptErr, + }) { + return unrecognizedScript?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? unrecognizedScript, + TResult Function(String errorMessage)? witnessProgram, + TResult Function(String errorMessage)? witnessVersion, + TResult Function()? otherFromScriptErr, + required TResult orElse(), + }) { + if (unrecognizedScript != null) { + return unrecognizedScript(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(FromScriptError_UnrecognizedScript value) + unrecognizedScript, + required TResult Function(FromScriptError_WitnessProgram value) + witnessProgram, + required TResult Function(FromScriptError_WitnessVersion value) + witnessVersion, + required TResult Function(FromScriptError_OtherFromScriptErr value) + otherFromScriptErr, + }) { + return unrecognizedScript(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(FromScriptError_UnrecognizedScript value)? + unrecognizedScript, + TResult? Function(FromScriptError_WitnessProgram value)? witnessProgram, + TResult? Function(FromScriptError_WitnessVersion value)? witnessVersion, + TResult? Function(FromScriptError_OtherFromScriptErr value)? + otherFromScriptErr, + }) { + return unrecognizedScript?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(FromScriptError_UnrecognizedScript value)? + unrecognizedScript, + TResult Function(FromScriptError_WitnessProgram value)? witnessProgram, + TResult Function(FromScriptError_WitnessVersion value)? witnessVersion, + TResult Function(FromScriptError_OtherFromScriptErr value)? + otherFromScriptErr, + required TResult orElse(), + }) { + if (unrecognizedScript != null) { + return unrecognizedScript(this); + } + return orElse(); + } +} + +abstract class FromScriptError_UnrecognizedScript extends FromScriptError { + const factory FromScriptError_UnrecognizedScript() = + _$FromScriptError_UnrecognizedScriptImpl; + const FromScriptError_UnrecognizedScript._() : super._(); +} + +/// @nodoc +abstract class _$$FromScriptError_WitnessProgramImplCopyWith<$Res> { + factory _$$FromScriptError_WitnessProgramImplCopyWith( + _$FromScriptError_WitnessProgramImpl value, + $Res Function(_$FromScriptError_WitnessProgramImpl) then) = + __$$FromScriptError_WitnessProgramImplCopyWithImpl<$Res>; + @useResult + $Res call({String errorMessage}); +} + +/// @nodoc +class __$$FromScriptError_WitnessProgramImplCopyWithImpl<$Res> + extends _$FromScriptErrorCopyWithImpl<$Res, + _$FromScriptError_WitnessProgramImpl> + implements _$$FromScriptError_WitnessProgramImplCopyWith<$Res> { + __$$FromScriptError_WitnessProgramImplCopyWithImpl( + _$FromScriptError_WitnessProgramImpl _value, + $Res Function(_$FromScriptError_WitnessProgramImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? errorMessage = null, + }) { + return _then(_$FromScriptError_WitnessProgramImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$FromScriptError_WitnessProgramImpl + extends FromScriptError_WitnessProgram { + const _$FromScriptError_WitnessProgramImpl({required this.errorMessage}) + : super._(); + + @override + final String errorMessage; + + @override + String toString() { + return 'FromScriptError.witnessProgram(errorMessage: $errorMessage)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$FromScriptError_WitnessProgramImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); + } + + @override + int get hashCode => Object.hash(runtimeType, errorMessage); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$FromScriptError_WitnessProgramImplCopyWith< + _$FromScriptError_WitnessProgramImpl> + get copyWith => __$$FromScriptError_WitnessProgramImplCopyWithImpl< + _$FromScriptError_WitnessProgramImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() unrecognizedScript, + required TResult Function(String errorMessage) witnessProgram, + required TResult Function(String errorMessage) witnessVersion, + required TResult Function() otherFromScriptErr, + }) { + return witnessProgram(errorMessage); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? unrecognizedScript, + TResult? Function(String errorMessage)? witnessProgram, + TResult? Function(String errorMessage)? witnessVersion, + TResult? Function()? otherFromScriptErr, + }) { + return witnessProgram?.call(errorMessage); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? unrecognizedScript, + TResult Function(String errorMessage)? witnessProgram, + TResult Function(String errorMessage)? witnessVersion, + TResult Function()? otherFromScriptErr, + required TResult orElse(), + }) { + if (witnessProgram != null) { + return witnessProgram(errorMessage); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(FromScriptError_UnrecognizedScript value) + unrecognizedScript, + required TResult Function(FromScriptError_WitnessProgram value) + witnessProgram, + required TResult Function(FromScriptError_WitnessVersion value) + witnessVersion, + required TResult Function(FromScriptError_OtherFromScriptErr value) + otherFromScriptErr, + }) { + return witnessProgram(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(FromScriptError_UnrecognizedScript value)? + unrecognizedScript, + TResult? Function(FromScriptError_WitnessProgram value)? witnessProgram, + TResult? Function(FromScriptError_WitnessVersion value)? witnessVersion, + TResult? Function(FromScriptError_OtherFromScriptErr value)? + otherFromScriptErr, + }) { + return witnessProgram?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(FromScriptError_UnrecognizedScript value)? + unrecognizedScript, + TResult Function(FromScriptError_WitnessProgram value)? witnessProgram, + TResult Function(FromScriptError_WitnessVersion value)? witnessVersion, + TResult Function(FromScriptError_OtherFromScriptErr value)? + otherFromScriptErr, + required TResult orElse(), + }) { + if (witnessProgram != null) { + return witnessProgram(this); + } + return orElse(); + } +} + +abstract class FromScriptError_WitnessProgram extends FromScriptError { + const factory FromScriptError_WitnessProgram( + {required final String errorMessage}) = + _$FromScriptError_WitnessProgramImpl; + const FromScriptError_WitnessProgram._() : super._(); + + String get errorMessage; + @JsonKey(ignore: true) + _$$FromScriptError_WitnessProgramImplCopyWith< + _$FromScriptError_WitnessProgramImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$FromScriptError_WitnessVersionImplCopyWith<$Res> { + factory _$$FromScriptError_WitnessVersionImplCopyWith( + _$FromScriptError_WitnessVersionImpl value, + $Res Function(_$FromScriptError_WitnessVersionImpl) then) = + __$$FromScriptError_WitnessVersionImplCopyWithImpl<$Res>; + @useResult + $Res call({String errorMessage}); +} + +/// @nodoc +class __$$FromScriptError_WitnessVersionImplCopyWithImpl<$Res> + extends _$FromScriptErrorCopyWithImpl<$Res, + _$FromScriptError_WitnessVersionImpl> + implements _$$FromScriptError_WitnessVersionImplCopyWith<$Res> { + __$$FromScriptError_WitnessVersionImplCopyWithImpl( + _$FromScriptError_WitnessVersionImpl _value, + $Res Function(_$FromScriptError_WitnessVersionImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? errorMessage = null, + }) { + return _then(_$FromScriptError_WitnessVersionImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$FromScriptError_WitnessVersionImpl + extends FromScriptError_WitnessVersion { + const _$FromScriptError_WitnessVersionImpl({required this.errorMessage}) + : super._(); + + @override + final String errorMessage; + + @override + String toString() { + return 'FromScriptError.witnessVersion(errorMessage: $errorMessage)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$FromScriptError_WitnessVersionImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); + } + + @override + int get hashCode => Object.hash(runtimeType, errorMessage); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$FromScriptError_WitnessVersionImplCopyWith< + _$FromScriptError_WitnessVersionImpl> + get copyWith => __$$FromScriptError_WitnessVersionImplCopyWithImpl< + _$FromScriptError_WitnessVersionImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() unrecognizedScript, + required TResult Function(String errorMessage) witnessProgram, + required TResult Function(String errorMessage) witnessVersion, + required TResult Function() otherFromScriptErr, + }) { + return witnessVersion(errorMessage); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? unrecognizedScript, + TResult? Function(String errorMessage)? witnessProgram, + TResult? Function(String errorMessage)? witnessVersion, + TResult? Function()? otherFromScriptErr, + }) { + return witnessVersion?.call(errorMessage); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? unrecognizedScript, + TResult Function(String errorMessage)? witnessProgram, + TResult Function(String errorMessage)? witnessVersion, + TResult Function()? otherFromScriptErr, + required TResult orElse(), + }) { + if (witnessVersion != null) { + return witnessVersion(errorMessage); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(FromScriptError_UnrecognizedScript value) + unrecognizedScript, + required TResult Function(FromScriptError_WitnessProgram value) + witnessProgram, + required TResult Function(FromScriptError_WitnessVersion value) + witnessVersion, + required TResult Function(FromScriptError_OtherFromScriptErr value) + otherFromScriptErr, + }) { + return witnessVersion(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(FromScriptError_UnrecognizedScript value)? + unrecognizedScript, + TResult? Function(FromScriptError_WitnessProgram value)? witnessProgram, + TResult? Function(FromScriptError_WitnessVersion value)? witnessVersion, + TResult? Function(FromScriptError_OtherFromScriptErr value)? + otherFromScriptErr, + }) { + return witnessVersion?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(FromScriptError_UnrecognizedScript value)? + unrecognizedScript, + TResult Function(FromScriptError_WitnessProgram value)? witnessProgram, + TResult Function(FromScriptError_WitnessVersion value)? witnessVersion, + TResult Function(FromScriptError_OtherFromScriptErr value)? + otherFromScriptErr, + required TResult orElse(), + }) { + if (witnessVersion != null) { + return witnessVersion(this); + } + return orElse(); + } +} + +abstract class FromScriptError_WitnessVersion extends FromScriptError { + const factory FromScriptError_WitnessVersion( + {required final String errorMessage}) = + _$FromScriptError_WitnessVersionImpl; + const FromScriptError_WitnessVersion._() : super._(); + + String get errorMessage; + @JsonKey(ignore: true) + _$$FromScriptError_WitnessVersionImplCopyWith< + _$FromScriptError_WitnessVersionImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$FromScriptError_OtherFromScriptErrImplCopyWith<$Res> { + factory _$$FromScriptError_OtherFromScriptErrImplCopyWith( + _$FromScriptError_OtherFromScriptErrImpl value, + $Res Function(_$FromScriptError_OtherFromScriptErrImpl) then) = + __$$FromScriptError_OtherFromScriptErrImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$FromScriptError_OtherFromScriptErrImplCopyWithImpl<$Res> + extends _$FromScriptErrorCopyWithImpl<$Res, + _$FromScriptError_OtherFromScriptErrImpl> + implements _$$FromScriptError_OtherFromScriptErrImplCopyWith<$Res> { + __$$FromScriptError_OtherFromScriptErrImplCopyWithImpl( + _$FromScriptError_OtherFromScriptErrImpl _value, + $Res Function(_$FromScriptError_OtherFromScriptErrImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$FromScriptError_OtherFromScriptErrImpl + extends FromScriptError_OtherFromScriptErr { + const _$FromScriptError_OtherFromScriptErrImpl() : super._(); + + @override + String toString() { + return 'FromScriptError.otherFromScriptErr()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$FromScriptError_OtherFromScriptErrImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() unrecognizedScript, + required TResult Function(String errorMessage) witnessProgram, + required TResult Function(String errorMessage) witnessVersion, + required TResult Function() otherFromScriptErr, + }) { + return otherFromScriptErr(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? unrecognizedScript, + TResult? Function(String errorMessage)? witnessProgram, + TResult? Function(String errorMessage)? witnessVersion, + TResult? Function()? otherFromScriptErr, + }) { + return otherFromScriptErr?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? unrecognizedScript, + TResult Function(String errorMessage)? witnessProgram, + TResult Function(String errorMessage)? witnessVersion, + TResult Function()? otherFromScriptErr, + required TResult orElse(), + }) { + if (otherFromScriptErr != null) { + return otherFromScriptErr(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(FromScriptError_UnrecognizedScript value) + unrecognizedScript, + required TResult Function(FromScriptError_WitnessProgram value) + witnessProgram, + required TResult Function(FromScriptError_WitnessVersion value) + witnessVersion, + required TResult Function(FromScriptError_OtherFromScriptErr value) + otherFromScriptErr, + }) { + return otherFromScriptErr(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(FromScriptError_UnrecognizedScript value)? + unrecognizedScript, + TResult? Function(FromScriptError_WitnessProgram value)? witnessProgram, + TResult? Function(FromScriptError_WitnessVersion value)? witnessVersion, + TResult? Function(FromScriptError_OtherFromScriptErr value)? + otherFromScriptErr, + }) { + return otherFromScriptErr?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(FromScriptError_UnrecognizedScript value)? + unrecognizedScript, + TResult Function(FromScriptError_WitnessProgram value)? witnessProgram, + TResult Function(FromScriptError_WitnessVersion value)? witnessVersion, + TResult Function(FromScriptError_OtherFromScriptErr value)? + otherFromScriptErr, + required TResult orElse(), + }) { + if (otherFromScriptErr != null) { + return otherFromScriptErr(this); + } + return orElse(); + } +} + +abstract class FromScriptError_OtherFromScriptErr extends FromScriptError { + const factory FromScriptError_OtherFromScriptErr() = + _$FromScriptError_OtherFromScriptErrImpl; + const FromScriptError_OtherFromScriptErr._() : super._(); +} + +/// @nodoc +mixin _$LoadWithPersistError { + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) persist, + required TResult Function(String errorMessage) invalidChangeSet, + required TResult Function() couldNotLoad, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? persist, + TResult? Function(String errorMessage)? invalidChangeSet, + TResult? Function()? couldNotLoad, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? persist, + TResult Function(String errorMessage)? invalidChangeSet, + TResult Function()? couldNotLoad, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(LoadWithPersistError_Persist value) persist, + required TResult Function(LoadWithPersistError_InvalidChangeSet value) + invalidChangeSet, + required TResult Function(LoadWithPersistError_CouldNotLoad value) + couldNotLoad, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(LoadWithPersistError_Persist value)? persist, + TResult? Function(LoadWithPersistError_InvalidChangeSet value)? + invalidChangeSet, + TResult? Function(LoadWithPersistError_CouldNotLoad value)? couldNotLoad, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(LoadWithPersistError_Persist value)? persist, + TResult Function(LoadWithPersistError_InvalidChangeSet value)? + invalidChangeSet, + TResult Function(LoadWithPersistError_CouldNotLoad value)? couldNotLoad, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $LoadWithPersistErrorCopyWith<$Res> { + factory $LoadWithPersistErrorCopyWith(LoadWithPersistError value, + $Res Function(LoadWithPersistError) then) = + _$LoadWithPersistErrorCopyWithImpl<$Res, LoadWithPersistError>; +} + +/// @nodoc +class _$LoadWithPersistErrorCopyWithImpl<$Res, + $Val extends LoadWithPersistError> + implements $LoadWithPersistErrorCopyWith<$Res> { + _$LoadWithPersistErrorCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; +} + +/// @nodoc +abstract class _$$LoadWithPersistError_PersistImplCopyWith<$Res> { + factory _$$LoadWithPersistError_PersistImplCopyWith( + _$LoadWithPersistError_PersistImpl value, + $Res Function(_$LoadWithPersistError_PersistImpl) then) = + __$$LoadWithPersistError_PersistImplCopyWithImpl<$Res>; + @useResult + $Res call({String errorMessage}); +} + +/// @nodoc +class __$$LoadWithPersistError_PersistImplCopyWithImpl<$Res> + extends _$LoadWithPersistErrorCopyWithImpl<$Res, + _$LoadWithPersistError_PersistImpl> + implements _$$LoadWithPersistError_PersistImplCopyWith<$Res> { + __$$LoadWithPersistError_PersistImplCopyWithImpl( + _$LoadWithPersistError_PersistImpl _value, + $Res Function(_$LoadWithPersistError_PersistImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? errorMessage = null, + }) { + return _then(_$LoadWithPersistError_PersistImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$LoadWithPersistError_PersistImpl extends LoadWithPersistError_Persist { + const _$LoadWithPersistError_PersistImpl({required this.errorMessage}) + : super._(); + + @override + final String errorMessage; + + @override + String toString() { + return 'LoadWithPersistError.persist(errorMessage: $errorMessage)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$LoadWithPersistError_PersistImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); + } + + @override + int get hashCode => Object.hash(runtimeType, errorMessage); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$LoadWithPersistError_PersistImplCopyWith< + _$LoadWithPersistError_PersistImpl> + get copyWith => __$$LoadWithPersistError_PersistImplCopyWithImpl< + _$LoadWithPersistError_PersistImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) persist, + required TResult Function(String errorMessage) invalidChangeSet, + required TResult Function() couldNotLoad, + }) { + return persist(errorMessage); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? persist, + TResult? Function(String errorMessage)? invalidChangeSet, + TResult? Function()? couldNotLoad, + }) { + return persist?.call(errorMessage); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? persist, + TResult Function(String errorMessage)? invalidChangeSet, + TResult Function()? couldNotLoad, + required TResult orElse(), + }) { + if (persist != null) { + return persist(errorMessage); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(LoadWithPersistError_Persist value) persist, + required TResult Function(LoadWithPersistError_InvalidChangeSet value) + invalidChangeSet, + required TResult Function(LoadWithPersistError_CouldNotLoad value) + couldNotLoad, + }) { + return persist(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(LoadWithPersistError_Persist value)? persist, + TResult? Function(LoadWithPersistError_InvalidChangeSet value)? + invalidChangeSet, + TResult? Function(LoadWithPersistError_CouldNotLoad value)? couldNotLoad, + }) { + return persist?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(LoadWithPersistError_Persist value)? persist, + TResult Function(LoadWithPersistError_InvalidChangeSet value)? + invalidChangeSet, + TResult Function(LoadWithPersistError_CouldNotLoad value)? couldNotLoad, + required TResult orElse(), + }) { + if (persist != null) { + return persist(this); + } + return orElse(); + } +} + +abstract class LoadWithPersistError_Persist extends LoadWithPersistError { + const factory LoadWithPersistError_Persist( + {required final String errorMessage}) = + _$LoadWithPersistError_PersistImpl; + const LoadWithPersistError_Persist._() : super._(); + + String get errorMessage; + @JsonKey(ignore: true) + _$$LoadWithPersistError_PersistImplCopyWith< + _$LoadWithPersistError_PersistImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$LoadWithPersistError_InvalidChangeSetImplCopyWith<$Res> { + factory _$$LoadWithPersistError_InvalidChangeSetImplCopyWith( + _$LoadWithPersistError_InvalidChangeSetImpl value, + $Res Function(_$LoadWithPersistError_InvalidChangeSetImpl) then) = + __$$LoadWithPersistError_InvalidChangeSetImplCopyWithImpl<$Res>; + @useResult + $Res call({String errorMessage}); +} + +/// @nodoc +class __$$LoadWithPersistError_InvalidChangeSetImplCopyWithImpl<$Res> + extends _$LoadWithPersistErrorCopyWithImpl<$Res, + _$LoadWithPersistError_InvalidChangeSetImpl> + implements _$$LoadWithPersistError_InvalidChangeSetImplCopyWith<$Res> { + __$$LoadWithPersistError_InvalidChangeSetImplCopyWithImpl( + _$LoadWithPersistError_InvalidChangeSetImpl _value, + $Res Function(_$LoadWithPersistError_InvalidChangeSetImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? errorMessage = null, + }) { + return _then(_$LoadWithPersistError_InvalidChangeSetImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$LoadWithPersistError_InvalidChangeSetImpl + extends LoadWithPersistError_InvalidChangeSet { + const _$LoadWithPersistError_InvalidChangeSetImpl( + {required this.errorMessage}) + : super._(); + + @override + final String errorMessage; + + @override + String toString() { + return 'LoadWithPersistError.invalidChangeSet(errorMessage: $errorMessage)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$LoadWithPersistError_InvalidChangeSetImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); + } + + @override + int get hashCode => Object.hash(runtimeType, errorMessage); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$LoadWithPersistError_InvalidChangeSetImplCopyWith< + _$LoadWithPersistError_InvalidChangeSetImpl> + get copyWith => __$$LoadWithPersistError_InvalidChangeSetImplCopyWithImpl< + _$LoadWithPersistError_InvalidChangeSetImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) persist, + required TResult Function(String errorMessage) invalidChangeSet, + required TResult Function() couldNotLoad, + }) { + return invalidChangeSet(errorMessage); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? persist, + TResult? Function(String errorMessage)? invalidChangeSet, + TResult? Function()? couldNotLoad, + }) { + return invalidChangeSet?.call(errorMessage); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? persist, + TResult Function(String errorMessage)? invalidChangeSet, + TResult Function()? couldNotLoad, + required TResult orElse(), + }) { + if (invalidChangeSet != null) { + return invalidChangeSet(errorMessage); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(LoadWithPersistError_Persist value) persist, + required TResult Function(LoadWithPersistError_InvalidChangeSet value) + invalidChangeSet, + required TResult Function(LoadWithPersistError_CouldNotLoad value) + couldNotLoad, + }) { + return invalidChangeSet(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(LoadWithPersistError_Persist value)? persist, + TResult? Function(LoadWithPersistError_InvalidChangeSet value)? + invalidChangeSet, + TResult? Function(LoadWithPersistError_CouldNotLoad value)? couldNotLoad, + }) { + return invalidChangeSet?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(LoadWithPersistError_Persist value)? persist, + TResult Function(LoadWithPersistError_InvalidChangeSet value)? + invalidChangeSet, + TResult Function(LoadWithPersistError_CouldNotLoad value)? couldNotLoad, + required TResult orElse(), + }) { + if (invalidChangeSet != null) { + return invalidChangeSet(this); + } + return orElse(); + } +} + +abstract class LoadWithPersistError_InvalidChangeSet + extends LoadWithPersistError { + const factory LoadWithPersistError_InvalidChangeSet( + {required final String errorMessage}) = + _$LoadWithPersistError_InvalidChangeSetImpl; + const LoadWithPersistError_InvalidChangeSet._() : super._(); + + String get errorMessage; + @JsonKey(ignore: true) + _$$LoadWithPersistError_InvalidChangeSetImplCopyWith< + _$LoadWithPersistError_InvalidChangeSetImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$LoadWithPersistError_CouldNotLoadImplCopyWith<$Res> { + factory _$$LoadWithPersistError_CouldNotLoadImplCopyWith( + _$LoadWithPersistError_CouldNotLoadImpl value, + $Res Function(_$LoadWithPersistError_CouldNotLoadImpl) then) = + __$$LoadWithPersistError_CouldNotLoadImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$LoadWithPersistError_CouldNotLoadImplCopyWithImpl<$Res> + extends _$LoadWithPersistErrorCopyWithImpl<$Res, + _$LoadWithPersistError_CouldNotLoadImpl> + implements _$$LoadWithPersistError_CouldNotLoadImplCopyWith<$Res> { + __$$LoadWithPersistError_CouldNotLoadImplCopyWithImpl( + _$LoadWithPersistError_CouldNotLoadImpl _value, + $Res Function(_$LoadWithPersistError_CouldNotLoadImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$LoadWithPersistError_CouldNotLoadImpl + extends LoadWithPersistError_CouldNotLoad { + const _$LoadWithPersistError_CouldNotLoadImpl() : super._(); + + @override + String toString() { + return 'LoadWithPersistError.couldNotLoad()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$LoadWithPersistError_CouldNotLoadImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) persist, + required TResult Function(String errorMessage) invalidChangeSet, + required TResult Function() couldNotLoad, + }) { + return couldNotLoad(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? persist, + TResult? Function(String errorMessage)? invalidChangeSet, + TResult? Function()? couldNotLoad, + }) { + return couldNotLoad?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? persist, + TResult Function(String errorMessage)? invalidChangeSet, + TResult Function()? couldNotLoad, + required TResult orElse(), + }) { + if (couldNotLoad != null) { + return couldNotLoad(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(LoadWithPersistError_Persist value) persist, + required TResult Function(LoadWithPersistError_InvalidChangeSet value) + invalidChangeSet, + required TResult Function(LoadWithPersistError_CouldNotLoad value) + couldNotLoad, + }) { + return couldNotLoad(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(LoadWithPersistError_Persist value)? persist, + TResult? Function(LoadWithPersistError_InvalidChangeSet value)? + invalidChangeSet, + TResult? Function(LoadWithPersistError_CouldNotLoad value)? couldNotLoad, + }) { + return couldNotLoad?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(LoadWithPersistError_Persist value)? persist, + TResult Function(LoadWithPersistError_InvalidChangeSet value)? + invalidChangeSet, + TResult Function(LoadWithPersistError_CouldNotLoad value)? couldNotLoad, + required TResult orElse(), + }) { + if (couldNotLoad != null) { + return couldNotLoad(this); + } + return orElse(); + } +} + +abstract class LoadWithPersistError_CouldNotLoad extends LoadWithPersistError { + const factory LoadWithPersistError_CouldNotLoad() = + _$LoadWithPersistError_CouldNotLoadImpl; + const LoadWithPersistError_CouldNotLoad._() : super._(); +} + +/// @nodoc +mixin _$PsbtError { + @optionalTypeArgs + TResult when({ + required TResult Function() invalidMagic, + required TResult Function() missingUtxo, + required TResult Function() invalidSeparator, + required TResult Function() psbtUtxoOutOfBounds, + required TResult Function(String key) invalidKey, + required TResult Function() invalidProprietaryKey, + required TResult Function(String key) duplicateKey, + required TResult Function() unsignedTxHasScriptSigs, + required TResult Function() unsignedTxHasScriptWitnesses, + required TResult Function() mustHaveUnsignedTx, + required TResult Function() noMorePairs, + required TResult Function() unexpectedUnsignedTx, + required TResult Function(int sighash) nonStandardSighashType, + required TResult Function(String hash) invalidHash, + required TResult Function() invalidPreimageHashPair, + required TResult Function(String xpub) combineInconsistentKeySources, + required TResult Function(String encodingError) consensusEncoding, + required TResult Function() negativeFee, + required TResult Function() feeOverflow, + required TResult Function(String errorMessage) invalidPublicKey, + required TResult Function(String secp256K1Error) invalidSecp256K1PublicKey, + required TResult Function() invalidXOnlyPublicKey, + required TResult Function(String errorMessage) invalidEcdsaSignature, + required TResult Function(String errorMessage) invalidTaprootSignature, + required TResult Function() invalidControlBlock, + required TResult Function() invalidLeafVersion, + required TResult Function() taproot, + required TResult Function(String errorMessage) tapTree, + required TResult Function() xPubKey, + required TResult Function(String errorMessage) version, + required TResult Function() partialDataConsumption, + required TResult Function(String errorMessage) io, + required TResult Function() otherPsbtErr, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidMagic, + TResult? Function()? missingUtxo, + TResult? Function()? invalidSeparator, + TResult? Function()? psbtUtxoOutOfBounds, + TResult? Function(String key)? invalidKey, + TResult? Function()? invalidProprietaryKey, + TResult? Function(String key)? duplicateKey, + TResult? Function()? unsignedTxHasScriptSigs, + TResult? Function()? unsignedTxHasScriptWitnesses, + TResult? Function()? mustHaveUnsignedTx, + TResult? Function()? noMorePairs, + TResult? Function()? unexpectedUnsignedTx, + TResult? Function(int sighash)? nonStandardSighashType, + TResult? Function(String hash)? invalidHash, + TResult? Function()? invalidPreimageHashPair, + TResult? Function(String xpub)? combineInconsistentKeySources, + TResult? Function(String encodingError)? consensusEncoding, + TResult? Function()? negativeFee, + TResult? Function()? feeOverflow, + TResult? Function(String errorMessage)? invalidPublicKey, + TResult? Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult? Function()? invalidXOnlyPublicKey, + TResult? Function(String errorMessage)? invalidEcdsaSignature, + TResult? Function(String errorMessage)? invalidTaprootSignature, + TResult? Function()? invalidControlBlock, + TResult? Function()? invalidLeafVersion, + TResult? Function()? taproot, + TResult? Function(String errorMessage)? tapTree, + TResult? Function()? xPubKey, + TResult? Function(String errorMessage)? version, + TResult? Function()? partialDataConsumption, + TResult? Function(String errorMessage)? io, + TResult? Function()? otherPsbtErr, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidMagic, + TResult Function()? missingUtxo, + TResult Function()? invalidSeparator, + TResult Function()? psbtUtxoOutOfBounds, + TResult Function(String key)? invalidKey, + TResult Function()? invalidProprietaryKey, + TResult Function(String key)? duplicateKey, + TResult Function()? unsignedTxHasScriptSigs, + TResult Function()? unsignedTxHasScriptWitnesses, + TResult Function()? mustHaveUnsignedTx, + TResult Function()? noMorePairs, + TResult Function()? unexpectedUnsignedTx, + TResult Function(int sighash)? nonStandardSighashType, + TResult Function(String hash)? invalidHash, + TResult Function()? invalidPreimageHashPair, + TResult Function(String xpub)? combineInconsistentKeySources, + TResult Function(String encodingError)? consensusEncoding, + TResult Function()? negativeFee, + TResult Function()? feeOverflow, + TResult Function(String errorMessage)? invalidPublicKey, + TResult Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult Function()? invalidXOnlyPublicKey, + TResult Function(String errorMessage)? invalidEcdsaSignature, + TResult Function(String errorMessage)? invalidTaprootSignature, + TResult Function()? invalidControlBlock, + TResult Function()? invalidLeafVersion, + TResult Function()? taproot, + TResult Function(String errorMessage)? tapTree, + TResult Function()? xPubKey, + TResult Function(String errorMessage)? version, + TResult Function()? partialDataConsumption, + TResult Function(String errorMessage)? io, + TResult Function()? otherPsbtErr, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(PsbtError_InvalidMagic value) invalidMagic, + required TResult Function(PsbtError_MissingUtxo value) missingUtxo, + required TResult Function(PsbtError_InvalidSeparator value) + invalidSeparator, + required TResult Function(PsbtError_PsbtUtxoOutOfBounds value) + psbtUtxoOutOfBounds, + required TResult Function(PsbtError_InvalidKey value) invalidKey, + required TResult Function(PsbtError_InvalidProprietaryKey value) + invalidProprietaryKey, + required TResult Function(PsbtError_DuplicateKey value) duplicateKey, + required TResult Function(PsbtError_UnsignedTxHasScriptSigs value) + unsignedTxHasScriptSigs, + required TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value) + unsignedTxHasScriptWitnesses, + required TResult Function(PsbtError_MustHaveUnsignedTx value) + mustHaveUnsignedTx, + required TResult Function(PsbtError_NoMorePairs value) noMorePairs, + required TResult Function(PsbtError_UnexpectedUnsignedTx value) + unexpectedUnsignedTx, + required TResult Function(PsbtError_NonStandardSighashType value) + nonStandardSighashType, + required TResult Function(PsbtError_InvalidHash value) invalidHash, + required TResult Function(PsbtError_InvalidPreimageHashPair value) + invalidPreimageHashPair, + required TResult Function(PsbtError_CombineInconsistentKeySources value) + combineInconsistentKeySources, + required TResult Function(PsbtError_ConsensusEncoding value) + consensusEncoding, + required TResult Function(PsbtError_NegativeFee value) negativeFee, + required TResult Function(PsbtError_FeeOverflow value) feeOverflow, + required TResult Function(PsbtError_InvalidPublicKey value) + invalidPublicKey, + required TResult Function(PsbtError_InvalidSecp256k1PublicKey value) + invalidSecp256K1PublicKey, + required TResult Function(PsbtError_InvalidXOnlyPublicKey value) + invalidXOnlyPublicKey, + required TResult Function(PsbtError_InvalidEcdsaSignature value) + invalidEcdsaSignature, + required TResult Function(PsbtError_InvalidTaprootSignature value) + invalidTaprootSignature, + required TResult Function(PsbtError_InvalidControlBlock value) + invalidControlBlock, + required TResult Function(PsbtError_InvalidLeafVersion value) + invalidLeafVersion, + required TResult Function(PsbtError_Taproot value) taproot, + required TResult Function(PsbtError_TapTree value) tapTree, + required TResult Function(PsbtError_XPubKey value) xPubKey, + required TResult Function(PsbtError_Version value) version, + required TResult Function(PsbtError_PartialDataConsumption value) + partialDataConsumption, + required TResult Function(PsbtError_Io value) io, + required TResult Function(PsbtError_OtherPsbtErr value) otherPsbtErr, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult? Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult? Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult? Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult? Function(PsbtError_InvalidKey value)? invalidKey, + TResult? Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult? Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult? Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult? Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult? Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult? Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult? Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult? Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult? Function(PsbtError_InvalidHash value)? invalidHash, + TResult? Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult? Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult? Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult? Function(PsbtError_NegativeFee value)? negativeFee, + TResult? Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult? Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult? Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult? Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult? Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult? Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult? Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult? Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult? Function(PsbtError_Taproot value)? taproot, + TResult? Function(PsbtError_TapTree value)? tapTree, + TResult? Function(PsbtError_XPubKey value)? xPubKey, + TResult? Function(PsbtError_Version value)? version, + TResult? Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult? Function(PsbtError_Io value)? io, + TResult? Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult Function(PsbtError_InvalidKey value)? invalidKey, + TResult Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult Function(PsbtError_InvalidHash value)? invalidHash, + TResult Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult Function(PsbtError_NegativeFee value)? negativeFee, + TResult Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult Function(PsbtError_Taproot value)? taproot, + TResult Function(PsbtError_TapTree value)? tapTree, + TResult Function(PsbtError_XPubKey value)? xPubKey, + TResult Function(PsbtError_Version value)? version, + TResult Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult Function(PsbtError_Io value)? io, + TResult Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $PsbtErrorCopyWith<$Res> { + factory $PsbtErrorCopyWith(PsbtError value, $Res Function(PsbtError) then) = + _$PsbtErrorCopyWithImpl<$Res, PsbtError>; +} + +/// @nodoc +class _$PsbtErrorCopyWithImpl<$Res, $Val extends PsbtError> + implements $PsbtErrorCopyWith<$Res> { + _$PsbtErrorCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; +} + +/// @nodoc +abstract class _$$PsbtError_InvalidMagicImplCopyWith<$Res> { + factory _$$PsbtError_InvalidMagicImplCopyWith( + _$PsbtError_InvalidMagicImpl value, + $Res Function(_$PsbtError_InvalidMagicImpl) then) = + __$$PsbtError_InvalidMagicImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$PsbtError_InvalidMagicImplCopyWithImpl<$Res> + extends _$PsbtErrorCopyWithImpl<$Res, _$PsbtError_InvalidMagicImpl> + implements _$$PsbtError_InvalidMagicImplCopyWith<$Res> { + __$$PsbtError_InvalidMagicImplCopyWithImpl( + _$PsbtError_InvalidMagicImpl _value, + $Res Function(_$PsbtError_InvalidMagicImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$PsbtError_InvalidMagicImpl extends PsbtError_InvalidMagic { + const _$PsbtError_InvalidMagicImpl() : super._(); + + @override + String toString() { + return 'PsbtError.invalidMagic()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PsbtError_InvalidMagicImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidMagic, + required TResult Function() missingUtxo, + required TResult Function() invalidSeparator, + required TResult Function() psbtUtxoOutOfBounds, + required TResult Function(String key) invalidKey, + required TResult Function() invalidProprietaryKey, + required TResult Function(String key) duplicateKey, + required TResult Function() unsignedTxHasScriptSigs, + required TResult Function() unsignedTxHasScriptWitnesses, + required TResult Function() mustHaveUnsignedTx, + required TResult Function() noMorePairs, + required TResult Function() unexpectedUnsignedTx, + required TResult Function(int sighash) nonStandardSighashType, + required TResult Function(String hash) invalidHash, + required TResult Function() invalidPreimageHashPair, + required TResult Function(String xpub) combineInconsistentKeySources, + required TResult Function(String encodingError) consensusEncoding, + required TResult Function() negativeFee, + required TResult Function() feeOverflow, + required TResult Function(String errorMessage) invalidPublicKey, + required TResult Function(String secp256K1Error) invalidSecp256K1PublicKey, + required TResult Function() invalidXOnlyPublicKey, + required TResult Function(String errorMessage) invalidEcdsaSignature, + required TResult Function(String errorMessage) invalidTaprootSignature, + required TResult Function() invalidControlBlock, + required TResult Function() invalidLeafVersion, + required TResult Function() taproot, + required TResult Function(String errorMessage) tapTree, + required TResult Function() xPubKey, + required TResult Function(String errorMessage) version, + required TResult Function() partialDataConsumption, + required TResult Function(String errorMessage) io, + required TResult Function() otherPsbtErr, + }) { + return invalidMagic(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidMagic, + TResult? Function()? missingUtxo, + TResult? Function()? invalidSeparator, + TResult? Function()? psbtUtxoOutOfBounds, + TResult? Function(String key)? invalidKey, + TResult? Function()? invalidProprietaryKey, + TResult? Function(String key)? duplicateKey, + TResult? Function()? unsignedTxHasScriptSigs, + TResult? Function()? unsignedTxHasScriptWitnesses, + TResult? Function()? mustHaveUnsignedTx, + TResult? Function()? noMorePairs, + TResult? Function()? unexpectedUnsignedTx, + TResult? Function(int sighash)? nonStandardSighashType, + TResult? Function(String hash)? invalidHash, + TResult? Function()? invalidPreimageHashPair, + TResult? Function(String xpub)? combineInconsistentKeySources, + TResult? Function(String encodingError)? consensusEncoding, + TResult? Function()? negativeFee, + TResult? Function()? feeOverflow, + TResult? Function(String errorMessage)? invalidPublicKey, + TResult? Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult? Function()? invalidXOnlyPublicKey, + TResult? Function(String errorMessage)? invalidEcdsaSignature, + TResult? Function(String errorMessage)? invalidTaprootSignature, + TResult? Function()? invalidControlBlock, + TResult? Function()? invalidLeafVersion, + TResult? Function()? taproot, + TResult? Function(String errorMessage)? tapTree, + TResult? Function()? xPubKey, + TResult? Function(String errorMessage)? version, + TResult? Function()? partialDataConsumption, + TResult? Function(String errorMessage)? io, + TResult? Function()? otherPsbtErr, + }) { + return invalidMagic?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidMagic, + TResult Function()? missingUtxo, + TResult Function()? invalidSeparator, + TResult Function()? psbtUtxoOutOfBounds, + TResult Function(String key)? invalidKey, + TResult Function()? invalidProprietaryKey, + TResult Function(String key)? duplicateKey, + TResult Function()? unsignedTxHasScriptSigs, + TResult Function()? unsignedTxHasScriptWitnesses, + TResult Function()? mustHaveUnsignedTx, + TResult Function()? noMorePairs, + TResult Function()? unexpectedUnsignedTx, + TResult Function(int sighash)? nonStandardSighashType, + TResult Function(String hash)? invalidHash, + TResult Function()? invalidPreimageHashPair, + TResult Function(String xpub)? combineInconsistentKeySources, + TResult Function(String encodingError)? consensusEncoding, + TResult Function()? negativeFee, + TResult Function()? feeOverflow, + TResult Function(String errorMessage)? invalidPublicKey, + TResult Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult Function()? invalidXOnlyPublicKey, + TResult Function(String errorMessage)? invalidEcdsaSignature, + TResult Function(String errorMessage)? invalidTaprootSignature, + TResult Function()? invalidControlBlock, + TResult Function()? invalidLeafVersion, + TResult Function()? taproot, + TResult Function(String errorMessage)? tapTree, + TResult Function()? xPubKey, + TResult Function(String errorMessage)? version, + TResult Function()? partialDataConsumption, + TResult Function(String errorMessage)? io, + TResult Function()? otherPsbtErr, + required TResult orElse(), + }) { + if (invalidMagic != null) { + return invalidMagic(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(PsbtError_InvalidMagic value) invalidMagic, + required TResult Function(PsbtError_MissingUtxo value) missingUtxo, + required TResult Function(PsbtError_InvalidSeparator value) + invalidSeparator, + required TResult Function(PsbtError_PsbtUtxoOutOfBounds value) + psbtUtxoOutOfBounds, + required TResult Function(PsbtError_InvalidKey value) invalidKey, + required TResult Function(PsbtError_InvalidProprietaryKey value) + invalidProprietaryKey, + required TResult Function(PsbtError_DuplicateKey value) duplicateKey, + required TResult Function(PsbtError_UnsignedTxHasScriptSigs value) + unsignedTxHasScriptSigs, + required TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value) + unsignedTxHasScriptWitnesses, + required TResult Function(PsbtError_MustHaveUnsignedTx value) + mustHaveUnsignedTx, + required TResult Function(PsbtError_NoMorePairs value) noMorePairs, + required TResult Function(PsbtError_UnexpectedUnsignedTx value) + unexpectedUnsignedTx, + required TResult Function(PsbtError_NonStandardSighashType value) + nonStandardSighashType, + required TResult Function(PsbtError_InvalidHash value) invalidHash, + required TResult Function(PsbtError_InvalidPreimageHashPair value) + invalidPreimageHashPair, + required TResult Function(PsbtError_CombineInconsistentKeySources value) + combineInconsistentKeySources, + required TResult Function(PsbtError_ConsensusEncoding value) + consensusEncoding, + required TResult Function(PsbtError_NegativeFee value) negativeFee, + required TResult Function(PsbtError_FeeOverflow value) feeOverflow, + required TResult Function(PsbtError_InvalidPublicKey value) + invalidPublicKey, + required TResult Function(PsbtError_InvalidSecp256k1PublicKey value) + invalidSecp256K1PublicKey, + required TResult Function(PsbtError_InvalidXOnlyPublicKey value) + invalidXOnlyPublicKey, + required TResult Function(PsbtError_InvalidEcdsaSignature value) + invalidEcdsaSignature, + required TResult Function(PsbtError_InvalidTaprootSignature value) + invalidTaprootSignature, + required TResult Function(PsbtError_InvalidControlBlock value) + invalidControlBlock, + required TResult Function(PsbtError_InvalidLeafVersion value) + invalidLeafVersion, + required TResult Function(PsbtError_Taproot value) taproot, + required TResult Function(PsbtError_TapTree value) tapTree, + required TResult Function(PsbtError_XPubKey value) xPubKey, + required TResult Function(PsbtError_Version value) version, + required TResult Function(PsbtError_PartialDataConsumption value) + partialDataConsumption, + required TResult Function(PsbtError_Io value) io, + required TResult Function(PsbtError_OtherPsbtErr value) otherPsbtErr, + }) { + return invalidMagic(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult? Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult? Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult? Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult? Function(PsbtError_InvalidKey value)? invalidKey, + TResult? Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult? Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult? Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult? Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult? Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult? Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult? Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult? Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult? Function(PsbtError_InvalidHash value)? invalidHash, + TResult? Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult? Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult? Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult? Function(PsbtError_NegativeFee value)? negativeFee, + TResult? Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult? Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult? Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult? Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult? Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult? Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult? Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult? Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult? Function(PsbtError_Taproot value)? taproot, + TResult? Function(PsbtError_TapTree value)? tapTree, + TResult? Function(PsbtError_XPubKey value)? xPubKey, + TResult? Function(PsbtError_Version value)? version, + TResult? Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult? Function(PsbtError_Io value)? io, + TResult? Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + }) { + return invalidMagic?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult Function(PsbtError_InvalidKey value)? invalidKey, + TResult Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult Function(PsbtError_InvalidHash value)? invalidHash, + TResult Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult Function(PsbtError_NegativeFee value)? negativeFee, + TResult Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult Function(PsbtError_Taproot value)? taproot, + TResult Function(PsbtError_TapTree value)? tapTree, + TResult Function(PsbtError_XPubKey value)? xPubKey, + TResult Function(PsbtError_Version value)? version, + TResult Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult Function(PsbtError_Io value)? io, + TResult Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + required TResult orElse(), + }) { + if (invalidMagic != null) { + return invalidMagic(this); + } + return orElse(); + } +} + +abstract class PsbtError_InvalidMagic extends PsbtError { + const factory PsbtError_InvalidMagic() = _$PsbtError_InvalidMagicImpl; + const PsbtError_InvalidMagic._() : super._(); +} + +/// @nodoc +abstract class _$$PsbtError_MissingUtxoImplCopyWith<$Res> { + factory _$$PsbtError_MissingUtxoImplCopyWith( + _$PsbtError_MissingUtxoImpl value, + $Res Function(_$PsbtError_MissingUtxoImpl) then) = + __$$PsbtError_MissingUtxoImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$PsbtError_MissingUtxoImplCopyWithImpl<$Res> + extends _$PsbtErrorCopyWithImpl<$Res, _$PsbtError_MissingUtxoImpl> + implements _$$PsbtError_MissingUtxoImplCopyWith<$Res> { + __$$PsbtError_MissingUtxoImplCopyWithImpl(_$PsbtError_MissingUtxoImpl _value, + $Res Function(_$PsbtError_MissingUtxoImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$PsbtError_MissingUtxoImpl extends PsbtError_MissingUtxo { + const _$PsbtError_MissingUtxoImpl() : super._(); + + @override + String toString() { + return 'PsbtError.missingUtxo()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PsbtError_MissingUtxoImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidMagic, + required TResult Function() missingUtxo, + required TResult Function() invalidSeparator, + required TResult Function() psbtUtxoOutOfBounds, + required TResult Function(String key) invalidKey, + required TResult Function() invalidProprietaryKey, + required TResult Function(String key) duplicateKey, + required TResult Function() unsignedTxHasScriptSigs, + required TResult Function() unsignedTxHasScriptWitnesses, + required TResult Function() mustHaveUnsignedTx, + required TResult Function() noMorePairs, + required TResult Function() unexpectedUnsignedTx, + required TResult Function(int sighash) nonStandardSighashType, + required TResult Function(String hash) invalidHash, + required TResult Function() invalidPreimageHashPair, + required TResult Function(String xpub) combineInconsistentKeySources, + required TResult Function(String encodingError) consensusEncoding, + required TResult Function() negativeFee, + required TResult Function() feeOverflow, + required TResult Function(String errorMessage) invalidPublicKey, + required TResult Function(String secp256K1Error) invalidSecp256K1PublicKey, + required TResult Function() invalidXOnlyPublicKey, + required TResult Function(String errorMessage) invalidEcdsaSignature, + required TResult Function(String errorMessage) invalidTaprootSignature, + required TResult Function() invalidControlBlock, + required TResult Function() invalidLeafVersion, + required TResult Function() taproot, + required TResult Function(String errorMessage) tapTree, + required TResult Function() xPubKey, + required TResult Function(String errorMessage) version, + required TResult Function() partialDataConsumption, + required TResult Function(String errorMessage) io, + required TResult Function() otherPsbtErr, + }) { + return missingUtxo(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidMagic, + TResult? Function()? missingUtxo, + TResult? Function()? invalidSeparator, + TResult? Function()? psbtUtxoOutOfBounds, + TResult? Function(String key)? invalidKey, + TResult? Function()? invalidProprietaryKey, + TResult? Function(String key)? duplicateKey, + TResult? Function()? unsignedTxHasScriptSigs, + TResult? Function()? unsignedTxHasScriptWitnesses, + TResult? Function()? mustHaveUnsignedTx, + TResult? Function()? noMorePairs, + TResult? Function()? unexpectedUnsignedTx, + TResult? Function(int sighash)? nonStandardSighashType, + TResult? Function(String hash)? invalidHash, + TResult? Function()? invalidPreimageHashPair, + TResult? Function(String xpub)? combineInconsistentKeySources, + TResult? Function(String encodingError)? consensusEncoding, + TResult? Function()? negativeFee, + TResult? Function()? feeOverflow, + TResult? Function(String errorMessage)? invalidPublicKey, + TResult? Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult? Function()? invalidXOnlyPublicKey, + TResult? Function(String errorMessage)? invalidEcdsaSignature, + TResult? Function(String errorMessage)? invalidTaprootSignature, + TResult? Function()? invalidControlBlock, + TResult? Function()? invalidLeafVersion, + TResult? Function()? taproot, + TResult? Function(String errorMessage)? tapTree, + TResult? Function()? xPubKey, + TResult? Function(String errorMessage)? version, + TResult? Function()? partialDataConsumption, + TResult? Function(String errorMessage)? io, + TResult? Function()? otherPsbtErr, + }) { + return missingUtxo?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidMagic, + TResult Function()? missingUtxo, + TResult Function()? invalidSeparator, + TResult Function()? psbtUtxoOutOfBounds, + TResult Function(String key)? invalidKey, + TResult Function()? invalidProprietaryKey, + TResult Function(String key)? duplicateKey, + TResult Function()? unsignedTxHasScriptSigs, + TResult Function()? unsignedTxHasScriptWitnesses, + TResult Function()? mustHaveUnsignedTx, + TResult Function()? noMorePairs, + TResult Function()? unexpectedUnsignedTx, + TResult Function(int sighash)? nonStandardSighashType, + TResult Function(String hash)? invalidHash, + TResult Function()? invalidPreimageHashPair, + TResult Function(String xpub)? combineInconsistentKeySources, + TResult Function(String encodingError)? consensusEncoding, + TResult Function()? negativeFee, + TResult Function()? feeOverflow, + TResult Function(String errorMessage)? invalidPublicKey, + TResult Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult Function()? invalidXOnlyPublicKey, + TResult Function(String errorMessage)? invalidEcdsaSignature, + TResult Function(String errorMessage)? invalidTaprootSignature, + TResult Function()? invalidControlBlock, + TResult Function()? invalidLeafVersion, + TResult Function()? taproot, + TResult Function(String errorMessage)? tapTree, + TResult Function()? xPubKey, + TResult Function(String errorMessage)? version, + TResult Function()? partialDataConsumption, + TResult Function(String errorMessage)? io, + TResult Function()? otherPsbtErr, + required TResult orElse(), + }) { + if (missingUtxo != null) { + return missingUtxo(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(PsbtError_InvalidMagic value) invalidMagic, + required TResult Function(PsbtError_MissingUtxo value) missingUtxo, + required TResult Function(PsbtError_InvalidSeparator value) + invalidSeparator, + required TResult Function(PsbtError_PsbtUtxoOutOfBounds value) + psbtUtxoOutOfBounds, + required TResult Function(PsbtError_InvalidKey value) invalidKey, + required TResult Function(PsbtError_InvalidProprietaryKey value) + invalidProprietaryKey, + required TResult Function(PsbtError_DuplicateKey value) duplicateKey, + required TResult Function(PsbtError_UnsignedTxHasScriptSigs value) + unsignedTxHasScriptSigs, + required TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value) + unsignedTxHasScriptWitnesses, + required TResult Function(PsbtError_MustHaveUnsignedTx value) + mustHaveUnsignedTx, + required TResult Function(PsbtError_NoMorePairs value) noMorePairs, + required TResult Function(PsbtError_UnexpectedUnsignedTx value) + unexpectedUnsignedTx, + required TResult Function(PsbtError_NonStandardSighashType value) + nonStandardSighashType, + required TResult Function(PsbtError_InvalidHash value) invalidHash, + required TResult Function(PsbtError_InvalidPreimageHashPair value) + invalidPreimageHashPair, + required TResult Function(PsbtError_CombineInconsistentKeySources value) + combineInconsistentKeySources, + required TResult Function(PsbtError_ConsensusEncoding value) + consensusEncoding, + required TResult Function(PsbtError_NegativeFee value) negativeFee, + required TResult Function(PsbtError_FeeOverflow value) feeOverflow, + required TResult Function(PsbtError_InvalidPublicKey value) + invalidPublicKey, + required TResult Function(PsbtError_InvalidSecp256k1PublicKey value) + invalidSecp256K1PublicKey, + required TResult Function(PsbtError_InvalidXOnlyPublicKey value) + invalidXOnlyPublicKey, + required TResult Function(PsbtError_InvalidEcdsaSignature value) + invalidEcdsaSignature, + required TResult Function(PsbtError_InvalidTaprootSignature value) + invalidTaprootSignature, + required TResult Function(PsbtError_InvalidControlBlock value) + invalidControlBlock, + required TResult Function(PsbtError_InvalidLeafVersion value) + invalidLeafVersion, + required TResult Function(PsbtError_Taproot value) taproot, + required TResult Function(PsbtError_TapTree value) tapTree, + required TResult Function(PsbtError_XPubKey value) xPubKey, + required TResult Function(PsbtError_Version value) version, + required TResult Function(PsbtError_PartialDataConsumption value) + partialDataConsumption, + required TResult Function(PsbtError_Io value) io, + required TResult Function(PsbtError_OtherPsbtErr value) otherPsbtErr, + }) { + return missingUtxo(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult? Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult? Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult? Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult? Function(PsbtError_InvalidKey value)? invalidKey, + TResult? Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult? Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult? Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult? Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult? Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult? Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult? Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult? Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult? Function(PsbtError_InvalidHash value)? invalidHash, + TResult? Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult? Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult? Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult? Function(PsbtError_NegativeFee value)? negativeFee, + TResult? Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult? Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult? Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult? Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult? Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult? Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult? Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult? Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult? Function(PsbtError_Taproot value)? taproot, + TResult? Function(PsbtError_TapTree value)? tapTree, + TResult? Function(PsbtError_XPubKey value)? xPubKey, + TResult? Function(PsbtError_Version value)? version, + TResult? Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult? Function(PsbtError_Io value)? io, + TResult? Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + }) { + return missingUtxo?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult Function(PsbtError_InvalidKey value)? invalidKey, + TResult Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult Function(PsbtError_InvalidHash value)? invalidHash, + TResult Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult Function(PsbtError_NegativeFee value)? negativeFee, + TResult Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult Function(PsbtError_Taproot value)? taproot, + TResult Function(PsbtError_TapTree value)? tapTree, + TResult Function(PsbtError_XPubKey value)? xPubKey, + TResult Function(PsbtError_Version value)? version, + TResult Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult Function(PsbtError_Io value)? io, + TResult Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + required TResult orElse(), + }) { + if (missingUtxo != null) { + return missingUtxo(this); + } + return orElse(); + } +} + +abstract class PsbtError_MissingUtxo extends PsbtError { + const factory PsbtError_MissingUtxo() = _$PsbtError_MissingUtxoImpl; + const PsbtError_MissingUtxo._() : super._(); +} + +/// @nodoc +abstract class _$$PsbtError_InvalidSeparatorImplCopyWith<$Res> { + factory _$$PsbtError_InvalidSeparatorImplCopyWith( + _$PsbtError_InvalidSeparatorImpl value, + $Res Function(_$PsbtError_InvalidSeparatorImpl) then) = + __$$PsbtError_InvalidSeparatorImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$PsbtError_InvalidSeparatorImplCopyWithImpl<$Res> + extends _$PsbtErrorCopyWithImpl<$Res, _$PsbtError_InvalidSeparatorImpl> + implements _$$PsbtError_InvalidSeparatorImplCopyWith<$Res> { + __$$PsbtError_InvalidSeparatorImplCopyWithImpl( + _$PsbtError_InvalidSeparatorImpl _value, + $Res Function(_$PsbtError_InvalidSeparatorImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$PsbtError_InvalidSeparatorImpl extends PsbtError_InvalidSeparator { + const _$PsbtError_InvalidSeparatorImpl() : super._(); + + @override + String toString() { + return 'PsbtError.invalidSeparator()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PsbtError_InvalidSeparatorImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidMagic, + required TResult Function() missingUtxo, + required TResult Function() invalidSeparator, + required TResult Function() psbtUtxoOutOfBounds, + required TResult Function(String key) invalidKey, + required TResult Function() invalidProprietaryKey, + required TResult Function(String key) duplicateKey, + required TResult Function() unsignedTxHasScriptSigs, + required TResult Function() unsignedTxHasScriptWitnesses, + required TResult Function() mustHaveUnsignedTx, + required TResult Function() noMorePairs, + required TResult Function() unexpectedUnsignedTx, + required TResult Function(int sighash) nonStandardSighashType, + required TResult Function(String hash) invalidHash, + required TResult Function() invalidPreimageHashPair, + required TResult Function(String xpub) combineInconsistentKeySources, + required TResult Function(String encodingError) consensusEncoding, + required TResult Function() negativeFee, + required TResult Function() feeOverflow, + required TResult Function(String errorMessage) invalidPublicKey, + required TResult Function(String secp256K1Error) invalidSecp256K1PublicKey, + required TResult Function() invalidXOnlyPublicKey, + required TResult Function(String errorMessage) invalidEcdsaSignature, + required TResult Function(String errorMessage) invalidTaprootSignature, + required TResult Function() invalidControlBlock, + required TResult Function() invalidLeafVersion, + required TResult Function() taproot, + required TResult Function(String errorMessage) tapTree, + required TResult Function() xPubKey, + required TResult Function(String errorMessage) version, + required TResult Function() partialDataConsumption, + required TResult Function(String errorMessage) io, + required TResult Function() otherPsbtErr, + }) { + return invalidSeparator(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidMagic, + TResult? Function()? missingUtxo, + TResult? Function()? invalidSeparator, + TResult? Function()? psbtUtxoOutOfBounds, + TResult? Function(String key)? invalidKey, + TResult? Function()? invalidProprietaryKey, + TResult? Function(String key)? duplicateKey, + TResult? Function()? unsignedTxHasScriptSigs, + TResult? Function()? unsignedTxHasScriptWitnesses, + TResult? Function()? mustHaveUnsignedTx, + TResult? Function()? noMorePairs, + TResult? Function()? unexpectedUnsignedTx, + TResult? Function(int sighash)? nonStandardSighashType, + TResult? Function(String hash)? invalidHash, + TResult? Function()? invalidPreimageHashPair, + TResult? Function(String xpub)? combineInconsistentKeySources, + TResult? Function(String encodingError)? consensusEncoding, + TResult? Function()? negativeFee, + TResult? Function()? feeOverflow, + TResult? Function(String errorMessage)? invalidPublicKey, + TResult? Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult? Function()? invalidXOnlyPublicKey, + TResult? Function(String errorMessage)? invalidEcdsaSignature, + TResult? Function(String errorMessage)? invalidTaprootSignature, + TResult? Function()? invalidControlBlock, + TResult? Function()? invalidLeafVersion, + TResult? Function()? taproot, + TResult? Function(String errorMessage)? tapTree, + TResult? Function()? xPubKey, + TResult? Function(String errorMessage)? version, + TResult? Function()? partialDataConsumption, + TResult? Function(String errorMessage)? io, + TResult? Function()? otherPsbtErr, + }) { + return invalidSeparator?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidMagic, + TResult Function()? missingUtxo, + TResult Function()? invalidSeparator, + TResult Function()? psbtUtxoOutOfBounds, + TResult Function(String key)? invalidKey, + TResult Function()? invalidProprietaryKey, + TResult Function(String key)? duplicateKey, + TResult Function()? unsignedTxHasScriptSigs, + TResult Function()? unsignedTxHasScriptWitnesses, + TResult Function()? mustHaveUnsignedTx, + TResult Function()? noMorePairs, + TResult Function()? unexpectedUnsignedTx, + TResult Function(int sighash)? nonStandardSighashType, + TResult Function(String hash)? invalidHash, + TResult Function()? invalidPreimageHashPair, + TResult Function(String xpub)? combineInconsistentKeySources, + TResult Function(String encodingError)? consensusEncoding, + TResult Function()? negativeFee, + TResult Function()? feeOverflow, + TResult Function(String errorMessage)? invalidPublicKey, + TResult Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult Function()? invalidXOnlyPublicKey, + TResult Function(String errorMessage)? invalidEcdsaSignature, + TResult Function(String errorMessage)? invalidTaprootSignature, + TResult Function()? invalidControlBlock, + TResult Function()? invalidLeafVersion, + TResult Function()? taproot, + TResult Function(String errorMessage)? tapTree, + TResult Function()? xPubKey, + TResult Function(String errorMessage)? version, + TResult Function()? partialDataConsumption, + TResult Function(String errorMessage)? io, + TResult Function()? otherPsbtErr, + required TResult orElse(), + }) { + if (invalidSeparator != null) { + return invalidSeparator(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(PsbtError_InvalidMagic value) invalidMagic, + required TResult Function(PsbtError_MissingUtxo value) missingUtxo, + required TResult Function(PsbtError_InvalidSeparator value) + invalidSeparator, + required TResult Function(PsbtError_PsbtUtxoOutOfBounds value) + psbtUtxoOutOfBounds, + required TResult Function(PsbtError_InvalidKey value) invalidKey, + required TResult Function(PsbtError_InvalidProprietaryKey value) + invalidProprietaryKey, + required TResult Function(PsbtError_DuplicateKey value) duplicateKey, + required TResult Function(PsbtError_UnsignedTxHasScriptSigs value) + unsignedTxHasScriptSigs, + required TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value) + unsignedTxHasScriptWitnesses, + required TResult Function(PsbtError_MustHaveUnsignedTx value) + mustHaveUnsignedTx, + required TResult Function(PsbtError_NoMorePairs value) noMorePairs, + required TResult Function(PsbtError_UnexpectedUnsignedTx value) + unexpectedUnsignedTx, + required TResult Function(PsbtError_NonStandardSighashType value) + nonStandardSighashType, + required TResult Function(PsbtError_InvalidHash value) invalidHash, + required TResult Function(PsbtError_InvalidPreimageHashPair value) + invalidPreimageHashPair, + required TResult Function(PsbtError_CombineInconsistentKeySources value) + combineInconsistentKeySources, + required TResult Function(PsbtError_ConsensusEncoding value) + consensusEncoding, + required TResult Function(PsbtError_NegativeFee value) negativeFee, + required TResult Function(PsbtError_FeeOverflow value) feeOverflow, + required TResult Function(PsbtError_InvalidPublicKey value) + invalidPublicKey, + required TResult Function(PsbtError_InvalidSecp256k1PublicKey value) + invalidSecp256K1PublicKey, + required TResult Function(PsbtError_InvalidXOnlyPublicKey value) + invalidXOnlyPublicKey, + required TResult Function(PsbtError_InvalidEcdsaSignature value) + invalidEcdsaSignature, + required TResult Function(PsbtError_InvalidTaprootSignature value) + invalidTaprootSignature, + required TResult Function(PsbtError_InvalidControlBlock value) + invalidControlBlock, + required TResult Function(PsbtError_InvalidLeafVersion value) + invalidLeafVersion, + required TResult Function(PsbtError_Taproot value) taproot, + required TResult Function(PsbtError_TapTree value) tapTree, + required TResult Function(PsbtError_XPubKey value) xPubKey, + required TResult Function(PsbtError_Version value) version, + required TResult Function(PsbtError_PartialDataConsumption value) + partialDataConsumption, + required TResult Function(PsbtError_Io value) io, + required TResult Function(PsbtError_OtherPsbtErr value) otherPsbtErr, + }) { + return invalidSeparator(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult? Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult? Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult? Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult? Function(PsbtError_InvalidKey value)? invalidKey, + TResult? Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult? Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult? Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult? Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult? Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult? Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult? Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult? Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult? Function(PsbtError_InvalidHash value)? invalidHash, + TResult? Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult? Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult? Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult? Function(PsbtError_NegativeFee value)? negativeFee, + TResult? Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult? Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult? Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult? Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult? Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult? Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult? Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult? Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult? Function(PsbtError_Taproot value)? taproot, + TResult? Function(PsbtError_TapTree value)? tapTree, + TResult? Function(PsbtError_XPubKey value)? xPubKey, + TResult? Function(PsbtError_Version value)? version, + TResult? Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult? Function(PsbtError_Io value)? io, + TResult? Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + }) { + return invalidSeparator?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult Function(PsbtError_InvalidKey value)? invalidKey, + TResult Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult Function(PsbtError_InvalidHash value)? invalidHash, + TResult Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult Function(PsbtError_NegativeFee value)? negativeFee, + TResult Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult Function(PsbtError_Taproot value)? taproot, + TResult Function(PsbtError_TapTree value)? tapTree, + TResult Function(PsbtError_XPubKey value)? xPubKey, + TResult Function(PsbtError_Version value)? version, + TResult Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult Function(PsbtError_Io value)? io, + TResult Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + required TResult orElse(), + }) { + if (invalidSeparator != null) { + return invalidSeparator(this); + } + return orElse(); + } +} + +abstract class PsbtError_InvalidSeparator extends PsbtError { + const factory PsbtError_InvalidSeparator() = _$PsbtError_InvalidSeparatorImpl; + const PsbtError_InvalidSeparator._() : super._(); +} + +/// @nodoc +abstract class _$$PsbtError_PsbtUtxoOutOfBoundsImplCopyWith<$Res> { + factory _$$PsbtError_PsbtUtxoOutOfBoundsImplCopyWith( + _$PsbtError_PsbtUtxoOutOfBoundsImpl value, + $Res Function(_$PsbtError_PsbtUtxoOutOfBoundsImpl) then) = + __$$PsbtError_PsbtUtxoOutOfBoundsImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$PsbtError_PsbtUtxoOutOfBoundsImplCopyWithImpl<$Res> + extends _$PsbtErrorCopyWithImpl<$Res, _$PsbtError_PsbtUtxoOutOfBoundsImpl> + implements _$$PsbtError_PsbtUtxoOutOfBoundsImplCopyWith<$Res> { + __$$PsbtError_PsbtUtxoOutOfBoundsImplCopyWithImpl( + _$PsbtError_PsbtUtxoOutOfBoundsImpl _value, + $Res Function(_$PsbtError_PsbtUtxoOutOfBoundsImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$PsbtError_PsbtUtxoOutOfBoundsImpl + extends PsbtError_PsbtUtxoOutOfBounds { + const _$PsbtError_PsbtUtxoOutOfBoundsImpl() : super._(); + + @override + String toString() { + return 'PsbtError.psbtUtxoOutOfBounds()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PsbtError_PsbtUtxoOutOfBoundsImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidMagic, + required TResult Function() missingUtxo, + required TResult Function() invalidSeparator, + required TResult Function() psbtUtxoOutOfBounds, + required TResult Function(String key) invalidKey, + required TResult Function() invalidProprietaryKey, + required TResult Function(String key) duplicateKey, + required TResult Function() unsignedTxHasScriptSigs, + required TResult Function() unsignedTxHasScriptWitnesses, + required TResult Function() mustHaveUnsignedTx, + required TResult Function() noMorePairs, + required TResult Function() unexpectedUnsignedTx, + required TResult Function(int sighash) nonStandardSighashType, + required TResult Function(String hash) invalidHash, + required TResult Function() invalidPreimageHashPair, + required TResult Function(String xpub) combineInconsistentKeySources, + required TResult Function(String encodingError) consensusEncoding, + required TResult Function() negativeFee, + required TResult Function() feeOverflow, + required TResult Function(String errorMessage) invalidPublicKey, + required TResult Function(String secp256K1Error) invalidSecp256K1PublicKey, + required TResult Function() invalidXOnlyPublicKey, + required TResult Function(String errorMessage) invalidEcdsaSignature, + required TResult Function(String errorMessage) invalidTaprootSignature, + required TResult Function() invalidControlBlock, + required TResult Function() invalidLeafVersion, + required TResult Function() taproot, + required TResult Function(String errorMessage) tapTree, + required TResult Function() xPubKey, + required TResult Function(String errorMessage) version, + required TResult Function() partialDataConsumption, + required TResult Function(String errorMessage) io, + required TResult Function() otherPsbtErr, + }) { + return psbtUtxoOutOfBounds(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidMagic, + TResult? Function()? missingUtxo, + TResult? Function()? invalidSeparator, + TResult? Function()? psbtUtxoOutOfBounds, + TResult? Function(String key)? invalidKey, + TResult? Function()? invalidProprietaryKey, + TResult? Function(String key)? duplicateKey, + TResult? Function()? unsignedTxHasScriptSigs, + TResult? Function()? unsignedTxHasScriptWitnesses, + TResult? Function()? mustHaveUnsignedTx, + TResult? Function()? noMorePairs, + TResult? Function()? unexpectedUnsignedTx, + TResult? Function(int sighash)? nonStandardSighashType, + TResult? Function(String hash)? invalidHash, + TResult? Function()? invalidPreimageHashPair, + TResult? Function(String xpub)? combineInconsistentKeySources, + TResult? Function(String encodingError)? consensusEncoding, + TResult? Function()? negativeFee, + TResult? Function()? feeOverflow, + TResult? Function(String errorMessage)? invalidPublicKey, + TResult? Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult? Function()? invalidXOnlyPublicKey, + TResult? Function(String errorMessage)? invalidEcdsaSignature, + TResult? Function(String errorMessage)? invalidTaprootSignature, + TResult? Function()? invalidControlBlock, + TResult? Function()? invalidLeafVersion, + TResult? Function()? taproot, + TResult? Function(String errorMessage)? tapTree, + TResult? Function()? xPubKey, + TResult? Function(String errorMessage)? version, + TResult? Function()? partialDataConsumption, + TResult? Function(String errorMessage)? io, + TResult? Function()? otherPsbtErr, + }) { + return psbtUtxoOutOfBounds?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidMagic, + TResult Function()? missingUtxo, + TResult Function()? invalidSeparator, + TResult Function()? psbtUtxoOutOfBounds, + TResult Function(String key)? invalidKey, + TResult Function()? invalidProprietaryKey, + TResult Function(String key)? duplicateKey, + TResult Function()? unsignedTxHasScriptSigs, + TResult Function()? unsignedTxHasScriptWitnesses, + TResult Function()? mustHaveUnsignedTx, + TResult Function()? noMorePairs, + TResult Function()? unexpectedUnsignedTx, + TResult Function(int sighash)? nonStandardSighashType, + TResult Function(String hash)? invalidHash, + TResult Function()? invalidPreimageHashPair, + TResult Function(String xpub)? combineInconsistentKeySources, + TResult Function(String encodingError)? consensusEncoding, + TResult Function()? negativeFee, + TResult Function()? feeOverflow, + TResult Function(String errorMessage)? invalidPublicKey, + TResult Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult Function()? invalidXOnlyPublicKey, + TResult Function(String errorMessage)? invalidEcdsaSignature, + TResult Function(String errorMessage)? invalidTaprootSignature, + TResult Function()? invalidControlBlock, + TResult Function()? invalidLeafVersion, + TResult Function()? taproot, + TResult Function(String errorMessage)? tapTree, + TResult Function()? xPubKey, + TResult Function(String errorMessage)? version, + TResult Function()? partialDataConsumption, + TResult Function(String errorMessage)? io, + TResult Function()? otherPsbtErr, + required TResult orElse(), + }) { + if (psbtUtxoOutOfBounds != null) { + return psbtUtxoOutOfBounds(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(PsbtError_InvalidMagic value) invalidMagic, + required TResult Function(PsbtError_MissingUtxo value) missingUtxo, + required TResult Function(PsbtError_InvalidSeparator value) + invalidSeparator, + required TResult Function(PsbtError_PsbtUtxoOutOfBounds value) + psbtUtxoOutOfBounds, + required TResult Function(PsbtError_InvalidKey value) invalidKey, + required TResult Function(PsbtError_InvalidProprietaryKey value) + invalidProprietaryKey, + required TResult Function(PsbtError_DuplicateKey value) duplicateKey, + required TResult Function(PsbtError_UnsignedTxHasScriptSigs value) + unsignedTxHasScriptSigs, + required TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value) + unsignedTxHasScriptWitnesses, + required TResult Function(PsbtError_MustHaveUnsignedTx value) + mustHaveUnsignedTx, + required TResult Function(PsbtError_NoMorePairs value) noMorePairs, + required TResult Function(PsbtError_UnexpectedUnsignedTx value) + unexpectedUnsignedTx, + required TResult Function(PsbtError_NonStandardSighashType value) + nonStandardSighashType, + required TResult Function(PsbtError_InvalidHash value) invalidHash, + required TResult Function(PsbtError_InvalidPreimageHashPair value) + invalidPreimageHashPair, + required TResult Function(PsbtError_CombineInconsistentKeySources value) + combineInconsistentKeySources, + required TResult Function(PsbtError_ConsensusEncoding value) + consensusEncoding, + required TResult Function(PsbtError_NegativeFee value) negativeFee, + required TResult Function(PsbtError_FeeOverflow value) feeOverflow, + required TResult Function(PsbtError_InvalidPublicKey value) + invalidPublicKey, + required TResult Function(PsbtError_InvalidSecp256k1PublicKey value) + invalidSecp256K1PublicKey, + required TResult Function(PsbtError_InvalidXOnlyPublicKey value) + invalidXOnlyPublicKey, + required TResult Function(PsbtError_InvalidEcdsaSignature value) + invalidEcdsaSignature, + required TResult Function(PsbtError_InvalidTaprootSignature value) + invalidTaprootSignature, + required TResult Function(PsbtError_InvalidControlBlock value) + invalidControlBlock, + required TResult Function(PsbtError_InvalidLeafVersion value) + invalidLeafVersion, + required TResult Function(PsbtError_Taproot value) taproot, + required TResult Function(PsbtError_TapTree value) tapTree, + required TResult Function(PsbtError_XPubKey value) xPubKey, + required TResult Function(PsbtError_Version value) version, + required TResult Function(PsbtError_PartialDataConsumption value) + partialDataConsumption, + required TResult Function(PsbtError_Io value) io, + required TResult Function(PsbtError_OtherPsbtErr value) otherPsbtErr, + }) { + return psbtUtxoOutOfBounds(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult? Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult? Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult? Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult? Function(PsbtError_InvalidKey value)? invalidKey, + TResult? Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult? Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult? Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult? Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult? Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult? Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult? Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult? Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult? Function(PsbtError_InvalidHash value)? invalidHash, + TResult? Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult? Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult? Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult? Function(PsbtError_NegativeFee value)? negativeFee, + TResult? Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult? Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult? Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult? Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult? Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult? Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult? Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult? Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult? Function(PsbtError_Taproot value)? taproot, + TResult? Function(PsbtError_TapTree value)? tapTree, + TResult? Function(PsbtError_XPubKey value)? xPubKey, + TResult? Function(PsbtError_Version value)? version, + TResult? Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult? Function(PsbtError_Io value)? io, + TResult? Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + }) { + return psbtUtxoOutOfBounds?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult Function(PsbtError_InvalidKey value)? invalidKey, + TResult Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult Function(PsbtError_InvalidHash value)? invalidHash, + TResult Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult Function(PsbtError_NegativeFee value)? negativeFee, + TResult Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult Function(PsbtError_Taproot value)? taproot, + TResult Function(PsbtError_TapTree value)? tapTree, + TResult Function(PsbtError_XPubKey value)? xPubKey, + TResult Function(PsbtError_Version value)? version, + TResult Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult Function(PsbtError_Io value)? io, + TResult Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + required TResult orElse(), + }) { + if (psbtUtxoOutOfBounds != null) { + return psbtUtxoOutOfBounds(this); + } + return orElse(); + } +} + +abstract class PsbtError_PsbtUtxoOutOfBounds extends PsbtError { + const factory PsbtError_PsbtUtxoOutOfBounds() = + _$PsbtError_PsbtUtxoOutOfBoundsImpl; + const PsbtError_PsbtUtxoOutOfBounds._() : super._(); +} + +/// @nodoc +abstract class _$$PsbtError_InvalidKeyImplCopyWith<$Res> { + factory _$$PsbtError_InvalidKeyImplCopyWith(_$PsbtError_InvalidKeyImpl value, + $Res Function(_$PsbtError_InvalidKeyImpl) then) = + __$$PsbtError_InvalidKeyImplCopyWithImpl<$Res>; + @useResult + $Res call({String key}); +} + +/// @nodoc +class __$$PsbtError_InvalidKeyImplCopyWithImpl<$Res> + extends _$PsbtErrorCopyWithImpl<$Res, _$PsbtError_InvalidKeyImpl> + implements _$$PsbtError_InvalidKeyImplCopyWith<$Res> { + __$$PsbtError_InvalidKeyImplCopyWithImpl(_$PsbtError_InvalidKeyImpl _value, + $Res Function(_$PsbtError_InvalidKeyImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? key = null, + }) { + return _then(_$PsbtError_InvalidKeyImpl( + key: null == key + ? _value.key + : key // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$PsbtError_InvalidKeyImpl extends PsbtError_InvalidKey { + const _$PsbtError_InvalidKeyImpl({required this.key}) : super._(); + + @override + final String key; + + @override + String toString() { + return 'PsbtError.invalidKey(key: $key)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PsbtError_InvalidKeyImpl && + (identical(other.key, key) || other.key == key)); + } + + @override + int get hashCode => Object.hash(runtimeType, key); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$PsbtError_InvalidKeyImplCopyWith<_$PsbtError_InvalidKeyImpl> + get copyWith => + __$$PsbtError_InvalidKeyImplCopyWithImpl<_$PsbtError_InvalidKeyImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidMagic, + required TResult Function() missingUtxo, + required TResult Function() invalidSeparator, + required TResult Function() psbtUtxoOutOfBounds, + required TResult Function(String key) invalidKey, + required TResult Function() invalidProprietaryKey, + required TResult Function(String key) duplicateKey, + required TResult Function() unsignedTxHasScriptSigs, + required TResult Function() unsignedTxHasScriptWitnesses, + required TResult Function() mustHaveUnsignedTx, + required TResult Function() noMorePairs, + required TResult Function() unexpectedUnsignedTx, + required TResult Function(int sighash) nonStandardSighashType, + required TResult Function(String hash) invalidHash, + required TResult Function() invalidPreimageHashPair, + required TResult Function(String xpub) combineInconsistentKeySources, + required TResult Function(String encodingError) consensusEncoding, + required TResult Function() negativeFee, + required TResult Function() feeOverflow, + required TResult Function(String errorMessage) invalidPublicKey, + required TResult Function(String secp256K1Error) invalidSecp256K1PublicKey, + required TResult Function() invalidXOnlyPublicKey, + required TResult Function(String errorMessage) invalidEcdsaSignature, + required TResult Function(String errorMessage) invalidTaprootSignature, + required TResult Function() invalidControlBlock, + required TResult Function() invalidLeafVersion, + required TResult Function() taproot, + required TResult Function(String errorMessage) tapTree, + required TResult Function() xPubKey, + required TResult Function(String errorMessage) version, + required TResult Function() partialDataConsumption, + required TResult Function(String errorMessage) io, + required TResult Function() otherPsbtErr, + }) { + return invalidKey(key); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidMagic, + TResult? Function()? missingUtxo, + TResult? Function()? invalidSeparator, + TResult? Function()? psbtUtxoOutOfBounds, + TResult? Function(String key)? invalidKey, + TResult? Function()? invalidProprietaryKey, + TResult? Function(String key)? duplicateKey, + TResult? Function()? unsignedTxHasScriptSigs, + TResult? Function()? unsignedTxHasScriptWitnesses, + TResult? Function()? mustHaveUnsignedTx, + TResult? Function()? noMorePairs, + TResult? Function()? unexpectedUnsignedTx, + TResult? Function(int sighash)? nonStandardSighashType, + TResult? Function(String hash)? invalidHash, + TResult? Function()? invalidPreimageHashPair, + TResult? Function(String xpub)? combineInconsistentKeySources, + TResult? Function(String encodingError)? consensusEncoding, + TResult? Function()? negativeFee, + TResult? Function()? feeOverflow, + TResult? Function(String errorMessage)? invalidPublicKey, + TResult? Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult? Function()? invalidXOnlyPublicKey, + TResult? Function(String errorMessage)? invalidEcdsaSignature, + TResult? Function(String errorMessage)? invalidTaprootSignature, + TResult? Function()? invalidControlBlock, + TResult? Function()? invalidLeafVersion, + TResult? Function()? taproot, + TResult? Function(String errorMessage)? tapTree, + TResult? Function()? xPubKey, + TResult? Function(String errorMessage)? version, + TResult? Function()? partialDataConsumption, + TResult? Function(String errorMessage)? io, + TResult? Function()? otherPsbtErr, + }) { + return invalidKey?.call(key); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidMagic, + TResult Function()? missingUtxo, + TResult Function()? invalidSeparator, + TResult Function()? psbtUtxoOutOfBounds, + TResult Function(String key)? invalidKey, + TResult Function()? invalidProprietaryKey, + TResult Function(String key)? duplicateKey, + TResult Function()? unsignedTxHasScriptSigs, + TResult Function()? unsignedTxHasScriptWitnesses, + TResult Function()? mustHaveUnsignedTx, + TResult Function()? noMorePairs, + TResult Function()? unexpectedUnsignedTx, + TResult Function(int sighash)? nonStandardSighashType, + TResult Function(String hash)? invalidHash, + TResult Function()? invalidPreimageHashPair, + TResult Function(String xpub)? combineInconsistentKeySources, + TResult Function(String encodingError)? consensusEncoding, + TResult Function()? negativeFee, + TResult Function()? feeOverflow, + TResult Function(String errorMessage)? invalidPublicKey, + TResult Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult Function()? invalidXOnlyPublicKey, + TResult Function(String errorMessage)? invalidEcdsaSignature, + TResult Function(String errorMessage)? invalidTaprootSignature, + TResult Function()? invalidControlBlock, + TResult Function()? invalidLeafVersion, + TResult Function()? taproot, + TResult Function(String errorMessage)? tapTree, + TResult Function()? xPubKey, + TResult Function(String errorMessage)? version, + TResult Function()? partialDataConsumption, + TResult Function(String errorMessage)? io, + TResult Function()? otherPsbtErr, + required TResult orElse(), + }) { + if (invalidKey != null) { + return invalidKey(key); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(PsbtError_InvalidMagic value) invalidMagic, + required TResult Function(PsbtError_MissingUtxo value) missingUtxo, + required TResult Function(PsbtError_InvalidSeparator value) + invalidSeparator, + required TResult Function(PsbtError_PsbtUtxoOutOfBounds value) + psbtUtxoOutOfBounds, + required TResult Function(PsbtError_InvalidKey value) invalidKey, + required TResult Function(PsbtError_InvalidProprietaryKey value) + invalidProprietaryKey, + required TResult Function(PsbtError_DuplicateKey value) duplicateKey, + required TResult Function(PsbtError_UnsignedTxHasScriptSigs value) + unsignedTxHasScriptSigs, + required TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value) + unsignedTxHasScriptWitnesses, + required TResult Function(PsbtError_MustHaveUnsignedTx value) + mustHaveUnsignedTx, + required TResult Function(PsbtError_NoMorePairs value) noMorePairs, + required TResult Function(PsbtError_UnexpectedUnsignedTx value) + unexpectedUnsignedTx, + required TResult Function(PsbtError_NonStandardSighashType value) + nonStandardSighashType, + required TResult Function(PsbtError_InvalidHash value) invalidHash, + required TResult Function(PsbtError_InvalidPreimageHashPair value) + invalidPreimageHashPair, + required TResult Function(PsbtError_CombineInconsistentKeySources value) + combineInconsistentKeySources, + required TResult Function(PsbtError_ConsensusEncoding value) + consensusEncoding, + required TResult Function(PsbtError_NegativeFee value) negativeFee, + required TResult Function(PsbtError_FeeOverflow value) feeOverflow, + required TResult Function(PsbtError_InvalidPublicKey value) + invalidPublicKey, + required TResult Function(PsbtError_InvalidSecp256k1PublicKey value) + invalidSecp256K1PublicKey, + required TResult Function(PsbtError_InvalidXOnlyPublicKey value) + invalidXOnlyPublicKey, + required TResult Function(PsbtError_InvalidEcdsaSignature value) + invalidEcdsaSignature, + required TResult Function(PsbtError_InvalidTaprootSignature value) + invalidTaprootSignature, + required TResult Function(PsbtError_InvalidControlBlock value) + invalidControlBlock, + required TResult Function(PsbtError_InvalidLeafVersion value) + invalidLeafVersion, + required TResult Function(PsbtError_Taproot value) taproot, + required TResult Function(PsbtError_TapTree value) tapTree, + required TResult Function(PsbtError_XPubKey value) xPubKey, + required TResult Function(PsbtError_Version value) version, + required TResult Function(PsbtError_PartialDataConsumption value) + partialDataConsumption, + required TResult Function(PsbtError_Io value) io, + required TResult Function(PsbtError_OtherPsbtErr value) otherPsbtErr, + }) { + return invalidKey(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult? Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult? Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult? Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult? Function(PsbtError_InvalidKey value)? invalidKey, + TResult? Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult? Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult? Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult? Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult? Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult? Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult? Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult? Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult? Function(PsbtError_InvalidHash value)? invalidHash, + TResult? Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult? Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult? Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult? Function(PsbtError_NegativeFee value)? negativeFee, + TResult? Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult? Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult? Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult? Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult? Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult? Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult? Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult? Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult? Function(PsbtError_Taproot value)? taproot, + TResult? Function(PsbtError_TapTree value)? tapTree, + TResult? Function(PsbtError_XPubKey value)? xPubKey, + TResult? Function(PsbtError_Version value)? version, + TResult? Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult? Function(PsbtError_Io value)? io, + TResult? Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + }) { + return invalidKey?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult Function(PsbtError_InvalidKey value)? invalidKey, + TResult Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult Function(PsbtError_InvalidHash value)? invalidHash, + TResult Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult Function(PsbtError_NegativeFee value)? negativeFee, + TResult Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult Function(PsbtError_Taproot value)? taproot, + TResult Function(PsbtError_TapTree value)? tapTree, + TResult Function(PsbtError_XPubKey value)? xPubKey, + TResult Function(PsbtError_Version value)? version, + TResult Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult Function(PsbtError_Io value)? io, + TResult Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + required TResult orElse(), + }) { + if (invalidKey != null) { + return invalidKey(this); + } + return orElse(); + } +} + +abstract class PsbtError_InvalidKey extends PsbtError { + const factory PsbtError_InvalidKey({required final String key}) = + _$PsbtError_InvalidKeyImpl; + const PsbtError_InvalidKey._() : super._(); + + String get key; + @JsonKey(ignore: true) + _$$PsbtError_InvalidKeyImplCopyWith<_$PsbtError_InvalidKeyImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$PsbtError_InvalidProprietaryKeyImplCopyWith<$Res> { + factory _$$PsbtError_InvalidProprietaryKeyImplCopyWith( + _$PsbtError_InvalidProprietaryKeyImpl value, + $Res Function(_$PsbtError_InvalidProprietaryKeyImpl) then) = + __$$PsbtError_InvalidProprietaryKeyImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$PsbtError_InvalidProprietaryKeyImplCopyWithImpl<$Res> + extends _$PsbtErrorCopyWithImpl<$Res, _$PsbtError_InvalidProprietaryKeyImpl> + implements _$$PsbtError_InvalidProprietaryKeyImplCopyWith<$Res> { + __$$PsbtError_InvalidProprietaryKeyImplCopyWithImpl( + _$PsbtError_InvalidProprietaryKeyImpl _value, + $Res Function(_$PsbtError_InvalidProprietaryKeyImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$PsbtError_InvalidProprietaryKeyImpl + extends PsbtError_InvalidProprietaryKey { + const _$PsbtError_InvalidProprietaryKeyImpl() : super._(); + + @override + String toString() { + return 'PsbtError.invalidProprietaryKey()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PsbtError_InvalidProprietaryKeyImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidMagic, + required TResult Function() missingUtxo, + required TResult Function() invalidSeparator, + required TResult Function() psbtUtxoOutOfBounds, + required TResult Function(String key) invalidKey, + required TResult Function() invalidProprietaryKey, + required TResult Function(String key) duplicateKey, + required TResult Function() unsignedTxHasScriptSigs, + required TResult Function() unsignedTxHasScriptWitnesses, + required TResult Function() mustHaveUnsignedTx, + required TResult Function() noMorePairs, + required TResult Function() unexpectedUnsignedTx, + required TResult Function(int sighash) nonStandardSighashType, + required TResult Function(String hash) invalidHash, + required TResult Function() invalidPreimageHashPair, + required TResult Function(String xpub) combineInconsistentKeySources, + required TResult Function(String encodingError) consensusEncoding, + required TResult Function() negativeFee, + required TResult Function() feeOverflow, + required TResult Function(String errorMessage) invalidPublicKey, + required TResult Function(String secp256K1Error) invalidSecp256K1PublicKey, + required TResult Function() invalidXOnlyPublicKey, + required TResult Function(String errorMessage) invalidEcdsaSignature, + required TResult Function(String errorMessage) invalidTaprootSignature, + required TResult Function() invalidControlBlock, + required TResult Function() invalidLeafVersion, + required TResult Function() taproot, + required TResult Function(String errorMessage) tapTree, + required TResult Function() xPubKey, + required TResult Function(String errorMessage) version, + required TResult Function() partialDataConsumption, + required TResult Function(String errorMessage) io, + required TResult Function() otherPsbtErr, + }) { + return invalidProprietaryKey(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidMagic, + TResult? Function()? missingUtxo, + TResult? Function()? invalidSeparator, + TResult? Function()? psbtUtxoOutOfBounds, + TResult? Function(String key)? invalidKey, + TResult? Function()? invalidProprietaryKey, + TResult? Function(String key)? duplicateKey, + TResult? Function()? unsignedTxHasScriptSigs, + TResult? Function()? unsignedTxHasScriptWitnesses, + TResult? Function()? mustHaveUnsignedTx, + TResult? Function()? noMorePairs, + TResult? Function()? unexpectedUnsignedTx, + TResult? Function(int sighash)? nonStandardSighashType, + TResult? Function(String hash)? invalidHash, + TResult? Function()? invalidPreimageHashPair, + TResult? Function(String xpub)? combineInconsistentKeySources, + TResult? Function(String encodingError)? consensusEncoding, + TResult? Function()? negativeFee, + TResult? Function()? feeOverflow, + TResult? Function(String errorMessage)? invalidPublicKey, + TResult? Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult? Function()? invalidXOnlyPublicKey, + TResult? Function(String errorMessage)? invalidEcdsaSignature, + TResult? Function(String errorMessage)? invalidTaprootSignature, + TResult? Function()? invalidControlBlock, + TResult? Function()? invalidLeafVersion, + TResult? Function()? taproot, + TResult? Function(String errorMessage)? tapTree, + TResult? Function()? xPubKey, + TResult? Function(String errorMessage)? version, + TResult? Function()? partialDataConsumption, + TResult? Function(String errorMessage)? io, + TResult? Function()? otherPsbtErr, + }) { + return invalidProprietaryKey?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidMagic, + TResult Function()? missingUtxo, + TResult Function()? invalidSeparator, + TResult Function()? psbtUtxoOutOfBounds, + TResult Function(String key)? invalidKey, + TResult Function()? invalidProprietaryKey, + TResult Function(String key)? duplicateKey, + TResult Function()? unsignedTxHasScriptSigs, + TResult Function()? unsignedTxHasScriptWitnesses, + TResult Function()? mustHaveUnsignedTx, + TResult Function()? noMorePairs, + TResult Function()? unexpectedUnsignedTx, + TResult Function(int sighash)? nonStandardSighashType, + TResult Function(String hash)? invalidHash, + TResult Function()? invalidPreimageHashPair, + TResult Function(String xpub)? combineInconsistentKeySources, + TResult Function(String encodingError)? consensusEncoding, + TResult Function()? negativeFee, + TResult Function()? feeOverflow, + TResult Function(String errorMessage)? invalidPublicKey, + TResult Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult Function()? invalidXOnlyPublicKey, + TResult Function(String errorMessage)? invalidEcdsaSignature, + TResult Function(String errorMessage)? invalidTaprootSignature, + TResult Function()? invalidControlBlock, + TResult Function()? invalidLeafVersion, + TResult Function()? taproot, + TResult Function(String errorMessage)? tapTree, + TResult Function()? xPubKey, + TResult Function(String errorMessage)? version, + TResult Function()? partialDataConsumption, + TResult Function(String errorMessage)? io, + TResult Function()? otherPsbtErr, + required TResult orElse(), + }) { + if (invalidProprietaryKey != null) { + return invalidProprietaryKey(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(PsbtError_InvalidMagic value) invalidMagic, + required TResult Function(PsbtError_MissingUtxo value) missingUtxo, + required TResult Function(PsbtError_InvalidSeparator value) + invalidSeparator, + required TResult Function(PsbtError_PsbtUtxoOutOfBounds value) + psbtUtxoOutOfBounds, + required TResult Function(PsbtError_InvalidKey value) invalidKey, + required TResult Function(PsbtError_InvalidProprietaryKey value) + invalidProprietaryKey, + required TResult Function(PsbtError_DuplicateKey value) duplicateKey, + required TResult Function(PsbtError_UnsignedTxHasScriptSigs value) + unsignedTxHasScriptSigs, + required TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value) + unsignedTxHasScriptWitnesses, + required TResult Function(PsbtError_MustHaveUnsignedTx value) + mustHaveUnsignedTx, + required TResult Function(PsbtError_NoMorePairs value) noMorePairs, + required TResult Function(PsbtError_UnexpectedUnsignedTx value) + unexpectedUnsignedTx, + required TResult Function(PsbtError_NonStandardSighashType value) + nonStandardSighashType, + required TResult Function(PsbtError_InvalidHash value) invalidHash, + required TResult Function(PsbtError_InvalidPreimageHashPair value) + invalidPreimageHashPair, + required TResult Function(PsbtError_CombineInconsistentKeySources value) + combineInconsistentKeySources, + required TResult Function(PsbtError_ConsensusEncoding value) + consensusEncoding, + required TResult Function(PsbtError_NegativeFee value) negativeFee, + required TResult Function(PsbtError_FeeOverflow value) feeOverflow, + required TResult Function(PsbtError_InvalidPublicKey value) + invalidPublicKey, + required TResult Function(PsbtError_InvalidSecp256k1PublicKey value) + invalidSecp256K1PublicKey, + required TResult Function(PsbtError_InvalidXOnlyPublicKey value) + invalidXOnlyPublicKey, + required TResult Function(PsbtError_InvalidEcdsaSignature value) + invalidEcdsaSignature, + required TResult Function(PsbtError_InvalidTaprootSignature value) + invalidTaprootSignature, + required TResult Function(PsbtError_InvalidControlBlock value) + invalidControlBlock, + required TResult Function(PsbtError_InvalidLeafVersion value) + invalidLeafVersion, + required TResult Function(PsbtError_Taproot value) taproot, + required TResult Function(PsbtError_TapTree value) tapTree, + required TResult Function(PsbtError_XPubKey value) xPubKey, + required TResult Function(PsbtError_Version value) version, + required TResult Function(PsbtError_PartialDataConsumption value) + partialDataConsumption, + required TResult Function(PsbtError_Io value) io, + required TResult Function(PsbtError_OtherPsbtErr value) otherPsbtErr, + }) { + return invalidProprietaryKey(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult? Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult? Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult? Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult? Function(PsbtError_InvalidKey value)? invalidKey, + TResult? Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult? Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult? Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult? Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult? Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult? Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult? Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult? Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult? Function(PsbtError_InvalidHash value)? invalidHash, + TResult? Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult? Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult? Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult? Function(PsbtError_NegativeFee value)? negativeFee, + TResult? Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult? Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult? Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult? Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult? Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult? Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult? Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult? Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult? Function(PsbtError_Taproot value)? taproot, + TResult? Function(PsbtError_TapTree value)? tapTree, + TResult? Function(PsbtError_XPubKey value)? xPubKey, + TResult? Function(PsbtError_Version value)? version, + TResult? Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult? Function(PsbtError_Io value)? io, + TResult? Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + }) { + return invalidProprietaryKey?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult Function(PsbtError_InvalidKey value)? invalidKey, + TResult Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult Function(PsbtError_InvalidHash value)? invalidHash, + TResult Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult Function(PsbtError_NegativeFee value)? negativeFee, + TResult Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult Function(PsbtError_Taproot value)? taproot, + TResult Function(PsbtError_TapTree value)? tapTree, + TResult Function(PsbtError_XPubKey value)? xPubKey, + TResult Function(PsbtError_Version value)? version, + TResult Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult Function(PsbtError_Io value)? io, + TResult Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + required TResult orElse(), + }) { + if (invalidProprietaryKey != null) { + return invalidProprietaryKey(this); + } + return orElse(); + } +} + +abstract class PsbtError_InvalidProprietaryKey extends PsbtError { + const factory PsbtError_InvalidProprietaryKey() = + _$PsbtError_InvalidProprietaryKeyImpl; + const PsbtError_InvalidProprietaryKey._() : super._(); +} + +/// @nodoc +abstract class _$$PsbtError_DuplicateKeyImplCopyWith<$Res> { + factory _$$PsbtError_DuplicateKeyImplCopyWith( + _$PsbtError_DuplicateKeyImpl value, + $Res Function(_$PsbtError_DuplicateKeyImpl) then) = + __$$PsbtError_DuplicateKeyImplCopyWithImpl<$Res>; + @useResult + $Res call({String key}); +} + +/// @nodoc +class __$$PsbtError_DuplicateKeyImplCopyWithImpl<$Res> + extends _$PsbtErrorCopyWithImpl<$Res, _$PsbtError_DuplicateKeyImpl> + implements _$$PsbtError_DuplicateKeyImplCopyWith<$Res> { + __$$PsbtError_DuplicateKeyImplCopyWithImpl( + _$PsbtError_DuplicateKeyImpl _value, + $Res Function(_$PsbtError_DuplicateKeyImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? key = null, + }) { + return _then(_$PsbtError_DuplicateKeyImpl( + key: null == key + ? _value.key + : key // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$PsbtError_DuplicateKeyImpl extends PsbtError_DuplicateKey { + const _$PsbtError_DuplicateKeyImpl({required this.key}) : super._(); + + @override + final String key; + + @override + String toString() { + return 'PsbtError.duplicateKey(key: $key)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PsbtError_DuplicateKeyImpl && + (identical(other.key, key) || other.key == key)); + } + + @override + int get hashCode => Object.hash(runtimeType, key); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$PsbtError_DuplicateKeyImplCopyWith<_$PsbtError_DuplicateKeyImpl> + get copyWith => __$$PsbtError_DuplicateKeyImplCopyWithImpl< + _$PsbtError_DuplicateKeyImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidMagic, + required TResult Function() missingUtxo, + required TResult Function() invalidSeparator, + required TResult Function() psbtUtxoOutOfBounds, + required TResult Function(String key) invalidKey, + required TResult Function() invalidProprietaryKey, + required TResult Function(String key) duplicateKey, + required TResult Function() unsignedTxHasScriptSigs, + required TResult Function() unsignedTxHasScriptWitnesses, + required TResult Function() mustHaveUnsignedTx, + required TResult Function() noMorePairs, + required TResult Function() unexpectedUnsignedTx, + required TResult Function(int sighash) nonStandardSighashType, + required TResult Function(String hash) invalidHash, + required TResult Function() invalidPreimageHashPair, + required TResult Function(String xpub) combineInconsistentKeySources, + required TResult Function(String encodingError) consensusEncoding, + required TResult Function() negativeFee, + required TResult Function() feeOverflow, + required TResult Function(String errorMessage) invalidPublicKey, + required TResult Function(String secp256K1Error) invalidSecp256K1PublicKey, + required TResult Function() invalidXOnlyPublicKey, + required TResult Function(String errorMessage) invalidEcdsaSignature, + required TResult Function(String errorMessage) invalidTaprootSignature, + required TResult Function() invalidControlBlock, + required TResult Function() invalidLeafVersion, + required TResult Function() taproot, + required TResult Function(String errorMessage) tapTree, + required TResult Function() xPubKey, + required TResult Function(String errorMessage) version, + required TResult Function() partialDataConsumption, + required TResult Function(String errorMessage) io, + required TResult Function() otherPsbtErr, + }) { + return duplicateKey(key); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidMagic, + TResult? Function()? missingUtxo, + TResult? Function()? invalidSeparator, + TResult? Function()? psbtUtxoOutOfBounds, + TResult? Function(String key)? invalidKey, + TResult? Function()? invalidProprietaryKey, + TResult? Function(String key)? duplicateKey, + TResult? Function()? unsignedTxHasScriptSigs, + TResult? Function()? unsignedTxHasScriptWitnesses, + TResult? Function()? mustHaveUnsignedTx, + TResult? Function()? noMorePairs, + TResult? Function()? unexpectedUnsignedTx, + TResult? Function(int sighash)? nonStandardSighashType, + TResult? Function(String hash)? invalidHash, + TResult? Function()? invalidPreimageHashPair, + TResult? Function(String xpub)? combineInconsistentKeySources, + TResult? Function(String encodingError)? consensusEncoding, + TResult? Function()? negativeFee, + TResult? Function()? feeOverflow, + TResult? Function(String errorMessage)? invalidPublicKey, + TResult? Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult? Function()? invalidXOnlyPublicKey, + TResult? Function(String errorMessage)? invalidEcdsaSignature, + TResult? Function(String errorMessage)? invalidTaprootSignature, + TResult? Function()? invalidControlBlock, + TResult? Function()? invalidLeafVersion, + TResult? Function()? taproot, + TResult? Function(String errorMessage)? tapTree, + TResult? Function()? xPubKey, + TResult? Function(String errorMessage)? version, + TResult? Function()? partialDataConsumption, + TResult? Function(String errorMessage)? io, + TResult? Function()? otherPsbtErr, + }) { + return duplicateKey?.call(key); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidMagic, + TResult Function()? missingUtxo, + TResult Function()? invalidSeparator, + TResult Function()? psbtUtxoOutOfBounds, + TResult Function(String key)? invalidKey, + TResult Function()? invalidProprietaryKey, + TResult Function(String key)? duplicateKey, + TResult Function()? unsignedTxHasScriptSigs, + TResult Function()? unsignedTxHasScriptWitnesses, + TResult Function()? mustHaveUnsignedTx, + TResult Function()? noMorePairs, + TResult Function()? unexpectedUnsignedTx, + TResult Function(int sighash)? nonStandardSighashType, + TResult Function(String hash)? invalidHash, + TResult Function()? invalidPreimageHashPair, + TResult Function(String xpub)? combineInconsistentKeySources, + TResult Function(String encodingError)? consensusEncoding, + TResult Function()? negativeFee, + TResult Function()? feeOverflow, + TResult Function(String errorMessage)? invalidPublicKey, + TResult Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult Function()? invalidXOnlyPublicKey, + TResult Function(String errorMessage)? invalidEcdsaSignature, + TResult Function(String errorMessage)? invalidTaprootSignature, + TResult Function()? invalidControlBlock, + TResult Function()? invalidLeafVersion, + TResult Function()? taproot, + TResult Function(String errorMessage)? tapTree, + TResult Function()? xPubKey, + TResult Function(String errorMessage)? version, + TResult Function()? partialDataConsumption, + TResult Function(String errorMessage)? io, + TResult Function()? otherPsbtErr, + required TResult orElse(), + }) { + if (duplicateKey != null) { + return duplicateKey(key); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(PsbtError_InvalidMagic value) invalidMagic, + required TResult Function(PsbtError_MissingUtxo value) missingUtxo, + required TResult Function(PsbtError_InvalidSeparator value) + invalidSeparator, + required TResult Function(PsbtError_PsbtUtxoOutOfBounds value) + psbtUtxoOutOfBounds, + required TResult Function(PsbtError_InvalidKey value) invalidKey, + required TResult Function(PsbtError_InvalidProprietaryKey value) + invalidProprietaryKey, + required TResult Function(PsbtError_DuplicateKey value) duplicateKey, + required TResult Function(PsbtError_UnsignedTxHasScriptSigs value) + unsignedTxHasScriptSigs, + required TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value) + unsignedTxHasScriptWitnesses, + required TResult Function(PsbtError_MustHaveUnsignedTx value) + mustHaveUnsignedTx, + required TResult Function(PsbtError_NoMorePairs value) noMorePairs, + required TResult Function(PsbtError_UnexpectedUnsignedTx value) + unexpectedUnsignedTx, + required TResult Function(PsbtError_NonStandardSighashType value) + nonStandardSighashType, + required TResult Function(PsbtError_InvalidHash value) invalidHash, + required TResult Function(PsbtError_InvalidPreimageHashPair value) + invalidPreimageHashPair, + required TResult Function(PsbtError_CombineInconsistentKeySources value) + combineInconsistentKeySources, + required TResult Function(PsbtError_ConsensusEncoding value) + consensusEncoding, + required TResult Function(PsbtError_NegativeFee value) negativeFee, + required TResult Function(PsbtError_FeeOverflow value) feeOverflow, + required TResult Function(PsbtError_InvalidPublicKey value) + invalidPublicKey, + required TResult Function(PsbtError_InvalidSecp256k1PublicKey value) + invalidSecp256K1PublicKey, + required TResult Function(PsbtError_InvalidXOnlyPublicKey value) + invalidXOnlyPublicKey, + required TResult Function(PsbtError_InvalidEcdsaSignature value) + invalidEcdsaSignature, + required TResult Function(PsbtError_InvalidTaprootSignature value) + invalidTaprootSignature, + required TResult Function(PsbtError_InvalidControlBlock value) + invalidControlBlock, + required TResult Function(PsbtError_InvalidLeafVersion value) + invalidLeafVersion, + required TResult Function(PsbtError_Taproot value) taproot, + required TResult Function(PsbtError_TapTree value) tapTree, + required TResult Function(PsbtError_XPubKey value) xPubKey, + required TResult Function(PsbtError_Version value) version, + required TResult Function(PsbtError_PartialDataConsumption value) + partialDataConsumption, + required TResult Function(PsbtError_Io value) io, + required TResult Function(PsbtError_OtherPsbtErr value) otherPsbtErr, + }) { + return duplicateKey(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult? Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult? Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult? Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult? Function(PsbtError_InvalidKey value)? invalidKey, + TResult? Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult? Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult? Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult? Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult? Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult? Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult? Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult? Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult? Function(PsbtError_InvalidHash value)? invalidHash, + TResult? Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult? Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult? Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult? Function(PsbtError_NegativeFee value)? negativeFee, + TResult? Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult? Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult? Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult? Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult? Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult? Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult? Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult? Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult? Function(PsbtError_Taproot value)? taproot, + TResult? Function(PsbtError_TapTree value)? tapTree, + TResult? Function(PsbtError_XPubKey value)? xPubKey, + TResult? Function(PsbtError_Version value)? version, + TResult? Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult? Function(PsbtError_Io value)? io, + TResult? Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + }) { + return duplicateKey?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult Function(PsbtError_InvalidKey value)? invalidKey, + TResult Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult Function(PsbtError_InvalidHash value)? invalidHash, + TResult Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult Function(PsbtError_NegativeFee value)? negativeFee, + TResult Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult Function(PsbtError_Taproot value)? taproot, + TResult Function(PsbtError_TapTree value)? tapTree, + TResult Function(PsbtError_XPubKey value)? xPubKey, + TResult Function(PsbtError_Version value)? version, + TResult Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult Function(PsbtError_Io value)? io, + TResult Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + required TResult orElse(), + }) { + if (duplicateKey != null) { + return duplicateKey(this); + } + return orElse(); + } +} + +abstract class PsbtError_DuplicateKey extends PsbtError { + const factory PsbtError_DuplicateKey({required final String key}) = + _$PsbtError_DuplicateKeyImpl; + const PsbtError_DuplicateKey._() : super._(); + + String get key; + @JsonKey(ignore: true) + _$$PsbtError_DuplicateKeyImplCopyWith<_$PsbtError_DuplicateKeyImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$PsbtError_UnsignedTxHasScriptSigsImplCopyWith<$Res> { + factory _$$PsbtError_UnsignedTxHasScriptSigsImplCopyWith( + _$PsbtError_UnsignedTxHasScriptSigsImpl value, + $Res Function(_$PsbtError_UnsignedTxHasScriptSigsImpl) then) = + __$$PsbtError_UnsignedTxHasScriptSigsImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$PsbtError_UnsignedTxHasScriptSigsImplCopyWithImpl<$Res> + extends _$PsbtErrorCopyWithImpl<$Res, + _$PsbtError_UnsignedTxHasScriptSigsImpl> + implements _$$PsbtError_UnsignedTxHasScriptSigsImplCopyWith<$Res> { + __$$PsbtError_UnsignedTxHasScriptSigsImplCopyWithImpl( + _$PsbtError_UnsignedTxHasScriptSigsImpl _value, + $Res Function(_$PsbtError_UnsignedTxHasScriptSigsImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$PsbtError_UnsignedTxHasScriptSigsImpl + extends PsbtError_UnsignedTxHasScriptSigs { + const _$PsbtError_UnsignedTxHasScriptSigsImpl() : super._(); + + @override + String toString() { + return 'PsbtError.unsignedTxHasScriptSigs()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PsbtError_UnsignedTxHasScriptSigsImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidMagic, + required TResult Function() missingUtxo, + required TResult Function() invalidSeparator, + required TResult Function() psbtUtxoOutOfBounds, + required TResult Function(String key) invalidKey, + required TResult Function() invalidProprietaryKey, + required TResult Function(String key) duplicateKey, + required TResult Function() unsignedTxHasScriptSigs, + required TResult Function() unsignedTxHasScriptWitnesses, + required TResult Function() mustHaveUnsignedTx, + required TResult Function() noMorePairs, + required TResult Function() unexpectedUnsignedTx, + required TResult Function(int sighash) nonStandardSighashType, + required TResult Function(String hash) invalidHash, + required TResult Function() invalidPreimageHashPair, + required TResult Function(String xpub) combineInconsistentKeySources, + required TResult Function(String encodingError) consensusEncoding, + required TResult Function() negativeFee, + required TResult Function() feeOverflow, + required TResult Function(String errorMessage) invalidPublicKey, + required TResult Function(String secp256K1Error) invalidSecp256K1PublicKey, + required TResult Function() invalidXOnlyPublicKey, + required TResult Function(String errorMessage) invalidEcdsaSignature, + required TResult Function(String errorMessage) invalidTaprootSignature, + required TResult Function() invalidControlBlock, + required TResult Function() invalidLeafVersion, + required TResult Function() taproot, + required TResult Function(String errorMessage) tapTree, + required TResult Function() xPubKey, + required TResult Function(String errorMessage) version, + required TResult Function() partialDataConsumption, + required TResult Function(String errorMessage) io, + required TResult Function() otherPsbtErr, + }) { + return unsignedTxHasScriptSigs(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidMagic, + TResult? Function()? missingUtxo, + TResult? Function()? invalidSeparator, + TResult? Function()? psbtUtxoOutOfBounds, + TResult? Function(String key)? invalidKey, + TResult? Function()? invalidProprietaryKey, + TResult? Function(String key)? duplicateKey, + TResult? Function()? unsignedTxHasScriptSigs, + TResult? Function()? unsignedTxHasScriptWitnesses, + TResult? Function()? mustHaveUnsignedTx, + TResult? Function()? noMorePairs, + TResult? Function()? unexpectedUnsignedTx, + TResult? Function(int sighash)? nonStandardSighashType, + TResult? Function(String hash)? invalidHash, + TResult? Function()? invalidPreimageHashPair, + TResult? Function(String xpub)? combineInconsistentKeySources, + TResult? Function(String encodingError)? consensusEncoding, + TResult? Function()? negativeFee, + TResult? Function()? feeOverflow, + TResult? Function(String errorMessage)? invalidPublicKey, + TResult? Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult? Function()? invalidXOnlyPublicKey, + TResult? Function(String errorMessage)? invalidEcdsaSignature, + TResult? Function(String errorMessage)? invalidTaprootSignature, + TResult? Function()? invalidControlBlock, + TResult? Function()? invalidLeafVersion, + TResult? Function()? taproot, + TResult? Function(String errorMessage)? tapTree, + TResult? Function()? xPubKey, + TResult? Function(String errorMessage)? version, + TResult? Function()? partialDataConsumption, + TResult? Function(String errorMessage)? io, + TResult? Function()? otherPsbtErr, + }) { + return unsignedTxHasScriptSigs?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidMagic, + TResult Function()? missingUtxo, + TResult Function()? invalidSeparator, + TResult Function()? psbtUtxoOutOfBounds, + TResult Function(String key)? invalidKey, + TResult Function()? invalidProprietaryKey, + TResult Function(String key)? duplicateKey, + TResult Function()? unsignedTxHasScriptSigs, + TResult Function()? unsignedTxHasScriptWitnesses, + TResult Function()? mustHaveUnsignedTx, + TResult Function()? noMorePairs, + TResult Function()? unexpectedUnsignedTx, + TResult Function(int sighash)? nonStandardSighashType, + TResult Function(String hash)? invalidHash, + TResult Function()? invalidPreimageHashPair, + TResult Function(String xpub)? combineInconsistentKeySources, + TResult Function(String encodingError)? consensusEncoding, + TResult Function()? negativeFee, + TResult Function()? feeOverflow, + TResult Function(String errorMessage)? invalidPublicKey, + TResult Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult Function()? invalidXOnlyPublicKey, + TResult Function(String errorMessage)? invalidEcdsaSignature, + TResult Function(String errorMessage)? invalidTaprootSignature, + TResult Function()? invalidControlBlock, + TResult Function()? invalidLeafVersion, + TResult Function()? taproot, + TResult Function(String errorMessage)? tapTree, + TResult Function()? xPubKey, + TResult Function(String errorMessage)? version, + TResult Function()? partialDataConsumption, + TResult Function(String errorMessage)? io, + TResult Function()? otherPsbtErr, + required TResult orElse(), + }) { + if (unsignedTxHasScriptSigs != null) { + return unsignedTxHasScriptSigs(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(PsbtError_InvalidMagic value) invalidMagic, + required TResult Function(PsbtError_MissingUtxo value) missingUtxo, + required TResult Function(PsbtError_InvalidSeparator value) + invalidSeparator, + required TResult Function(PsbtError_PsbtUtxoOutOfBounds value) + psbtUtxoOutOfBounds, + required TResult Function(PsbtError_InvalidKey value) invalidKey, + required TResult Function(PsbtError_InvalidProprietaryKey value) + invalidProprietaryKey, + required TResult Function(PsbtError_DuplicateKey value) duplicateKey, + required TResult Function(PsbtError_UnsignedTxHasScriptSigs value) + unsignedTxHasScriptSigs, + required TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value) + unsignedTxHasScriptWitnesses, + required TResult Function(PsbtError_MustHaveUnsignedTx value) + mustHaveUnsignedTx, + required TResult Function(PsbtError_NoMorePairs value) noMorePairs, + required TResult Function(PsbtError_UnexpectedUnsignedTx value) + unexpectedUnsignedTx, + required TResult Function(PsbtError_NonStandardSighashType value) + nonStandardSighashType, + required TResult Function(PsbtError_InvalidHash value) invalidHash, + required TResult Function(PsbtError_InvalidPreimageHashPair value) + invalidPreimageHashPair, + required TResult Function(PsbtError_CombineInconsistentKeySources value) + combineInconsistentKeySources, + required TResult Function(PsbtError_ConsensusEncoding value) + consensusEncoding, + required TResult Function(PsbtError_NegativeFee value) negativeFee, + required TResult Function(PsbtError_FeeOverflow value) feeOverflow, + required TResult Function(PsbtError_InvalidPublicKey value) + invalidPublicKey, + required TResult Function(PsbtError_InvalidSecp256k1PublicKey value) + invalidSecp256K1PublicKey, + required TResult Function(PsbtError_InvalidXOnlyPublicKey value) + invalidXOnlyPublicKey, + required TResult Function(PsbtError_InvalidEcdsaSignature value) + invalidEcdsaSignature, + required TResult Function(PsbtError_InvalidTaprootSignature value) + invalidTaprootSignature, + required TResult Function(PsbtError_InvalidControlBlock value) + invalidControlBlock, + required TResult Function(PsbtError_InvalidLeafVersion value) + invalidLeafVersion, + required TResult Function(PsbtError_Taproot value) taproot, + required TResult Function(PsbtError_TapTree value) tapTree, + required TResult Function(PsbtError_XPubKey value) xPubKey, + required TResult Function(PsbtError_Version value) version, + required TResult Function(PsbtError_PartialDataConsumption value) + partialDataConsumption, + required TResult Function(PsbtError_Io value) io, + required TResult Function(PsbtError_OtherPsbtErr value) otherPsbtErr, + }) { + return unsignedTxHasScriptSigs(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult? Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult? Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult? Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult? Function(PsbtError_InvalidKey value)? invalidKey, + TResult? Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult? Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult? Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult? Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult? Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult? Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult? Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult? Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult? Function(PsbtError_InvalidHash value)? invalidHash, + TResult? Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult? Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult? Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult? Function(PsbtError_NegativeFee value)? negativeFee, + TResult? Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult? Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult? Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult? Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult? Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult? Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult? Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult? Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult? Function(PsbtError_Taproot value)? taproot, + TResult? Function(PsbtError_TapTree value)? tapTree, + TResult? Function(PsbtError_XPubKey value)? xPubKey, + TResult? Function(PsbtError_Version value)? version, + TResult? Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult? Function(PsbtError_Io value)? io, + TResult? Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + }) { + return unsignedTxHasScriptSigs?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult Function(PsbtError_InvalidKey value)? invalidKey, + TResult Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult Function(PsbtError_InvalidHash value)? invalidHash, + TResult Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult Function(PsbtError_NegativeFee value)? negativeFee, + TResult Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult Function(PsbtError_Taproot value)? taproot, + TResult Function(PsbtError_TapTree value)? tapTree, + TResult Function(PsbtError_XPubKey value)? xPubKey, + TResult Function(PsbtError_Version value)? version, + TResult Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult Function(PsbtError_Io value)? io, + TResult Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + required TResult orElse(), + }) { + if (unsignedTxHasScriptSigs != null) { + return unsignedTxHasScriptSigs(this); + } + return orElse(); + } +} + +abstract class PsbtError_UnsignedTxHasScriptSigs extends PsbtError { + const factory PsbtError_UnsignedTxHasScriptSigs() = + _$PsbtError_UnsignedTxHasScriptSigsImpl; + const PsbtError_UnsignedTxHasScriptSigs._() : super._(); +} + +/// @nodoc +abstract class _$$PsbtError_UnsignedTxHasScriptWitnessesImplCopyWith<$Res> { + factory _$$PsbtError_UnsignedTxHasScriptWitnessesImplCopyWith( + _$PsbtError_UnsignedTxHasScriptWitnessesImpl value, + $Res Function(_$PsbtError_UnsignedTxHasScriptWitnessesImpl) then) = + __$$PsbtError_UnsignedTxHasScriptWitnessesImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$PsbtError_UnsignedTxHasScriptWitnessesImplCopyWithImpl<$Res> + extends _$PsbtErrorCopyWithImpl<$Res, + _$PsbtError_UnsignedTxHasScriptWitnessesImpl> + implements _$$PsbtError_UnsignedTxHasScriptWitnessesImplCopyWith<$Res> { + __$$PsbtError_UnsignedTxHasScriptWitnessesImplCopyWithImpl( + _$PsbtError_UnsignedTxHasScriptWitnessesImpl _value, + $Res Function(_$PsbtError_UnsignedTxHasScriptWitnessesImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$PsbtError_UnsignedTxHasScriptWitnessesImpl + extends PsbtError_UnsignedTxHasScriptWitnesses { + const _$PsbtError_UnsignedTxHasScriptWitnessesImpl() : super._(); + + @override + String toString() { + return 'PsbtError.unsignedTxHasScriptWitnesses()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PsbtError_UnsignedTxHasScriptWitnessesImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidMagic, + required TResult Function() missingUtxo, + required TResult Function() invalidSeparator, + required TResult Function() psbtUtxoOutOfBounds, + required TResult Function(String key) invalidKey, + required TResult Function() invalidProprietaryKey, + required TResult Function(String key) duplicateKey, + required TResult Function() unsignedTxHasScriptSigs, + required TResult Function() unsignedTxHasScriptWitnesses, + required TResult Function() mustHaveUnsignedTx, + required TResult Function() noMorePairs, + required TResult Function() unexpectedUnsignedTx, + required TResult Function(int sighash) nonStandardSighashType, + required TResult Function(String hash) invalidHash, + required TResult Function() invalidPreimageHashPair, + required TResult Function(String xpub) combineInconsistentKeySources, + required TResult Function(String encodingError) consensusEncoding, + required TResult Function() negativeFee, + required TResult Function() feeOverflow, + required TResult Function(String errorMessage) invalidPublicKey, + required TResult Function(String secp256K1Error) invalidSecp256K1PublicKey, + required TResult Function() invalidXOnlyPublicKey, + required TResult Function(String errorMessage) invalidEcdsaSignature, + required TResult Function(String errorMessage) invalidTaprootSignature, + required TResult Function() invalidControlBlock, + required TResult Function() invalidLeafVersion, + required TResult Function() taproot, + required TResult Function(String errorMessage) tapTree, + required TResult Function() xPubKey, + required TResult Function(String errorMessage) version, + required TResult Function() partialDataConsumption, + required TResult Function(String errorMessage) io, + required TResult Function() otherPsbtErr, + }) { + return unsignedTxHasScriptWitnesses(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidMagic, + TResult? Function()? missingUtxo, + TResult? Function()? invalidSeparator, + TResult? Function()? psbtUtxoOutOfBounds, + TResult? Function(String key)? invalidKey, + TResult? Function()? invalidProprietaryKey, + TResult? Function(String key)? duplicateKey, + TResult? Function()? unsignedTxHasScriptSigs, + TResult? Function()? unsignedTxHasScriptWitnesses, + TResult? Function()? mustHaveUnsignedTx, + TResult? Function()? noMorePairs, + TResult? Function()? unexpectedUnsignedTx, + TResult? Function(int sighash)? nonStandardSighashType, + TResult? Function(String hash)? invalidHash, + TResult? Function()? invalidPreimageHashPair, + TResult? Function(String xpub)? combineInconsistentKeySources, + TResult? Function(String encodingError)? consensusEncoding, + TResult? Function()? negativeFee, + TResult? Function()? feeOverflow, + TResult? Function(String errorMessage)? invalidPublicKey, + TResult? Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult? Function()? invalidXOnlyPublicKey, + TResult? Function(String errorMessage)? invalidEcdsaSignature, + TResult? Function(String errorMessage)? invalidTaprootSignature, + TResult? Function()? invalidControlBlock, + TResult? Function()? invalidLeafVersion, + TResult? Function()? taproot, + TResult? Function(String errorMessage)? tapTree, + TResult? Function()? xPubKey, + TResult? Function(String errorMessage)? version, + TResult? Function()? partialDataConsumption, + TResult? Function(String errorMessage)? io, + TResult? Function()? otherPsbtErr, + }) { + return unsignedTxHasScriptWitnesses?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidMagic, + TResult Function()? missingUtxo, + TResult Function()? invalidSeparator, + TResult Function()? psbtUtxoOutOfBounds, + TResult Function(String key)? invalidKey, + TResult Function()? invalidProprietaryKey, + TResult Function(String key)? duplicateKey, + TResult Function()? unsignedTxHasScriptSigs, + TResult Function()? unsignedTxHasScriptWitnesses, + TResult Function()? mustHaveUnsignedTx, + TResult Function()? noMorePairs, + TResult Function()? unexpectedUnsignedTx, + TResult Function(int sighash)? nonStandardSighashType, + TResult Function(String hash)? invalidHash, + TResult Function()? invalidPreimageHashPair, + TResult Function(String xpub)? combineInconsistentKeySources, + TResult Function(String encodingError)? consensusEncoding, + TResult Function()? negativeFee, + TResult Function()? feeOverflow, + TResult Function(String errorMessage)? invalidPublicKey, + TResult Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult Function()? invalidXOnlyPublicKey, + TResult Function(String errorMessage)? invalidEcdsaSignature, + TResult Function(String errorMessage)? invalidTaprootSignature, + TResult Function()? invalidControlBlock, + TResult Function()? invalidLeafVersion, + TResult Function()? taproot, + TResult Function(String errorMessage)? tapTree, + TResult Function()? xPubKey, + TResult Function(String errorMessage)? version, + TResult Function()? partialDataConsumption, + TResult Function(String errorMessage)? io, + TResult Function()? otherPsbtErr, + required TResult orElse(), + }) { + if (unsignedTxHasScriptWitnesses != null) { + return unsignedTxHasScriptWitnesses(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(PsbtError_InvalidMagic value) invalidMagic, + required TResult Function(PsbtError_MissingUtxo value) missingUtxo, + required TResult Function(PsbtError_InvalidSeparator value) + invalidSeparator, + required TResult Function(PsbtError_PsbtUtxoOutOfBounds value) + psbtUtxoOutOfBounds, + required TResult Function(PsbtError_InvalidKey value) invalidKey, + required TResult Function(PsbtError_InvalidProprietaryKey value) + invalidProprietaryKey, + required TResult Function(PsbtError_DuplicateKey value) duplicateKey, + required TResult Function(PsbtError_UnsignedTxHasScriptSigs value) + unsignedTxHasScriptSigs, + required TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value) + unsignedTxHasScriptWitnesses, + required TResult Function(PsbtError_MustHaveUnsignedTx value) + mustHaveUnsignedTx, + required TResult Function(PsbtError_NoMorePairs value) noMorePairs, + required TResult Function(PsbtError_UnexpectedUnsignedTx value) + unexpectedUnsignedTx, + required TResult Function(PsbtError_NonStandardSighashType value) + nonStandardSighashType, + required TResult Function(PsbtError_InvalidHash value) invalidHash, + required TResult Function(PsbtError_InvalidPreimageHashPair value) + invalidPreimageHashPair, + required TResult Function(PsbtError_CombineInconsistentKeySources value) + combineInconsistentKeySources, + required TResult Function(PsbtError_ConsensusEncoding value) + consensusEncoding, + required TResult Function(PsbtError_NegativeFee value) negativeFee, + required TResult Function(PsbtError_FeeOverflow value) feeOverflow, + required TResult Function(PsbtError_InvalidPublicKey value) + invalidPublicKey, + required TResult Function(PsbtError_InvalidSecp256k1PublicKey value) + invalidSecp256K1PublicKey, + required TResult Function(PsbtError_InvalidXOnlyPublicKey value) + invalidXOnlyPublicKey, + required TResult Function(PsbtError_InvalidEcdsaSignature value) + invalidEcdsaSignature, + required TResult Function(PsbtError_InvalidTaprootSignature value) + invalidTaprootSignature, + required TResult Function(PsbtError_InvalidControlBlock value) + invalidControlBlock, + required TResult Function(PsbtError_InvalidLeafVersion value) + invalidLeafVersion, + required TResult Function(PsbtError_Taproot value) taproot, + required TResult Function(PsbtError_TapTree value) tapTree, + required TResult Function(PsbtError_XPubKey value) xPubKey, + required TResult Function(PsbtError_Version value) version, + required TResult Function(PsbtError_PartialDataConsumption value) + partialDataConsumption, + required TResult Function(PsbtError_Io value) io, + required TResult Function(PsbtError_OtherPsbtErr value) otherPsbtErr, + }) { + return unsignedTxHasScriptWitnesses(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult? Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult? Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult? Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult? Function(PsbtError_InvalidKey value)? invalidKey, + TResult? Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult? Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult? Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult? Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult? Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult? Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult? Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult? Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult? Function(PsbtError_InvalidHash value)? invalidHash, + TResult? Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult? Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult? Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult? Function(PsbtError_NegativeFee value)? negativeFee, + TResult? Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult? Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult? Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult? Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult? Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult? Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult? Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult? Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult? Function(PsbtError_Taproot value)? taproot, + TResult? Function(PsbtError_TapTree value)? tapTree, + TResult? Function(PsbtError_XPubKey value)? xPubKey, + TResult? Function(PsbtError_Version value)? version, + TResult? Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult? Function(PsbtError_Io value)? io, + TResult? Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + }) { + return unsignedTxHasScriptWitnesses?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult Function(PsbtError_InvalidKey value)? invalidKey, + TResult Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult Function(PsbtError_InvalidHash value)? invalidHash, + TResult Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult Function(PsbtError_NegativeFee value)? negativeFee, + TResult Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult Function(PsbtError_Taproot value)? taproot, + TResult Function(PsbtError_TapTree value)? tapTree, + TResult Function(PsbtError_XPubKey value)? xPubKey, + TResult Function(PsbtError_Version value)? version, + TResult Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult Function(PsbtError_Io value)? io, + TResult Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + required TResult orElse(), + }) { + if (unsignedTxHasScriptWitnesses != null) { + return unsignedTxHasScriptWitnesses(this); + } + return orElse(); + } +} + +abstract class PsbtError_UnsignedTxHasScriptWitnesses extends PsbtError { + const factory PsbtError_UnsignedTxHasScriptWitnesses() = + _$PsbtError_UnsignedTxHasScriptWitnessesImpl; + const PsbtError_UnsignedTxHasScriptWitnesses._() : super._(); +} + +/// @nodoc +abstract class _$$PsbtError_MustHaveUnsignedTxImplCopyWith<$Res> { + factory _$$PsbtError_MustHaveUnsignedTxImplCopyWith( + _$PsbtError_MustHaveUnsignedTxImpl value, + $Res Function(_$PsbtError_MustHaveUnsignedTxImpl) then) = + __$$PsbtError_MustHaveUnsignedTxImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$PsbtError_MustHaveUnsignedTxImplCopyWithImpl<$Res> + extends _$PsbtErrorCopyWithImpl<$Res, _$PsbtError_MustHaveUnsignedTxImpl> + implements _$$PsbtError_MustHaveUnsignedTxImplCopyWith<$Res> { + __$$PsbtError_MustHaveUnsignedTxImplCopyWithImpl( + _$PsbtError_MustHaveUnsignedTxImpl _value, + $Res Function(_$PsbtError_MustHaveUnsignedTxImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$PsbtError_MustHaveUnsignedTxImpl extends PsbtError_MustHaveUnsignedTx { + const _$PsbtError_MustHaveUnsignedTxImpl() : super._(); + + @override + String toString() { + return 'PsbtError.mustHaveUnsignedTx()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PsbtError_MustHaveUnsignedTxImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidMagic, + required TResult Function() missingUtxo, + required TResult Function() invalidSeparator, + required TResult Function() psbtUtxoOutOfBounds, + required TResult Function(String key) invalidKey, + required TResult Function() invalidProprietaryKey, + required TResult Function(String key) duplicateKey, + required TResult Function() unsignedTxHasScriptSigs, + required TResult Function() unsignedTxHasScriptWitnesses, + required TResult Function() mustHaveUnsignedTx, + required TResult Function() noMorePairs, + required TResult Function() unexpectedUnsignedTx, + required TResult Function(int sighash) nonStandardSighashType, + required TResult Function(String hash) invalidHash, + required TResult Function() invalidPreimageHashPair, + required TResult Function(String xpub) combineInconsistentKeySources, + required TResult Function(String encodingError) consensusEncoding, + required TResult Function() negativeFee, + required TResult Function() feeOverflow, + required TResult Function(String errorMessage) invalidPublicKey, + required TResult Function(String secp256K1Error) invalidSecp256K1PublicKey, + required TResult Function() invalidXOnlyPublicKey, + required TResult Function(String errorMessage) invalidEcdsaSignature, + required TResult Function(String errorMessage) invalidTaprootSignature, + required TResult Function() invalidControlBlock, + required TResult Function() invalidLeafVersion, + required TResult Function() taproot, + required TResult Function(String errorMessage) tapTree, + required TResult Function() xPubKey, + required TResult Function(String errorMessage) version, + required TResult Function() partialDataConsumption, + required TResult Function(String errorMessage) io, + required TResult Function() otherPsbtErr, + }) { + return mustHaveUnsignedTx(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidMagic, + TResult? Function()? missingUtxo, + TResult? Function()? invalidSeparator, + TResult? Function()? psbtUtxoOutOfBounds, + TResult? Function(String key)? invalidKey, + TResult? Function()? invalidProprietaryKey, + TResult? Function(String key)? duplicateKey, + TResult? Function()? unsignedTxHasScriptSigs, + TResult? Function()? unsignedTxHasScriptWitnesses, + TResult? Function()? mustHaveUnsignedTx, + TResult? Function()? noMorePairs, + TResult? Function()? unexpectedUnsignedTx, + TResult? Function(int sighash)? nonStandardSighashType, + TResult? Function(String hash)? invalidHash, + TResult? Function()? invalidPreimageHashPair, + TResult? Function(String xpub)? combineInconsistentKeySources, + TResult? Function(String encodingError)? consensusEncoding, + TResult? Function()? negativeFee, + TResult? Function()? feeOverflow, + TResult? Function(String errorMessage)? invalidPublicKey, + TResult? Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult? Function()? invalidXOnlyPublicKey, + TResult? Function(String errorMessage)? invalidEcdsaSignature, + TResult? Function(String errorMessage)? invalidTaprootSignature, + TResult? Function()? invalidControlBlock, + TResult? Function()? invalidLeafVersion, + TResult? Function()? taproot, + TResult? Function(String errorMessage)? tapTree, + TResult? Function()? xPubKey, + TResult? Function(String errorMessage)? version, + TResult? Function()? partialDataConsumption, + TResult? Function(String errorMessage)? io, + TResult? Function()? otherPsbtErr, + }) { + return mustHaveUnsignedTx?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidMagic, + TResult Function()? missingUtxo, + TResult Function()? invalidSeparator, + TResult Function()? psbtUtxoOutOfBounds, + TResult Function(String key)? invalidKey, + TResult Function()? invalidProprietaryKey, + TResult Function(String key)? duplicateKey, + TResult Function()? unsignedTxHasScriptSigs, + TResult Function()? unsignedTxHasScriptWitnesses, + TResult Function()? mustHaveUnsignedTx, + TResult Function()? noMorePairs, + TResult Function()? unexpectedUnsignedTx, + TResult Function(int sighash)? nonStandardSighashType, + TResult Function(String hash)? invalidHash, + TResult Function()? invalidPreimageHashPair, + TResult Function(String xpub)? combineInconsistentKeySources, + TResult Function(String encodingError)? consensusEncoding, + TResult Function()? negativeFee, + TResult Function()? feeOverflow, + TResult Function(String errorMessage)? invalidPublicKey, + TResult Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult Function()? invalidXOnlyPublicKey, + TResult Function(String errorMessage)? invalidEcdsaSignature, + TResult Function(String errorMessage)? invalidTaprootSignature, + TResult Function()? invalidControlBlock, + TResult Function()? invalidLeafVersion, + TResult Function()? taproot, + TResult Function(String errorMessage)? tapTree, + TResult Function()? xPubKey, + TResult Function(String errorMessage)? version, + TResult Function()? partialDataConsumption, + TResult Function(String errorMessage)? io, + TResult Function()? otherPsbtErr, + required TResult orElse(), + }) { + if (mustHaveUnsignedTx != null) { + return mustHaveUnsignedTx(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(PsbtError_InvalidMagic value) invalidMagic, + required TResult Function(PsbtError_MissingUtxo value) missingUtxo, + required TResult Function(PsbtError_InvalidSeparator value) + invalidSeparator, + required TResult Function(PsbtError_PsbtUtxoOutOfBounds value) + psbtUtxoOutOfBounds, + required TResult Function(PsbtError_InvalidKey value) invalidKey, + required TResult Function(PsbtError_InvalidProprietaryKey value) + invalidProprietaryKey, + required TResult Function(PsbtError_DuplicateKey value) duplicateKey, + required TResult Function(PsbtError_UnsignedTxHasScriptSigs value) + unsignedTxHasScriptSigs, + required TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value) + unsignedTxHasScriptWitnesses, + required TResult Function(PsbtError_MustHaveUnsignedTx value) + mustHaveUnsignedTx, + required TResult Function(PsbtError_NoMorePairs value) noMorePairs, + required TResult Function(PsbtError_UnexpectedUnsignedTx value) + unexpectedUnsignedTx, + required TResult Function(PsbtError_NonStandardSighashType value) + nonStandardSighashType, + required TResult Function(PsbtError_InvalidHash value) invalidHash, + required TResult Function(PsbtError_InvalidPreimageHashPair value) + invalidPreimageHashPair, + required TResult Function(PsbtError_CombineInconsistentKeySources value) + combineInconsistentKeySources, + required TResult Function(PsbtError_ConsensusEncoding value) + consensusEncoding, + required TResult Function(PsbtError_NegativeFee value) negativeFee, + required TResult Function(PsbtError_FeeOverflow value) feeOverflow, + required TResult Function(PsbtError_InvalidPublicKey value) + invalidPublicKey, + required TResult Function(PsbtError_InvalidSecp256k1PublicKey value) + invalidSecp256K1PublicKey, + required TResult Function(PsbtError_InvalidXOnlyPublicKey value) + invalidXOnlyPublicKey, + required TResult Function(PsbtError_InvalidEcdsaSignature value) + invalidEcdsaSignature, + required TResult Function(PsbtError_InvalidTaprootSignature value) + invalidTaprootSignature, + required TResult Function(PsbtError_InvalidControlBlock value) + invalidControlBlock, + required TResult Function(PsbtError_InvalidLeafVersion value) + invalidLeafVersion, + required TResult Function(PsbtError_Taproot value) taproot, + required TResult Function(PsbtError_TapTree value) tapTree, + required TResult Function(PsbtError_XPubKey value) xPubKey, + required TResult Function(PsbtError_Version value) version, + required TResult Function(PsbtError_PartialDataConsumption value) + partialDataConsumption, + required TResult Function(PsbtError_Io value) io, + required TResult Function(PsbtError_OtherPsbtErr value) otherPsbtErr, + }) { + return mustHaveUnsignedTx(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult? Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult? Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult? Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult? Function(PsbtError_InvalidKey value)? invalidKey, + TResult? Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult? Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult? Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult? Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult? Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult? Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult? Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult? Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult? Function(PsbtError_InvalidHash value)? invalidHash, + TResult? Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult? Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult? Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult? Function(PsbtError_NegativeFee value)? negativeFee, + TResult? Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult? Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult? Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult? Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult? Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult? Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult? Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult? Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult? Function(PsbtError_Taproot value)? taproot, + TResult? Function(PsbtError_TapTree value)? tapTree, + TResult? Function(PsbtError_XPubKey value)? xPubKey, + TResult? Function(PsbtError_Version value)? version, + TResult? Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult? Function(PsbtError_Io value)? io, + TResult? Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + }) { + return mustHaveUnsignedTx?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult Function(PsbtError_InvalidKey value)? invalidKey, + TResult Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult Function(PsbtError_InvalidHash value)? invalidHash, + TResult Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult Function(PsbtError_NegativeFee value)? negativeFee, + TResult Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult Function(PsbtError_Taproot value)? taproot, + TResult Function(PsbtError_TapTree value)? tapTree, + TResult Function(PsbtError_XPubKey value)? xPubKey, + TResult Function(PsbtError_Version value)? version, + TResult Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult Function(PsbtError_Io value)? io, + TResult Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + required TResult orElse(), + }) { + if (mustHaveUnsignedTx != null) { + return mustHaveUnsignedTx(this); + } + return orElse(); + } +} + +abstract class PsbtError_MustHaveUnsignedTx extends PsbtError { + const factory PsbtError_MustHaveUnsignedTx() = + _$PsbtError_MustHaveUnsignedTxImpl; + const PsbtError_MustHaveUnsignedTx._() : super._(); +} + +/// @nodoc +abstract class _$$PsbtError_NoMorePairsImplCopyWith<$Res> { + factory _$$PsbtError_NoMorePairsImplCopyWith( + _$PsbtError_NoMorePairsImpl value, + $Res Function(_$PsbtError_NoMorePairsImpl) then) = + __$$PsbtError_NoMorePairsImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$PsbtError_NoMorePairsImplCopyWithImpl<$Res> + extends _$PsbtErrorCopyWithImpl<$Res, _$PsbtError_NoMorePairsImpl> + implements _$$PsbtError_NoMorePairsImplCopyWith<$Res> { + __$$PsbtError_NoMorePairsImplCopyWithImpl(_$PsbtError_NoMorePairsImpl _value, + $Res Function(_$PsbtError_NoMorePairsImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$PsbtError_NoMorePairsImpl extends PsbtError_NoMorePairs { + const _$PsbtError_NoMorePairsImpl() : super._(); + + @override + String toString() { + return 'PsbtError.noMorePairs()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PsbtError_NoMorePairsImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidMagic, + required TResult Function() missingUtxo, + required TResult Function() invalidSeparator, + required TResult Function() psbtUtxoOutOfBounds, + required TResult Function(String key) invalidKey, + required TResult Function() invalidProprietaryKey, + required TResult Function(String key) duplicateKey, + required TResult Function() unsignedTxHasScriptSigs, + required TResult Function() unsignedTxHasScriptWitnesses, + required TResult Function() mustHaveUnsignedTx, + required TResult Function() noMorePairs, + required TResult Function() unexpectedUnsignedTx, + required TResult Function(int sighash) nonStandardSighashType, + required TResult Function(String hash) invalidHash, + required TResult Function() invalidPreimageHashPair, + required TResult Function(String xpub) combineInconsistentKeySources, + required TResult Function(String encodingError) consensusEncoding, + required TResult Function() negativeFee, + required TResult Function() feeOverflow, + required TResult Function(String errorMessage) invalidPublicKey, + required TResult Function(String secp256K1Error) invalidSecp256K1PublicKey, + required TResult Function() invalidXOnlyPublicKey, + required TResult Function(String errorMessage) invalidEcdsaSignature, + required TResult Function(String errorMessage) invalidTaprootSignature, + required TResult Function() invalidControlBlock, + required TResult Function() invalidLeafVersion, + required TResult Function() taproot, + required TResult Function(String errorMessage) tapTree, + required TResult Function() xPubKey, + required TResult Function(String errorMessage) version, + required TResult Function() partialDataConsumption, + required TResult Function(String errorMessage) io, + required TResult Function() otherPsbtErr, + }) { + return noMorePairs(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidMagic, + TResult? Function()? missingUtxo, + TResult? Function()? invalidSeparator, + TResult? Function()? psbtUtxoOutOfBounds, + TResult? Function(String key)? invalidKey, + TResult? Function()? invalidProprietaryKey, + TResult? Function(String key)? duplicateKey, + TResult? Function()? unsignedTxHasScriptSigs, + TResult? Function()? unsignedTxHasScriptWitnesses, + TResult? Function()? mustHaveUnsignedTx, + TResult? Function()? noMorePairs, + TResult? Function()? unexpectedUnsignedTx, + TResult? Function(int sighash)? nonStandardSighashType, + TResult? Function(String hash)? invalidHash, + TResult? Function()? invalidPreimageHashPair, + TResult? Function(String xpub)? combineInconsistentKeySources, + TResult? Function(String encodingError)? consensusEncoding, + TResult? Function()? negativeFee, + TResult? Function()? feeOverflow, + TResult? Function(String errorMessage)? invalidPublicKey, + TResult? Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult? Function()? invalidXOnlyPublicKey, + TResult? Function(String errorMessage)? invalidEcdsaSignature, + TResult? Function(String errorMessage)? invalidTaprootSignature, + TResult? Function()? invalidControlBlock, + TResult? Function()? invalidLeafVersion, + TResult? Function()? taproot, + TResult? Function(String errorMessage)? tapTree, + TResult? Function()? xPubKey, + TResult? Function(String errorMessage)? version, + TResult? Function()? partialDataConsumption, + TResult? Function(String errorMessage)? io, + TResult? Function()? otherPsbtErr, + }) { + return noMorePairs?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidMagic, + TResult Function()? missingUtxo, + TResult Function()? invalidSeparator, + TResult Function()? psbtUtxoOutOfBounds, + TResult Function(String key)? invalidKey, + TResult Function()? invalidProprietaryKey, + TResult Function(String key)? duplicateKey, + TResult Function()? unsignedTxHasScriptSigs, + TResult Function()? unsignedTxHasScriptWitnesses, + TResult Function()? mustHaveUnsignedTx, + TResult Function()? noMorePairs, + TResult Function()? unexpectedUnsignedTx, + TResult Function(int sighash)? nonStandardSighashType, + TResult Function(String hash)? invalidHash, + TResult Function()? invalidPreimageHashPair, + TResult Function(String xpub)? combineInconsistentKeySources, + TResult Function(String encodingError)? consensusEncoding, + TResult Function()? negativeFee, + TResult Function()? feeOverflow, + TResult Function(String errorMessage)? invalidPublicKey, + TResult Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult Function()? invalidXOnlyPublicKey, + TResult Function(String errorMessage)? invalidEcdsaSignature, + TResult Function(String errorMessage)? invalidTaprootSignature, + TResult Function()? invalidControlBlock, + TResult Function()? invalidLeafVersion, + TResult Function()? taproot, + TResult Function(String errorMessage)? tapTree, + TResult Function()? xPubKey, + TResult Function(String errorMessage)? version, + TResult Function()? partialDataConsumption, + TResult Function(String errorMessage)? io, + TResult Function()? otherPsbtErr, + required TResult orElse(), + }) { + if (noMorePairs != null) { + return noMorePairs(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(PsbtError_InvalidMagic value) invalidMagic, + required TResult Function(PsbtError_MissingUtxo value) missingUtxo, + required TResult Function(PsbtError_InvalidSeparator value) + invalidSeparator, + required TResult Function(PsbtError_PsbtUtxoOutOfBounds value) + psbtUtxoOutOfBounds, + required TResult Function(PsbtError_InvalidKey value) invalidKey, + required TResult Function(PsbtError_InvalidProprietaryKey value) + invalidProprietaryKey, + required TResult Function(PsbtError_DuplicateKey value) duplicateKey, + required TResult Function(PsbtError_UnsignedTxHasScriptSigs value) + unsignedTxHasScriptSigs, + required TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value) + unsignedTxHasScriptWitnesses, + required TResult Function(PsbtError_MustHaveUnsignedTx value) + mustHaveUnsignedTx, + required TResult Function(PsbtError_NoMorePairs value) noMorePairs, + required TResult Function(PsbtError_UnexpectedUnsignedTx value) + unexpectedUnsignedTx, + required TResult Function(PsbtError_NonStandardSighashType value) + nonStandardSighashType, + required TResult Function(PsbtError_InvalidHash value) invalidHash, + required TResult Function(PsbtError_InvalidPreimageHashPair value) + invalidPreimageHashPair, + required TResult Function(PsbtError_CombineInconsistentKeySources value) + combineInconsistentKeySources, + required TResult Function(PsbtError_ConsensusEncoding value) + consensusEncoding, + required TResult Function(PsbtError_NegativeFee value) negativeFee, + required TResult Function(PsbtError_FeeOverflow value) feeOverflow, + required TResult Function(PsbtError_InvalidPublicKey value) + invalidPublicKey, + required TResult Function(PsbtError_InvalidSecp256k1PublicKey value) + invalidSecp256K1PublicKey, + required TResult Function(PsbtError_InvalidXOnlyPublicKey value) + invalidXOnlyPublicKey, + required TResult Function(PsbtError_InvalidEcdsaSignature value) + invalidEcdsaSignature, + required TResult Function(PsbtError_InvalidTaprootSignature value) + invalidTaprootSignature, + required TResult Function(PsbtError_InvalidControlBlock value) + invalidControlBlock, + required TResult Function(PsbtError_InvalidLeafVersion value) + invalidLeafVersion, + required TResult Function(PsbtError_Taproot value) taproot, + required TResult Function(PsbtError_TapTree value) tapTree, + required TResult Function(PsbtError_XPubKey value) xPubKey, + required TResult Function(PsbtError_Version value) version, + required TResult Function(PsbtError_PartialDataConsumption value) + partialDataConsumption, + required TResult Function(PsbtError_Io value) io, + required TResult Function(PsbtError_OtherPsbtErr value) otherPsbtErr, + }) { + return noMorePairs(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult? Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult? Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult? Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult? Function(PsbtError_InvalidKey value)? invalidKey, + TResult? Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult? Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult? Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult? Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult? Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult? Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult? Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult? Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult? Function(PsbtError_InvalidHash value)? invalidHash, + TResult? Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult? Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult? Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult? Function(PsbtError_NegativeFee value)? negativeFee, + TResult? Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult? Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult? Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult? Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult? Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult? Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult? Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult? Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult? Function(PsbtError_Taproot value)? taproot, + TResult? Function(PsbtError_TapTree value)? tapTree, + TResult? Function(PsbtError_XPubKey value)? xPubKey, + TResult? Function(PsbtError_Version value)? version, + TResult? Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult? Function(PsbtError_Io value)? io, + TResult? Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + }) { + return noMorePairs?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult Function(PsbtError_InvalidKey value)? invalidKey, + TResult Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult Function(PsbtError_InvalidHash value)? invalidHash, + TResult Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult Function(PsbtError_NegativeFee value)? negativeFee, + TResult Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult Function(PsbtError_Taproot value)? taproot, + TResult Function(PsbtError_TapTree value)? tapTree, + TResult Function(PsbtError_XPubKey value)? xPubKey, + TResult Function(PsbtError_Version value)? version, + TResult Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult Function(PsbtError_Io value)? io, + TResult Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + required TResult orElse(), + }) { + if (noMorePairs != null) { + return noMorePairs(this); + } + return orElse(); + } +} + +abstract class PsbtError_NoMorePairs extends PsbtError { + const factory PsbtError_NoMorePairs() = _$PsbtError_NoMorePairsImpl; + const PsbtError_NoMorePairs._() : super._(); +} + +/// @nodoc +abstract class _$$PsbtError_UnexpectedUnsignedTxImplCopyWith<$Res> { + factory _$$PsbtError_UnexpectedUnsignedTxImplCopyWith( + _$PsbtError_UnexpectedUnsignedTxImpl value, + $Res Function(_$PsbtError_UnexpectedUnsignedTxImpl) then) = + __$$PsbtError_UnexpectedUnsignedTxImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$PsbtError_UnexpectedUnsignedTxImplCopyWithImpl<$Res> + extends _$PsbtErrorCopyWithImpl<$Res, _$PsbtError_UnexpectedUnsignedTxImpl> + implements _$$PsbtError_UnexpectedUnsignedTxImplCopyWith<$Res> { + __$$PsbtError_UnexpectedUnsignedTxImplCopyWithImpl( + _$PsbtError_UnexpectedUnsignedTxImpl _value, + $Res Function(_$PsbtError_UnexpectedUnsignedTxImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$PsbtError_UnexpectedUnsignedTxImpl + extends PsbtError_UnexpectedUnsignedTx { + const _$PsbtError_UnexpectedUnsignedTxImpl() : super._(); + + @override + String toString() { + return 'PsbtError.unexpectedUnsignedTx()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PsbtError_UnexpectedUnsignedTxImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidMagic, + required TResult Function() missingUtxo, + required TResult Function() invalidSeparator, + required TResult Function() psbtUtxoOutOfBounds, + required TResult Function(String key) invalidKey, + required TResult Function() invalidProprietaryKey, + required TResult Function(String key) duplicateKey, + required TResult Function() unsignedTxHasScriptSigs, + required TResult Function() unsignedTxHasScriptWitnesses, + required TResult Function() mustHaveUnsignedTx, + required TResult Function() noMorePairs, + required TResult Function() unexpectedUnsignedTx, + required TResult Function(int sighash) nonStandardSighashType, + required TResult Function(String hash) invalidHash, + required TResult Function() invalidPreimageHashPair, + required TResult Function(String xpub) combineInconsistentKeySources, + required TResult Function(String encodingError) consensusEncoding, + required TResult Function() negativeFee, + required TResult Function() feeOverflow, + required TResult Function(String errorMessage) invalidPublicKey, + required TResult Function(String secp256K1Error) invalidSecp256K1PublicKey, + required TResult Function() invalidXOnlyPublicKey, + required TResult Function(String errorMessage) invalidEcdsaSignature, + required TResult Function(String errorMessage) invalidTaprootSignature, + required TResult Function() invalidControlBlock, + required TResult Function() invalidLeafVersion, + required TResult Function() taproot, + required TResult Function(String errorMessage) tapTree, + required TResult Function() xPubKey, + required TResult Function(String errorMessage) version, + required TResult Function() partialDataConsumption, + required TResult Function(String errorMessage) io, + required TResult Function() otherPsbtErr, + }) { + return unexpectedUnsignedTx(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidMagic, + TResult? Function()? missingUtxo, + TResult? Function()? invalidSeparator, + TResult? Function()? psbtUtxoOutOfBounds, + TResult? Function(String key)? invalidKey, + TResult? Function()? invalidProprietaryKey, + TResult? Function(String key)? duplicateKey, + TResult? Function()? unsignedTxHasScriptSigs, + TResult? Function()? unsignedTxHasScriptWitnesses, + TResult? Function()? mustHaveUnsignedTx, + TResult? Function()? noMorePairs, + TResult? Function()? unexpectedUnsignedTx, + TResult? Function(int sighash)? nonStandardSighashType, + TResult? Function(String hash)? invalidHash, + TResult? Function()? invalidPreimageHashPair, + TResult? Function(String xpub)? combineInconsistentKeySources, + TResult? Function(String encodingError)? consensusEncoding, + TResult? Function()? negativeFee, + TResult? Function()? feeOverflow, + TResult? Function(String errorMessage)? invalidPublicKey, + TResult? Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult? Function()? invalidXOnlyPublicKey, + TResult? Function(String errorMessage)? invalidEcdsaSignature, + TResult? Function(String errorMessage)? invalidTaprootSignature, + TResult? Function()? invalidControlBlock, + TResult? Function()? invalidLeafVersion, + TResult? Function()? taproot, + TResult? Function(String errorMessage)? tapTree, + TResult? Function()? xPubKey, + TResult? Function(String errorMessage)? version, + TResult? Function()? partialDataConsumption, + TResult? Function(String errorMessage)? io, + TResult? Function()? otherPsbtErr, + }) { + return unexpectedUnsignedTx?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidMagic, + TResult Function()? missingUtxo, + TResult Function()? invalidSeparator, + TResult Function()? psbtUtxoOutOfBounds, + TResult Function(String key)? invalidKey, + TResult Function()? invalidProprietaryKey, + TResult Function(String key)? duplicateKey, + TResult Function()? unsignedTxHasScriptSigs, + TResult Function()? unsignedTxHasScriptWitnesses, + TResult Function()? mustHaveUnsignedTx, + TResult Function()? noMorePairs, + TResult Function()? unexpectedUnsignedTx, + TResult Function(int sighash)? nonStandardSighashType, + TResult Function(String hash)? invalidHash, + TResult Function()? invalidPreimageHashPair, + TResult Function(String xpub)? combineInconsistentKeySources, + TResult Function(String encodingError)? consensusEncoding, + TResult Function()? negativeFee, + TResult Function()? feeOverflow, + TResult Function(String errorMessage)? invalidPublicKey, + TResult Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult Function()? invalidXOnlyPublicKey, + TResult Function(String errorMessage)? invalidEcdsaSignature, + TResult Function(String errorMessage)? invalidTaprootSignature, + TResult Function()? invalidControlBlock, + TResult Function()? invalidLeafVersion, + TResult Function()? taproot, + TResult Function(String errorMessage)? tapTree, + TResult Function()? xPubKey, + TResult Function(String errorMessage)? version, + TResult Function()? partialDataConsumption, + TResult Function(String errorMessage)? io, + TResult Function()? otherPsbtErr, + required TResult orElse(), + }) { + if (unexpectedUnsignedTx != null) { + return unexpectedUnsignedTx(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(PsbtError_InvalidMagic value) invalidMagic, + required TResult Function(PsbtError_MissingUtxo value) missingUtxo, + required TResult Function(PsbtError_InvalidSeparator value) + invalidSeparator, + required TResult Function(PsbtError_PsbtUtxoOutOfBounds value) + psbtUtxoOutOfBounds, + required TResult Function(PsbtError_InvalidKey value) invalidKey, + required TResult Function(PsbtError_InvalidProprietaryKey value) + invalidProprietaryKey, + required TResult Function(PsbtError_DuplicateKey value) duplicateKey, + required TResult Function(PsbtError_UnsignedTxHasScriptSigs value) + unsignedTxHasScriptSigs, + required TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value) + unsignedTxHasScriptWitnesses, + required TResult Function(PsbtError_MustHaveUnsignedTx value) + mustHaveUnsignedTx, + required TResult Function(PsbtError_NoMorePairs value) noMorePairs, + required TResult Function(PsbtError_UnexpectedUnsignedTx value) + unexpectedUnsignedTx, + required TResult Function(PsbtError_NonStandardSighashType value) + nonStandardSighashType, + required TResult Function(PsbtError_InvalidHash value) invalidHash, + required TResult Function(PsbtError_InvalidPreimageHashPair value) + invalidPreimageHashPair, + required TResult Function(PsbtError_CombineInconsistentKeySources value) + combineInconsistentKeySources, + required TResult Function(PsbtError_ConsensusEncoding value) + consensusEncoding, + required TResult Function(PsbtError_NegativeFee value) negativeFee, + required TResult Function(PsbtError_FeeOverflow value) feeOverflow, + required TResult Function(PsbtError_InvalidPublicKey value) + invalidPublicKey, + required TResult Function(PsbtError_InvalidSecp256k1PublicKey value) + invalidSecp256K1PublicKey, + required TResult Function(PsbtError_InvalidXOnlyPublicKey value) + invalidXOnlyPublicKey, + required TResult Function(PsbtError_InvalidEcdsaSignature value) + invalidEcdsaSignature, + required TResult Function(PsbtError_InvalidTaprootSignature value) + invalidTaprootSignature, + required TResult Function(PsbtError_InvalidControlBlock value) + invalidControlBlock, + required TResult Function(PsbtError_InvalidLeafVersion value) + invalidLeafVersion, + required TResult Function(PsbtError_Taproot value) taproot, + required TResult Function(PsbtError_TapTree value) tapTree, + required TResult Function(PsbtError_XPubKey value) xPubKey, + required TResult Function(PsbtError_Version value) version, + required TResult Function(PsbtError_PartialDataConsumption value) + partialDataConsumption, + required TResult Function(PsbtError_Io value) io, + required TResult Function(PsbtError_OtherPsbtErr value) otherPsbtErr, + }) { + return unexpectedUnsignedTx(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult? Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult? Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult? Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult? Function(PsbtError_InvalidKey value)? invalidKey, + TResult? Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult? Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult? Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult? Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult? Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult? Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult? Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult? Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult? Function(PsbtError_InvalidHash value)? invalidHash, + TResult? Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult? Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult? Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult? Function(PsbtError_NegativeFee value)? negativeFee, + TResult? Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult? Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult? Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult? Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult? Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult? Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult? Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult? Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult? Function(PsbtError_Taproot value)? taproot, + TResult? Function(PsbtError_TapTree value)? tapTree, + TResult? Function(PsbtError_XPubKey value)? xPubKey, + TResult? Function(PsbtError_Version value)? version, + TResult? Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult? Function(PsbtError_Io value)? io, + TResult? Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + }) { + return unexpectedUnsignedTx?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult Function(PsbtError_InvalidKey value)? invalidKey, + TResult Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult Function(PsbtError_InvalidHash value)? invalidHash, + TResult Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult Function(PsbtError_NegativeFee value)? negativeFee, + TResult Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult Function(PsbtError_Taproot value)? taproot, + TResult Function(PsbtError_TapTree value)? tapTree, + TResult Function(PsbtError_XPubKey value)? xPubKey, + TResult Function(PsbtError_Version value)? version, + TResult Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult Function(PsbtError_Io value)? io, + TResult Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + required TResult orElse(), + }) { + if (unexpectedUnsignedTx != null) { + return unexpectedUnsignedTx(this); + } + return orElse(); + } +} + +abstract class PsbtError_UnexpectedUnsignedTx extends PsbtError { + const factory PsbtError_UnexpectedUnsignedTx() = + _$PsbtError_UnexpectedUnsignedTxImpl; + const PsbtError_UnexpectedUnsignedTx._() : super._(); +} + +/// @nodoc +abstract class _$$PsbtError_NonStandardSighashTypeImplCopyWith<$Res> { + factory _$$PsbtError_NonStandardSighashTypeImplCopyWith( + _$PsbtError_NonStandardSighashTypeImpl value, + $Res Function(_$PsbtError_NonStandardSighashTypeImpl) then) = + __$$PsbtError_NonStandardSighashTypeImplCopyWithImpl<$Res>; + @useResult + $Res call({int sighash}); +} + +/// @nodoc +class __$$PsbtError_NonStandardSighashTypeImplCopyWithImpl<$Res> + extends _$PsbtErrorCopyWithImpl<$Res, + _$PsbtError_NonStandardSighashTypeImpl> + implements _$$PsbtError_NonStandardSighashTypeImplCopyWith<$Res> { + __$$PsbtError_NonStandardSighashTypeImplCopyWithImpl( + _$PsbtError_NonStandardSighashTypeImpl _value, + $Res Function(_$PsbtError_NonStandardSighashTypeImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? sighash = null, + }) { + return _then(_$PsbtError_NonStandardSighashTypeImpl( + sighash: null == sighash + ? _value.sighash + : sighash // ignore: cast_nullable_to_non_nullable + as int, + )); + } +} + +/// @nodoc + +class _$PsbtError_NonStandardSighashTypeImpl + extends PsbtError_NonStandardSighashType { + const _$PsbtError_NonStandardSighashTypeImpl({required this.sighash}) + : super._(); + + @override + final int sighash; + + @override + String toString() { + return 'PsbtError.nonStandardSighashType(sighash: $sighash)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PsbtError_NonStandardSighashTypeImpl && + (identical(other.sighash, sighash) || other.sighash == sighash)); + } + + @override + int get hashCode => Object.hash(runtimeType, sighash); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$PsbtError_NonStandardSighashTypeImplCopyWith< + _$PsbtError_NonStandardSighashTypeImpl> + get copyWith => __$$PsbtError_NonStandardSighashTypeImplCopyWithImpl< + _$PsbtError_NonStandardSighashTypeImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidMagic, + required TResult Function() missingUtxo, + required TResult Function() invalidSeparator, + required TResult Function() psbtUtxoOutOfBounds, + required TResult Function(String key) invalidKey, + required TResult Function() invalidProprietaryKey, + required TResult Function(String key) duplicateKey, + required TResult Function() unsignedTxHasScriptSigs, + required TResult Function() unsignedTxHasScriptWitnesses, + required TResult Function() mustHaveUnsignedTx, + required TResult Function() noMorePairs, + required TResult Function() unexpectedUnsignedTx, + required TResult Function(int sighash) nonStandardSighashType, + required TResult Function(String hash) invalidHash, + required TResult Function() invalidPreimageHashPair, + required TResult Function(String xpub) combineInconsistentKeySources, + required TResult Function(String encodingError) consensusEncoding, + required TResult Function() negativeFee, + required TResult Function() feeOverflow, + required TResult Function(String errorMessage) invalidPublicKey, + required TResult Function(String secp256K1Error) invalidSecp256K1PublicKey, + required TResult Function() invalidXOnlyPublicKey, + required TResult Function(String errorMessage) invalidEcdsaSignature, + required TResult Function(String errorMessage) invalidTaprootSignature, + required TResult Function() invalidControlBlock, + required TResult Function() invalidLeafVersion, + required TResult Function() taproot, + required TResult Function(String errorMessage) tapTree, + required TResult Function() xPubKey, + required TResult Function(String errorMessage) version, + required TResult Function() partialDataConsumption, + required TResult Function(String errorMessage) io, + required TResult Function() otherPsbtErr, + }) { + return nonStandardSighashType(sighash); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidMagic, + TResult? Function()? missingUtxo, + TResult? Function()? invalidSeparator, + TResult? Function()? psbtUtxoOutOfBounds, + TResult? Function(String key)? invalidKey, + TResult? Function()? invalidProprietaryKey, + TResult? Function(String key)? duplicateKey, + TResult? Function()? unsignedTxHasScriptSigs, + TResult? Function()? unsignedTxHasScriptWitnesses, + TResult? Function()? mustHaveUnsignedTx, + TResult? Function()? noMorePairs, + TResult? Function()? unexpectedUnsignedTx, + TResult? Function(int sighash)? nonStandardSighashType, + TResult? Function(String hash)? invalidHash, + TResult? Function()? invalidPreimageHashPair, + TResult? Function(String xpub)? combineInconsistentKeySources, + TResult? Function(String encodingError)? consensusEncoding, + TResult? Function()? negativeFee, + TResult? Function()? feeOverflow, + TResult? Function(String errorMessage)? invalidPublicKey, + TResult? Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult? Function()? invalidXOnlyPublicKey, + TResult? Function(String errorMessage)? invalidEcdsaSignature, + TResult? Function(String errorMessage)? invalidTaprootSignature, + TResult? Function()? invalidControlBlock, + TResult? Function()? invalidLeafVersion, + TResult? Function()? taproot, + TResult? Function(String errorMessage)? tapTree, + TResult? Function()? xPubKey, + TResult? Function(String errorMessage)? version, + TResult? Function()? partialDataConsumption, + TResult? Function(String errorMessage)? io, + TResult? Function()? otherPsbtErr, + }) { + return nonStandardSighashType?.call(sighash); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidMagic, + TResult Function()? missingUtxo, + TResult Function()? invalidSeparator, + TResult Function()? psbtUtxoOutOfBounds, + TResult Function(String key)? invalidKey, + TResult Function()? invalidProprietaryKey, + TResult Function(String key)? duplicateKey, + TResult Function()? unsignedTxHasScriptSigs, + TResult Function()? unsignedTxHasScriptWitnesses, + TResult Function()? mustHaveUnsignedTx, + TResult Function()? noMorePairs, + TResult Function()? unexpectedUnsignedTx, + TResult Function(int sighash)? nonStandardSighashType, + TResult Function(String hash)? invalidHash, + TResult Function()? invalidPreimageHashPair, + TResult Function(String xpub)? combineInconsistentKeySources, + TResult Function(String encodingError)? consensusEncoding, + TResult Function()? negativeFee, + TResult Function()? feeOverflow, + TResult Function(String errorMessage)? invalidPublicKey, + TResult Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult Function()? invalidXOnlyPublicKey, + TResult Function(String errorMessage)? invalidEcdsaSignature, + TResult Function(String errorMessage)? invalidTaprootSignature, + TResult Function()? invalidControlBlock, + TResult Function()? invalidLeafVersion, + TResult Function()? taproot, + TResult Function(String errorMessage)? tapTree, + TResult Function()? xPubKey, + TResult Function(String errorMessage)? version, + TResult Function()? partialDataConsumption, + TResult Function(String errorMessage)? io, + TResult Function()? otherPsbtErr, + required TResult orElse(), + }) { + if (nonStandardSighashType != null) { + return nonStandardSighashType(sighash); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(PsbtError_InvalidMagic value) invalidMagic, + required TResult Function(PsbtError_MissingUtxo value) missingUtxo, + required TResult Function(PsbtError_InvalidSeparator value) + invalidSeparator, + required TResult Function(PsbtError_PsbtUtxoOutOfBounds value) + psbtUtxoOutOfBounds, + required TResult Function(PsbtError_InvalidKey value) invalidKey, + required TResult Function(PsbtError_InvalidProprietaryKey value) + invalidProprietaryKey, + required TResult Function(PsbtError_DuplicateKey value) duplicateKey, + required TResult Function(PsbtError_UnsignedTxHasScriptSigs value) + unsignedTxHasScriptSigs, + required TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value) + unsignedTxHasScriptWitnesses, + required TResult Function(PsbtError_MustHaveUnsignedTx value) + mustHaveUnsignedTx, + required TResult Function(PsbtError_NoMorePairs value) noMorePairs, + required TResult Function(PsbtError_UnexpectedUnsignedTx value) + unexpectedUnsignedTx, + required TResult Function(PsbtError_NonStandardSighashType value) + nonStandardSighashType, + required TResult Function(PsbtError_InvalidHash value) invalidHash, + required TResult Function(PsbtError_InvalidPreimageHashPair value) + invalidPreimageHashPair, + required TResult Function(PsbtError_CombineInconsistentKeySources value) + combineInconsistentKeySources, + required TResult Function(PsbtError_ConsensusEncoding value) + consensusEncoding, + required TResult Function(PsbtError_NegativeFee value) negativeFee, + required TResult Function(PsbtError_FeeOverflow value) feeOverflow, + required TResult Function(PsbtError_InvalidPublicKey value) + invalidPublicKey, + required TResult Function(PsbtError_InvalidSecp256k1PublicKey value) + invalidSecp256K1PublicKey, + required TResult Function(PsbtError_InvalidXOnlyPublicKey value) + invalidXOnlyPublicKey, + required TResult Function(PsbtError_InvalidEcdsaSignature value) + invalidEcdsaSignature, + required TResult Function(PsbtError_InvalidTaprootSignature value) + invalidTaprootSignature, + required TResult Function(PsbtError_InvalidControlBlock value) + invalidControlBlock, + required TResult Function(PsbtError_InvalidLeafVersion value) + invalidLeafVersion, + required TResult Function(PsbtError_Taproot value) taproot, + required TResult Function(PsbtError_TapTree value) tapTree, + required TResult Function(PsbtError_XPubKey value) xPubKey, + required TResult Function(PsbtError_Version value) version, + required TResult Function(PsbtError_PartialDataConsumption value) + partialDataConsumption, + required TResult Function(PsbtError_Io value) io, + required TResult Function(PsbtError_OtherPsbtErr value) otherPsbtErr, + }) { + return nonStandardSighashType(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult? Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult? Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult? Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult? Function(PsbtError_InvalidKey value)? invalidKey, + TResult? Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult? Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult? Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult? Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult? Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult? Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult? Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult? Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult? Function(PsbtError_InvalidHash value)? invalidHash, + TResult? Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult? Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult? Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult? Function(PsbtError_NegativeFee value)? negativeFee, + TResult? Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult? Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult? Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult? Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult? Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult? Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult? Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult? Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult? Function(PsbtError_Taproot value)? taproot, + TResult? Function(PsbtError_TapTree value)? tapTree, + TResult? Function(PsbtError_XPubKey value)? xPubKey, + TResult? Function(PsbtError_Version value)? version, + TResult? Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult? Function(PsbtError_Io value)? io, + TResult? Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + }) { + return nonStandardSighashType?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult Function(PsbtError_InvalidKey value)? invalidKey, + TResult Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult Function(PsbtError_InvalidHash value)? invalidHash, + TResult Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult Function(PsbtError_NegativeFee value)? negativeFee, + TResult Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult Function(PsbtError_Taproot value)? taproot, + TResult Function(PsbtError_TapTree value)? tapTree, + TResult Function(PsbtError_XPubKey value)? xPubKey, + TResult Function(PsbtError_Version value)? version, + TResult Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult Function(PsbtError_Io value)? io, + TResult Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + required TResult orElse(), + }) { + if (nonStandardSighashType != null) { + return nonStandardSighashType(this); + } + return orElse(); + } +} + +abstract class PsbtError_NonStandardSighashType extends PsbtError { + const factory PsbtError_NonStandardSighashType({required final int sighash}) = + _$PsbtError_NonStandardSighashTypeImpl; + const PsbtError_NonStandardSighashType._() : super._(); + + int get sighash; + @JsonKey(ignore: true) + _$$PsbtError_NonStandardSighashTypeImplCopyWith< + _$PsbtError_NonStandardSighashTypeImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$PsbtError_InvalidHashImplCopyWith<$Res> { + factory _$$PsbtError_InvalidHashImplCopyWith( + _$PsbtError_InvalidHashImpl value, + $Res Function(_$PsbtError_InvalidHashImpl) then) = + __$$PsbtError_InvalidHashImplCopyWithImpl<$Res>; + @useResult + $Res call({String hash}); +} + +/// @nodoc +class __$$PsbtError_InvalidHashImplCopyWithImpl<$Res> + extends _$PsbtErrorCopyWithImpl<$Res, _$PsbtError_InvalidHashImpl> + implements _$$PsbtError_InvalidHashImplCopyWith<$Res> { + __$$PsbtError_InvalidHashImplCopyWithImpl(_$PsbtError_InvalidHashImpl _value, + $Res Function(_$PsbtError_InvalidHashImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? hash = null, + }) { + return _then(_$PsbtError_InvalidHashImpl( + hash: null == hash + ? _value.hash + : hash // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$PsbtError_InvalidHashImpl extends PsbtError_InvalidHash { + const _$PsbtError_InvalidHashImpl({required this.hash}) : super._(); + + @override + final String hash; + + @override + String toString() { + return 'PsbtError.invalidHash(hash: $hash)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PsbtError_InvalidHashImpl && + (identical(other.hash, hash) || other.hash == hash)); + } + + @override + int get hashCode => Object.hash(runtimeType, hash); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$PsbtError_InvalidHashImplCopyWith<_$PsbtError_InvalidHashImpl> + get copyWith => __$$PsbtError_InvalidHashImplCopyWithImpl< + _$PsbtError_InvalidHashImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidMagic, + required TResult Function() missingUtxo, + required TResult Function() invalidSeparator, + required TResult Function() psbtUtxoOutOfBounds, + required TResult Function(String key) invalidKey, + required TResult Function() invalidProprietaryKey, + required TResult Function(String key) duplicateKey, + required TResult Function() unsignedTxHasScriptSigs, + required TResult Function() unsignedTxHasScriptWitnesses, + required TResult Function() mustHaveUnsignedTx, + required TResult Function() noMorePairs, + required TResult Function() unexpectedUnsignedTx, + required TResult Function(int sighash) nonStandardSighashType, + required TResult Function(String hash) invalidHash, + required TResult Function() invalidPreimageHashPair, + required TResult Function(String xpub) combineInconsistentKeySources, + required TResult Function(String encodingError) consensusEncoding, + required TResult Function() negativeFee, + required TResult Function() feeOverflow, + required TResult Function(String errorMessage) invalidPublicKey, + required TResult Function(String secp256K1Error) invalidSecp256K1PublicKey, + required TResult Function() invalidXOnlyPublicKey, + required TResult Function(String errorMessage) invalidEcdsaSignature, + required TResult Function(String errorMessage) invalidTaprootSignature, + required TResult Function() invalidControlBlock, + required TResult Function() invalidLeafVersion, + required TResult Function() taproot, + required TResult Function(String errorMessage) tapTree, + required TResult Function() xPubKey, + required TResult Function(String errorMessage) version, + required TResult Function() partialDataConsumption, + required TResult Function(String errorMessage) io, + required TResult Function() otherPsbtErr, + }) { + return invalidHash(hash); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidMagic, + TResult? Function()? missingUtxo, + TResult? Function()? invalidSeparator, + TResult? Function()? psbtUtxoOutOfBounds, + TResult? Function(String key)? invalidKey, + TResult? Function()? invalidProprietaryKey, + TResult? Function(String key)? duplicateKey, + TResult? Function()? unsignedTxHasScriptSigs, + TResult? Function()? unsignedTxHasScriptWitnesses, + TResult? Function()? mustHaveUnsignedTx, + TResult? Function()? noMorePairs, + TResult? Function()? unexpectedUnsignedTx, + TResult? Function(int sighash)? nonStandardSighashType, + TResult? Function(String hash)? invalidHash, + TResult? Function()? invalidPreimageHashPair, + TResult? Function(String xpub)? combineInconsistentKeySources, + TResult? Function(String encodingError)? consensusEncoding, + TResult? Function()? negativeFee, + TResult? Function()? feeOverflow, + TResult? Function(String errorMessage)? invalidPublicKey, + TResult? Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult? Function()? invalidXOnlyPublicKey, + TResult? Function(String errorMessage)? invalidEcdsaSignature, + TResult? Function(String errorMessage)? invalidTaprootSignature, + TResult? Function()? invalidControlBlock, + TResult? Function()? invalidLeafVersion, + TResult? Function()? taproot, + TResult? Function(String errorMessage)? tapTree, + TResult? Function()? xPubKey, + TResult? Function(String errorMessage)? version, + TResult? Function()? partialDataConsumption, + TResult? Function(String errorMessage)? io, + TResult? Function()? otherPsbtErr, + }) { + return invalidHash?.call(hash); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidMagic, + TResult Function()? missingUtxo, + TResult Function()? invalidSeparator, + TResult Function()? psbtUtxoOutOfBounds, + TResult Function(String key)? invalidKey, + TResult Function()? invalidProprietaryKey, + TResult Function(String key)? duplicateKey, + TResult Function()? unsignedTxHasScriptSigs, + TResult Function()? unsignedTxHasScriptWitnesses, + TResult Function()? mustHaveUnsignedTx, + TResult Function()? noMorePairs, + TResult Function()? unexpectedUnsignedTx, + TResult Function(int sighash)? nonStandardSighashType, + TResult Function(String hash)? invalidHash, + TResult Function()? invalidPreimageHashPair, + TResult Function(String xpub)? combineInconsistentKeySources, + TResult Function(String encodingError)? consensusEncoding, + TResult Function()? negativeFee, + TResult Function()? feeOverflow, + TResult Function(String errorMessage)? invalidPublicKey, + TResult Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult Function()? invalidXOnlyPublicKey, + TResult Function(String errorMessage)? invalidEcdsaSignature, + TResult Function(String errorMessage)? invalidTaprootSignature, + TResult Function()? invalidControlBlock, + TResult Function()? invalidLeafVersion, + TResult Function()? taproot, + TResult Function(String errorMessage)? tapTree, + TResult Function()? xPubKey, + TResult Function(String errorMessage)? version, + TResult Function()? partialDataConsumption, + TResult Function(String errorMessage)? io, + TResult Function()? otherPsbtErr, + required TResult orElse(), + }) { + if (invalidHash != null) { + return invalidHash(hash); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(PsbtError_InvalidMagic value) invalidMagic, + required TResult Function(PsbtError_MissingUtxo value) missingUtxo, + required TResult Function(PsbtError_InvalidSeparator value) + invalidSeparator, + required TResult Function(PsbtError_PsbtUtxoOutOfBounds value) + psbtUtxoOutOfBounds, + required TResult Function(PsbtError_InvalidKey value) invalidKey, + required TResult Function(PsbtError_InvalidProprietaryKey value) + invalidProprietaryKey, + required TResult Function(PsbtError_DuplicateKey value) duplicateKey, + required TResult Function(PsbtError_UnsignedTxHasScriptSigs value) + unsignedTxHasScriptSigs, + required TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value) + unsignedTxHasScriptWitnesses, + required TResult Function(PsbtError_MustHaveUnsignedTx value) + mustHaveUnsignedTx, + required TResult Function(PsbtError_NoMorePairs value) noMorePairs, + required TResult Function(PsbtError_UnexpectedUnsignedTx value) + unexpectedUnsignedTx, + required TResult Function(PsbtError_NonStandardSighashType value) + nonStandardSighashType, + required TResult Function(PsbtError_InvalidHash value) invalidHash, + required TResult Function(PsbtError_InvalidPreimageHashPair value) + invalidPreimageHashPair, + required TResult Function(PsbtError_CombineInconsistentKeySources value) + combineInconsistentKeySources, + required TResult Function(PsbtError_ConsensusEncoding value) + consensusEncoding, + required TResult Function(PsbtError_NegativeFee value) negativeFee, + required TResult Function(PsbtError_FeeOverflow value) feeOverflow, + required TResult Function(PsbtError_InvalidPublicKey value) + invalidPublicKey, + required TResult Function(PsbtError_InvalidSecp256k1PublicKey value) + invalidSecp256K1PublicKey, + required TResult Function(PsbtError_InvalidXOnlyPublicKey value) + invalidXOnlyPublicKey, + required TResult Function(PsbtError_InvalidEcdsaSignature value) + invalidEcdsaSignature, + required TResult Function(PsbtError_InvalidTaprootSignature value) + invalidTaprootSignature, + required TResult Function(PsbtError_InvalidControlBlock value) + invalidControlBlock, + required TResult Function(PsbtError_InvalidLeafVersion value) + invalidLeafVersion, + required TResult Function(PsbtError_Taproot value) taproot, + required TResult Function(PsbtError_TapTree value) tapTree, + required TResult Function(PsbtError_XPubKey value) xPubKey, + required TResult Function(PsbtError_Version value) version, + required TResult Function(PsbtError_PartialDataConsumption value) + partialDataConsumption, + required TResult Function(PsbtError_Io value) io, + required TResult Function(PsbtError_OtherPsbtErr value) otherPsbtErr, + }) { + return invalidHash(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult? Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult? Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult? Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult? Function(PsbtError_InvalidKey value)? invalidKey, + TResult? Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult? Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult? Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult? Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult? Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult? Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult? Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult? Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult? Function(PsbtError_InvalidHash value)? invalidHash, + TResult? Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult? Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult? Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult? Function(PsbtError_NegativeFee value)? negativeFee, + TResult? Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult? Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult? Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult? Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult? Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult? Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult? Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult? Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult? Function(PsbtError_Taproot value)? taproot, + TResult? Function(PsbtError_TapTree value)? tapTree, + TResult? Function(PsbtError_XPubKey value)? xPubKey, + TResult? Function(PsbtError_Version value)? version, + TResult? Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult? Function(PsbtError_Io value)? io, + TResult? Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + }) { + return invalidHash?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult Function(PsbtError_InvalidKey value)? invalidKey, + TResult Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult Function(PsbtError_InvalidHash value)? invalidHash, + TResult Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult Function(PsbtError_NegativeFee value)? negativeFee, + TResult Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult Function(PsbtError_Taproot value)? taproot, + TResult Function(PsbtError_TapTree value)? tapTree, + TResult Function(PsbtError_XPubKey value)? xPubKey, + TResult Function(PsbtError_Version value)? version, + TResult Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult Function(PsbtError_Io value)? io, + TResult Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + required TResult orElse(), + }) { + if (invalidHash != null) { + return invalidHash(this); + } + return orElse(); + } +} + +abstract class PsbtError_InvalidHash extends PsbtError { + const factory PsbtError_InvalidHash({required final String hash}) = + _$PsbtError_InvalidHashImpl; + const PsbtError_InvalidHash._() : super._(); + + String get hash; + @JsonKey(ignore: true) + _$$PsbtError_InvalidHashImplCopyWith<_$PsbtError_InvalidHashImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$PsbtError_InvalidPreimageHashPairImplCopyWith<$Res> { + factory _$$PsbtError_InvalidPreimageHashPairImplCopyWith( + _$PsbtError_InvalidPreimageHashPairImpl value, + $Res Function(_$PsbtError_InvalidPreimageHashPairImpl) then) = + __$$PsbtError_InvalidPreimageHashPairImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$PsbtError_InvalidPreimageHashPairImplCopyWithImpl<$Res> + extends _$PsbtErrorCopyWithImpl<$Res, + _$PsbtError_InvalidPreimageHashPairImpl> + implements _$$PsbtError_InvalidPreimageHashPairImplCopyWith<$Res> { + __$$PsbtError_InvalidPreimageHashPairImplCopyWithImpl( + _$PsbtError_InvalidPreimageHashPairImpl _value, + $Res Function(_$PsbtError_InvalidPreimageHashPairImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$PsbtError_InvalidPreimageHashPairImpl + extends PsbtError_InvalidPreimageHashPair { + const _$PsbtError_InvalidPreimageHashPairImpl() : super._(); + + @override + String toString() { + return 'PsbtError.invalidPreimageHashPair()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PsbtError_InvalidPreimageHashPairImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidMagic, + required TResult Function() missingUtxo, + required TResult Function() invalidSeparator, + required TResult Function() psbtUtxoOutOfBounds, + required TResult Function(String key) invalidKey, + required TResult Function() invalidProprietaryKey, + required TResult Function(String key) duplicateKey, + required TResult Function() unsignedTxHasScriptSigs, + required TResult Function() unsignedTxHasScriptWitnesses, + required TResult Function() mustHaveUnsignedTx, + required TResult Function() noMorePairs, + required TResult Function() unexpectedUnsignedTx, + required TResult Function(int sighash) nonStandardSighashType, + required TResult Function(String hash) invalidHash, + required TResult Function() invalidPreimageHashPair, + required TResult Function(String xpub) combineInconsistentKeySources, + required TResult Function(String encodingError) consensusEncoding, + required TResult Function() negativeFee, + required TResult Function() feeOverflow, + required TResult Function(String errorMessage) invalidPublicKey, + required TResult Function(String secp256K1Error) invalidSecp256K1PublicKey, + required TResult Function() invalidXOnlyPublicKey, + required TResult Function(String errorMessage) invalidEcdsaSignature, + required TResult Function(String errorMessage) invalidTaprootSignature, + required TResult Function() invalidControlBlock, + required TResult Function() invalidLeafVersion, + required TResult Function() taproot, + required TResult Function(String errorMessage) tapTree, + required TResult Function() xPubKey, + required TResult Function(String errorMessage) version, + required TResult Function() partialDataConsumption, + required TResult Function(String errorMessage) io, + required TResult Function() otherPsbtErr, + }) { + return invalidPreimageHashPair(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidMagic, + TResult? Function()? missingUtxo, + TResult? Function()? invalidSeparator, + TResult? Function()? psbtUtxoOutOfBounds, + TResult? Function(String key)? invalidKey, + TResult? Function()? invalidProprietaryKey, + TResult? Function(String key)? duplicateKey, + TResult? Function()? unsignedTxHasScriptSigs, + TResult? Function()? unsignedTxHasScriptWitnesses, + TResult? Function()? mustHaveUnsignedTx, + TResult? Function()? noMorePairs, + TResult? Function()? unexpectedUnsignedTx, + TResult? Function(int sighash)? nonStandardSighashType, + TResult? Function(String hash)? invalidHash, + TResult? Function()? invalidPreimageHashPair, + TResult? Function(String xpub)? combineInconsistentKeySources, + TResult? Function(String encodingError)? consensusEncoding, + TResult? Function()? negativeFee, + TResult? Function()? feeOverflow, + TResult? Function(String errorMessage)? invalidPublicKey, + TResult? Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult? Function()? invalidXOnlyPublicKey, + TResult? Function(String errorMessage)? invalidEcdsaSignature, + TResult? Function(String errorMessage)? invalidTaprootSignature, + TResult? Function()? invalidControlBlock, + TResult? Function()? invalidLeafVersion, + TResult? Function()? taproot, + TResult? Function(String errorMessage)? tapTree, + TResult? Function()? xPubKey, + TResult? Function(String errorMessage)? version, + TResult? Function()? partialDataConsumption, + TResult? Function(String errorMessage)? io, + TResult? Function()? otherPsbtErr, + }) { + return invalidPreimageHashPair?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidMagic, + TResult Function()? missingUtxo, + TResult Function()? invalidSeparator, + TResult Function()? psbtUtxoOutOfBounds, + TResult Function(String key)? invalidKey, + TResult Function()? invalidProprietaryKey, + TResult Function(String key)? duplicateKey, + TResult Function()? unsignedTxHasScriptSigs, + TResult Function()? unsignedTxHasScriptWitnesses, + TResult Function()? mustHaveUnsignedTx, + TResult Function()? noMorePairs, + TResult Function()? unexpectedUnsignedTx, + TResult Function(int sighash)? nonStandardSighashType, + TResult Function(String hash)? invalidHash, + TResult Function()? invalidPreimageHashPair, + TResult Function(String xpub)? combineInconsistentKeySources, + TResult Function(String encodingError)? consensusEncoding, + TResult Function()? negativeFee, + TResult Function()? feeOverflow, + TResult Function(String errorMessage)? invalidPublicKey, + TResult Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult Function()? invalidXOnlyPublicKey, + TResult Function(String errorMessage)? invalidEcdsaSignature, + TResult Function(String errorMessage)? invalidTaprootSignature, + TResult Function()? invalidControlBlock, + TResult Function()? invalidLeafVersion, + TResult Function()? taproot, + TResult Function(String errorMessage)? tapTree, + TResult Function()? xPubKey, + TResult Function(String errorMessage)? version, + TResult Function()? partialDataConsumption, + TResult Function(String errorMessage)? io, + TResult Function()? otherPsbtErr, + required TResult orElse(), + }) { + if (invalidPreimageHashPair != null) { + return invalidPreimageHashPair(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(PsbtError_InvalidMagic value) invalidMagic, + required TResult Function(PsbtError_MissingUtxo value) missingUtxo, + required TResult Function(PsbtError_InvalidSeparator value) + invalidSeparator, + required TResult Function(PsbtError_PsbtUtxoOutOfBounds value) + psbtUtxoOutOfBounds, + required TResult Function(PsbtError_InvalidKey value) invalidKey, + required TResult Function(PsbtError_InvalidProprietaryKey value) + invalidProprietaryKey, + required TResult Function(PsbtError_DuplicateKey value) duplicateKey, + required TResult Function(PsbtError_UnsignedTxHasScriptSigs value) + unsignedTxHasScriptSigs, + required TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value) + unsignedTxHasScriptWitnesses, + required TResult Function(PsbtError_MustHaveUnsignedTx value) + mustHaveUnsignedTx, + required TResult Function(PsbtError_NoMorePairs value) noMorePairs, + required TResult Function(PsbtError_UnexpectedUnsignedTx value) + unexpectedUnsignedTx, + required TResult Function(PsbtError_NonStandardSighashType value) + nonStandardSighashType, + required TResult Function(PsbtError_InvalidHash value) invalidHash, + required TResult Function(PsbtError_InvalidPreimageHashPair value) + invalidPreimageHashPair, + required TResult Function(PsbtError_CombineInconsistentKeySources value) + combineInconsistentKeySources, + required TResult Function(PsbtError_ConsensusEncoding value) + consensusEncoding, + required TResult Function(PsbtError_NegativeFee value) negativeFee, + required TResult Function(PsbtError_FeeOverflow value) feeOverflow, + required TResult Function(PsbtError_InvalidPublicKey value) + invalidPublicKey, + required TResult Function(PsbtError_InvalidSecp256k1PublicKey value) + invalidSecp256K1PublicKey, + required TResult Function(PsbtError_InvalidXOnlyPublicKey value) + invalidXOnlyPublicKey, + required TResult Function(PsbtError_InvalidEcdsaSignature value) + invalidEcdsaSignature, + required TResult Function(PsbtError_InvalidTaprootSignature value) + invalidTaprootSignature, + required TResult Function(PsbtError_InvalidControlBlock value) + invalidControlBlock, + required TResult Function(PsbtError_InvalidLeafVersion value) + invalidLeafVersion, + required TResult Function(PsbtError_Taproot value) taproot, + required TResult Function(PsbtError_TapTree value) tapTree, + required TResult Function(PsbtError_XPubKey value) xPubKey, + required TResult Function(PsbtError_Version value) version, + required TResult Function(PsbtError_PartialDataConsumption value) + partialDataConsumption, + required TResult Function(PsbtError_Io value) io, + required TResult Function(PsbtError_OtherPsbtErr value) otherPsbtErr, + }) { + return invalidPreimageHashPair(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult? Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult? Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult? Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult? Function(PsbtError_InvalidKey value)? invalidKey, + TResult? Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult? Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult? Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult? Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult? Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult? Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult? Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult? Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult? Function(PsbtError_InvalidHash value)? invalidHash, + TResult? Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult? Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult? Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult? Function(PsbtError_NegativeFee value)? negativeFee, + TResult? Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult? Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult? Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult? Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult? Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult? Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult? Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult? Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult? Function(PsbtError_Taproot value)? taproot, + TResult? Function(PsbtError_TapTree value)? tapTree, + TResult? Function(PsbtError_XPubKey value)? xPubKey, + TResult? Function(PsbtError_Version value)? version, + TResult? Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult? Function(PsbtError_Io value)? io, + TResult? Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + }) { + return invalidPreimageHashPair?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult Function(PsbtError_InvalidKey value)? invalidKey, + TResult Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult Function(PsbtError_InvalidHash value)? invalidHash, + TResult Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult Function(PsbtError_NegativeFee value)? negativeFee, + TResult Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult Function(PsbtError_Taproot value)? taproot, + TResult Function(PsbtError_TapTree value)? tapTree, + TResult Function(PsbtError_XPubKey value)? xPubKey, + TResult Function(PsbtError_Version value)? version, + TResult Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult Function(PsbtError_Io value)? io, + TResult Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + required TResult orElse(), + }) { + if (invalidPreimageHashPair != null) { + return invalidPreimageHashPair(this); + } + return orElse(); + } +} + +abstract class PsbtError_InvalidPreimageHashPair extends PsbtError { + const factory PsbtError_InvalidPreimageHashPair() = + _$PsbtError_InvalidPreimageHashPairImpl; + const PsbtError_InvalidPreimageHashPair._() : super._(); +} + +/// @nodoc +abstract class _$$PsbtError_CombineInconsistentKeySourcesImplCopyWith<$Res> { + factory _$$PsbtError_CombineInconsistentKeySourcesImplCopyWith( + _$PsbtError_CombineInconsistentKeySourcesImpl value, + $Res Function(_$PsbtError_CombineInconsistentKeySourcesImpl) then) = + __$$PsbtError_CombineInconsistentKeySourcesImplCopyWithImpl<$Res>; + @useResult + $Res call({String xpub}); +} + +/// @nodoc +class __$$PsbtError_CombineInconsistentKeySourcesImplCopyWithImpl<$Res> + extends _$PsbtErrorCopyWithImpl<$Res, + _$PsbtError_CombineInconsistentKeySourcesImpl> + implements _$$PsbtError_CombineInconsistentKeySourcesImplCopyWith<$Res> { + __$$PsbtError_CombineInconsistentKeySourcesImplCopyWithImpl( + _$PsbtError_CombineInconsistentKeySourcesImpl _value, + $Res Function(_$PsbtError_CombineInconsistentKeySourcesImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? xpub = null, + }) { + return _then(_$PsbtError_CombineInconsistentKeySourcesImpl( + xpub: null == xpub + ? _value.xpub + : xpub // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$PsbtError_CombineInconsistentKeySourcesImpl + extends PsbtError_CombineInconsistentKeySources { + const _$PsbtError_CombineInconsistentKeySourcesImpl({required this.xpub}) + : super._(); + + @override + final String xpub; + + @override + String toString() { + return 'PsbtError.combineInconsistentKeySources(xpub: $xpub)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PsbtError_CombineInconsistentKeySourcesImpl && + (identical(other.xpub, xpub) || other.xpub == xpub)); + } + + @override + int get hashCode => Object.hash(runtimeType, xpub); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$PsbtError_CombineInconsistentKeySourcesImplCopyWith< + _$PsbtError_CombineInconsistentKeySourcesImpl> + get copyWith => + __$$PsbtError_CombineInconsistentKeySourcesImplCopyWithImpl< + _$PsbtError_CombineInconsistentKeySourcesImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidMagic, + required TResult Function() missingUtxo, + required TResult Function() invalidSeparator, + required TResult Function() psbtUtxoOutOfBounds, + required TResult Function(String key) invalidKey, + required TResult Function() invalidProprietaryKey, + required TResult Function(String key) duplicateKey, + required TResult Function() unsignedTxHasScriptSigs, + required TResult Function() unsignedTxHasScriptWitnesses, + required TResult Function() mustHaveUnsignedTx, + required TResult Function() noMorePairs, + required TResult Function() unexpectedUnsignedTx, + required TResult Function(int sighash) nonStandardSighashType, + required TResult Function(String hash) invalidHash, + required TResult Function() invalidPreimageHashPair, + required TResult Function(String xpub) combineInconsistentKeySources, + required TResult Function(String encodingError) consensusEncoding, + required TResult Function() negativeFee, + required TResult Function() feeOverflow, + required TResult Function(String errorMessage) invalidPublicKey, + required TResult Function(String secp256K1Error) invalidSecp256K1PublicKey, + required TResult Function() invalidXOnlyPublicKey, + required TResult Function(String errorMessage) invalidEcdsaSignature, + required TResult Function(String errorMessage) invalidTaprootSignature, + required TResult Function() invalidControlBlock, + required TResult Function() invalidLeafVersion, + required TResult Function() taproot, + required TResult Function(String errorMessage) tapTree, + required TResult Function() xPubKey, + required TResult Function(String errorMessage) version, + required TResult Function() partialDataConsumption, + required TResult Function(String errorMessage) io, + required TResult Function() otherPsbtErr, + }) { + return combineInconsistentKeySources(xpub); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidMagic, + TResult? Function()? missingUtxo, + TResult? Function()? invalidSeparator, + TResult? Function()? psbtUtxoOutOfBounds, + TResult? Function(String key)? invalidKey, + TResult? Function()? invalidProprietaryKey, + TResult? Function(String key)? duplicateKey, + TResult? Function()? unsignedTxHasScriptSigs, + TResult? Function()? unsignedTxHasScriptWitnesses, + TResult? Function()? mustHaveUnsignedTx, + TResult? Function()? noMorePairs, + TResult? Function()? unexpectedUnsignedTx, + TResult? Function(int sighash)? nonStandardSighashType, + TResult? Function(String hash)? invalidHash, + TResult? Function()? invalidPreimageHashPair, + TResult? Function(String xpub)? combineInconsistentKeySources, + TResult? Function(String encodingError)? consensusEncoding, + TResult? Function()? negativeFee, + TResult? Function()? feeOverflow, + TResult? Function(String errorMessage)? invalidPublicKey, + TResult? Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult? Function()? invalidXOnlyPublicKey, + TResult? Function(String errorMessage)? invalidEcdsaSignature, + TResult? Function(String errorMessage)? invalidTaprootSignature, + TResult? Function()? invalidControlBlock, + TResult? Function()? invalidLeafVersion, + TResult? Function()? taproot, + TResult? Function(String errorMessage)? tapTree, + TResult? Function()? xPubKey, + TResult? Function(String errorMessage)? version, + TResult? Function()? partialDataConsumption, + TResult? Function(String errorMessage)? io, + TResult? Function()? otherPsbtErr, + }) { + return combineInconsistentKeySources?.call(xpub); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidMagic, + TResult Function()? missingUtxo, + TResult Function()? invalidSeparator, + TResult Function()? psbtUtxoOutOfBounds, + TResult Function(String key)? invalidKey, + TResult Function()? invalidProprietaryKey, + TResult Function(String key)? duplicateKey, + TResult Function()? unsignedTxHasScriptSigs, + TResult Function()? unsignedTxHasScriptWitnesses, + TResult Function()? mustHaveUnsignedTx, + TResult Function()? noMorePairs, + TResult Function()? unexpectedUnsignedTx, + TResult Function(int sighash)? nonStandardSighashType, + TResult Function(String hash)? invalidHash, + TResult Function()? invalidPreimageHashPair, + TResult Function(String xpub)? combineInconsistentKeySources, + TResult Function(String encodingError)? consensusEncoding, + TResult Function()? negativeFee, + TResult Function()? feeOverflow, + TResult Function(String errorMessage)? invalidPublicKey, + TResult Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult Function()? invalidXOnlyPublicKey, + TResult Function(String errorMessage)? invalidEcdsaSignature, + TResult Function(String errorMessage)? invalidTaprootSignature, + TResult Function()? invalidControlBlock, + TResult Function()? invalidLeafVersion, + TResult Function()? taproot, + TResult Function(String errorMessage)? tapTree, + TResult Function()? xPubKey, + TResult Function(String errorMessage)? version, + TResult Function()? partialDataConsumption, + TResult Function(String errorMessage)? io, + TResult Function()? otherPsbtErr, + required TResult orElse(), + }) { + if (combineInconsistentKeySources != null) { + return combineInconsistentKeySources(xpub); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(PsbtError_InvalidMagic value) invalidMagic, + required TResult Function(PsbtError_MissingUtxo value) missingUtxo, + required TResult Function(PsbtError_InvalidSeparator value) + invalidSeparator, + required TResult Function(PsbtError_PsbtUtxoOutOfBounds value) + psbtUtxoOutOfBounds, + required TResult Function(PsbtError_InvalidKey value) invalidKey, + required TResult Function(PsbtError_InvalidProprietaryKey value) + invalidProprietaryKey, + required TResult Function(PsbtError_DuplicateKey value) duplicateKey, + required TResult Function(PsbtError_UnsignedTxHasScriptSigs value) + unsignedTxHasScriptSigs, + required TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value) + unsignedTxHasScriptWitnesses, + required TResult Function(PsbtError_MustHaveUnsignedTx value) + mustHaveUnsignedTx, + required TResult Function(PsbtError_NoMorePairs value) noMorePairs, + required TResult Function(PsbtError_UnexpectedUnsignedTx value) + unexpectedUnsignedTx, + required TResult Function(PsbtError_NonStandardSighashType value) + nonStandardSighashType, + required TResult Function(PsbtError_InvalidHash value) invalidHash, + required TResult Function(PsbtError_InvalidPreimageHashPair value) + invalidPreimageHashPair, + required TResult Function(PsbtError_CombineInconsistentKeySources value) + combineInconsistentKeySources, + required TResult Function(PsbtError_ConsensusEncoding value) + consensusEncoding, + required TResult Function(PsbtError_NegativeFee value) negativeFee, + required TResult Function(PsbtError_FeeOverflow value) feeOverflow, + required TResult Function(PsbtError_InvalidPublicKey value) + invalidPublicKey, + required TResult Function(PsbtError_InvalidSecp256k1PublicKey value) + invalidSecp256K1PublicKey, + required TResult Function(PsbtError_InvalidXOnlyPublicKey value) + invalidXOnlyPublicKey, + required TResult Function(PsbtError_InvalidEcdsaSignature value) + invalidEcdsaSignature, + required TResult Function(PsbtError_InvalidTaprootSignature value) + invalidTaprootSignature, + required TResult Function(PsbtError_InvalidControlBlock value) + invalidControlBlock, + required TResult Function(PsbtError_InvalidLeafVersion value) + invalidLeafVersion, + required TResult Function(PsbtError_Taproot value) taproot, + required TResult Function(PsbtError_TapTree value) tapTree, + required TResult Function(PsbtError_XPubKey value) xPubKey, + required TResult Function(PsbtError_Version value) version, + required TResult Function(PsbtError_PartialDataConsumption value) + partialDataConsumption, + required TResult Function(PsbtError_Io value) io, + required TResult Function(PsbtError_OtherPsbtErr value) otherPsbtErr, + }) { + return combineInconsistentKeySources(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult? Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult? Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult? Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult? Function(PsbtError_InvalidKey value)? invalidKey, + TResult? Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult? Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult? Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult? Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult? Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult? Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult? Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult? Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult? Function(PsbtError_InvalidHash value)? invalidHash, + TResult? Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult? Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult? Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult? Function(PsbtError_NegativeFee value)? negativeFee, + TResult? Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult? Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult? Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult? Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult? Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult? Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult? Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult? Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult? Function(PsbtError_Taproot value)? taproot, + TResult? Function(PsbtError_TapTree value)? tapTree, + TResult? Function(PsbtError_XPubKey value)? xPubKey, + TResult? Function(PsbtError_Version value)? version, + TResult? Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult? Function(PsbtError_Io value)? io, + TResult? Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + }) { + return combineInconsistentKeySources?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult Function(PsbtError_InvalidKey value)? invalidKey, + TResult Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult Function(PsbtError_InvalidHash value)? invalidHash, + TResult Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult Function(PsbtError_NegativeFee value)? negativeFee, + TResult Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult Function(PsbtError_Taproot value)? taproot, + TResult Function(PsbtError_TapTree value)? tapTree, + TResult Function(PsbtError_XPubKey value)? xPubKey, + TResult Function(PsbtError_Version value)? version, + TResult Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult Function(PsbtError_Io value)? io, + TResult Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + required TResult orElse(), + }) { + if (combineInconsistentKeySources != null) { + return combineInconsistentKeySources(this); + } + return orElse(); + } +} + +abstract class PsbtError_CombineInconsistentKeySources extends PsbtError { + const factory PsbtError_CombineInconsistentKeySources( + {required final String xpub}) = + _$PsbtError_CombineInconsistentKeySourcesImpl; + const PsbtError_CombineInconsistentKeySources._() : super._(); + + String get xpub; + @JsonKey(ignore: true) + _$$PsbtError_CombineInconsistentKeySourcesImplCopyWith< + _$PsbtError_CombineInconsistentKeySourcesImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$PsbtError_ConsensusEncodingImplCopyWith<$Res> { + factory _$$PsbtError_ConsensusEncodingImplCopyWith( + _$PsbtError_ConsensusEncodingImpl value, + $Res Function(_$PsbtError_ConsensusEncodingImpl) then) = + __$$PsbtError_ConsensusEncodingImplCopyWithImpl<$Res>; + @useResult + $Res call({String encodingError}); +} + +/// @nodoc +class __$$PsbtError_ConsensusEncodingImplCopyWithImpl<$Res> + extends _$PsbtErrorCopyWithImpl<$Res, _$PsbtError_ConsensusEncodingImpl> + implements _$$PsbtError_ConsensusEncodingImplCopyWith<$Res> { + __$$PsbtError_ConsensusEncodingImplCopyWithImpl( + _$PsbtError_ConsensusEncodingImpl _value, + $Res Function(_$PsbtError_ConsensusEncodingImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? encodingError = null, + }) { + return _then(_$PsbtError_ConsensusEncodingImpl( + encodingError: null == encodingError + ? _value.encodingError + : encodingError // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$PsbtError_ConsensusEncodingImpl extends PsbtError_ConsensusEncoding { + const _$PsbtError_ConsensusEncodingImpl({required this.encodingError}) + : super._(); + + @override + final String encodingError; + + @override + String toString() { + return 'PsbtError.consensusEncoding(encodingError: $encodingError)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PsbtError_ConsensusEncodingImpl && + (identical(other.encodingError, encodingError) || + other.encodingError == encodingError)); + } + + @override + int get hashCode => Object.hash(runtimeType, encodingError); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$PsbtError_ConsensusEncodingImplCopyWith<_$PsbtError_ConsensusEncodingImpl> + get copyWith => __$$PsbtError_ConsensusEncodingImplCopyWithImpl< + _$PsbtError_ConsensusEncodingImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidMagic, + required TResult Function() missingUtxo, + required TResult Function() invalidSeparator, + required TResult Function() psbtUtxoOutOfBounds, + required TResult Function(String key) invalidKey, + required TResult Function() invalidProprietaryKey, + required TResult Function(String key) duplicateKey, + required TResult Function() unsignedTxHasScriptSigs, + required TResult Function() unsignedTxHasScriptWitnesses, + required TResult Function() mustHaveUnsignedTx, + required TResult Function() noMorePairs, + required TResult Function() unexpectedUnsignedTx, + required TResult Function(int sighash) nonStandardSighashType, + required TResult Function(String hash) invalidHash, + required TResult Function() invalidPreimageHashPair, + required TResult Function(String xpub) combineInconsistentKeySources, + required TResult Function(String encodingError) consensusEncoding, + required TResult Function() negativeFee, + required TResult Function() feeOverflow, + required TResult Function(String errorMessage) invalidPublicKey, + required TResult Function(String secp256K1Error) invalidSecp256K1PublicKey, + required TResult Function() invalidXOnlyPublicKey, + required TResult Function(String errorMessage) invalidEcdsaSignature, + required TResult Function(String errorMessage) invalidTaprootSignature, + required TResult Function() invalidControlBlock, + required TResult Function() invalidLeafVersion, + required TResult Function() taproot, + required TResult Function(String errorMessage) tapTree, + required TResult Function() xPubKey, + required TResult Function(String errorMessage) version, + required TResult Function() partialDataConsumption, + required TResult Function(String errorMessage) io, + required TResult Function() otherPsbtErr, + }) { + return consensusEncoding(encodingError); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidMagic, + TResult? Function()? missingUtxo, + TResult? Function()? invalidSeparator, + TResult? Function()? psbtUtxoOutOfBounds, + TResult? Function(String key)? invalidKey, + TResult? Function()? invalidProprietaryKey, + TResult? Function(String key)? duplicateKey, + TResult? Function()? unsignedTxHasScriptSigs, + TResult? Function()? unsignedTxHasScriptWitnesses, + TResult? Function()? mustHaveUnsignedTx, + TResult? Function()? noMorePairs, + TResult? Function()? unexpectedUnsignedTx, + TResult? Function(int sighash)? nonStandardSighashType, + TResult? Function(String hash)? invalidHash, + TResult? Function()? invalidPreimageHashPair, + TResult? Function(String xpub)? combineInconsistentKeySources, + TResult? Function(String encodingError)? consensusEncoding, + TResult? Function()? negativeFee, + TResult? Function()? feeOverflow, + TResult? Function(String errorMessage)? invalidPublicKey, + TResult? Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult? Function()? invalidXOnlyPublicKey, + TResult? Function(String errorMessage)? invalidEcdsaSignature, + TResult? Function(String errorMessage)? invalidTaprootSignature, + TResult? Function()? invalidControlBlock, + TResult? Function()? invalidLeafVersion, + TResult? Function()? taproot, + TResult? Function(String errorMessage)? tapTree, + TResult? Function()? xPubKey, + TResult? Function(String errorMessage)? version, + TResult? Function()? partialDataConsumption, + TResult? Function(String errorMessage)? io, + TResult? Function()? otherPsbtErr, + }) { + return consensusEncoding?.call(encodingError); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidMagic, + TResult Function()? missingUtxo, + TResult Function()? invalidSeparator, + TResult Function()? psbtUtxoOutOfBounds, + TResult Function(String key)? invalidKey, + TResult Function()? invalidProprietaryKey, + TResult Function(String key)? duplicateKey, + TResult Function()? unsignedTxHasScriptSigs, + TResult Function()? unsignedTxHasScriptWitnesses, + TResult Function()? mustHaveUnsignedTx, + TResult Function()? noMorePairs, + TResult Function()? unexpectedUnsignedTx, + TResult Function(int sighash)? nonStandardSighashType, + TResult Function(String hash)? invalidHash, + TResult Function()? invalidPreimageHashPair, + TResult Function(String xpub)? combineInconsistentKeySources, + TResult Function(String encodingError)? consensusEncoding, + TResult Function()? negativeFee, + TResult Function()? feeOverflow, + TResult Function(String errorMessage)? invalidPublicKey, + TResult Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult Function()? invalidXOnlyPublicKey, + TResult Function(String errorMessage)? invalidEcdsaSignature, + TResult Function(String errorMessage)? invalidTaprootSignature, + TResult Function()? invalidControlBlock, + TResult Function()? invalidLeafVersion, + TResult Function()? taproot, + TResult Function(String errorMessage)? tapTree, + TResult Function()? xPubKey, + TResult Function(String errorMessage)? version, + TResult Function()? partialDataConsumption, + TResult Function(String errorMessage)? io, + TResult Function()? otherPsbtErr, + required TResult orElse(), + }) { + if (consensusEncoding != null) { + return consensusEncoding(encodingError); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(PsbtError_InvalidMagic value) invalidMagic, + required TResult Function(PsbtError_MissingUtxo value) missingUtxo, + required TResult Function(PsbtError_InvalidSeparator value) + invalidSeparator, + required TResult Function(PsbtError_PsbtUtxoOutOfBounds value) + psbtUtxoOutOfBounds, + required TResult Function(PsbtError_InvalidKey value) invalidKey, + required TResult Function(PsbtError_InvalidProprietaryKey value) + invalidProprietaryKey, + required TResult Function(PsbtError_DuplicateKey value) duplicateKey, + required TResult Function(PsbtError_UnsignedTxHasScriptSigs value) + unsignedTxHasScriptSigs, + required TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value) + unsignedTxHasScriptWitnesses, + required TResult Function(PsbtError_MustHaveUnsignedTx value) + mustHaveUnsignedTx, + required TResult Function(PsbtError_NoMorePairs value) noMorePairs, + required TResult Function(PsbtError_UnexpectedUnsignedTx value) + unexpectedUnsignedTx, + required TResult Function(PsbtError_NonStandardSighashType value) + nonStandardSighashType, + required TResult Function(PsbtError_InvalidHash value) invalidHash, + required TResult Function(PsbtError_InvalidPreimageHashPair value) + invalidPreimageHashPair, + required TResult Function(PsbtError_CombineInconsistentKeySources value) + combineInconsistentKeySources, + required TResult Function(PsbtError_ConsensusEncoding value) + consensusEncoding, + required TResult Function(PsbtError_NegativeFee value) negativeFee, + required TResult Function(PsbtError_FeeOverflow value) feeOverflow, + required TResult Function(PsbtError_InvalidPublicKey value) + invalidPublicKey, + required TResult Function(PsbtError_InvalidSecp256k1PublicKey value) + invalidSecp256K1PublicKey, + required TResult Function(PsbtError_InvalidXOnlyPublicKey value) + invalidXOnlyPublicKey, + required TResult Function(PsbtError_InvalidEcdsaSignature value) + invalidEcdsaSignature, + required TResult Function(PsbtError_InvalidTaprootSignature value) + invalidTaprootSignature, + required TResult Function(PsbtError_InvalidControlBlock value) + invalidControlBlock, + required TResult Function(PsbtError_InvalidLeafVersion value) + invalidLeafVersion, + required TResult Function(PsbtError_Taproot value) taproot, + required TResult Function(PsbtError_TapTree value) tapTree, + required TResult Function(PsbtError_XPubKey value) xPubKey, + required TResult Function(PsbtError_Version value) version, + required TResult Function(PsbtError_PartialDataConsumption value) + partialDataConsumption, + required TResult Function(PsbtError_Io value) io, + required TResult Function(PsbtError_OtherPsbtErr value) otherPsbtErr, + }) { + return consensusEncoding(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult? Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult? Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult? Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult? Function(PsbtError_InvalidKey value)? invalidKey, + TResult? Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult? Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult? Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult? Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult? Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult? Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult? Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult? Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult? Function(PsbtError_InvalidHash value)? invalidHash, + TResult? Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult? Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult? Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult? Function(PsbtError_NegativeFee value)? negativeFee, + TResult? Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult? Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult? Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult? Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult? Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult? Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult? Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult? Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult? Function(PsbtError_Taproot value)? taproot, + TResult? Function(PsbtError_TapTree value)? tapTree, + TResult? Function(PsbtError_XPubKey value)? xPubKey, + TResult? Function(PsbtError_Version value)? version, + TResult? Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult? Function(PsbtError_Io value)? io, + TResult? Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + }) { + return consensusEncoding?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult Function(PsbtError_InvalidKey value)? invalidKey, + TResult Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult Function(PsbtError_InvalidHash value)? invalidHash, + TResult Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult Function(PsbtError_NegativeFee value)? negativeFee, + TResult Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult Function(PsbtError_Taproot value)? taproot, + TResult Function(PsbtError_TapTree value)? tapTree, + TResult Function(PsbtError_XPubKey value)? xPubKey, + TResult Function(PsbtError_Version value)? version, + TResult Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult Function(PsbtError_Io value)? io, + TResult Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + required TResult orElse(), + }) { + if (consensusEncoding != null) { + return consensusEncoding(this); + } + return orElse(); + } +} + +abstract class PsbtError_ConsensusEncoding extends PsbtError { + const factory PsbtError_ConsensusEncoding( + {required final String encodingError}) = + _$PsbtError_ConsensusEncodingImpl; + const PsbtError_ConsensusEncoding._() : super._(); + + String get encodingError; + @JsonKey(ignore: true) + _$$PsbtError_ConsensusEncodingImplCopyWith<_$PsbtError_ConsensusEncodingImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$PsbtError_NegativeFeeImplCopyWith<$Res> { + factory _$$PsbtError_NegativeFeeImplCopyWith( + _$PsbtError_NegativeFeeImpl value, + $Res Function(_$PsbtError_NegativeFeeImpl) then) = + __$$PsbtError_NegativeFeeImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$PsbtError_NegativeFeeImplCopyWithImpl<$Res> + extends _$PsbtErrorCopyWithImpl<$Res, _$PsbtError_NegativeFeeImpl> + implements _$$PsbtError_NegativeFeeImplCopyWith<$Res> { + __$$PsbtError_NegativeFeeImplCopyWithImpl(_$PsbtError_NegativeFeeImpl _value, + $Res Function(_$PsbtError_NegativeFeeImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$PsbtError_NegativeFeeImpl extends PsbtError_NegativeFee { + const _$PsbtError_NegativeFeeImpl() : super._(); + + @override + String toString() { + return 'PsbtError.negativeFee()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PsbtError_NegativeFeeImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidMagic, + required TResult Function() missingUtxo, + required TResult Function() invalidSeparator, + required TResult Function() psbtUtxoOutOfBounds, + required TResult Function(String key) invalidKey, + required TResult Function() invalidProprietaryKey, + required TResult Function(String key) duplicateKey, + required TResult Function() unsignedTxHasScriptSigs, + required TResult Function() unsignedTxHasScriptWitnesses, + required TResult Function() mustHaveUnsignedTx, + required TResult Function() noMorePairs, + required TResult Function() unexpectedUnsignedTx, + required TResult Function(int sighash) nonStandardSighashType, + required TResult Function(String hash) invalidHash, + required TResult Function() invalidPreimageHashPair, + required TResult Function(String xpub) combineInconsistentKeySources, + required TResult Function(String encodingError) consensusEncoding, + required TResult Function() negativeFee, + required TResult Function() feeOverflow, + required TResult Function(String errorMessage) invalidPublicKey, + required TResult Function(String secp256K1Error) invalidSecp256K1PublicKey, + required TResult Function() invalidXOnlyPublicKey, + required TResult Function(String errorMessage) invalidEcdsaSignature, + required TResult Function(String errorMessage) invalidTaprootSignature, + required TResult Function() invalidControlBlock, + required TResult Function() invalidLeafVersion, + required TResult Function() taproot, + required TResult Function(String errorMessage) tapTree, + required TResult Function() xPubKey, + required TResult Function(String errorMessage) version, + required TResult Function() partialDataConsumption, + required TResult Function(String errorMessage) io, + required TResult Function() otherPsbtErr, + }) { + return negativeFee(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidMagic, + TResult? Function()? missingUtxo, + TResult? Function()? invalidSeparator, + TResult? Function()? psbtUtxoOutOfBounds, + TResult? Function(String key)? invalidKey, + TResult? Function()? invalidProprietaryKey, + TResult? Function(String key)? duplicateKey, + TResult? Function()? unsignedTxHasScriptSigs, + TResult? Function()? unsignedTxHasScriptWitnesses, + TResult? Function()? mustHaveUnsignedTx, + TResult? Function()? noMorePairs, + TResult? Function()? unexpectedUnsignedTx, + TResult? Function(int sighash)? nonStandardSighashType, + TResult? Function(String hash)? invalidHash, + TResult? Function()? invalidPreimageHashPair, + TResult? Function(String xpub)? combineInconsistentKeySources, + TResult? Function(String encodingError)? consensusEncoding, + TResult? Function()? negativeFee, + TResult? Function()? feeOverflow, + TResult? Function(String errorMessage)? invalidPublicKey, + TResult? Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult? Function()? invalidXOnlyPublicKey, + TResult? Function(String errorMessage)? invalidEcdsaSignature, + TResult? Function(String errorMessage)? invalidTaprootSignature, + TResult? Function()? invalidControlBlock, + TResult? Function()? invalidLeafVersion, + TResult? Function()? taproot, + TResult? Function(String errorMessage)? tapTree, + TResult? Function()? xPubKey, + TResult? Function(String errorMessage)? version, + TResult? Function()? partialDataConsumption, + TResult? Function(String errorMessage)? io, + TResult? Function()? otherPsbtErr, + }) { + return negativeFee?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidMagic, + TResult Function()? missingUtxo, + TResult Function()? invalidSeparator, + TResult Function()? psbtUtxoOutOfBounds, + TResult Function(String key)? invalidKey, + TResult Function()? invalidProprietaryKey, + TResult Function(String key)? duplicateKey, + TResult Function()? unsignedTxHasScriptSigs, + TResult Function()? unsignedTxHasScriptWitnesses, + TResult Function()? mustHaveUnsignedTx, + TResult Function()? noMorePairs, + TResult Function()? unexpectedUnsignedTx, + TResult Function(int sighash)? nonStandardSighashType, + TResult Function(String hash)? invalidHash, + TResult Function()? invalidPreimageHashPair, + TResult Function(String xpub)? combineInconsistentKeySources, + TResult Function(String encodingError)? consensusEncoding, + TResult Function()? negativeFee, + TResult Function()? feeOverflow, + TResult Function(String errorMessage)? invalidPublicKey, + TResult Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult Function()? invalidXOnlyPublicKey, + TResult Function(String errorMessage)? invalidEcdsaSignature, + TResult Function(String errorMessage)? invalidTaprootSignature, + TResult Function()? invalidControlBlock, + TResult Function()? invalidLeafVersion, + TResult Function()? taproot, + TResult Function(String errorMessage)? tapTree, + TResult Function()? xPubKey, + TResult Function(String errorMessage)? version, + TResult Function()? partialDataConsumption, + TResult Function(String errorMessage)? io, + TResult Function()? otherPsbtErr, + required TResult orElse(), + }) { + if (negativeFee != null) { + return negativeFee(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(PsbtError_InvalidMagic value) invalidMagic, + required TResult Function(PsbtError_MissingUtxo value) missingUtxo, + required TResult Function(PsbtError_InvalidSeparator value) + invalidSeparator, + required TResult Function(PsbtError_PsbtUtxoOutOfBounds value) + psbtUtxoOutOfBounds, + required TResult Function(PsbtError_InvalidKey value) invalidKey, + required TResult Function(PsbtError_InvalidProprietaryKey value) + invalidProprietaryKey, + required TResult Function(PsbtError_DuplicateKey value) duplicateKey, + required TResult Function(PsbtError_UnsignedTxHasScriptSigs value) + unsignedTxHasScriptSigs, + required TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value) + unsignedTxHasScriptWitnesses, + required TResult Function(PsbtError_MustHaveUnsignedTx value) + mustHaveUnsignedTx, + required TResult Function(PsbtError_NoMorePairs value) noMorePairs, + required TResult Function(PsbtError_UnexpectedUnsignedTx value) + unexpectedUnsignedTx, + required TResult Function(PsbtError_NonStandardSighashType value) + nonStandardSighashType, + required TResult Function(PsbtError_InvalidHash value) invalidHash, + required TResult Function(PsbtError_InvalidPreimageHashPair value) + invalidPreimageHashPair, + required TResult Function(PsbtError_CombineInconsistentKeySources value) + combineInconsistentKeySources, + required TResult Function(PsbtError_ConsensusEncoding value) + consensusEncoding, + required TResult Function(PsbtError_NegativeFee value) negativeFee, + required TResult Function(PsbtError_FeeOverflow value) feeOverflow, + required TResult Function(PsbtError_InvalidPublicKey value) + invalidPublicKey, + required TResult Function(PsbtError_InvalidSecp256k1PublicKey value) + invalidSecp256K1PublicKey, + required TResult Function(PsbtError_InvalidXOnlyPublicKey value) + invalidXOnlyPublicKey, + required TResult Function(PsbtError_InvalidEcdsaSignature value) + invalidEcdsaSignature, + required TResult Function(PsbtError_InvalidTaprootSignature value) + invalidTaprootSignature, + required TResult Function(PsbtError_InvalidControlBlock value) + invalidControlBlock, + required TResult Function(PsbtError_InvalidLeafVersion value) + invalidLeafVersion, + required TResult Function(PsbtError_Taproot value) taproot, + required TResult Function(PsbtError_TapTree value) tapTree, + required TResult Function(PsbtError_XPubKey value) xPubKey, + required TResult Function(PsbtError_Version value) version, + required TResult Function(PsbtError_PartialDataConsumption value) + partialDataConsumption, + required TResult Function(PsbtError_Io value) io, + required TResult Function(PsbtError_OtherPsbtErr value) otherPsbtErr, + }) { + return negativeFee(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult? Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult? Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult? Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult? Function(PsbtError_InvalidKey value)? invalidKey, + TResult? Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult? Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult? Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult? Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult? Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult? Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult? Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult? Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult? Function(PsbtError_InvalidHash value)? invalidHash, + TResult? Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult? Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult? Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult? Function(PsbtError_NegativeFee value)? negativeFee, + TResult? Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult? Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult? Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult? Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult? Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult? Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult? Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult? Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult? Function(PsbtError_Taproot value)? taproot, + TResult? Function(PsbtError_TapTree value)? tapTree, + TResult? Function(PsbtError_XPubKey value)? xPubKey, + TResult? Function(PsbtError_Version value)? version, + TResult? Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult? Function(PsbtError_Io value)? io, + TResult? Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + }) { + return negativeFee?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult Function(PsbtError_InvalidKey value)? invalidKey, + TResult Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult Function(PsbtError_InvalidHash value)? invalidHash, + TResult Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult Function(PsbtError_NegativeFee value)? negativeFee, + TResult Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult Function(PsbtError_Taproot value)? taproot, + TResult Function(PsbtError_TapTree value)? tapTree, + TResult Function(PsbtError_XPubKey value)? xPubKey, + TResult Function(PsbtError_Version value)? version, + TResult Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult Function(PsbtError_Io value)? io, + TResult Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + required TResult orElse(), + }) { + if (negativeFee != null) { + return negativeFee(this); + } + return orElse(); + } +} + +abstract class PsbtError_NegativeFee extends PsbtError { + const factory PsbtError_NegativeFee() = _$PsbtError_NegativeFeeImpl; + const PsbtError_NegativeFee._() : super._(); +} + +/// @nodoc +abstract class _$$PsbtError_FeeOverflowImplCopyWith<$Res> { + factory _$$PsbtError_FeeOverflowImplCopyWith( + _$PsbtError_FeeOverflowImpl value, + $Res Function(_$PsbtError_FeeOverflowImpl) then) = + __$$PsbtError_FeeOverflowImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$PsbtError_FeeOverflowImplCopyWithImpl<$Res> + extends _$PsbtErrorCopyWithImpl<$Res, _$PsbtError_FeeOverflowImpl> + implements _$$PsbtError_FeeOverflowImplCopyWith<$Res> { + __$$PsbtError_FeeOverflowImplCopyWithImpl(_$PsbtError_FeeOverflowImpl _value, + $Res Function(_$PsbtError_FeeOverflowImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$PsbtError_FeeOverflowImpl extends PsbtError_FeeOverflow { + const _$PsbtError_FeeOverflowImpl() : super._(); + + @override + String toString() { + return 'PsbtError.feeOverflow()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PsbtError_FeeOverflowImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidMagic, + required TResult Function() missingUtxo, + required TResult Function() invalidSeparator, + required TResult Function() psbtUtxoOutOfBounds, + required TResult Function(String key) invalidKey, + required TResult Function() invalidProprietaryKey, + required TResult Function(String key) duplicateKey, + required TResult Function() unsignedTxHasScriptSigs, + required TResult Function() unsignedTxHasScriptWitnesses, + required TResult Function() mustHaveUnsignedTx, + required TResult Function() noMorePairs, + required TResult Function() unexpectedUnsignedTx, + required TResult Function(int sighash) nonStandardSighashType, + required TResult Function(String hash) invalidHash, + required TResult Function() invalidPreimageHashPair, + required TResult Function(String xpub) combineInconsistentKeySources, + required TResult Function(String encodingError) consensusEncoding, + required TResult Function() negativeFee, + required TResult Function() feeOverflow, + required TResult Function(String errorMessage) invalidPublicKey, + required TResult Function(String secp256K1Error) invalidSecp256K1PublicKey, + required TResult Function() invalidXOnlyPublicKey, + required TResult Function(String errorMessage) invalidEcdsaSignature, + required TResult Function(String errorMessage) invalidTaprootSignature, + required TResult Function() invalidControlBlock, + required TResult Function() invalidLeafVersion, + required TResult Function() taproot, + required TResult Function(String errorMessage) tapTree, + required TResult Function() xPubKey, + required TResult Function(String errorMessage) version, + required TResult Function() partialDataConsumption, + required TResult Function(String errorMessage) io, + required TResult Function() otherPsbtErr, + }) { + return feeOverflow(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidMagic, + TResult? Function()? missingUtxo, + TResult? Function()? invalidSeparator, + TResult? Function()? psbtUtxoOutOfBounds, + TResult? Function(String key)? invalidKey, + TResult? Function()? invalidProprietaryKey, + TResult? Function(String key)? duplicateKey, + TResult? Function()? unsignedTxHasScriptSigs, + TResult? Function()? unsignedTxHasScriptWitnesses, + TResult? Function()? mustHaveUnsignedTx, + TResult? Function()? noMorePairs, + TResult? Function()? unexpectedUnsignedTx, + TResult? Function(int sighash)? nonStandardSighashType, + TResult? Function(String hash)? invalidHash, + TResult? Function()? invalidPreimageHashPair, + TResult? Function(String xpub)? combineInconsistentKeySources, + TResult? Function(String encodingError)? consensusEncoding, + TResult? Function()? negativeFee, + TResult? Function()? feeOverflow, + TResult? Function(String errorMessage)? invalidPublicKey, + TResult? Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult? Function()? invalidXOnlyPublicKey, + TResult? Function(String errorMessage)? invalidEcdsaSignature, + TResult? Function(String errorMessage)? invalidTaprootSignature, + TResult? Function()? invalidControlBlock, + TResult? Function()? invalidLeafVersion, + TResult? Function()? taproot, + TResult? Function(String errorMessage)? tapTree, + TResult? Function()? xPubKey, + TResult? Function(String errorMessage)? version, + TResult? Function()? partialDataConsumption, + TResult? Function(String errorMessage)? io, + TResult? Function()? otherPsbtErr, + }) { + return feeOverflow?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidMagic, + TResult Function()? missingUtxo, + TResult Function()? invalidSeparator, + TResult Function()? psbtUtxoOutOfBounds, + TResult Function(String key)? invalidKey, + TResult Function()? invalidProprietaryKey, + TResult Function(String key)? duplicateKey, + TResult Function()? unsignedTxHasScriptSigs, + TResult Function()? unsignedTxHasScriptWitnesses, + TResult Function()? mustHaveUnsignedTx, + TResult Function()? noMorePairs, + TResult Function()? unexpectedUnsignedTx, + TResult Function(int sighash)? nonStandardSighashType, + TResult Function(String hash)? invalidHash, + TResult Function()? invalidPreimageHashPair, + TResult Function(String xpub)? combineInconsistentKeySources, + TResult Function(String encodingError)? consensusEncoding, + TResult Function()? negativeFee, + TResult Function()? feeOverflow, + TResult Function(String errorMessage)? invalidPublicKey, + TResult Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult Function()? invalidXOnlyPublicKey, + TResult Function(String errorMessage)? invalidEcdsaSignature, + TResult Function(String errorMessage)? invalidTaprootSignature, + TResult Function()? invalidControlBlock, + TResult Function()? invalidLeafVersion, + TResult Function()? taproot, + TResult Function(String errorMessage)? tapTree, + TResult Function()? xPubKey, + TResult Function(String errorMessage)? version, + TResult Function()? partialDataConsumption, + TResult Function(String errorMessage)? io, + TResult Function()? otherPsbtErr, + required TResult orElse(), + }) { + if (feeOverflow != null) { + return feeOverflow(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(PsbtError_InvalidMagic value) invalidMagic, + required TResult Function(PsbtError_MissingUtxo value) missingUtxo, + required TResult Function(PsbtError_InvalidSeparator value) + invalidSeparator, + required TResult Function(PsbtError_PsbtUtxoOutOfBounds value) + psbtUtxoOutOfBounds, + required TResult Function(PsbtError_InvalidKey value) invalidKey, + required TResult Function(PsbtError_InvalidProprietaryKey value) + invalidProprietaryKey, + required TResult Function(PsbtError_DuplicateKey value) duplicateKey, + required TResult Function(PsbtError_UnsignedTxHasScriptSigs value) + unsignedTxHasScriptSigs, + required TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value) + unsignedTxHasScriptWitnesses, + required TResult Function(PsbtError_MustHaveUnsignedTx value) + mustHaveUnsignedTx, + required TResult Function(PsbtError_NoMorePairs value) noMorePairs, + required TResult Function(PsbtError_UnexpectedUnsignedTx value) + unexpectedUnsignedTx, + required TResult Function(PsbtError_NonStandardSighashType value) + nonStandardSighashType, + required TResult Function(PsbtError_InvalidHash value) invalidHash, + required TResult Function(PsbtError_InvalidPreimageHashPair value) + invalidPreimageHashPair, + required TResult Function(PsbtError_CombineInconsistentKeySources value) + combineInconsistentKeySources, + required TResult Function(PsbtError_ConsensusEncoding value) + consensusEncoding, + required TResult Function(PsbtError_NegativeFee value) negativeFee, + required TResult Function(PsbtError_FeeOverflow value) feeOverflow, + required TResult Function(PsbtError_InvalidPublicKey value) + invalidPublicKey, + required TResult Function(PsbtError_InvalidSecp256k1PublicKey value) + invalidSecp256K1PublicKey, + required TResult Function(PsbtError_InvalidXOnlyPublicKey value) + invalidXOnlyPublicKey, + required TResult Function(PsbtError_InvalidEcdsaSignature value) + invalidEcdsaSignature, + required TResult Function(PsbtError_InvalidTaprootSignature value) + invalidTaprootSignature, + required TResult Function(PsbtError_InvalidControlBlock value) + invalidControlBlock, + required TResult Function(PsbtError_InvalidLeafVersion value) + invalidLeafVersion, + required TResult Function(PsbtError_Taproot value) taproot, + required TResult Function(PsbtError_TapTree value) tapTree, + required TResult Function(PsbtError_XPubKey value) xPubKey, + required TResult Function(PsbtError_Version value) version, + required TResult Function(PsbtError_PartialDataConsumption value) + partialDataConsumption, + required TResult Function(PsbtError_Io value) io, + required TResult Function(PsbtError_OtherPsbtErr value) otherPsbtErr, + }) { + return feeOverflow(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult? Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult? Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult? Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult? Function(PsbtError_InvalidKey value)? invalidKey, + TResult? Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult? Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult? Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult? Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult? Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult? Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult? Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult? Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult? Function(PsbtError_InvalidHash value)? invalidHash, + TResult? Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult? Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult? Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult? Function(PsbtError_NegativeFee value)? negativeFee, + TResult? Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult? Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult? Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult? Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult? Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult? Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult? Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult? Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult? Function(PsbtError_Taproot value)? taproot, + TResult? Function(PsbtError_TapTree value)? tapTree, + TResult? Function(PsbtError_XPubKey value)? xPubKey, + TResult? Function(PsbtError_Version value)? version, + TResult? Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult? Function(PsbtError_Io value)? io, + TResult? Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + }) { + return feeOverflow?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult Function(PsbtError_InvalidKey value)? invalidKey, + TResult Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult Function(PsbtError_InvalidHash value)? invalidHash, + TResult Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult Function(PsbtError_NegativeFee value)? negativeFee, + TResult Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult Function(PsbtError_Taproot value)? taproot, + TResult Function(PsbtError_TapTree value)? tapTree, + TResult Function(PsbtError_XPubKey value)? xPubKey, + TResult Function(PsbtError_Version value)? version, + TResult Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult Function(PsbtError_Io value)? io, + TResult Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + required TResult orElse(), + }) { + if (feeOverflow != null) { + return feeOverflow(this); + } + return orElse(); + } +} + +abstract class PsbtError_FeeOverflow extends PsbtError { + const factory PsbtError_FeeOverflow() = _$PsbtError_FeeOverflowImpl; + const PsbtError_FeeOverflow._() : super._(); +} + +/// @nodoc +abstract class _$$PsbtError_InvalidPublicKeyImplCopyWith<$Res> { + factory _$$PsbtError_InvalidPublicKeyImplCopyWith( + _$PsbtError_InvalidPublicKeyImpl value, + $Res Function(_$PsbtError_InvalidPublicKeyImpl) then) = + __$$PsbtError_InvalidPublicKeyImplCopyWithImpl<$Res>; + @useResult + $Res call({String errorMessage}); +} + +/// @nodoc +class __$$PsbtError_InvalidPublicKeyImplCopyWithImpl<$Res> + extends _$PsbtErrorCopyWithImpl<$Res, _$PsbtError_InvalidPublicKeyImpl> + implements _$$PsbtError_InvalidPublicKeyImplCopyWith<$Res> { + __$$PsbtError_InvalidPublicKeyImplCopyWithImpl( + _$PsbtError_InvalidPublicKeyImpl _value, + $Res Function(_$PsbtError_InvalidPublicKeyImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? errorMessage = null, + }) { + return _then(_$PsbtError_InvalidPublicKeyImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$PsbtError_InvalidPublicKeyImpl extends PsbtError_InvalidPublicKey { + const _$PsbtError_InvalidPublicKeyImpl({required this.errorMessage}) + : super._(); + + @override + final String errorMessage; + + @override + String toString() { + return 'PsbtError.invalidPublicKey(errorMessage: $errorMessage)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PsbtError_InvalidPublicKeyImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); + } + + @override + int get hashCode => Object.hash(runtimeType, errorMessage); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$PsbtError_InvalidPublicKeyImplCopyWith<_$PsbtError_InvalidPublicKeyImpl> + get copyWith => __$$PsbtError_InvalidPublicKeyImplCopyWithImpl< + _$PsbtError_InvalidPublicKeyImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidMagic, + required TResult Function() missingUtxo, + required TResult Function() invalidSeparator, + required TResult Function() psbtUtxoOutOfBounds, + required TResult Function(String key) invalidKey, + required TResult Function() invalidProprietaryKey, + required TResult Function(String key) duplicateKey, + required TResult Function() unsignedTxHasScriptSigs, + required TResult Function() unsignedTxHasScriptWitnesses, + required TResult Function() mustHaveUnsignedTx, + required TResult Function() noMorePairs, + required TResult Function() unexpectedUnsignedTx, + required TResult Function(int sighash) nonStandardSighashType, + required TResult Function(String hash) invalidHash, + required TResult Function() invalidPreimageHashPair, + required TResult Function(String xpub) combineInconsistentKeySources, + required TResult Function(String encodingError) consensusEncoding, + required TResult Function() negativeFee, + required TResult Function() feeOverflow, + required TResult Function(String errorMessage) invalidPublicKey, + required TResult Function(String secp256K1Error) invalidSecp256K1PublicKey, + required TResult Function() invalidXOnlyPublicKey, + required TResult Function(String errorMessage) invalidEcdsaSignature, + required TResult Function(String errorMessage) invalidTaprootSignature, + required TResult Function() invalidControlBlock, + required TResult Function() invalidLeafVersion, + required TResult Function() taproot, + required TResult Function(String errorMessage) tapTree, + required TResult Function() xPubKey, + required TResult Function(String errorMessage) version, + required TResult Function() partialDataConsumption, + required TResult Function(String errorMessage) io, + required TResult Function() otherPsbtErr, + }) { + return invalidPublicKey(errorMessage); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidMagic, + TResult? Function()? missingUtxo, + TResult? Function()? invalidSeparator, + TResult? Function()? psbtUtxoOutOfBounds, + TResult? Function(String key)? invalidKey, + TResult? Function()? invalidProprietaryKey, + TResult? Function(String key)? duplicateKey, + TResult? Function()? unsignedTxHasScriptSigs, + TResult? Function()? unsignedTxHasScriptWitnesses, + TResult? Function()? mustHaveUnsignedTx, + TResult? Function()? noMorePairs, + TResult? Function()? unexpectedUnsignedTx, + TResult? Function(int sighash)? nonStandardSighashType, + TResult? Function(String hash)? invalidHash, + TResult? Function()? invalidPreimageHashPair, + TResult? Function(String xpub)? combineInconsistentKeySources, + TResult? Function(String encodingError)? consensusEncoding, + TResult? Function()? negativeFee, + TResult? Function()? feeOverflow, + TResult? Function(String errorMessage)? invalidPublicKey, + TResult? Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult? Function()? invalidXOnlyPublicKey, + TResult? Function(String errorMessage)? invalidEcdsaSignature, + TResult? Function(String errorMessage)? invalidTaprootSignature, + TResult? Function()? invalidControlBlock, + TResult? Function()? invalidLeafVersion, + TResult? Function()? taproot, + TResult? Function(String errorMessage)? tapTree, + TResult? Function()? xPubKey, + TResult? Function(String errorMessage)? version, + TResult? Function()? partialDataConsumption, + TResult? Function(String errorMessage)? io, + TResult? Function()? otherPsbtErr, + }) { + return invalidPublicKey?.call(errorMessage); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidMagic, + TResult Function()? missingUtxo, + TResult Function()? invalidSeparator, + TResult Function()? psbtUtxoOutOfBounds, + TResult Function(String key)? invalidKey, + TResult Function()? invalidProprietaryKey, + TResult Function(String key)? duplicateKey, + TResult Function()? unsignedTxHasScriptSigs, + TResult Function()? unsignedTxHasScriptWitnesses, + TResult Function()? mustHaveUnsignedTx, + TResult Function()? noMorePairs, + TResult Function()? unexpectedUnsignedTx, + TResult Function(int sighash)? nonStandardSighashType, + TResult Function(String hash)? invalidHash, + TResult Function()? invalidPreimageHashPair, + TResult Function(String xpub)? combineInconsistentKeySources, + TResult Function(String encodingError)? consensusEncoding, + TResult Function()? negativeFee, + TResult Function()? feeOverflow, + TResult Function(String errorMessage)? invalidPublicKey, + TResult Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult Function()? invalidXOnlyPublicKey, + TResult Function(String errorMessage)? invalidEcdsaSignature, + TResult Function(String errorMessage)? invalidTaprootSignature, + TResult Function()? invalidControlBlock, + TResult Function()? invalidLeafVersion, + TResult Function()? taproot, + TResult Function(String errorMessage)? tapTree, + TResult Function()? xPubKey, + TResult Function(String errorMessage)? version, + TResult Function()? partialDataConsumption, + TResult Function(String errorMessage)? io, + TResult Function()? otherPsbtErr, + required TResult orElse(), + }) { + if (invalidPublicKey != null) { + return invalidPublicKey(errorMessage); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(PsbtError_InvalidMagic value) invalidMagic, + required TResult Function(PsbtError_MissingUtxo value) missingUtxo, + required TResult Function(PsbtError_InvalidSeparator value) + invalidSeparator, + required TResult Function(PsbtError_PsbtUtxoOutOfBounds value) + psbtUtxoOutOfBounds, + required TResult Function(PsbtError_InvalidKey value) invalidKey, + required TResult Function(PsbtError_InvalidProprietaryKey value) + invalidProprietaryKey, + required TResult Function(PsbtError_DuplicateKey value) duplicateKey, + required TResult Function(PsbtError_UnsignedTxHasScriptSigs value) + unsignedTxHasScriptSigs, + required TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value) + unsignedTxHasScriptWitnesses, + required TResult Function(PsbtError_MustHaveUnsignedTx value) + mustHaveUnsignedTx, + required TResult Function(PsbtError_NoMorePairs value) noMorePairs, + required TResult Function(PsbtError_UnexpectedUnsignedTx value) + unexpectedUnsignedTx, + required TResult Function(PsbtError_NonStandardSighashType value) + nonStandardSighashType, + required TResult Function(PsbtError_InvalidHash value) invalidHash, + required TResult Function(PsbtError_InvalidPreimageHashPair value) + invalidPreimageHashPair, + required TResult Function(PsbtError_CombineInconsistentKeySources value) + combineInconsistentKeySources, + required TResult Function(PsbtError_ConsensusEncoding value) + consensusEncoding, + required TResult Function(PsbtError_NegativeFee value) negativeFee, + required TResult Function(PsbtError_FeeOverflow value) feeOverflow, + required TResult Function(PsbtError_InvalidPublicKey value) + invalidPublicKey, + required TResult Function(PsbtError_InvalidSecp256k1PublicKey value) + invalidSecp256K1PublicKey, + required TResult Function(PsbtError_InvalidXOnlyPublicKey value) + invalidXOnlyPublicKey, + required TResult Function(PsbtError_InvalidEcdsaSignature value) + invalidEcdsaSignature, + required TResult Function(PsbtError_InvalidTaprootSignature value) + invalidTaprootSignature, + required TResult Function(PsbtError_InvalidControlBlock value) + invalidControlBlock, + required TResult Function(PsbtError_InvalidLeafVersion value) + invalidLeafVersion, + required TResult Function(PsbtError_Taproot value) taproot, + required TResult Function(PsbtError_TapTree value) tapTree, + required TResult Function(PsbtError_XPubKey value) xPubKey, + required TResult Function(PsbtError_Version value) version, + required TResult Function(PsbtError_PartialDataConsumption value) + partialDataConsumption, + required TResult Function(PsbtError_Io value) io, + required TResult Function(PsbtError_OtherPsbtErr value) otherPsbtErr, + }) { + return invalidPublicKey(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult? Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult? Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult? Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult? Function(PsbtError_InvalidKey value)? invalidKey, + TResult? Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult? Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult? Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult? Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult? Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult? Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult? Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult? Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult? Function(PsbtError_InvalidHash value)? invalidHash, + TResult? Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult? Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult? Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult? Function(PsbtError_NegativeFee value)? negativeFee, + TResult? Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult? Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult? Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult? Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult? Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult? Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult? Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult? Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult? Function(PsbtError_Taproot value)? taproot, + TResult? Function(PsbtError_TapTree value)? tapTree, + TResult? Function(PsbtError_XPubKey value)? xPubKey, + TResult? Function(PsbtError_Version value)? version, + TResult? Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult? Function(PsbtError_Io value)? io, + TResult? Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + }) { + return invalidPublicKey?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult Function(PsbtError_InvalidKey value)? invalidKey, + TResult Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult Function(PsbtError_InvalidHash value)? invalidHash, + TResult Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult Function(PsbtError_NegativeFee value)? negativeFee, + TResult Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult Function(PsbtError_Taproot value)? taproot, + TResult Function(PsbtError_TapTree value)? tapTree, + TResult Function(PsbtError_XPubKey value)? xPubKey, + TResult Function(PsbtError_Version value)? version, + TResult Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult Function(PsbtError_Io value)? io, + TResult Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + required TResult orElse(), + }) { + if (invalidPublicKey != null) { + return invalidPublicKey(this); + } + return orElse(); + } +} + +abstract class PsbtError_InvalidPublicKey extends PsbtError { + const factory PsbtError_InvalidPublicKey( + {required final String errorMessage}) = _$PsbtError_InvalidPublicKeyImpl; + const PsbtError_InvalidPublicKey._() : super._(); + + String get errorMessage; + @JsonKey(ignore: true) + _$$PsbtError_InvalidPublicKeyImplCopyWith<_$PsbtError_InvalidPublicKeyImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$PsbtError_InvalidSecp256k1PublicKeyImplCopyWith<$Res> { + factory _$$PsbtError_InvalidSecp256k1PublicKeyImplCopyWith( + _$PsbtError_InvalidSecp256k1PublicKeyImpl value, + $Res Function(_$PsbtError_InvalidSecp256k1PublicKeyImpl) then) = + __$$PsbtError_InvalidSecp256k1PublicKeyImplCopyWithImpl<$Res>; + @useResult + $Res call({String secp256K1Error}); +} + +/// @nodoc +class __$$PsbtError_InvalidSecp256k1PublicKeyImplCopyWithImpl<$Res> + extends _$PsbtErrorCopyWithImpl<$Res, + _$PsbtError_InvalidSecp256k1PublicKeyImpl> + implements _$$PsbtError_InvalidSecp256k1PublicKeyImplCopyWith<$Res> { + __$$PsbtError_InvalidSecp256k1PublicKeyImplCopyWithImpl( + _$PsbtError_InvalidSecp256k1PublicKeyImpl _value, + $Res Function(_$PsbtError_InvalidSecp256k1PublicKeyImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? secp256K1Error = null, + }) { + return _then(_$PsbtError_InvalidSecp256k1PublicKeyImpl( + secp256K1Error: null == secp256K1Error + ? _value.secp256K1Error + : secp256K1Error // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$PsbtError_InvalidSecp256k1PublicKeyImpl + extends PsbtError_InvalidSecp256k1PublicKey { + const _$PsbtError_InvalidSecp256k1PublicKeyImpl( + {required this.secp256K1Error}) + : super._(); + + @override + final String secp256K1Error; + + @override + String toString() { + return 'PsbtError.invalidSecp256K1PublicKey(secp256K1Error: $secp256K1Error)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PsbtError_InvalidSecp256k1PublicKeyImpl && + (identical(other.secp256K1Error, secp256K1Error) || + other.secp256K1Error == secp256K1Error)); + } + + @override + int get hashCode => Object.hash(runtimeType, secp256K1Error); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$PsbtError_InvalidSecp256k1PublicKeyImplCopyWith< + _$PsbtError_InvalidSecp256k1PublicKeyImpl> + get copyWith => __$$PsbtError_InvalidSecp256k1PublicKeyImplCopyWithImpl< + _$PsbtError_InvalidSecp256k1PublicKeyImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidMagic, + required TResult Function() missingUtxo, + required TResult Function() invalidSeparator, + required TResult Function() psbtUtxoOutOfBounds, + required TResult Function(String key) invalidKey, + required TResult Function() invalidProprietaryKey, + required TResult Function(String key) duplicateKey, + required TResult Function() unsignedTxHasScriptSigs, + required TResult Function() unsignedTxHasScriptWitnesses, + required TResult Function() mustHaveUnsignedTx, + required TResult Function() noMorePairs, + required TResult Function() unexpectedUnsignedTx, + required TResult Function(int sighash) nonStandardSighashType, + required TResult Function(String hash) invalidHash, + required TResult Function() invalidPreimageHashPair, + required TResult Function(String xpub) combineInconsistentKeySources, + required TResult Function(String encodingError) consensusEncoding, + required TResult Function() negativeFee, + required TResult Function() feeOverflow, + required TResult Function(String errorMessage) invalidPublicKey, + required TResult Function(String secp256K1Error) invalidSecp256K1PublicKey, + required TResult Function() invalidXOnlyPublicKey, + required TResult Function(String errorMessage) invalidEcdsaSignature, + required TResult Function(String errorMessage) invalidTaprootSignature, + required TResult Function() invalidControlBlock, + required TResult Function() invalidLeafVersion, + required TResult Function() taproot, + required TResult Function(String errorMessage) tapTree, + required TResult Function() xPubKey, + required TResult Function(String errorMessage) version, + required TResult Function() partialDataConsumption, + required TResult Function(String errorMessage) io, + required TResult Function() otherPsbtErr, + }) { + return invalidSecp256K1PublicKey(secp256K1Error); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidMagic, + TResult? Function()? missingUtxo, + TResult? Function()? invalidSeparator, + TResult? Function()? psbtUtxoOutOfBounds, + TResult? Function(String key)? invalidKey, + TResult? Function()? invalidProprietaryKey, + TResult? Function(String key)? duplicateKey, + TResult? Function()? unsignedTxHasScriptSigs, + TResult? Function()? unsignedTxHasScriptWitnesses, + TResult? Function()? mustHaveUnsignedTx, + TResult? Function()? noMorePairs, + TResult? Function()? unexpectedUnsignedTx, + TResult? Function(int sighash)? nonStandardSighashType, + TResult? Function(String hash)? invalidHash, + TResult? Function()? invalidPreimageHashPair, + TResult? Function(String xpub)? combineInconsistentKeySources, + TResult? Function(String encodingError)? consensusEncoding, + TResult? Function()? negativeFee, + TResult? Function()? feeOverflow, + TResult? Function(String errorMessage)? invalidPublicKey, + TResult? Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult? Function()? invalidXOnlyPublicKey, + TResult? Function(String errorMessage)? invalidEcdsaSignature, + TResult? Function(String errorMessage)? invalidTaprootSignature, + TResult? Function()? invalidControlBlock, + TResult? Function()? invalidLeafVersion, + TResult? Function()? taproot, + TResult? Function(String errorMessage)? tapTree, + TResult? Function()? xPubKey, + TResult? Function(String errorMessage)? version, + TResult? Function()? partialDataConsumption, + TResult? Function(String errorMessage)? io, + TResult? Function()? otherPsbtErr, + }) { + return invalidSecp256K1PublicKey?.call(secp256K1Error); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidMagic, + TResult Function()? missingUtxo, + TResult Function()? invalidSeparator, + TResult Function()? psbtUtxoOutOfBounds, + TResult Function(String key)? invalidKey, + TResult Function()? invalidProprietaryKey, + TResult Function(String key)? duplicateKey, + TResult Function()? unsignedTxHasScriptSigs, + TResult Function()? unsignedTxHasScriptWitnesses, + TResult Function()? mustHaveUnsignedTx, + TResult Function()? noMorePairs, + TResult Function()? unexpectedUnsignedTx, + TResult Function(int sighash)? nonStandardSighashType, + TResult Function(String hash)? invalidHash, + TResult Function()? invalidPreimageHashPair, + TResult Function(String xpub)? combineInconsistentKeySources, + TResult Function(String encodingError)? consensusEncoding, + TResult Function()? negativeFee, + TResult Function()? feeOverflow, + TResult Function(String errorMessage)? invalidPublicKey, + TResult Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult Function()? invalidXOnlyPublicKey, + TResult Function(String errorMessage)? invalidEcdsaSignature, + TResult Function(String errorMessage)? invalidTaprootSignature, + TResult Function()? invalidControlBlock, + TResult Function()? invalidLeafVersion, + TResult Function()? taproot, + TResult Function(String errorMessage)? tapTree, + TResult Function()? xPubKey, + TResult Function(String errorMessage)? version, + TResult Function()? partialDataConsumption, + TResult Function(String errorMessage)? io, + TResult Function()? otherPsbtErr, + required TResult orElse(), + }) { + if (invalidSecp256K1PublicKey != null) { + return invalidSecp256K1PublicKey(secp256K1Error); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(PsbtError_InvalidMagic value) invalidMagic, + required TResult Function(PsbtError_MissingUtxo value) missingUtxo, + required TResult Function(PsbtError_InvalidSeparator value) + invalidSeparator, + required TResult Function(PsbtError_PsbtUtxoOutOfBounds value) + psbtUtxoOutOfBounds, + required TResult Function(PsbtError_InvalidKey value) invalidKey, + required TResult Function(PsbtError_InvalidProprietaryKey value) + invalidProprietaryKey, + required TResult Function(PsbtError_DuplicateKey value) duplicateKey, + required TResult Function(PsbtError_UnsignedTxHasScriptSigs value) + unsignedTxHasScriptSigs, + required TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value) + unsignedTxHasScriptWitnesses, + required TResult Function(PsbtError_MustHaveUnsignedTx value) + mustHaveUnsignedTx, + required TResult Function(PsbtError_NoMorePairs value) noMorePairs, + required TResult Function(PsbtError_UnexpectedUnsignedTx value) + unexpectedUnsignedTx, + required TResult Function(PsbtError_NonStandardSighashType value) + nonStandardSighashType, + required TResult Function(PsbtError_InvalidHash value) invalidHash, + required TResult Function(PsbtError_InvalidPreimageHashPair value) + invalidPreimageHashPair, + required TResult Function(PsbtError_CombineInconsistentKeySources value) + combineInconsistentKeySources, + required TResult Function(PsbtError_ConsensusEncoding value) + consensusEncoding, + required TResult Function(PsbtError_NegativeFee value) negativeFee, + required TResult Function(PsbtError_FeeOverflow value) feeOverflow, + required TResult Function(PsbtError_InvalidPublicKey value) + invalidPublicKey, + required TResult Function(PsbtError_InvalidSecp256k1PublicKey value) + invalidSecp256K1PublicKey, + required TResult Function(PsbtError_InvalidXOnlyPublicKey value) + invalidXOnlyPublicKey, + required TResult Function(PsbtError_InvalidEcdsaSignature value) + invalidEcdsaSignature, + required TResult Function(PsbtError_InvalidTaprootSignature value) + invalidTaprootSignature, + required TResult Function(PsbtError_InvalidControlBlock value) + invalidControlBlock, + required TResult Function(PsbtError_InvalidLeafVersion value) + invalidLeafVersion, + required TResult Function(PsbtError_Taproot value) taproot, + required TResult Function(PsbtError_TapTree value) tapTree, + required TResult Function(PsbtError_XPubKey value) xPubKey, + required TResult Function(PsbtError_Version value) version, + required TResult Function(PsbtError_PartialDataConsumption value) + partialDataConsumption, + required TResult Function(PsbtError_Io value) io, + required TResult Function(PsbtError_OtherPsbtErr value) otherPsbtErr, + }) { + return invalidSecp256K1PublicKey(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult? Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult? Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult? Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult? Function(PsbtError_InvalidKey value)? invalidKey, + TResult? Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult? Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult? Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult? Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult? Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult? Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult? Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult? Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult? Function(PsbtError_InvalidHash value)? invalidHash, + TResult? Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult? Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult? Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult? Function(PsbtError_NegativeFee value)? negativeFee, + TResult? Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult? Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult? Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult? Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult? Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult? Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult? Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult? Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult? Function(PsbtError_Taproot value)? taproot, + TResult? Function(PsbtError_TapTree value)? tapTree, + TResult? Function(PsbtError_XPubKey value)? xPubKey, + TResult? Function(PsbtError_Version value)? version, + TResult? Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult? Function(PsbtError_Io value)? io, + TResult? Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + }) { + return invalidSecp256K1PublicKey?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult Function(PsbtError_InvalidKey value)? invalidKey, + TResult Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult Function(PsbtError_InvalidHash value)? invalidHash, + TResult Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult Function(PsbtError_NegativeFee value)? negativeFee, + TResult Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult Function(PsbtError_Taproot value)? taproot, + TResult Function(PsbtError_TapTree value)? tapTree, + TResult Function(PsbtError_XPubKey value)? xPubKey, + TResult Function(PsbtError_Version value)? version, + TResult Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult Function(PsbtError_Io value)? io, + TResult Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + required TResult orElse(), + }) { + if (invalidSecp256K1PublicKey != null) { + return invalidSecp256K1PublicKey(this); + } + return orElse(); + } +} + +abstract class PsbtError_InvalidSecp256k1PublicKey extends PsbtError { + const factory PsbtError_InvalidSecp256k1PublicKey( + {required final String secp256K1Error}) = + _$PsbtError_InvalidSecp256k1PublicKeyImpl; + const PsbtError_InvalidSecp256k1PublicKey._() : super._(); + + String get secp256K1Error; + @JsonKey(ignore: true) + _$$PsbtError_InvalidSecp256k1PublicKeyImplCopyWith< + _$PsbtError_InvalidSecp256k1PublicKeyImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$PsbtError_InvalidXOnlyPublicKeyImplCopyWith<$Res> { + factory _$$PsbtError_InvalidXOnlyPublicKeyImplCopyWith( + _$PsbtError_InvalidXOnlyPublicKeyImpl value, + $Res Function(_$PsbtError_InvalidXOnlyPublicKeyImpl) then) = + __$$PsbtError_InvalidXOnlyPublicKeyImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$PsbtError_InvalidXOnlyPublicKeyImplCopyWithImpl<$Res> + extends _$PsbtErrorCopyWithImpl<$Res, _$PsbtError_InvalidXOnlyPublicKeyImpl> + implements _$$PsbtError_InvalidXOnlyPublicKeyImplCopyWith<$Res> { + __$$PsbtError_InvalidXOnlyPublicKeyImplCopyWithImpl( + _$PsbtError_InvalidXOnlyPublicKeyImpl _value, + $Res Function(_$PsbtError_InvalidXOnlyPublicKeyImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$PsbtError_InvalidXOnlyPublicKeyImpl + extends PsbtError_InvalidXOnlyPublicKey { + const _$PsbtError_InvalidXOnlyPublicKeyImpl() : super._(); + + @override + String toString() { + return 'PsbtError.invalidXOnlyPublicKey()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PsbtError_InvalidXOnlyPublicKeyImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidMagic, + required TResult Function() missingUtxo, + required TResult Function() invalidSeparator, + required TResult Function() psbtUtxoOutOfBounds, + required TResult Function(String key) invalidKey, + required TResult Function() invalidProprietaryKey, + required TResult Function(String key) duplicateKey, + required TResult Function() unsignedTxHasScriptSigs, + required TResult Function() unsignedTxHasScriptWitnesses, + required TResult Function() mustHaveUnsignedTx, + required TResult Function() noMorePairs, + required TResult Function() unexpectedUnsignedTx, + required TResult Function(int sighash) nonStandardSighashType, + required TResult Function(String hash) invalidHash, + required TResult Function() invalidPreimageHashPair, + required TResult Function(String xpub) combineInconsistentKeySources, + required TResult Function(String encodingError) consensusEncoding, + required TResult Function() negativeFee, + required TResult Function() feeOverflow, + required TResult Function(String errorMessage) invalidPublicKey, + required TResult Function(String secp256K1Error) invalidSecp256K1PublicKey, + required TResult Function() invalidXOnlyPublicKey, + required TResult Function(String errorMessage) invalidEcdsaSignature, + required TResult Function(String errorMessage) invalidTaprootSignature, + required TResult Function() invalidControlBlock, + required TResult Function() invalidLeafVersion, + required TResult Function() taproot, + required TResult Function(String errorMessage) tapTree, + required TResult Function() xPubKey, + required TResult Function(String errorMessage) version, + required TResult Function() partialDataConsumption, + required TResult Function(String errorMessage) io, + required TResult Function() otherPsbtErr, + }) { + return invalidXOnlyPublicKey(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidMagic, + TResult? Function()? missingUtxo, + TResult? Function()? invalidSeparator, + TResult? Function()? psbtUtxoOutOfBounds, + TResult? Function(String key)? invalidKey, + TResult? Function()? invalidProprietaryKey, + TResult? Function(String key)? duplicateKey, + TResult? Function()? unsignedTxHasScriptSigs, + TResult? Function()? unsignedTxHasScriptWitnesses, + TResult? Function()? mustHaveUnsignedTx, + TResult? Function()? noMorePairs, + TResult? Function()? unexpectedUnsignedTx, + TResult? Function(int sighash)? nonStandardSighashType, + TResult? Function(String hash)? invalidHash, + TResult? Function()? invalidPreimageHashPair, + TResult? Function(String xpub)? combineInconsistentKeySources, + TResult? Function(String encodingError)? consensusEncoding, + TResult? Function()? negativeFee, + TResult? Function()? feeOverflow, + TResult? Function(String errorMessage)? invalidPublicKey, + TResult? Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult? Function()? invalidXOnlyPublicKey, + TResult? Function(String errorMessage)? invalidEcdsaSignature, + TResult? Function(String errorMessage)? invalidTaprootSignature, + TResult? Function()? invalidControlBlock, + TResult? Function()? invalidLeafVersion, + TResult? Function()? taproot, + TResult? Function(String errorMessage)? tapTree, + TResult? Function()? xPubKey, + TResult? Function(String errorMessage)? version, + TResult? Function()? partialDataConsumption, + TResult? Function(String errorMessage)? io, + TResult? Function()? otherPsbtErr, + }) { + return invalidXOnlyPublicKey?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidMagic, + TResult Function()? missingUtxo, + TResult Function()? invalidSeparator, + TResult Function()? psbtUtxoOutOfBounds, + TResult Function(String key)? invalidKey, + TResult Function()? invalidProprietaryKey, + TResult Function(String key)? duplicateKey, + TResult Function()? unsignedTxHasScriptSigs, + TResult Function()? unsignedTxHasScriptWitnesses, + TResult Function()? mustHaveUnsignedTx, + TResult Function()? noMorePairs, + TResult Function()? unexpectedUnsignedTx, + TResult Function(int sighash)? nonStandardSighashType, + TResult Function(String hash)? invalidHash, + TResult Function()? invalidPreimageHashPair, + TResult Function(String xpub)? combineInconsistentKeySources, + TResult Function(String encodingError)? consensusEncoding, + TResult Function()? negativeFee, + TResult Function()? feeOverflow, + TResult Function(String errorMessage)? invalidPublicKey, + TResult Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult Function()? invalidXOnlyPublicKey, + TResult Function(String errorMessage)? invalidEcdsaSignature, + TResult Function(String errorMessage)? invalidTaprootSignature, + TResult Function()? invalidControlBlock, + TResult Function()? invalidLeafVersion, + TResult Function()? taproot, + TResult Function(String errorMessage)? tapTree, + TResult Function()? xPubKey, + TResult Function(String errorMessage)? version, + TResult Function()? partialDataConsumption, + TResult Function(String errorMessage)? io, + TResult Function()? otherPsbtErr, + required TResult orElse(), + }) { + if (invalidXOnlyPublicKey != null) { + return invalidXOnlyPublicKey(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(PsbtError_InvalidMagic value) invalidMagic, + required TResult Function(PsbtError_MissingUtxo value) missingUtxo, + required TResult Function(PsbtError_InvalidSeparator value) + invalidSeparator, + required TResult Function(PsbtError_PsbtUtxoOutOfBounds value) + psbtUtxoOutOfBounds, + required TResult Function(PsbtError_InvalidKey value) invalidKey, + required TResult Function(PsbtError_InvalidProprietaryKey value) + invalidProprietaryKey, + required TResult Function(PsbtError_DuplicateKey value) duplicateKey, + required TResult Function(PsbtError_UnsignedTxHasScriptSigs value) + unsignedTxHasScriptSigs, + required TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value) + unsignedTxHasScriptWitnesses, + required TResult Function(PsbtError_MustHaveUnsignedTx value) + mustHaveUnsignedTx, + required TResult Function(PsbtError_NoMorePairs value) noMorePairs, + required TResult Function(PsbtError_UnexpectedUnsignedTx value) + unexpectedUnsignedTx, + required TResult Function(PsbtError_NonStandardSighashType value) + nonStandardSighashType, + required TResult Function(PsbtError_InvalidHash value) invalidHash, + required TResult Function(PsbtError_InvalidPreimageHashPair value) + invalidPreimageHashPair, + required TResult Function(PsbtError_CombineInconsistentKeySources value) + combineInconsistentKeySources, + required TResult Function(PsbtError_ConsensusEncoding value) + consensusEncoding, + required TResult Function(PsbtError_NegativeFee value) negativeFee, + required TResult Function(PsbtError_FeeOverflow value) feeOverflow, + required TResult Function(PsbtError_InvalidPublicKey value) + invalidPublicKey, + required TResult Function(PsbtError_InvalidSecp256k1PublicKey value) + invalidSecp256K1PublicKey, + required TResult Function(PsbtError_InvalidXOnlyPublicKey value) + invalidXOnlyPublicKey, + required TResult Function(PsbtError_InvalidEcdsaSignature value) + invalidEcdsaSignature, + required TResult Function(PsbtError_InvalidTaprootSignature value) + invalidTaprootSignature, + required TResult Function(PsbtError_InvalidControlBlock value) + invalidControlBlock, + required TResult Function(PsbtError_InvalidLeafVersion value) + invalidLeafVersion, + required TResult Function(PsbtError_Taproot value) taproot, + required TResult Function(PsbtError_TapTree value) tapTree, + required TResult Function(PsbtError_XPubKey value) xPubKey, + required TResult Function(PsbtError_Version value) version, + required TResult Function(PsbtError_PartialDataConsumption value) + partialDataConsumption, + required TResult Function(PsbtError_Io value) io, + required TResult Function(PsbtError_OtherPsbtErr value) otherPsbtErr, + }) { + return invalidXOnlyPublicKey(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult? Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult? Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult? Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult? Function(PsbtError_InvalidKey value)? invalidKey, + TResult? Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult? Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult? Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult? Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult? Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult? Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult? Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult? Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult? Function(PsbtError_InvalidHash value)? invalidHash, + TResult? Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult? Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult? Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult? Function(PsbtError_NegativeFee value)? negativeFee, + TResult? Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult? Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult? Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult? Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult? Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult? Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult? Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult? Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult? Function(PsbtError_Taproot value)? taproot, + TResult? Function(PsbtError_TapTree value)? tapTree, + TResult? Function(PsbtError_XPubKey value)? xPubKey, + TResult? Function(PsbtError_Version value)? version, + TResult? Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult? Function(PsbtError_Io value)? io, + TResult? Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + }) { + return invalidXOnlyPublicKey?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult Function(PsbtError_InvalidKey value)? invalidKey, + TResult Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult Function(PsbtError_InvalidHash value)? invalidHash, + TResult Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult Function(PsbtError_NegativeFee value)? negativeFee, + TResult Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult Function(PsbtError_Taproot value)? taproot, + TResult Function(PsbtError_TapTree value)? tapTree, + TResult Function(PsbtError_XPubKey value)? xPubKey, + TResult Function(PsbtError_Version value)? version, + TResult Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult Function(PsbtError_Io value)? io, + TResult Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + required TResult orElse(), + }) { + if (invalidXOnlyPublicKey != null) { + return invalidXOnlyPublicKey(this); + } + return orElse(); + } +} + +abstract class PsbtError_InvalidXOnlyPublicKey extends PsbtError { + const factory PsbtError_InvalidXOnlyPublicKey() = + _$PsbtError_InvalidXOnlyPublicKeyImpl; + const PsbtError_InvalidXOnlyPublicKey._() : super._(); +} + +/// @nodoc +abstract class _$$PsbtError_InvalidEcdsaSignatureImplCopyWith<$Res> { + factory _$$PsbtError_InvalidEcdsaSignatureImplCopyWith( + _$PsbtError_InvalidEcdsaSignatureImpl value, + $Res Function(_$PsbtError_InvalidEcdsaSignatureImpl) then) = + __$$PsbtError_InvalidEcdsaSignatureImplCopyWithImpl<$Res>; + @useResult + $Res call({String errorMessage}); +} + +/// @nodoc +class __$$PsbtError_InvalidEcdsaSignatureImplCopyWithImpl<$Res> + extends _$PsbtErrorCopyWithImpl<$Res, _$PsbtError_InvalidEcdsaSignatureImpl> + implements _$$PsbtError_InvalidEcdsaSignatureImplCopyWith<$Res> { + __$$PsbtError_InvalidEcdsaSignatureImplCopyWithImpl( + _$PsbtError_InvalidEcdsaSignatureImpl _value, + $Res Function(_$PsbtError_InvalidEcdsaSignatureImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? errorMessage = null, + }) { + return _then(_$PsbtError_InvalidEcdsaSignatureImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$PsbtError_InvalidEcdsaSignatureImpl + extends PsbtError_InvalidEcdsaSignature { + const _$PsbtError_InvalidEcdsaSignatureImpl({required this.errorMessage}) + : super._(); + + @override + final String errorMessage; + + @override + String toString() { + return 'PsbtError.invalidEcdsaSignature(errorMessage: $errorMessage)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PsbtError_InvalidEcdsaSignatureImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); + } + + @override + int get hashCode => Object.hash(runtimeType, errorMessage); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$PsbtError_InvalidEcdsaSignatureImplCopyWith< + _$PsbtError_InvalidEcdsaSignatureImpl> + get copyWith => __$$PsbtError_InvalidEcdsaSignatureImplCopyWithImpl< + _$PsbtError_InvalidEcdsaSignatureImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidMagic, + required TResult Function() missingUtxo, + required TResult Function() invalidSeparator, + required TResult Function() psbtUtxoOutOfBounds, + required TResult Function(String key) invalidKey, + required TResult Function() invalidProprietaryKey, + required TResult Function(String key) duplicateKey, + required TResult Function() unsignedTxHasScriptSigs, + required TResult Function() unsignedTxHasScriptWitnesses, + required TResult Function() mustHaveUnsignedTx, + required TResult Function() noMorePairs, + required TResult Function() unexpectedUnsignedTx, + required TResult Function(int sighash) nonStandardSighashType, + required TResult Function(String hash) invalidHash, + required TResult Function() invalidPreimageHashPair, + required TResult Function(String xpub) combineInconsistentKeySources, + required TResult Function(String encodingError) consensusEncoding, + required TResult Function() negativeFee, + required TResult Function() feeOverflow, + required TResult Function(String errorMessage) invalidPublicKey, + required TResult Function(String secp256K1Error) invalidSecp256K1PublicKey, + required TResult Function() invalidXOnlyPublicKey, + required TResult Function(String errorMessage) invalidEcdsaSignature, + required TResult Function(String errorMessage) invalidTaprootSignature, + required TResult Function() invalidControlBlock, + required TResult Function() invalidLeafVersion, + required TResult Function() taproot, + required TResult Function(String errorMessage) tapTree, + required TResult Function() xPubKey, + required TResult Function(String errorMessage) version, + required TResult Function() partialDataConsumption, + required TResult Function(String errorMessage) io, + required TResult Function() otherPsbtErr, + }) { + return invalidEcdsaSignature(errorMessage); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidMagic, + TResult? Function()? missingUtxo, + TResult? Function()? invalidSeparator, + TResult? Function()? psbtUtxoOutOfBounds, + TResult? Function(String key)? invalidKey, + TResult? Function()? invalidProprietaryKey, + TResult? Function(String key)? duplicateKey, + TResult? Function()? unsignedTxHasScriptSigs, + TResult? Function()? unsignedTxHasScriptWitnesses, + TResult? Function()? mustHaveUnsignedTx, + TResult? Function()? noMorePairs, + TResult? Function()? unexpectedUnsignedTx, + TResult? Function(int sighash)? nonStandardSighashType, + TResult? Function(String hash)? invalidHash, + TResult? Function()? invalidPreimageHashPair, + TResult? Function(String xpub)? combineInconsistentKeySources, + TResult? Function(String encodingError)? consensusEncoding, + TResult? Function()? negativeFee, + TResult? Function()? feeOverflow, + TResult? Function(String errorMessage)? invalidPublicKey, + TResult? Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult? Function()? invalidXOnlyPublicKey, + TResult? Function(String errorMessage)? invalidEcdsaSignature, + TResult? Function(String errorMessage)? invalidTaprootSignature, + TResult? Function()? invalidControlBlock, + TResult? Function()? invalidLeafVersion, + TResult? Function()? taproot, + TResult? Function(String errorMessage)? tapTree, + TResult? Function()? xPubKey, + TResult? Function(String errorMessage)? version, + TResult? Function()? partialDataConsumption, + TResult? Function(String errorMessage)? io, + TResult? Function()? otherPsbtErr, + }) { + return invalidEcdsaSignature?.call(errorMessage); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidMagic, + TResult Function()? missingUtxo, + TResult Function()? invalidSeparator, + TResult Function()? psbtUtxoOutOfBounds, + TResult Function(String key)? invalidKey, + TResult Function()? invalidProprietaryKey, + TResult Function(String key)? duplicateKey, + TResult Function()? unsignedTxHasScriptSigs, + TResult Function()? unsignedTxHasScriptWitnesses, + TResult Function()? mustHaveUnsignedTx, + TResult Function()? noMorePairs, + TResult Function()? unexpectedUnsignedTx, + TResult Function(int sighash)? nonStandardSighashType, + TResult Function(String hash)? invalidHash, + TResult Function()? invalidPreimageHashPair, + TResult Function(String xpub)? combineInconsistentKeySources, + TResult Function(String encodingError)? consensusEncoding, + TResult Function()? negativeFee, + TResult Function()? feeOverflow, + TResult Function(String errorMessage)? invalidPublicKey, + TResult Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult Function()? invalidXOnlyPublicKey, + TResult Function(String errorMessage)? invalidEcdsaSignature, + TResult Function(String errorMessage)? invalidTaprootSignature, + TResult Function()? invalidControlBlock, + TResult Function()? invalidLeafVersion, + TResult Function()? taproot, + TResult Function(String errorMessage)? tapTree, + TResult Function()? xPubKey, + TResult Function(String errorMessage)? version, + TResult Function()? partialDataConsumption, + TResult Function(String errorMessage)? io, + TResult Function()? otherPsbtErr, + required TResult orElse(), + }) { + if (invalidEcdsaSignature != null) { + return invalidEcdsaSignature(errorMessage); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(PsbtError_InvalidMagic value) invalidMagic, + required TResult Function(PsbtError_MissingUtxo value) missingUtxo, + required TResult Function(PsbtError_InvalidSeparator value) + invalidSeparator, + required TResult Function(PsbtError_PsbtUtxoOutOfBounds value) + psbtUtxoOutOfBounds, + required TResult Function(PsbtError_InvalidKey value) invalidKey, + required TResult Function(PsbtError_InvalidProprietaryKey value) + invalidProprietaryKey, + required TResult Function(PsbtError_DuplicateKey value) duplicateKey, + required TResult Function(PsbtError_UnsignedTxHasScriptSigs value) + unsignedTxHasScriptSigs, + required TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value) + unsignedTxHasScriptWitnesses, + required TResult Function(PsbtError_MustHaveUnsignedTx value) + mustHaveUnsignedTx, + required TResult Function(PsbtError_NoMorePairs value) noMorePairs, + required TResult Function(PsbtError_UnexpectedUnsignedTx value) + unexpectedUnsignedTx, + required TResult Function(PsbtError_NonStandardSighashType value) + nonStandardSighashType, + required TResult Function(PsbtError_InvalidHash value) invalidHash, + required TResult Function(PsbtError_InvalidPreimageHashPair value) + invalidPreimageHashPair, + required TResult Function(PsbtError_CombineInconsistentKeySources value) + combineInconsistentKeySources, + required TResult Function(PsbtError_ConsensusEncoding value) + consensusEncoding, + required TResult Function(PsbtError_NegativeFee value) negativeFee, + required TResult Function(PsbtError_FeeOverflow value) feeOverflow, + required TResult Function(PsbtError_InvalidPublicKey value) + invalidPublicKey, + required TResult Function(PsbtError_InvalidSecp256k1PublicKey value) + invalidSecp256K1PublicKey, + required TResult Function(PsbtError_InvalidXOnlyPublicKey value) + invalidXOnlyPublicKey, + required TResult Function(PsbtError_InvalidEcdsaSignature value) + invalidEcdsaSignature, + required TResult Function(PsbtError_InvalidTaprootSignature value) + invalidTaprootSignature, + required TResult Function(PsbtError_InvalidControlBlock value) + invalidControlBlock, + required TResult Function(PsbtError_InvalidLeafVersion value) + invalidLeafVersion, + required TResult Function(PsbtError_Taproot value) taproot, + required TResult Function(PsbtError_TapTree value) tapTree, + required TResult Function(PsbtError_XPubKey value) xPubKey, + required TResult Function(PsbtError_Version value) version, + required TResult Function(PsbtError_PartialDataConsumption value) + partialDataConsumption, + required TResult Function(PsbtError_Io value) io, + required TResult Function(PsbtError_OtherPsbtErr value) otherPsbtErr, + }) { + return invalidEcdsaSignature(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult? Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult? Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult? Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult? Function(PsbtError_InvalidKey value)? invalidKey, + TResult? Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult? Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult? Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult? Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult? Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult? Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult? Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult? Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult? Function(PsbtError_InvalidHash value)? invalidHash, + TResult? Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult? Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult? Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult? Function(PsbtError_NegativeFee value)? negativeFee, + TResult? Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult? Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult? Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult? Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult? Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult? Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult? Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult? Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult? Function(PsbtError_Taproot value)? taproot, + TResult? Function(PsbtError_TapTree value)? tapTree, + TResult? Function(PsbtError_XPubKey value)? xPubKey, + TResult? Function(PsbtError_Version value)? version, + TResult? Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult? Function(PsbtError_Io value)? io, + TResult? Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + }) { + return invalidEcdsaSignature?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult Function(PsbtError_InvalidKey value)? invalidKey, + TResult Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult Function(PsbtError_InvalidHash value)? invalidHash, + TResult Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult Function(PsbtError_NegativeFee value)? negativeFee, + TResult Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult Function(PsbtError_Taproot value)? taproot, + TResult Function(PsbtError_TapTree value)? tapTree, + TResult Function(PsbtError_XPubKey value)? xPubKey, + TResult Function(PsbtError_Version value)? version, + TResult Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult Function(PsbtError_Io value)? io, + TResult Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + required TResult orElse(), + }) { + if (invalidEcdsaSignature != null) { + return invalidEcdsaSignature(this); + } + return orElse(); + } +} + +abstract class PsbtError_InvalidEcdsaSignature extends PsbtError { + const factory PsbtError_InvalidEcdsaSignature( + {required final String errorMessage}) = + _$PsbtError_InvalidEcdsaSignatureImpl; + const PsbtError_InvalidEcdsaSignature._() : super._(); + + String get errorMessage; + @JsonKey(ignore: true) + _$$PsbtError_InvalidEcdsaSignatureImplCopyWith< + _$PsbtError_InvalidEcdsaSignatureImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$PsbtError_InvalidTaprootSignatureImplCopyWith<$Res> { + factory _$$PsbtError_InvalidTaprootSignatureImplCopyWith( + _$PsbtError_InvalidTaprootSignatureImpl value, + $Res Function(_$PsbtError_InvalidTaprootSignatureImpl) then) = + __$$PsbtError_InvalidTaprootSignatureImplCopyWithImpl<$Res>; + @useResult + $Res call({String errorMessage}); +} + +/// @nodoc +class __$$PsbtError_InvalidTaprootSignatureImplCopyWithImpl<$Res> + extends _$PsbtErrorCopyWithImpl<$Res, + _$PsbtError_InvalidTaprootSignatureImpl> + implements _$$PsbtError_InvalidTaprootSignatureImplCopyWith<$Res> { + __$$PsbtError_InvalidTaprootSignatureImplCopyWithImpl( + _$PsbtError_InvalidTaprootSignatureImpl _value, + $Res Function(_$PsbtError_InvalidTaprootSignatureImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? errorMessage = null, + }) { + return _then(_$PsbtError_InvalidTaprootSignatureImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$PsbtError_InvalidTaprootSignatureImpl + extends PsbtError_InvalidTaprootSignature { + const _$PsbtError_InvalidTaprootSignatureImpl({required this.errorMessage}) + : super._(); + + @override + final String errorMessage; + + @override + String toString() { + return 'PsbtError.invalidTaprootSignature(errorMessage: $errorMessage)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PsbtError_InvalidTaprootSignatureImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); + } + + @override + int get hashCode => Object.hash(runtimeType, errorMessage); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$PsbtError_InvalidTaprootSignatureImplCopyWith< + _$PsbtError_InvalidTaprootSignatureImpl> + get copyWith => __$$PsbtError_InvalidTaprootSignatureImplCopyWithImpl< + _$PsbtError_InvalidTaprootSignatureImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidMagic, + required TResult Function() missingUtxo, + required TResult Function() invalidSeparator, + required TResult Function() psbtUtxoOutOfBounds, + required TResult Function(String key) invalidKey, + required TResult Function() invalidProprietaryKey, + required TResult Function(String key) duplicateKey, + required TResult Function() unsignedTxHasScriptSigs, + required TResult Function() unsignedTxHasScriptWitnesses, + required TResult Function() mustHaveUnsignedTx, + required TResult Function() noMorePairs, + required TResult Function() unexpectedUnsignedTx, + required TResult Function(int sighash) nonStandardSighashType, + required TResult Function(String hash) invalidHash, + required TResult Function() invalidPreimageHashPair, + required TResult Function(String xpub) combineInconsistentKeySources, + required TResult Function(String encodingError) consensusEncoding, + required TResult Function() negativeFee, + required TResult Function() feeOverflow, + required TResult Function(String errorMessage) invalidPublicKey, + required TResult Function(String secp256K1Error) invalidSecp256K1PublicKey, + required TResult Function() invalidXOnlyPublicKey, + required TResult Function(String errorMessage) invalidEcdsaSignature, + required TResult Function(String errorMessage) invalidTaprootSignature, + required TResult Function() invalidControlBlock, + required TResult Function() invalidLeafVersion, + required TResult Function() taproot, + required TResult Function(String errorMessage) tapTree, + required TResult Function() xPubKey, + required TResult Function(String errorMessage) version, + required TResult Function() partialDataConsumption, + required TResult Function(String errorMessage) io, + required TResult Function() otherPsbtErr, + }) { + return invalidTaprootSignature(errorMessage); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidMagic, + TResult? Function()? missingUtxo, + TResult? Function()? invalidSeparator, + TResult? Function()? psbtUtxoOutOfBounds, + TResult? Function(String key)? invalidKey, + TResult? Function()? invalidProprietaryKey, + TResult? Function(String key)? duplicateKey, + TResult? Function()? unsignedTxHasScriptSigs, + TResult? Function()? unsignedTxHasScriptWitnesses, + TResult? Function()? mustHaveUnsignedTx, + TResult? Function()? noMorePairs, + TResult? Function()? unexpectedUnsignedTx, + TResult? Function(int sighash)? nonStandardSighashType, + TResult? Function(String hash)? invalidHash, + TResult? Function()? invalidPreimageHashPair, + TResult? Function(String xpub)? combineInconsistentKeySources, + TResult? Function(String encodingError)? consensusEncoding, + TResult? Function()? negativeFee, + TResult? Function()? feeOverflow, + TResult? Function(String errorMessage)? invalidPublicKey, + TResult? Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult? Function()? invalidXOnlyPublicKey, + TResult? Function(String errorMessage)? invalidEcdsaSignature, + TResult? Function(String errorMessage)? invalidTaprootSignature, + TResult? Function()? invalidControlBlock, + TResult? Function()? invalidLeafVersion, + TResult? Function()? taproot, + TResult? Function(String errorMessage)? tapTree, + TResult? Function()? xPubKey, + TResult? Function(String errorMessage)? version, + TResult? Function()? partialDataConsumption, + TResult? Function(String errorMessage)? io, + TResult? Function()? otherPsbtErr, + }) { + return invalidTaprootSignature?.call(errorMessage); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidMagic, + TResult Function()? missingUtxo, + TResult Function()? invalidSeparator, + TResult Function()? psbtUtxoOutOfBounds, + TResult Function(String key)? invalidKey, + TResult Function()? invalidProprietaryKey, + TResult Function(String key)? duplicateKey, + TResult Function()? unsignedTxHasScriptSigs, + TResult Function()? unsignedTxHasScriptWitnesses, + TResult Function()? mustHaveUnsignedTx, + TResult Function()? noMorePairs, + TResult Function()? unexpectedUnsignedTx, + TResult Function(int sighash)? nonStandardSighashType, + TResult Function(String hash)? invalidHash, + TResult Function()? invalidPreimageHashPair, + TResult Function(String xpub)? combineInconsistentKeySources, + TResult Function(String encodingError)? consensusEncoding, + TResult Function()? negativeFee, + TResult Function()? feeOverflow, + TResult Function(String errorMessage)? invalidPublicKey, + TResult Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult Function()? invalidXOnlyPublicKey, + TResult Function(String errorMessage)? invalidEcdsaSignature, + TResult Function(String errorMessage)? invalidTaprootSignature, + TResult Function()? invalidControlBlock, + TResult Function()? invalidLeafVersion, + TResult Function()? taproot, + TResult Function(String errorMessage)? tapTree, + TResult Function()? xPubKey, + TResult Function(String errorMessage)? version, + TResult Function()? partialDataConsumption, + TResult Function(String errorMessage)? io, + TResult Function()? otherPsbtErr, + required TResult orElse(), + }) { + if (invalidTaprootSignature != null) { + return invalidTaprootSignature(errorMessage); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(PsbtError_InvalidMagic value) invalidMagic, + required TResult Function(PsbtError_MissingUtxo value) missingUtxo, + required TResult Function(PsbtError_InvalidSeparator value) + invalidSeparator, + required TResult Function(PsbtError_PsbtUtxoOutOfBounds value) + psbtUtxoOutOfBounds, + required TResult Function(PsbtError_InvalidKey value) invalidKey, + required TResult Function(PsbtError_InvalidProprietaryKey value) + invalidProprietaryKey, + required TResult Function(PsbtError_DuplicateKey value) duplicateKey, + required TResult Function(PsbtError_UnsignedTxHasScriptSigs value) + unsignedTxHasScriptSigs, + required TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value) + unsignedTxHasScriptWitnesses, + required TResult Function(PsbtError_MustHaveUnsignedTx value) + mustHaveUnsignedTx, + required TResult Function(PsbtError_NoMorePairs value) noMorePairs, + required TResult Function(PsbtError_UnexpectedUnsignedTx value) + unexpectedUnsignedTx, + required TResult Function(PsbtError_NonStandardSighashType value) + nonStandardSighashType, + required TResult Function(PsbtError_InvalidHash value) invalidHash, + required TResult Function(PsbtError_InvalidPreimageHashPair value) + invalidPreimageHashPair, + required TResult Function(PsbtError_CombineInconsistentKeySources value) + combineInconsistentKeySources, + required TResult Function(PsbtError_ConsensusEncoding value) + consensusEncoding, + required TResult Function(PsbtError_NegativeFee value) negativeFee, + required TResult Function(PsbtError_FeeOverflow value) feeOverflow, + required TResult Function(PsbtError_InvalidPublicKey value) + invalidPublicKey, + required TResult Function(PsbtError_InvalidSecp256k1PublicKey value) + invalidSecp256K1PublicKey, + required TResult Function(PsbtError_InvalidXOnlyPublicKey value) + invalidXOnlyPublicKey, + required TResult Function(PsbtError_InvalidEcdsaSignature value) + invalidEcdsaSignature, + required TResult Function(PsbtError_InvalidTaprootSignature value) + invalidTaprootSignature, + required TResult Function(PsbtError_InvalidControlBlock value) + invalidControlBlock, + required TResult Function(PsbtError_InvalidLeafVersion value) + invalidLeafVersion, + required TResult Function(PsbtError_Taproot value) taproot, + required TResult Function(PsbtError_TapTree value) tapTree, + required TResult Function(PsbtError_XPubKey value) xPubKey, + required TResult Function(PsbtError_Version value) version, + required TResult Function(PsbtError_PartialDataConsumption value) + partialDataConsumption, + required TResult Function(PsbtError_Io value) io, + required TResult Function(PsbtError_OtherPsbtErr value) otherPsbtErr, + }) { + return invalidTaprootSignature(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult? Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult? Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult? Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult? Function(PsbtError_InvalidKey value)? invalidKey, + TResult? Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult? Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult? Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult? Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult? Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult? Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult? Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult? Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult? Function(PsbtError_InvalidHash value)? invalidHash, + TResult? Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult? Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult? Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult? Function(PsbtError_NegativeFee value)? negativeFee, + TResult? Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult? Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult? Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult? Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult? Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult? Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult? Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult? Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult? Function(PsbtError_Taproot value)? taproot, + TResult? Function(PsbtError_TapTree value)? tapTree, + TResult? Function(PsbtError_XPubKey value)? xPubKey, + TResult? Function(PsbtError_Version value)? version, + TResult? Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult? Function(PsbtError_Io value)? io, + TResult? Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + }) { + return invalidTaprootSignature?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult Function(PsbtError_InvalidKey value)? invalidKey, + TResult Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult Function(PsbtError_InvalidHash value)? invalidHash, + TResult Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult Function(PsbtError_NegativeFee value)? negativeFee, + TResult Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult Function(PsbtError_Taproot value)? taproot, + TResult Function(PsbtError_TapTree value)? tapTree, + TResult Function(PsbtError_XPubKey value)? xPubKey, + TResult Function(PsbtError_Version value)? version, + TResult Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult Function(PsbtError_Io value)? io, + TResult Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + required TResult orElse(), + }) { + if (invalidTaprootSignature != null) { + return invalidTaprootSignature(this); + } + return orElse(); + } +} + +abstract class PsbtError_InvalidTaprootSignature extends PsbtError { + const factory PsbtError_InvalidTaprootSignature( + {required final String errorMessage}) = + _$PsbtError_InvalidTaprootSignatureImpl; + const PsbtError_InvalidTaprootSignature._() : super._(); + + String get errorMessage; + @JsonKey(ignore: true) + _$$PsbtError_InvalidTaprootSignatureImplCopyWith< + _$PsbtError_InvalidTaprootSignatureImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$PsbtError_InvalidControlBlockImplCopyWith<$Res> { + factory _$$PsbtError_InvalidControlBlockImplCopyWith( + _$PsbtError_InvalidControlBlockImpl value, + $Res Function(_$PsbtError_InvalidControlBlockImpl) then) = + __$$PsbtError_InvalidControlBlockImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$PsbtError_InvalidControlBlockImplCopyWithImpl<$Res> + extends _$PsbtErrorCopyWithImpl<$Res, _$PsbtError_InvalidControlBlockImpl> + implements _$$PsbtError_InvalidControlBlockImplCopyWith<$Res> { + __$$PsbtError_InvalidControlBlockImplCopyWithImpl( + _$PsbtError_InvalidControlBlockImpl _value, + $Res Function(_$PsbtError_InvalidControlBlockImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$PsbtError_InvalidControlBlockImpl + extends PsbtError_InvalidControlBlock { + const _$PsbtError_InvalidControlBlockImpl() : super._(); + + @override + String toString() { + return 'PsbtError.invalidControlBlock()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PsbtError_InvalidControlBlockImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidMagic, + required TResult Function() missingUtxo, + required TResult Function() invalidSeparator, + required TResult Function() psbtUtxoOutOfBounds, + required TResult Function(String key) invalidKey, + required TResult Function() invalidProprietaryKey, + required TResult Function(String key) duplicateKey, + required TResult Function() unsignedTxHasScriptSigs, + required TResult Function() unsignedTxHasScriptWitnesses, + required TResult Function() mustHaveUnsignedTx, + required TResult Function() noMorePairs, + required TResult Function() unexpectedUnsignedTx, + required TResult Function(int sighash) nonStandardSighashType, + required TResult Function(String hash) invalidHash, + required TResult Function() invalidPreimageHashPair, + required TResult Function(String xpub) combineInconsistentKeySources, + required TResult Function(String encodingError) consensusEncoding, + required TResult Function() negativeFee, + required TResult Function() feeOverflow, + required TResult Function(String errorMessage) invalidPublicKey, + required TResult Function(String secp256K1Error) invalidSecp256K1PublicKey, + required TResult Function() invalidXOnlyPublicKey, + required TResult Function(String errorMessage) invalidEcdsaSignature, + required TResult Function(String errorMessage) invalidTaprootSignature, + required TResult Function() invalidControlBlock, + required TResult Function() invalidLeafVersion, + required TResult Function() taproot, + required TResult Function(String errorMessage) tapTree, + required TResult Function() xPubKey, + required TResult Function(String errorMessage) version, + required TResult Function() partialDataConsumption, + required TResult Function(String errorMessage) io, + required TResult Function() otherPsbtErr, + }) { + return invalidControlBlock(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidMagic, + TResult? Function()? missingUtxo, + TResult? Function()? invalidSeparator, + TResult? Function()? psbtUtxoOutOfBounds, + TResult? Function(String key)? invalidKey, + TResult? Function()? invalidProprietaryKey, + TResult? Function(String key)? duplicateKey, + TResult? Function()? unsignedTxHasScriptSigs, + TResult? Function()? unsignedTxHasScriptWitnesses, + TResult? Function()? mustHaveUnsignedTx, + TResult? Function()? noMorePairs, + TResult? Function()? unexpectedUnsignedTx, + TResult? Function(int sighash)? nonStandardSighashType, + TResult? Function(String hash)? invalidHash, + TResult? Function()? invalidPreimageHashPair, + TResult? Function(String xpub)? combineInconsistentKeySources, + TResult? Function(String encodingError)? consensusEncoding, + TResult? Function()? negativeFee, + TResult? Function()? feeOverflow, + TResult? Function(String errorMessage)? invalidPublicKey, + TResult? Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult? Function()? invalidXOnlyPublicKey, + TResult? Function(String errorMessage)? invalidEcdsaSignature, + TResult? Function(String errorMessage)? invalidTaprootSignature, + TResult? Function()? invalidControlBlock, + TResult? Function()? invalidLeafVersion, + TResult? Function()? taproot, + TResult? Function(String errorMessage)? tapTree, + TResult? Function()? xPubKey, + TResult? Function(String errorMessage)? version, + TResult? Function()? partialDataConsumption, + TResult? Function(String errorMessage)? io, + TResult? Function()? otherPsbtErr, + }) { + return invalidControlBlock?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidMagic, + TResult Function()? missingUtxo, + TResult Function()? invalidSeparator, + TResult Function()? psbtUtxoOutOfBounds, + TResult Function(String key)? invalidKey, + TResult Function()? invalidProprietaryKey, + TResult Function(String key)? duplicateKey, + TResult Function()? unsignedTxHasScriptSigs, + TResult Function()? unsignedTxHasScriptWitnesses, + TResult Function()? mustHaveUnsignedTx, + TResult Function()? noMorePairs, + TResult Function()? unexpectedUnsignedTx, + TResult Function(int sighash)? nonStandardSighashType, + TResult Function(String hash)? invalidHash, + TResult Function()? invalidPreimageHashPair, + TResult Function(String xpub)? combineInconsistentKeySources, + TResult Function(String encodingError)? consensusEncoding, + TResult Function()? negativeFee, + TResult Function()? feeOverflow, + TResult Function(String errorMessage)? invalidPublicKey, + TResult Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult Function()? invalidXOnlyPublicKey, + TResult Function(String errorMessage)? invalidEcdsaSignature, + TResult Function(String errorMessage)? invalidTaprootSignature, + TResult Function()? invalidControlBlock, + TResult Function()? invalidLeafVersion, + TResult Function()? taproot, + TResult Function(String errorMessage)? tapTree, + TResult Function()? xPubKey, + TResult Function(String errorMessage)? version, + TResult Function()? partialDataConsumption, + TResult Function(String errorMessage)? io, + TResult Function()? otherPsbtErr, + required TResult orElse(), + }) { + if (invalidControlBlock != null) { + return invalidControlBlock(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(PsbtError_InvalidMagic value) invalidMagic, + required TResult Function(PsbtError_MissingUtxo value) missingUtxo, + required TResult Function(PsbtError_InvalidSeparator value) + invalidSeparator, + required TResult Function(PsbtError_PsbtUtxoOutOfBounds value) + psbtUtxoOutOfBounds, + required TResult Function(PsbtError_InvalidKey value) invalidKey, + required TResult Function(PsbtError_InvalidProprietaryKey value) + invalidProprietaryKey, + required TResult Function(PsbtError_DuplicateKey value) duplicateKey, + required TResult Function(PsbtError_UnsignedTxHasScriptSigs value) + unsignedTxHasScriptSigs, + required TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value) + unsignedTxHasScriptWitnesses, + required TResult Function(PsbtError_MustHaveUnsignedTx value) + mustHaveUnsignedTx, + required TResult Function(PsbtError_NoMorePairs value) noMorePairs, + required TResult Function(PsbtError_UnexpectedUnsignedTx value) + unexpectedUnsignedTx, + required TResult Function(PsbtError_NonStandardSighashType value) + nonStandardSighashType, + required TResult Function(PsbtError_InvalidHash value) invalidHash, + required TResult Function(PsbtError_InvalidPreimageHashPair value) + invalidPreimageHashPair, + required TResult Function(PsbtError_CombineInconsistentKeySources value) + combineInconsistentKeySources, + required TResult Function(PsbtError_ConsensusEncoding value) + consensusEncoding, + required TResult Function(PsbtError_NegativeFee value) negativeFee, + required TResult Function(PsbtError_FeeOverflow value) feeOverflow, + required TResult Function(PsbtError_InvalidPublicKey value) + invalidPublicKey, + required TResult Function(PsbtError_InvalidSecp256k1PublicKey value) + invalidSecp256K1PublicKey, + required TResult Function(PsbtError_InvalidXOnlyPublicKey value) + invalidXOnlyPublicKey, + required TResult Function(PsbtError_InvalidEcdsaSignature value) + invalidEcdsaSignature, + required TResult Function(PsbtError_InvalidTaprootSignature value) + invalidTaprootSignature, + required TResult Function(PsbtError_InvalidControlBlock value) + invalidControlBlock, + required TResult Function(PsbtError_InvalidLeafVersion value) + invalidLeafVersion, + required TResult Function(PsbtError_Taproot value) taproot, + required TResult Function(PsbtError_TapTree value) tapTree, + required TResult Function(PsbtError_XPubKey value) xPubKey, + required TResult Function(PsbtError_Version value) version, + required TResult Function(PsbtError_PartialDataConsumption value) + partialDataConsumption, + required TResult Function(PsbtError_Io value) io, + required TResult Function(PsbtError_OtherPsbtErr value) otherPsbtErr, + }) { + return invalidControlBlock(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult? Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult? Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult? Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult? Function(PsbtError_InvalidKey value)? invalidKey, + TResult? Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult? Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult? Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult? Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult? Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult? Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult? Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult? Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult? Function(PsbtError_InvalidHash value)? invalidHash, + TResult? Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult? Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult? Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult? Function(PsbtError_NegativeFee value)? negativeFee, + TResult? Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult? Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult? Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult? Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult? Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult? Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult? Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult? Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult? Function(PsbtError_Taproot value)? taproot, + TResult? Function(PsbtError_TapTree value)? tapTree, + TResult? Function(PsbtError_XPubKey value)? xPubKey, + TResult? Function(PsbtError_Version value)? version, + TResult? Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult? Function(PsbtError_Io value)? io, + TResult? Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + }) { + return invalidControlBlock?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult Function(PsbtError_InvalidKey value)? invalidKey, + TResult Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult Function(PsbtError_InvalidHash value)? invalidHash, + TResult Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult Function(PsbtError_NegativeFee value)? negativeFee, + TResult Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult Function(PsbtError_Taproot value)? taproot, + TResult Function(PsbtError_TapTree value)? tapTree, + TResult Function(PsbtError_XPubKey value)? xPubKey, + TResult Function(PsbtError_Version value)? version, + TResult Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult Function(PsbtError_Io value)? io, + TResult Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + required TResult orElse(), + }) { + if (invalidControlBlock != null) { + return invalidControlBlock(this); + } + return orElse(); + } +} + +abstract class PsbtError_InvalidControlBlock extends PsbtError { + const factory PsbtError_InvalidControlBlock() = + _$PsbtError_InvalidControlBlockImpl; + const PsbtError_InvalidControlBlock._() : super._(); +} + +/// @nodoc +abstract class _$$PsbtError_InvalidLeafVersionImplCopyWith<$Res> { + factory _$$PsbtError_InvalidLeafVersionImplCopyWith( + _$PsbtError_InvalidLeafVersionImpl value, + $Res Function(_$PsbtError_InvalidLeafVersionImpl) then) = + __$$PsbtError_InvalidLeafVersionImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$PsbtError_InvalidLeafVersionImplCopyWithImpl<$Res> + extends _$PsbtErrorCopyWithImpl<$Res, _$PsbtError_InvalidLeafVersionImpl> + implements _$$PsbtError_InvalidLeafVersionImplCopyWith<$Res> { + __$$PsbtError_InvalidLeafVersionImplCopyWithImpl( + _$PsbtError_InvalidLeafVersionImpl _value, + $Res Function(_$PsbtError_InvalidLeafVersionImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$PsbtError_InvalidLeafVersionImpl extends PsbtError_InvalidLeafVersion { + const _$PsbtError_InvalidLeafVersionImpl() : super._(); + + @override + String toString() { + return 'PsbtError.invalidLeafVersion()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PsbtError_InvalidLeafVersionImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidMagic, + required TResult Function() missingUtxo, + required TResult Function() invalidSeparator, + required TResult Function() psbtUtxoOutOfBounds, + required TResult Function(String key) invalidKey, + required TResult Function() invalidProprietaryKey, + required TResult Function(String key) duplicateKey, + required TResult Function() unsignedTxHasScriptSigs, + required TResult Function() unsignedTxHasScriptWitnesses, + required TResult Function() mustHaveUnsignedTx, + required TResult Function() noMorePairs, + required TResult Function() unexpectedUnsignedTx, + required TResult Function(int sighash) nonStandardSighashType, + required TResult Function(String hash) invalidHash, + required TResult Function() invalidPreimageHashPair, + required TResult Function(String xpub) combineInconsistentKeySources, + required TResult Function(String encodingError) consensusEncoding, + required TResult Function() negativeFee, + required TResult Function() feeOverflow, + required TResult Function(String errorMessage) invalidPublicKey, + required TResult Function(String secp256K1Error) invalidSecp256K1PublicKey, + required TResult Function() invalidXOnlyPublicKey, + required TResult Function(String errorMessage) invalidEcdsaSignature, + required TResult Function(String errorMessage) invalidTaprootSignature, + required TResult Function() invalidControlBlock, + required TResult Function() invalidLeafVersion, + required TResult Function() taproot, + required TResult Function(String errorMessage) tapTree, + required TResult Function() xPubKey, + required TResult Function(String errorMessage) version, + required TResult Function() partialDataConsumption, + required TResult Function(String errorMessage) io, + required TResult Function() otherPsbtErr, + }) { + return invalidLeafVersion(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidMagic, + TResult? Function()? missingUtxo, + TResult? Function()? invalidSeparator, + TResult? Function()? psbtUtxoOutOfBounds, + TResult? Function(String key)? invalidKey, + TResult? Function()? invalidProprietaryKey, + TResult? Function(String key)? duplicateKey, + TResult? Function()? unsignedTxHasScriptSigs, + TResult? Function()? unsignedTxHasScriptWitnesses, + TResult? Function()? mustHaveUnsignedTx, + TResult? Function()? noMorePairs, + TResult? Function()? unexpectedUnsignedTx, + TResult? Function(int sighash)? nonStandardSighashType, + TResult? Function(String hash)? invalidHash, + TResult? Function()? invalidPreimageHashPair, + TResult? Function(String xpub)? combineInconsistentKeySources, + TResult? Function(String encodingError)? consensusEncoding, + TResult? Function()? negativeFee, + TResult? Function()? feeOverflow, + TResult? Function(String errorMessage)? invalidPublicKey, + TResult? Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult? Function()? invalidXOnlyPublicKey, + TResult? Function(String errorMessage)? invalidEcdsaSignature, + TResult? Function(String errorMessage)? invalidTaprootSignature, + TResult? Function()? invalidControlBlock, + TResult? Function()? invalidLeafVersion, + TResult? Function()? taproot, + TResult? Function(String errorMessage)? tapTree, + TResult? Function()? xPubKey, + TResult? Function(String errorMessage)? version, + TResult? Function()? partialDataConsumption, + TResult? Function(String errorMessage)? io, + TResult? Function()? otherPsbtErr, + }) { + return invalidLeafVersion?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidMagic, + TResult Function()? missingUtxo, + TResult Function()? invalidSeparator, + TResult Function()? psbtUtxoOutOfBounds, + TResult Function(String key)? invalidKey, + TResult Function()? invalidProprietaryKey, + TResult Function(String key)? duplicateKey, + TResult Function()? unsignedTxHasScriptSigs, + TResult Function()? unsignedTxHasScriptWitnesses, + TResult Function()? mustHaveUnsignedTx, + TResult Function()? noMorePairs, + TResult Function()? unexpectedUnsignedTx, + TResult Function(int sighash)? nonStandardSighashType, + TResult Function(String hash)? invalidHash, + TResult Function()? invalidPreimageHashPair, + TResult Function(String xpub)? combineInconsistentKeySources, + TResult Function(String encodingError)? consensusEncoding, + TResult Function()? negativeFee, + TResult Function()? feeOverflow, + TResult Function(String errorMessage)? invalidPublicKey, + TResult Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult Function()? invalidXOnlyPublicKey, + TResult Function(String errorMessage)? invalidEcdsaSignature, + TResult Function(String errorMessage)? invalidTaprootSignature, + TResult Function()? invalidControlBlock, + TResult Function()? invalidLeafVersion, + TResult Function()? taproot, + TResult Function(String errorMessage)? tapTree, + TResult Function()? xPubKey, + TResult Function(String errorMessage)? version, + TResult Function()? partialDataConsumption, + TResult Function(String errorMessage)? io, + TResult Function()? otherPsbtErr, + required TResult orElse(), + }) { + if (invalidLeafVersion != null) { + return invalidLeafVersion(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(PsbtError_InvalidMagic value) invalidMagic, + required TResult Function(PsbtError_MissingUtxo value) missingUtxo, + required TResult Function(PsbtError_InvalidSeparator value) + invalidSeparator, + required TResult Function(PsbtError_PsbtUtxoOutOfBounds value) + psbtUtxoOutOfBounds, + required TResult Function(PsbtError_InvalidKey value) invalidKey, + required TResult Function(PsbtError_InvalidProprietaryKey value) + invalidProprietaryKey, + required TResult Function(PsbtError_DuplicateKey value) duplicateKey, + required TResult Function(PsbtError_UnsignedTxHasScriptSigs value) + unsignedTxHasScriptSigs, + required TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value) + unsignedTxHasScriptWitnesses, + required TResult Function(PsbtError_MustHaveUnsignedTx value) + mustHaveUnsignedTx, + required TResult Function(PsbtError_NoMorePairs value) noMorePairs, + required TResult Function(PsbtError_UnexpectedUnsignedTx value) + unexpectedUnsignedTx, + required TResult Function(PsbtError_NonStandardSighashType value) + nonStandardSighashType, + required TResult Function(PsbtError_InvalidHash value) invalidHash, + required TResult Function(PsbtError_InvalidPreimageHashPair value) + invalidPreimageHashPair, + required TResult Function(PsbtError_CombineInconsistentKeySources value) + combineInconsistentKeySources, + required TResult Function(PsbtError_ConsensusEncoding value) + consensusEncoding, + required TResult Function(PsbtError_NegativeFee value) negativeFee, + required TResult Function(PsbtError_FeeOverflow value) feeOverflow, + required TResult Function(PsbtError_InvalidPublicKey value) + invalidPublicKey, + required TResult Function(PsbtError_InvalidSecp256k1PublicKey value) + invalidSecp256K1PublicKey, + required TResult Function(PsbtError_InvalidXOnlyPublicKey value) + invalidXOnlyPublicKey, + required TResult Function(PsbtError_InvalidEcdsaSignature value) + invalidEcdsaSignature, + required TResult Function(PsbtError_InvalidTaprootSignature value) + invalidTaprootSignature, + required TResult Function(PsbtError_InvalidControlBlock value) + invalidControlBlock, + required TResult Function(PsbtError_InvalidLeafVersion value) + invalidLeafVersion, + required TResult Function(PsbtError_Taproot value) taproot, + required TResult Function(PsbtError_TapTree value) tapTree, + required TResult Function(PsbtError_XPubKey value) xPubKey, + required TResult Function(PsbtError_Version value) version, + required TResult Function(PsbtError_PartialDataConsumption value) + partialDataConsumption, + required TResult Function(PsbtError_Io value) io, + required TResult Function(PsbtError_OtherPsbtErr value) otherPsbtErr, + }) { + return invalidLeafVersion(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult? Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult? Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult? Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult? Function(PsbtError_InvalidKey value)? invalidKey, + TResult? Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult? Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult? Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult? Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult? Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult? Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult? Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult? Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult? Function(PsbtError_InvalidHash value)? invalidHash, + TResult? Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult? Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult? Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult? Function(PsbtError_NegativeFee value)? negativeFee, + TResult? Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult? Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult? Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult? Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult? Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult? Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult? Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult? Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult? Function(PsbtError_Taproot value)? taproot, + TResult? Function(PsbtError_TapTree value)? tapTree, + TResult? Function(PsbtError_XPubKey value)? xPubKey, + TResult? Function(PsbtError_Version value)? version, + TResult? Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult? Function(PsbtError_Io value)? io, + TResult? Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + }) { + return invalidLeafVersion?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult Function(PsbtError_InvalidKey value)? invalidKey, + TResult Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult Function(PsbtError_InvalidHash value)? invalidHash, + TResult Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult Function(PsbtError_NegativeFee value)? negativeFee, + TResult Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult Function(PsbtError_Taproot value)? taproot, + TResult Function(PsbtError_TapTree value)? tapTree, + TResult Function(PsbtError_XPubKey value)? xPubKey, + TResult Function(PsbtError_Version value)? version, + TResult Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult Function(PsbtError_Io value)? io, + TResult Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + required TResult orElse(), + }) { + if (invalidLeafVersion != null) { + return invalidLeafVersion(this); + } + return orElse(); + } +} + +abstract class PsbtError_InvalidLeafVersion extends PsbtError { + const factory PsbtError_InvalidLeafVersion() = + _$PsbtError_InvalidLeafVersionImpl; + const PsbtError_InvalidLeafVersion._() : super._(); +} + +/// @nodoc +abstract class _$$PsbtError_TaprootImplCopyWith<$Res> { + factory _$$PsbtError_TaprootImplCopyWith(_$PsbtError_TaprootImpl value, + $Res Function(_$PsbtError_TaprootImpl) then) = + __$$PsbtError_TaprootImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$PsbtError_TaprootImplCopyWithImpl<$Res> + extends _$PsbtErrorCopyWithImpl<$Res, _$PsbtError_TaprootImpl> + implements _$$PsbtError_TaprootImplCopyWith<$Res> { + __$$PsbtError_TaprootImplCopyWithImpl(_$PsbtError_TaprootImpl _value, + $Res Function(_$PsbtError_TaprootImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$PsbtError_TaprootImpl extends PsbtError_Taproot { + const _$PsbtError_TaprootImpl() : super._(); + + @override + String toString() { + return 'PsbtError.taproot()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && other is _$PsbtError_TaprootImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidMagic, + required TResult Function() missingUtxo, + required TResult Function() invalidSeparator, + required TResult Function() psbtUtxoOutOfBounds, + required TResult Function(String key) invalidKey, + required TResult Function() invalidProprietaryKey, + required TResult Function(String key) duplicateKey, + required TResult Function() unsignedTxHasScriptSigs, + required TResult Function() unsignedTxHasScriptWitnesses, + required TResult Function() mustHaveUnsignedTx, + required TResult Function() noMorePairs, + required TResult Function() unexpectedUnsignedTx, + required TResult Function(int sighash) nonStandardSighashType, + required TResult Function(String hash) invalidHash, + required TResult Function() invalidPreimageHashPair, + required TResult Function(String xpub) combineInconsistentKeySources, + required TResult Function(String encodingError) consensusEncoding, + required TResult Function() negativeFee, + required TResult Function() feeOverflow, + required TResult Function(String errorMessage) invalidPublicKey, + required TResult Function(String secp256K1Error) invalidSecp256K1PublicKey, + required TResult Function() invalidXOnlyPublicKey, + required TResult Function(String errorMessage) invalidEcdsaSignature, + required TResult Function(String errorMessage) invalidTaprootSignature, + required TResult Function() invalidControlBlock, + required TResult Function() invalidLeafVersion, + required TResult Function() taproot, + required TResult Function(String errorMessage) tapTree, + required TResult Function() xPubKey, + required TResult Function(String errorMessage) version, + required TResult Function() partialDataConsumption, + required TResult Function(String errorMessage) io, + required TResult Function() otherPsbtErr, + }) { + return taproot(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidMagic, + TResult? Function()? missingUtxo, + TResult? Function()? invalidSeparator, + TResult? Function()? psbtUtxoOutOfBounds, + TResult? Function(String key)? invalidKey, + TResult? Function()? invalidProprietaryKey, + TResult? Function(String key)? duplicateKey, + TResult? Function()? unsignedTxHasScriptSigs, + TResult? Function()? unsignedTxHasScriptWitnesses, + TResult? Function()? mustHaveUnsignedTx, + TResult? Function()? noMorePairs, + TResult? Function()? unexpectedUnsignedTx, + TResult? Function(int sighash)? nonStandardSighashType, + TResult? Function(String hash)? invalidHash, + TResult? Function()? invalidPreimageHashPair, + TResult? Function(String xpub)? combineInconsistentKeySources, + TResult? Function(String encodingError)? consensusEncoding, + TResult? Function()? negativeFee, + TResult? Function()? feeOverflow, + TResult? Function(String errorMessage)? invalidPublicKey, + TResult? Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult? Function()? invalidXOnlyPublicKey, + TResult? Function(String errorMessage)? invalidEcdsaSignature, + TResult? Function(String errorMessage)? invalidTaprootSignature, + TResult? Function()? invalidControlBlock, + TResult? Function()? invalidLeafVersion, + TResult? Function()? taproot, + TResult? Function(String errorMessage)? tapTree, + TResult? Function()? xPubKey, + TResult? Function(String errorMessage)? version, + TResult? Function()? partialDataConsumption, + TResult? Function(String errorMessage)? io, + TResult? Function()? otherPsbtErr, + }) { + return taproot?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidMagic, + TResult Function()? missingUtxo, + TResult Function()? invalidSeparator, + TResult Function()? psbtUtxoOutOfBounds, + TResult Function(String key)? invalidKey, + TResult Function()? invalidProprietaryKey, + TResult Function(String key)? duplicateKey, + TResult Function()? unsignedTxHasScriptSigs, + TResult Function()? unsignedTxHasScriptWitnesses, + TResult Function()? mustHaveUnsignedTx, + TResult Function()? noMorePairs, + TResult Function()? unexpectedUnsignedTx, + TResult Function(int sighash)? nonStandardSighashType, + TResult Function(String hash)? invalidHash, + TResult Function()? invalidPreimageHashPair, + TResult Function(String xpub)? combineInconsistentKeySources, + TResult Function(String encodingError)? consensusEncoding, + TResult Function()? negativeFee, + TResult Function()? feeOverflow, + TResult Function(String errorMessage)? invalidPublicKey, + TResult Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult Function()? invalidXOnlyPublicKey, + TResult Function(String errorMessage)? invalidEcdsaSignature, + TResult Function(String errorMessage)? invalidTaprootSignature, + TResult Function()? invalidControlBlock, + TResult Function()? invalidLeafVersion, + TResult Function()? taproot, + TResult Function(String errorMessage)? tapTree, + TResult Function()? xPubKey, + TResult Function(String errorMessage)? version, + TResult Function()? partialDataConsumption, + TResult Function(String errorMessage)? io, + TResult Function()? otherPsbtErr, + required TResult orElse(), + }) { + if (taproot != null) { + return taproot(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(PsbtError_InvalidMagic value) invalidMagic, + required TResult Function(PsbtError_MissingUtxo value) missingUtxo, + required TResult Function(PsbtError_InvalidSeparator value) + invalidSeparator, + required TResult Function(PsbtError_PsbtUtxoOutOfBounds value) + psbtUtxoOutOfBounds, + required TResult Function(PsbtError_InvalidKey value) invalidKey, + required TResult Function(PsbtError_InvalidProprietaryKey value) + invalidProprietaryKey, + required TResult Function(PsbtError_DuplicateKey value) duplicateKey, + required TResult Function(PsbtError_UnsignedTxHasScriptSigs value) + unsignedTxHasScriptSigs, + required TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value) + unsignedTxHasScriptWitnesses, + required TResult Function(PsbtError_MustHaveUnsignedTx value) + mustHaveUnsignedTx, + required TResult Function(PsbtError_NoMorePairs value) noMorePairs, + required TResult Function(PsbtError_UnexpectedUnsignedTx value) + unexpectedUnsignedTx, + required TResult Function(PsbtError_NonStandardSighashType value) + nonStandardSighashType, + required TResult Function(PsbtError_InvalidHash value) invalidHash, + required TResult Function(PsbtError_InvalidPreimageHashPair value) + invalidPreimageHashPair, + required TResult Function(PsbtError_CombineInconsistentKeySources value) + combineInconsistentKeySources, + required TResult Function(PsbtError_ConsensusEncoding value) + consensusEncoding, + required TResult Function(PsbtError_NegativeFee value) negativeFee, + required TResult Function(PsbtError_FeeOverflow value) feeOverflow, + required TResult Function(PsbtError_InvalidPublicKey value) + invalidPublicKey, + required TResult Function(PsbtError_InvalidSecp256k1PublicKey value) + invalidSecp256K1PublicKey, + required TResult Function(PsbtError_InvalidXOnlyPublicKey value) + invalidXOnlyPublicKey, + required TResult Function(PsbtError_InvalidEcdsaSignature value) + invalidEcdsaSignature, + required TResult Function(PsbtError_InvalidTaprootSignature value) + invalidTaprootSignature, + required TResult Function(PsbtError_InvalidControlBlock value) + invalidControlBlock, + required TResult Function(PsbtError_InvalidLeafVersion value) + invalidLeafVersion, + required TResult Function(PsbtError_Taproot value) taproot, + required TResult Function(PsbtError_TapTree value) tapTree, + required TResult Function(PsbtError_XPubKey value) xPubKey, + required TResult Function(PsbtError_Version value) version, + required TResult Function(PsbtError_PartialDataConsumption value) + partialDataConsumption, + required TResult Function(PsbtError_Io value) io, + required TResult Function(PsbtError_OtherPsbtErr value) otherPsbtErr, + }) { + return taproot(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult? Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult? Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult? Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult? Function(PsbtError_InvalidKey value)? invalidKey, + TResult? Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult? Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult? Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult? Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult? Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult? Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult? Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult? Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult? Function(PsbtError_InvalidHash value)? invalidHash, + TResult? Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult? Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult? Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult? Function(PsbtError_NegativeFee value)? negativeFee, + TResult? Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult? Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult? Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult? Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult? Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult? Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult? Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult? Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult? Function(PsbtError_Taproot value)? taproot, + TResult? Function(PsbtError_TapTree value)? tapTree, + TResult? Function(PsbtError_XPubKey value)? xPubKey, + TResult? Function(PsbtError_Version value)? version, + TResult? Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult? Function(PsbtError_Io value)? io, + TResult? Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + }) { + return taproot?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult Function(PsbtError_InvalidKey value)? invalidKey, + TResult Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult Function(PsbtError_InvalidHash value)? invalidHash, + TResult Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult Function(PsbtError_NegativeFee value)? negativeFee, + TResult Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult Function(PsbtError_Taproot value)? taproot, + TResult Function(PsbtError_TapTree value)? tapTree, + TResult Function(PsbtError_XPubKey value)? xPubKey, + TResult Function(PsbtError_Version value)? version, + TResult Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult Function(PsbtError_Io value)? io, + TResult Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + required TResult orElse(), + }) { + if (taproot != null) { + return taproot(this); + } + return orElse(); + } +} + +abstract class PsbtError_Taproot extends PsbtError { + const factory PsbtError_Taproot() = _$PsbtError_TaprootImpl; + const PsbtError_Taproot._() : super._(); +} + +/// @nodoc +abstract class _$$PsbtError_TapTreeImplCopyWith<$Res> { + factory _$$PsbtError_TapTreeImplCopyWith(_$PsbtError_TapTreeImpl value, + $Res Function(_$PsbtError_TapTreeImpl) then) = + __$$PsbtError_TapTreeImplCopyWithImpl<$Res>; + @useResult + $Res call({String errorMessage}); +} + +/// @nodoc +class __$$PsbtError_TapTreeImplCopyWithImpl<$Res> + extends _$PsbtErrorCopyWithImpl<$Res, _$PsbtError_TapTreeImpl> + implements _$$PsbtError_TapTreeImplCopyWith<$Res> { + __$$PsbtError_TapTreeImplCopyWithImpl(_$PsbtError_TapTreeImpl _value, + $Res Function(_$PsbtError_TapTreeImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? errorMessage = null, + }) { + return _then(_$PsbtError_TapTreeImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$PsbtError_TapTreeImpl extends PsbtError_TapTree { + const _$PsbtError_TapTreeImpl({required this.errorMessage}) : super._(); + + @override + final String errorMessage; + + @override + String toString() { + return 'PsbtError.tapTree(errorMessage: $errorMessage)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PsbtError_TapTreeImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); + } + + @override + int get hashCode => Object.hash(runtimeType, errorMessage); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$PsbtError_TapTreeImplCopyWith<_$PsbtError_TapTreeImpl> get copyWith => + __$$PsbtError_TapTreeImplCopyWithImpl<_$PsbtError_TapTreeImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidMagic, + required TResult Function() missingUtxo, + required TResult Function() invalidSeparator, + required TResult Function() psbtUtxoOutOfBounds, + required TResult Function(String key) invalidKey, + required TResult Function() invalidProprietaryKey, + required TResult Function(String key) duplicateKey, + required TResult Function() unsignedTxHasScriptSigs, + required TResult Function() unsignedTxHasScriptWitnesses, + required TResult Function() mustHaveUnsignedTx, + required TResult Function() noMorePairs, + required TResult Function() unexpectedUnsignedTx, + required TResult Function(int sighash) nonStandardSighashType, + required TResult Function(String hash) invalidHash, + required TResult Function() invalidPreimageHashPair, + required TResult Function(String xpub) combineInconsistentKeySources, + required TResult Function(String encodingError) consensusEncoding, + required TResult Function() negativeFee, + required TResult Function() feeOverflow, + required TResult Function(String errorMessage) invalidPublicKey, + required TResult Function(String secp256K1Error) invalidSecp256K1PublicKey, + required TResult Function() invalidXOnlyPublicKey, + required TResult Function(String errorMessage) invalidEcdsaSignature, + required TResult Function(String errorMessage) invalidTaprootSignature, + required TResult Function() invalidControlBlock, + required TResult Function() invalidLeafVersion, + required TResult Function() taproot, + required TResult Function(String errorMessage) tapTree, + required TResult Function() xPubKey, + required TResult Function(String errorMessage) version, + required TResult Function() partialDataConsumption, + required TResult Function(String errorMessage) io, + required TResult Function() otherPsbtErr, + }) { + return tapTree(errorMessage); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidMagic, + TResult? Function()? missingUtxo, + TResult? Function()? invalidSeparator, + TResult? Function()? psbtUtxoOutOfBounds, + TResult? Function(String key)? invalidKey, + TResult? Function()? invalidProprietaryKey, + TResult? Function(String key)? duplicateKey, + TResult? Function()? unsignedTxHasScriptSigs, + TResult? Function()? unsignedTxHasScriptWitnesses, + TResult? Function()? mustHaveUnsignedTx, + TResult? Function()? noMorePairs, + TResult? Function()? unexpectedUnsignedTx, + TResult? Function(int sighash)? nonStandardSighashType, + TResult? Function(String hash)? invalidHash, + TResult? Function()? invalidPreimageHashPair, + TResult? Function(String xpub)? combineInconsistentKeySources, + TResult? Function(String encodingError)? consensusEncoding, + TResult? Function()? negativeFee, + TResult? Function()? feeOverflow, + TResult? Function(String errorMessage)? invalidPublicKey, + TResult? Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult? Function()? invalidXOnlyPublicKey, + TResult? Function(String errorMessage)? invalidEcdsaSignature, + TResult? Function(String errorMessage)? invalidTaprootSignature, + TResult? Function()? invalidControlBlock, + TResult? Function()? invalidLeafVersion, + TResult? Function()? taproot, + TResult? Function(String errorMessage)? tapTree, + TResult? Function()? xPubKey, + TResult? Function(String errorMessage)? version, + TResult? Function()? partialDataConsumption, + TResult? Function(String errorMessage)? io, + TResult? Function()? otherPsbtErr, + }) { + return tapTree?.call(errorMessage); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidMagic, + TResult Function()? missingUtxo, + TResult Function()? invalidSeparator, + TResult Function()? psbtUtxoOutOfBounds, + TResult Function(String key)? invalidKey, + TResult Function()? invalidProprietaryKey, + TResult Function(String key)? duplicateKey, + TResult Function()? unsignedTxHasScriptSigs, + TResult Function()? unsignedTxHasScriptWitnesses, + TResult Function()? mustHaveUnsignedTx, + TResult Function()? noMorePairs, + TResult Function()? unexpectedUnsignedTx, + TResult Function(int sighash)? nonStandardSighashType, + TResult Function(String hash)? invalidHash, + TResult Function()? invalidPreimageHashPair, + TResult Function(String xpub)? combineInconsistentKeySources, + TResult Function(String encodingError)? consensusEncoding, + TResult Function()? negativeFee, + TResult Function()? feeOverflow, + TResult Function(String errorMessage)? invalidPublicKey, + TResult Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult Function()? invalidXOnlyPublicKey, + TResult Function(String errorMessage)? invalidEcdsaSignature, + TResult Function(String errorMessage)? invalidTaprootSignature, + TResult Function()? invalidControlBlock, + TResult Function()? invalidLeafVersion, + TResult Function()? taproot, + TResult Function(String errorMessage)? tapTree, + TResult Function()? xPubKey, + TResult Function(String errorMessage)? version, + TResult Function()? partialDataConsumption, + TResult Function(String errorMessage)? io, + TResult Function()? otherPsbtErr, + required TResult orElse(), + }) { + if (tapTree != null) { + return tapTree(errorMessage); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(PsbtError_InvalidMagic value) invalidMagic, + required TResult Function(PsbtError_MissingUtxo value) missingUtxo, + required TResult Function(PsbtError_InvalidSeparator value) + invalidSeparator, + required TResult Function(PsbtError_PsbtUtxoOutOfBounds value) + psbtUtxoOutOfBounds, + required TResult Function(PsbtError_InvalidKey value) invalidKey, + required TResult Function(PsbtError_InvalidProprietaryKey value) + invalidProprietaryKey, + required TResult Function(PsbtError_DuplicateKey value) duplicateKey, + required TResult Function(PsbtError_UnsignedTxHasScriptSigs value) + unsignedTxHasScriptSigs, + required TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value) + unsignedTxHasScriptWitnesses, + required TResult Function(PsbtError_MustHaveUnsignedTx value) + mustHaveUnsignedTx, + required TResult Function(PsbtError_NoMorePairs value) noMorePairs, + required TResult Function(PsbtError_UnexpectedUnsignedTx value) + unexpectedUnsignedTx, + required TResult Function(PsbtError_NonStandardSighashType value) + nonStandardSighashType, + required TResult Function(PsbtError_InvalidHash value) invalidHash, + required TResult Function(PsbtError_InvalidPreimageHashPair value) + invalidPreimageHashPair, + required TResult Function(PsbtError_CombineInconsistentKeySources value) + combineInconsistentKeySources, + required TResult Function(PsbtError_ConsensusEncoding value) + consensusEncoding, + required TResult Function(PsbtError_NegativeFee value) negativeFee, + required TResult Function(PsbtError_FeeOverflow value) feeOverflow, + required TResult Function(PsbtError_InvalidPublicKey value) + invalidPublicKey, + required TResult Function(PsbtError_InvalidSecp256k1PublicKey value) + invalidSecp256K1PublicKey, + required TResult Function(PsbtError_InvalidXOnlyPublicKey value) + invalidXOnlyPublicKey, + required TResult Function(PsbtError_InvalidEcdsaSignature value) + invalidEcdsaSignature, + required TResult Function(PsbtError_InvalidTaprootSignature value) + invalidTaprootSignature, + required TResult Function(PsbtError_InvalidControlBlock value) + invalidControlBlock, + required TResult Function(PsbtError_InvalidLeafVersion value) + invalidLeafVersion, + required TResult Function(PsbtError_Taproot value) taproot, + required TResult Function(PsbtError_TapTree value) tapTree, + required TResult Function(PsbtError_XPubKey value) xPubKey, + required TResult Function(PsbtError_Version value) version, + required TResult Function(PsbtError_PartialDataConsumption value) + partialDataConsumption, + required TResult Function(PsbtError_Io value) io, + required TResult Function(PsbtError_OtherPsbtErr value) otherPsbtErr, + }) { + return tapTree(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult? Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult? Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult? Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult? Function(PsbtError_InvalidKey value)? invalidKey, + TResult? Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult? Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult? Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult? Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult? Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult? Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult? Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult? Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult? Function(PsbtError_InvalidHash value)? invalidHash, + TResult? Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult? Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult? Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult? Function(PsbtError_NegativeFee value)? negativeFee, + TResult? Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult? Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult? Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult? Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult? Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult? Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult? Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult? Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult? Function(PsbtError_Taproot value)? taproot, + TResult? Function(PsbtError_TapTree value)? tapTree, + TResult? Function(PsbtError_XPubKey value)? xPubKey, + TResult? Function(PsbtError_Version value)? version, + TResult? Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult? Function(PsbtError_Io value)? io, + TResult? Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + }) { + return tapTree?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult Function(PsbtError_InvalidKey value)? invalidKey, + TResult Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult Function(PsbtError_InvalidHash value)? invalidHash, + TResult Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult Function(PsbtError_NegativeFee value)? negativeFee, + TResult Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult Function(PsbtError_Taproot value)? taproot, + TResult Function(PsbtError_TapTree value)? tapTree, + TResult Function(PsbtError_XPubKey value)? xPubKey, + TResult Function(PsbtError_Version value)? version, + TResult Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult Function(PsbtError_Io value)? io, + TResult Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + required TResult orElse(), + }) { + if (tapTree != null) { + return tapTree(this); + } + return orElse(); + } +} + +abstract class PsbtError_TapTree extends PsbtError { + const factory PsbtError_TapTree({required final String errorMessage}) = + _$PsbtError_TapTreeImpl; + const PsbtError_TapTree._() : super._(); + + String get errorMessage; + @JsonKey(ignore: true) + _$$PsbtError_TapTreeImplCopyWith<_$PsbtError_TapTreeImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$PsbtError_XPubKeyImplCopyWith<$Res> { + factory _$$PsbtError_XPubKeyImplCopyWith(_$PsbtError_XPubKeyImpl value, + $Res Function(_$PsbtError_XPubKeyImpl) then) = + __$$PsbtError_XPubKeyImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$PsbtError_XPubKeyImplCopyWithImpl<$Res> + extends _$PsbtErrorCopyWithImpl<$Res, _$PsbtError_XPubKeyImpl> + implements _$$PsbtError_XPubKeyImplCopyWith<$Res> { + __$$PsbtError_XPubKeyImplCopyWithImpl(_$PsbtError_XPubKeyImpl _value, + $Res Function(_$PsbtError_XPubKeyImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$PsbtError_XPubKeyImpl extends PsbtError_XPubKey { + const _$PsbtError_XPubKeyImpl() : super._(); + + @override + String toString() { + return 'PsbtError.xPubKey()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && other is _$PsbtError_XPubKeyImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidMagic, + required TResult Function() missingUtxo, + required TResult Function() invalidSeparator, + required TResult Function() psbtUtxoOutOfBounds, + required TResult Function(String key) invalidKey, + required TResult Function() invalidProprietaryKey, + required TResult Function(String key) duplicateKey, + required TResult Function() unsignedTxHasScriptSigs, + required TResult Function() unsignedTxHasScriptWitnesses, + required TResult Function() mustHaveUnsignedTx, + required TResult Function() noMorePairs, + required TResult Function() unexpectedUnsignedTx, + required TResult Function(int sighash) nonStandardSighashType, + required TResult Function(String hash) invalidHash, + required TResult Function() invalidPreimageHashPair, + required TResult Function(String xpub) combineInconsistentKeySources, + required TResult Function(String encodingError) consensusEncoding, + required TResult Function() negativeFee, + required TResult Function() feeOverflow, + required TResult Function(String errorMessage) invalidPublicKey, + required TResult Function(String secp256K1Error) invalidSecp256K1PublicKey, + required TResult Function() invalidXOnlyPublicKey, + required TResult Function(String errorMessage) invalidEcdsaSignature, + required TResult Function(String errorMessage) invalidTaprootSignature, + required TResult Function() invalidControlBlock, + required TResult Function() invalidLeafVersion, + required TResult Function() taproot, + required TResult Function(String errorMessage) tapTree, + required TResult Function() xPubKey, + required TResult Function(String errorMessage) version, + required TResult Function() partialDataConsumption, + required TResult Function(String errorMessage) io, + required TResult Function() otherPsbtErr, + }) { + return xPubKey(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidMagic, + TResult? Function()? missingUtxo, + TResult? Function()? invalidSeparator, + TResult? Function()? psbtUtxoOutOfBounds, + TResult? Function(String key)? invalidKey, + TResult? Function()? invalidProprietaryKey, + TResult? Function(String key)? duplicateKey, + TResult? Function()? unsignedTxHasScriptSigs, + TResult? Function()? unsignedTxHasScriptWitnesses, + TResult? Function()? mustHaveUnsignedTx, + TResult? Function()? noMorePairs, + TResult? Function()? unexpectedUnsignedTx, + TResult? Function(int sighash)? nonStandardSighashType, + TResult? Function(String hash)? invalidHash, + TResult? Function()? invalidPreimageHashPair, + TResult? Function(String xpub)? combineInconsistentKeySources, + TResult? Function(String encodingError)? consensusEncoding, + TResult? Function()? negativeFee, + TResult? Function()? feeOverflow, + TResult? Function(String errorMessage)? invalidPublicKey, + TResult? Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult? Function()? invalidXOnlyPublicKey, + TResult? Function(String errorMessage)? invalidEcdsaSignature, + TResult? Function(String errorMessage)? invalidTaprootSignature, + TResult? Function()? invalidControlBlock, + TResult? Function()? invalidLeafVersion, + TResult? Function()? taproot, + TResult? Function(String errorMessage)? tapTree, + TResult? Function()? xPubKey, + TResult? Function(String errorMessage)? version, + TResult? Function()? partialDataConsumption, + TResult? Function(String errorMessage)? io, + TResult? Function()? otherPsbtErr, + }) { + return xPubKey?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidMagic, + TResult Function()? missingUtxo, + TResult Function()? invalidSeparator, + TResult Function()? psbtUtxoOutOfBounds, + TResult Function(String key)? invalidKey, + TResult Function()? invalidProprietaryKey, + TResult Function(String key)? duplicateKey, + TResult Function()? unsignedTxHasScriptSigs, + TResult Function()? unsignedTxHasScriptWitnesses, + TResult Function()? mustHaveUnsignedTx, + TResult Function()? noMorePairs, + TResult Function()? unexpectedUnsignedTx, + TResult Function(int sighash)? nonStandardSighashType, + TResult Function(String hash)? invalidHash, + TResult Function()? invalidPreimageHashPair, + TResult Function(String xpub)? combineInconsistentKeySources, + TResult Function(String encodingError)? consensusEncoding, + TResult Function()? negativeFee, + TResult Function()? feeOverflow, + TResult Function(String errorMessage)? invalidPublicKey, + TResult Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult Function()? invalidXOnlyPublicKey, + TResult Function(String errorMessage)? invalidEcdsaSignature, + TResult Function(String errorMessage)? invalidTaprootSignature, + TResult Function()? invalidControlBlock, + TResult Function()? invalidLeafVersion, + TResult Function()? taproot, + TResult Function(String errorMessage)? tapTree, + TResult Function()? xPubKey, + TResult Function(String errorMessage)? version, + TResult Function()? partialDataConsumption, + TResult Function(String errorMessage)? io, + TResult Function()? otherPsbtErr, + required TResult orElse(), + }) { + if (xPubKey != null) { + return xPubKey(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(PsbtError_InvalidMagic value) invalidMagic, + required TResult Function(PsbtError_MissingUtxo value) missingUtxo, + required TResult Function(PsbtError_InvalidSeparator value) + invalidSeparator, + required TResult Function(PsbtError_PsbtUtxoOutOfBounds value) + psbtUtxoOutOfBounds, + required TResult Function(PsbtError_InvalidKey value) invalidKey, + required TResult Function(PsbtError_InvalidProprietaryKey value) + invalidProprietaryKey, + required TResult Function(PsbtError_DuplicateKey value) duplicateKey, + required TResult Function(PsbtError_UnsignedTxHasScriptSigs value) + unsignedTxHasScriptSigs, + required TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value) + unsignedTxHasScriptWitnesses, + required TResult Function(PsbtError_MustHaveUnsignedTx value) + mustHaveUnsignedTx, + required TResult Function(PsbtError_NoMorePairs value) noMorePairs, + required TResult Function(PsbtError_UnexpectedUnsignedTx value) + unexpectedUnsignedTx, + required TResult Function(PsbtError_NonStandardSighashType value) + nonStandardSighashType, + required TResult Function(PsbtError_InvalidHash value) invalidHash, + required TResult Function(PsbtError_InvalidPreimageHashPair value) + invalidPreimageHashPair, + required TResult Function(PsbtError_CombineInconsistentKeySources value) + combineInconsistentKeySources, + required TResult Function(PsbtError_ConsensusEncoding value) + consensusEncoding, + required TResult Function(PsbtError_NegativeFee value) negativeFee, + required TResult Function(PsbtError_FeeOverflow value) feeOverflow, + required TResult Function(PsbtError_InvalidPublicKey value) + invalidPublicKey, + required TResult Function(PsbtError_InvalidSecp256k1PublicKey value) + invalidSecp256K1PublicKey, + required TResult Function(PsbtError_InvalidXOnlyPublicKey value) + invalidXOnlyPublicKey, + required TResult Function(PsbtError_InvalidEcdsaSignature value) + invalidEcdsaSignature, + required TResult Function(PsbtError_InvalidTaprootSignature value) + invalidTaprootSignature, + required TResult Function(PsbtError_InvalidControlBlock value) + invalidControlBlock, + required TResult Function(PsbtError_InvalidLeafVersion value) + invalidLeafVersion, + required TResult Function(PsbtError_Taproot value) taproot, + required TResult Function(PsbtError_TapTree value) tapTree, + required TResult Function(PsbtError_XPubKey value) xPubKey, + required TResult Function(PsbtError_Version value) version, + required TResult Function(PsbtError_PartialDataConsumption value) + partialDataConsumption, + required TResult Function(PsbtError_Io value) io, + required TResult Function(PsbtError_OtherPsbtErr value) otherPsbtErr, + }) { + return xPubKey(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult? Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult? Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult? Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult? Function(PsbtError_InvalidKey value)? invalidKey, + TResult? Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult? Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult? Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult? Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult? Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult? Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult? Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult? Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult? Function(PsbtError_InvalidHash value)? invalidHash, + TResult? Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult? Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult? Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult? Function(PsbtError_NegativeFee value)? negativeFee, + TResult? Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult? Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult? Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult? Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult? Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult? Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult? Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult? Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult? Function(PsbtError_Taproot value)? taproot, + TResult? Function(PsbtError_TapTree value)? tapTree, + TResult? Function(PsbtError_XPubKey value)? xPubKey, + TResult? Function(PsbtError_Version value)? version, + TResult? Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult? Function(PsbtError_Io value)? io, + TResult? Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + }) { + return xPubKey?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult Function(PsbtError_InvalidKey value)? invalidKey, + TResult Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult Function(PsbtError_InvalidHash value)? invalidHash, + TResult Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult Function(PsbtError_NegativeFee value)? negativeFee, + TResult Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult Function(PsbtError_Taproot value)? taproot, + TResult Function(PsbtError_TapTree value)? tapTree, + TResult Function(PsbtError_XPubKey value)? xPubKey, + TResult Function(PsbtError_Version value)? version, + TResult Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult Function(PsbtError_Io value)? io, + TResult Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + required TResult orElse(), + }) { + if (xPubKey != null) { + return xPubKey(this); + } + return orElse(); + } +} + +abstract class PsbtError_XPubKey extends PsbtError { + const factory PsbtError_XPubKey() = _$PsbtError_XPubKeyImpl; + const PsbtError_XPubKey._() : super._(); +} + +/// @nodoc +abstract class _$$PsbtError_VersionImplCopyWith<$Res> { + factory _$$PsbtError_VersionImplCopyWith(_$PsbtError_VersionImpl value, + $Res Function(_$PsbtError_VersionImpl) then) = + __$$PsbtError_VersionImplCopyWithImpl<$Res>; + @useResult + $Res call({String errorMessage}); +} + +/// @nodoc +class __$$PsbtError_VersionImplCopyWithImpl<$Res> + extends _$PsbtErrorCopyWithImpl<$Res, _$PsbtError_VersionImpl> + implements _$$PsbtError_VersionImplCopyWith<$Res> { + __$$PsbtError_VersionImplCopyWithImpl(_$PsbtError_VersionImpl _value, + $Res Function(_$PsbtError_VersionImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? errorMessage = null, + }) { + return _then(_$PsbtError_VersionImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$PsbtError_VersionImpl extends PsbtError_Version { + const _$PsbtError_VersionImpl({required this.errorMessage}) : super._(); + + @override + final String errorMessage; + + @override + String toString() { + return 'PsbtError.version(errorMessage: $errorMessage)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PsbtError_VersionImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); + } + + @override + int get hashCode => Object.hash(runtimeType, errorMessage); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$PsbtError_VersionImplCopyWith<_$PsbtError_VersionImpl> get copyWith => + __$$PsbtError_VersionImplCopyWithImpl<_$PsbtError_VersionImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidMagic, + required TResult Function() missingUtxo, + required TResult Function() invalidSeparator, + required TResult Function() psbtUtxoOutOfBounds, + required TResult Function(String key) invalidKey, + required TResult Function() invalidProprietaryKey, + required TResult Function(String key) duplicateKey, + required TResult Function() unsignedTxHasScriptSigs, + required TResult Function() unsignedTxHasScriptWitnesses, + required TResult Function() mustHaveUnsignedTx, + required TResult Function() noMorePairs, + required TResult Function() unexpectedUnsignedTx, + required TResult Function(int sighash) nonStandardSighashType, + required TResult Function(String hash) invalidHash, + required TResult Function() invalidPreimageHashPair, + required TResult Function(String xpub) combineInconsistentKeySources, + required TResult Function(String encodingError) consensusEncoding, + required TResult Function() negativeFee, + required TResult Function() feeOverflow, + required TResult Function(String errorMessage) invalidPublicKey, + required TResult Function(String secp256K1Error) invalidSecp256K1PublicKey, + required TResult Function() invalidXOnlyPublicKey, + required TResult Function(String errorMessage) invalidEcdsaSignature, + required TResult Function(String errorMessage) invalidTaprootSignature, + required TResult Function() invalidControlBlock, + required TResult Function() invalidLeafVersion, + required TResult Function() taproot, + required TResult Function(String errorMessage) tapTree, + required TResult Function() xPubKey, + required TResult Function(String errorMessage) version, + required TResult Function() partialDataConsumption, + required TResult Function(String errorMessage) io, + required TResult Function() otherPsbtErr, + }) { + return version(errorMessage); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidMagic, + TResult? Function()? missingUtxo, + TResult? Function()? invalidSeparator, + TResult? Function()? psbtUtxoOutOfBounds, + TResult? Function(String key)? invalidKey, + TResult? Function()? invalidProprietaryKey, + TResult? Function(String key)? duplicateKey, + TResult? Function()? unsignedTxHasScriptSigs, + TResult? Function()? unsignedTxHasScriptWitnesses, + TResult? Function()? mustHaveUnsignedTx, + TResult? Function()? noMorePairs, + TResult? Function()? unexpectedUnsignedTx, + TResult? Function(int sighash)? nonStandardSighashType, + TResult? Function(String hash)? invalidHash, + TResult? Function()? invalidPreimageHashPair, + TResult? Function(String xpub)? combineInconsistentKeySources, + TResult? Function(String encodingError)? consensusEncoding, + TResult? Function()? negativeFee, + TResult? Function()? feeOverflow, + TResult? Function(String errorMessage)? invalidPublicKey, + TResult? Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult? Function()? invalidXOnlyPublicKey, + TResult? Function(String errorMessage)? invalidEcdsaSignature, + TResult? Function(String errorMessage)? invalidTaprootSignature, + TResult? Function()? invalidControlBlock, + TResult? Function()? invalidLeafVersion, + TResult? Function()? taproot, + TResult? Function(String errorMessage)? tapTree, + TResult? Function()? xPubKey, + TResult? Function(String errorMessage)? version, + TResult? Function()? partialDataConsumption, + TResult? Function(String errorMessage)? io, + TResult? Function()? otherPsbtErr, + }) { + return version?.call(errorMessage); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidMagic, + TResult Function()? missingUtxo, + TResult Function()? invalidSeparator, + TResult Function()? psbtUtxoOutOfBounds, + TResult Function(String key)? invalidKey, + TResult Function()? invalidProprietaryKey, + TResult Function(String key)? duplicateKey, + TResult Function()? unsignedTxHasScriptSigs, + TResult Function()? unsignedTxHasScriptWitnesses, + TResult Function()? mustHaveUnsignedTx, + TResult Function()? noMorePairs, + TResult Function()? unexpectedUnsignedTx, + TResult Function(int sighash)? nonStandardSighashType, + TResult Function(String hash)? invalidHash, + TResult Function()? invalidPreimageHashPair, + TResult Function(String xpub)? combineInconsistentKeySources, + TResult Function(String encodingError)? consensusEncoding, + TResult Function()? negativeFee, + TResult Function()? feeOverflow, + TResult Function(String errorMessage)? invalidPublicKey, + TResult Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult Function()? invalidXOnlyPublicKey, + TResult Function(String errorMessage)? invalidEcdsaSignature, + TResult Function(String errorMessage)? invalidTaprootSignature, + TResult Function()? invalidControlBlock, + TResult Function()? invalidLeafVersion, + TResult Function()? taproot, + TResult Function(String errorMessage)? tapTree, + TResult Function()? xPubKey, + TResult Function(String errorMessage)? version, + TResult Function()? partialDataConsumption, + TResult Function(String errorMessage)? io, + TResult Function()? otherPsbtErr, + required TResult orElse(), + }) { + if (version != null) { + return version(errorMessage); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(PsbtError_InvalidMagic value) invalidMagic, + required TResult Function(PsbtError_MissingUtxo value) missingUtxo, + required TResult Function(PsbtError_InvalidSeparator value) + invalidSeparator, + required TResult Function(PsbtError_PsbtUtxoOutOfBounds value) + psbtUtxoOutOfBounds, + required TResult Function(PsbtError_InvalidKey value) invalidKey, + required TResult Function(PsbtError_InvalidProprietaryKey value) + invalidProprietaryKey, + required TResult Function(PsbtError_DuplicateKey value) duplicateKey, + required TResult Function(PsbtError_UnsignedTxHasScriptSigs value) + unsignedTxHasScriptSigs, + required TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value) + unsignedTxHasScriptWitnesses, + required TResult Function(PsbtError_MustHaveUnsignedTx value) + mustHaveUnsignedTx, + required TResult Function(PsbtError_NoMorePairs value) noMorePairs, + required TResult Function(PsbtError_UnexpectedUnsignedTx value) + unexpectedUnsignedTx, + required TResult Function(PsbtError_NonStandardSighashType value) + nonStandardSighashType, + required TResult Function(PsbtError_InvalidHash value) invalidHash, + required TResult Function(PsbtError_InvalidPreimageHashPair value) + invalidPreimageHashPair, + required TResult Function(PsbtError_CombineInconsistentKeySources value) + combineInconsistentKeySources, + required TResult Function(PsbtError_ConsensusEncoding value) + consensusEncoding, + required TResult Function(PsbtError_NegativeFee value) negativeFee, + required TResult Function(PsbtError_FeeOverflow value) feeOverflow, + required TResult Function(PsbtError_InvalidPublicKey value) + invalidPublicKey, + required TResult Function(PsbtError_InvalidSecp256k1PublicKey value) + invalidSecp256K1PublicKey, + required TResult Function(PsbtError_InvalidXOnlyPublicKey value) + invalidXOnlyPublicKey, + required TResult Function(PsbtError_InvalidEcdsaSignature value) + invalidEcdsaSignature, + required TResult Function(PsbtError_InvalidTaprootSignature value) + invalidTaprootSignature, + required TResult Function(PsbtError_InvalidControlBlock value) + invalidControlBlock, + required TResult Function(PsbtError_InvalidLeafVersion value) + invalidLeafVersion, + required TResult Function(PsbtError_Taproot value) taproot, + required TResult Function(PsbtError_TapTree value) tapTree, + required TResult Function(PsbtError_XPubKey value) xPubKey, + required TResult Function(PsbtError_Version value) version, + required TResult Function(PsbtError_PartialDataConsumption value) + partialDataConsumption, + required TResult Function(PsbtError_Io value) io, + required TResult Function(PsbtError_OtherPsbtErr value) otherPsbtErr, + }) { + return version(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult? Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult? Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult? Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult? Function(PsbtError_InvalidKey value)? invalidKey, + TResult? Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult? Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult? Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult? Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult? Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult? Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult? Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult? Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult? Function(PsbtError_InvalidHash value)? invalidHash, + TResult? Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult? Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult? Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult? Function(PsbtError_NegativeFee value)? negativeFee, + TResult? Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult? Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult? Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult? Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult? Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult? Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult? Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult? Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult? Function(PsbtError_Taproot value)? taproot, + TResult? Function(PsbtError_TapTree value)? tapTree, + TResult? Function(PsbtError_XPubKey value)? xPubKey, + TResult? Function(PsbtError_Version value)? version, + TResult? Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult? Function(PsbtError_Io value)? io, + TResult? Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + }) { + return version?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult Function(PsbtError_InvalidKey value)? invalidKey, + TResult Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult Function(PsbtError_InvalidHash value)? invalidHash, + TResult Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult Function(PsbtError_NegativeFee value)? negativeFee, + TResult Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult Function(PsbtError_Taproot value)? taproot, + TResult Function(PsbtError_TapTree value)? tapTree, + TResult Function(PsbtError_XPubKey value)? xPubKey, + TResult Function(PsbtError_Version value)? version, + TResult Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult Function(PsbtError_Io value)? io, + TResult Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + required TResult orElse(), + }) { + if (version != null) { + return version(this); + } + return orElse(); + } +} + +abstract class PsbtError_Version extends PsbtError { + const factory PsbtError_Version({required final String errorMessage}) = + _$PsbtError_VersionImpl; + const PsbtError_Version._() : super._(); + + String get errorMessage; + @JsonKey(ignore: true) + _$$PsbtError_VersionImplCopyWith<_$PsbtError_VersionImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$PsbtError_PartialDataConsumptionImplCopyWith<$Res> { + factory _$$PsbtError_PartialDataConsumptionImplCopyWith( + _$PsbtError_PartialDataConsumptionImpl value, + $Res Function(_$PsbtError_PartialDataConsumptionImpl) then) = + __$$PsbtError_PartialDataConsumptionImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$PsbtError_PartialDataConsumptionImplCopyWithImpl<$Res> + extends _$PsbtErrorCopyWithImpl<$Res, + _$PsbtError_PartialDataConsumptionImpl> + implements _$$PsbtError_PartialDataConsumptionImplCopyWith<$Res> { + __$$PsbtError_PartialDataConsumptionImplCopyWithImpl( + _$PsbtError_PartialDataConsumptionImpl _value, + $Res Function(_$PsbtError_PartialDataConsumptionImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$PsbtError_PartialDataConsumptionImpl + extends PsbtError_PartialDataConsumption { + const _$PsbtError_PartialDataConsumptionImpl() : super._(); + + @override + String toString() { + return 'PsbtError.partialDataConsumption()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PsbtError_PartialDataConsumptionImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidMagic, + required TResult Function() missingUtxo, + required TResult Function() invalidSeparator, + required TResult Function() psbtUtxoOutOfBounds, + required TResult Function(String key) invalidKey, + required TResult Function() invalidProprietaryKey, + required TResult Function(String key) duplicateKey, + required TResult Function() unsignedTxHasScriptSigs, + required TResult Function() unsignedTxHasScriptWitnesses, + required TResult Function() mustHaveUnsignedTx, + required TResult Function() noMorePairs, + required TResult Function() unexpectedUnsignedTx, + required TResult Function(int sighash) nonStandardSighashType, + required TResult Function(String hash) invalidHash, + required TResult Function() invalidPreimageHashPair, + required TResult Function(String xpub) combineInconsistentKeySources, + required TResult Function(String encodingError) consensusEncoding, + required TResult Function() negativeFee, + required TResult Function() feeOverflow, + required TResult Function(String errorMessage) invalidPublicKey, + required TResult Function(String secp256K1Error) invalidSecp256K1PublicKey, + required TResult Function() invalidXOnlyPublicKey, + required TResult Function(String errorMessage) invalidEcdsaSignature, + required TResult Function(String errorMessage) invalidTaprootSignature, + required TResult Function() invalidControlBlock, + required TResult Function() invalidLeafVersion, + required TResult Function() taproot, + required TResult Function(String errorMessage) tapTree, + required TResult Function() xPubKey, + required TResult Function(String errorMessage) version, + required TResult Function() partialDataConsumption, + required TResult Function(String errorMessage) io, + required TResult Function() otherPsbtErr, + }) { + return partialDataConsumption(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidMagic, + TResult? Function()? missingUtxo, + TResult? Function()? invalidSeparator, + TResult? Function()? psbtUtxoOutOfBounds, + TResult? Function(String key)? invalidKey, + TResult? Function()? invalidProprietaryKey, + TResult? Function(String key)? duplicateKey, + TResult? Function()? unsignedTxHasScriptSigs, + TResult? Function()? unsignedTxHasScriptWitnesses, + TResult? Function()? mustHaveUnsignedTx, + TResult? Function()? noMorePairs, + TResult? Function()? unexpectedUnsignedTx, + TResult? Function(int sighash)? nonStandardSighashType, + TResult? Function(String hash)? invalidHash, + TResult? Function()? invalidPreimageHashPair, + TResult? Function(String xpub)? combineInconsistentKeySources, + TResult? Function(String encodingError)? consensusEncoding, + TResult? Function()? negativeFee, + TResult? Function()? feeOverflow, + TResult? Function(String errorMessage)? invalidPublicKey, + TResult? Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult? Function()? invalidXOnlyPublicKey, + TResult? Function(String errorMessage)? invalidEcdsaSignature, + TResult? Function(String errorMessage)? invalidTaprootSignature, + TResult? Function()? invalidControlBlock, + TResult? Function()? invalidLeafVersion, + TResult? Function()? taproot, + TResult? Function(String errorMessage)? tapTree, + TResult? Function()? xPubKey, + TResult? Function(String errorMessage)? version, + TResult? Function()? partialDataConsumption, + TResult? Function(String errorMessage)? io, + TResult? Function()? otherPsbtErr, + }) { + return partialDataConsumption?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidMagic, + TResult Function()? missingUtxo, + TResult Function()? invalidSeparator, + TResult Function()? psbtUtxoOutOfBounds, + TResult Function(String key)? invalidKey, + TResult Function()? invalidProprietaryKey, + TResult Function(String key)? duplicateKey, + TResult Function()? unsignedTxHasScriptSigs, + TResult Function()? unsignedTxHasScriptWitnesses, + TResult Function()? mustHaveUnsignedTx, + TResult Function()? noMorePairs, + TResult Function()? unexpectedUnsignedTx, + TResult Function(int sighash)? nonStandardSighashType, + TResult Function(String hash)? invalidHash, + TResult Function()? invalidPreimageHashPair, + TResult Function(String xpub)? combineInconsistentKeySources, + TResult Function(String encodingError)? consensusEncoding, + TResult Function()? negativeFee, + TResult Function()? feeOverflow, + TResult Function(String errorMessage)? invalidPublicKey, + TResult Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult Function()? invalidXOnlyPublicKey, + TResult Function(String errorMessage)? invalidEcdsaSignature, + TResult Function(String errorMessage)? invalidTaprootSignature, + TResult Function()? invalidControlBlock, + TResult Function()? invalidLeafVersion, + TResult Function()? taproot, + TResult Function(String errorMessage)? tapTree, + TResult Function()? xPubKey, + TResult Function(String errorMessage)? version, + TResult Function()? partialDataConsumption, + TResult Function(String errorMessage)? io, + TResult Function()? otherPsbtErr, + required TResult orElse(), + }) { + if (partialDataConsumption != null) { + return partialDataConsumption(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(PsbtError_InvalidMagic value) invalidMagic, + required TResult Function(PsbtError_MissingUtxo value) missingUtxo, + required TResult Function(PsbtError_InvalidSeparator value) + invalidSeparator, + required TResult Function(PsbtError_PsbtUtxoOutOfBounds value) + psbtUtxoOutOfBounds, + required TResult Function(PsbtError_InvalidKey value) invalidKey, + required TResult Function(PsbtError_InvalidProprietaryKey value) + invalidProprietaryKey, + required TResult Function(PsbtError_DuplicateKey value) duplicateKey, + required TResult Function(PsbtError_UnsignedTxHasScriptSigs value) + unsignedTxHasScriptSigs, + required TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value) + unsignedTxHasScriptWitnesses, + required TResult Function(PsbtError_MustHaveUnsignedTx value) + mustHaveUnsignedTx, + required TResult Function(PsbtError_NoMorePairs value) noMorePairs, + required TResult Function(PsbtError_UnexpectedUnsignedTx value) + unexpectedUnsignedTx, + required TResult Function(PsbtError_NonStandardSighashType value) + nonStandardSighashType, + required TResult Function(PsbtError_InvalidHash value) invalidHash, + required TResult Function(PsbtError_InvalidPreimageHashPair value) + invalidPreimageHashPair, + required TResult Function(PsbtError_CombineInconsistentKeySources value) + combineInconsistentKeySources, + required TResult Function(PsbtError_ConsensusEncoding value) + consensusEncoding, + required TResult Function(PsbtError_NegativeFee value) negativeFee, + required TResult Function(PsbtError_FeeOverflow value) feeOverflow, + required TResult Function(PsbtError_InvalidPublicKey value) + invalidPublicKey, + required TResult Function(PsbtError_InvalidSecp256k1PublicKey value) + invalidSecp256K1PublicKey, + required TResult Function(PsbtError_InvalidXOnlyPublicKey value) + invalidXOnlyPublicKey, + required TResult Function(PsbtError_InvalidEcdsaSignature value) + invalidEcdsaSignature, + required TResult Function(PsbtError_InvalidTaprootSignature value) + invalidTaprootSignature, + required TResult Function(PsbtError_InvalidControlBlock value) + invalidControlBlock, + required TResult Function(PsbtError_InvalidLeafVersion value) + invalidLeafVersion, + required TResult Function(PsbtError_Taproot value) taproot, + required TResult Function(PsbtError_TapTree value) tapTree, + required TResult Function(PsbtError_XPubKey value) xPubKey, + required TResult Function(PsbtError_Version value) version, + required TResult Function(PsbtError_PartialDataConsumption value) + partialDataConsumption, + required TResult Function(PsbtError_Io value) io, + required TResult Function(PsbtError_OtherPsbtErr value) otherPsbtErr, + }) { + return partialDataConsumption(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult? Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult? Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult? Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult? Function(PsbtError_InvalidKey value)? invalidKey, + TResult? Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult? Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult? Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult? Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult? Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult? Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult? Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult? Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult? Function(PsbtError_InvalidHash value)? invalidHash, + TResult? Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult? Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult? Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult? Function(PsbtError_NegativeFee value)? negativeFee, + TResult? Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult? Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult? Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult? Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult? Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult? Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult? Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult? Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult? Function(PsbtError_Taproot value)? taproot, + TResult? Function(PsbtError_TapTree value)? tapTree, + TResult? Function(PsbtError_XPubKey value)? xPubKey, + TResult? Function(PsbtError_Version value)? version, + TResult? Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult? Function(PsbtError_Io value)? io, + TResult? Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + }) { + return partialDataConsumption?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult Function(PsbtError_InvalidKey value)? invalidKey, + TResult Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult Function(PsbtError_InvalidHash value)? invalidHash, + TResult Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult Function(PsbtError_NegativeFee value)? negativeFee, + TResult Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult Function(PsbtError_Taproot value)? taproot, + TResult Function(PsbtError_TapTree value)? tapTree, + TResult Function(PsbtError_XPubKey value)? xPubKey, + TResult Function(PsbtError_Version value)? version, + TResult Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult Function(PsbtError_Io value)? io, + TResult Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + required TResult orElse(), + }) { + if (partialDataConsumption != null) { + return partialDataConsumption(this); + } + return orElse(); + } +} + +abstract class PsbtError_PartialDataConsumption extends PsbtError { + const factory PsbtError_PartialDataConsumption() = + _$PsbtError_PartialDataConsumptionImpl; + const PsbtError_PartialDataConsumption._() : super._(); +} + +/// @nodoc +abstract class _$$PsbtError_IoImplCopyWith<$Res> { + factory _$$PsbtError_IoImplCopyWith( + _$PsbtError_IoImpl value, $Res Function(_$PsbtError_IoImpl) then) = + __$$PsbtError_IoImplCopyWithImpl<$Res>; + @useResult + $Res call({String errorMessage}); +} + +/// @nodoc +class __$$PsbtError_IoImplCopyWithImpl<$Res> + extends _$PsbtErrorCopyWithImpl<$Res, _$PsbtError_IoImpl> + implements _$$PsbtError_IoImplCopyWith<$Res> { + __$$PsbtError_IoImplCopyWithImpl( + _$PsbtError_IoImpl _value, $Res Function(_$PsbtError_IoImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? errorMessage = null, + }) { + return _then(_$PsbtError_IoImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$PsbtError_IoImpl extends PsbtError_Io { + const _$PsbtError_IoImpl({required this.errorMessage}) : super._(); + + @override + final String errorMessage; + + @override + String toString() { + return 'PsbtError.io(errorMessage: $errorMessage)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PsbtError_IoImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); + } + + @override + int get hashCode => Object.hash(runtimeType, errorMessage); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$PsbtError_IoImplCopyWith<_$PsbtError_IoImpl> get copyWith => + __$$PsbtError_IoImplCopyWithImpl<_$PsbtError_IoImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidMagic, + required TResult Function() missingUtxo, + required TResult Function() invalidSeparator, + required TResult Function() psbtUtxoOutOfBounds, + required TResult Function(String key) invalidKey, + required TResult Function() invalidProprietaryKey, + required TResult Function(String key) duplicateKey, + required TResult Function() unsignedTxHasScriptSigs, + required TResult Function() unsignedTxHasScriptWitnesses, + required TResult Function() mustHaveUnsignedTx, + required TResult Function() noMorePairs, + required TResult Function() unexpectedUnsignedTx, + required TResult Function(int sighash) nonStandardSighashType, + required TResult Function(String hash) invalidHash, + required TResult Function() invalidPreimageHashPair, + required TResult Function(String xpub) combineInconsistentKeySources, + required TResult Function(String encodingError) consensusEncoding, + required TResult Function() negativeFee, + required TResult Function() feeOverflow, + required TResult Function(String errorMessage) invalidPublicKey, + required TResult Function(String secp256K1Error) invalidSecp256K1PublicKey, + required TResult Function() invalidXOnlyPublicKey, + required TResult Function(String errorMessage) invalidEcdsaSignature, + required TResult Function(String errorMessage) invalidTaprootSignature, + required TResult Function() invalidControlBlock, + required TResult Function() invalidLeafVersion, + required TResult Function() taproot, + required TResult Function(String errorMessage) tapTree, + required TResult Function() xPubKey, + required TResult Function(String errorMessage) version, + required TResult Function() partialDataConsumption, + required TResult Function(String errorMessage) io, + required TResult Function() otherPsbtErr, + }) { + return io(errorMessage); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidMagic, + TResult? Function()? missingUtxo, + TResult? Function()? invalidSeparator, + TResult? Function()? psbtUtxoOutOfBounds, + TResult? Function(String key)? invalidKey, + TResult? Function()? invalidProprietaryKey, + TResult? Function(String key)? duplicateKey, + TResult? Function()? unsignedTxHasScriptSigs, + TResult? Function()? unsignedTxHasScriptWitnesses, + TResult? Function()? mustHaveUnsignedTx, + TResult? Function()? noMorePairs, + TResult? Function()? unexpectedUnsignedTx, + TResult? Function(int sighash)? nonStandardSighashType, + TResult? Function(String hash)? invalidHash, + TResult? Function()? invalidPreimageHashPair, + TResult? Function(String xpub)? combineInconsistentKeySources, + TResult? Function(String encodingError)? consensusEncoding, + TResult? Function()? negativeFee, + TResult? Function()? feeOverflow, + TResult? Function(String errorMessage)? invalidPublicKey, + TResult? Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult? Function()? invalidXOnlyPublicKey, + TResult? Function(String errorMessage)? invalidEcdsaSignature, + TResult? Function(String errorMessage)? invalidTaprootSignature, + TResult? Function()? invalidControlBlock, + TResult? Function()? invalidLeafVersion, + TResult? Function()? taproot, + TResult? Function(String errorMessage)? tapTree, + TResult? Function()? xPubKey, + TResult? Function(String errorMessage)? version, + TResult? Function()? partialDataConsumption, + TResult? Function(String errorMessage)? io, + TResult? Function()? otherPsbtErr, + }) { + return io?.call(errorMessage); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidMagic, + TResult Function()? missingUtxo, + TResult Function()? invalidSeparator, + TResult Function()? psbtUtxoOutOfBounds, + TResult Function(String key)? invalidKey, + TResult Function()? invalidProprietaryKey, + TResult Function(String key)? duplicateKey, + TResult Function()? unsignedTxHasScriptSigs, + TResult Function()? unsignedTxHasScriptWitnesses, + TResult Function()? mustHaveUnsignedTx, + TResult Function()? noMorePairs, + TResult Function()? unexpectedUnsignedTx, + TResult Function(int sighash)? nonStandardSighashType, + TResult Function(String hash)? invalidHash, + TResult Function()? invalidPreimageHashPair, + TResult Function(String xpub)? combineInconsistentKeySources, + TResult Function(String encodingError)? consensusEncoding, + TResult Function()? negativeFee, + TResult Function()? feeOverflow, + TResult Function(String errorMessage)? invalidPublicKey, + TResult Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult Function()? invalidXOnlyPublicKey, + TResult Function(String errorMessage)? invalidEcdsaSignature, + TResult Function(String errorMessage)? invalidTaprootSignature, + TResult Function()? invalidControlBlock, + TResult Function()? invalidLeafVersion, + TResult Function()? taproot, + TResult Function(String errorMessage)? tapTree, + TResult Function()? xPubKey, + TResult Function(String errorMessage)? version, + TResult Function()? partialDataConsumption, + TResult Function(String errorMessage)? io, + TResult Function()? otherPsbtErr, + required TResult orElse(), + }) { + if (io != null) { + return io(errorMessage); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(PsbtError_InvalidMagic value) invalidMagic, + required TResult Function(PsbtError_MissingUtxo value) missingUtxo, + required TResult Function(PsbtError_InvalidSeparator value) + invalidSeparator, + required TResult Function(PsbtError_PsbtUtxoOutOfBounds value) + psbtUtxoOutOfBounds, + required TResult Function(PsbtError_InvalidKey value) invalidKey, + required TResult Function(PsbtError_InvalidProprietaryKey value) + invalidProprietaryKey, + required TResult Function(PsbtError_DuplicateKey value) duplicateKey, + required TResult Function(PsbtError_UnsignedTxHasScriptSigs value) + unsignedTxHasScriptSigs, + required TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value) + unsignedTxHasScriptWitnesses, + required TResult Function(PsbtError_MustHaveUnsignedTx value) + mustHaveUnsignedTx, + required TResult Function(PsbtError_NoMorePairs value) noMorePairs, + required TResult Function(PsbtError_UnexpectedUnsignedTx value) + unexpectedUnsignedTx, + required TResult Function(PsbtError_NonStandardSighashType value) + nonStandardSighashType, + required TResult Function(PsbtError_InvalidHash value) invalidHash, + required TResult Function(PsbtError_InvalidPreimageHashPair value) + invalidPreimageHashPair, + required TResult Function(PsbtError_CombineInconsistentKeySources value) + combineInconsistentKeySources, + required TResult Function(PsbtError_ConsensusEncoding value) + consensusEncoding, + required TResult Function(PsbtError_NegativeFee value) negativeFee, + required TResult Function(PsbtError_FeeOverflow value) feeOverflow, + required TResult Function(PsbtError_InvalidPublicKey value) + invalidPublicKey, + required TResult Function(PsbtError_InvalidSecp256k1PublicKey value) + invalidSecp256K1PublicKey, + required TResult Function(PsbtError_InvalidXOnlyPublicKey value) + invalidXOnlyPublicKey, + required TResult Function(PsbtError_InvalidEcdsaSignature value) + invalidEcdsaSignature, + required TResult Function(PsbtError_InvalidTaprootSignature value) + invalidTaprootSignature, + required TResult Function(PsbtError_InvalidControlBlock value) + invalidControlBlock, + required TResult Function(PsbtError_InvalidLeafVersion value) + invalidLeafVersion, + required TResult Function(PsbtError_Taproot value) taproot, + required TResult Function(PsbtError_TapTree value) tapTree, + required TResult Function(PsbtError_XPubKey value) xPubKey, + required TResult Function(PsbtError_Version value) version, + required TResult Function(PsbtError_PartialDataConsumption value) + partialDataConsumption, + required TResult Function(PsbtError_Io value) io, + required TResult Function(PsbtError_OtherPsbtErr value) otherPsbtErr, + }) { + return io(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult? Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult? Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult? Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult? Function(PsbtError_InvalidKey value)? invalidKey, + TResult? Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult? Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult? Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult? Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult? Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult? Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult? Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult? Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult? Function(PsbtError_InvalidHash value)? invalidHash, + TResult? Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult? Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult? Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult? Function(PsbtError_NegativeFee value)? negativeFee, + TResult? Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult? Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult? Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult? Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult? Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult? Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult? Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult? Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult? Function(PsbtError_Taproot value)? taproot, + TResult? Function(PsbtError_TapTree value)? tapTree, + TResult? Function(PsbtError_XPubKey value)? xPubKey, + TResult? Function(PsbtError_Version value)? version, + TResult? Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult? Function(PsbtError_Io value)? io, + TResult? Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + }) { + return io?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult Function(PsbtError_InvalidKey value)? invalidKey, + TResult Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult Function(PsbtError_InvalidHash value)? invalidHash, + TResult Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult Function(PsbtError_NegativeFee value)? negativeFee, + TResult Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult Function(PsbtError_Taproot value)? taproot, + TResult Function(PsbtError_TapTree value)? tapTree, + TResult Function(PsbtError_XPubKey value)? xPubKey, + TResult Function(PsbtError_Version value)? version, + TResult Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult Function(PsbtError_Io value)? io, + TResult Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + required TResult orElse(), + }) { + if (io != null) { + return io(this); + } + return orElse(); + } +} + +abstract class PsbtError_Io extends PsbtError { + const factory PsbtError_Io({required final String errorMessage}) = + _$PsbtError_IoImpl; + const PsbtError_Io._() : super._(); + + String get errorMessage; + @JsonKey(ignore: true) + _$$PsbtError_IoImplCopyWith<_$PsbtError_IoImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$PsbtError_OtherPsbtErrImplCopyWith<$Res> { + factory _$$PsbtError_OtherPsbtErrImplCopyWith( + _$PsbtError_OtherPsbtErrImpl value, + $Res Function(_$PsbtError_OtherPsbtErrImpl) then) = + __$$PsbtError_OtherPsbtErrImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$PsbtError_OtherPsbtErrImplCopyWithImpl<$Res> + extends _$PsbtErrorCopyWithImpl<$Res, _$PsbtError_OtherPsbtErrImpl> + implements _$$PsbtError_OtherPsbtErrImplCopyWith<$Res> { + __$$PsbtError_OtherPsbtErrImplCopyWithImpl( + _$PsbtError_OtherPsbtErrImpl _value, + $Res Function(_$PsbtError_OtherPsbtErrImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$PsbtError_OtherPsbtErrImpl extends PsbtError_OtherPsbtErr { + const _$PsbtError_OtherPsbtErrImpl() : super._(); + + @override + String toString() { + return 'PsbtError.otherPsbtErr()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PsbtError_OtherPsbtErrImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() invalidMagic, + required TResult Function() missingUtxo, + required TResult Function() invalidSeparator, + required TResult Function() psbtUtxoOutOfBounds, + required TResult Function(String key) invalidKey, + required TResult Function() invalidProprietaryKey, + required TResult Function(String key) duplicateKey, + required TResult Function() unsignedTxHasScriptSigs, + required TResult Function() unsignedTxHasScriptWitnesses, + required TResult Function() mustHaveUnsignedTx, + required TResult Function() noMorePairs, + required TResult Function() unexpectedUnsignedTx, + required TResult Function(int sighash) nonStandardSighashType, + required TResult Function(String hash) invalidHash, + required TResult Function() invalidPreimageHashPair, + required TResult Function(String xpub) combineInconsistentKeySources, + required TResult Function(String encodingError) consensusEncoding, + required TResult Function() negativeFee, + required TResult Function() feeOverflow, + required TResult Function(String errorMessage) invalidPublicKey, + required TResult Function(String secp256K1Error) invalidSecp256K1PublicKey, + required TResult Function() invalidXOnlyPublicKey, + required TResult Function(String errorMessage) invalidEcdsaSignature, + required TResult Function(String errorMessage) invalidTaprootSignature, + required TResult Function() invalidControlBlock, + required TResult Function() invalidLeafVersion, + required TResult Function() taproot, + required TResult Function(String errorMessage) tapTree, + required TResult Function() xPubKey, + required TResult Function(String errorMessage) version, + required TResult Function() partialDataConsumption, + required TResult Function(String errorMessage) io, + required TResult Function() otherPsbtErr, + }) { + return otherPsbtErr(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? invalidMagic, + TResult? Function()? missingUtxo, + TResult? Function()? invalidSeparator, + TResult? Function()? psbtUtxoOutOfBounds, + TResult? Function(String key)? invalidKey, + TResult? Function()? invalidProprietaryKey, + TResult? Function(String key)? duplicateKey, + TResult? Function()? unsignedTxHasScriptSigs, + TResult? Function()? unsignedTxHasScriptWitnesses, + TResult? Function()? mustHaveUnsignedTx, + TResult? Function()? noMorePairs, + TResult? Function()? unexpectedUnsignedTx, + TResult? Function(int sighash)? nonStandardSighashType, + TResult? Function(String hash)? invalidHash, + TResult? Function()? invalidPreimageHashPair, + TResult? Function(String xpub)? combineInconsistentKeySources, + TResult? Function(String encodingError)? consensusEncoding, + TResult? Function()? negativeFee, + TResult? Function()? feeOverflow, + TResult? Function(String errorMessage)? invalidPublicKey, + TResult? Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult? Function()? invalidXOnlyPublicKey, + TResult? Function(String errorMessage)? invalidEcdsaSignature, + TResult? Function(String errorMessage)? invalidTaprootSignature, + TResult? Function()? invalidControlBlock, + TResult? Function()? invalidLeafVersion, + TResult? Function()? taproot, + TResult? Function(String errorMessage)? tapTree, + TResult? Function()? xPubKey, + TResult? Function(String errorMessage)? version, + TResult? Function()? partialDataConsumption, + TResult? Function(String errorMessage)? io, + TResult? Function()? otherPsbtErr, + }) { + return otherPsbtErr?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? invalidMagic, + TResult Function()? missingUtxo, + TResult Function()? invalidSeparator, + TResult Function()? psbtUtxoOutOfBounds, + TResult Function(String key)? invalidKey, + TResult Function()? invalidProprietaryKey, + TResult Function(String key)? duplicateKey, + TResult Function()? unsignedTxHasScriptSigs, + TResult Function()? unsignedTxHasScriptWitnesses, + TResult Function()? mustHaveUnsignedTx, + TResult Function()? noMorePairs, + TResult Function()? unexpectedUnsignedTx, + TResult Function(int sighash)? nonStandardSighashType, + TResult Function(String hash)? invalidHash, + TResult Function()? invalidPreimageHashPair, + TResult Function(String xpub)? combineInconsistentKeySources, + TResult Function(String encodingError)? consensusEncoding, + TResult Function()? negativeFee, + TResult Function()? feeOverflow, + TResult Function(String errorMessage)? invalidPublicKey, + TResult Function(String secp256K1Error)? invalidSecp256K1PublicKey, + TResult Function()? invalidXOnlyPublicKey, + TResult Function(String errorMessage)? invalidEcdsaSignature, + TResult Function(String errorMessage)? invalidTaprootSignature, + TResult Function()? invalidControlBlock, + TResult Function()? invalidLeafVersion, + TResult Function()? taproot, + TResult Function(String errorMessage)? tapTree, + TResult Function()? xPubKey, + TResult Function(String errorMessage)? version, + TResult Function()? partialDataConsumption, + TResult Function(String errorMessage)? io, + TResult Function()? otherPsbtErr, + required TResult orElse(), + }) { + if (otherPsbtErr != null) { + return otherPsbtErr(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(PsbtError_InvalidMagic value) invalidMagic, + required TResult Function(PsbtError_MissingUtxo value) missingUtxo, + required TResult Function(PsbtError_InvalidSeparator value) + invalidSeparator, + required TResult Function(PsbtError_PsbtUtxoOutOfBounds value) + psbtUtxoOutOfBounds, + required TResult Function(PsbtError_InvalidKey value) invalidKey, + required TResult Function(PsbtError_InvalidProprietaryKey value) + invalidProprietaryKey, + required TResult Function(PsbtError_DuplicateKey value) duplicateKey, + required TResult Function(PsbtError_UnsignedTxHasScriptSigs value) + unsignedTxHasScriptSigs, + required TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value) + unsignedTxHasScriptWitnesses, + required TResult Function(PsbtError_MustHaveUnsignedTx value) + mustHaveUnsignedTx, + required TResult Function(PsbtError_NoMorePairs value) noMorePairs, + required TResult Function(PsbtError_UnexpectedUnsignedTx value) + unexpectedUnsignedTx, + required TResult Function(PsbtError_NonStandardSighashType value) + nonStandardSighashType, + required TResult Function(PsbtError_InvalidHash value) invalidHash, + required TResult Function(PsbtError_InvalidPreimageHashPair value) + invalidPreimageHashPair, + required TResult Function(PsbtError_CombineInconsistentKeySources value) + combineInconsistentKeySources, + required TResult Function(PsbtError_ConsensusEncoding value) + consensusEncoding, + required TResult Function(PsbtError_NegativeFee value) negativeFee, + required TResult Function(PsbtError_FeeOverflow value) feeOverflow, + required TResult Function(PsbtError_InvalidPublicKey value) + invalidPublicKey, + required TResult Function(PsbtError_InvalidSecp256k1PublicKey value) + invalidSecp256K1PublicKey, + required TResult Function(PsbtError_InvalidXOnlyPublicKey value) + invalidXOnlyPublicKey, + required TResult Function(PsbtError_InvalidEcdsaSignature value) + invalidEcdsaSignature, + required TResult Function(PsbtError_InvalidTaprootSignature value) + invalidTaprootSignature, + required TResult Function(PsbtError_InvalidControlBlock value) + invalidControlBlock, + required TResult Function(PsbtError_InvalidLeafVersion value) + invalidLeafVersion, + required TResult Function(PsbtError_Taproot value) taproot, + required TResult Function(PsbtError_TapTree value) tapTree, + required TResult Function(PsbtError_XPubKey value) xPubKey, + required TResult Function(PsbtError_Version value) version, + required TResult Function(PsbtError_PartialDataConsumption value) + partialDataConsumption, + required TResult Function(PsbtError_Io value) io, + required TResult Function(PsbtError_OtherPsbtErr value) otherPsbtErr, + }) { + return otherPsbtErr(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult? Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult? Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult? Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult? Function(PsbtError_InvalidKey value)? invalidKey, + TResult? Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult? Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult? Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult? Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult? Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult? Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult? Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult? Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult? Function(PsbtError_InvalidHash value)? invalidHash, + TResult? Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult? Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult? Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult? Function(PsbtError_NegativeFee value)? negativeFee, + TResult? Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult? Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult? Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult? Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult? Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult? Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult? Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult? Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult? Function(PsbtError_Taproot value)? taproot, + TResult? Function(PsbtError_TapTree value)? tapTree, + TResult? Function(PsbtError_XPubKey value)? xPubKey, + TResult? Function(PsbtError_Version value)? version, + TResult? Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult? Function(PsbtError_Io value)? io, + TResult? Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + }) { + return otherPsbtErr?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PsbtError_InvalidMagic value)? invalidMagic, + TResult Function(PsbtError_MissingUtxo value)? missingUtxo, + TResult Function(PsbtError_InvalidSeparator value)? invalidSeparator, + TResult Function(PsbtError_PsbtUtxoOutOfBounds value)? psbtUtxoOutOfBounds, + TResult Function(PsbtError_InvalidKey value)? invalidKey, + TResult Function(PsbtError_InvalidProprietaryKey value)? + invalidProprietaryKey, + TResult Function(PsbtError_DuplicateKey value)? duplicateKey, + TResult Function(PsbtError_UnsignedTxHasScriptSigs value)? + unsignedTxHasScriptSigs, + TResult Function(PsbtError_UnsignedTxHasScriptWitnesses value)? + unsignedTxHasScriptWitnesses, + TResult Function(PsbtError_MustHaveUnsignedTx value)? mustHaveUnsignedTx, + TResult Function(PsbtError_NoMorePairs value)? noMorePairs, + TResult Function(PsbtError_UnexpectedUnsignedTx value)? + unexpectedUnsignedTx, + TResult Function(PsbtError_NonStandardSighashType value)? + nonStandardSighashType, + TResult Function(PsbtError_InvalidHash value)? invalidHash, + TResult Function(PsbtError_InvalidPreimageHashPair value)? + invalidPreimageHashPair, + TResult Function(PsbtError_CombineInconsistentKeySources value)? + combineInconsistentKeySources, + TResult Function(PsbtError_ConsensusEncoding value)? consensusEncoding, + TResult Function(PsbtError_NegativeFee value)? negativeFee, + TResult Function(PsbtError_FeeOverflow value)? feeOverflow, + TResult Function(PsbtError_InvalidPublicKey value)? invalidPublicKey, + TResult Function(PsbtError_InvalidSecp256k1PublicKey value)? + invalidSecp256K1PublicKey, + TResult Function(PsbtError_InvalidXOnlyPublicKey value)? + invalidXOnlyPublicKey, + TResult Function(PsbtError_InvalidEcdsaSignature value)? + invalidEcdsaSignature, + TResult Function(PsbtError_InvalidTaprootSignature value)? + invalidTaprootSignature, + TResult Function(PsbtError_InvalidControlBlock value)? invalidControlBlock, + TResult Function(PsbtError_InvalidLeafVersion value)? invalidLeafVersion, + TResult Function(PsbtError_Taproot value)? taproot, + TResult Function(PsbtError_TapTree value)? tapTree, + TResult Function(PsbtError_XPubKey value)? xPubKey, + TResult Function(PsbtError_Version value)? version, + TResult Function(PsbtError_PartialDataConsumption value)? + partialDataConsumption, + TResult Function(PsbtError_Io value)? io, + TResult Function(PsbtError_OtherPsbtErr value)? otherPsbtErr, + required TResult orElse(), + }) { + if (otherPsbtErr != null) { + return otherPsbtErr(this); + } + return orElse(); + } +} + +abstract class PsbtError_OtherPsbtErr extends PsbtError { + const factory PsbtError_OtherPsbtErr() = _$PsbtError_OtherPsbtErrImpl; + const PsbtError_OtherPsbtErr._() : super._(); +} + +/// @nodoc +mixin _$PsbtParseError { + String get errorMessage => throw _privateConstructorUsedError; + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) psbtEncoding, + required TResult Function(String errorMessage) base64Encoding, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? psbtEncoding, + TResult? Function(String errorMessage)? base64Encoding, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? psbtEncoding, + TResult Function(String errorMessage)? base64Encoding, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(PsbtParseError_PsbtEncoding value) psbtEncoding, + required TResult Function(PsbtParseError_Base64Encoding value) + base64Encoding, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PsbtParseError_PsbtEncoding value)? psbtEncoding, + TResult? Function(PsbtParseError_Base64Encoding value)? base64Encoding, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PsbtParseError_PsbtEncoding value)? psbtEncoding, + TResult Function(PsbtParseError_Base64Encoding value)? base64Encoding, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + + @JsonKey(ignore: true) + $PsbtParseErrorCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $PsbtParseErrorCopyWith<$Res> { + factory $PsbtParseErrorCopyWith( + PsbtParseError value, $Res Function(PsbtParseError) then) = + _$PsbtParseErrorCopyWithImpl<$Res, PsbtParseError>; + @useResult + $Res call({String errorMessage}); +} + +/// @nodoc +class _$PsbtParseErrorCopyWithImpl<$Res, $Val extends PsbtParseError> + implements $PsbtParseErrorCopyWith<$Res> { + _$PsbtParseErrorCopyWithImpl(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? errorMessage = null, + }) { + return _then(_value.copyWith( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$PsbtParseError_PsbtEncodingImplCopyWith<$Res> + implements $PsbtParseErrorCopyWith<$Res> { + factory _$$PsbtParseError_PsbtEncodingImplCopyWith( + _$PsbtParseError_PsbtEncodingImpl value, + $Res Function(_$PsbtParseError_PsbtEncodingImpl) then) = + __$$PsbtParseError_PsbtEncodingImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({String errorMessage}); +} + +/// @nodoc +class __$$PsbtParseError_PsbtEncodingImplCopyWithImpl<$Res> + extends _$PsbtParseErrorCopyWithImpl<$Res, + _$PsbtParseError_PsbtEncodingImpl> + implements _$$PsbtParseError_PsbtEncodingImplCopyWith<$Res> { + __$$PsbtParseError_PsbtEncodingImplCopyWithImpl( + _$PsbtParseError_PsbtEncodingImpl _value, + $Res Function(_$PsbtParseError_PsbtEncodingImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? errorMessage = null, + }) { + return _then(_$PsbtParseError_PsbtEncodingImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$PsbtParseError_PsbtEncodingImpl extends PsbtParseError_PsbtEncoding { + const _$PsbtParseError_PsbtEncodingImpl({required this.errorMessage}) + : super._(); + + @override + final String errorMessage; + + @override + String toString() { + return 'PsbtParseError.psbtEncoding(errorMessage: $errorMessage)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PsbtParseError_PsbtEncodingImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); + } + + @override + int get hashCode => Object.hash(runtimeType, errorMessage); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$PsbtParseError_PsbtEncodingImplCopyWith<_$PsbtParseError_PsbtEncodingImpl> + get copyWith => __$$PsbtParseError_PsbtEncodingImplCopyWithImpl< + _$PsbtParseError_PsbtEncodingImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) psbtEncoding, + required TResult Function(String errorMessage) base64Encoding, + }) { + return psbtEncoding(errorMessage); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? psbtEncoding, + TResult? Function(String errorMessage)? base64Encoding, + }) { + return psbtEncoding?.call(errorMessage); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? psbtEncoding, + TResult Function(String errorMessage)? base64Encoding, + required TResult orElse(), + }) { + if (psbtEncoding != null) { + return psbtEncoding(errorMessage); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(PsbtParseError_PsbtEncoding value) psbtEncoding, + required TResult Function(PsbtParseError_Base64Encoding value) + base64Encoding, + }) { + return psbtEncoding(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PsbtParseError_PsbtEncoding value)? psbtEncoding, + TResult? Function(PsbtParseError_Base64Encoding value)? base64Encoding, + }) { + return psbtEncoding?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PsbtParseError_PsbtEncoding value)? psbtEncoding, + TResult Function(PsbtParseError_Base64Encoding value)? base64Encoding, + required TResult orElse(), + }) { + if (psbtEncoding != null) { + return psbtEncoding(this); + } + return orElse(); + } +} + +abstract class PsbtParseError_PsbtEncoding extends PsbtParseError { + const factory PsbtParseError_PsbtEncoding( + {required final String errorMessage}) = _$PsbtParseError_PsbtEncodingImpl; + const PsbtParseError_PsbtEncoding._() : super._(); + + @override + String get errorMessage; + @override + @JsonKey(ignore: true) + _$$PsbtParseError_PsbtEncodingImplCopyWith<_$PsbtParseError_PsbtEncodingImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$PsbtParseError_Base64EncodingImplCopyWith<$Res> + implements $PsbtParseErrorCopyWith<$Res> { + factory _$$PsbtParseError_Base64EncodingImplCopyWith( + _$PsbtParseError_Base64EncodingImpl value, + $Res Function(_$PsbtParseError_Base64EncodingImpl) then) = + __$$PsbtParseError_Base64EncodingImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({String errorMessage}); +} + +/// @nodoc +class __$$PsbtParseError_Base64EncodingImplCopyWithImpl<$Res> + extends _$PsbtParseErrorCopyWithImpl<$Res, + _$PsbtParseError_Base64EncodingImpl> + implements _$$PsbtParseError_Base64EncodingImplCopyWith<$Res> { + __$$PsbtParseError_Base64EncodingImplCopyWithImpl( + _$PsbtParseError_Base64EncodingImpl _value, + $Res Function(_$PsbtParseError_Base64EncodingImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? errorMessage = null, + }) { + return _then(_$PsbtParseError_Base64EncodingImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$PsbtParseError_Base64EncodingImpl + extends PsbtParseError_Base64Encoding { + const _$PsbtParseError_Base64EncodingImpl({required this.errorMessage}) + : super._(); + + @override + final String errorMessage; + + @override + String toString() { + return 'PsbtParseError.base64Encoding(errorMessage: $errorMessage)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PsbtParseError_Base64EncodingImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); + } + + @override + int get hashCode => Object.hash(runtimeType, errorMessage); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$PsbtParseError_Base64EncodingImplCopyWith< + _$PsbtParseError_Base64EncodingImpl> + get copyWith => __$$PsbtParseError_Base64EncodingImplCopyWithImpl< + _$PsbtParseError_Base64EncodingImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String errorMessage) psbtEncoding, + required TResult Function(String errorMessage) base64Encoding, + }) { + return base64Encoding(errorMessage); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String errorMessage)? psbtEncoding, + TResult? Function(String errorMessage)? base64Encoding, + }) { + return base64Encoding?.call(errorMessage); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String errorMessage)? psbtEncoding, + TResult Function(String errorMessage)? base64Encoding, + required TResult orElse(), + }) { + if (base64Encoding != null) { + return base64Encoding(errorMessage); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(PsbtParseError_PsbtEncoding value) psbtEncoding, + required TResult Function(PsbtParseError_Base64Encoding value) + base64Encoding, + }) { + return base64Encoding(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PsbtParseError_PsbtEncoding value)? psbtEncoding, + TResult? Function(PsbtParseError_Base64Encoding value)? base64Encoding, + }) { + return base64Encoding?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PsbtParseError_PsbtEncoding value)? psbtEncoding, + TResult Function(PsbtParseError_Base64Encoding value)? base64Encoding, + required TResult orElse(), + }) { + if (base64Encoding != null) { + return base64Encoding(this); + } + return orElse(); + } +} + +abstract class PsbtParseError_Base64Encoding extends PsbtParseError { + const factory PsbtParseError_Base64Encoding( + {required final String errorMessage}) = + _$PsbtParseError_Base64EncodingImpl; + const PsbtParseError_Base64Encoding._() : super._(); + + @override + String get errorMessage; + @override + @JsonKey(ignore: true) + _$$PsbtParseError_Base64EncodingImplCopyWith< + _$PsbtParseError_Base64EncodingImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +mixin _$SignerError { + @optionalTypeArgs + TResult when({ + required TResult Function() missingKey, + required TResult Function() invalidKey, + required TResult Function() userCanceled, + required TResult Function() inputIndexOutOfRange, + required TResult Function() missingNonWitnessUtxo, + required TResult Function() invalidNonWitnessUtxo, + required TResult Function() missingWitnessUtxo, + required TResult Function() missingWitnessScript, + required TResult Function() missingHdKeypath, + required TResult Function() nonStandardSighash, + required TResult Function() invalidSighash, + required TResult Function(String errorMessage) sighashP2Wpkh, + required TResult Function(String errorMessage) sighashTaproot, + required TResult Function(String errorMessage) txInputsIndexError, + required TResult Function(String errorMessage) miniscriptPsbt, + required TResult Function(String errorMessage) external_, + required TResult Function(String errorMessage) psbt, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? missingKey, + TResult? Function()? invalidKey, + TResult? Function()? userCanceled, + TResult? Function()? inputIndexOutOfRange, + TResult? Function()? missingNonWitnessUtxo, + TResult? Function()? invalidNonWitnessUtxo, + TResult? Function()? missingWitnessUtxo, + TResult? Function()? missingWitnessScript, + TResult? Function()? missingHdKeypath, + TResult? Function()? nonStandardSighash, + TResult? Function()? invalidSighash, + TResult? Function(String errorMessage)? sighashP2Wpkh, + TResult? Function(String errorMessage)? sighashTaproot, + TResult? Function(String errorMessage)? txInputsIndexError, + TResult? Function(String errorMessage)? miniscriptPsbt, + TResult? Function(String errorMessage)? external_, + TResult? Function(String errorMessage)? psbt, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? missingKey, + TResult Function()? invalidKey, + TResult Function()? userCanceled, + TResult Function()? inputIndexOutOfRange, + TResult Function()? missingNonWitnessUtxo, + TResult Function()? invalidNonWitnessUtxo, + TResult Function()? missingWitnessUtxo, + TResult Function()? missingWitnessScript, + TResult Function()? missingHdKeypath, + TResult Function()? nonStandardSighash, + TResult Function()? invalidSighash, + TResult Function(String errorMessage)? sighashP2Wpkh, + TResult Function(String errorMessage)? sighashTaproot, + TResult Function(String errorMessage)? txInputsIndexError, + TResult Function(String errorMessage)? miniscriptPsbt, + TResult Function(String errorMessage)? external_, + TResult Function(String errorMessage)? psbt, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(SignerError_MissingKey value) missingKey, + required TResult Function(SignerError_InvalidKey value) invalidKey, + required TResult Function(SignerError_UserCanceled value) userCanceled, + required TResult Function(SignerError_InputIndexOutOfRange value) + inputIndexOutOfRange, + required TResult Function(SignerError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(SignerError_InvalidNonWitnessUtxo value) + invalidNonWitnessUtxo, + required TResult Function(SignerError_MissingWitnessUtxo value) + missingWitnessUtxo, + required TResult Function(SignerError_MissingWitnessScript value) + missingWitnessScript, + required TResult Function(SignerError_MissingHdKeypath value) + missingHdKeypath, + required TResult Function(SignerError_NonStandardSighash value) + nonStandardSighash, + required TResult Function(SignerError_InvalidSighash value) invalidSighash, + required TResult Function(SignerError_SighashP2wpkh value) sighashP2Wpkh, + required TResult Function(SignerError_SighashTaproot value) sighashTaproot, + required TResult Function(SignerError_TxInputsIndexError value) + txInputsIndexError, + required TResult Function(SignerError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(SignerError_External value) external_, + required TResult Function(SignerError_Psbt value) psbt, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(SignerError_MissingKey value)? missingKey, + TResult? Function(SignerError_InvalidKey value)? invalidKey, + TResult? Function(SignerError_UserCanceled value)? userCanceled, + TResult? Function(SignerError_InputIndexOutOfRange value)? + inputIndexOutOfRange, + TResult? Function(SignerError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(SignerError_InvalidNonWitnessUtxo value)? + invalidNonWitnessUtxo, + TResult? Function(SignerError_MissingWitnessUtxo value)? missingWitnessUtxo, + TResult? Function(SignerError_MissingWitnessScript value)? + missingWitnessScript, + TResult? Function(SignerError_MissingHdKeypath value)? missingHdKeypath, + TResult? Function(SignerError_NonStandardSighash value)? nonStandardSighash, + TResult? Function(SignerError_InvalidSighash value)? invalidSighash, + TResult? Function(SignerError_SighashP2wpkh value)? sighashP2Wpkh, + TResult? Function(SignerError_SighashTaproot value)? sighashTaproot, + TResult? Function(SignerError_TxInputsIndexError value)? txInputsIndexError, + TResult? Function(SignerError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(SignerError_External value)? external_, + TResult? Function(SignerError_Psbt value)? psbt, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(SignerError_MissingKey value)? missingKey, + TResult Function(SignerError_InvalidKey value)? invalidKey, + TResult Function(SignerError_UserCanceled value)? userCanceled, + TResult Function(SignerError_InputIndexOutOfRange value)? + inputIndexOutOfRange, + TResult Function(SignerError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(SignerError_InvalidNonWitnessUtxo value)? + invalidNonWitnessUtxo, + TResult Function(SignerError_MissingWitnessUtxo value)? missingWitnessUtxo, + TResult Function(SignerError_MissingWitnessScript value)? + missingWitnessScript, + TResult Function(SignerError_MissingHdKeypath value)? missingHdKeypath, + TResult Function(SignerError_NonStandardSighash value)? nonStandardSighash, + TResult Function(SignerError_InvalidSighash value)? invalidSighash, + TResult Function(SignerError_SighashP2wpkh value)? sighashP2Wpkh, + TResult Function(SignerError_SighashTaproot value)? sighashTaproot, + TResult Function(SignerError_TxInputsIndexError value)? txInputsIndexError, + TResult Function(SignerError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(SignerError_External value)? external_, + TResult Function(SignerError_Psbt value)? psbt, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $SignerErrorCopyWith<$Res> { + factory $SignerErrorCopyWith( + SignerError value, $Res Function(SignerError) then) = + _$SignerErrorCopyWithImpl<$Res, SignerError>; +} + +/// @nodoc +class _$SignerErrorCopyWithImpl<$Res, $Val extends SignerError> + implements $SignerErrorCopyWith<$Res> { + _$SignerErrorCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; +} + +/// @nodoc +abstract class _$$SignerError_MissingKeyImplCopyWith<$Res> { + factory _$$SignerError_MissingKeyImplCopyWith( + _$SignerError_MissingKeyImpl value, + $Res Function(_$SignerError_MissingKeyImpl) then) = + __$$SignerError_MissingKeyImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$SignerError_MissingKeyImplCopyWithImpl<$Res> + extends _$SignerErrorCopyWithImpl<$Res, _$SignerError_MissingKeyImpl> + implements _$$SignerError_MissingKeyImplCopyWith<$Res> { + __$$SignerError_MissingKeyImplCopyWithImpl( + _$SignerError_MissingKeyImpl _value, + $Res Function(_$SignerError_MissingKeyImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$SignerError_MissingKeyImpl extends SignerError_MissingKey { + const _$SignerError_MissingKeyImpl() : super._(); + + @override + String toString() { + return 'SignerError.missingKey()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$SignerError_MissingKeyImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() missingKey, + required TResult Function() invalidKey, + required TResult Function() userCanceled, + required TResult Function() inputIndexOutOfRange, + required TResult Function() missingNonWitnessUtxo, + required TResult Function() invalidNonWitnessUtxo, + required TResult Function() missingWitnessUtxo, + required TResult Function() missingWitnessScript, + required TResult Function() missingHdKeypath, + required TResult Function() nonStandardSighash, + required TResult Function() invalidSighash, + required TResult Function(String errorMessage) sighashP2Wpkh, + required TResult Function(String errorMessage) sighashTaproot, + required TResult Function(String errorMessage) txInputsIndexError, + required TResult Function(String errorMessage) miniscriptPsbt, + required TResult Function(String errorMessage) external_, + required TResult Function(String errorMessage) psbt, + }) { + return missingKey(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? missingKey, + TResult? Function()? invalidKey, + TResult? Function()? userCanceled, + TResult? Function()? inputIndexOutOfRange, + TResult? Function()? missingNonWitnessUtxo, + TResult? Function()? invalidNonWitnessUtxo, + TResult? Function()? missingWitnessUtxo, + TResult? Function()? missingWitnessScript, + TResult? Function()? missingHdKeypath, + TResult? Function()? nonStandardSighash, + TResult? Function()? invalidSighash, + TResult? Function(String errorMessage)? sighashP2Wpkh, + TResult? Function(String errorMessage)? sighashTaproot, + TResult? Function(String errorMessage)? txInputsIndexError, + TResult? Function(String errorMessage)? miniscriptPsbt, + TResult? Function(String errorMessage)? external_, + TResult? Function(String errorMessage)? psbt, + }) { + return missingKey?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? missingKey, + TResult Function()? invalidKey, + TResult Function()? userCanceled, + TResult Function()? inputIndexOutOfRange, + TResult Function()? missingNonWitnessUtxo, + TResult Function()? invalidNonWitnessUtxo, + TResult Function()? missingWitnessUtxo, + TResult Function()? missingWitnessScript, + TResult Function()? missingHdKeypath, + TResult Function()? nonStandardSighash, + TResult Function()? invalidSighash, + TResult Function(String errorMessage)? sighashP2Wpkh, + TResult Function(String errorMessage)? sighashTaproot, + TResult Function(String errorMessage)? txInputsIndexError, + TResult Function(String errorMessage)? miniscriptPsbt, + TResult Function(String errorMessage)? external_, + TResult Function(String errorMessage)? psbt, + required TResult orElse(), + }) { + if (missingKey != null) { + return missingKey(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(SignerError_MissingKey value) missingKey, + required TResult Function(SignerError_InvalidKey value) invalidKey, + required TResult Function(SignerError_UserCanceled value) userCanceled, + required TResult Function(SignerError_InputIndexOutOfRange value) + inputIndexOutOfRange, + required TResult Function(SignerError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(SignerError_InvalidNonWitnessUtxo value) + invalidNonWitnessUtxo, + required TResult Function(SignerError_MissingWitnessUtxo value) + missingWitnessUtxo, + required TResult Function(SignerError_MissingWitnessScript value) + missingWitnessScript, + required TResult Function(SignerError_MissingHdKeypath value) + missingHdKeypath, + required TResult Function(SignerError_NonStandardSighash value) + nonStandardSighash, + required TResult Function(SignerError_InvalidSighash value) invalidSighash, + required TResult Function(SignerError_SighashP2wpkh value) sighashP2Wpkh, + required TResult Function(SignerError_SighashTaproot value) sighashTaproot, + required TResult Function(SignerError_TxInputsIndexError value) + txInputsIndexError, + required TResult Function(SignerError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(SignerError_External value) external_, + required TResult Function(SignerError_Psbt value) psbt, + }) { + return missingKey(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(SignerError_MissingKey value)? missingKey, + TResult? Function(SignerError_InvalidKey value)? invalidKey, + TResult? Function(SignerError_UserCanceled value)? userCanceled, + TResult? Function(SignerError_InputIndexOutOfRange value)? + inputIndexOutOfRange, + TResult? Function(SignerError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(SignerError_InvalidNonWitnessUtxo value)? + invalidNonWitnessUtxo, + TResult? Function(SignerError_MissingWitnessUtxo value)? missingWitnessUtxo, + TResult? Function(SignerError_MissingWitnessScript value)? + missingWitnessScript, + TResult? Function(SignerError_MissingHdKeypath value)? missingHdKeypath, + TResult? Function(SignerError_NonStandardSighash value)? nonStandardSighash, + TResult? Function(SignerError_InvalidSighash value)? invalidSighash, + TResult? Function(SignerError_SighashP2wpkh value)? sighashP2Wpkh, + TResult? Function(SignerError_SighashTaproot value)? sighashTaproot, + TResult? Function(SignerError_TxInputsIndexError value)? txInputsIndexError, + TResult? Function(SignerError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(SignerError_External value)? external_, + TResult? Function(SignerError_Psbt value)? psbt, + }) { + return missingKey?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(SignerError_MissingKey value)? missingKey, + TResult Function(SignerError_InvalidKey value)? invalidKey, + TResult Function(SignerError_UserCanceled value)? userCanceled, + TResult Function(SignerError_InputIndexOutOfRange value)? + inputIndexOutOfRange, + TResult Function(SignerError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(SignerError_InvalidNonWitnessUtxo value)? + invalidNonWitnessUtxo, + TResult Function(SignerError_MissingWitnessUtxo value)? missingWitnessUtxo, + TResult Function(SignerError_MissingWitnessScript value)? + missingWitnessScript, + TResult Function(SignerError_MissingHdKeypath value)? missingHdKeypath, + TResult Function(SignerError_NonStandardSighash value)? nonStandardSighash, + TResult Function(SignerError_InvalidSighash value)? invalidSighash, + TResult Function(SignerError_SighashP2wpkh value)? sighashP2Wpkh, + TResult Function(SignerError_SighashTaproot value)? sighashTaproot, + TResult Function(SignerError_TxInputsIndexError value)? txInputsIndexError, + TResult Function(SignerError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(SignerError_External value)? external_, + TResult Function(SignerError_Psbt value)? psbt, + required TResult orElse(), + }) { + if (missingKey != null) { + return missingKey(this); + } + return orElse(); + } +} + +abstract class SignerError_MissingKey extends SignerError { + const factory SignerError_MissingKey() = _$SignerError_MissingKeyImpl; + const SignerError_MissingKey._() : super._(); +} + +/// @nodoc +abstract class _$$SignerError_InvalidKeyImplCopyWith<$Res> { + factory _$$SignerError_InvalidKeyImplCopyWith( + _$SignerError_InvalidKeyImpl value, + $Res Function(_$SignerError_InvalidKeyImpl) then) = + __$$SignerError_InvalidKeyImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$SignerError_InvalidKeyImplCopyWithImpl<$Res> + extends _$SignerErrorCopyWithImpl<$Res, _$SignerError_InvalidKeyImpl> + implements _$$SignerError_InvalidKeyImplCopyWith<$Res> { + __$$SignerError_InvalidKeyImplCopyWithImpl( + _$SignerError_InvalidKeyImpl _value, + $Res Function(_$SignerError_InvalidKeyImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$SignerError_InvalidKeyImpl extends SignerError_InvalidKey { + const _$SignerError_InvalidKeyImpl() : super._(); + + @override + String toString() { + return 'SignerError.invalidKey()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$SignerError_InvalidKeyImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() missingKey, + required TResult Function() invalidKey, + required TResult Function() userCanceled, + required TResult Function() inputIndexOutOfRange, + required TResult Function() missingNonWitnessUtxo, + required TResult Function() invalidNonWitnessUtxo, + required TResult Function() missingWitnessUtxo, + required TResult Function() missingWitnessScript, + required TResult Function() missingHdKeypath, + required TResult Function() nonStandardSighash, + required TResult Function() invalidSighash, + required TResult Function(String errorMessage) sighashP2Wpkh, + required TResult Function(String errorMessage) sighashTaproot, + required TResult Function(String errorMessage) txInputsIndexError, + required TResult Function(String errorMessage) miniscriptPsbt, + required TResult Function(String errorMessage) external_, + required TResult Function(String errorMessage) psbt, + }) { + return invalidKey(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? missingKey, + TResult? Function()? invalidKey, + TResult? Function()? userCanceled, + TResult? Function()? inputIndexOutOfRange, + TResult? Function()? missingNonWitnessUtxo, + TResult? Function()? invalidNonWitnessUtxo, + TResult? Function()? missingWitnessUtxo, + TResult? Function()? missingWitnessScript, + TResult? Function()? missingHdKeypath, + TResult? Function()? nonStandardSighash, + TResult? Function()? invalidSighash, + TResult? Function(String errorMessage)? sighashP2Wpkh, + TResult? Function(String errorMessage)? sighashTaproot, + TResult? Function(String errorMessage)? txInputsIndexError, + TResult? Function(String errorMessage)? miniscriptPsbt, + TResult? Function(String errorMessage)? external_, + TResult? Function(String errorMessage)? psbt, + }) { + return invalidKey?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? missingKey, + TResult Function()? invalidKey, + TResult Function()? userCanceled, + TResult Function()? inputIndexOutOfRange, + TResult Function()? missingNonWitnessUtxo, + TResult Function()? invalidNonWitnessUtxo, + TResult Function()? missingWitnessUtxo, + TResult Function()? missingWitnessScript, + TResult Function()? missingHdKeypath, + TResult Function()? nonStandardSighash, + TResult Function()? invalidSighash, + TResult Function(String errorMessage)? sighashP2Wpkh, + TResult Function(String errorMessage)? sighashTaproot, + TResult Function(String errorMessage)? txInputsIndexError, + TResult Function(String errorMessage)? miniscriptPsbt, + TResult Function(String errorMessage)? external_, + TResult Function(String errorMessage)? psbt, + required TResult orElse(), + }) { + if (invalidKey != null) { + return invalidKey(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(SignerError_MissingKey value) missingKey, + required TResult Function(SignerError_InvalidKey value) invalidKey, + required TResult Function(SignerError_UserCanceled value) userCanceled, + required TResult Function(SignerError_InputIndexOutOfRange value) + inputIndexOutOfRange, + required TResult Function(SignerError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(SignerError_InvalidNonWitnessUtxo value) + invalidNonWitnessUtxo, + required TResult Function(SignerError_MissingWitnessUtxo value) + missingWitnessUtxo, + required TResult Function(SignerError_MissingWitnessScript value) + missingWitnessScript, + required TResult Function(SignerError_MissingHdKeypath value) + missingHdKeypath, + required TResult Function(SignerError_NonStandardSighash value) + nonStandardSighash, + required TResult Function(SignerError_InvalidSighash value) invalidSighash, + required TResult Function(SignerError_SighashP2wpkh value) sighashP2Wpkh, + required TResult Function(SignerError_SighashTaproot value) sighashTaproot, + required TResult Function(SignerError_TxInputsIndexError value) + txInputsIndexError, + required TResult Function(SignerError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(SignerError_External value) external_, + required TResult Function(SignerError_Psbt value) psbt, + }) { + return invalidKey(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(SignerError_MissingKey value)? missingKey, + TResult? Function(SignerError_InvalidKey value)? invalidKey, + TResult? Function(SignerError_UserCanceled value)? userCanceled, + TResult? Function(SignerError_InputIndexOutOfRange value)? + inputIndexOutOfRange, + TResult? Function(SignerError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(SignerError_InvalidNonWitnessUtxo value)? + invalidNonWitnessUtxo, + TResult? Function(SignerError_MissingWitnessUtxo value)? missingWitnessUtxo, + TResult? Function(SignerError_MissingWitnessScript value)? + missingWitnessScript, + TResult? Function(SignerError_MissingHdKeypath value)? missingHdKeypath, + TResult? Function(SignerError_NonStandardSighash value)? nonStandardSighash, + TResult? Function(SignerError_InvalidSighash value)? invalidSighash, + TResult? Function(SignerError_SighashP2wpkh value)? sighashP2Wpkh, + TResult? Function(SignerError_SighashTaproot value)? sighashTaproot, + TResult? Function(SignerError_TxInputsIndexError value)? txInputsIndexError, + TResult? Function(SignerError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(SignerError_External value)? external_, + TResult? Function(SignerError_Psbt value)? psbt, + }) { + return invalidKey?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(SignerError_MissingKey value)? missingKey, + TResult Function(SignerError_InvalidKey value)? invalidKey, + TResult Function(SignerError_UserCanceled value)? userCanceled, + TResult Function(SignerError_InputIndexOutOfRange value)? + inputIndexOutOfRange, + TResult Function(SignerError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(SignerError_InvalidNonWitnessUtxo value)? + invalidNonWitnessUtxo, + TResult Function(SignerError_MissingWitnessUtxo value)? missingWitnessUtxo, + TResult Function(SignerError_MissingWitnessScript value)? + missingWitnessScript, + TResult Function(SignerError_MissingHdKeypath value)? missingHdKeypath, + TResult Function(SignerError_NonStandardSighash value)? nonStandardSighash, + TResult Function(SignerError_InvalidSighash value)? invalidSighash, + TResult Function(SignerError_SighashP2wpkh value)? sighashP2Wpkh, + TResult Function(SignerError_SighashTaproot value)? sighashTaproot, + TResult Function(SignerError_TxInputsIndexError value)? txInputsIndexError, + TResult Function(SignerError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(SignerError_External value)? external_, + TResult Function(SignerError_Psbt value)? psbt, + required TResult orElse(), + }) { + if (invalidKey != null) { + return invalidKey(this); + } + return orElse(); + } +} + +abstract class SignerError_InvalidKey extends SignerError { + const factory SignerError_InvalidKey() = _$SignerError_InvalidKeyImpl; + const SignerError_InvalidKey._() : super._(); +} + +/// @nodoc +abstract class _$$SignerError_UserCanceledImplCopyWith<$Res> { + factory _$$SignerError_UserCanceledImplCopyWith( + _$SignerError_UserCanceledImpl value, + $Res Function(_$SignerError_UserCanceledImpl) then) = + __$$SignerError_UserCanceledImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$SignerError_UserCanceledImplCopyWithImpl<$Res> + extends _$SignerErrorCopyWithImpl<$Res, _$SignerError_UserCanceledImpl> + implements _$$SignerError_UserCanceledImplCopyWith<$Res> { + __$$SignerError_UserCanceledImplCopyWithImpl( + _$SignerError_UserCanceledImpl _value, + $Res Function(_$SignerError_UserCanceledImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$SignerError_UserCanceledImpl extends SignerError_UserCanceled { + const _$SignerError_UserCanceledImpl() : super._(); + + @override + String toString() { + return 'SignerError.userCanceled()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$SignerError_UserCanceledImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() missingKey, + required TResult Function() invalidKey, + required TResult Function() userCanceled, + required TResult Function() inputIndexOutOfRange, + required TResult Function() missingNonWitnessUtxo, + required TResult Function() invalidNonWitnessUtxo, + required TResult Function() missingWitnessUtxo, + required TResult Function() missingWitnessScript, + required TResult Function() missingHdKeypath, + required TResult Function() nonStandardSighash, + required TResult Function() invalidSighash, + required TResult Function(String errorMessage) sighashP2Wpkh, + required TResult Function(String errorMessage) sighashTaproot, + required TResult Function(String errorMessage) txInputsIndexError, + required TResult Function(String errorMessage) miniscriptPsbt, + required TResult Function(String errorMessage) external_, + required TResult Function(String errorMessage) psbt, + }) { + return userCanceled(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? missingKey, + TResult? Function()? invalidKey, + TResult? Function()? userCanceled, + TResult? Function()? inputIndexOutOfRange, + TResult? Function()? missingNonWitnessUtxo, + TResult? Function()? invalidNonWitnessUtxo, + TResult? Function()? missingWitnessUtxo, + TResult? Function()? missingWitnessScript, + TResult? Function()? missingHdKeypath, + TResult? Function()? nonStandardSighash, + TResult? Function()? invalidSighash, + TResult? Function(String errorMessage)? sighashP2Wpkh, + TResult? Function(String errorMessage)? sighashTaproot, + TResult? Function(String errorMessage)? txInputsIndexError, + TResult? Function(String errorMessage)? miniscriptPsbt, + TResult? Function(String errorMessage)? external_, + TResult? Function(String errorMessage)? psbt, + }) { + return userCanceled?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? missingKey, + TResult Function()? invalidKey, + TResult Function()? userCanceled, + TResult Function()? inputIndexOutOfRange, + TResult Function()? missingNonWitnessUtxo, + TResult Function()? invalidNonWitnessUtxo, + TResult Function()? missingWitnessUtxo, + TResult Function()? missingWitnessScript, + TResult Function()? missingHdKeypath, + TResult Function()? nonStandardSighash, + TResult Function()? invalidSighash, + TResult Function(String errorMessage)? sighashP2Wpkh, + TResult Function(String errorMessage)? sighashTaproot, + TResult Function(String errorMessage)? txInputsIndexError, + TResult Function(String errorMessage)? miniscriptPsbt, + TResult Function(String errorMessage)? external_, + TResult Function(String errorMessage)? psbt, + required TResult orElse(), + }) { + if (userCanceled != null) { + return userCanceled(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(SignerError_MissingKey value) missingKey, + required TResult Function(SignerError_InvalidKey value) invalidKey, + required TResult Function(SignerError_UserCanceled value) userCanceled, + required TResult Function(SignerError_InputIndexOutOfRange value) + inputIndexOutOfRange, + required TResult Function(SignerError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(SignerError_InvalidNonWitnessUtxo value) + invalidNonWitnessUtxo, + required TResult Function(SignerError_MissingWitnessUtxo value) + missingWitnessUtxo, + required TResult Function(SignerError_MissingWitnessScript value) + missingWitnessScript, + required TResult Function(SignerError_MissingHdKeypath value) + missingHdKeypath, + required TResult Function(SignerError_NonStandardSighash value) + nonStandardSighash, + required TResult Function(SignerError_InvalidSighash value) invalidSighash, + required TResult Function(SignerError_SighashP2wpkh value) sighashP2Wpkh, + required TResult Function(SignerError_SighashTaproot value) sighashTaproot, + required TResult Function(SignerError_TxInputsIndexError value) + txInputsIndexError, + required TResult Function(SignerError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(SignerError_External value) external_, + required TResult Function(SignerError_Psbt value) psbt, + }) { + return userCanceled(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(SignerError_MissingKey value)? missingKey, + TResult? Function(SignerError_InvalidKey value)? invalidKey, + TResult? Function(SignerError_UserCanceled value)? userCanceled, + TResult? Function(SignerError_InputIndexOutOfRange value)? + inputIndexOutOfRange, + TResult? Function(SignerError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(SignerError_InvalidNonWitnessUtxo value)? + invalidNonWitnessUtxo, + TResult? Function(SignerError_MissingWitnessUtxo value)? missingWitnessUtxo, + TResult? Function(SignerError_MissingWitnessScript value)? + missingWitnessScript, + TResult? Function(SignerError_MissingHdKeypath value)? missingHdKeypath, + TResult? Function(SignerError_NonStandardSighash value)? nonStandardSighash, + TResult? Function(SignerError_InvalidSighash value)? invalidSighash, + TResult? Function(SignerError_SighashP2wpkh value)? sighashP2Wpkh, + TResult? Function(SignerError_SighashTaproot value)? sighashTaproot, + TResult? Function(SignerError_TxInputsIndexError value)? txInputsIndexError, + TResult? Function(SignerError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(SignerError_External value)? external_, + TResult? Function(SignerError_Psbt value)? psbt, + }) { + return userCanceled?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(SignerError_MissingKey value)? missingKey, + TResult Function(SignerError_InvalidKey value)? invalidKey, + TResult Function(SignerError_UserCanceled value)? userCanceled, + TResult Function(SignerError_InputIndexOutOfRange value)? + inputIndexOutOfRange, + TResult Function(SignerError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(SignerError_InvalidNonWitnessUtxo value)? + invalidNonWitnessUtxo, + TResult Function(SignerError_MissingWitnessUtxo value)? missingWitnessUtxo, + TResult Function(SignerError_MissingWitnessScript value)? + missingWitnessScript, + TResult Function(SignerError_MissingHdKeypath value)? missingHdKeypath, + TResult Function(SignerError_NonStandardSighash value)? nonStandardSighash, + TResult Function(SignerError_InvalidSighash value)? invalidSighash, + TResult Function(SignerError_SighashP2wpkh value)? sighashP2Wpkh, + TResult Function(SignerError_SighashTaproot value)? sighashTaproot, + TResult Function(SignerError_TxInputsIndexError value)? txInputsIndexError, + TResult Function(SignerError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(SignerError_External value)? external_, + TResult Function(SignerError_Psbt value)? psbt, + required TResult orElse(), + }) { + if (userCanceled != null) { + return userCanceled(this); + } + return orElse(); + } +} + +abstract class SignerError_UserCanceled extends SignerError { + const factory SignerError_UserCanceled() = _$SignerError_UserCanceledImpl; + const SignerError_UserCanceled._() : super._(); +} + +/// @nodoc +abstract class _$$SignerError_InputIndexOutOfRangeImplCopyWith<$Res> { + factory _$$SignerError_InputIndexOutOfRangeImplCopyWith( + _$SignerError_InputIndexOutOfRangeImpl value, + $Res Function(_$SignerError_InputIndexOutOfRangeImpl) then) = + __$$SignerError_InputIndexOutOfRangeImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$SignerError_InputIndexOutOfRangeImplCopyWithImpl<$Res> + extends _$SignerErrorCopyWithImpl<$Res, + _$SignerError_InputIndexOutOfRangeImpl> + implements _$$SignerError_InputIndexOutOfRangeImplCopyWith<$Res> { + __$$SignerError_InputIndexOutOfRangeImplCopyWithImpl( + _$SignerError_InputIndexOutOfRangeImpl _value, + $Res Function(_$SignerError_InputIndexOutOfRangeImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$SignerError_InputIndexOutOfRangeImpl + extends SignerError_InputIndexOutOfRange { + const _$SignerError_InputIndexOutOfRangeImpl() : super._(); + + @override + String toString() { + return 'SignerError.inputIndexOutOfRange()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$SignerError_InputIndexOutOfRangeImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() missingKey, + required TResult Function() invalidKey, + required TResult Function() userCanceled, + required TResult Function() inputIndexOutOfRange, + required TResult Function() missingNonWitnessUtxo, + required TResult Function() invalidNonWitnessUtxo, + required TResult Function() missingWitnessUtxo, + required TResult Function() missingWitnessScript, + required TResult Function() missingHdKeypath, + required TResult Function() nonStandardSighash, + required TResult Function() invalidSighash, + required TResult Function(String errorMessage) sighashP2Wpkh, + required TResult Function(String errorMessage) sighashTaproot, + required TResult Function(String errorMessage) txInputsIndexError, + required TResult Function(String errorMessage) miniscriptPsbt, + required TResult Function(String errorMessage) external_, + required TResult Function(String errorMessage) psbt, + }) { + return inputIndexOutOfRange(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? missingKey, + TResult? Function()? invalidKey, + TResult? Function()? userCanceled, + TResult? Function()? inputIndexOutOfRange, + TResult? Function()? missingNonWitnessUtxo, + TResult? Function()? invalidNonWitnessUtxo, + TResult? Function()? missingWitnessUtxo, + TResult? Function()? missingWitnessScript, + TResult? Function()? missingHdKeypath, + TResult? Function()? nonStandardSighash, + TResult? Function()? invalidSighash, + TResult? Function(String errorMessage)? sighashP2Wpkh, + TResult? Function(String errorMessage)? sighashTaproot, + TResult? Function(String errorMessage)? txInputsIndexError, + TResult? Function(String errorMessage)? miniscriptPsbt, + TResult? Function(String errorMessage)? external_, + TResult? Function(String errorMessage)? psbt, + }) { + return inputIndexOutOfRange?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? missingKey, + TResult Function()? invalidKey, + TResult Function()? userCanceled, + TResult Function()? inputIndexOutOfRange, + TResult Function()? missingNonWitnessUtxo, + TResult Function()? invalidNonWitnessUtxo, + TResult Function()? missingWitnessUtxo, + TResult Function()? missingWitnessScript, + TResult Function()? missingHdKeypath, + TResult Function()? nonStandardSighash, + TResult Function()? invalidSighash, + TResult Function(String errorMessage)? sighashP2Wpkh, + TResult Function(String errorMessage)? sighashTaproot, + TResult Function(String errorMessage)? txInputsIndexError, + TResult Function(String errorMessage)? miniscriptPsbt, + TResult Function(String errorMessage)? external_, + TResult Function(String errorMessage)? psbt, + required TResult orElse(), + }) { + if (inputIndexOutOfRange != null) { + return inputIndexOutOfRange(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(SignerError_MissingKey value) missingKey, + required TResult Function(SignerError_InvalidKey value) invalidKey, + required TResult Function(SignerError_UserCanceled value) userCanceled, + required TResult Function(SignerError_InputIndexOutOfRange value) + inputIndexOutOfRange, + required TResult Function(SignerError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(SignerError_InvalidNonWitnessUtxo value) + invalidNonWitnessUtxo, + required TResult Function(SignerError_MissingWitnessUtxo value) + missingWitnessUtxo, + required TResult Function(SignerError_MissingWitnessScript value) + missingWitnessScript, + required TResult Function(SignerError_MissingHdKeypath value) + missingHdKeypath, + required TResult Function(SignerError_NonStandardSighash value) + nonStandardSighash, + required TResult Function(SignerError_InvalidSighash value) invalidSighash, + required TResult Function(SignerError_SighashP2wpkh value) sighashP2Wpkh, + required TResult Function(SignerError_SighashTaproot value) sighashTaproot, + required TResult Function(SignerError_TxInputsIndexError value) + txInputsIndexError, + required TResult Function(SignerError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(SignerError_External value) external_, + required TResult Function(SignerError_Psbt value) psbt, + }) { + return inputIndexOutOfRange(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(SignerError_MissingKey value)? missingKey, + TResult? Function(SignerError_InvalidKey value)? invalidKey, + TResult? Function(SignerError_UserCanceled value)? userCanceled, + TResult? Function(SignerError_InputIndexOutOfRange value)? + inputIndexOutOfRange, + TResult? Function(SignerError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(SignerError_InvalidNonWitnessUtxo value)? + invalidNonWitnessUtxo, + TResult? Function(SignerError_MissingWitnessUtxo value)? missingWitnessUtxo, + TResult? Function(SignerError_MissingWitnessScript value)? + missingWitnessScript, + TResult? Function(SignerError_MissingHdKeypath value)? missingHdKeypath, + TResult? Function(SignerError_NonStandardSighash value)? nonStandardSighash, + TResult? Function(SignerError_InvalidSighash value)? invalidSighash, + TResult? Function(SignerError_SighashP2wpkh value)? sighashP2Wpkh, + TResult? Function(SignerError_SighashTaproot value)? sighashTaproot, + TResult? Function(SignerError_TxInputsIndexError value)? txInputsIndexError, + TResult? Function(SignerError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(SignerError_External value)? external_, + TResult? Function(SignerError_Psbt value)? psbt, + }) { + return inputIndexOutOfRange?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(SignerError_MissingKey value)? missingKey, + TResult Function(SignerError_InvalidKey value)? invalidKey, + TResult Function(SignerError_UserCanceled value)? userCanceled, + TResult Function(SignerError_InputIndexOutOfRange value)? + inputIndexOutOfRange, + TResult Function(SignerError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(SignerError_InvalidNonWitnessUtxo value)? + invalidNonWitnessUtxo, + TResult Function(SignerError_MissingWitnessUtxo value)? missingWitnessUtxo, + TResult Function(SignerError_MissingWitnessScript value)? + missingWitnessScript, + TResult Function(SignerError_MissingHdKeypath value)? missingHdKeypath, + TResult Function(SignerError_NonStandardSighash value)? nonStandardSighash, + TResult Function(SignerError_InvalidSighash value)? invalidSighash, + TResult Function(SignerError_SighashP2wpkh value)? sighashP2Wpkh, + TResult Function(SignerError_SighashTaproot value)? sighashTaproot, + TResult Function(SignerError_TxInputsIndexError value)? txInputsIndexError, + TResult Function(SignerError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(SignerError_External value)? external_, + TResult Function(SignerError_Psbt value)? psbt, + required TResult orElse(), + }) { + if (inputIndexOutOfRange != null) { + return inputIndexOutOfRange(this); + } + return orElse(); + } +} + +abstract class SignerError_InputIndexOutOfRange extends SignerError { + const factory SignerError_InputIndexOutOfRange() = + _$SignerError_InputIndexOutOfRangeImpl; + const SignerError_InputIndexOutOfRange._() : super._(); +} + +/// @nodoc +abstract class _$$SignerError_MissingNonWitnessUtxoImplCopyWith<$Res> { + factory _$$SignerError_MissingNonWitnessUtxoImplCopyWith( + _$SignerError_MissingNonWitnessUtxoImpl value, + $Res Function(_$SignerError_MissingNonWitnessUtxoImpl) then) = + __$$SignerError_MissingNonWitnessUtxoImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$SignerError_MissingNonWitnessUtxoImplCopyWithImpl<$Res> + extends _$SignerErrorCopyWithImpl<$Res, + _$SignerError_MissingNonWitnessUtxoImpl> + implements _$$SignerError_MissingNonWitnessUtxoImplCopyWith<$Res> { + __$$SignerError_MissingNonWitnessUtxoImplCopyWithImpl( + _$SignerError_MissingNonWitnessUtxoImpl _value, + $Res Function(_$SignerError_MissingNonWitnessUtxoImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$SignerError_MissingNonWitnessUtxoImpl + extends SignerError_MissingNonWitnessUtxo { + const _$SignerError_MissingNonWitnessUtxoImpl() : super._(); + + @override + String toString() { + return 'SignerError.missingNonWitnessUtxo()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$SignerError_MissingNonWitnessUtxoImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() missingKey, + required TResult Function() invalidKey, + required TResult Function() userCanceled, + required TResult Function() inputIndexOutOfRange, + required TResult Function() missingNonWitnessUtxo, + required TResult Function() invalidNonWitnessUtxo, + required TResult Function() missingWitnessUtxo, + required TResult Function() missingWitnessScript, + required TResult Function() missingHdKeypath, + required TResult Function() nonStandardSighash, + required TResult Function() invalidSighash, + required TResult Function(String errorMessage) sighashP2Wpkh, + required TResult Function(String errorMessage) sighashTaproot, + required TResult Function(String errorMessage) txInputsIndexError, + required TResult Function(String errorMessage) miniscriptPsbt, + required TResult Function(String errorMessage) external_, + required TResult Function(String errorMessage) psbt, + }) { + return missingNonWitnessUtxo(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? missingKey, + TResult? Function()? invalidKey, + TResult? Function()? userCanceled, + TResult? Function()? inputIndexOutOfRange, + TResult? Function()? missingNonWitnessUtxo, + TResult? Function()? invalidNonWitnessUtxo, + TResult? Function()? missingWitnessUtxo, + TResult? Function()? missingWitnessScript, + TResult? Function()? missingHdKeypath, + TResult? Function()? nonStandardSighash, + TResult? Function()? invalidSighash, + TResult? Function(String errorMessage)? sighashP2Wpkh, + TResult? Function(String errorMessage)? sighashTaproot, + TResult? Function(String errorMessage)? txInputsIndexError, + TResult? Function(String errorMessage)? miniscriptPsbt, + TResult? Function(String errorMessage)? external_, + TResult? Function(String errorMessage)? psbt, + }) { + return missingNonWitnessUtxo?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? missingKey, + TResult Function()? invalidKey, + TResult Function()? userCanceled, + TResult Function()? inputIndexOutOfRange, + TResult Function()? missingNonWitnessUtxo, + TResult Function()? invalidNonWitnessUtxo, + TResult Function()? missingWitnessUtxo, + TResult Function()? missingWitnessScript, + TResult Function()? missingHdKeypath, + TResult Function()? nonStandardSighash, + TResult Function()? invalidSighash, + TResult Function(String errorMessage)? sighashP2Wpkh, + TResult Function(String errorMessage)? sighashTaproot, + TResult Function(String errorMessage)? txInputsIndexError, + TResult Function(String errorMessage)? miniscriptPsbt, + TResult Function(String errorMessage)? external_, + TResult Function(String errorMessage)? psbt, + required TResult orElse(), + }) { + if (missingNonWitnessUtxo != null) { + return missingNonWitnessUtxo(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(SignerError_MissingKey value) missingKey, + required TResult Function(SignerError_InvalidKey value) invalidKey, + required TResult Function(SignerError_UserCanceled value) userCanceled, + required TResult Function(SignerError_InputIndexOutOfRange value) + inputIndexOutOfRange, + required TResult Function(SignerError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(SignerError_InvalidNonWitnessUtxo value) + invalidNonWitnessUtxo, + required TResult Function(SignerError_MissingWitnessUtxo value) + missingWitnessUtxo, + required TResult Function(SignerError_MissingWitnessScript value) + missingWitnessScript, + required TResult Function(SignerError_MissingHdKeypath value) + missingHdKeypath, + required TResult Function(SignerError_NonStandardSighash value) + nonStandardSighash, + required TResult Function(SignerError_InvalidSighash value) invalidSighash, + required TResult Function(SignerError_SighashP2wpkh value) sighashP2Wpkh, + required TResult Function(SignerError_SighashTaproot value) sighashTaproot, + required TResult Function(SignerError_TxInputsIndexError value) + txInputsIndexError, + required TResult Function(SignerError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(SignerError_External value) external_, + required TResult Function(SignerError_Psbt value) psbt, + }) { + return missingNonWitnessUtxo(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(SignerError_MissingKey value)? missingKey, + TResult? Function(SignerError_InvalidKey value)? invalidKey, + TResult? Function(SignerError_UserCanceled value)? userCanceled, + TResult? Function(SignerError_InputIndexOutOfRange value)? + inputIndexOutOfRange, + TResult? Function(SignerError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(SignerError_InvalidNonWitnessUtxo value)? + invalidNonWitnessUtxo, + TResult? Function(SignerError_MissingWitnessUtxo value)? missingWitnessUtxo, + TResult? Function(SignerError_MissingWitnessScript value)? + missingWitnessScript, + TResult? Function(SignerError_MissingHdKeypath value)? missingHdKeypath, + TResult? Function(SignerError_NonStandardSighash value)? nonStandardSighash, + TResult? Function(SignerError_InvalidSighash value)? invalidSighash, + TResult? Function(SignerError_SighashP2wpkh value)? sighashP2Wpkh, + TResult? Function(SignerError_SighashTaproot value)? sighashTaproot, + TResult? Function(SignerError_TxInputsIndexError value)? txInputsIndexError, + TResult? Function(SignerError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(SignerError_External value)? external_, + TResult? Function(SignerError_Psbt value)? psbt, + }) { + return missingNonWitnessUtxo?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(SignerError_MissingKey value)? missingKey, + TResult Function(SignerError_InvalidKey value)? invalidKey, + TResult Function(SignerError_UserCanceled value)? userCanceled, + TResult Function(SignerError_InputIndexOutOfRange value)? + inputIndexOutOfRange, + TResult Function(SignerError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(SignerError_InvalidNonWitnessUtxo value)? + invalidNonWitnessUtxo, + TResult Function(SignerError_MissingWitnessUtxo value)? missingWitnessUtxo, + TResult Function(SignerError_MissingWitnessScript value)? + missingWitnessScript, + TResult Function(SignerError_MissingHdKeypath value)? missingHdKeypath, + TResult Function(SignerError_NonStandardSighash value)? nonStandardSighash, + TResult Function(SignerError_InvalidSighash value)? invalidSighash, + TResult Function(SignerError_SighashP2wpkh value)? sighashP2Wpkh, + TResult Function(SignerError_SighashTaproot value)? sighashTaproot, + TResult Function(SignerError_TxInputsIndexError value)? txInputsIndexError, + TResult Function(SignerError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(SignerError_External value)? external_, + TResult Function(SignerError_Psbt value)? psbt, + required TResult orElse(), + }) { + if (missingNonWitnessUtxo != null) { + return missingNonWitnessUtxo(this); + } + return orElse(); + } +} + +abstract class SignerError_MissingNonWitnessUtxo extends SignerError { + const factory SignerError_MissingNonWitnessUtxo() = + _$SignerError_MissingNonWitnessUtxoImpl; + const SignerError_MissingNonWitnessUtxo._() : super._(); +} + +/// @nodoc +abstract class _$$SignerError_InvalidNonWitnessUtxoImplCopyWith<$Res> { + factory _$$SignerError_InvalidNonWitnessUtxoImplCopyWith( + _$SignerError_InvalidNonWitnessUtxoImpl value, + $Res Function(_$SignerError_InvalidNonWitnessUtxoImpl) then) = + __$$SignerError_InvalidNonWitnessUtxoImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$SignerError_InvalidNonWitnessUtxoImplCopyWithImpl<$Res> + extends _$SignerErrorCopyWithImpl<$Res, + _$SignerError_InvalidNonWitnessUtxoImpl> + implements _$$SignerError_InvalidNonWitnessUtxoImplCopyWith<$Res> { + __$$SignerError_InvalidNonWitnessUtxoImplCopyWithImpl( + _$SignerError_InvalidNonWitnessUtxoImpl _value, + $Res Function(_$SignerError_InvalidNonWitnessUtxoImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$SignerError_InvalidNonWitnessUtxoImpl + extends SignerError_InvalidNonWitnessUtxo { + const _$SignerError_InvalidNonWitnessUtxoImpl() : super._(); + + @override + String toString() { + return 'SignerError.invalidNonWitnessUtxo()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$SignerError_InvalidNonWitnessUtxoImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() missingKey, + required TResult Function() invalidKey, + required TResult Function() userCanceled, + required TResult Function() inputIndexOutOfRange, + required TResult Function() missingNonWitnessUtxo, + required TResult Function() invalidNonWitnessUtxo, + required TResult Function() missingWitnessUtxo, + required TResult Function() missingWitnessScript, + required TResult Function() missingHdKeypath, + required TResult Function() nonStandardSighash, + required TResult Function() invalidSighash, + required TResult Function(String errorMessage) sighashP2Wpkh, + required TResult Function(String errorMessage) sighashTaproot, + required TResult Function(String errorMessage) txInputsIndexError, + required TResult Function(String errorMessage) miniscriptPsbt, + required TResult Function(String errorMessage) external_, + required TResult Function(String errorMessage) psbt, + }) { + return invalidNonWitnessUtxo(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? missingKey, + TResult? Function()? invalidKey, + TResult? Function()? userCanceled, + TResult? Function()? inputIndexOutOfRange, + TResult? Function()? missingNonWitnessUtxo, + TResult? Function()? invalidNonWitnessUtxo, + TResult? Function()? missingWitnessUtxo, + TResult? Function()? missingWitnessScript, + TResult? Function()? missingHdKeypath, + TResult? Function()? nonStandardSighash, + TResult? Function()? invalidSighash, + TResult? Function(String errorMessage)? sighashP2Wpkh, + TResult? Function(String errorMessage)? sighashTaproot, + TResult? Function(String errorMessage)? txInputsIndexError, + TResult? Function(String errorMessage)? miniscriptPsbt, + TResult? Function(String errorMessage)? external_, + TResult? Function(String errorMessage)? psbt, + }) { + return invalidNonWitnessUtxo?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? missingKey, + TResult Function()? invalidKey, + TResult Function()? userCanceled, + TResult Function()? inputIndexOutOfRange, + TResult Function()? missingNonWitnessUtxo, + TResult Function()? invalidNonWitnessUtxo, + TResult Function()? missingWitnessUtxo, + TResult Function()? missingWitnessScript, + TResult Function()? missingHdKeypath, + TResult Function()? nonStandardSighash, + TResult Function()? invalidSighash, + TResult Function(String errorMessage)? sighashP2Wpkh, + TResult Function(String errorMessage)? sighashTaproot, + TResult Function(String errorMessage)? txInputsIndexError, + TResult Function(String errorMessage)? miniscriptPsbt, + TResult Function(String errorMessage)? external_, + TResult Function(String errorMessage)? psbt, + required TResult orElse(), + }) { + if (invalidNonWitnessUtxo != null) { + return invalidNonWitnessUtxo(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(SignerError_MissingKey value) missingKey, + required TResult Function(SignerError_InvalidKey value) invalidKey, + required TResult Function(SignerError_UserCanceled value) userCanceled, + required TResult Function(SignerError_InputIndexOutOfRange value) + inputIndexOutOfRange, + required TResult Function(SignerError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(SignerError_InvalidNonWitnessUtxo value) + invalidNonWitnessUtxo, + required TResult Function(SignerError_MissingWitnessUtxo value) + missingWitnessUtxo, + required TResult Function(SignerError_MissingWitnessScript value) + missingWitnessScript, + required TResult Function(SignerError_MissingHdKeypath value) + missingHdKeypath, + required TResult Function(SignerError_NonStandardSighash value) + nonStandardSighash, + required TResult Function(SignerError_InvalidSighash value) invalidSighash, + required TResult Function(SignerError_SighashP2wpkh value) sighashP2Wpkh, + required TResult Function(SignerError_SighashTaproot value) sighashTaproot, + required TResult Function(SignerError_TxInputsIndexError value) + txInputsIndexError, + required TResult Function(SignerError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(SignerError_External value) external_, + required TResult Function(SignerError_Psbt value) psbt, + }) { + return invalidNonWitnessUtxo(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(SignerError_MissingKey value)? missingKey, + TResult? Function(SignerError_InvalidKey value)? invalidKey, + TResult? Function(SignerError_UserCanceled value)? userCanceled, + TResult? Function(SignerError_InputIndexOutOfRange value)? + inputIndexOutOfRange, + TResult? Function(SignerError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(SignerError_InvalidNonWitnessUtxo value)? + invalidNonWitnessUtxo, + TResult? Function(SignerError_MissingWitnessUtxo value)? missingWitnessUtxo, + TResult? Function(SignerError_MissingWitnessScript value)? + missingWitnessScript, + TResult? Function(SignerError_MissingHdKeypath value)? missingHdKeypath, + TResult? Function(SignerError_NonStandardSighash value)? nonStandardSighash, + TResult? Function(SignerError_InvalidSighash value)? invalidSighash, + TResult? Function(SignerError_SighashP2wpkh value)? sighashP2Wpkh, + TResult? Function(SignerError_SighashTaproot value)? sighashTaproot, + TResult? Function(SignerError_TxInputsIndexError value)? txInputsIndexError, + TResult? Function(SignerError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(SignerError_External value)? external_, + TResult? Function(SignerError_Psbt value)? psbt, + }) { + return invalidNonWitnessUtxo?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(SignerError_MissingKey value)? missingKey, + TResult Function(SignerError_InvalidKey value)? invalidKey, + TResult Function(SignerError_UserCanceled value)? userCanceled, + TResult Function(SignerError_InputIndexOutOfRange value)? + inputIndexOutOfRange, + TResult Function(SignerError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(SignerError_InvalidNonWitnessUtxo value)? + invalidNonWitnessUtxo, + TResult Function(SignerError_MissingWitnessUtxo value)? missingWitnessUtxo, + TResult Function(SignerError_MissingWitnessScript value)? + missingWitnessScript, + TResult Function(SignerError_MissingHdKeypath value)? missingHdKeypath, + TResult Function(SignerError_NonStandardSighash value)? nonStandardSighash, + TResult Function(SignerError_InvalidSighash value)? invalidSighash, + TResult Function(SignerError_SighashP2wpkh value)? sighashP2Wpkh, + TResult Function(SignerError_SighashTaproot value)? sighashTaproot, + TResult Function(SignerError_TxInputsIndexError value)? txInputsIndexError, + TResult Function(SignerError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(SignerError_External value)? external_, + TResult Function(SignerError_Psbt value)? psbt, + required TResult orElse(), + }) { + if (invalidNonWitnessUtxo != null) { + return invalidNonWitnessUtxo(this); + } + return orElse(); + } +} + +abstract class SignerError_InvalidNonWitnessUtxo extends SignerError { + const factory SignerError_InvalidNonWitnessUtxo() = + _$SignerError_InvalidNonWitnessUtxoImpl; + const SignerError_InvalidNonWitnessUtxo._() : super._(); +} + +/// @nodoc +abstract class _$$SignerError_MissingWitnessUtxoImplCopyWith<$Res> { + factory _$$SignerError_MissingWitnessUtxoImplCopyWith( + _$SignerError_MissingWitnessUtxoImpl value, + $Res Function(_$SignerError_MissingWitnessUtxoImpl) then) = + __$$SignerError_MissingWitnessUtxoImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$SignerError_MissingWitnessUtxoImplCopyWithImpl<$Res> + extends _$SignerErrorCopyWithImpl<$Res, + _$SignerError_MissingWitnessUtxoImpl> + implements _$$SignerError_MissingWitnessUtxoImplCopyWith<$Res> { + __$$SignerError_MissingWitnessUtxoImplCopyWithImpl( + _$SignerError_MissingWitnessUtxoImpl _value, + $Res Function(_$SignerError_MissingWitnessUtxoImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$SignerError_MissingWitnessUtxoImpl + extends SignerError_MissingWitnessUtxo { + const _$SignerError_MissingWitnessUtxoImpl() : super._(); + + @override + String toString() { + return 'SignerError.missingWitnessUtxo()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$SignerError_MissingWitnessUtxoImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() missingKey, + required TResult Function() invalidKey, + required TResult Function() userCanceled, + required TResult Function() inputIndexOutOfRange, + required TResult Function() missingNonWitnessUtxo, + required TResult Function() invalidNonWitnessUtxo, + required TResult Function() missingWitnessUtxo, + required TResult Function() missingWitnessScript, + required TResult Function() missingHdKeypath, + required TResult Function() nonStandardSighash, + required TResult Function() invalidSighash, + required TResult Function(String errorMessage) sighashP2Wpkh, + required TResult Function(String errorMessage) sighashTaproot, + required TResult Function(String errorMessage) txInputsIndexError, + required TResult Function(String errorMessage) miniscriptPsbt, + required TResult Function(String errorMessage) external_, + required TResult Function(String errorMessage) psbt, + }) { + return missingWitnessUtxo(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? missingKey, + TResult? Function()? invalidKey, + TResult? Function()? userCanceled, + TResult? Function()? inputIndexOutOfRange, + TResult? Function()? missingNonWitnessUtxo, + TResult? Function()? invalidNonWitnessUtxo, + TResult? Function()? missingWitnessUtxo, + TResult? Function()? missingWitnessScript, + TResult? Function()? missingHdKeypath, + TResult? Function()? nonStandardSighash, + TResult? Function()? invalidSighash, + TResult? Function(String errorMessage)? sighashP2Wpkh, + TResult? Function(String errorMessage)? sighashTaproot, + TResult? Function(String errorMessage)? txInputsIndexError, + TResult? Function(String errorMessage)? miniscriptPsbt, + TResult? Function(String errorMessage)? external_, + TResult? Function(String errorMessage)? psbt, + }) { + return missingWitnessUtxo?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? missingKey, + TResult Function()? invalidKey, + TResult Function()? userCanceled, + TResult Function()? inputIndexOutOfRange, + TResult Function()? missingNonWitnessUtxo, + TResult Function()? invalidNonWitnessUtxo, + TResult Function()? missingWitnessUtxo, + TResult Function()? missingWitnessScript, + TResult Function()? missingHdKeypath, + TResult Function()? nonStandardSighash, + TResult Function()? invalidSighash, + TResult Function(String errorMessage)? sighashP2Wpkh, + TResult Function(String errorMessage)? sighashTaproot, + TResult Function(String errorMessage)? txInputsIndexError, + TResult Function(String errorMessage)? miniscriptPsbt, + TResult Function(String errorMessage)? external_, + TResult Function(String errorMessage)? psbt, + required TResult orElse(), + }) { + if (missingWitnessUtxo != null) { + return missingWitnessUtxo(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(SignerError_MissingKey value) missingKey, + required TResult Function(SignerError_InvalidKey value) invalidKey, + required TResult Function(SignerError_UserCanceled value) userCanceled, + required TResult Function(SignerError_InputIndexOutOfRange value) + inputIndexOutOfRange, + required TResult Function(SignerError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(SignerError_InvalidNonWitnessUtxo value) + invalidNonWitnessUtxo, + required TResult Function(SignerError_MissingWitnessUtxo value) + missingWitnessUtxo, + required TResult Function(SignerError_MissingWitnessScript value) + missingWitnessScript, + required TResult Function(SignerError_MissingHdKeypath value) + missingHdKeypath, + required TResult Function(SignerError_NonStandardSighash value) + nonStandardSighash, + required TResult Function(SignerError_InvalidSighash value) invalidSighash, + required TResult Function(SignerError_SighashP2wpkh value) sighashP2Wpkh, + required TResult Function(SignerError_SighashTaproot value) sighashTaproot, + required TResult Function(SignerError_TxInputsIndexError value) + txInputsIndexError, + required TResult Function(SignerError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(SignerError_External value) external_, + required TResult Function(SignerError_Psbt value) psbt, + }) { + return missingWitnessUtxo(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(SignerError_MissingKey value)? missingKey, + TResult? Function(SignerError_InvalidKey value)? invalidKey, + TResult? Function(SignerError_UserCanceled value)? userCanceled, + TResult? Function(SignerError_InputIndexOutOfRange value)? + inputIndexOutOfRange, + TResult? Function(SignerError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(SignerError_InvalidNonWitnessUtxo value)? + invalidNonWitnessUtxo, + TResult? Function(SignerError_MissingWitnessUtxo value)? missingWitnessUtxo, + TResult? Function(SignerError_MissingWitnessScript value)? + missingWitnessScript, + TResult? Function(SignerError_MissingHdKeypath value)? missingHdKeypath, + TResult? Function(SignerError_NonStandardSighash value)? nonStandardSighash, + TResult? Function(SignerError_InvalidSighash value)? invalidSighash, + TResult? Function(SignerError_SighashP2wpkh value)? sighashP2Wpkh, + TResult? Function(SignerError_SighashTaproot value)? sighashTaproot, + TResult? Function(SignerError_TxInputsIndexError value)? txInputsIndexError, + TResult? Function(SignerError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(SignerError_External value)? external_, + TResult? Function(SignerError_Psbt value)? psbt, + }) { + return missingWitnessUtxo?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(SignerError_MissingKey value)? missingKey, + TResult Function(SignerError_InvalidKey value)? invalidKey, + TResult Function(SignerError_UserCanceled value)? userCanceled, + TResult Function(SignerError_InputIndexOutOfRange value)? + inputIndexOutOfRange, + TResult Function(SignerError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(SignerError_InvalidNonWitnessUtxo value)? + invalidNonWitnessUtxo, + TResult Function(SignerError_MissingWitnessUtxo value)? missingWitnessUtxo, + TResult Function(SignerError_MissingWitnessScript value)? + missingWitnessScript, + TResult Function(SignerError_MissingHdKeypath value)? missingHdKeypath, + TResult Function(SignerError_NonStandardSighash value)? nonStandardSighash, + TResult Function(SignerError_InvalidSighash value)? invalidSighash, + TResult Function(SignerError_SighashP2wpkh value)? sighashP2Wpkh, + TResult Function(SignerError_SighashTaproot value)? sighashTaproot, + TResult Function(SignerError_TxInputsIndexError value)? txInputsIndexError, + TResult Function(SignerError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(SignerError_External value)? external_, + TResult Function(SignerError_Psbt value)? psbt, + required TResult orElse(), + }) { + if (missingWitnessUtxo != null) { + return missingWitnessUtxo(this); + } + return orElse(); + } +} + +abstract class SignerError_MissingWitnessUtxo extends SignerError { + const factory SignerError_MissingWitnessUtxo() = + _$SignerError_MissingWitnessUtxoImpl; + const SignerError_MissingWitnessUtxo._() : super._(); +} + +/// @nodoc +abstract class _$$SignerError_MissingWitnessScriptImplCopyWith<$Res> { + factory _$$SignerError_MissingWitnessScriptImplCopyWith( + _$SignerError_MissingWitnessScriptImpl value, + $Res Function(_$SignerError_MissingWitnessScriptImpl) then) = + __$$SignerError_MissingWitnessScriptImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$SignerError_MissingWitnessScriptImplCopyWithImpl<$Res> + extends _$SignerErrorCopyWithImpl<$Res, + _$SignerError_MissingWitnessScriptImpl> + implements _$$SignerError_MissingWitnessScriptImplCopyWith<$Res> { + __$$SignerError_MissingWitnessScriptImplCopyWithImpl( + _$SignerError_MissingWitnessScriptImpl _value, + $Res Function(_$SignerError_MissingWitnessScriptImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$SignerError_MissingWitnessScriptImpl + extends SignerError_MissingWitnessScript { + const _$SignerError_MissingWitnessScriptImpl() : super._(); + + @override + String toString() { + return 'SignerError.missingWitnessScript()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$SignerError_MissingWitnessScriptImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() missingKey, + required TResult Function() invalidKey, + required TResult Function() userCanceled, + required TResult Function() inputIndexOutOfRange, + required TResult Function() missingNonWitnessUtxo, + required TResult Function() invalidNonWitnessUtxo, + required TResult Function() missingWitnessUtxo, + required TResult Function() missingWitnessScript, + required TResult Function() missingHdKeypath, + required TResult Function() nonStandardSighash, + required TResult Function() invalidSighash, + required TResult Function(String errorMessage) sighashP2Wpkh, + required TResult Function(String errorMessage) sighashTaproot, + required TResult Function(String errorMessage) txInputsIndexError, + required TResult Function(String errorMessage) miniscriptPsbt, + required TResult Function(String errorMessage) external_, + required TResult Function(String errorMessage) psbt, + }) { + return missingWitnessScript(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? missingKey, + TResult? Function()? invalidKey, + TResult? Function()? userCanceled, + TResult? Function()? inputIndexOutOfRange, + TResult? Function()? missingNonWitnessUtxo, + TResult? Function()? invalidNonWitnessUtxo, + TResult? Function()? missingWitnessUtxo, + TResult? Function()? missingWitnessScript, + TResult? Function()? missingHdKeypath, + TResult? Function()? nonStandardSighash, + TResult? Function()? invalidSighash, + TResult? Function(String errorMessage)? sighashP2Wpkh, + TResult? Function(String errorMessage)? sighashTaproot, + TResult? Function(String errorMessage)? txInputsIndexError, + TResult? Function(String errorMessage)? miniscriptPsbt, + TResult? Function(String errorMessage)? external_, + TResult? Function(String errorMessage)? psbt, + }) { + return missingWitnessScript?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? missingKey, + TResult Function()? invalidKey, + TResult Function()? userCanceled, + TResult Function()? inputIndexOutOfRange, + TResult Function()? missingNonWitnessUtxo, + TResult Function()? invalidNonWitnessUtxo, + TResult Function()? missingWitnessUtxo, + TResult Function()? missingWitnessScript, + TResult Function()? missingHdKeypath, + TResult Function()? nonStandardSighash, + TResult Function()? invalidSighash, + TResult Function(String errorMessage)? sighashP2Wpkh, + TResult Function(String errorMessage)? sighashTaproot, + TResult Function(String errorMessage)? txInputsIndexError, + TResult Function(String errorMessage)? miniscriptPsbt, + TResult Function(String errorMessage)? external_, + TResult Function(String errorMessage)? psbt, + required TResult orElse(), + }) { + if (missingWitnessScript != null) { + return missingWitnessScript(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(SignerError_MissingKey value) missingKey, + required TResult Function(SignerError_InvalidKey value) invalidKey, + required TResult Function(SignerError_UserCanceled value) userCanceled, + required TResult Function(SignerError_InputIndexOutOfRange value) + inputIndexOutOfRange, + required TResult Function(SignerError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(SignerError_InvalidNonWitnessUtxo value) + invalidNonWitnessUtxo, + required TResult Function(SignerError_MissingWitnessUtxo value) + missingWitnessUtxo, + required TResult Function(SignerError_MissingWitnessScript value) + missingWitnessScript, + required TResult Function(SignerError_MissingHdKeypath value) + missingHdKeypath, + required TResult Function(SignerError_NonStandardSighash value) + nonStandardSighash, + required TResult Function(SignerError_InvalidSighash value) invalidSighash, + required TResult Function(SignerError_SighashP2wpkh value) sighashP2Wpkh, + required TResult Function(SignerError_SighashTaproot value) sighashTaproot, + required TResult Function(SignerError_TxInputsIndexError value) + txInputsIndexError, + required TResult Function(SignerError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(SignerError_External value) external_, + required TResult Function(SignerError_Psbt value) psbt, + }) { + return missingWitnessScript(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(SignerError_MissingKey value)? missingKey, + TResult? Function(SignerError_InvalidKey value)? invalidKey, + TResult? Function(SignerError_UserCanceled value)? userCanceled, + TResult? Function(SignerError_InputIndexOutOfRange value)? + inputIndexOutOfRange, + TResult? Function(SignerError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(SignerError_InvalidNonWitnessUtxo value)? + invalidNonWitnessUtxo, + TResult? Function(SignerError_MissingWitnessUtxo value)? missingWitnessUtxo, + TResult? Function(SignerError_MissingWitnessScript value)? + missingWitnessScript, + TResult? Function(SignerError_MissingHdKeypath value)? missingHdKeypath, + TResult? Function(SignerError_NonStandardSighash value)? nonStandardSighash, + TResult? Function(SignerError_InvalidSighash value)? invalidSighash, + TResult? Function(SignerError_SighashP2wpkh value)? sighashP2Wpkh, + TResult? Function(SignerError_SighashTaproot value)? sighashTaproot, + TResult? Function(SignerError_TxInputsIndexError value)? txInputsIndexError, + TResult? Function(SignerError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(SignerError_External value)? external_, + TResult? Function(SignerError_Psbt value)? psbt, + }) { + return missingWitnessScript?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(SignerError_MissingKey value)? missingKey, + TResult Function(SignerError_InvalidKey value)? invalidKey, + TResult Function(SignerError_UserCanceled value)? userCanceled, + TResult Function(SignerError_InputIndexOutOfRange value)? + inputIndexOutOfRange, + TResult Function(SignerError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(SignerError_InvalidNonWitnessUtxo value)? + invalidNonWitnessUtxo, + TResult Function(SignerError_MissingWitnessUtxo value)? missingWitnessUtxo, + TResult Function(SignerError_MissingWitnessScript value)? + missingWitnessScript, + TResult Function(SignerError_MissingHdKeypath value)? missingHdKeypath, + TResult Function(SignerError_NonStandardSighash value)? nonStandardSighash, + TResult Function(SignerError_InvalidSighash value)? invalidSighash, + TResult Function(SignerError_SighashP2wpkh value)? sighashP2Wpkh, + TResult Function(SignerError_SighashTaproot value)? sighashTaproot, + TResult Function(SignerError_TxInputsIndexError value)? txInputsIndexError, + TResult Function(SignerError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(SignerError_External value)? external_, + TResult Function(SignerError_Psbt value)? psbt, + required TResult orElse(), + }) { + if (missingWitnessScript != null) { + return missingWitnessScript(this); + } + return orElse(); + } +} + +abstract class SignerError_MissingWitnessScript extends SignerError { + const factory SignerError_MissingWitnessScript() = + _$SignerError_MissingWitnessScriptImpl; + const SignerError_MissingWitnessScript._() : super._(); +} + +/// @nodoc +abstract class _$$SignerError_MissingHdKeypathImplCopyWith<$Res> { + factory _$$SignerError_MissingHdKeypathImplCopyWith( + _$SignerError_MissingHdKeypathImpl value, + $Res Function(_$SignerError_MissingHdKeypathImpl) then) = + __$$SignerError_MissingHdKeypathImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$SignerError_MissingHdKeypathImplCopyWithImpl<$Res> + extends _$SignerErrorCopyWithImpl<$Res, _$SignerError_MissingHdKeypathImpl> + implements _$$SignerError_MissingHdKeypathImplCopyWith<$Res> { + __$$SignerError_MissingHdKeypathImplCopyWithImpl( + _$SignerError_MissingHdKeypathImpl _value, + $Res Function(_$SignerError_MissingHdKeypathImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$SignerError_MissingHdKeypathImpl extends SignerError_MissingHdKeypath { + const _$SignerError_MissingHdKeypathImpl() : super._(); + + @override + String toString() { + return 'SignerError.missingHdKeypath()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$SignerError_MissingHdKeypathImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() missingKey, + required TResult Function() invalidKey, + required TResult Function() userCanceled, + required TResult Function() inputIndexOutOfRange, + required TResult Function() missingNonWitnessUtxo, + required TResult Function() invalidNonWitnessUtxo, + required TResult Function() missingWitnessUtxo, + required TResult Function() missingWitnessScript, + required TResult Function() missingHdKeypath, + required TResult Function() nonStandardSighash, + required TResult Function() invalidSighash, + required TResult Function(String errorMessage) sighashP2Wpkh, + required TResult Function(String errorMessage) sighashTaproot, + required TResult Function(String errorMessage) txInputsIndexError, + required TResult Function(String errorMessage) miniscriptPsbt, + required TResult Function(String errorMessage) external_, + required TResult Function(String errorMessage) psbt, + }) { + return missingHdKeypath(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? missingKey, + TResult? Function()? invalidKey, + TResult? Function()? userCanceled, + TResult? Function()? inputIndexOutOfRange, + TResult? Function()? missingNonWitnessUtxo, + TResult? Function()? invalidNonWitnessUtxo, + TResult? Function()? missingWitnessUtxo, + TResult? Function()? missingWitnessScript, + TResult? Function()? missingHdKeypath, + TResult? Function()? nonStandardSighash, + TResult? Function()? invalidSighash, + TResult? Function(String errorMessage)? sighashP2Wpkh, + TResult? Function(String errorMessage)? sighashTaproot, + TResult? Function(String errorMessage)? txInputsIndexError, + TResult? Function(String errorMessage)? miniscriptPsbt, + TResult? Function(String errorMessage)? external_, + TResult? Function(String errorMessage)? psbt, + }) { + return missingHdKeypath?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? missingKey, + TResult Function()? invalidKey, + TResult Function()? userCanceled, + TResult Function()? inputIndexOutOfRange, + TResult Function()? missingNonWitnessUtxo, + TResult Function()? invalidNonWitnessUtxo, + TResult Function()? missingWitnessUtxo, + TResult Function()? missingWitnessScript, + TResult Function()? missingHdKeypath, + TResult Function()? nonStandardSighash, + TResult Function()? invalidSighash, + TResult Function(String errorMessage)? sighashP2Wpkh, + TResult Function(String errorMessage)? sighashTaproot, + TResult Function(String errorMessage)? txInputsIndexError, + TResult Function(String errorMessage)? miniscriptPsbt, + TResult Function(String errorMessage)? external_, + TResult Function(String errorMessage)? psbt, + required TResult orElse(), + }) { + if (missingHdKeypath != null) { + return missingHdKeypath(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(SignerError_MissingKey value) missingKey, + required TResult Function(SignerError_InvalidKey value) invalidKey, + required TResult Function(SignerError_UserCanceled value) userCanceled, + required TResult Function(SignerError_InputIndexOutOfRange value) + inputIndexOutOfRange, + required TResult Function(SignerError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(SignerError_InvalidNonWitnessUtxo value) + invalidNonWitnessUtxo, + required TResult Function(SignerError_MissingWitnessUtxo value) + missingWitnessUtxo, + required TResult Function(SignerError_MissingWitnessScript value) + missingWitnessScript, + required TResult Function(SignerError_MissingHdKeypath value) + missingHdKeypath, + required TResult Function(SignerError_NonStandardSighash value) + nonStandardSighash, + required TResult Function(SignerError_InvalidSighash value) invalidSighash, + required TResult Function(SignerError_SighashP2wpkh value) sighashP2Wpkh, + required TResult Function(SignerError_SighashTaproot value) sighashTaproot, + required TResult Function(SignerError_TxInputsIndexError value) + txInputsIndexError, + required TResult Function(SignerError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(SignerError_External value) external_, + required TResult Function(SignerError_Psbt value) psbt, + }) { + return missingHdKeypath(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(SignerError_MissingKey value)? missingKey, + TResult? Function(SignerError_InvalidKey value)? invalidKey, + TResult? Function(SignerError_UserCanceled value)? userCanceled, + TResult? Function(SignerError_InputIndexOutOfRange value)? + inputIndexOutOfRange, + TResult? Function(SignerError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(SignerError_InvalidNonWitnessUtxo value)? + invalidNonWitnessUtxo, + TResult? Function(SignerError_MissingWitnessUtxo value)? missingWitnessUtxo, + TResult? Function(SignerError_MissingWitnessScript value)? + missingWitnessScript, + TResult? Function(SignerError_MissingHdKeypath value)? missingHdKeypath, + TResult? Function(SignerError_NonStandardSighash value)? nonStandardSighash, + TResult? Function(SignerError_InvalidSighash value)? invalidSighash, + TResult? Function(SignerError_SighashP2wpkh value)? sighashP2Wpkh, + TResult? Function(SignerError_SighashTaproot value)? sighashTaproot, + TResult? Function(SignerError_TxInputsIndexError value)? txInputsIndexError, + TResult? Function(SignerError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(SignerError_External value)? external_, + TResult? Function(SignerError_Psbt value)? psbt, + }) { + return missingHdKeypath?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(SignerError_MissingKey value)? missingKey, + TResult Function(SignerError_InvalidKey value)? invalidKey, + TResult Function(SignerError_UserCanceled value)? userCanceled, + TResult Function(SignerError_InputIndexOutOfRange value)? + inputIndexOutOfRange, + TResult Function(SignerError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(SignerError_InvalidNonWitnessUtxo value)? + invalidNonWitnessUtxo, + TResult Function(SignerError_MissingWitnessUtxo value)? missingWitnessUtxo, + TResult Function(SignerError_MissingWitnessScript value)? + missingWitnessScript, + TResult Function(SignerError_MissingHdKeypath value)? missingHdKeypath, + TResult Function(SignerError_NonStandardSighash value)? nonStandardSighash, + TResult Function(SignerError_InvalidSighash value)? invalidSighash, + TResult Function(SignerError_SighashP2wpkh value)? sighashP2Wpkh, + TResult Function(SignerError_SighashTaproot value)? sighashTaproot, + TResult Function(SignerError_TxInputsIndexError value)? txInputsIndexError, + TResult Function(SignerError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(SignerError_External value)? external_, + TResult Function(SignerError_Psbt value)? psbt, + required TResult orElse(), + }) { + if (missingHdKeypath != null) { + return missingHdKeypath(this); + } + return orElse(); + } +} + +abstract class SignerError_MissingHdKeypath extends SignerError { + const factory SignerError_MissingHdKeypath() = + _$SignerError_MissingHdKeypathImpl; + const SignerError_MissingHdKeypath._() : super._(); +} + +/// @nodoc +abstract class _$$SignerError_NonStandardSighashImplCopyWith<$Res> { + factory _$$SignerError_NonStandardSighashImplCopyWith( + _$SignerError_NonStandardSighashImpl value, + $Res Function(_$SignerError_NonStandardSighashImpl) then) = + __$$SignerError_NonStandardSighashImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$SignerError_NonStandardSighashImplCopyWithImpl<$Res> + extends _$SignerErrorCopyWithImpl<$Res, + _$SignerError_NonStandardSighashImpl> + implements _$$SignerError_NonStandardSighashImplCopyWith<$Res> { + __$$SignerError_NonStandardSighashImplCopyWithImpl( + _$SignerError_NonStandardSighashImpl _value, + $Res Function(_$SignerError_NonStandardSighashImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$SignerError_NonStandardSighashImpl + extends SignerError_NonStandardSighash { + const _$SignerError_NonStandardSighashImpl() : super._(); + + @override + String toString() { + return 'SignerError.nonStandardSighash()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$SignerError_NonStandardSighashImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() missingKey, + required TResult Function() invalidKey, + required TResult Function() userCanceled, + required TResult Function() inputIndexOutOfRange, + required TResult Function() missingNonWitnessUtxo, + required TResult Function() invalidNonWitnessUtxo, + required TResult Function() missingWitnessUtxo, + required TResult Function() missingWitnessScript, + required TResult Function() missingHdKeypath, + required TResult Function() nonStandardSighash, + required TResult Function() invalidSighash, + required TResult Function(String errorMessage) sighashP2Wpkh, + required TResult Function(String errorMessage) sighashTaproot, + required TResult Function(String errorMessage) txInputsIndexError, + required TResult Function(String errorMessage) miniscriptPsbt, + required TResult Function(String errorMessage) external_, + required TResult Function(String errorMessage) psbt, + }) { + return nonStandardSighash(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? missingKey, + TResult? Function()? invalidKey, + TResult? Function()? userCanceled, + TResult? Function()? inputIndexOutOfRange, + TResult? Function()? missingNonWitnessUtxo, + TResult? Function()? invalidNonWitnessUtxo, + TResult? Function()? missingWitnessUtxo, + TResult? Function()? missingWitnessScript, + TResult? Function()? missingHdKeypath, + TResult? Function()? nonStandardSighash, + TResult? Function()? invalidSighash, + TResult? Function(String errorMessage)? sighashP2Wpkh, + TResult? Function(String errorMessage)? sighashTaproot, + TResult? Function(String errorMessage)? txInputsIndexError, + TResult? Function(String errorMessage)? miniscriptPsbt, + TResult? Function(String errorMessage)? external_, + TResult? Function(String errorMessage)? psbt, + }) { + return nonStandardSighash?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? missingKey, + TResult Function()? invalidKey, + TResult Function()? userCanceled, + TResult Function()? inputIndexOutOfRange, + TResult Function()? missingNonWitnessUtxo, + TResult Function()? invalidNonWitnessUtxo, + TResult Function()? missingWitnessUtxo, + TResult Function()? missingWitnessScript, + TResult Function()? missingHdKeypath, + TResult Function()? nonStandardSighash, + TResult Function()? invalidSighash, + TResult Function(String errorMessage)? sighashP2Wpkh, + TResult Function(String errorMessage)? sighashTaproot, + TResult Function(String errorMessage)? txInputsIndexError, + TResult Function(String errorMessage)? miniscriptPsbt, + TResult Function(String errorMessage)? external_, + TResult Function(String errorMessage)? psbt, + required TResult orElse(), + }) { + if (nonStandardSighash != null) { + return nonStandardSighash(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(SignerError_MissingKey value) missingKey, + required TResult Function(SignerError_InvalidKey value) invalidKey, + required TResult Function(SignerError_UserCanceled value) userCanceled, + required TResult Function(SignerError_InputIndexOutOfRange value) + inputIndexOutOfRange, + required TResult Function(SignerError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(SignerError_InvalidNonWitnessUtxo value) + invalidNonWitnessUtxo, + required TResult Function(SignerError_MissingWitnessUtxo value) + missingWitnessUtxo, + required TResult Function(SignerError_MissingWitnessScript value) + missingWitnessScript, + required TResult Function(SignerError_MissingHdKeypath value) + missingHdKeypath, + required TResult Function(SignerError_NonStandardSighash value) + nonStandardSighash, + required TResult Function(SignerError_InvalidSighash value) invalidSighash, + required TResult Function(SignerError_SighashP2wpkh value) sighashP2Wpkh, + required TResult Function(SignerError_SighashTaproot value) sighashTaproot, + required TResult Function(SignerError_TxInputsIndexError value) + txInputsIndexError, + required TResult Function(SignerError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(SignerError_External value) external_, + required TResult Function(SignerError_Psbt value) psbt, + }) { + return nonStandardSighash(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(SignerError_MissingKey value)? missingKey, + TResult? Function(SignerError_InvalidKey value)? invalidKey, + TResult? Function(SignerError_UserCanceled value)? userCanceled, + TResult? Function(SignerError_InputIndexOutOfRange value)? + inputIndexOutOfRange, + TResult? Function(SignerError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(SignerError_InvalidNonWitnessUtxo value)? + invalidNonWitnessUtxo, + TResult? Function(SignerError_MissingWitnessUtxo value)? missingWitnessUtxo, + TResult? Function(SignerError_MissingWitnessScript value)? + missingWitnessScript, + TResult? Function(SignerError_MissingHdKeypath value)? missingHdKeypath, + TResult? Function(SignerError_NonStandardSighash value)? nonStandardSighash, + TResult? Function(SignerError_InvalidSighash value)? invalidSighash, + TResult? Function(SignerError_SighashP2wpkh value)? sighashP2Wpkh, + TResult? Function(SignerError_SighashTaproot value)? sighashTaproot, + TResult? Function(SignerError_TxInputsIndexError value)? txInputsIndexError, + TResult? Function(SignerError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(SignerError_External value)? external_, + TResult? Function(SignerError_Psbt value)? psbt, + }) { + return nonStandardSighash?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(SignerError_MissingKey value)? missingKey, + TResult Function(SignerError_InvalidKey value)? invalidKey, + TResult Function(SignerError_UserCanceled value)? userCanceled, + TResult Function(SignerError_InputIndexOutOfRange value)? + inputIndexOutOfRange, + TResult Function(SignerError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(SignerError_InvalidNonWitnessUtxo value)? + invalidNonWitnessUtxo, + TResult Function(SignerError_MissingWitnessUtxo value)? missingWitnessUtxo, + TResult Function(SignerError_MissingWitnessScript value)? + missingWitnessScript, + TResult Function(SignerError_MissingHdKeypath value)? missingHdKeypath, + TResult Function(SignerError_NonStandardSighash value)? nonStandardSighash, + TResult Function(SignerError_InvalidSighash value)? invalidSighash, + TResult Function(SignerError_SighashP2wpkh value)? sighashP2Wpkh, + TResult Function(SignerError_SighashTaproot value)? sighashTaproot, + TResult Function(SignerError_TxInputsIndexError value)? txInputsIndexError, + TResult Function(SignerError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(SignerError_External value)? external_, + TResult Function(SignerError_Psbt value)? psbt, + required TResult orElse(), + }) { + if (nonStandardSighash != null) { + return nonStandardSighash(this); + } + return orElse(); + } +} + +abstract class SignerError_NonStandardSighash extends SignerError { + const factory SignerError_NonStandardSighash() = + _$SignerError_NonStandardSighashImpl; + const SignerError_NonStandardSighash._() : super._(); +} + +/// @nodoc +abstract class _$$SignerError_InvalidSighashImplCopyWith<$Res> { + factory _$$SignerError_InvalidSighashImplCopyWith( + _$SignerError_InvalidSighashImpl value, + $Res Function(_$SignerError_InvalidSighashImpl) then) = + __$$SignerError_InvalidSighashImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$SignerError_InvalidSighashImplCopyWithImpl<$Res> + extends _$SignerErrorCopyWithImpl<$Res, _$SignerError_InvalidSighashImpl> + implements _$$SignerError_InvalidSighashImplCopyWith<$Res> { + __$$SignerError_InvalidSighashImplCopyWithImpl( + _$SignerError_InvalidSighashImpl _value, + $Res Function(_$SignerError_InvalidSighashImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$SignerError_InvalidSighashImpl extends SignerError_InvalidSighash { + const _$SignerError_InvalidSighashImpl() : super._(); + + @override + String toString() { + return 'SignerError.invalidSighash()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$SignerError_InvalidSighashImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() missingKey, + required TResult Function() invalidKey, + required TResult Function() userCanceled, + required TResult Function() inputIndexOutOfRange, + required TResult Function() missingNonWitnessUtxo, + required TResult Function() invalidNonWitnessUtxo, + required TResult Function() missingWitnessUtxo, + required TResult Function() missingWitnessScript, + required TResult Function() missingHdKeypath, + required TResult Function() nonStandardSighash, + required TResult Function() invalidSighash, + required TResult Function(String errorMessage) sighashP2Wpkh, + required TResult Function(String errorMessage) sighashTaproot, + required TResult Function(String errorMessage) txInputsIndexError, + required TResult Function(String errorMessage) miniscriptPsbt, + required TResult Function(String errorMessage) external_, + required TResult Function(String errorMessage) psbt, + }) { + return invalidSighash(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? missingKey, + TResult? Function()? invalidKey, + TResult? Function()? userCanceled, + TResult? Function()? inputIndexOutOfRange, + TResult? Function()? missingNonWitnessUtxo, + TResult? Function()? invalidNonWitnessUtxo, + TResult? Function()? missingWitnessUtxo, + TResult? Function()? missingWitnessScript, + TResult? Function()? missingHdKeypath, + TResult? Function()? nonStandardSighash, + TResult? Function()? invalidSighash, + TResult? Function(String errorMessage)? sighashP2Wpkh, + TResult? Function(String errorMessage)? sighashTaproot, + TResult? Function(String errorMessage)? txInputsIndexError, + TResult? Function(String errorMessage)? miniscriptPsbt, + TResult? Function(String errorMessage)? external_, + TResult? Function(String errorMessage)? psbt, + }) { + return invalidSighash?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? missingKey, + TResult Function()? invalidKey, + TResult Function()? userCanceled, + TResult Function()? inputIndexOutOfRange, + TResult Function()? missingNonWitnessUtxo, + TResult Function()? invalidNonWitnessUtxo, + TResult Function()? missingWitnessUtxo, + TResult Function()? missingWitnessScript, + TResult Function()? missingHdKeypath, + TResult Function()? nonStandardSighash, + TResult Function()? invalidSighash, + TResult Function(String errorMessage)? sighashP2Wpkh, + TResult Function(String errorMessage)? sighashTaproot, + TResult Function(String errorMessage)? txInputsIndexError, + TResult Function(String errorMessage)? miniscriptPsbt, + TResult Function(String errorMessage)? external_, + TResult Function(String errorMessage)? psbt, + required TResult orElse(), + }) { + if (invalidSighash != null) { + return invalidSighash(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(SignerError_MissingKey value) missingKey, + required TResult Function(SignerError_InvalidKey value) invalidKey, + required TResult Function(SignerError_UserCanceled value) userCanceled, + required TResult Function(SignerError_InputIndexOutOfRange value) + inputIndexOutOfRange, + required TResult Function(SignerError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(SignerError_InvalidNonWitnessUtxo value) + invalidNonWitnessUtxo, + required TResult Function(SignerError_MissingWitnessUtxo value) + missingWitnessUtxo, + required TResult Function(SignerError_MissingWitnessScript value) + missingWitnessScript, + required TResult Function(SignerError_MissingHdKeypath value) + missingHdKeypath, + required TResult Function(SignerError_NonStandardSighash value) + nonStandardSighash, + required TResult Function(SignerError_InvalidSighash value) invalidSighash, + required TResult Function(SignerError_SighashP2wpkh value) sighashP2Wpkh, + required TResult Function(SignerError_SighashTaproot value) sighashTaproot, + required TResult Function(SignerError_TxInputsIndexError value) + txInputsIndexError, + required TResult Function(SignerError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(SignerError_External value) external_, + required TResult Function(SignerError_Psbt value) psbt, + }) { + return invalidSighash(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(SignerError_MissingKey value)? missingKey, + TResult? Function(SignerError_InvalidKey value)? invalidKey, + TResult? Function(SignerError_UserCanceled value)? userCanceled, + TResult? Function(SignerError_InputIndexOutOfRange value)? + inputIndexOutOfRange, + TResult? Function(SignerError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(SignerError_InvalidNonWitnessUtxo value)? + invalidNonWitnessUtxo, + TResult? Function(SignerError_MissingWitnessUtxo value)? missingWitnessUtxo, + TResult? Function(SignerError_MissingWitnessScript value)? + missingWitnessScript, + TResult? Function(SignerError_MissingHdKeypath value)? missingHdKeypath, + TResult? Function(SignerError_NonStandardSighash value)? nonStandardSighash, + TResult? Function(SignerError_InvalidSighash value)? invalidSighash, + TResult? Function(SignerError_SighashP2wpkh value)? sighashP2Wpkh, + TResult? Function(SignerError_SighashTaproot value)? sighashTaproot, + TResult? Function(SignerError_TxInputsIndexError value)? txInputsIndexError, + TResult? Function(SignerError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(SignerError_External value)? external_, + TResult? Function(SignerError_Psbt value)? psbt, + }) { + return invalidSighash?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(SignerError_MissingKey value)? missingKey, + TResult Function(SignerError_InvalidKey value)? invalidKey, + TResult Function(SignerError_UserCanceled value)? userCanceled, + TResult Function(SignerError_InputIndexOutOfRange value)? + inputIndexOutOfRange, + TResult Function(SignerError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(SignerError_InvalidNonWitnessUtxo value)? + invalidNonWitnessUtxo, + TResult Function(SignerError_MissingWitnessUtxo value)? missingWitnessUtxo, + TResult Function(SignerError_MissingWitnessScript value)? + missingWitnessScript, + TResult Function(SignerError_MissingHdKeypath value)? missingHdKeypath, + TResult Function(SignerError_NonStandardSighash value)? nonStandardSighash, + TResult Function(SignerError_InvalidSighash value)? invalidSighash, + TResult Function(SignerError_SighashP2wpkh value)? sighashP2Wpkh, + TResult Function(SignerError_SighashTaproot value)? sighashTaproot, + TResult Function(SignerError_TxInputsIndexError value)? txInputsIndexError, + TResult Function(SignerError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(SignerError_External value)? external_, + TResult Function(SignerError_Psbt value)? psbt, + required TResult orElse(), + }) { + if (invalidSighash != null) { + return invalidSighash(this); + } + return orElse(); + } +} + +abstract class SignerError_InvalidSighash extends SignerError { + const factory SignerError_InvalidSighash() = _$SignerError_InvalidSighashImpl; + const SignerError_InvalidSighash._() : super._(); +} + +/// @nodoc +abstract class _$$SignerError_SighashP2wpkhImplCopyWith<$Res> { + factory _$$SignerError_SighashP2wpkhImplCopyWith( + _$SignerError_SighashP2wpkhImpl value, + $Res Function(_$SignerError_SighashP2wpkhImpl) then) = + __$$SignerError_SighashP2wpkhImplCopyWithImpl<$Res>; + @useResult + $Res call({String errorMessage}); +} + +/// @nodoc +class __$$SignerError_SighashP2wpkhImplCopyWithImpl<$Res> + extends _$SignerErrorCopyWithImpl<$Res, _$SignerError_SighashP2wpkhImpl> + implements _$$SignerError_SighashP2wpkhImplCopyWith<$Res> { + __$$SignerError_SighashP2wpkhImplCopyWithImpl( + _$SignerError_SighashP2wpkhImpl _value, + $Res Function(_$SignerError_SighashP2wpkhImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? errorMessage = null, + }) { + return _then(_$SignerError_SighashP2wpkhImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$SignerError_SighashP2wpkhImpl extends SignerError_SighashP2wpkh { + const _$SignerError_SighashP2wpkhImpl({required this.errorMessage}) + : super._(); + + @override + final String errorMessage; + + @override + String toString() { + return 'SignerError.sighashP2Wpkh(errorMessage: $errorMessage)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$SignerError_SighashP2wpkhImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); + } + + @override + int get hashCode => Object.hash(runtimeType, errorMessage); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$SignerError_SighashP2wpkhImplCopyWith<_$SignerError_SighashP2wpkhImpl> + get copyWith => __$$SignerError_SighashP2wpkhImplCopyWithImpl< + _$SignerError_SighashP2wpkhImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() missingKey, + required TResult Function() invalidKey, + required TResult Function() userCanceled, + required TResult Function() inputIndexOutOfRange, + required TResult Function() missingNonWitnessUtxo, + required TResult Function() invalidNonWitnessUtxo, + required TResult Function() missingWitnessUtxo, + required TResult Function() missingWitnessScript, + required TResult Function() missingHdKeypath, + required TResult Function() nonStandardSighash, + required TResult Function() invalidSighash, + required TResult Function(String errorMessage) sighashP2Wpkh, + required TResult Function(String errorMessage) sighashTaproot, + required TResult Function(String errorMessage) txInputsIndexError, + required TResult Function(String errorMessage) miniscriptPsbt, + required TResult Function(String errorMessage) external_, + required TResult Function(String errorMessage) psbt, + }) { + return sighashP2Wpkh(errorMessage); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? missingKey, + TResult? Function()? invalidKey, + TResult? Function()? userCanceled, + TResult? Function()? inputIndexOutOfRange, + TResult? Function()? missingNonWitnessUtxo, + TResult? Function()? invalidNonWitnessUtxo, + TResult? Function()? missingWitnessUtxo, + TResult? Function()? missingWitnessScript, + TResult? Function()? missingHdKeypath, + TResult? Function()? nonStandardSighash, + TResult? Function()? invalidSighash, + TResult? Function(String errorMessage)? sighashP2Wpkh, + TResult? Function(String errorMessage)? sighashTaproot, + TResult? Function(String errorMessage)? txInputsIndexError, + TResult? Function(String errorMessage)? miniscriptPsbt, + TResult? Function(String errorMessage)? external_, + TResult? Function(String errorMessage)? psbt, + }) { + return sighashP2Wpkh?.call(errorMessage); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? missingKey, + TResult Function()? invalidKey, + TResult Function()? userCanceled, + TResult Function()? inputIndexOutOfRange, + TResult Function()? missingNonWitnessUtxo, + TResult Function()? invalidNonWitnessUtxo, + TResult Function()? missingWitnessUtxo, + TResult Function()? missingWitnessScript, + TResult Function()? missingHdKeypath, + TResult Function()? nonStandardSighash, + TResult Function()? invalidSighash, + TResult Function(String errorMessage)? sighashP2Wpkh, + TResult Function(String errorMessage)? sighashTaproot, + TResult Function(String errorMessage)? txInputsIndexError, + TResult Function(String errorMessage)? miniscriptPsbt, + TResult Function(String errorMessage)? external_, + TResult Function(String errorMessage)? psbt, + required TResult orElse(), + }) { + if (sighashP2Wpkh != null) { + return sighashP2Wpkh(errorMessage); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(SignerError_MissingKey value) missingKey, + required TResult Function(SignerError_InvalidKey value) invalidKey, + required TResult Function(SignerError_UserCanceled value) userCanceled, + required TResult Function(SignerError_InputIndexOutOfRange value) + inputIndexOutOfRange, + required TResult Function(SignerError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(SignerError_InvalidNonWitnessUtxo value) + invalidNonWitnessUtxo, + required TResult Function(SignerError_MissingWitnessUtxo value) + missingWitnessUtxo, + required TResult Function(SignerError_MissingWitnessScript value) + missingWitnessScript, + required TResult Function(SignerError_MissingHdKeypath value) + missingHdKeypath, + required TResult Function(SignerError_NonStandardSighash value) + nonStandardSighash, + required TResult Function(SignerError_InvalidSighash value) invalidSighash, + required TResult Function(SignerError_SighashP2wpkh value) sighashP2Wpkh, + required TResult Function(SignerError_SighashTaproot value) sighashTaproot, + required TResult Function(SignerError_TxInputsIndexError value) + txInputsIndexError, + required TResult Function(SignerError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(SignerError_External value) external_, + required TResult Function(SignerError_Psbt value) psbt, + }) { + return sighashP2Wpkh(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(SignerError_MissingKey value)? missingKey, + TResult? Function(SignerError_InvalidKey value)? invalidKey, + TResult? Function(SignerError_UserCanceled value)? userCanceled, + TResult? Function(SignerError_InputIndexOutOfRange value)? + inputIndexOutOfRange, + TResult? Function(SignerError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(SignerError_InvalidNonWitnessUtxo value)? + invalidNonWitnessUtxo, + TResult? Function(SignerError_MissingWitnessUtxo value)? missingWitnessUtxo, + TResult? Function(SignerError_MissingWitnessScript value)? + missingWitnessScript, + TResult? Function(SignerError_MissingHdKeypath value)? missingHdKeypath, + TResult? Function(SignerError_NonStandardSighash value)? nonStandardSighash, + TResult? Function(SignerError_InvalidSighash value)? invalidSighash, + TResult? Function(SignerError_SighashP2wpkh value)? sighashP2Wpkh, + TResult? Function(SignerError_SighashTaproot value)? sighashTaproot, + TResult? Function(SignerError_TxInputsIndexError value)? txInputsIndexError, + TResult? Function(SignerError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(SignerError_External value)? external_, + TResult? Function(SignerError_Psbt value)? psbt, + }) { + return sighashP2Wpkh?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(SignerError_MissingKey value)? missingKey, + TResult Function(SignerError_InvalidKey value)? invalidKey, + TResult Function(SignerError_UserCanceled value)? userCanceled, + TResult Function(SignerError_InputIndexOutOfRange value)? + inputIndexOutOfRange, + TResult Function(SignerError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(SignerError_InvalidNonWitnessUtxo value)? + invalidNonWitnessUtxo, + TResult Function(SignerError_MissingWitnessUtxo value)? missingWitnessUtxo, + TResult Function(SignerError_MissingWitnessScript value)? + missingWitnessScript, + TResult Function(SignerError_MissingHdKeypath value)? missingHdKeypath, + TResult Function(SignerError_NonStandardSighash value)? nonStandardSighash, + TResult Function(SignerError_InvalidSighash value)? invalidSighash, + TResult Function(SignerError_SighashP2wpkh value)? sighashP2Wpkh, + TResult Function(SignerError_SighashTaproot value)? sighashTaproot, + TResult Function(SignerError_TxInputsIndexError value)? txInputsIndexError, + TResult Function(SignerError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(SignerError_External value)? external_, + TResult Function(SignerError_Psbt value)? psbt, + required TResult orElse(), + }) { + if (sighashP2Wpkh != null) { + return sighashP2Wpkh(this); + } + return orElse(); + } +} + +abstract class SignerError_SighashP2wpkh extends SignerError { + const factory SignerError_SighashP2wpkh( + {required final String errorMessage}) = _$SignerError_SighashP2wpkhImpl; + const SignerError_SighashP2wpkh._() : super._(); + + String get errorMessage; + @JsonKey(ignore: true) + _$$SignerError_SighashP2wpkhImplCopyWith<_$SignerError_SighashP2wpkhImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$SignerError_SighashTaprootImplCopyWith<$Res> { + factory _$$SignerError_SighashTaprootImplCopyWith( + _$SignerError_SighashTaprootImpl value, + $Res Function(_$SignerError_SighashTaprootImpl) then) = + __$$SignerError_SighashTaprootImplCopyWithImpl<$Res>; + @useResult + $Res call({String errorMessage}); +} + +/// @nodoc +class __$$SignerError_SighashTaprootImplCopyWithImpl<$Res> + extends _$SignerErrorCopyWithImpl<$Res, _$SignerError_SighashTaprootImpl> + implements _$$SignerError_SighashTaprootImplCopyWith<$Res> { + __$$SignerError_SighashTaprootImplCopyWithImpl( + _$SignerError_SighashTaprootImpl _value, + $Res Function(_$SignerError_SighashTaprootImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? errorMessage = null, + }) { + return _then(_$SignerError_SighashTaprootImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$SignerError_SighashTaprootImpl extends SignerError_SighashTaproot { + const _$SignerError_SighashTaprootImpl({required this.errorMessage}) + : super._(); + + @override + final String errorMessage; + + @override + String toString() { + return 'SignerError.sighashTaproot(errorMessage: $errorMessage)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$SignerError_SighashTaprootImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); + } + + @override + int get hashCode => Object.hash(runtimeType, errorMessage); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$SignerError_SighashTaprootImplCopyWith<_$SignerError_SighashTaprootImpl> + get copyWith => __$$SignerError_SighashTaprootImplCopyWithImpl< + _$SignerError_SighashTaprootImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() missingKey, + required TResult Function() invalidKey, + required TResult Function() userCanceled, + required TResult Function() inputIndexOutOfRange, + required TResult Function() missingNonWitnessUtxo, + required TResult Function() invalidNonWitnessUtxo, + required TResult Function() missingWitnessUtxo, + required TResult Function() missingWitnessScript, + required TResult Function() missingHdKeypath, + required TResult Function() nonStandardSighash, + required TResult Function() invalidSighash, + required TResult Function(String errorMessage) sighashP2Wpkh, + required TResult Function(String errorMessage) sighashTaproot, + required TResult Function(String errorMessage) txInputsIndexError, + required TResult Function(String errorMessage) miniscriptPsbt, + required TResult Function(String errorMessage) external_, + required TResult Function(String errorMessage) psbt, + }) { + return sighashTaproot(errorMessage); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? missingKey, + TResult? Function()? invalidKey, + TResult? Function()? userCanceled, + TResult? Function()? inputIndexOutOfRange, + TResult? Function()? missingNonWitnessUtxo, + TResult? Function()? invalidNonWitnessUtxo, + TResult? Function()? missingWitnessUtxo, + TResult? Function()? missingWitnessScript, + TResult? Function()? missingHdKeypath, + TResult? Function()? nonStandardSighash, + TResult? Function()? invalidSighash, + TResult? Function(String errorMessage)? sighashP2Wpkh, + TResult? Function(String errorMessage)? sighashTaproot, + TResult? Function(String errorMessage)? txInputsIndexError, + TResult? Function(String errorMessage)? miniscriptPsbt, + TResult? Function(String errorMessage)? external_, + TResult? Function(String errorMessage)? psbt, + }) { + return sighashTaproot?.call(errorMessage); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? missingKey, + TResult Function()? invalidKey, + TResult Function()? userCanceled, + TResult Function()? inputIndexOutOfRange, + TResult Function()? missingNonWitnessUtxo, + TResult Function()? invalidNonWitnessUtxo, + TResult Function()? missingWitnessUtxo, + TResult Function()? missingWitnessScript, + TResult Function()? missingHdKeypath, + TResult Function()? nonStandardSighash, + TResult Function()? invalidSighash, + TResult Function(String errorMessage)? sighashP2Wpkh, + TResult Function(String errorMessage)? sighashTaproot, + TResult Function(String errorMessage)? txInputsIndexError, + TResult Function(String errorMessage)? miniscriptPsbt, + TResult Function(String errorMessage)? external_, + TResult Function(String errorMessage)? psbt, + required TResult orElse(), + }) { + if (sighashTaproot != null) { + return sighashTaproot(errorMessage); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(SignerError_MissingKey value) missingKey, + required TResult Function(SignerError_InvalidKey value) invalidKey, + required TResult Function(SignerError_UserCanceled value) userCanceled, + required TResult Function(SignerError_InputIndexOutOfRange value) + inputIndexOutOfRange, + required TResult Function(SignerError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(SignerError_InvalidNonWitnessUtxo value) + invalidNonWitnessUtxo, + required TResult Function(SignerError_MissingWitnessUtxo value) + missingWitnessUtxo, + required TResult Function(SignerError_MissingWitnessScript value) + missingWitnessScript, + required TResult Function(SignerError_MissingHdKeypath value) + missingHdKeypath, + required TResult Function(SignerError_NonStandardSighash value) + nonStandardSighash, + required TResult Function(SignerError_InvalidSighash value) invalidSighash, + required TResult Function(SignerError_SighashP2wpkh value) sighashP2Wpkh, + required TResult Function(SignerError_SighashTaproot value) sighashTaproot, + required TResult Function(SignerError_TxInputsIndexError value) + txInputsIndexError, + required TResult Function(SignerError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(SignerError_External value) external_, + required TResult Function(SignerError_Psbt value) psbt, + }) { + return sighashTaproot(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(SignerError_MissingKey value)? missingKey, + TResult? Function(SignerError_InvalidKey value)? invalidKey, + TResult? Function(SignerError_UserCanceled value)? userCanceled, + TResult? Function(SignerError_InputIndexOutOfRange value)? + inputIndexOutOfRange, + TResult? Function(SignerError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(SignerError_InvalidNonWitnessUtxo value)? + invalidNonWitnessUtxo, + TResult? Function(SignerError_MissingWitnessUtxo value)? missingWitnessUtxo, + TResult? Function(SignerError_MissingWitnessScript value)? + missingWitnessScript, + TResult? Function(SignerError_MissingHdKeypath value)? missingHdKeypath, + TResult? Function(SignerError_NonStandardSighash value)? nonStandardSighash, + TResult? Function(SignerError_InvalidSighash value)? invalidSighash, + TResult? Function(SignerError_SighashP2wpkh value)? sighashP2Wpkh, + TResult? Function(SignerError_SighashTaproot value)? sighashTaproot, + TResult? Function(SignerError_TxInputsIndexError value)? txInputsIndexError, + TResult? Function(SignerError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(SignerError_External value)? external_, + TResult? Function(SignerError_Psbt value)? psbt, + }) { + return sighashTaproot?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(SignerError_MissingKey value)? missingKey, + TResult Function(SignerError_InvalidKey value)? invalidKey, + TResult Function(SignerError_UserCanceled value)? userCanceled, + TResult Function(SignerError_InputIndexOutOfRange value)? + inputIndexOutOfRange, + TResult Function(SignerError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(SignerError_InvalidNonWitnessUtxo value)? + invalidNonWitnessUtxo, + TResult Function(SignerError_MissingWitnessUtxo value)? missingWitnessUtxo, + TResult Function(SignerError_MissingWitnessScript value)? + missingWitnessScript, + TResult Function(SignerError_MissingHdKeypath value)? missingHdKeypath, + TResult Function(SignerError_NonStandardSighash value)? nonStandardSighash, + TResult Function(SignerError_InvalidSighash value)? invalidSighash, + TResult Function(SignerError_SighashP2wpkh value)? sighashP2Wpkh, + TResult Function(SignerError_SighashTaproot value)? sighashTaproot, + TResult Function(SignerError_TxInputsIndexError value)? txInputsIndexError, + TResult Function(SignerError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(SignerError_External value)? external_, + TResult Function(SignerError_Psbt value)? psbt, + required TResult orElse(), + }) { + if (sighashTaproot != null) { + return sighashTaproot(this); + } + return orElse(); + } +} + +abstract class SignerError_SighashTaproot extends SignerError { + const factory SignerError_SighashTaproot( + {required final String errorMessage}) = _$SignerError_SighashTaprootImpl; + const SignerError_SighashTaproot._() : super._(); + + String get errorMessage; + @JsonKey(ignore: true) + _$$SignerError_SighashTaprootImplCopyWith<_$SignerError_SighashTaprootImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$SignerError_TxInputsIndexErrorImplCopyWith<$Res> { + factory _$$SignerError_TxInputsIndexErrorImplCopyWith( + _$SignerError_TxInputsIndexErrorImpl value, + $Res Function(_$SignerError_TxInputsIndexErrorImpl) then) = + __$$SignerError_TxInputsIndexErrorImplCopyWithImpl<$Res>; + @useResult + $Res call({String errorMessage}); +} + +/// @nodoc +class __$$SignerError_TxInputsIndexErrorImplCopyWithImpl<$Res> + extends _$SignerErrorCopyWithImpl<$Res, + _$SignerError_TxInputsIndexErrorImpl> + implements _$$SignerError_TxInputsIndexErrorImplCopyWith<$Res> { + __$$SignerError_TxInputsIndexErrorImplCopyWithImpl( + _$SignerError_TxInputsIndexErrorImpl _value, + $Res Function(_$SignerError_TxInputsIndexErrorImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? errorMessage = null, + }) { + return _then(_$SignerError_TxInputsIndexErrorImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$SignerError_TxInputsIndexErrorImpl + extends SignerError_TxInputsIndexError { + const _$SignerError_TxInputsIndexErrorImpl({required this.errorMessage}) + : super._(); + + @override + final String errorMessage; + + @override + String toString() { + return 'SignerError.txInputsIndexError(errorMessage: $errorMessage)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$SignerError_TxInputsIndexErrorImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); + } + + @override + int get hashCode => Object.hash(runtimeType, errorMessage); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$SignerError_TxInputsIndexErrorImplCopyWith< + _$SignerError_TxInputsIndexErrorImpl> + get copyWith => __$$SignerError_TxInputsIndexErrorImplCopyWithImpl< + _$SignerError_TxInputsIndexErrorImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() missingKey, + required TResult Function() invalidKey, + required TResult Function() userCanceled, + required TResult Function() inputIndexOutOfRange, + required TResult Function() missingNonWitnessUtxo, + required TResult Function() invalidNonWitnessUtxo, + required TResult Function() missingWitnessUtxo, + required TResult Function() missingWitnessScript, + required TResult Function() missingHdKeypath, + required TResult Function() nonStandardSighash, + required TResult Function() invalidSighash, + required TResult Function(String errorMessage) sighashP2Wpkh, + required TResult Function(String errorMessage) sighashTaproot, + required TResult Function(String errorMessage) txInputsIndexError, + required TResult Function(String errorMessage) miniscriptPsbt, + required TResult Function(String errorMessage) external_, + required TResult Function(String errorMessage) psbt, + }) { + return txInputsIndexError(errorMessage); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? missingKey, + TResult? Function()? invalidKey, + TResult? Function()? userCanceled, + TResult? Function()? inputIndexOutOfRange, + TResult? Function()? missingNonWitnessUtxo, + TResult? Function()? invalidNonWitnessUtxo, + TResult? Function()? missingWitnessUtxo, + TResult? Function()? missingWitnessScript, + TResult? Function()? missingHdKeypath, + TResult? Function()? nonStandardSighash, + TResult? Function()? invalidSighash, + TResult? Function(String errorMessage)? sighashP2Wpkh, + TResult? Function(String errorMessage)? sighashTaproot, + TResult? Function(String errorMessage)? txInputsIndexError, + TResult? Function(String errorMessage)? miniscriptPsbt, + TResult? Function(String errorMessage)? external_, + TResult? Function(String errorMessage)? psbt, + }) { + return txInputsIndexError?.call(errorMessage); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? missingKey, + TResult Function()? invalidKey, + TResult Function()? userCanceled, + TResult Function()? inputIndexOutOfRange, + TResult Function()? missingNonWitnessUtxo, + TResult Function()? invalidNonWitnessUtxo, + TResult Function()? missingWitnessUtxo, + TResult Function()? missingWitnessScript, + TResult Function()? missingHdKeypath, + TResult Function()? nonStandardSighash, + TResult Function()? invalidSighash, + TResult Function(String errorMessage)? sighashP2Wpkh, + TResult Function(String errorMessage)? sighashTaproot, + TResult Function(String errorMessage)? txInputsIndexError, + TResult Function(String errorMessage)? miniscriptPsbt, + TResult Function(String errorMessage)? external_, + TResult Function(String errorMessage)? psbt, + required TResult orElse(), + }) { + if (txInputsIndexError != null) { + return txInputsIndexError(errorMessage); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(SignerError_MissingKey value) missingKey, + required TResult Function(SignerError_InvalidKey value) invalidKey, + required TResult Function(SignerError_UserCanceled value) userCanceled, + required TResult Function(SignerError_InputIndexOutOfRange value) + inputIndexOutOfRange, + required TResult Function(SignerError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(SignerError_InvalidNonWitnessUtxo value) + invalidNonWitnessUtxo, + required TResult Function(SignerError_MissingWitnessUtxo value) + missingWitnessUtxo, + required TResult Function(SignerError_MissingWitnessScript value) + missingWitnessScript, + required TResult Function(SignerError_MissingHdKeypath value) + missingHdKeypath, + required TResult Function(SignerError_NonStandardSighash value) + nonStandardSighash, + required TResult Function(SignerError_InvalidSighash value) invalidSighash, + required TResult Function(SignerError_SighashP2wpkh value) sighashP2Wpkh, + required TResult Function(SignerError_SighashTaproot value) sighashTaproot, + required TResult Function(SignerError_TxInputsIndexError value) + txInputsIndexError, + required TResult Function(SignerError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(SignerError_External value) external_, + required TResult Function(SignerError_Psbt value) psbt, + }) { + return txInputsIndexError(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(SignerError_MissingKey value)? missingKey, + TResult? Function(SignerError_InvalidKey value)? invalidKey, + TResult? Function(SignerError_UserCanceled value)? userCanceled, + TResult? Function(SignerError_InputIndexOutOfRange value)? + inputIndexOutOfRange, + TResult? Function(SignerError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(SignerError_InvalidNonWitnessUtxo value)? + invalidNonWitnessUtxo, + TResult? Function(SignerError_MissingWitnessUtxo value)? missingWitnessUtxo, + TResult? Function(SignerError_MissingWitnessScript value)? + missingWitnessScript, + TResult? Function(SignerError_MissingHdKeypath value)? missingHdKeypath, + TResult? Function(SignerError_NonStandardSighash value)? nonStandardSighash, + TResult? Function(SignerError_InvalidSighash value)? invalidSighash, + TResult? Function(SignerError_SighashP2wpkh value)? sighashP2Wpkh, + TResult? Function(SignerError_SighashTaproot value)? sighashTaproot, + TResult? Function(SignerError_TxInputsIndexError value)? txInputsIndexError, + TResult? Function(SignerError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(SignerError_External value)? external_, + TResult? Function(SignerError_Psbt value)? psbt, + }) { + return txInputsIndexError?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(SignerError_MissingKey value)? missingKey, + TResult Function(SignerError_InvalidKey value)? invalidKey, + TResult Function(SignerError_UserCanceled value)? userCanceled, + TResult Function(SignerError_InputIndexOutOfRange value)? + inputIndexOutOfRange, + TResult Function(SignerError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(SignerError_InvalidNonWitnessUtxo value)? + invalidNonWitnessUtxo, + TResult Function(SignerError_MissingWitnessUtxo value)? missingWitnessUtxo, + TResult Function(SignerError_MissingWitnessScript value)? + missingWitnessScript, + TResult Function(SignerError_MissingHdKeypath value)? missingHdKeypath, + TResult Function(SignerError_NonStandardSighash value)? nonStandardSighash, + TResult Function(SignerError_InvalidSighash value)? invalidSighash, + TResult Function(SignerError_SighashP2wpkh value)? sighashP2Wpkh, + TResult Function(SignerError_SighashTaproot value)? sighashTaproot, + TResult Function(SignerError_TxInputsIndexError value)? txInputsIndexError, + TResult Function(SignerError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(SignerError_External value)? external_, + TResult Function(SignerError_Psbt value)? psbt, + required TResult orElse(), + }) { + if (txInputsIndexError != null) { + return txInputsIndexError(this); + } + return orElse(); + } +} + +abstract class SignerError_TxInputsIndexError extends SignerError { + const factory SignerError_TxInputsIndexError( + {required final String errorMessage}) = + _$SignerError_TxInputsIndexErrorImpl; + const SignerError_TxInputsIndexError._() : super._(); + + String get errorMessage; + @JsonKey(ignore: true) + _$$SignerError_TxInputsIndexErrorImplCopyWith< + _$SignerError_TxInputsIndexErrorImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$SignerError_MiniscriptPsbtImplCopyWith<$Res> { + factory _$$SignerError_MiniscriptPsbtImplCopyWith( + _$SignerError_MiniscriptPsbtImpl value, + $Res Function(_$SignerError_MiniscriptPsbtImpl) then) = + __$$SignerError_MiniscriptPsbtImplCopyWithImpl<$Res>; + @useResult + $Res call({String errorMessage}); +} + +/// @nodoc +class __$$SignerError_MiniscriptPsbtImplCopyWithImpl<$Res> + extends _$SignerErrorCopyWithImpl<$Res, _$SignerError_MiniscriptPsbtImpl> + implements _$$SignerError_MiniscriptPsbtImplCopyWith<$Res> { + __$$SignerError_MiniscriptPsbtImplCopyWithImpl( + _$SignerError_MiniscriptPsbtImpl _value, + $Res Function(_$SignerError_MiniscriptPsbtImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? errorMessage = null, + }) { + return _then(_$SignerError_MiniscriptPsbtImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$SignerError_MiniscriptPsbtImpl extends SignerError_MiniscriptPsbt { + const _$SignerError_MiniscriptPsbtImpl({required this.errorMessage}) + : super._(); + + @override + final String errorMessage; + + @override + String toString() { + return 'SignerError.miniscriptPsbt(errorMessage: $errorMessage)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$SignerError_MiniscriptPsbtImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); + } + + @override + int get hashCode => Object.hash(runtimeType, errorMessage); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$SignerError_MiniscriptPsbtImplCopyWith<_$SignerError_MiniscriptPsbtImpl> + get copyWith => __$$SignerError_MiniscriptPsbtImplCopyWithImpl< + _$SignerError_MiniscriptPsbtImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() missingKey, + required TResult Function() invalidKey, + required TResult Function() userCanceled, + required TResult Function() inputIndexOutOfRange, + required TResult Function() missingNonWitnessUtxo, + required TResult Function() invalidNonWitnessUtxo, + required TResult Function() missingWitnessUtxo, + required TResult Function() missingWitnessScript, + required TResult Function() missingHdKeypath, + required TResult Function() nonStandardSighash, + required TResult Function() invalidSighash, + required TResult Function(String errorMessage) sighashP2Wpkh, + required TResult Function(String errorMessage) sighashTaproot, + required TResult Function(String errorMessage) txInputsIndexError, + required TResult Function(String errorMessage) miniscriptPsbt, + required TResult Function(String errorMessage) external_, + required TResult Function(String errorMessage) psbt, + }) { + return miniscriptPsbt(errorMessage); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? missingKey, + TResult? Function()? invalidKey, + TResult? Function()? userCanceled, + TResult? Function()? inputIndexOutOfRange, + TResult? Function()? missingNonWitnessUtxo, + TResult? Function()? invalidNonWitnessUtxo, + TResult? Function()? missingWitnessUtxo, + TResult? Function()? missingWitnessScript, + TResult? Function()? missingHdKeypath, + TResult? Function()? nonStandardSighash, + TResult? Function()? invalidSighash, + TResult? Function(String errorMessage)? sighashP2Wpkh, + TResult? Function(String errorMessage)? sighashTaproot, + TResult? Function(String errorMessage)? txInputsIndexError, + TResult? Function(String errorMessage)? miniscriptPsbt, + TResult? Function(String errorMessage)? external_, + TResult? Function(String errorMessage)? psbt, + }) { + return miniscriptPsbt?.call(errorMessage); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? missingKey, + TResult Function()? invalidKey, + TResult Function()? userCanceled, + TResult Function()? inputIndexOutOfRange, + TResult Function()? missingNonWitnessUtxo, + TResult Function()? invalidNonWitnessUtxo, + TResult Function()? missingWitnessUtxo, + TResult Function()? missingWitnessScript, + TResult Function()? missingHdKeypath, + TResult Function()? nonStandardSighash, + TResult Function()? invalidSighash, + TResult Function(String errorMessage)? sighashP2Wpkh, + TResult Function(String errorMessage)? sighashTaproot, + TResult Function(String errorMessage)? txInputsIndexError, + TResult Function(String errorMessage)? miniscriptPsbt, + TResult Function(String errorMessage)? external_, + TResult Function(String errorMessage)? psbt, + required TResult orElse(), + }) { + if (miniscriptPsbt != null) { + return miniscriptPsbt(errorMessage); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(SignerError_MissingKey value) missingKey, + required TResult Function(SignerError_InvalidKey value) invalidKey, + required TResult Function(SignerError_UserCanceled value) userCanceled, + required TResult Function(SignerError_InputIndexOutOfRange value) + inputIndexOutOfRange, + required TResult Function(SignerError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(SignerError_InvalidNonWitnessUtxo value) + invalidNonWitnessUtxo, + required TResult Function(SignerError_MissingWitnessUtxo value) + missingWitnessUtxo, + required TResult Function(SignerError_MissingWitnessScript value) + missingWitnessScript, + required TResult Function(SignerError_MissingHdKeypath value) + missingHdKeypath, + required TResult Function(SignerError_NonStandardSighash value) + nonStandardSighash, + required TResult Function(SignerError_InvalidSighash value) invalidSighash, + required TResult Function(SignerError_SighashP2wpkh value) sighashP2Wpkh, + required TResult Function(SignerError_SighashTaproot value) sighashTaproot, + required TResult Function(SignerError_TxInputsIndexError value) + txInputsIndexError, + required TResult Function(SignerError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(SignerError_External value) external_, + required TResult Function(SignerError_Psbt value) psbt, + }) { + return miniscriptPsbt(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(SignerError_MissingKey value)? missingKey, + TResult? Function(SignerError_InvalidKey value)? invalidKey, + TResult? Function(SignerError_UserCanceled value)? userCanceled, + TResult? Function(SignerError_InputIndexOutOfRange value)? + inputIndexOutOfRange, + TResult? Function(SignerError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(SignerError_InvalidNonWitnessUtxo value)? + invalidNonWitnessUtxo, + TResult? Function(SignerError_MissingWitnessUtxo value)? missingWitnessUtxo, + TResult? Function(SignerError_MissingWitnessScript value)? + missingWitnessScript, + TResult? Function(SignerError_MissingHdKeypath value)? missingHdKeypath, + TResult? Function(SignerError_NonStandardSighash value)? nonStandardSighash, + TResult? Function(SignerError_InvalidSighash value)? invalidSighash, + TResult? Function(SignerError_SighashP2wpkh value)? sighashP2Wpkh, + TResult? Function(SignerError_SighashTaproot value)? sighashTaproot, + TResult? Function(SignerError_TxInputsIndexError value)? txInputsIndexError, + TResult? Function(SignerError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(SignerError_External value)? external_, + TResult? Function(SignerError_Psbt value)? psbt, + }) { + return miniscriptPsbt?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(SignerError_MissingKey value)? missingKey, + TResult Function(SignerError_InvalidKey value)? invalidKey, + TResult Function(SignerError_UserCanceled value)? userCanceled, + TResult Function(SignerError_InputIndexOutOfRange value)? + inputIndexOutOfRange, + TResult Function(SignerError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(SignerError_InvalidNonWitnessUtxo value)? + invalidNonWitnessUtxo, + TResult Function(SignerError_MissingWitnessUtxo value)? missingWitnessUtxo, + TResult Function(SignerError_MissingWitnessScript value)? + missingWitnessScript, + TResult Function(SignerError_MissingHdKeypath value)? missingHdKeypath, + TResult Function(SignerError_NonStandardSighash value)? nonStandardSighash, + TResult Function(SignerError_InvalidSighash value)? invalidSighash, + TResult Function(SignerError_SighashP2wpkh value)? sighashP2Wpkh, + TResult Function(SignerError_SighashTaproot value)? sighashTaproot, + TResult Function(SignerError_TxInputsIndexError value)? txInputsIndexError, + TResult Function(SignerError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(SignerError_External value)? external_, + TResult Function(SignerError_Psbt value)? psbt, + required TResult orElse(), + }) { + if (miniscriptPsbt != null) { + return miniscriptPsbt(this); + } + return orElse(); + } +} + +abstract class SignerError_MiniscriptPsbt extends SignerError { + const factory SignerError_MiniscriptPsbt( + {required final String errorMessage}) = _$SignerError_MiniscriptPsbtImpl; + const SignerError_MiniscriptPsbt._() : super._(); + + String get errorMessage; + @JsonKey(ignore: true) + _$$SignerError_MiniscriptPsbtImplCopyWith<_$SignerError_MiniscriptPsbtImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$SignerError_ExternalImplCopyWith<$Res> { + factory _$$SignerError_ExternalImplCopyWith(_$SignerError_ExternalImpl value, + $Res Function(_$SignerError_ExternalImpl) then) = + __$$SignerError_ExternalImplCopyWithImpl<$Res>; + @useResult + $Res call({String errorMessage}); +} + +/// @nodoc +class __$$SignerError_ExternalImplCopyWithImpl<$Res> + extends _$SignerErrorCopyWithImpl<$Res, _$SignerError_ExternalImpl> + implements _$$SignerError_ExternalImplCopyWith<$Res> { + __$$SignerError_ExternalImplCopyWithImpl(_$SignerError_ExternalImpl _value, + $Res Function(_$SignerError_ExternalImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? errorMessage = null, + }) { + return _then(_$SignerError_ExternalImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$SignerError_ExternalImpl extends SignerError_External { + const _$SignerError_ExternalImpl({required this.errorMessage}) : super._(); + + @override + final String errorMessage; + + @override + String toString() { + return 'SignerError.external_(errorMessage: $errorMessage)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$SignerError_ExternalImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); + } + + @override + int get hashCode => Object.hash(runtimeType, errorMessage); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$SignerError_ExternalImplCopyWith<_$SignerError_ExternalImpl> + get copyWith => + __$$SignerError_ExternalImplCopyWithImpl<_$SignerError_ExternalImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() missingKey, + required TResult Function() invalidKey, + required TResult Function() userCanceled, + required TResult Function() inputIndexOutOfRange, + required TResult Function() missingNonWitnessUtxo, + required TResult Function() invalidNonWitnessUtxo, + required TResult Function() missingWitnessUtxo, + required TResult Function() missingWitnessScript, + required TResult Function() missingHdKeypath, + required TResult Function() nonStandardSighash, + required TResult Function() invalidSighash, + required TResult Function(String errorMessage) sighashP2Wpkh, + required TResult Function(String errorMessage) sighashTaproot, + required TResult Function(String errorMessage) txInputsIndexError, + required TResult Function(String errorMessage) miniscriptPsbt, + required TResult Function(String errorMessage) external_, + required TResult Function(String errorMessage) psbt, + }) { + return external_(errorMessage); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? missingKey, + TResult? Function()? invalidKey, + TResult? Function()? userCanceled, + TResult? Function()? inputIndexOutOfRange, + TResult? Function()? missingNonWitnessUtxo, + TResult? Function()? invalidNonWitnessUtxo, + TResult? Function()? missingWitnessUtxo, + TResult? Function()? missingWitnessScript, + TResult? Function()? missingHdKeypath, + TResult? Function()? nonStandardSighash, + TResult? Function()? invalidSighash, + TResult? Function(String errorMessage)? sighashP2Wpkh, + TResult? Function(String errorMessage)? sighashTaproot, + TResult? Function(String errorMessage)? txInputsIndexError, + TResult? Function(String errorMessage)? miniscriptPsbt, + TResult? Function(String errorMessage)? external_, + TResult? Function(String errorMessage)? psbt, + }) { + return external_?.call(errorMessage); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? missingKey, + TResult Function()? invalidKey, + TResult Function()? userCanceled, + TResult Function()? inputIndexOutOfRange, + TResult Function()? missingNonWitnessUtxo, + TResult Function()? invalidNonWitnessUtxo, + TResult Function()? missingWitnessUtxo, + TResult Function()? missingWitnessScript, + TResult Function()? missingHdKeypath, + TResult Function()? nonStandardSighash, + TResult Function()? invalidSighash, + TResult Function(String errorMessage)? sighashP2Wpkh, + TResult Function(String errorMessage)? sighashTaproot, + TResult Function(String errorMessage)? txInputsIndexError, + TResult Function(String errorMessage)? miniscriptPsbt, + TResult Function(String errorMessage)? external_, + TResult Function(String errorMessage)? psbt, + required TResult orElse(), + }) { + if (external_ != null) { + return external_(errorMessage); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(SignerError_MissingKey value) missingKey, + required TResult Function(SignerError_InvalidKey value) invalidKey, + required TResult Function(SignerError_UserCanceled value) userCanceled, + required TResult Function(SignerError_InputIndexOutOfRange value) + inputIndexOutOfRange, + required TResult Function(SignerError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(SignerError_InvalidNonWitnessUtxo value) + invalidNonWitnessUtxo, + required TResult Function(SignerError_MissingWitnessUtxo value) + missingWitnessUtxo, + required TResult Function(SignerError_MissingWitnessScript value) + missingWitnessScript, + required TResult Function(SignerError_MissingHdKeypath value) + missingHdKeypath, + required TResult Function(SignerError_NonStandardSighash value) + nonStandardSighash, + required TResult Function(SignerError_InvalidSighash value) invalidSighash, + required TResult Function(SignerError_SighashP2wpkh value) sighashP2Wpkh, + required TResult Function(SignerError_SighashTaproot value) sighashTaproot, + required TResult Function(SignerError_TxInputsIndexError value) + txInputsIndexError, + required TResult Function(SignerError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(SignerError_External value) external_, + required TResult Function(SignerError_Psbt value) psbt, + }) { + return external_(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(SignerError_MissingKey value)? missingKey, + TResult? Function(SignerError_InvalidKey value)? invalidKey, + TResult? Function(SignerError_UserCanceled value)? userCanceled, + TResult? Function(SignerError_InputIndexOutOfRange value)? + inputIndexOutOfRange, + TResult? Function(SignerError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(SignerError_InvalidNonWitnessUtxo value)? + invalidNonWitnessUtxo, + TResult? Function(SignerError_MissingWitnessUtxo value)? missingWitnessUtxo, + TResult? Function(SignerError_MissingWitnessScript value)? + missingWitnessScript, + TResult? Function(SignerError_MissingHdKeypath value)? missingHdKeypath, + TResult? Function(SignerError_NonStandardSighash value)? nonStandardSighash, + TResult? Function(SignerError_InvalidSighash value)? invalidSighash, + TResult? Function(SignerError_SighashP2wpkh value)? sighashP2Wpkh, + TResult? Function(SignerError_SighashTaproot value)? sighashTaproot, + TResult? Function(SignerError_TxInputsIndexError value)? txInputsIndexError, + TResult? Function(SignerError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(SignerError_External value)? external_, + TResult? Function(SignerError_Psbt value)? psbt, + }) { + return external_?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(SignerError_MissingKey value)? missingKey, + TResult Function(SignerError_InvalidKey value)? invalidKey, + TResult Function(SignerError_UserCanceled value)? userCanceled, + TResult Function(SignerError_InputIndexOutOfRange value)? + inputIndexOutOfRange, + TResult Function(SignerError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(SignerError_InvalidNonWitnessUtxo value)? + invalidNonWitnessUtxo, + TResult Function(SignerError_MissingWitnessUtxo value)? missingWitnessUtxo, + TResult Function(SignerError_MissingWitnessScript value)? + missingWitnessScript, + TResult Function(SignerError_MissingHdKeypath value)? missingHdKeypath, + TResult Function(SignerError_NonStandardSighash value)? nonStandardSighash, + TResult Function(SignerError_InvalidSighash value)? invalidSighash, + TResult Function(SignerError_SighashP2wpkh value)? sighashP2Wpkh, + TResult Function(SignerError_SighashTaproot value)? sighashTaproot, + TResult Function(SignerError_TxInputsIndexError value)? txInputsIndexError, + TResult Function(SignerError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(SignerError_External value)? external_, + TResult Function(SignerError_Psbt value)? psbt, + required TResult orElse(), + }) { + if (external_ != null) { + return external_(this); + } + return orElse(); + } +} + +abstract class SignerError_External extends SignerError { + const factory SignerError_External({required final String errorMessage}) = + _$SignerError_ExternalImpl; + const SignerError_External._() : super._(); + + String get errorMessage; + @JsonKey(ignore: true) + _$$SignerError_ExternalImplCopyWith<_$SignerError_ExternalImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$SignerError_PsbtImplCopyWith<$Res> { + factory _$$SignerError_PsbtImplCopyWith(_$SignerError_PsbtImpl value, + $Res Function(_$SignerError_PsbtImpl) then) = + __$$SignerError_PsbtImplCopyWithImpl<$Res>; + @useResult + $Res call({String errorMessage}); +} + +/// @nodoc +class __$$SignerError_PsbtImplCopyWithImpl<$Res> + extends _$SignerErrorCopyWithImpl<$Res, _$SignerError_PsbtImpl> + implements _$$SignerError_PsbtImplCopyWith<$Res> { + __$$SignerError_PsbtImplCopyWithImpl(_$SignerError_PsbtImpl _value, + $Res Function(_$SignerError_PsbtImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? errorMessage = null, + }) { + return _then(_$SignerError_PsbtImpl( + errorMessage: null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$SignerError_PsbtImpl extends SignerError_Psbt { + const _$SignerError_PsbtImpl({required this.errorMessage}) : super._(); + + @override + final String errorMessage; + + @override + String toString() { + return 'SignerError.psbt(errorMessage: $errorMessage)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$SignerError_PsbtImpl && + (identical(other.errorMessage, errorMessage) || + other.errorMessage == errorMessage)); + } + + @override + int get hashCode => Object.hash(runtimeType, errorMessage); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$SignerError_PsbtImplCopyWith<_$SignerError_PsbtImpl> get copyWith => + __$$SignerError_PsbtImplCopyWithImpl<_$SignerError_PsbtImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() missingKey, + required TResult Function() invalidKey, + required TResult Function() userCanceled, + required TResult Function() inputIndexOutOfRange, + required TResult Function() missingNonWitnessUtxo, + required TResult Function() invalidNonWitnessUtxo, + required TResult Function() missingWitnessUtxo, + required TResult Function() missingWitnessScript, + required TResult Function() missingHdKeypath, + required TResult Function() nonStandardSighash, + required TResult Function() invalidSighash, + required TResult Function(String errorMessage) sighashP2Wpkh, + required TResult Function(String errorMessage) sighashTaproot, + required TResult Function(String errorMessage) txInputsIndexError, + required TResult Function(String errorMessage) miniscriptPsbt, + required TResult Function(String errorMessage) external_, + required TResult Function(String errorMessage) psbt, + }) { + return psbt(errorMessage); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? missingKey, + TResult? Function()? invalidKey, + TResult? Function()? userCanceled, + TResult? Function()? inputIndexOutOfRange, + TResult? Function()? missingNonWitnessUtxo, + TResult? Function()? invalidNonWitnessUtxo, + TResult? Function()? missingWitnessUtxo, + TResult? Function()? missingWitnessScript, + TResult? Function()? missingHdKeypath, + TResult? Function()? nonStandardSighash, + TResult? Function()? invalidSighash, + TResult? Function(String errorMessage)? sighashP2Wpkh, + TResult? Function(String errorMessage)? sighashTaproot, + TResult? Function(String errorMessage)? txInputsIndexError, + TResult? Function(String errorMessage)? miniscriptPsbt, + TResult? Function(String errorMessage)? external_, + TResult? Function(String errorMessage)? psbt, + }) { + return psbt?.call(errorMessage); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? missingKey, + TResult Function()? invalidKey, + TResult Function()? userCanceled, + TResult Function()? inputIndexOutOfRange, + TResult Function()? missingNonWitnessUtxo, + TResult Function()? invalidNonWitnessUtxo, + TResult Function()? missingWitnessUtxo, + TResult Function()? missingWitnessScript, + TResult Function()? missingHdKeypath, + TResult Function()? nonStandardSighash, + TResult Function()? invalidSighash, + TResult Function(String errorMessage)? sighashP2Wpkh, + TResult Function(String errorMessage)? sighashTaproot, + TResult Function(String errorMessage)? txInputsIndexError, + TResult Function(String errorMessage)? miniscriptPsbt, + TResult Function(String errorMessage)? external_, + TResult Function(String errorMessage)? psbt, + required TResult orElse(), + }) { + if (psbt != null) { + return psbt(errorMessage); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(SignerError_MissingKey value) missingKey, + required TResult Function(SignerError_InvalidKey value) invalidKey, + required TResult Function(SignerError_UserCanceled value) userCanceled, + required TResult Function(SignerError_InputIndexOutOfRange value) + inputIndexOutOfRange, + required TResult Function(SignerError_MissingNonWitnessUtxo value) + missingNonWitnessUtxo, + required TResult Function(SignerError_InvalidNonWitnessUtxo value) + invalidNonWitnessUtxo, + required TResult Function(SignerError_MissingWitnessUtxo value) + missingWitnessUtxo, + required TResult Function(SignerError_MissingWitnessScript value) + missingWitnessScript, + required TResult Function(SignerError_MissingHdKeypath value) + missingHdKeypath, + required TResult Function(SignerError_NonStandardSighash value) + nonStandardSighash, + required TResult Function(SignerError_InvalidSighash value) invalidSighash, + required TResult Function(SignerError_SighashP2wpkh value) sighashP2Wpkh, + required TResult Function(SignerError_SighashTaproot value) sighashTaproot, + required TResult Function(SignerError_TxInputsIndexError value) + txInputsIndexError, + required TResult Function(SignerError_MiniscriptPsbt value) miniscriptPsbt, + required TResult Function(SignerError_External value) external_, + required TResult Function(SignerError_Psbt value) psbt, + }) { + return psbt(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(SignerError_MissingKey value)? missingKey, + TResult? Function(SignerError_InvalidKey value)? invalidKey, + TResult? Function(SignerError_UserCanceled value)? userCanceled, + TResult? Function(SignerError_InputIndexOutOfRange value)? + inputIndexOutOfRange, + TResult? Function(SignerError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult? Function(SignerError_InvalidNonWitnessUtxo value)? + invalidNonWitnessUtxo, + TResult? Function(SignerError_MissingWitnessUtxo value)? missingWitnessUtxo, + TResult? Function(SignerError_MissingWitnessScript value)? + missingWitnessScript, + TResult? Function(SignerError_MissingHdKeypath value)? missingHdKeypath, + TResult? Function(SignerError_NonStandardSighash value)? nonStandardSighash, + TResult? Function(SignerError_InvalidSighash value)? invalidSighash, + TResult? Function(SignerError_SighashP2wpkh value)? sighashP2Wpkh, + TResult? Function(SignerError_SighashTaproot value)? sighashTaproot, + TResult? Function(SignerError_TxInputsIndexError value)? txInputsIndexError, + TResult? Function(SignerError_MiniscriptPsbt value)? miniscriptPsbt, + TResult? Function(SignerError_External value)? external_, + TResult? Function(SignerError_Psbt value)? psbt, + }) { + return psbt?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(SignerError_MissingKey value)? missingKey, + TResult Function(SignerError_InvalidKey value)? invalidKey, + TResult Function(SignerError_UserCanceled value)? userCanceled, + TResult Function(SignerError_InputIndexOutOfRange value)? + inputIndexOutOfRange, + TResult Function(SignerError_MissingNonWitnessUtxo value)? + missingNonWitnessUtxo, + TResult Function(SignerError_InvalidNonWitnessUtxo value)? + invalidNonWitnessUtxo, + TResult Function(SignerError_MissingWitnessUtxo value)? missingWitnessUtxo, + TResult Function(SignerError_MissingWitnessScript value)? + missingWitnessScript, + TResult Function(SignerError_MissingHdKeypath value)? missingHdKeypath, + TResult Function(SignerError_NonStandardSighash value)? nonStandardSighash, + TResult Function(SignerError_InvalidSighash value)? invalidSighash, + TResult Function(SignerError_SighashP2wpkh value)? sighashP2Wpkh, + TResult Function(SignerError_SighashTaproot value)? sighashTaproot, + TResult Function(SignerError_TxInputsIndexError value)? txInputsIndexError, + TResult Function(SignerError_MiniscriptPsbt value)? miniscriptPsbt, + TResult Function(SignerError_External value)? external_, + TResult Function(SignerError_Psbt value)? psbt, + required TResult orElse(), + }) { + if (psbt != null) { + return psbt(this); + } + return orElse(); + } +} + +abstract class SignerError_Psbt extends SignerError { + const factory SignerError_Psbt({required final String errorMessage}) = + _$SignerError_PsbtImpl; + const SignerError_Psbt._() : super._(); + + String get errorMessage; + @JsonKey(ignore: true) + _$$SignerError_PsbtImplCopyWith<_$SignerError_PsbtImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +mixin _$SqliteError { + String get rusqliteError => throw _privateConstructorUsedError; + @optionalTypeArgs + TResult when({ + required TResult Function(String rusqliteError) sqlite, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String rusqliteError)? sqlite, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String rusqliteError)? sqlite, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(SqliteError_Sqlite value) sqlite, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(SqliteError_Sqlite value)? sqlite, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(SqliteError_Sqlite value)? sqlite, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + + @JsonKey(ignore: true) + $SqliteErrorCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $SqliteErrorCopyWith<$Res> { + factory $SqliteErrorCopyWith( + SqliteError value, $Res Function(SqliteError) then) = + _$SqliteErrorCopyWithImpl<$Res, SqliteError>; + @useResult + $Res call({String rusqliteError}); +} + +/// @nodoc +class _$SqliteErrorCopyWithImpl<$Res, $Val extends SqliteError> + implements $SqliteErrorCopyWith<$Res> { + _$SqliteErrorCopyWithImpl(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? rusqliteError = null, + }) { + return _then(_value.copyWith( + rusqliteError: null == rusqliteError + ? _value.rusqliteError + : rusqliteError // ignore: cast_nullable_to_non_nullable + as String, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$SqliteError_SqliteImplCopyWith<$Res> + implements $SqliteErrorCopyWith<$Res> { + factory _$$SqliteError_SqliteImplCopyWith(_$SqliteError_SqliteImpl value, + $Res Function(_$SqliteError_SqliteImpl) then) = + __$$SqliteError_SqliteImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({String rusqliteError}); +} + +/// @nodoc +class __$$SqliteError_SqliteImplCopyWithImpl<$Res> + extends _$SqliteErrorCopyWithImpl<$Res, _$SqliteError_SqliteImpl> + implements _$$SqliteError_SqliteImplCopyWith<$Res> { + __$$SqliteError_SqliteImplCopyWithImpl(_$SqliteError_SqliteImpl _value, + $Res Function(_$SqliteError_SqliteImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? rusqliteError = null, + }) { + return _then(_$SqliteError_SqliteImpl( + rusqliteError: null == rusqliteError + ? _value.rusqliteError + : rusqliteError // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$SqliteError_SqliteImpl extends SqliteError_Sqlite { + const _$SqliteError_SqliteImpl({required this.rusqliteError}) : super._(); + + @override + final String rusqliteError; + + @override + String toString() { + return 'SqliteError.sqlite(rusqliteError: $rusqliteError)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$SqliteError_SqliteImpl && + (identical(other.rusqliteError, rusqliteError) || + other.rusqliteError == rusqliteError)); + } + + @override + int get hashCode => Object.hash(runtimeType, rusqliteError); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$SqliteError_SqliteImplCopyWith<_$SqliteError_SqliteImpl> get copyWith => + __$$SqliteError_SqliteImplCopyWithImpl<_$SqliteError_SqliteImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String rusqliteError) sqlite, + }) { + return sqlite(rusqliteError); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String rusqliteError)? sqlite, + }) { + return sqlite?.call(rusqliteError); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String rusqliteError)? sqlite, + required TResult orElse(), + }) { + if (sqlite != null) { + return sqlite(rusqliteError); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(SqliteError_Sqlite value) sqlite, + }) { + return sqlite(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(SqliteError_Sqlite value)? sqlite, + }) { + return sqlite?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(SqliteError_Sqlite value)? sqlite, + required TResult orElse(), + }) { + if (sqlite != null) { + return sqlite(this); + } + return orElse(); + } +} + +abstract class SqliteError_Sqlite extends SqliteError { + const factory SqliteError_Sqlite({required final String rusqliteError}) = + _$SqliteError_SqliteImpl; + const SqliteError_Sqlite._() : super._(); + + @override + String get rusqliteError; + @override + @JsonKey(ignore: true) + _$$SqliteError_SqliteImplCopyWith<_$SqliteError_SqliteImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +mixin _$TransactionError { + @optionalTypeArgs + TResult when({ + required TResult Function() io, + required TResult Function() oversizedVectorAllocation, + required TResult Function(String expected, String actual) invalidChecksum, + required TResult Function() nonMinimalVarInt, + required TResult Function() parseFailed, + required TResult Function(int flag) unsupportedSegwitFlag, + required TResult Function() otherTransactionErr, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? io, + TResult? Function()? oversizedVectorAllocation, + TResult? Function(String expected, String actual)? invalidChecksum, + TResult? Function()? nonMinimalVarInt, + TResult? Function()? parseFailed, + TResult? Function(int flag)? unsupportedSegwitFlag, + TResult? Function()? otherTransactionErr, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? io, + TResult Function()? oversizedVectorAllocation, + TResult Function(String expected, String actual)? invalidChecksum, + TResult Function()? nonMinimalVarInt, + TResult Function()? parseFailed, + TResult Function(int flag)? unsupportedSegwitFlag, + TResult Function()? otherTransactionErr, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(TransactionError_Io value) io, + required TResult Function(TransactionError_OversizedVectorAllocation value) + oversizedVectorAllocation, + required TResult Function(TransactionError_InvalidChecksum value) + invalidChecksum, + required TResult Function(TransactionError_NonMinimalVarInt value) + nonMinimalVarInt, + required TResult Function(TransactionError_ParseFailed value) parseFailed, + required TResult Function(TransactionError_UnsupportedSegwitFlag value) + unsupportedSegwitFlag, + required TResult Function(TransactionError_OtherTransactionErr value) + otherTransactionErr, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(TransactionError_Io value)? io, + TResult? Function(TransactionError_OversizedVectorAllocation value)? + oversizedVectorAllocation, + TResult? Function(TransactionError_InvalidChecksum value)? invalidChecksum, + TResult? Function(TransactionError_NonMinimalVarInt value)? + nonMinimalVarInt, + TResult? Function(TransactionError_ParseFailed value)? parseFailed, + TResult? Function(TransactionError_UnsupportedSegwitFlag value)? + unsupportedSegwitFlag, + TResult? Function(TransactionError_OtherTransactionErr value)? + otherTransactionErr, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(TransactionError_Io value)? io, + TResult Function(TransactionError_OversizedVectorAllocation value)? + oversizedVectorAllocation, + TResult Function(TransactionError_InvalidChecksum value)? invalidChecksum, + TResult Function(TransactionError_NonMinimalVarInt value)? nonMinimalVarInt, + TResult Function(TransactionError_ParseFailed value)? parseFailed, + TResult Function(TransactionError_UnsupportedSegwitFlag value)? + unsupportedSegwitFlag, + TResult Function(TransactionError_OtherTransactionErr value)? + otherTransactionErr, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $TransactionErrorCopyWith<$Res> { + factory $TransactionErrorCopyWith( + TransactionError value, $Res Function(TransactionError) then) = + _$TransactionErrorCopyWithImpl<$Res, TransactionError>; +} + +/// @nodoc +class _$TransactionErrorCopyWithImpl<$Res, $Val extends TransactionError> + implements $TransactionErrorCopyWith<$Res> { + _$TransactionErrorCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; +} + +/// @nodoc +abstract class _$$TransactionError_IoImplCopyWith<$Res> { + factory _$$TransactionError_IoImplCopyWith(_$TransactionError_IoImpl value, + $Res Function(_$TransactionError_IoImpl) then) = + __$$TransactionError_IoImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$TransactionError_IoImplCopyWithImpl<$Res> + extends _$TransactionErrorCopyWithImpl<$Res, _$TransactionError_IoImpl> + implements _$$TransactionError_IoImplCopyWith<$Res> { + __$$TransactionError_IoImplCopyWithImpl(_$TransactionError_IoImpl _value, + $Res Function(_$TransactionError_IoImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$TransactionError_IoImpl extends TransactionError_Io { + const _$TransactionError_IoImpl() : super._(); + + @override + String toString() { + return 'TransactionError.io()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$TransactionError_IoImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() io, + required TResult Function() oversizedVectorAllocation, + required TResult Function(String expected, String actual) invalidChecksum, + required TResult Function() nonMinimalVarInt, + required TResult Function() parseFailed, + required TResult Function(int flag) unsupportedSegwitFlag, + required TResult Function() otherTransactionErr, + }) { + return io(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? io, + TResult? Function()? oversizedVectorAllocation, + TResult? Function(String expected, String actual)? invalidChecksum, + TResult? Function()? nonMinimalVarInt, + TResult? Function()? parseFailed, + TResult? Function(int flag)? unsupportedSegwitFlag, + TResult? Function()? otherTransactionErr, + }) { + return io?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? io, + TResult Function()? oversizedVectorAllocation, + TResult Function(String expected, String actual)? invalidChecksum, + TResult Function()? nonMinimalVarInt, + TResult Function()? parseFailed, + TResult Function(int flag)? unsupportedSegwitFlag, + TResult Function()? otherTransactionErr, + required TResult orElse(), + }) { + if (io != null) { + return io(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(TransactionError_Io value) io, + required TResult Function(TransactionError_OversizedVectorAllocation value) + oversizedVectorAllocation, + required TResult Function(TransactionError_InvalidChecksum value) + invalidChecksum, + required TResult Function(TransactionError_NonMinimalVarInt value) + nonMinimalVarInt, + required TResult Function(TransactionError_ParseFailed value) parseFailed, + required TResult Function(TransactionError_UnsupportedSegwitFlag value) + unsupportedSegwitFlag, + required TResult Function(TransactionError_OtherTransactionErr value) + otherTransactionErr, + }) { + return io(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(TransactionError_Io value)? io, + TResult? Function(TransactionError_OversizedVectorAllocation value)? + oversizedVectorAllocation, + TResult? Function(TransactionError_InvalidChecksum value)? invalidChecksum, + TResult? Function(TransactionError_NonMinimalVarInt value)? + nonMinimalVarInt, + TResult? Function(TransactionError_ParseFailed value)? parseFailed, + TResult? Function(TransactionError_UnsupportedSegwitFlag value)? + unsupportedSegwitFlag, + TResult? Function(TransactionError_OtherTransactionErr value)? + otherTransactionErr, + }) { + return io?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(TransactionError_Io value)? io, + TResult Function(TransactionError_OversizedVectorAllocation value)? + oversizedVectorAllocation, + TResult Function(TransactionError_InvalidChecksum value)? invalidChecksum, + TResult Function(TransactionError_NonMinimalVarInt value)? nonMinimalVarInt, + TResult Function(TransactionError_ParseFailed value)? parseFailed, + TResult Function(TransactionError_UnsupportedSegwitFlag value)? + unsupportedSegwitFlag, + TResult Function(TransactionError_OtherTransactionErr value)? + otherTransactionErr, + required TResult orElse(), + }) { + if (io != null) { + return io(this); + } + return orElse(); + } +} + +abstract class TransactionError_Io extends TransactionError { + const factory TransactionError_Io() = _$TransactionError_IoImpl; + const TransactionError_Io._() : super._(); +} + +/// @nodoc +abstract class _$$TransactionError_OversizedVectorAllocationImplCopyWith<$Res> { + factory _$$TransactionError_OversizedVectorAllocationImplCopyWith( + _$TransactionError_OversizedVectorAllocationImpl value, + $Res Function(_$TransactionError_OversizedVectorAllocationImpl) + then) = + __$$TransactionError_OversizedVectorAllocationImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$TransactionError_OversizedVectorAllocationImplCopyWithImpl<$Res> + extends _$TransactionErrorCopyWithImpl<$Res, + _$TransactionError_OversizedVectorAllocationImpl> + implements _$$TransactionError_OversizedVectorAllocationImplCopyWith<$Res> { + __$$TransactionError_OversizedVectorAllocationImplCopyWithImpl( + _$TransactionError_OversizedVectorAllocationImpl _value, + $Res Function(_$TransactionError_OversizedVectorAllocationImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$TransactionError_OversizedVectorAllocationImpl + extends TransactionError_OversizedVectorAllocation { + const _$TransactionError_OversizedVectorAllocationImpl() : super._(); + + @override + String toString() { + return 'TransactionError.oversizedVectorAllocation()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$TransactionError_OversizedVectorAllocationImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() io, + required TResult Function() oversizedVectorAllocation, + required TResult Function(String expected, String actual) invalidChecksum, + required TResult Function() nonMinimalVarInt, + required TResult Function() parseFailed, + required TResult Function(int flag) unsupportedSegwitFlag, + required TResult Function() otherTransactionErr, + }) { + return oversizedVectorAllocation(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? io, + TResult? Function()? oversizedVectorAllocation, + TResult? Function(String expected, String actual)? invalidChecksum, + TResult? Function()? nonMinimalVarInt, + TResult? Function()? parseFailed, + TResult? Function(int flag)? unsupportedSegwitFlag, + TResult? Function()? otherTransactionErr, + }) { + return oversizedVectorAllocation?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? io, + TResult Function()? oversizedVectorAllocation, + TResult Function(String expected, String actual)? invalidChecksum, + TResult Function()? nonMinimalVarInt, + TResult Function()? parseFailed, + TResult Function(int flag)? unsupportedSegwitFlag, + TResult Function()? otherTransactionErr, + required TResult orElse(), + }) { + if (oversizedVectorAllocation != null) { + return oversizedVectorAllocation(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(TransactionError_Io value) io, + required TResult Function(TransactionError_OversizedVectorAllocation value) + oversizedVectorAllocation, + required TResult Function(TransactionError_InvalidChecksum value) + invalidChecksum, + required TResult Function(TransactionError_NonMinimalVarInt value) + nonMinimalVarInt, + required TResult Function(TransactionError_ParseFailed value) parseFailed, + required TResult Function(TransactionError_UnsupportedSegwitFlag value) + unsupportedSegwitFlag, + required TResult Function(TransactionError_OtherTransactionErr value) + otherTransactionErr, + }) { + return oversizedVectorAllocation(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(TransactionError_Io value)? io, + TResult? Function(TransactionError_OversizedVectorAllocation value)? + oversizedVectorAllocation, + TResult? Function(TransactionError_InvalidChecksum value)? invalidChecksum, + TResult? Function(TransactionError_NonMinimalVarInt value)? + nonMinimalVarInt, + TResult? Function(TransactionError_ParseFailed value)? parseFailed, + TResult? Function(TransactionError_UnsupportedSegwitFlag value)? + unsupportedSegwitFlag, + TResult? Function(TransactionError_OtherTransactionErr value)? + otherTransactionErr, + }) { + return oversizedVectorAllocation?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(TransactionError_Io value)? io, + TResult Function(TransactionError_OversizedVectorAllocation value)? + oversizedVectorAllocation, + TResult Function(TransactionError_InvalidChecksum value)? invalidChecksum, + TResult Function(TransactionError_NonMinimalVarInt value)? nonMinimalVarInt, + TResult Function(TransactionError_ParseFailed value)? parseFailed, + TResult Function(TransactionError_UnsupportedSegwitFlag value)? + unsupportedSegwitFlag, + TResult Function(TransactionError_OtherTransactionErr value)? + otherTransactionErr, + required TResult orElse(), + }) { + if (oversizedVectorAllocation != null) { + return oversizedVectorAllocation(this); + } + return orElse(); + } +} + +abstract class TransactionError_OversizedVectorAllocation + extends TransactionError { + const factory TransactionError_OversizedVectorAllocation() = + _$TransactionError_OversizedVectorAllocationImpl; + const TransactionError_OversizedVectorAllocation._() : super._(); +} + +/// @nodoc +abstract class _$$TransactionError_InvalidChecksumImplCopyWith<$Res> { + factory _$$TransactionError_InvalidChecksumImplCopyWith( + _$TransactionError_InvalidChecksumImpl value, + $Res Function(_$TransactionError_InvalidChecksumImpl) then) = + __$$TransactionError_InvalidChecksumImplCopyWithImpl<$Res>; + @useResult + $Res call({String expected, String actual}); +} + +/// @nodoc +class __$$TransactionError_InvalidChecksumImplCopyWithImpl<$Res> + extends _$TransactionErrorCopyWithImpl<$Res, + _$TransactionError_InvalidChecksumImpl> + implements _$$TransactionError_InvalidChecksumImplCopyWith<$Res> { + __$$TransactionError_InvalidChecksumImplCopyWithImpl( + _$TransactionError_InvalidChecksumImpl _value, + $Res Function(_$TransactionError_InvalidChecksumImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? expected = null, + Object? actual = null, + }) { + return _then(_$TransactionError_InvalidChecksumImpl( + expected: null == expected + ? _value.expected + : expected // ignore: cast_nullable_to_non_nullable + as String, + actual: null == actual + ? _value.actual + : actual // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$TransactionError_InvalidChecksumImpl + extends TransactionError_InvalidChecksum { + const _$TransactionError_InvalidChecksumImpl( + {required this.expected, required this.actual}) + : super._(); + + @override + final String expected; + @override + final String actual; + + @override + String toString() { + return 'TransactionError.invalidChecksum(expected: $expected, actual: $actual)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$TransactionError_InvalidChecksumImpl && + (identical(other.expected, expected) || + other.expected == expected) && + (identical(other.actual, actual) || other.actual == actual)); + } + + @override + int get hashCode => Object.hash(runtimeType, expected, actual); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$TransactionError_InvalidChecksumImplCopyWith< + _$TransactionError_InvalidChecksumImpl> + get copyWith => __$$TransactionError_InvalidChecksumImplCopyWithImpl< + _$TransactionError_InvalidChecksumImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() io, + required TResult Function() oversizedVectorAllocation, + required TResult Function(String expected, String actual) invalidChecksum, + required TResult Function() nonMinimalVarInt, + required TResult Function() parseFailed, + required TResult Function(int flag) unsupportedSegwitFlag, + required TResult Function() otherTransactionErr, + }) { + return invalidChecksum(expected, actual); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? io, + TResult? Function()? oversizedVectorAllocation, + TResult? Function(String expected, String actual)? invalidChecksum, + TResult? Function()? nonMinimalVarInt, + TResult? Function()? parseFailed, + TResult? Function(int flag)? unsupportedSegwitFlag, + TResult? Function()? otherTransactionErr, + }) { + return invalidChecksum?.call(expected, actual); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? io, + TResult Function()? oversizedVectorAllocation, + TResult Function(String expected, String actual)? invalidChecksum, + TResult Function()? nonMinimalVarInt, + TResult Function()? parseFailed, + TResult Function(int flag)? unsupportedSegwitFlag, + TResult Function()? otherTransactionErr, + required TResult orElse(), + }) { + if (invalidChecksum != null) { + return invalidChecksum(expected, actual); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(TransactionError_Io value) io, + required TResult Function(TransactionError_OversizedVectorAllocation value) + oversizedVectorAllocation, + required TResult Function(TransactionError_InvalidChecksum value) + invalidChecksum, + required TResult Function(TransactionError_NonMinimalVarInt value) + nonMinimalVarInt, + required TResult Function(TransactionError_ParseFailed value) parseFailed, + required TResult Function(TransactionError_UnsupportedSegwitFlag value) + unsupportedSegwitFlag, + required TResult Function(TransactionError_OtherTransactionErr value) + otherTransactionErr, + }) { + return invalidChecksum(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(TransactionError_Io value)? io, + TResult? Function(TransactionError_OversizedVectorAllocation value)? + oversizedVectorAllocation, + TResult? Function(TransactionError_InvalidChecksum value)? invalidChecksum, + TResult? Function(TransactionError_NonMinimalVarInt value)? + nonMinimalVarInt, + TResult? Function(TransactionError_ParseFailed value)? parseFailed, + TResult? Function(TransactionError_UnsupportedSegwitFlag value)? + unsupportedSegwitFlag, + TResult? Function(TransactionError_OtherTransactionErr value)? + otherTransactionErr, + }) { + return invalidChecksum?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(TransactionError_Io value)? io, + TResult Function(TransactionError_OversizedVectorAllocation value)? + oversizedVectorAllocation, + TResult Function(TransactionError_InvalidChecksum value)? invalidChecksum, + TResult Function(TransactionError_NonMinimalVarInt value)? nonMinimalVarInt, + TResult Function(TransactionError_ParseFailed value)? parseFailed, + TResult Function(TransactionError_UnsupportedSegwitFlag value)? + unsupportedSegwitFlag, + TResult Function(TransactionError_OtherTransactionErr value)? + otherTransactionErr, + required TResult orElse(), + }) { + if (invalidChecksum != null) { + return invalidChecksum(this); + } + return orElse(); + } +} + +abstract class TransactionError_InvalidChecksum extends TransactionError { + const factory TransactionError_InvalidChecksum( + {required final String expected, + required final String actual}) = _$TransactionError_InvalidChecksumImpl; + const TransactionError_InvalidChecksum._() : super._(); + + String get expected; + String get actual; + @JsonKey(ignore: true) + _$$TransactionError_InvalidChecksumImplCopyWith< + _$TransactionError_InvalidChecksumImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$TransactionError_NonMinimalVarIntImplCopyWith<$Res> { + factory _$$TransactionError_NonMinimalVarIntImplCopyWith( + _$TransactionError_NonMinimalVarIntImpl value, + $Res Function(_$TransactionError_NonMinimalVarIntImpl) then) = + __$$TransactionError_NonMinimalVarIntImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$TransactionError_NonMinimalVarIntImplCopyWithImpl<$Res> + extends _$TransactionErrorCopyWithImpl<$Res, + _$TransactionError_NonMinimalVarIntImpl> + implements _$$TransactionError_NonMinimalVarIntImplCopyWith<$Res> { + __$$TransactionError_NonMinimalVarIntImplCopyWithImpl( + _$TransactionError_NonMinimalVarIntImpl _value, + $Res Function(_$TransactionError_NonMinimalVarIntImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$TransactionError_NonMinimalVarIntImpl + extends TransactionError_NonMinimalVarInt { + const _$TransactionError_NonMinimalVarIntImpl() : super._(); + + @override + String toString() { + return 'TransactionError.nonMinimalVarInt()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$TransactionError_NonMinimalVarIntImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() io, + required TResult Function() oversizedVectorAllocation, + required TResult Function(String expected, String actual) invalidChecksum, + required TResult Function() nonMinimalVarInt, + required TResult Function() parseFailed, + required TResult Function(int flag) unsupportedSegwitFlag, + required TResult Function() otherTransactionErr, + }) { + return nonMinimalVarInt(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? io, + TResult? Function()? oversizedVectorAllocation, + TResult? Function(String expected, String actual)? invalidChecksum, + TResult? Function()? nonMinimalVarInt, + TResult? Function()? parseFailed, + TResult? Function(int flag)? unsupportedSegwitFlag, + TResult? Function()? otherTransactionErr, + }) { + return nonMinimalVarInt?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? io, + TResult Function()? oversizedVectorAllocation, + TResult Function(String expected, String actual)? invalidChecksum, + TResult Function()? nonMinimalVarInt, + TResult Function()? parseFailed, + TResult Function(int flag)? unsupportedSegwitFlag, + TResult Function()? otherTransactionErr, + required TResult orElse(), + }) { + if (nonMinimalVarInt != null) { + return nonMinimalVarInt(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(TransactionError_Io value) io, + required TResult Function(TransactionError_OversizedVectorAllocation value) + oversizedVectorAllocation, + required TResult Function(TransactionError_InvalidChecksum value) + invalidChecksum, + required TResult Function(TransactionError_NonMinimalVarInt value) + nonMinimalVarInt, + required TResult Function(TransactionError_ParseFailed value) parseFailed, + required TResult Function(TransactionError_UnsupportedSegwitFlag value) + unsupportedSegwitFlag, + required TResult Function(TransactionError_OtherTransactionErr value) + otherTransactionErr, + }) { + return nonMinimalVarInt(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(TransactionError_Io value)? io, + TResult? Function(TransactionError_OversizedVectorAllocation value)? + oversizedVectorAllocation, + TResult? Function(TransactionError_InvalidChecksum value)? invalidChecksum, + TResult? Function(TransactionError_NonMinimalVarInt value)? + nonMinimalVarInt, + TResult? Function(TransactionError_ParseFailed value)? parseFailed, + TResult? Function(TransactionError_UnsupportedSegwitFlag value)? + unsupportedSegwitFlag, + TResult? Function(TransactionError_OtherTransactionErr value)? + otherTransactionErr, + }) { + return nonMinimalVarInt?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(TransactionError_Io value)? io, + TResult Function(TransactionError_OversizedVectorAllocation value)? + oversizedVectorAllocation, + TResult Function(TransactionError_InvalidChecksum value)? invalidChecksum, + TResult Function(TransactionError_NonMinimalVarInt value)? nonMinimalVarInt, + TResult Function(TransactionError_ParseFailed value)? parseFailed, + TResult Function(TransactionError_UnsupportedSegwitFlag value)? + unsupportedSegwitFlag, + TResult Function(TransactionError_OtherTransactionErr value)? + otherTransactionErr, + required TResult orElse(), + }) { + if (nonMinimalVarInt != null) { + return nonMinimalVarInt(this); + } + return orElse(); + } +} + +abstract class TransactionError_NonMinimalVarInt extends TransactionError { + const factory TransactionError_NonMinimalVarInt() = + _$TransactionError_NonMinimalVarIntImpl; + const TransactionError_NonMinimalVarInt._() : super._(); +} + +/// @nodoc +abstract class _$$TransactionError_ParseFailedImplCopyWith<$Res> { + factory _$$TransactionError_ParseFailedImplCopyWith( + _$TransactionError_ParseFailedImpl value, + $Res Function(_$TransactionError_ParseFailedImpl) then) = + __$$TransactionError_ParseFailedImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$TransactionError_ParseFailedImplCopyWithImpl<$Res> + extends _$TransactionErrorCopyWithImpl<$Res, + _$TransactionError_ParseFailedImpl> + implements _$$TransactionError_ParseFailedImplCopyWith<$Res> { + __$$TransactionError_ParseFailedImplCopyWithImpl( + _$TransactionError_ParseFailedImpl _value, + $Res Function(_$TransactionError_ParseFailedImpl) _then) + : super(_value, _then); +} + +/// @nodoc - @override - final String field0; +class _$TransactionError_ParseFailedImpl extends TransactionError_ParseFailed { + const _$TransactionError_ParseFailedImpl() : super._(); @override String toString() { - return 'DescriptorError.hex(field0: $field0)'; + return 'TransactionError.parseFailed()'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$DescriptorError_HexImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$TransactionError_ParseFailedImpl); } @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); + 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, + required TResult Function() io, + required TResult Function() oversizedVectorAllocation, + required TResult Function(String expected, String actual) invalidChecksum, + required TResult Function() nonMinimalVarInt, + required TResult Function() parseFailed, + required TResult Function(int flag) unsupportedSegwitFlag, + required TResult Function() otherTransactionErr, }) { - return hex(field0); + return parseFailed(); } @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, + TResult? Function()? io, + TResult? Function()? oversizedVectorAllocation, + TResult? Function(String expected, String actual)? invalidChecksum, + TResult? Function()? nonMinimalVarInt, + TResult? Function()? parseFailed, + TResult? Function(int flag)? unsupportedSegwitFlag, + TResult? Function()? otherTransactionErr, }) { - return hex?.call(field0); + return parseFailed?.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, + TResult Function()? io, + TResult Function()? oversizedVectorAllocation, + TResult Function(String expected, String actual)? invalidChecksum, + TResult Function()? nonMinimalVarInt, + TResult Function()? parseFailed, + TResult Function(int flag)? unsupportedSegwitFlag, + TResult Function()? otherTransactionErr, required TResult orElse(), }) { - if (hex != null) { - return hex(field0); + if (parseFailed != null) { + return parseFailed(); } return orElse(); } @@ -27682,178 +44909,97 @@ class _$DescriptorError_HexImpl extends DescriptorError_Hex { @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, + required TResult Function(TransactionError_Io value) io, + required TResult Function(TransactionError_OversizedVectorAllocation value) + oversizedVectorAllocation, + required TResult Function(TransactionError_InvalidChecksum value) + invalidChecksum, + required TResult Function(TransactionError_NonMinimalVarInt value) + nonMinimalVarInt, + required TResult Function(TransactionError_ParseFailed value) parseFailed, + required TResult Function(TransactionError_UnsupportedSegwitFlag value) + unsupportedSegwitFlag, + required TResult Function(TransactionError_OtherTransactionErr value) + otherTransactionErr, }) { - return hex(this); + return parseFailed(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, + TResult? Function(TransactionError_Io value)? io, + TResult? Function(TransactionError_OversizedVectorAllocation value)? + oversizedVectorAllocation, + TResult? Function(TransactionError_InvalidChecksum value)? invalidChecksum, + TResult? Function(TransactionError_NonMinimalVarInt value)? + nonMinimalVarInt, + TResult? Function(TransactionError_ParseFailed value)? parseFailed, + TResult? Function(TransactionError_UnsupportedSegwitFlag value)? + unsupportedSegwitFlag, + TResult? Function(TransactionError_OtherTransactionErr value)? + otherTransactionErr, }) { - return hex?.call(this); + return parseFailed?.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, + TResult Function(TransactionError_Io value)? io, + TResult Function(TransactionError_OversizedVectorAllocation value)? + oversizedVectorAllocation, + TResult Function(TransactionError_InvalidChecksum value)? invalidChecksum, + TResult Function(TransactionError_NonMinimalVarInt value)? nonMinimalVarInt, + TResult Function(TransactionError_ParseFailed value)? parseFailed, + TResult Function(TransactionError_UnsupportedSegwitFlag value)? + unsupportedSegwitFlag, + TResult Function(TransactionError_OtherTransactionErr value)? + otherTransactionErr, required TResult orElse(), }) { - if (hex != null) { - return hex(this); + if (parseFailed != null) { + return parseFailed(this); } return orElse(); } } -abstract class DescriptorError_Hex extends DescriptorError { - const factory DescriptorError_Hex(final String field0) = - _$DescriptorError_HexImpl; - const DescriptorError_Hex._() : super._(); - - String get field0; - @JsonKey(ignore: true) - _$$DescriptorError_HexImplCopyWith<_$DescriptorError_HexImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$HexError { - Object get field0 => throw _privateConstructorUsedError; - @optionalTypeArgs - TResult when({ - required TResult Function(int field0) invalidChar, - required TResult Function(BigInt field0) oddLengthString, - required TResult Function(BigInt field0, BigInt field1) invalidLength, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int field0)? invalidChar, - TResult? Function(BigInt field0)? oddLengthString, - TResult? Function(BigInt field0, BigInt field1)? invalidLength, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int field0)? invalidChar, - TResult Function(BigInt field0)? oddLengthString, - TResult Function(BigInt field0, BigInt field1)? invalidLength, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(HexError_InvalidChar value) invalidChar, - required TResult Function(HexError_OddLengthString value) oddLengthString, - required TResult Function(HexError_InvalidLength value) invalidLength, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(HexError_InvalidChar value)? invalidChar, - TResult? Function(HexError_OddLengthString value)? oddLengthString, - TResult? Function(HexError_InvalidLength value)? invalidLength, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(HexError_InvalidChar value)? invalidChar, - TResult Function(HexError_OddLengthString value)? oddLengthString, - TResult Function(HexError_InvalidLength value)? invalidLength, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $HexErrorCopyWith<$Res> { - factory $HexErrorCopyWith(HexError value, $Res Function(HexError) then) = - _$HexErrorCopyWithImpl<$Res, HexError>; -} - -/// @nodoc -class _$HexErrorCopyWithImpl<$Res, $Val extends HexError> - implements $HexErrorCopyWith<$Res> { - _$HexErrorCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; +abstract class TransactionError_ParseFailed extends TransactionError { + const factory TransactionError_ParseFailed() = + _$TransactionError_ParseFailedImpl; + const TransactionError_ParseFailed._() : super._(); } /// @nodoc -abstract class _$$HexError_InvalidCharImplCopyWith<$Res> { - factory _$$HexError_InvalidCharImplCopyWith(_$HexError_InvalidCharImpl value, - $Res Function(_$HexError_InvalidCharImpl) then) = - __$$HexError_InvalidCharImplCopyWithImpl<$Res>; +abstract class _$$TransactionError_UnsupportedSegwitFlagImplCopyWith<$Res> { + factory _$$TransactionError_UnsupportedSegwitFlagImplCopyWith( + _$TransactionError_UnsupportedSegwitFlagImpl value, + $Res Function(_$TransactionError_UnsupportedSegwitFlagImpl) then) = + __$$TransactionError_UnsupportedSegwitFlagImplCopyWithImpl<$Res>; @useResult - $Res call({int field0}); + $Res call({int flag}); } /// @nodoc -class __$$HexError_InvalidCharImplCopyWithImpl<$Res> - extends _$HexErrorCopyWithImpl<$Res, _$HexError_InvalidCharImpl> - implements _$$HexError_InvalidCharImplCopyWith<$Res> { - __$$HexError_InvalidCharImplCopyWithImpl(_$HexError_InvalidCharImpl _value, - $Res Function(_$HexError_InvalidCharImpl) _then) +class __$$TransactionError_UnsupportedSegwitFlagImplCopyWithImpl<$Res> + extends _$TransactionErrorCopyWithImpl<$Res, + _$TransactionError_UnsupportedSegwitFlagImpl> + implements _$$TransactionError_UnsupportedSegwitFlagImplCopyWith<$Res> { + __$$TransactionError_UnsupportedSegwitFlagImplCopyWithImpl( + _$TransactionError_UnsupportedSegwitFlagImpl _value, + $Res Function(_$TransactionError_UnsupportedSegwitFlagImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? field0 = null, + Object? flag = null, }) { - return _then(_$HexError_InvalidCharImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable + return _then(_$TransactionError_UnsupportedSegwitFlagImpl( + flag: null == flag + ? _value.flag + : flag // ignore: cast_nullable_to_non_nullable as int, )); } @@ -27861,66 +45007,81 @@ class __$$HexError_InvalidCharImplCopyWithImpl<$Res> /// @nodoc -class _$HexError_InvalidCharImpl extends HexError_InvalidChar { - const _$HexError_InvalidCharImpl(this.field0) : super._(); +class _$TransactionError_UnsupportedSegwitFlagImpl + extends TransactionError_UnsupportedSegwitFlag { + const _$TransactionError_UnsupportedSegwitFlagImpl({required this.flag}) + : super._(); @override - final int field0; + final int flag; @override String toString() { - return 'HexError.invalidChar(field0: $field0)'; + return 'TransactionError.unsupportedSegwitFlag(flag: $flag)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$HexError_InvalidCharImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$TransactionError_UnsupportedSegwitFlagImpl && + (identical(other.flag, flag) || other.flag == flag)); } @override - int get hashCode => Object.hash(runtimeType, field0); + int get hashCode => Object.hash(runtimeType, flag); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$HexError_InvalidCharImplCopyWith<_$HexError_InvalidCharImpl> + _$$TransactionError_UnsupportedSegwitFlagImplCopyWith< + _$TransactionError_UnsupportedSegwitFlagImpl> get copyWith => - __$$HexError_InvalidCharImplCopyWithImpl<_$HexError_InvalidCharImpl>( - this, _$identity); + __$$TransactionError_UnsupportedSegwitFlagImplCopyWithImpl< + _$TransactionError_UnsupportedSegwitFlagImpl>(this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(int field0) invalidChar, - required TResult Function(BigInt field0) oddLengthString, - required TResult Function(BigInt field0, BigInt field1) invalidLength, + required TResult Function() io, + required TResult Function() oversizedVectorAllocation, + required TResult Function(String expected, String actual) invalidChecksum, + required TResult Function() nonMinimalVarInt, + required TResult Function() parseFailed, + required TResult Function(int flag) unsupportedSegwitFlag, + required TResult Function() otherTransactionErr, }) { - return invalidChar(field0); + return unsupportedSegwitFlag(flag); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(int field0)? invalidChar, - TResult? Function(BigInt field0)? oddLengthString, - TResult? Function(BigInt field0, BigInt field1)? invalidLength, + TResult? Function()? io, + TResult? Function()? oversizedVectorAllocation, + TResult? Function(String expected, String actual)? invalidChecksum, + TResult? Function()? nonMinimalVarInt, + TResult? Function()? parseFailed, + TResult? Function(int flag)? unsupportedSegwitFlag, + TResult? Function()? otherTransactionErr, }) { - return invalidChar?.call(field0); + return unsupportedSegwitFlag?.call(flag); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(int field0)? invalidChar, - TResult Function(BigInt field0)? oddLengthString, - TResult Function(BigInt field0, BigInt field1)? invalidLength, + TResult Function()? io, + TResult Function()? oversizedVectorAllocation, + TResult Function(String expected, String actual)? invalidChecksum, + TResult Function()? nonMinimalVarInt, + TResult Function()? parseFailed, + TResult Function(int flag)? unsupportedSegwitFlag, + TResult Function()? otherTransactionErr, required TResult orElse(), }) { - if (invalidChar != null) { - return invalidChar(field0); + if (unsupportedSegwitFlag != null) { + return unsupportedSegwitFlag(flag); } return orElse(); } @@ -27928,144 +45089,156 @@ class _$HexError_InvalidCharImpl extends HexError_InvalidChar { @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, + required TResult Function(TransactionError_Io value) io, + required TResult Function(TransactionError_OversizedVectorAllocation value) + oversizedVectorAllocation, + required TResult Function(TransactionError_InvalidChecksum value) + invalidChecksum, + required TResult Function(TransactionError_NonMinimalVarInt value) + nonMinimalVarInt, + required TResult Function(TransactionError_ParseFailed value) parseFailed, + required TResult Function(TransactionError_UnsupportedSegwitFlag value) + unsupportedSegwitFlag, + required TResult Function(TransactionError_OtherTransactionErr value) + otherTransactionErr, }) { - return invalidChar(this); + return unsupportedSegwitFlag(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(HexError_InvalidChar value)? invalidChar, - TResult? Function(HexError_OddLengthString value)? oddLengthString, - TResult? Function(HexError_InvalidLength value)? invalidLength, + TResult? Function(TransactionError_Io value)? io, + TResult? Function(TransactionError_OversizedVectorAllocation value)? + oversizedVectorAllocation, + TResult? Function(TransactionError_InvalidChecksum value)? invalidChecksum, + TResult? Function(TransactionError_NonMinimalVarInt value)? + nonMinimalVarInt, + TResult? Function(TransactionError_ParseFailed value)? parseFailed, + TResult? Function(TransactionError_UnsupportedSegwitFlag value)? + unsupportedSegwitFlag, + TResult? Function(TransactionError_OtherTransactionErr value)? + otherTransactionErr, }) { - return invalidChar?.call(this); + return unsupportedSegwitFlag?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(HexError_InvalidChar value)? invalidChar, - TResult Function(HexError_OddLengthString value)? oddLengthString, - TResult Function(HexError_InvalidLength value)? invalidLength, + TResult Function(TransactionError_Io value)? io, + TResult Function(TransactionError_OversizedVectorAllocation value)? + oversizedVectorAllocation, + TResult Function(TransactionError_InvalidChecksum value)? invalidChecksum, + TResult Function(TransactionError_NonMinimalVarInt value)? nonMinimalVarInt, + TResult Function(TransactionError_ParseFailed value)? parseFailed, + TResult Function(TransactionError_UnsupportedSegwitFlag value)? + unsupportedSegwitFlag, + TResult Function(TransactionError_OtherTransactionErr value)? + otherTransactionErr, required TResult orElse(), }) { - if (invalidChar != null) { - return invalidChar(this); + if (unsupportedSegwitFlag != null) { + return unsupportedSegwitFlag(this); } return orElse(); } } -abstract class HexError_InvalidChar extends HexError { - const factory HexError_InvalidChar(final int field0) = - _$HexError_InvalidCharImpl; - const HexError_InvalidChar._() : super._(); +abstract class TransactionError_UnsupportedSegwitFlag extends TransactionError { + const factory TransactionError_UnsupportedSegwitFlag( + {required final int flag}) = _$TransactionError_UnsupportedSegwitFlagImpl; + const TransactionError_UnsupportedSegwitFlag._() : super._(); - @override - int get field0; + int get flag; @JsonKey(ignore: true) - _$$HexError_InvalidCharImplCopyWith<_$HexError_InvalidCharImpl> + _$$TransactionError_UnsupportedSegwitFlagImplCopyWith< + _$TransactionError_UnsupportedSegwitFlagImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$HexError_OddLengthStringImplCopyWith<$Res> { - factory _$$HexError_OddLengthStringImplCopyWith( - _$HexError_OddLengthStringImpl value, - $Res Function(_$HexError_OddLengthStringImpl) then) = - __$$HexError_OddLengthStringImplCopyWithImpl<$Res>; - @useResult - $Res call({BigInt field0}); +abstract class _$$TransactionError_OtherTransactionErrImplCopyWith<$Res> { + factory _$$TransactionError_OtherTransactionErrImplCopyWith( + _$TransactionError_OtherTransactionErrImpl value, + $Res Function(_$TransactionError_OtherTransactionErrImpl) then) = + __$$TransactionError_OtherTransactionErrImplCopyWithImpl<$Res>; } /// @nodoc -class __$$HexError_OddLengthStringImplCopyWithImpl<$Res> - extends _$HexErrorCopyWithImpl<$Res, _$HexError_OddLengthStringImpl> - implements _$$HexError_OddLengthStringImplCopyWith<$Res> { - __$$HexError_OddLengthStringImplCopyWithImpl( - _$HexError_OddLengthStringImpl _value, - $Res Function(_$HexError_OddLengthStringImpl) _then) +class __$$TransactionError_OtherTransactionErrImplCopyWithImpl<$Res> + extends _$TransactionErrorCopyWithImpl<$Res, + _$TransactionError_OtherTransactionErrImpl> + implements _$$TransactionError_OtherTransactionErrImplCopyWith<$Res> { + __$$TransactionError_OtherTransactionErrImplCopyWithImpl( + _$TransactionError_OtherTransactionErrImpl _value, + $Res Function(_$TransactionError_OtherTransactionErrImpl) _then) : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? field0 = null, - }) { - return _then(_$HexError_OddLengthStringImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as BigInt, - )); - } } /// @nodoc -class _$HexError_OddLengthStringImpl extends HexError_OddLengthString { - const _$HexError_OddLengthStringImpl(this.field0) : super._(); - - @override - final BigInt field0; +class _$TransactionError_OtherTransactionErrImpl + extends TransactionError_OtherTransactionErr { + const _$TransactionError_OtherTransactionErrImpl() : super._(); @override String toString() { - return 'HexError.oddLengthString(field0: $field0)'; + return 'TransactionError.otherTransactionErr()'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$HexError_OddLengthStringImpl && - (identical(other.field0, field0) || other.field0 == field0)); + other is _$TransactionError_OtherTransactionErrImpl); } @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); + int get hashCode => runtimeType.hashCode; @override @optionalTypeArgs TResult when({ - required TResult Function(int field0) invalidChar, - required TResult Function(BigInt field0) oddLengthString, - required TResult Function(BigInt field0, BigInt field1) invalidLength, + required TResult Function() io, + required TResult Function() oversizedVectorAllocation, + required TResult Function(String expected, String actual) invalidChecksum, + required TResult Function() nonMinimalVarInt, + required TResult Function() parseFailed, + required TResult Function(int flag) unsupportedSegwitFlag, + required TResult Function() otherTransactionErr, }) { - return oddLengthString(field0); + return otherTransactionErr(); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(int field0)? invalidChar, - TResult? Function(BigInt field0)? oddLengthString, - TResult? Function(BigInt field0, BigInt field1)? invalidLength, + TResult? Function()? io, + TResult? Function()? oversizedVectorAllocation, + TResult? Function(String expected, String actual)? invalidChecksum, + TResult? Function()? nonMinimalVarInt, + TResult? Function()? parseFailed, + TResult? Function(int flag)? unsupportedSegwitFlag, + TResult? Function()? otherTransactionErr, }) { - return oddLengthString?.call(field0); + return otherTransactionErr?.call(); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(int field0)? invalidChar, - TResult Function(BigInt field0)? oddLengthString, - TResult Function(BigInt field0, BigInt field1)? invalidLength, + TResult Function()? io, + TResult Function()? oversizedVectorAllocation, + TResult Function(String expected, String actual)? invalidChecksum, + TResult Function()? nonMinimalVarInt, + TResult Function()? parseFailed, + TResult Function(int flag)? unsupportedSegwitFlag, + TResult Function()? otherTransactionErr, required TResult orElse(), }) { - if (oddLengthString != null) { - return oddLengthString(field0); + if (otherTransactionErr != null) { + return otherTransactionErr(); } return orElse(); } @@ -28073,152 +45246,232 @@ class _$HexError_OddLengthStringImpl extends HexError_OddLengthString { @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, + required TResult Function(TransactionError_Io value) io, + required TResult Function(TransactionError_OversizedVectorAllocation value) + oversizedVectorAllocation, + required TResult Function(TransactionError_InvalidChecksum value) + invalidChecksum, + required TResult Function(TransactionError_NonMinimalVarInt value) + nonMinimalVarInt, + required TResult Function(TransactionError_ParseFailed value) parseFailed, + required TResult Function(TransactionError_UnsupportedSegwitFlag value) + unsupportedSegwitFlag, + required TResult Function(TransactionError_OtherTransactionErr value) + otherTransactionErr, }) { - return oddLengthString(this); + return otherTransactionErr(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(HexError_InvalidChar value)? invalidChar, - TResult? Function(HexError_OddLengthString value)? oddLengthString, - TResult? Function(HexError_InvalidLength value)? invalidLength, + TResult? Function(TransactionError_Io value)? io, + TResult? Function(TransactionError_OversizedVectorAllocation value)? + oversizedVectorAllocation, + TResult? Function(TransactionError_InvalidChecksum value)? invalidChecksum, + TResult? Function(TransactionError_NonMinimalVarInt value)? + nonMinimalVarInt, + TResult? Function(TransactionError_ParseFailed value)? parseFailed, + TResult? Function(TransactionError_UnsupportedSegwitFlag value)? + unsupportedSegwitFlag, + TResult? Function(TransactionError_OtherTransactionErr value)? + otherTransactionErr, }) { - return oddLengthString?.call(this); + return otherTransactionErr?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(HexError_InvalidChar value)? invalidChar, - TResult Function(HexError_OddLengthString value)? oddLengthString, - TResult Function(HexError_InvalidLength value)? invalidLength, + TResult Function(TransactionError_Io value)? io, + TResult Function(TransactionError_OversizedVectorAllocation value)? + oversizedVectorAllocation, + TResult Function(TransactionError_InvalidChecksum value)? invalidChecksum, + TResult Function(TransactionError_NonMinimalVarInt value)? nonMinimalVarInt, + TResult Function(TransactionError_ParseFailed value)? parseFailed, + TResult Function(TransactionError_UnsupportedSegwitFlag value)? + unsupportedSegwitFlag, + TResult Function(TransactionError_OtherTransactionErr value)? + otherTransactionErr, required TResult orElse(), }) { - if (oddLengthString != null) { - return oddLengthString(this); + if (otherTransactionErr != null) { + return otherTransactionErr(this); } return orElse(); } } -abstract class HexError_OddLengthString extends HexError { - const factory HexError_OddLengthString(final BigInt field0) = - _$HexError_OddLengthStringImpl; - const HexError_OddLengthString._() : super._(); +abstract class TransactionError_OtherTransactionErr extends TransactionError { + const factory TransactionError_OtherTransactionErr() = + _$TransactionError_OtherTransactionErrImpl; + const TransactionError_OtherTransactionErr._() : super._(); +} + +/// @nodoc +mixin _$TxidParseError { + String get txid => throw _privateConstructorUsedError; + @optionalTypeArgs + TResult when({ + required TResult Function(String txid) invalidTxid, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String txid)? invalidTxid, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String txid)? invalidTxid, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(TxidParseError_InvalidTxid value) invalidTxid, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(TxidParseError_InvalidTxid value)? invalidTxid, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(TxidParseError_InvalidTxid value)? invalidTxid, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; - @override - BigInt get field0; @JsonKey(ignore: true) - _$$HexError_OddLengthStringImplCopyWith<_$HexError_OddLengthStringImpl> - get copyWith => throw _privateConstructorUsedError; + $TxidParseErrorCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $TxidParseErrorCopyWith<$Res> { + factory $TxidParseErrorCopyWith( + TxidParseError value, $Res Function(TxidParseError) then) = + _$TxidParseErrorCopyWithImpl<$Res, TxidParseError>; + @useResult + $Res call({String txid}); +} + +/// @nodoc +class _$TxidParseErrorCopyWithImpl<$Res, $Val extends TxidParseError> + implements $TxidParseErrorCopyWith<$Res> { + _$TxidParseErrorCopyWithImpl(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? txid = null, + }) { + return _then(_value.copyWith( + txid: null == txid + ? _value.txid + : txid // ignore: cast_nullable_to_non_nullable + as String, + ) as $Val); + } } /// @nodoc -abstract class _$$HexError_InvalidLengthImplCopyWith<$Res> { - factory _$$HexError_InvalidLengthImplCopyWith( - _$HexError_InvalidLengthImpl value, - $Res Function(_$HexError_InvalidLengthImpl) then) = - __$$HexError_InvalidLengthImplCopyWithImpl<$Res>; +abstract class _$$TxidParseError_InvalidTxidImplCopyWith<$Res> + implements $TxidParseErrorCopyWith<$Res> { + factory _$$TxidParseError_InvalidTxidImplCopyWith( + _$TxidParseError_InvalidTxidImpl value, + $Res Function(_$TxidParseError_InvalidTxidImpl) then) = + __$$TxidParseError_InvalidTxidImplCopyWithImpl<$Res>; + @override @useResult - $Res call({BigInt field0, BigInt field1}); + $Res call({String txid}); } /// @nodoc -class __$$HexError_InvalidLengthImplCopyWithImpl<$Res> - extends _$HexErrorCopyWithImpl<$Res, _$HexError_InvalidLengthImpl> - implements _$$HexError_InvalidLengthImplCopyWith<$Res> { - __$$HexError_InvalidLengthImplCopyWithImpl( - _$HexError_InvalidLengthImpl _value, - $Res Function(_$HexError_InvalidLengthImpl) _then) +class __$$TxidParseError_InvalidTxidImplCopyWithImpl<$Res> + extends _$TxidParseErrorCopyWithImpl<$Res, _$TxidParseError_InvalidTxidImpl> + implements _$$TxidParseError_InvalidTxidImplCopyWith<$Res> { + __$$TxidParseError_InvalidTxidImplCopyWithImpl( + _$TxidParseError_InvalidTxidImpl _value, + $Res Function(_$TxidParseError_InvalidTxidImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? field0 = null, - Object? field1 = null, + Object? txid = null, }) { - return _then(_$HexError_InvalidLengthImpl( - null == field0 - ? _value.field0 - : field0 // ignore: cast_nullable_to_non_nullable - as BigInt, - null == field1 - ? _value.field1 - : field1 // ignore: cast_nullable_to_non_nullable - as BigInt, + return _then(_$TxidParseError_InvalidTxidImpl( + txid: null == txid + ? _value.txid + : txid // ignore: cast_nullable_to_non_nullable + as String, )); } } /// @nodoc -class _$HexError_InvalidLengthImpl extends HexError_InvalidLength { - const _$HexError_InvalidLengthImpl(this.field0, this.field1) : super._(); +class _$TxidParseError_InvalidTxidImpl extends TxidParseError_InvalidTxid { + const _$TxidParseError_InvalidTxidImpl({required this.txid}) : super._(); @override - final BigInt field0; - @override - final BigInt field1; + final String txid; @override String toString() { - return 'HexError.invalidLength(field0: $field0, field1: $field1)'; + return 'TxidParseError.invalidTxid(txid: $txid)'; } @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)); + other is _$TxidParseError_InvalidTxidImpl && + (identical(other.txid, txid) || other.txid == txid)); } @override - int get hashCode => Object.hash(runtimeType, field0, field1); + int get hashCode => Object.hash(runtimeType, txid); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$HexError_InvalidLengthImplCopyWith<_$HexError_InvalidLengthImpl> - get copyWith => __$$HexError_InvalidLengthImplCopyWithImpl< - _$HexError_InvalidLengthImpl>(this, _$identity); + _$$TxidParseError_InvalidTxidImplCopyWith<_$TxidParseError_InvalidTxidImpl> + get copyWith => __$$TxidParseError_InvalidTxidImplCopyWithImpl< + _$TxidParseError_InvalidTxidImpl>(this, _$identity); @override @optionalTypeArgs TResult when({ - required TResult Function(int field0) invalidChar, - required TResult Function(BigInt field0) oddLengthString, - required TResult Function(BigInt field0, BigInt field1) invalidLength, + required TResult Function(String txid) invalidTxid, }) { - return invalidLength(field0, field1); + return invalidTxid(txid); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(int field0)? invalidChar, - TResult? Function(BigInt field0)? oddLengthString, - TResult? Function(BigInt field0, BigInt field1)? invalidLength, + TResult? Function(String txid)? invalidTxid, }) { - return invalidLength?.call(field0, field1); + return invalidTxid?.call(txid); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(int field0)? invalidChar, - TResult Function(BigInt field0)? oddLengthString, - TResult Function(BigInt field0, BigInt field1)? invalidLength, + TResult Function(String txid)? invalidTxid, required TResult orElse(), }) { - if (invalidLength != null) { - return invalidLength(field0, field1); + if (invalidTxid != null) { + return invalidTxid(txid); } return orElse(); } @@ -28226,47 +45479,41 @@ class _$HexError_InvalidLengthImpl extends HexError_InvalidLength { @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, + required TResult Function(TxidParseError_InvalidTxid value) invalidTxid, }) { - return invalidLength(this); + return invalidTxid(this); } @override @optionalTypeArgs TResult? mapOrNull({ - TResult? Function(HexError_InvalidChar value)? invalidChar, - TResult? Function(HexError_OddLengthString value)? oddLengthString, - TResult? Function(HexError_InvalidLength value)? invalidLength, + TResult? Function(TxidParseError_InvalidTxid value)? invalidTxid, }) { - return invalidLength?.call(this); + return invalidTxid?.call(this); } @override @optionalTypeArgs TResult maybeMap({ - TResult Function(HexError_InvalidChar value)? invalidChar, - TResult Function(HexError_OddLengthString value)? oddLengthString, - TResult Function(HexError_InvalidLength value)? invalidLength, + TResult Function(TxidParseError_InvalidTxid value)? invalidTxid, required TResult orElse(), }) { - if (invalidLength != null) { - return invalidLength(this); + if (invalidTxid != null) { + return invalidTxid(this); } return orElse(); } } -abstract class HexError_InvalidLength extends HexError { - const factory HexError_InvalidLength( - final BigInt field0, final BigInt field1) = _$HexError_InvalidLengthImpl; - const HexError_InvalidLength._() : super._(); +abstract class TxidParseError_InvalidTxid extends TxidParseError { + const factory TxidParseError_InvalidTxid({required final String txid}) = + _$TxidParseError_InvalidTxidImpl; + const TxidParseError_InvalidTxid._() : super._(); @override - BigInt get field0; - BigInt get field1; + String get txid; + @override @JsonKey(ignore: true) - _$$HexError_InvalidLengthImplCopyWith<_$HexError_InvalidLengthImpl> + _$$TxidParseError_InvalidTxidImplCopyWith<_$TxidParseError_InvalidTxidImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/generated/api/esplora.dart b/lib/src/generated/api/esplora.dart new file mode 100644 index 00000000..290a9903 --- /dev/null +++ b/lib/src/generated/api/esplora.dart @@ -0,0 +1,61 @@ +// This file is automatically generated, so please do not edit it. +// @generated by `flutter_rust_bridge`@ 2.4.0. + +// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import + +import '../frb_generated.dart'; +import '../lib.dart'; +import 'bitcoin.dart'; +import 'electrum.dart'; +import 'error.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; +import 'types.dart'; + +// Rust type: RustOpaqueNom +abstract class BlockingClient implements RustOpaqueInterface {} + +class FfiEsploraClient { + final BlockingClient opaque; + + const FfiEsploraClient({ + required this.opaque, + }); + + static Future broadcast( + {required FfiEsploraClient opaque, + required FfiTransaction transaction}) => + core.instance.api.crateApiEsploraFfiEsploraClientBroadcast( + opaque: opaque, transaction: transaction); + + static Future fullScan( + {required FfiEsploraClient opaque, + required FfiFullScanRequest request, + required BigInt stopGap, + required BigInt parallelRequests}) => + core.instance.api.crateApiEsploraFfiEsploraClientFullScan( + opaque: opaque, + request: request, + stopGap: stopGap, + parallelRequests: parallelRequests); + + // HINT: Make it `#[frb(sync)]` to let it become the default constructor of Dart class. + static Future newInstance({required String url}) => + core.instance.api.crateApiEsploraFfiEsploraClientNew(url: url); + + static Future sync_( + {required FfiEsploraClient opaque, + required FfiSyncRequest request, + required BigInt parallelRequests}) => + core.instance.api.crateApiEsploraFfiEsploraClientSync( + opaque: opaque, request: request, parallelRequests: parallelRequests); + + @override + int get hashCode => opaque.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is FfiEsploraClient && + runtimeType == other.runtimeType && + opaque == other.opaque; +} diff --git a/lib/src/generated/api/key.dart b/lib/src/generated/api/key.dart index 627cde71..cfa31584 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. +// @generated by `flutter_rust_bridge`@ 2.4.0. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import @@ -11,160 +11,161 @@ import 'types.dart'; // These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `fmt`, `fmt`, `from`, `from`, `from`, `from` -class BdkDerivationPath { - final DerivationPath ptr; +class FfiDerivationPath { + final DerivationPath opaque; - const BdkDerivationPath({ - required this.ptr, + const FfiDerivationPath({ + required this.opaque, }); - String asString() => core.instance.api.crateApiKeyBdkDerivationPathAsString( + String asString() => core.instance.api.crateApiKeyFfiDerivationPathAsString( that: this, ); - static Future fromString({required String path}) => - core.instance.api.crateApiKeyBdkDerivationPathFromString(path: path); + static Future fromString({required String path}) => + core.instance.api.crateApiKeyFfiDerivationPathFromString(path: path); @override - int get hashCode => ptr.hashCode; + int get hashCode => opaque.hashCode; @override bool operator ==(Object other) => identical(this, other) || - other is BdkDerivationPath && + other is FfiDerivationPath && runtimeType == other.runtimeType && - ptr == other.ptr; + opaque == other.opaque; } -class BdkDescriptorPublicKey { - final DescriptorPublicKey ptr; +class FfiDescriptorPublicKey { + final DescriptorPublicKey opaque; - const BdkDescriptorPublicKey({ - required this.ptr, + const FfiDescriptorPublicKey({ + required this.opaque, }); String asString() => - core.instance.api.crateApiKeyBdkDescriptorPublicKeyAsString( + core.instance.api.crateApiKeyFfiDescriptorPublicKeyAsString( that: this, ); - static Future derive( - {required BdkDescriptorPublicKey ptr, - required BdkDerivationPath path}) => + static Future derive( + {required FfiDescriptorPublicKey opaque, + required FfiDerivationPath path}) => core.instance.api - .crateApiKeyBdkDescriptorPublicKeyDerive(ptr: ptr, path: path); + .crateApiKeyFfiDescriptorPublicKeyDerive(opaque: opaque, path: path); - static Future extend( - {required BdkDescriptorPublicKey ptr, - required BdkDerivationPath path}) => + static Future extend( + {required FfiDescriptorPublicKey opaque, + required FfiDerivationPath path}) => core.instance.api - .crateApiKeyBdkDescriptorPublicKeyExtend(ptr: ptr, path: path); + .crateApiKeyFfiDescriptorPublicKeyExtend(opaque: opaque, path: path); - static Future fromString( + static Future fromString( {required String publicKey}) => core.instance.api - .crateApiKeyBdkDescriptorPublicKeyFromString(publicKey: publicKey); + .crateApiKeyFfiDescriptorPublicKeyFromString(publicKey: publicKey); @override - int get hashCode => ptr.hashCode; + int get hashCode => opaque.hashCode; @override bool operator ==(Object other) => identical(this, other) || - other is BdkDescriptorPublicKey && + other is FfiDescriptorPublicKey && runtimeType == other.runtimeType && - ptr == other.ptr; + opaque == other.opaque; } -class BdkDescriptorSecretKey { - final DescriptorSecretKey ptr; +class FfiDescriptorSecretKey { + final DescriptorSecretKey opaque; - const BdkDescriptorSecretKey({ - required this.ptr, + const FfiDescriptorSecretKey({ + required this.opaque, }); - static BdkDescriptorPublicKey asPublic( - {required BdkDescriptorSecretKey ptr}) => - core.instance.api.crateApiKeyBdkDescriptorSecretKeyAsPublic(ptr: ptr); + static FfiDescriptorPublicKey asPublic( + {required FfiDescriptorSecretKey opaque}) => + core.instance.api + .crateApiKeyFfiDescriptorSecretKeyAsPublic(opaque: opaque); String asString() => - core.instance.api.crateApiKeyBdkDescriptorSecretKeyAsString( + core.instance.api.crateApiKeyFfiDescriptorSecretKeyAsString( that: this, ); - static Future create( + static Future create( {required Network network, - required BdkMnemonic mnemonic, + required FfiMnemonic mnemonic, String? password}) => - core.instance.api.crateApiKeyBdkDescriptorSecretKeyCreate( + core.instance.api.crateApiKeyFfiDescriptorSecretKeyCreate( network: network, mnemonic: mnemonic, password: password); - static Future derive( - {required BdkDescriptorSecretKey ptr, - required BdkDerivationPath path}) => + static Future derive( + {required FfiDescriptorSecretKey opaque, + required FfiDerivationPath path}) => core.instance.api - .crateApiKeyBdkDescriptorSecretKeyDerive(ptr: ptr, path: path); + .crateApiKeyFfiDescriptorSecretKeyDerive(opaque: opaque, path: path); - static Future extend( - {required BdkDescriptorSecretKey ptr, - required BdkDerivationPath path}) => + static Future extend( + {required FfiDescriptorSecretKey opaque, + required FfiDerivationPath path}) => core.instance.api - .crateApiKeyBdkDescriptorSecretKeyExtend(ptr: ptr, path: path); + .crateApiKeyFfiDescriptorSecretKeyExtend(opaque: opaque, path: path); - static Future fromString( + static Future fromString( {required String secretKey}) => core.instance.api - .crateApiKeyBdkDescriptorSecretKeyFromString(secretKey: secretKey); + .crateApiKeyFfiDescriptorSecretKeyFromString(secretKey: secretKey); /// Get the private key as bytes. Uint8List secretBytes() => - core.instance.api.crateApiKeyBdkDescriptorSecretKeySecretBytes( + core.instance.api.crateApiKeyFfiDescriptorSecretKeySecretBytes( that: this, ); @override - int get hashCode => ptr.hashCode; + int get hashCode => opaque.hashCode; @override bool operator ==(Object other) => identical(this, other) || - other is BdkDescriptorSecretKey && + other is FfiDescriptorSecretKey && runtimeType == other.runtimeType && - ptr == other.ptr; + opaque == other.opaque; } -class BdkMnemonic { - final Mnemonic ptr; +class FfiMnemonic { + final Mnemonic opaque; - const BdkMnemonic({ - required this.ptr, + const FfiMnemonic({ + required this.opaque, }); - String asString() => core.instance.api.crateApiKeyBdkMnemonicAsString( + String asString() => core.instance.api.crateApiKeyFfiMnemonicAsString( that: this, ); /// Create a new Mnemonic in the specified language from the given entropy. /// Entropy must be a multiple of 32 bits (4 bytes) and 128-256 bits in length. - static Future fromEntropy({required List entropy}) => - core.instance.api.crateApiKeyBdkMnemonicFromEntropy(entropy: entropy); + static Future fromEntropy({required List entropy}) => + core.instance.api.crateApiKeyFfiMnemonicFromEntropy(entropy: entropy); /// Parse a Mnemonic with given string - static Future fromString({required String mnemonic}) => - core.instance.api.crateApiKeyBdkMnemonicFromString(mnemonic: mnemonic); + static Future fromString({required String mnemonic}) => + core.instance.api.crateApiKeyFfiMnemonicFromString(mnemonic: mnemonic); // HINT: Make it `#[frb(sync)]` to let it become the default constructor of Dart class. /// Generates Mnemonic with a random entropy - static Future newInstance({required WordCount wordCount}) => - core.instance.api.crateApiKeyBdkMnemonicNew(wordCount: wordCount); + static Future newInstance({required WordCount wordCount}) => + core.instance.api.crateApiKeyFfiMnemonicNew(wordCount: wordCount); @override - int get hashCode => ptr.hashCode; + int get hashCode => opaque.hashCode; @override bool operator ==(Object other) => identical(this, other) || - other is BdkMnemonic && + other is FfiMnemonic && runtimeType == other.runtimeType && - ptr == other.ptr; + opaque == other.opaque; } diff --git a/lib/src/generated/api/psbt.dart b/lib/src/generated/api/psbt.dart deleted file mode 100644 index 2ca20acf..00000000 --- a/lib/src/generated/api/psbt.dart +++ /dev/null @@ -1,77 +0,0 @@ -// This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0. - -// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import - -import '../frb_generated.dart'; -import '../lib.dart'; -import 'error.dart'; -import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; -import 'types.dart'; - -// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `fmt`, `from` - -class BdkPsbt { - final MutexPartiallySignedTransaction ptr; - - const BdkPsbt({ - required this.ptr, - }); - - String asString() => core.instance.api.crateApiPsbtBdkPsbtAsString( - that: this, - ); - - /// Combines this PartiallySignedTransaction with other PSBT as described by BIP 174. - /// - /// In accordance with BIP 174 this function is commutative i.e., `A.combine(B) == B.combine(A)` - static Future combine( - {required BdkPsbt ptr, required BdkPsbt other}) => - core.instance.api.crateApiPsbtBdkPsbtCombine(ptr: ptr, other: other); - - /// Return the transaction. - static BdkTransaction extractTx({required BdkPsbt ptr}) => - core.instance.api.crateApiPsbtBdkPsbtExtractTx(ptr: ptr); - - /// The total transaction fee amount, sum of input amounts minus sum of output amounts, in Sats. - /// If the PSBT is missing a TxOut for an input returns None. - BigInt? feeAmount() => core.instance.api.crateApiPsbtBdkPsbtFeeAmount( - that: this, - ); - - /// The transaction's fee rate. This value will only be accurate if calculated AFTER the - /// `PartiallySignedTransaction` is finalized and all witness/signature data is added to the - /// transaction. - /// If the PSBT is missing a TxOut for an input returns None. - FeeRate? feeRate() => core.instance.api.crateApiPsbtBdkPsbtFeeRate( - that: this, - ); - - static Future fromStr({required String psbtBase64}) => - core.instance.api.crateApiPsbtBdkPsbtFromStr(psbtBase64: psbtBase64); - - /// Serialize the PSBT data structure as a String of JSON. - String jsonSerialize() => core.instance.api.crateApiPsbtBdkPsbtJsonSerialize( - that: this, - ); - - ///Serialize as raw binary data - Uint8List serialize() => core.instance.api.crateApiPsbtBdkPsbtSerialize( - that: this, - ); - - ///Computes the `Txid`. - /// Hashes the transaction excluding the segwit data (i. e. the marker, flag bytes, and the witness fields themselves). - /// For non-segwit transactions which do not have any segwit data, this will be equal to transaction.wtxid(). - String txid() => core.instance.api.crateApiPsbtBdkPsbtTxid( - that: this, - ); - - @override - int get hashCode => ptr.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is BdkPsbt && runtimeType == other.runtimeType && ptr == other.ptr; -} diff --git a/lib/src/generated/api/store.dart b/lib/src/generated/api/store.dart new file mode 100644 index 00000000..0743691f --- /dev/null +++ b/lib/src/generated/api/store.dart @@ -0,0 +1,38 @@ +// This file is automatically generated, so please do not edit it. +// @generated by `flutter_rust_bridge`@ 2.4.0. + +// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import + +import '../frb_generated.dart'; +import 'error.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; + +// These functions are ignored because they are not marked as `pub`: `get_store` + +// Rust type: RustOpaqueNom> +abstract class MutexConnection implements RustOpaqueInterface {} + +class FfiConnection { + final MutexConnection field0; + + const FfiConnection({ + required this.field0, + }); + + // HINT: Make it `#[frb(sync)]` to let it become the default constructor of Dart class. + static Future newInstance({required String path}) => + core.instance.api.crateApiStoreFfiConnectionNew(path: path); + + static Future newInMemory() => + core.instance.api.crateApiStoreFfiConnectionNewInMemory(); + + @override + int get hashCode => field0.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is FfiConnection && + runtimeType == other.runtimeType && + field0 == other.field0; +} diff --git a/lib/src/generated/api/tx_builder.dart b/lib/src/generated/api/tx_builder.dart new file mode 100644 index 00000000..200775d2 --- /dev/null +++ b/lib/src/generated/api/tx_builder.dart @@ -0,0 +1,54 @@ +// This file is automatically generated, so please do not edit it. +// @generated by `flutter_rust_bridge`@ 2.4.0. + +// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import + +import '../frb_generated.dart'; +import '../lib.dart'; +import 'bitcoin.dart'; +import 'error.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; +import 'types.dart'; +import 'wallet.dart'; + +Future finishBumpFeeTxBuilder( + {required String txid, + required FeeRate feeRate, + required FfiWallet wallet, + required bool enableRbf, + int? nSequence}) => + core.instance.api.crateApiTxBuilderFinishBumpFeeTxBuilder( + txid: txid, + feeRate: feeRate, + wallet: wallet, + enableRbf: enableRbf, + nSequence: nSequence); + +Future txBuilderFinish( + {required FfiWallet wallet, + required List<(FfiScriptBuf, BigInt)> recipients, + required List utxos, + required List unSpendable, + required ChangeSpendPolicy changePolicy, + required bool manuallySelectedOnly, + FeeRate? feeRate, + BigInt? feeAbsolute, + required bool drainWallet, + (Map, KeychainKind)? policyPath, + FfiScriptBuf? drainTo, + RbfValue? rbf, + required List data}) => + core.instance.api.crateApiTxBuilderTxBuilderFinish( + wallet: wallet, + recipients: recipients, + utxos: utxos, + unSpendable: unSpendable, + changePolicy: changePolicy, + manuallySelectedOnly: manuallySelectedOnly, + feeRate: feeRate, + feeAbsolute: feeAbsolute, + drainWallet: drainWallet, + policyPath: policyPath, + drainTo: drainTo, + rbf: rbf, + data: data); diff --git a/lib/src/generated/api/types.dart b/lib/src/generated/api/types.dart index bbeb65ad..943757e3 100644 --- a/lib/src/generated/api/types.dart +++ b/lib/src/generated/api/types.dart @@ -1,46 +1,50 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0. +// @generated by `flutter_rust_bridge`@ 2.4.0. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import import '../frb_generated.dart'; import '../lib.dart'; +import 'bitcoin.dart'; +import 'electrum.dart'; import 'error.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; import 'package:freezed_annotation/freezed_annotation.dart' hide protected; part 'types.freezed.dart'; -// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `assert_receiver_is_total_eq`, `assert_receiver_is_total_eq`, `assert_receiver_is_total_eq`, `assert_receiver_is_total_eq`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `default`, `default`, `eq`, `eq`, `eq`, `eq`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `hash`, `try_from`, `try_from`, `try_from`, `try_from`, `try_from`, `try_from`, `try_from`, `try_from`, `try_from`, `try_from` +// These types are ignored because they are not used by any `pub` functions: `AddressIndex`, `SentAndReceivedValues` +// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `assert_receiver_is_total_eq`, `assert_receiver_is_total_eq`, `clone`, `clone`, `clone`, `clone`, `clone`, `cmp`, `cmp`, `eq`, `eq`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `hash`, `partial_cmp`, `partial_cmp` -@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; +// Rust type: RustOpaqueNom > >> +abstract class MutexOptionFullScanRequestBuilderKeychainKind + implements RustOpaqueInterface {} + +// Rust type: RustOpaqueNom > >> +abstract class MutexOptionSyncRequestBuilderKeychainKindU32 + implements RustOpaqueInterface {} + +class AddressInfo { + final int index; + final FfiAddress address; + final KeychainKind keychain; + + const AddressInfo({ + required this.index, + required this.address, + required this.keychain, + }); + + @override + int get hashCode => index.hashCode ^ address.hashCode ^ keychain.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is AddressInfo && + runtimeType == other.runtimeType && + index == other.index && + address == other.address && + keychain == other.keychain; } /// Local Wallet's Balance @@ -93,275 +97,230 @@ class Balance { total == other.total; } -class BdkAddress { - final Address ptr; +class BlockId { + final int height; + final String hash; - const BdkAddress({ - required this.ptr, + const BlockId({ + required this.height, + required this.hash, }); - String asString() => core.instance.api.crateApiTypesBdkAddressAsString( - that: this, - ); + @override + int get hashCode => height.hashCode ^ hash.hashCode; - static Future fromScript( - {required BdkScriptBuf script, required Network network}) => - core.instance.api - .crateApiTypesBdkAddressFromScript(script: script, network: network); + @override + bool operator ==(Object other) => + identical(this, other) || + other is BlockId && + runtimeType == other.runtimeType && + height == other.height && + hash == other.hash; +} - static Future fromString( - {required String address, required Network network}) => - core.instance.api.crateApiTypesBdkAddressFromString( - address: address, network: network); +@freezed +sealed class ChainPosition with _$ChainPosition { + const ChainPosition._(); + + const factory ChainPosition.confirmed({ + required ConfirmationBlockTime confirmationBlockTime, + }) = ChainPosition_Confirmed; + const factory ChainPosition.unconfirmed({ + required BigInt timestamp, + }) = ChainPosition_Unconfirmed; +} - bool isValidForNetwork({required Network network}) => core.instance.api - .crateApiTypesBdkAddressIsValidForNetwork(that: this, network: network); +/// Policy regarding the use of change outputs when creating a transaction +enum ChangeSpendPolicy { + /// Use both change and non-change outputs (default) + changeAllowed, - Network network() => core.instance.api.crateApiTypesBdkAddressNetwork( - that: this, - ); + /// Only use change outputs (see [`TxBuilder::only_spend_change`]) + onlyChange, - Payload payload() => core.instance.api.crateApiTypesBdkAddressPayload( - that: this, - ); + /// Only use non-change outputs (see [`TxBuilder::do_not_spend_change`]) + changeForbidden, + ; - static BdkScriptBuf script({required BdkAddress ptr}) => - core.instance.api.crateApiTypesBdkAddressScript(ptr: ptr); + static Future default_() => + core.instance.api.crateApiTypesChangeSpendPolicyDefault(); +} - String toQrUri() => core.instance.api.crateApiTypesBdkAddressToQrUri( - that: this, - ); +class ConfirmationBlockTime { + final BlockId blockId; + final BigInt confirmationTime; + + const ConfirmationBlockTime({ + required this.blockId, + required this.confirmationTime, + }); @override - int get hashCode => ptr.hashCode; + int get hashCode => blockId.hashCode ^ confirmationTime.hashCode; @override bool operator ==(Object other) => identical(this, other) || - other is BdkAddress && + other is ConfirmationBlockTime && runtimeType == other.runtimeType && - ptr == other.ptr; + blockId == other.blockId && + confirmationTime == other.confirmationTime; } -class BdkScriptBuf { - final Uint8List bytes; +class FfiCanonicalTx { + final FfiTransaction transaction; + final ChainPosition chainPosition; - const BdkScriptBuf({ - required this.bytes, + const FfiCanonicalTx({ + required this.transaction, + required this.chainPosition, }); - String asString() => core.instance.api.crateApiTypesBdkScriptBufAsString( - that: this, - ); - - ///Creates a new empty script. - static BdkScriptBuf empty() => - core.instance.api.crateApiTypesBdkScriptBufEmpty(); - - static Future fromHex({required String s}) => - core.instance.api.crateApiTypesBdkScriptBufFromHex(s: s); - - ///Creates a new empty script with pre-allocated capacity. - static Future withCapacity({required BigInt capacity}) => - core.instance.api - .crateApiTypesBdkScriptBufWithCapacity(capacity: capacity); - @override - int get hashCode => bytes.hashCode; + int get hashCode => transaction.hashCode ^ chainPosition.hashCode; @override bool operator ==(Object other) => identical(this, other) || - other is BdkScriptBuf && + other is FfiCanonicalTx && runtimeType == other.runtimeType && - bytes == other.bytes; + transaction == other.transaction && + chainPosition == other.chainPosition; } -class BdkTransaction { - final String s; +class FfiFullScanRequest { + final MutexOptionFullScanRequestKeychainKind field0; - const BdkTransaction({ - required this.s, + const FfiFullScanRequest({ + required this.field0, }); - static Future fromBytes( - {required List transactionBytes}) => - core.instance.api.crateApiTypesBdkTransactionFromBytes( - transactionBytes: transactionBytes); - - ///List of transaction inputs. - Future> input() => - core.instance.api.crateApiTypesBdkTransactionInput( - that: this, - ); - - ///Is this a coin base transaction? - Future isCoinBase() => - core.instance.api.crateApiTypesBdkTransactionIsCoinBase( - that: this, - ); + @override + int get hashCode => field0.hashCode; - ///Returns true if the transaction itself opted in to be BIP-125-replaceable (RBF). - /// This does not cover the case where a transaction becomes replaceable due to ancestors being RBF. - Future isExplicitlyRbf() => - core.instance.api.crateApiTypesBdkTransactionIsExplicitlyRbf( - that: this, - ); + @override + bool operator ==(Object other) => + identical(this, other) || + other is FfiFullScanRequest && + runtimeType == other.runtimeType && + field0 == other.field0; +} - ///Returns true if this transactions nLockTime is enabled (BIP-65 ). - Future isLockTimeEnabled() => - core.instance.api.crateApiTypesBdkTransactionIsLockTimeEnabled( - that: this, - ); +class FfiFullScanRequestBuilder { + final MutexOptionFullScanRequestBuilderKeychainKind field0; - ///Block height or timestamp. Transaction cannot be included in a block until this height/time. - Future lockTime() => - core.instance.api.crateApiTypesBdkTransactionLockTime( - that: this, - ); + const FfiFullScanRequestBuilder({ + required this.field0, + }); - // HINT: Make it `#[frb(sync)]` to let it become the default constructor of Dart class. - static Future newInstance( - {required int version, - required LockTime lockTime, - required List input, - required List output}) => - core.instance.api.crateApiTypesBdkTransactionNew( - version: version, lockTime: lockTime, input: input, output: output); - - ///List of transaction outputs. - Future> output() => - core.instance.api.crateApiTypesBdkTransactionOutput( + Future build() => + core.instance.api.crateApiTypesFfiFullScanRequestBuilderBuild( that: this, ); - ///Encodes an object into a vector. - Future serialize() => - core.instance.api.crateApiTypesBdkTransactionSerialize( - that: this, - ); + Future inspectSpksForAllKeychains( + {required FutureOr Function(KeychainKind, int, FfiScriptBuf) + inspector}) => + core.instance.api + .crateApiTypesFfiFullScanRequestBuilderInspectSpksForAllKeychains( + that: this, inspector: inspector); - ///Returns the regular byte-wise consensus-serialized size of this transaction. - Future size() => core.instance.api.crateApiTypesBdkTransactionSize( - that: this, - ); + @override + int get hashCode => field0.hashCode; - ///Computes the txid. For non-segwit transactions this will be identical to the output of wtxid(), - /// but for segwit transactions, this will give the correct txid (not including witnesses) while wtxid will also hash witnesses. - Future txid() => core.instance.api.crateApiTypesBdkTransactionTxid( - that: this, - ); + @override + bool operator ==(Object other) => + identical(this, other) || + other is FfiFullScanRequestBuilder && + runtimeType == other.runtimeType && + field0 == other.field0; +} - ///The protocol version, is currently expected to be 1 or 2 (BIP 68). - Future version() => core.instance.api.crateApiTypesBdkTransactionVersion( - that: this, - ); +class FfiPolicy { + final Policy opaque; - ///Returns the “virtual size” (vsize) of this transaction. - /// - Future vsize() => core.instance.api.crateApiTypesBdkTransactionVsize( - that: this, - ); + const FfiPolicy({ + required this.opaque, + }); - ///Returns the regular byte-wise consensus-serialized size of this transaction. - Future weight() => - core.instance.api.crateApiTypesBdkTransactionWeight( + String id() => core.instance.api.crateApiTypesFfiPolicyId( that: this, ); @override - int get hashCode => s.hashCode; + int get hashCode => opaque.hashCode; @override bool operator ==(Object other) => identical(this, other) || - other is BdkTransaction && + other is FfiPolicy && runtimeType == other.runtimeType && - s == other.s; + opaque == other.opaque; } -///Block height and timestamp of a block -class BlockTime { - ///Confirmation block height - final int height; - - ///Confirmation block timestamp - final BigInt timestamp; +class FfiSyncRequest { + final MutexOptionSyncRequestKeychainKindU32 field0; - const BlockTime({ - required this.height, - required this.timestamp, + const FfiSyncRequest({ + required this.field0, }); @override - int get hashCode => height.hashCode ^ timestamp.hashCode; + int get hashCode => field0.hashCode; @override bool operator ==(Object other) => identical(this, other) || - other is BlockTime && + other is FfiSyncRequest && runtimeType == other.runtimeType && - height == other.height && - timestamp == other.timestamp; + field0 == other.field0; } -enum ChangeSpendPolicy { - changeAllowed, - onlyChange, - changeForbidden, - ; -} +class FfiSyncRequestBuilder { + final MutexOptionSyncRequestBuilderKeychainKindU32 field0; -@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; -} + const FfiSyncRequestBuilder({ + required this.field0, + }); -class FeeRate { - final double satPerVb; + Future build() => + core.instance.api.crateApiTypesFfiSyncRequestBuilderBuild( + that: this, + ); - const FeeRate({ - required this.satPerVb, - }); + Future inspectSpks( + {required FutureOr Function(FfiScriptBuf, SyncProgress) + inspector}) => + core.instance.api.crateApiTypesFfiSyncRequestBuilderInspectSpks( + that: this, inspector: inspector); @override - int get hashCode => satPerVb.hashCode; + int get hashCode => field0.hashCode; @override bool operator ==(Object other) => identical(this, other) || - other is FeeRate && + other is FfiSyncRequestBuilder && runtimeType == other.runtimeType && - satPerVb == other.satPerVb; + field0 == other.field0; } -/// A key-value map for an input of the corresponding index in the unsigned -class Input { - final String s; +class FfiUpdate { + final Update field0; - const Input({ - required this.s, + const FfiUpdate({ + required this.field0, }); @override - int get hashCode => s.hashCode; + int get hashCode => field0.hashCode; @override bool operator ==(Object other) => identical(this, other) || - other is Input && runtimeType == other.runtimeType && s == other.s; + other is FfiUpdate && + runtimeType == other.runtimeType && + field0 == other.field0; } ///Types of keychains @@ -373,14 +332,13 @@ enum KeychainKind { ; } -///Unspent outputs of this wallet -class LocalUtxo { +class LocalOutput { final OutPoint outpoint; final TxOut txout; final KeychainKind keychain; final bool isSpent; - const LocalUtxo({ + const LocalOutput({ required this.outpoint, required this.txout, required this.keychain, @@ -394,7 +352,7 @@ class LocalUtxo { @override bool operator ==(Object other) => identical(this, other) || - other is LocalUtxo && + other is LocalOutput && runtimeType == other.runtimeType && outpoint == other.outpoint && txout == other.txout && @@ -428,73 +386,9 @@ enum Network { ///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; + static Future default_() => + core.instance.api.crateApiTypesNetworkDefault(); } @freezed @@ -507,30 +401,6 @@ sealed class RbfValue with _$RbfValue { ) = RbfValue_Value; } -/// A output script and an amount of satoshis. -class ScriptAmount { - final BdkScriptBuf script; - final BigInt amount; - - const ScriptAmount({ - required this.script, - required this.amount, - }); - - @override - int get hashCode => script.hashCode ^ amount.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is ScriptAmount && - runtimeType == other.runtimeType && - script == other.script && - amount == other.amount; -} - -/// Options for a software signer -/// /// Adjust the behavior of our software signers and the way a transaction is finalized class SignOptions { /// Whether the signer should trust the `witness_utxo`, if the `non_witness_utxo` hasn't been @@ -561,11 +431,6 @@ class SignOptions { /// 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. @@ -586,18 +451,19 @@ class SignOptions { required this.trustWitnessUtxo, this.assumeHeight, required this.allowAllSighashes, - required this.removePartialSigs, required this.tryFinalize, required this.signWithTapInternalKey, required this.allowGrinding, }); + static Future default_() => + core.instance.api.crateApiTypesSignOptionsDefault(); + @override int get hashCode => trustWitnessUtxo.hashCode ^ assumeHeight.hashCode ^ allowAllSighashes.hashCode ^ - removePartialSigs.hashCode ^ tryFinalize.hashCode ^ signWithTapInternalKey.hashCode ^ allowGrinding.hashCode; @@ -610,227 +476,60 @@ class SignOptions { 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; +/// The progress of [`SyncRequest`]. +class SyncProgress { + /// Script pubkeys consumed by the request. + final BigInt spksConsumed; - const SqliteDbConfiguration({ - required this.path, - }); + /// Script pubkeys remaining in the request. + final BigInt spksRemaining; - @override - int get hashCode => path.hashCode; + /// Txids consumed by the request. + final BigInt txidsConsumed; - @override - bool operator ==(Object other) => - identical(this, other) || - other is SqliteDbConfiguration && - runtimeType == other.runtimeType && - path == other.path; -} + /// Txids remaining in the request. + final BigInt txidsRemaining; -///A wallet transaction -class TransactionDetails { - final BdkTransaction? transaction; - - /// Transaction id. - final String txid; - - /// Received value (sats) - /// Sum of owned outputs of this transaction. - final BigInt received; - - /// Sent value (sats) - /// Sum of owned inputs of this transaction. - final BigInt sent; - - /// Fee value (sats) if confirmed. - /// The availability of the fee depends on the backend. It's never None with an Electrum - /// Server backend, but it could be None with a Bitcoin RPC node without txindex that receive - /// funds while offline. - final BigInt? fee; - - /// If the transaction is confirmed, contains height and timestamp of the block containing the - /// transaction, unconfirmed transaction contains `None`. - final BlockTime? confirmationTime; - - const TransactionDetails({ - this.transaction, - required this.txid, - required this.received, - required this.sent, - this.fee, - this.confirmationTime, - }); + /// Outpoints consumed by the request. + final BigInt outpointsConsumed; - @override - int get hashCode => - transaction.hashCode ^ - txid.hashCode ^ - received.hashCode ^ - sent.hashCode ^ - fee.hashCode ^ - confirmationTime.hashCode; + /// Outpoints remaining in the request. + final BigInt outpointsRemaining; - @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, + const SyncProgress({ + required this.spksConsumed, + required this.spksRemaining, + required this.txidsConsumed, + required this.txidsRemaining, + required this.outpointsConsumed, + required this.outpointsRemaining, }); @override int get hashCode => - previousOutput.hashCode ^ - scriptSig.hashCode ^ - sequence.hashCode ^ - witness.hashCode; + spksConsumed.hashCode ^ + spksRemaining.hashCode ^ + txidsConsumed.hashCode ^ + txidsRemaining.hashCode ^ + outpointsConsumed.hashCode ^ + outpointsRemaining.hashCode; @override bool operator ==(Object other) => identical(this, other) || - other is TxIn && + other is SyncProgress && runtimeType == other.runtimeType && - previousOutput == other.previousOutput && - scriptSig == other.scriptSig && - sequence == other.sequence && - witness == other.witness; -} - -///A transaction output, which defines new coins to be created from old ones. -class TxOut { - /// The value of the output, in satoshis. - final BigInt value; - - /// The address of the output. - final BdkScriptBuf scriptPubkey; - - const TxOut({ - required this.value, - required this.scriptPubkey, - }); - - @override - int get hashCode => value.hashCode ^ scriptPubkey.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is TxOut && - runtimeType == other.runtimeType && - value == other.value && - scriptPubkey == other.scriptPubkey; -} - -enum Variant { - bech32, - bech32M, - ; -} - -enum WitnessVersion { - /// Initial version of witness program. Used for P2WPKH and P2WPK outputs - v0, - - /// Version of witness program used for Taproot P2TR outputs. - v1, - - /// Future (unsupported) version of witness program. - v2, - - /// Future (unsupported) version of witness program. - v3, - - /// Future (unsupported) version of witness program. - v4, - - /// Future (unsupported) version of witness program. - v5, - - /// Future (unsupported) version of witness program. - v6, - - /// Future (unsupported) version of witness program. - v7, - - /// Future (unsupported) version of witness program. - v8, - - /// Future (unsupported) version of witness program. - v9, - - /// Future (unsupported) version of witness program. - v10, - - /// Future (unsupported) version of witness program. - v11, - - /// Future (unsupported) version of witness program. - v12, - - /// Future (unsupported) version of witness program. - v13, - - /// Future (unsupported) version of witness program. - v14, - - /// Future (unsupported) version of witness program. - v15, - - /// Future (unsupported) version of witness program. - v16, - ; + spksConsumed == other.spksConsumed && + spksRemaining == other.spksRemaining && + txidsConsumed == other.txidsConsumed && + txidsRemaining == other.txidsRemaining && + outpointsConsumed == other.outpointsConsumed && + outpointsRemaining == other.outpointsRemaining; } ///Type describing entropy length (aka word count) in the mnemonic diff --git a/lib/src/generated/api/types.freezed.dart b/lib/src/generated/api/types.freezed.dart index dc17fb9f..183c9e24 100644 --- a/lib/src/generated/api/types.freezed.dart +++ b/lib/src/generated/api/types.freezed.dart @@ -15,70 +15,59 @@ final _privateConstructorUsedError = UnsupportedError( 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); /// @nodoc -mixin _$AddressIndex { +mixin _$ChainPosition { @optionalTypeArgs TResult when({ - required TResult Function() increase, - required TResult Function() lastUnused, - required TResult Function(int index) peek, - required TResult Function(int index) reset, + required TResult Function(ConfirmationBlockTime confirmationBlockTime) + confirmed, + required TResult Function(BigInt timestamp) unconfirmed, }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? whenOrNull({ - TResult? Function()? increase, - TResult? Function()? lastUnused, - TResult? Function(int index)? peek, - TResult? Function(int index)? reset, + TResult? Function(ConfirmationBlockTime confirmationBlockTime)? confirmed, + TResult? Function(BigInt timestamp)? unconfirmed, }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeWhen({ - TResult Function()? increase, - TResult Function()? lastUnused, - TResult Function(int index)? peek, - TResult Function(int index)? reset, + TResult Function(ConfirmationBlockTime confirmationBlockTime)? confirmed, + TResult Function(BigInt timestamp)? unconfirmed, 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, + required TResult Function(ChainPosition_Confirmed value) confirmed, + required TResult Function(ChainPosition_Unconfirmed value) unconfirmed, }) => 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, + TResult? Function(ChainPosition_Confirmed value)? confirmed, + TResult? Function(ChainPosition_Unconfirmed value)? unconfirmed, }) => 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, + TResult Function(ChainPosition_Confirmed value)? confirmed, + TResult Function(ChainPosition_Unconfirmed value)? unconfirmed, required TResult orElse(), }) => throw _privateConstructorUsedError; } /// @nodoc -abstract class $AddressIndexCopyWith<$Res> { - factory $AddressIndexCopyWith( - AddressIndex value, $Res Function(AddressIndex) then) = - _$AddressIndexCopyWithImpl<$Res, AddressIndex>; +abstract class $ChainPositionCopyWith<$Res> { + factory $ChainPositionCopyWith( + ChainPosition value, $Res Function(ChainPosition) then) = + _$ChainPositionCopyWithImpl<$Res, ChainPosition>; } /// @nodoc -class _$AddressIndexCopyWithImpl<$Res, $Val extends AddressIndex> - implements $AddressIndexCopyWith<$Res> { - _$AddressIndexCopyWithImpl(this._value, this._then); +class _$ChainPositionCopyWithImpl<$Res, $Val extends ChainPosition> + implements $ChainPositionCopyWith<$Res> { + _$ChainPositionCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -87,75 +76,99 @@ class _$AddressIndexCopyWithImpl<$Res, $Val extends AddressIndex> } /// @nodoc -abstract class _$$AddressIndex_IncreaseImplCopyWith<$Res> { - factory _$$AddressIndex_IncreaseImplCopyWith( - _$AddressIndex_IncreaseImpl value, - $Res Function(_$AddressIndex_IncreaseImpl) then) = - __$$AddressIndex_IncreaseImplCopyWithImpl<$Res>; +abstract class _$$ChainPosition_ConfirmedImplCopyWith<$Res> { + factory _$$ChainPosition_ConfirmedImplCopyWith( + _$ChainPosition_ConfirmedImpl value, + $Res Function(_$ChainPosition_ConfirmedImpl) then) = + __$$ChainPosition_ConfirmedImplCopyWithImpl<$Res>; + @useResult + $Res call({ConfirmationBlockTime confirmationBlockTime}); } /// @nodoc -class __$$AddressIndex_IncreaseImplCopyWithImpl<$Res> - extends _$AddressIndexCopyWithImpl<$Res, _$AddressIndex_IncreaseImpl> - implements _$$AddressIndex_IncreaseImplCopyWith<$Res> { - __$$AddressIndex_IncreaseImplCopyWithImpl(_$AddressIndex_IncreaseImpl _value, - $Res Function(_$AddressIndex_IncreaseImpl) _then) +class __$$ChainPosition_ConfirmedImplCopyWithImpl<$Res> + extends _$ChainPositionCopyWithImpl<$Res, _$ChainPosition_ConfirmedImpl> + implements _$$ChainPosition_ConfirmedImplCopyWith<$Res> { + __$$ChainPosition_ConfirmedImplCopyWithImpl( + _$ChainPosition_ConfirmedImpl _value, + $Res Function(_$ChainPosition_ConfirmedImpl) _then) : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? confirmationBlockTime = null, + }) { + return _then(_$ChainPosition_ConfirmedImpl( + confirmationBlockTime: null == confirmationBlockTime + ? _value.confirmationBlockTime + : confirmationBlockTime // ignore: cast_nullable_to_non_nullable + as ConfirmationBlockTime, + )); + } } /// @nodoc -class _$AddressIndex_IncreaseImpl extends AddressIndex_Increase { - const _$AddressIndex_IncreaseImpl() : super._(); +class _$ChainPosition_ConfirmedImpl extends ChainPosition_Confirmed { + const _$ChainPosition_ConfirmedImpl({required this.confirmationBlockTime}) + : super._(); + + @override + final ConfirmationBlockTime confirmationBlockTime; @override String toString() { - return 'AddressIndex.increase()'; + return 'ChainPosition.confirmed(confirmationBlockTime: $confirmationBlockTime)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$AddressIndex_IncreaseImpl); + other is _$ChainPosition_ConfirmedImpl && + (identical(other.confirmationBlockTime, confirmationBlockTime) || + other.confirmationBlockTime == confirmationBlockTime)); } @override - int get hashCode => runtimeType.hashCode; + int get hashCode => Object.hash(runtimeType, confirmationBlockTime); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$ChainPosition_ConfirmedImplCopyWith<_$ChainPosition_ConfirmedImpl> + get copyWith => __$$ChainPosition_ConfirmedImplCopyWithImpl< + _$ChainPosition_ConfirmedImpl>(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, + required TResult Function(ConfirmationBlockTime confirmationBlockTime) + confirmed, + required TResult Function(BigInt timestamp) unconfirmed, }) { - return increase(); + return confirmed(confirmationBlockTime); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function()? increase, - TResult? Function()? lastUnused, - TResult? Function(int index)? peek, - TResult? Function(int index)? reset, + TResult? Function(ConfirmationBlockTime confirmationBlockTime)? confirmed, + TResult? Function(BigInt timestamp)? unconfirmed, }) { - return increase?.call(); + return confirmed?.call(confirmationBlockTime); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function()? increase, - TResult Function()? lastUnused, - TResult Function(int index)? peek, - TResult Function(int index)? reset, + TResult Function(ConfirmationBlockTime confirmationBlockTime)? confirmed, + TResult Function(BigInt timestamp)? unconfirmed, required TResult orElse(), }) { - if (increase != null) { - return increase(); + if (confirmed != null) { + return confirmed(confirmationBlockTime); } return orElse(); } @@ -163,117 +176,140 @@ class _$AddressIndex_IncreaseImpl extends AddressIndex_Increase { @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, + required TResult Function(ChainPosition_Confirmed value) confirmed, + required TResult Function(ChainPosition_Unconfirmed value) unconfirmed, }) { - return increase(this); + return confirmed(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, + TResult? Function(ChainPosition_Confirmed value)? confirmed, + TResult? Function(ChainPosition_Unconfirmed value)? unconfirmed, }) { - return increase?.call(this); + return confirmed?.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, + TResult Function(ChainPosition_Confirmed value)? confirmed, + TResult Function(ChainPosition_Unconfirmed value)? unconfirmed, required TResult orElse(), }) { - if (increase != null) { - return increase(this); + if (confirmed != null) { + return confirmed(this); } return orElse(); } } -abstract class AddressIndex_Increase extends AddressIndex { - const factory AddressIndex_Increase() = _$AddressIndex_IncreaseImpl; - const AddressIndex_Increase._() : super._(); +abstract class ChainPosition_Confirmed extends ChainPosition { + const factory ChainPosition_Confirmed( + {required final ConfirmationBlockTime confirmationBlockTime}) = + _$ChainPosition_ConfirmedImpl; + const ChainPosition_Confirmed._() : super._(); + + ConfirmationBlockTime get confirmationBlockTime; + @JsonKey(ignore: true) + _$$ChainPosition_ConfirmedImplCopyWith<_$ChainPosition_ConfirmedImpl> + get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$AddressIndex_LastUnusedImplCopyWith<$Res> { - factory _$$AddressIndex_LastUnusedImplCopyWith( - _$AddressIndex_LastUnusedImpl value, - $Res Function(_$AddressIndex_LastUnusedImpl) then) = - __$$AddressIndex_LastUnusedImplCopyWithImpl<$Res>; +abstract class _$$ChainPosition_UnconfirmedImplCopyWith<$Res> { + factory _$$ChainPosition_UnconfirmedImplCopyWith( + _$ChainPosition_UnconfirmedImpl value, + $Res Function(_$ChainPosition_UnconfirmedImpl) then) = + __$$ChainPosition_UnconfirmedImplCopyWithImpl<$Res>; + @useResult + $Res call({BigInt timestamp}); } /// @nodoc -class __$$AddressIndex_LastUnusedImplCopyWithImpl<$Res> - extends _$AddressIndexCopyWithImpl<$Res, _$AddressIndex_LastUnusedImpl> - implements _$$AddressIndex_LastUnusedImplCopyWith<$Res> { - __$$AddressIndex_LastUnusedImplCopyWithImpl( - _$AddressIndex_LastUnusedImpl _value, - $Res Function(_$AddressIndex_LastUnusedImpl) _then) +class __$$ChainPosition_UnconfirmedImplCopyWithImpl<$Res> + extends _$ChainPositionCopyWithImpl<$Res, _$ChainPosition_UnconfirmedImpl> + implements _$$ChainPosition_UnconfirmedImplCopyWith<$Res> { + __$$ChainPosition_UnconfirmedImplCopyWithImpl( + _$ChainPosition_UnconfirmedImpl _value, + $Res Function(_$ChainPosition_UnconfirmedImpl) _then) : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? timestamp = null, + }) { + return _then(_$ChainPosition_UnconfirmedImpl( + timestamp: null == timestamp + ? _value.timestamp + : timestamp // ignore: cast_nullable_to_non_nullable + as BigInt, + )); + } } /// @nodoc -class _$AddressIndex_LastUnusedImpl extends AddressIndex_LastUnused { - const _$AddressIndex_LastUnusedImpl() : super._(); +class _$ChainPosition_UnconfirmedImpl extends ChainPosition_Unconfirmed { + const _$ChainPosition_UnconfirmedImpl({required this.timestamp}) : super._(); + + @override + final BigInt timestamp; @override String toString() { - return 'AddressIndex.lastUnused()'; + return 'ChainPosition.unconfirmed(timestamp: $timestamp)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$AddressIndex_LastUnusedImpl); + other is _$ChainPosition_UnconfirmedImpl && + (identical(other.timestamp, timestamp) || + other.timestamp == timestamp)); } @override - int get hashCode => runtimeType.hashCode; + int get hashCode => Object.hash(runtimeType, timestamp); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$ChainPosition_UnconfirmedImplCopyWith<_$ChainPosition_UnconfirmedImpl> + get copyWith => __$$ChainPosition_UnconfirmedImplCopyWithImpl< + _$ChainPosition_UnconfirmedImpl>(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, + required TResult Function(ConfirmationBlockTime confirmationBlockTime) + confirmed, + required TResult Function(BigInt timestamp) unconfirmed, }) { - return lastUnused(); + return unconfirmed(timestamp); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function()? increase, - TResult? Function()? lastUnused, - TResult? Function(int index)? peek, - TResult? Function(int index)? reset, + TResult? Function(ConfirmationBlockTime confirmationBlockTime)? confirmed, + TResult? Function(BigInt timestamp)? unconfirmed, }) { - return lastUnused?.call(); + return unconfirmed?.call(timestamp); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function()? increase, - TResult Function()? lastUnused, - TResult Function(int index)? peek, - TResult Function(int index)? reset, + TResult Function(ConfirmationBlockTime confirmationBlockTime)? confirmed, + TResult Function(BigInt timestamp)? unconfirmed, required TResult orElse(), }) { - if (lastUnused != null) { - return lastUnused(); + if (unconfirmed != null) { + return unconfirmed(timestamp); } return orElse(); } @@ -281,72 +317,153 @@ class _$AddressIndex_LastUnusedImpl extends AddressIndex_LastUnused { @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, + required TResult Function(ChainPosition_Confirmed value) confirmed, + required TResult Function(ChainPosition_Unconfirmed value) unconfirmed, }) { - return lastUnused(this); + return unconfirmed(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, + TResult? Function(ChainPosition_Confirmed value)? confirmed, + TResult? Function(ChainPosition_Unconfirmed value)? unconfirmed, }) { - return lastUnused?.call(this); + return unconfirmed?.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, + TResult Function(ChainPosition_Confirmed value)? confirmed, + TResult Function(ChainPosition_Unconfirmed value)? unconfirmed, required TResult orElse(), }) { - if (lastUnused != null) { - return lastUnused(this); + if (unconfirmed != null) { + return unconfirmed(this); } return orElse(); } } -abstract class AddressIndex_LastUnused extends AddressIndex { - const factory AddressIndex_LastUnused() = _$AddressIndex_LastUnusedImpl; - const AddressIndex_LastUnused._() : super._(); +abstract class ChainPosition_Unconfirmed extends ChainPosition { + const factory ChainPosition_Unconfirmed({required final BigInt timestamp}) = + _$ChainPosition_UnconfirmedImpl; + const ChainPosition_Unconfirmed._() : super._(); + + BigInt get timestamp; + @JsonKey(ignore: true) + _$$ChainPosition_UnconfirmedImplCopyWith<_$ChainPosition_UnconfirmedImpl> + 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 _$$AddressIndex_PeekImplCopyWith<$Res> { - factory _$$AddressIndex_PeekImplCopyWith(_$AddressIndex_PeekImpl value, - $Res Function(_$AddressIndex_PeekImpl) then) = - __$$AddressIndex_PeekImplCopyWithImpl<$Res>; +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 index}); + $Res call({int field0}); } /// @nodoc -class __$$AddressIndex_PeekImplCopyWithImpl<$Res> - extends _$AddressIndexCopyWithImpl<$Res, _$AddressIndex_PeekImpl> - implements _$$AddressIndex_PeekImplCopyWith<$Res> { - __$$AddressIndex_PeekImplCopyWithImpl(_$AddressIndex_PeekImpl _value, - $Res Function(_$AddressIndex_PeekImpl) _then) +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? index = null, + Object? field0 = null, }) { - return _then(_$AddressIndex_PeekImpl( - index: null == index - ? _value.index - : index // ignore: cast_nullable_to_non_nullable + return _then(_$LockTime_BlocksImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable as int, )); } @@ -354,68 +471,62 @@ class __$$AddressIndex_PeekImplCopyWithImpl<$Res> /// @nodoc -class _$AddressIndex_PeekImpl extends AddressIndex_Peek { - const _$AddressIndex_PeekImpl({required this.index}) : super._(); +class _$LockTime_BlocksImpl extends LockTime_Blocks { + const _$LockTime_BlocksImpl(this.field0) : super._(); @override - final int index; + final int field0; @override String toString() { - return 'AddressIndex.peek(index: $index)'; + return 'LockTime.blocks(field0: $field0)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$AddressIndex_PeekImpl && - (identical(other.index, index) || other.index == index)); + other is _$LockTime_BlocksImpl && + (identical(other.field0, field0) || other.field0 == field0)); } @override - int get hashCode => Object.hash(runtimeType, index); + int get hashCode => Object.hash(runtimeType, field0); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$AddressIndex_PeekImplCopyWith<_$AddressIndex_PeekImpl> get copyWith => - __$$AddressIndex_PeekImplCopyWithImpl<_$AddressIndex_PeekImpl>( + _$$LockTime_BlocksImplCopyWith<_$LockTime_BlocksImpl> get copyWith => + __$$LockTime_BlocksImplCopyWithImpl<_$LockTime_BlocksImpl>( 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, + required TResult Function(int field0) blocks, + required TResult Function(int field0) seconds, }) { - return peek(index); + return blocks(field0); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function()? increase, - TResult? Function()? lastUnused, - TResult? Function(int index)? peek, - TResult? Function(int index)? reset, + TResult? Function(int field0)? blocks, + TResult? Function(int field0)? seconds, }) { - return peek?.call(index); + return blocks?.call(field0); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function()? increase, - TResult Function()? lastUnused, - TResult Function(int index)? peek, - TResult Function(int index)? reset, + TResult Function(int field0)? blocks, + TResult Function(int field0)? seconds, required TResult orElse(), }) { - if (peek != null) { - return peek(index); + if (blocks != null) { + return blocks(field0); } return orElse(); } @@ -423,78 +534,75 @@ class _$AddressIndex_PeekImpl extends AddressIndex_Peek { @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, + required TResult Function(LockTime_Blocks value) blocks, + required TResult Function(LockTime_Seconds value) seconds, }) { - return peek(this); + return blocks(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, + TResult? Function(LockTime_Blocks value)? blocks, + TResult? Function(LockTime_Seconds value)? seconds, }) { - return peek?.call(this); + return blocks?.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, + TResult Function(LockTime_Blocks value)? blocks, + TResult Function(LockTime_Seconds value)? seconds, required TResult orElse(), }) { - if (peek != null) { - return peek(this); + if (blocks != null) { + return blocks(this); } return orElse(); } } -abstract class AddressIndex_Peek extends AddressIndex { - const factory AddressIndex_Peek({required final int index}) = - _$AddressIndex_PeekImpl; - const AddressIndex_Peek._() : super._(); +abstract class LockTime_Blocks extends LockTime { + const factory LockTime_Blocks(final int field0) = _$LockTime_BlocksImpl; + const LockTime_Blocks._() : super._(); - int get index; + @override + int get field0; + @override @JsonKey(ignore: true) - _$$AddressIndex_PeekImplCopyWith<_$AddressIndex_PeekImpl> get copyWith => + _$$LockTime_BlocksImplCopyWith<_$LockTime_BlocksImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$AddressIndex_ResetImplCopyWith<$Res> { - factory _$$AddressIndex_ResetImplCopyWith(_$AddressIndex_ResetImpl value, - $Res Function(_$AddressIndex_ResetImpl) then) = - __$$AddressIndex_ResetImplCopyWithImpl<$Res>; +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 index}); + $Res call({int field0}); } /// @nodoc -class __$$AddressIndex_ResetImplCopyWithImpl<$Res> - extends _$AddressIndexCopyWithImpl<$Res, _$AddressIndex_ResetImpl> - implements _$$AddressIndex_ResetImplCopyWith<$Res> { - __$$AddressIndex_ResetImplCopyWithImpl(_$AddressIndex_ResetImpl _value, - $Res Function(_$AddressIndex_ResetImpl) _then) +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? index = null, + Object? field0 = null, }) { - return _then(_$AddressIndex_ResetImpl( - index: null == index - ? _value.index - : index // ignore: cast_nullable_to_non_nullable + return _then(_$LockTime_SecondsImpl( + null == field0 + ? _value.field0 + : field0 // ignore: cast_nullable_to_non_nullable as int, )); } @@ -502,68 +610,62 @@ class __$$AddressIndex_ResetImplCopyWithImpl<$Res> /// @nodoc -class _$AddressIndex_ResetImpl extends AddressIndex_Reset { - const _$AddressIndex_ResetImpl({required this.index}) : super._(); +class _$LockTime_SecondsImpl extends LockTime_Seconds { + const _$LockTime_SecondsImpl(this.field0) : super._(); @override - final int index; + final int field0; @override String toString() { - return 'AddressIndex.reset(index: $index)'; + return 'LockTime.seconds(field0: $field0)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$AddressIndex_ResetImpl && - (identical(other.index, index) || other.index == index)); + other is _$LockTime_SecondsImpl && + (identical(other.field0, field0) || other.field0 == field0)); } @override - int get hashCode => Object.hash(runtimeType, index); + int get hashCode => Object.hash(runtimeType, field0); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$AddressIndex_ResetImplCopyWith<_$AddressIndex_ResetImpl> get copyWith => - __$$AddressIndex_ResetImplCopyWithImpl<_$AddressIndex_ResetImpl>( + _$$LockTime_SecondsImplCopyWith<_$LockTime_SecondsImpl> get copyWith => + __$$LockTime_SecondsImplCopyWithImpl<_$LockTime_SecondsImpl>( 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, + required TResult Function(int field0) blocks, + required TResult Function(int field0) seconds, }) { - return reset(index); + return seconds(field0); } @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function()? increase, - TResult? Function()? lastUnused, - TResult? Function(int index)? peek, - TResult? Function(int index)? reset, + TResult? Function(int field0)? blocks, + TResult? Function(int field0)? seconds, }) { - return reset?.call(index); + return seconds?.call(field0); } @override @optionalTypeArgs TResult maybeWhen({ - TResult Function()? increase, - TResult Function()? lastUnused, - TResult Function(int index)? peek, - TResult Function(int index)? reset, + TResult Function(int field0)? blocks, + TResult Function(int field0)? seconds, required TResult orElse(), }) { - if (reset != null) { - return reset(index); + if (seconds != null) { + return seconds(field0); } return orElse(); } @@ -571,1394 +673,47 @@ class _$AddressIndex_ResetImpl extends AddressIndex_Reset { @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, + required TResult Function(LockTime_Blocks value) blocks, + required TResult Function(LockTime_Seconds value) seconds, }) { - return reset(this); + return seconds(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, + TResult? Function(LockTime_Blocks value)? blocks, + TResult? Function(LockTime_Seconds value)? seconds, }) { - return reset?.call(this); + return seconds?.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, + TResult Function(LockTime_Blocks value)? blocks, + TResult Function(LockTime_Seconds value)? seconds, required TResult orElse(), }) { - if (reset != null) { - return reset(this); + if (seconds != null) { + return seconds(this); } return orElse(); } } -abstract class AddressIndex_Reset extends AddressIndex { - const factory AddressIndex_Reset({required final int index}) = - _$AddressIndex_ResetImpl; - const AddressIndex_Reset._() : super._(); +abstract class LockTime_Seconds extends LockTime { + const factory LockTime_Seconds(final int field0) = _$LockTime_SecondsImpl; + const LockTime_Seconds._() : super._(); - int get index; + @override + int get field0; + @override @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(), - }) => + _$$LockTime_SecondsImplCopyWith<_$LockTime_SecondsImpl> get copyWith => 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 diff --git a/lib/src/generated/api/wallet.dart b/lib/src/generated/api/wallet.dart index b08d5dc4..900cd864 100644 --- a/lib/src/generated/api/wallet.dart +++ b/lib/src/generated/api/wallet.dart @@ -1,174 +1,143 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0. +// @generated by `flutter_rust_bridge`@ 2.4.0. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import import '../frb_generated.dart'; import '../lib.dart'; -import 'blockchain.dart'; +import 'bitcoin.dart'; import 'descriptor.dart'; +import 'electrum.dart'; import 'error.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; -import 'psbt.dart'; +import 'store.dart'; import 'types.dart'; // These functions are ignored because they are not marked as `pub`: `get_wallet` // These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `fmt` -Future<(BdkPsbt, TransactionDetails)> finishBumpFeeTxBuilder( - {required String txid, - required double feeRate, - BdkAddress? allowShrinking, - required BdkWallet wallet, - required bool enableRbf, - int? nSequence}) => - core.instance.api.crateApiWalletFinishBumpFeeTxBuilder( - txid: txid, - feeRate: feeRate, - allowShrinking: allowShrinking, - wallet: wallet, - enableRbf: enableRbf, - nSequence: nSequence); - -Future<(BdkPsbt, TransactionDetails)> txBuilderFinish( - {required BdkWallet wallet, - required List recipients, - required List utxos, - (OutPoint, Input, BigInt)? foreignUtxo, - required List unSpendable, - required ChangeSpendPolicy changePolicy, - required bool manuallySelectedOnly, - double? feeRate, - BigInt? feeAbsolute, - required bool drainWallet, - BdkScriptBuf? drainTo, - RbfValue? rbf, - required List data}) => - core.instance.api.crateApiWalletTxBuilderFinish( - wallet: wallet, - recipients: recipients, - utxos: utxos, - foreignUtxo: foreignUtxo, - unSpendable: unSpendable, - changePolicy: changePolicy, - manuallySelectedOnly: manuallySelectedOnly, - feeRate: feeRate, - feeAbsolute: feeAbsolute, - drainWallet: drainWallet, - drainTo: drainTo, - rbf: rbf, - data: data); - -class BdkWallet { - final MutexWalletAnyDatabase ptr; - - const BdkWallet({ - required this.ptr, +class FfiWallet { + final MutexPersistedWalletConnection opaque; + + const FfiWallet({ + required this.opaque, }); - /// Return a derived address using the external descriptor, see AddressIndex for available address index selection - /// strategies. If none of the keys in the descriptor are derivable (i.e. the descriptor does not end with a * character) - /// then the same address will always be returned for any AddressIndex. - static (BdkAddress, int) getAddress( - {required BdkWallet ptr, required AddressIndex addressIndex}) => - core.instance.api.crateApiWalletBdkWalletGetAddress( - ptr: ptr, addressIndex: addressIndex); + Future applyUpdate({required FfiUpdate update}) => core.instance.api + .crateApiWalletFfiWalletApplyUpdate(that: this, update: update); + + static Future calculateFee( + {required FfiWallet opaque, required FfiTransaction tx}) => + core.instance.api + .crateApiWalletFfiWalletCalculateFee(opaque: opaque, tx: tx); + + static Future calculateFeeRate( + {required FfiWallet opaque, required FfiTransaction tx}) => + core.instance.api + .crateApiWalletFfiWalletCalculateFeeRate(opaque: opaque, tx: tx); /// Return the balance, meaning the sum of this wallet’s unspent outputs’ values. Note that this method only operates /// on the internal database, which first needs to be Wallet.sync manually. - Balance getBalance() => core.instance.api.crateApiWalletBdkWalletGetBalance( + Balance getBalance() => core.instance.api.crateApiWalletFfiWalletGetBalance( that: this, ); - ///Returns the descriptor used to create addresses for a particular keychain. - static BdkDescriptor getDescriptorForKeychain( - {required BdkWallet ptr, required KeychainKind keychain}) => - core.instance.api.crateApiWalletBdkWalletGetDescriptorForKeychain( - ptr: ptr, keychain: keychain); + ///Get a single transaction from the wallet as a WalletTx (if the transaction exists). + FfiCanonicalTx? getTx({required String txid}) => + core.instance.api.crateApiWalletFfiWalletGetTx(that: this, txid: txid); - /// Return a derived address using the internal (change) descriptor. - /// - /// If the wallet doesn't have an internal descriptor it will use the external descriptor. - /// - /// see [AddressIndex] for available address index selection strategies. If none of the keys - /// in the descriptor are derivable (i.e. does not end with /*) then the same address will always - /// be returned for any [AddressIndex]. - static (BdkAddress, int) getInternalAddress( - {required BdkWallet ptr, required AddressIndex addressIndex}) => - core.instance.api.crateApiWalletBdkWalletGetInternalAddress( - ptr: ptr, addressIndex: addressIndex); - - ///get the corresponding PSBT Input for a LocalUtxo - Future getPsbtInput( - {required LocalUtxo utxo, - required bool onlyWitnessUtxo, - PsbtSigHashType? sighashType}) => - core.instance.api.crateApiWalletBdkWalletGetPsbtInput( - that: this, - utxo: utxo, - onlyWitnessUtxo: onlyWitnessUtxo, - sighashType: sighashType); - - /// Return whether or not a script is part of this wallet (either internal or external). - bool isMine({required BdkScriptBuf script}) => core.instance.api - .crateApiWalletBdkWalletIsMine(that: this, script: script); - - /// Return the list of transactions made and received by the wallet. Note that this method only operate on the internal database, which first needs to be [Wallet.sync] manually. - List listTransactions({required bool includeRaw}) => - core.instance.api.crateApiWalletBdkWalletListTransactions( - that: this, includeRaw: includeRaw); - - /// Return the list of unspent outputs of this wallet. Note that this method only operates on the internal database, - /// which first needs to be Wallet.sync manually. - List listUnspent() => - core.instance.api.crateApiWalletBdkWalletListUnspent( + bool isMine({required FfiScriptBuf script}) => core.instance.api + .crateApiWalletFfiWalletIsMine(that: this, script: script); + + ///List all relevant outputs (includes both spent and unspent, confirmed and unconfirmed). + List listOutput() => + core.instance.api.crateApiWalletFfiWalletListOutput( + that: this, + ); + + /// Return the list of unspent outputs of this wallet. + List listUnspent() => + core.instance.api.crateApiWalletFfiWalletListUnspent( that: this, ); + static Future load( + {required FfiDescriptor descriptor, + required FfiDescriptor changeDescriptor, + required FfiConnection connection}) => + core.instance.api.crateApiWalletFfiWalletLoad( + descriptor: descriptor, + changeDescriptor: changeDescriptor, + connection: connection); + /// Get the Bitcoin network the wallet is using. - Network network() => core.instance.api.crateApiWalletBdkWalletNetwork( + Network network() => core.instance.api.crateApiWalletFfiWalletNetwork( that: this, ); // HINT: Make it `#[frb(sync)]` to let it become the default constructor of Dart class. - static Future newInstance( - {required BdkDescriptor descriptor, - BdkDescriptor? changeDescriptor, + static Future newInstance( + {required FfiDescriptor descriptor, + required FfiDescriptor changeDescriptor, required Network network, - required DatabaseConfig databaseConfig}) => - core.instance.api.crateApiWalletBdkWalletNew( + required FfiConnection connection}) => + core.instance.api.crateApiWalletFfiWalletNew( descriptor: descriptor, changeDescriptor: changeDescriptor, network: network, - databaseConfig: databaseConfig); + connection: connection); + + static Future persist( + {required FfiWallet opaque, required FfiConnection connection}) => + core.instance.api.crateApiWalletFfiWalletPersist( + opaque: opaque, connection: connection); - /// 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. + static FfiPolicy? policies( + {required FfiWallet opaque, required KeychainKind keychainKind}) => + core.instance.api.crateApiWalletFfiWalletPolicies( + opaque: opaque, keychainKind: keychainKind); + + /// Attempt to reveal the next address of the given `keychain`. /// - /// 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. + /// This will increment the keychain's derivation index. If the keychain's descriptor doesn't + /// contain a wildcard or every address is already revealed up to the maximum derivation + /// index defined in [BIP32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki), + /// then the last revealed address will be returned. + static AddressInfo revealNextAddress( + {required FfiWallet opaque, required KeychainKind keychainKind}) => + core.instance.api.crateApiWalletFfiWalletRevealNextAddress( + opaque: opaque, keychainKind: keychainKind); + static Future sign( - {required BdkWallet ptr, - required BdkPsbt psbt, - SignOptions? signOptions}) => - core.instance.api.crateApiWalletBdkWalletSign( - ptr: ptr, psbt: psbt, signOptions: signOptions); - - /// Sync the internal database with the blockchain. - static Future sync( - {required BdkWallet ptr, required BdkBlockchain blockchain}) => - core.instance.api - .crateApiWalletBdkWalletSync(ptr: ptr, blockchain: blockchain); + {required FfiWallet opaque, + required FfiPsbt psbt, + required SignOptions signOptions}) => + core.instance.api.crateApiWalletFfiWalletSign( + opaque: opaque, psbt: psbt, signOptions: signOptions); + + Future startFullScan() => + core.instance.api.crateApiWalletFfiWalletStartFullScan( + that: this, + ); + + Future startSyncWithRevealedSpks() => + core.instance.api.crateApiWalletFfiWalletStartSyncWithRevealedSpks( + that: this, + ); + + ///Iterate over the transactions in the wallet. + List transactions() => + core.instance.api.crateApiWalletFfiWalletTransactions( + that: this, + ); @override - int get hashCode => ptr.hashCode; + int get hashCode => opaque.hashCode; @override bool operator ==(Object other) => identical(this, other) || - other is BdkWallet && + other is FfiWallet && runtimeType == other.runtimeType && - ptr == other.ptr; + opaque == other.opaque; } diff --git a/lib/src/generated/frb_generated.dart b/lib/src/generated/frb_generated.dart index 81416fde..25ef2b42 100644 --- a/lib/src/generated/frb_generated.dart +++ b/lib/src/generated/frb_generated.dart @@ -1,13 +1,16 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0. +// @generated by `flutter_rust_bridge`@ 2.4.0. // ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field -import 'api/blockchain.dart'; +import 'api/bitcoin.dart'; import 'api/descriptor.dart'; +import 'api/electrum.dart'; import 'api/error.dart'; +import 'api/esplora.dart'; import 'api/key.dart'; -import 'api/psbt.dart'; +import 'api/store.dart'; +import 'api/tx_builder.dart'; import 'api/types.dart'; import 'api/wallet.dart'; import 'dart:async'; @@ -38,6 +41,16 @@ class core extends BaseEntrypoint { ); } + /// Initialize flutter_rust_bridge in mock mode. + /// No libraries for FFI are loaded. + static void initMock({ + required coreApi api, + }) { + instance.initMockImpl( + api: api, + ); + } + /// Dispose flutter_rust_bridge /// /// The call to this function is optional, since flutter_rust_bridge (and everything else) @@ -59,10 +72,10 @@ class core extends BaseEntrypoint { kDefaultExternalLibraryLoaderConfig; @override - String get codegenVersion => '2.0.0'; + String get codegenVersion => '2.4.0'; @override - int get rustContentHash => 1897842111; + int get rustContentHash => 1560530746; static const kDefaultExternalLibraryLoaderConfig = ExternalLibraryLoaderConfig( @@ -73,288 +86,374 @@ class core extends BaseEntrypoint { } abstract class coreApi extends BaseApi { - Future crateApiBlockchainBdkBlockchainBroadcast( - {required BdkBlockchain that, required BdkTransaction transaction}); + String crateApiBitcoinFfiAddressAsString({required FfiAddress that}); + + Future crateApiBitcoinFfiAddressFromScript( + {required FfiScriptBuf script, required Network network}); + + Future crateApiBitcoinFfiAddressFromString( + {required String address, required Network network}); + + bool crateApiBitcoinFfiAddressIsValidForNetwork( + {required FfiAddress that, required Network network}); + + FfiScriptBuf crateApiBitcoinFfiAddressScript({required FfiAddress opaque}); + + String crateApiBitcoinFfiAddressToQrUri({required FfiAddress that}); + + String crateApiBitcoinFfiPsbtAsString({required FfiPsbt that}); + + Future crateApiBitcoinFfiPsbtCombine( + {required FfiPsbt opaque, required FfiPsbt other}); + + FfiTransaction crateApiBitcoinFfiPsbtExtractTx({required FfiPsbt opaque}); + + BigInt? crateApiBitcoinFfiPsbtFeeAmount({required FfiPsbt that}); + + Future crateApiBitcoinFfiPsbtFromStr({required String psbtBase64}); + + String crateApiBitcoinFfiPsbtJsonSerialize({required FfiPsbt that}); + + Uint8List crateApiBitcoinFfiPsbtSerialize({required FfiPsbt that}); + + String crateApiBitcoinFfiScriptBufAsString({required FfiScriptBuf that}); + + FfiScriptBuf crateApiBitcoinFfiScriptBufEmpty(); + + Future crateApiBitcoinFfiScriptBufWithCapacity( + {required BigInt capacity}); + + String crateApiBitcoinFfiTransactionComputeTxid( + {required FfiTransaction that}); + + Future crateApiBitcoinFfiTransactionFromBytes( + {required List transactionBytes}); + + List crateApiBitcoinFfiTransactionInput({required FfiTransaction that}); + + bool crateApiBitcoinFfiTransactionIsCoinbase({required FfiTransaction that}); + + bool crateApiBitcoinFfiTransactionIsExplicitlyRbf( + {required FfiTransaction that}); + + bool crateApiBitcoinFfiTransactionIsLockTimeEnabled( + {required FfiTransaction that}); + + LockTime crateApiBitcoinFfiTransactionLockTime( + {required FfiTransaction that}); + + Future crateApiBitcoinFfiTransactionNew( + {required int version, + required LockTime lockTime, + required List input, + required List output}); - Future crateApiBlockchainBdkBlockchainCreate( - {required BlockchainConfig blockchainConfig}); + List crateApiBitcoinFfiTransactionOutput( + {required FfiTransaction that}); - Future crateApiBlockchainBdkBlockchainEstimateFee( - {required BdkBlockchain that, required BigInt target}); + Uint8List crateApiBitcoinFfiTransactionSerialize( + {required FfiTransaction that}); - Future crateApiBlockchainBdkBlockchainGetBlockHash( - {required BdkBlockchain that, required int height}); + int crateApiBitcoinFfiTransactionVersion({required FfiTransaction that}); - Future crateApiBlockchainBdkBlockchainGetHeight( - {required BdkBlockchain that}); + BigInt crateApiBitcoinFfiTransactionVsize({required FfiTransaction that}); - String crateApiDescriptorBdkDescriptorAsString({required BdkDescriptor that}); + Future crateApiBitcoinFfiTransactionWeight( + {required FfiTransaction that}); - BigInt crateApiDescriptorBdkDescriptorMaxSatisfactionWeight( - {required BdkDescriptor that}); + String crateApiDescriptorFfiDescriptorAsString({required FfiDescriptor that}); - Future crateApiDescriptorBdkDescriptorNew( + BigInt crateApiDescriptorFfiDescriptorMaxSatisfactionWeight( + {required FfiDescriptor that}); + + Future crateApiDescriptorFfiDescriptorNew( {required String descriptor, required Network network}); - Future crateApiDescriptorBdkDescriptorNewBip44( - {required BdkDescriptorSecretKey secretKey, + Future crateApiDescriptorFfiDescriptorNewBip44( + {required FfiDescriptorSecretKey secretKey, required KeychainKind keychainKind, required Network network}); - Future crateApiDescriptorBdkDescriptorNewBip44Public( - {required BdkDescriptorPublicKey publicKey, + Future crateApiDescriptorFfiDescriptorNewBip44Public( + {required FfiDescriptorPublicKey publicKey, required String fingerprint, required KeychainKind keychainKind, required Network network}); - Future crateApiDescriptorBdkDescriptorNewBip49( - {required BdkDescriptorSecretKey secretKey, + Future crateApiDescriptorFfiDescriptorNewBip49( + {required FfiDescriptorSecretKey secretKey, required KeychainKind keychainKind, required Network network}); - Future crateApiDescriptorBdkDescriptorNewBip49Public( - {required BdkDescriptorPublicKey publicKey, + Future crateApiDescriptorFfiDescriptorNewBip49Public( + {required FfiDescriptorPublicKey publicKey, required String fingerprint, required KeychainKind keychainKind, required Network network}); - Future crateApiDescriptorBdkDescriptorNewBip84( - {required BdkDescriptorSecretKey secretKey, + Future crateApiDescriptorFfiDescriptorNewBip84( + {required FfiDescriptorSecretKey secretKey, required KeychainKind keychainKind, required Network network}); - Future crateApiDescriptorBdkDescriptorNewBip84Public( - {required BdkDescriptorPublicKey publicKey, + Future crateApiDescriptorFfiDescriptorNewBip84Public( + {required FfiDescriptorPublicKey publicKey, required String fingerprint, required KeychainKind keychainKind, required Network network}); - Future crateApiDescriptorBdkDescriptorNewBip86( - {required BdkDescriptorSecretKey secretKey, + Future crateApiDescriptorFfiDescriptorNewBip86( + {required FfiDescriptorSecretKey secretKey, required KeychainKind keychainKind, required Network network}); - Future crateApiDescriptorBdkDescriptorNewBip86Public( - {required BdkDescriptorPublicKey publicKey, + Future crateApiDescriptorFfiDescriptorNewBip86Public( + {required FfiDescriptorPublicKey publicKey, required String fingerprint, required KeychainKind keychainKind, required Network network}); - String crateApiDescriptorBdkDescriptorToStringPrivate( - {required BdkDescriptor that}); + String crateApiDescriptorFfiDescriptorToStringWithSecret( + {required FfiDescriptor that}); - String crateApiKeyBdkDerivationPathAsString( - {required BdkDerivationPath that}); + Future crateApiElectrumFfiElectrumClientBroadcast( + {required FfiElectrumClient opaque, required FfiTransaction transaction}); - Future crateApiKeyBdkDerivationPathFromString( - {required String path}); + Future crateApiElectrumFfiElectrumClientFullScan( + {required FfiElectrumClient opaque, + required FfiFullScanRequest request, + required BigInt stopGap, + required BigInt batchSize, + required bool fetchPrevTxouts}); - String crateApiKeyBdkDescriptorPublicKeyAsString( - {required BdkDescriptorPublicKey that}); + Future crateApiElectrumFfiElectrumClientNew( + {required String url}); - Future crateApiKeyBdkDescriptorPublicKeyDerive( - {required BdkDescriptorPublicKey ptr, required BdkDerivationPath path}); + Future crateApiElectrumFfiElectrumClientSync( + {required FfiElectrumClient opaque, + required FfiSyncRequest request, + required BigInt batchSize, + required bool fetchPrevTxouts}); - Future crateApiKeyBdkDescriptorPublicKeyExtend( - {required BdkDescriptorPublicKey ptr, required BdkDerivationPath path}); + Future crateApiEsploraFfiEsploraClientBroadcast( + {required FfiEsploraClient opaque, required FfiTransaction transaction}); - Future crateApiKeyBdkDescriptorPublicKeyFromString( - {required String publicKey}); + Future crateApiEsploraFfiEsploraClientFullScan( + {required FfiEsploraClient opaque, + required FfiFullScanRequest request, + required BigInt stopGap, + required BigInt parallelRequests}); - BdkDescriptorPublicKey crateApiKeyBdkDescriptorSecretKeyAsPublic( - {required BdkDescriptorSecretKey ptr}); + Future crateApiEsploraFfiEsploraClientNew( + {required String url}); - String crateApiKeyBdkDescriptorSecretKeyAsString( - {required BdkDescriptorSecretKey that}); + Future crateApiEsploraFfiEsploraClientSync( + {required FfiEsploraClient opaque, + required FfiSyncRequest request, + required BigInt parallelRequests}); - Future crateApiKeyBdkDescriptorSecretKeyCreate( - {required Network network, - required BdkMnemonic mnemonic, - String? password}); + String crateApiKeyFfiDerivationPathAsString( + {required FfiDerivationPath that}); - Future crateApiKeyBdkDescriptorSecretKeyDerive( - {required BdkDescriptorSecretKey ptr, required BdkDerivationPath path}); + Future crateApiKeyFfiDerivationPathFromString( + {required String path}); - Future crateApiKeyBdkDescriptorSecretKeyExtend( - {required BdkDescriptorSecretKey ptr, required BdkDerivationPath path}); + String crateApiKeyFfiDescriptorPublicKeyAsString( + {required FfiDescriptorPublicKey that}); - Future crateApiKeyBdkDescriptorSecretKeyFromString( - {required String secretKey}); + Future crateApiKeyFfiDescriptorPublicKeyDerive( + {required FfiDescriptorPublicKey opaque, + required FfiDerivationPath path}); - Uint8List crateApiKeyBdkDescriptorSecretKeySecretBytes( - {required BdkDescriptorSecretKey that}); + Future crateApiKeyFfiDescriptorPublicKeyExtend( + {required FfiDescriptorPublicKey opaque, + required FfiDerivationPath path}); - String crateApiKeyBdkMnemonicAsString({required BdkMnemonic that}); + Future crateApiKeyFfiDescriptorPublicKeyFromString( + {required String publicKey}); - Future crateApiKeyBdkMnemonicFromEntropy( - {required List entropy}); + FfiDescriptorPublicKey crateApiKeyFfiDescriptorSecretKeyAsPublic( + {required FfiDescriptorSecretKey opaque}); - Future crateApiKeyBdkMnemonicFromString( - {required String mnemonic}); + String crateApiKeyFfiDescriptorSecretKeyAsString( + {required FfiDescriptorSecretKey that}); - Future crateApiKeyBdkMnemonicNew({required WordCount wordCount}); + Future crateApiKeyFfiDescriptorSecretKeyCreate( + {required Network network, + required FfiMnemonic mnemonic, + String? password}); - String crateApiPsbtBdkPsbtAsString({required BdkPsbt that}); + Future crateApiKeyFfiDescriptorSecretKeyDerive( + {required FfiDescriptorSecretKey opaque, + required FfiDerivationPath path}); - Future crateApiPsbtBdkPsbtCombine( - {required BdkPsbt ptr, required BdkPsbt other}); + Future crateApiKeyFfiDescriptorSecretKeyExtend( + {required FfiDescriptorSecretKey opaque, + required FfiDerivationPath path}); - BdkTransaction crateApiPsbtBdkPsbtExtractTx({required BdkPsbt ptr}); + Future crateApiKeyFfiDescriptorSecretKeyFromString( + {required String secretKey}); - BigInt? crateApiPsbtBdkPsbtFeeAmount({required BdkPsbt that}); + Uint8List crateApiKeyFfiDescriptorSecretKeySecretBytes( + {required FfiDescriptorSecretKey that}); - FeeRate? crateApiPsbtBdkPsbtFeeRate({required BdkPsbt that}); + String crateApiKeyFfiMnemonicAsString({required FfiMnemonic that}); - Future crateApiPsbtBdkPsbtFromStr({required String psbtBase64}); + Future crateApiKeyFfiMnemonicFromEntropy( + {required List entropy}); - String crateApiPsbtBdkPsbtJsonSerialize({required BdkPsbt that}); + Future crateApiKeyFfiMnemonicFromString( + {required String mnemonic}); - Uint8List crateApiPsbtBdkPsbtSerialize({required BdkPsbt that}); + Future crateApiKeyFfiMnemonicNew({required WordCount wordCount}); - String crateApiPsbtBdkPsbtTxid({required BdkPsbt that}); + Future crateApiStoreFfiConnectionNew({required String path}); - String crateApiTypesBdkAddressAsString({required BdkAddress that}); + Future crateApiStoreFfiConnectionNewInMemory(); - Future crateApiTypesBdkAddressFromScript( - {required BdkScriptBuf script, required Network network}); + Future crateApiTxBuilderFinishBumpFeeTxBuilder( + {required String txid, + required FeeRate feeRate, + required FfiWallet wallet, + required bool enableRbf, + int? nSequence}); - Future crateApiTypesBdkAddressFromString( - {required String address, required Network network}); + Future crateApiTxBuilderTxBuilderFinish( + {required FfiWallet wallet, + required List<(FfiScriptBuf, BigInt)> recipients, + required List utxos, + required List unSpendable, + required ChangeSpendPolicy changePolicy, + required bool manuallySelectedOnly, + FeeRate? feeRate, + BigInt? feeAbsolute, + required bool drainWallet, + (Map, KeychainKind)? policyPath, + FfiScriptBuf? drainTo, + RbfValue? rbf, + required List data}); - bool crateApiTypesBdkAddressIsValidForNetwork( - {required BdkAddress that, required Network network}); + Future crateApiTypesChangeSpendPolicyDefault(); - Network crateApiTypesBdkAddressNetwork({required BdkAddress that}); + Future crateApiTypesFfiFullScanRequestBuilderBuild( + {required FfiFullScanRequestBuilder that}); - Payload crateApiTypesBdkAddressPayload({required BdkAddress that}); + Future + crateApiTypesFfiFullScanRequestBuilderInspectSpksForAllKeychains( + {required FfiFullScanRequestBuilder that, + required FutureOr Function(KeychainKind, int, FfiScriptBuf) + inspector}); - BdkScriptBuf crateApiTypesBdkAddressScript({required BdkAddress ptr}); + String crateApiTypesFfiPolicyId({required FfiPolicy that}); - String crateApiTypesBdkAddressToQrUri({required BdkAddress that}); + Future crateApiTypesFfiSyncRequestBuilderBuild( + {required FfiSyncRequestBuilder that}); - String crateApiTypesBdkScriptBufAsString({required BdkScriptBuf that}); + Future crateApiTypesFfiSyncRequestBuilderInspectSpks( + {required FfiSyncRequestBuilder that, + required FutureOr Function(FfiScriptBuf, SyncProgress) inspector}); - BdkScriptBuf crateApiTypesBdkScriptBufEmpty(); + Future crateApiTypesNetworkDefault(); - Future crateApiTypesBdkScriptBufFromHex({required String s}); + Future crateApiTypesSignOptionsDefault(); - Future crateApiTypesBdkScriptBufWithCapacity( - {required BigInt capacity}); + Future crateApiWalletFfiWalletApplyUpdate( + {required FfiWallet that, required FfiUpdate update}); - Future crateApiTypesBdkTransactionFromBytes( - {required List transactionBytes}); + Future crateApiWalletFfiWalletCalculateFee( + {required FfiWallet opaque, required FfiTransaction tx}); - Future> crateApiTypesBdkTransactionInput( - {required BdkTransaction that}); + Future crateApiWalletFfiWalletCalculateFeeRate( + {required FfiWallet opaque, required FfiTransaction tx}); - Future crateApiTypesBdkTransactionIsCoinBase( - {required BdkTransaction that}); + Balance crateApiWalletFfiWalletGetBalance({required FfiWallet that}); - Future crateApiTypesBdkTransactionIsExplicitlyRbf( - {required BdkTransaction that}); + FfiCanonicalTx? crateApiWalletFfiWalletGetTx( + {required FfiWallet that, required String txid}); - Future crateApiTypesBdkTransactionIsLockTimeEnabled( - {required BdkTransaction that}); + bool crateApiWalletFfiWalletIsMine( + {required FfiWallet that, required FfiScriptBuf script}); - Future crateApiTypesBdkTransactionLockTime( - {required BdkTransaction that}); + List crateApiWalletFfiWalletListOutput( + {required FfiWallet that}); - Future crateApiTypesBdkTransactionNew( - {required int version, - required LockTime lockTime, - required List input, - required List output}); + List crateApiWalletFfiWalletListUnspent( + {required FfiWallet that}); - Future> crateApiTypesBdkTransactionOutput( - {required BdkTransaction that}); + Future crateApiWalletFfiWalletLoad( + {required FfiDescriptor descriptor, + required FfiDescriptor changeDescriptor, + required FfiConnection connection}); - Future crateApiTypesBdkTransactionSerialize( - {required BdkTransaction that}); + Network crateApiWalletFfiWalletNetwork({required FfiWallet that}); - Future crateApiTypesBdkTransactionSize( - {required BdkTransaction that}); + Future crateApiWalletFfiWalletNew( + {required FfiDescriptor descriptor, + required FfiDescriptor changeDescriptor, + required Network network, + required FfiConnection connection}); - Future crateApiTypesBdkTransactionTxid( - {required BdkTransaction that}); + Future crateApiWalletFfiWalletPersist( + {required FfiWallet opaque, required FfiConnection connection}); - Future crateApiTypesBdkTransactionVersion( - {required BdkTransaction that}); + FfiPolicy? crateApiWalletFfiWalletPolicies( + {required FfiWallet opaque, required KeychainKind keychainKind}); - Future crateApiTypesBdkTransactionVsize( - {required BdkTransaction that}); + AddressInfo crateApiWalletFfiWalletRevealNextAddress( + {required FfiWallet opaque, required KeychainKind keychainKind}); - Future crateApiTypesBdkTransactionWeight( - {required BdkTransaction that}); + Future crateApiWalletFfiWalletSign( + {required FfiWallet opaque, + required FfiPsbt psbt, + required SignOptions signOptions}); - (BdkAddress, int) crateApiWalletBdkWalletGetAddress( - {required BdkWallet ptr, required AddressIndex addressIndex}); + Future crateApiWalletFfiWalletStartFullScan( + {required FfiWallet that}); - Balance crateApiWalletBdkWalletGetBalance({required BdkWallet that}); + Future + crateApiWalletFfiWalletStartSyncWithRevealedSpks( + {required FfiWallet that}); - BdkDescriptor crateApiWalletBdkWalletGetDescriptorForKeychain( - {required BdkWallet ptr, required KeychainKind keychain}); + List crateApiWalletFfiWalletTransactions( + {required FfiWallet that}); - (BdkAddress, int) crateApiWalletBdkWalletGetInternalAddress( - {required BdkWallet ptr, required AddressIndex addressIndex}); + RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_Address; - Future crateApiWalletBdkWalletGetPsbtInput( - {required BdkWallet that, - required LocalUtxo utxo, - required bool onlyWitnessUtxo, - PsbtSigHashType? sighashType}); + RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_Address; - bool crateApiWalletBdkWalletIsMine( - {required BdkWallet that, required BdkScriptBuf script}); + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_AddressPtr; - List crateApiWalletBdkWalletListTransactions( - {required BdkWallet that, required bool includeRaw}); + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_Transaction; - List crateApiWalletBdkWalletListUnspent({required BdkWallet that}); + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_Transaction; - Network crateApiWalletBdkWalletNetwork({required BdkWallet that}); + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_TransactionPtr; - Future crateApiWalletBdkWalletNew( - {required BdkDescriptor descriptor, - BdkDescriptor? changeDescriptor, - required Network network, - required DatabaseConfig databaseConfig}); + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_BdkElectrumClientClient; - Future crateApiWalletBdkWalletSign( - {required BdkWallet ptr, - required BdkPsbt psbt, - SignOptions? signOptions}); + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_BdkElectrumClientClient; - Future crateApiWalletBdkWalletSync( - {required BdkWallet ptr, required BdkBlockchain blockchain}); + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_BdkElectrumClientClientPtr; - Future<(BdkPsbt, TransactionDetails)> crateApiWalletFinishBumpFeeTxBuilder( - {required String txid, - required double feeRate, - BdkAddress? allowShrinking, - required BdkWallet wallet, - required bool enableRbf, - int? nSequence}); + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_BlockingClient; - Future<(BdkPsbt, TransactionDetails)> crateApiWalletTxBuilderFinish( - {required BdkWallet wallet, - required List recipients, - required List utxos, - (OutPoint, Input, BigInt)? foreignUtxo, - required List unSpendable, - required ChangeSpendPolicy changePolicy, - required bool manuallySelectedOnly, - double? feeRate, - BigInt? feeAbsolute, - required bool drainWallet, - BdkScriptBuf? drainTo, - RbfValue? rbf, - required List data}); + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_BlockingClient; - RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_Address; + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_BlockingClientPtr; - RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_Address; + RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_Update; - CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_AddressPtr; + RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_Update; + + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_UpdatePtr; RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_DerivationPath; @@ -365,15 +464,6 @@ abstract class coreApi extends BaseApi { CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_DerivationPathPtr; - RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_AnyBlockchain; - - RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_AnyBlockchain; - - CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_AnyBlockchainPtr; - RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_ExtendedDescriptor; @@ -383,6 +473,12 @@ abstract class coreApi extends BaseApi { CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_ExtendedDescriptorPtr; + RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_Policy; + + RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_Policy; + + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_PolicyPtr; + RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_DescriptorPublicKey; @@ -416,22 +512,66 @@ abstract class coreApi extends BaseApi { CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_MnemonicPtr; RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_MutexWalletAnyDatabase; + get rust_arc_increment_strong_count_MutexOptionFullScanRequestBuilderKeychainKind; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_MutexOptionFullScanRequestBuilderKeychainKind; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_MutexOptionFullScanRequestBuilderKeychainKindPtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_MutexOptionFullScanRequestKeychainKind; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_MutexOptionFullScanRequestKeychainKind; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_MutexOptionFullScanRequestKeychainKindPtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_MutexOptionSyncRequestBuilderKeychainKindU32; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_MutexOptionSyncRequestBuilderKeychainKindU32; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_MutexOptionSyncRequestBuilderKeychainKindU32Ptr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_MutexOptionSyncRequestKeychainKindU32; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_MutexOptionSyncRequestKeychainKindU32; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_MutexOptionSyncRequestKeychainKindU32Ptr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_MutexPsbt; RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_MutexWalletAnyDatabase; + get rust_arc_decrement_strong_count_MutexPsbt; + + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_MutexPsbtPtr; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_MutexPersistedWalletConnection; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_MutexPersistedWalletConnection; CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_MutexWalletAnyDatabasePtr; + get rust_arc_decrement_strong_count_MutexPersistedWalletConnectionPtr; RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_MutexPartiallySignedTransaction; + get rust_arc_increment_strong_count_MutexConnection; RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_MutexPartiallySignedTransaction; + get rust_arc_decrement_strong_count_MutexConnection; CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_MutexPartiallySignedTransactionPtr; + get rust_arc_decrement_strong_count_MutexConnectionPtr; } class coreApiImpl extends coreApiImplPlatform implements coreApi { @@ -443,2361 +583,2964 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { }); @override - Future crateApiBlockchainBdkBlockchainBroadcast( - {required BdkBlockchain that, required BdkTransaction transaction}) { - 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__crate__api__blockchain__bdk_blockchain_broadcast( - port_, arg0, arg1); + String crateApiBitcoinFfiAddressAsString({required FfiAddress that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_ffi_address(that); + return wire.wire__crate__api__bitcoin__ffi_address_as_string(arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_bdk_error, + decodeErrorData: null, ), - constMeta: kCrateApiBlockchainBdkBlockchainBroadcastConstMeta, - argValues: [that, transaction], + constMeta: kCrateApiBitcoinFfiAddressAsStringConstMeta, + argValues: [that], apiImpl: this, )); } - TaskConstMeta get kCrateApiBlockchainBdkBlockchainBroadcastConstMeta => + TaskConstMeta get kCrateApiBitcoinFfiAddressAsStringConstMeta => const TaskConstMeta( - debugName: "bdk_blockchain_broadcast", - argNames: ["that", "transaction"], + debugName: "ffi_address_as_string", + argNames: ["that"], ); @override - Future crateApiBlockchainBdkBlockchainCreate( - {required BlockchainConfig blockchainConfig}) { + Future crateApiBitcoinFfiAddressFromScript( + {required FfiScriptBuf script, required Network network}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_blockchain_config(blockchainConfig); - return wire.wire__crate__api__blockchain__bdk_blockchain_create( - port_, arg0); + var arg0 = cst_encode_box_autoadd_ffi_script_buf(script); + var arg1 = cst_encode_network(network); + return wire.wire__crate__api__bitcoin__ffi_address_from_script( + port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_blockchain, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_ffi_address, + decodeErrorData: dco_decode_from_script_error, ), - constMeta: kCrateApiBlockchainBdkBlockchainCreateConstMeta, - argValues: [blockchainConfig], + constMeta: kCrateApiBitcoinFfiAddressFromScriptConstMeta, + argValues: [script, network], apiImpl: this, )); } - TaskConstMeta get kCrateApiBlockchainBdkBlockchainCreateConstMeta => + TaskConstMeta get kCrateApiBitcoinFfiAddressFromScriptConstMeta => const TaskConstMeta( - debugName: "bdk_blockchain_create", - argNames: ["blockchainConfig"], + debugName: "ffi_address_from_script", + argNames: ["script", "network"], ); @override - Future crateApiBlockchainBdkBlockchainEstimateFee( - {required BdkBlockchain that, required BigInt target}) { + Future crateApiBitcoinFfiAddressFromString( + {required String address, required Network network}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_blockchain(that); - var arg1 = cst_encode_u_64(target); - return wire.wire__crate__api__blockchain__bdk_blockchain_estimate_fee( + var arg0 = cst_encode_String(address); + var arg1 = cst_encode_network(network); + return wire.wire__crate__api__bitcoin__ffi_address_from_string( port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_fee_rate, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_ffi_address, + decodeErrorData: dco_decode_address_parse_error, ), - constMeta: kCrateApiBlockchainBdkBlockchainEstimateFeeConstMeta, - argValues: [that, target], + constMeta: kCrateApiBitcoinFfiAddressFromStringConstMeta, + argValues: [address, network], apiImpl: this, )); } - TaskConstMeta get kCrateApiBlockchainBdkBlockchainEstimateFeeConstMeta => + TaskConstMeta get kCrateApiBitcoinFfiAddressFromStringConstMeta => const TaskConstMeta( - debugName: "bdk_blockchain_estimate_fee", - argNames: ["that", "target"], + debugName: "ffi_address_from_string", + argNames: ["address", "network"], ); @override - Future crateApiBlockchainBdkBlockchainGetBlockHash( - {required BdkBlockchain that, required int height}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_blockchain(that); - var arg1 = cst_encode_u_32(height); - return wire.wire__crate__api__blockchain__bdk_blockchain_get_block_hash( - port_, arg0, arg1); + bool crateApiBitcoinFfiAddressIsValidForNetwork( + {required FfiAddress that, required Network network}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_ffi_address(that); + var arg1 = cst_encode_network(network); + return wire.wire__crate__api__bitcoin__ffi_address_is_valid_for_network( + arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_bool, + decodeErrorData: null, ), - constMeta: kCrateApiBlockchainBdkBlockchainGetBlockHashConstMeta, - argValues: [that, height], + constMeta: kCrateApiBitcoinFfiAddressIsValidForNetworkConstMeta, + argValues: [that, network], apiImpl: this, )); } - TaskConstMeta get kCrateApiBlockchainBdkBlockchainGetBlockHashConstMeta => + TaskConstMeta get kCrateApiBitcoinFfiAddressIsValidForNetworkConstMeta => const TaskConstMeta( - debugName: "bdk_blockchain_get_block_hash", - argNames: ["that", "height"], + debugName: "ffi_address_is_valid_for_network", + argNames: ["that", "network"], ); @override - Future crateApiBlockchainBdkBlockchainGetHeight( - {required BdkBlockchain that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_blockchain(that); - return wire.wire__crate__api__blockchain__bdk_blockchain_get_height( - port_, arg0); + FfiScriptBuf crateApiBitcoinFfiAddressScript({required FfiAddress opaque}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_ffi_address(opaque); + return wire.wire__crate__api__bitcoin__ffi_address_script(arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_u_32, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_ffi_script_buf, + decodeErrorData: null, ), - constMeta: kCrateApiBlockchainBdkBlockchainGetHeightConstMeta, - argValues: [that], + constMeta: kCrateApiBitcoinFfiAddressScriptConstMeta, + argValues: [opaque], apiImpl: this, )); } - TaskConstMeta get kCrateApiBlockchainBdkBlockchainGetHeightConstMeta => + TaskConstMeta get kCrateApiBitcoinFfiAddressScriptConstMeta => const TaskConstMeta( - debugName: "bdk_blockchain_get_height", - argNames: ["that"], + debugName: "ffi_address_script", + argNames: ["opaque"], ); @override - String crateApiDescriptorBdkDescriptorAsString( - {required BdkDescriptor that}) { + String crateApiBitcoinFfiAddressToQrUri({required FfiAddress that}) { return handler.executeSync(SyncTask( callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_descriptor(that); - return wire - .wire__crate__api__descriptor__bdk_descriptor_as_string(arg0); + var arg0 = cst_encode_box_autoadd_ffi_address(that); + return wire.wire__crate__api__bitcoin__ffi_address_to_qr_uri(arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_String, decodeErrorData: null, ), - constMeta: kCrateApiDescriptorBdkDescriptorAsStringConstMeta, + constMeta: kCrateApiBitcoinFfiAddressToQrUriConstMeta, argValues: [that], apiImpl: this, )); } - TaskConstMeta get kCrateApiDescriptorBdkDescriptorAsStringConstMeta => + TaskConstMeta get kCrateApiBitcoinFfiAddressToQrUriConstMeta => const TaskConstMeta( - debugName: "bdk_descriptor_as_string", + debugName: "ffi_address_to_qr_uri", argNames: ["that"], ); @override - BigInt crateApiDescriptorBdkDescriptorMaxSatisfactionWeight( - {required BdkDescriptor that}) { + String crateApiBitcoinFfiPsbtAsString({required FfiPsbt that}) { return handler.executeSync(SyncTask( callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_descriptor(that); - return wire - .wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weight( - arg0); + var arg0 = cst_encode_box_autoadd_ffi_psbt(that); + return wire.wire__crate__api__bitcoin__ffi_psbt_as_string(arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_usize, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_String, + decodeErrorData: null, ), - constMeta: kCrateApiDescriptorBdkDescriptorMaxSatisfactionWeightConstMeta, + constMeta: kCrateApiBitcoinFfiPsbtAsStringConstMeta, argValues: [that], apiImpl: this, )); } - TaskConstMeta - get kCrateApiDescriptorBdkDescriptorMaxSatisfactionWeightConstMeta => - const TaskConstMeta( - debugName: "bdk_descriptor_max_satisfaction_weight", - argNames: ["that"], - ); + TaskConstMeta get kCrateApiBitcoinFfiPsbtAsStringConstMeta => + const TaskConstMeta( + debugName: "ffi_psbt_as_string", + argNames: ["that"], + ); @override - Future crateApiDescriptorBdkDescriptorNew( - {required String descriptor, required Network network}) { + Future crateApiBitcoinFfiPsbtCombine( + {required FfiPsbt opaque, required FfiPsbt other}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_String(descriptor); - var arg1 = cst_encode_network(network); - return wire.wire__crate__api__descriptor__bdk_descriptor_new( + var arg0 = cst_encode_box_autoadd_ffi_psbt(opaque); + var arg1 = cst_encode_box_autoadd_ffi_psbt(other); + return wire.wire__crate__api__bitcoin__ffi_psbt_combine( port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_ffi_psbt, + decodeErrorData: dco_decode_psbt_error, ), - constMeta: kCrateApiDescriptorBdkDescriptorNewConstMeta, - argValues: [descriptor, network], + constMeta: kCrateApiBitcoinFfiPsbtCombineConstMeta, + argValues: [opaque, other], apiImpl: this, )); } - TaskConstMeta get kCrateApiDescriptorBdkDescriptorNewConstMeta => + TaskConstMeta get kCrateApiBitcoinFfiPsbtCombineConstMeta => const TaskConstMeta( - debugName: "bdk_descriptor_new", - argNames: ["descriptor", "network"], + debugName: "ffi_psbt_combine", + argNames: ["opaque", "other"], ); @override - Future crateApiDescriptorBdkDescriptorNewBip44( - {required BdkDescriptorSecretKey secretKey, - required KeychainKind keychainKind, - required Network network}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(secretKey); - var arg1 = cst_encode_keychain_kind(keychainKind); - var arg2 = cst_encode_network(network); - return wire.wire__crate__api__descriptor__bdk_descriptor_new_bip44( - port_, arg0, arg1, arg2); + FfiTransaction crateApiBitcoinFfiPsbtExtractTx({required FfiPsbt opaque}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_ffi_psbt(opaque); + return wire.wire__crate__api__bitcoin__ffi_psbt_extract_tx(arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_ffi_transaction, + decodeErrorData: dco_decode_extract_tx_error, ), - constMeta: kCrateApiDescriptorBdkDescriptorNewBip44ConstMeta, - argValues: [secretKey, keychainKind, network], + constMeta: kCrateApiBitcoinFfiPsbtExtractTxConstMeta, + argValues: [opaque], apiImpl: this, )); } - TaskConstMeta get kCrateApiDescriptorBdkDescriptorNewBip44ConstMeta => + TaskConstMeta get kCrateApiBitcoinFfiPsbtExtractTxConstMeta => const TaskConstMeta( - debugName: "bdk_descriptor_new_bip44", - argNames: ["secretKey", "keychainKind", "network"], + debugName: "ffi_psbt_extract_tx", + argNames: ["opaque"], ); @override - Future crateApiDescriptorBdkDescriptorNewBip44Public( - {required BdkDescriptorPublicKey publicKey, - required String fingerprint, - required KeychainKind keychainKind, - required Network network}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_descriptor_public_key(publicKey); - var arg1 = cst_encode_String(fingerprint); - var arg2 = cst_encode_keychain_kind(keychainKind); - var arg3 = cst_encode_network(network); - return wire - .wire__crate__api__descriptor__bdk_descriptor_new_bip44_public( - port_, arg0, arg1, arg2, arg3); + BigInt? crateApiBitcoinFfiPsbtFeeAmount({required FfiPsbt that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_ffi_psbt(that); + return wire.wire__crate__api__bitcoin__ffi_psbt_fee_amount(arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_opt_box_autoadd_u_64, + decodeErrorData: null, ), - constMeta: kCrateApiDescriptorBdkDescriptorNewBip44PublicConstMeta, - argValues: [publicKey, fingerprint, keychainKind, network], + constMeta: kCrateApiBitcoinFfiPsbtFeeAmountConstMeta, + argValues: [that], apiImpl: this, )); } - TaskConstMeta get kCrateApiDescriptorBdkDescriptorNewBip44PublicConstMeta => + TaskConstMeta get kCrateApiBitcoinFfiPsbtFeeAmountConstMeta => const TaskConstMeta( - debugName: "bdk_descriptor_new_bip44_public", - argNames: ["publicKey", "fingerprint", "keychainKind", "network"], + debugName: "ffi_psbt_fee_amount", + argNames: ["that"], ); @override - Future crateApiDescriptorBdkDescriptorNewBip49( - {required BdkDescriptorSecretKey secretKey, - required KeychainKind keychainKind, - required Network network}) { + Future crateApiBitcoinFfiPsbtFromStr({required String psbtBase64}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(secretKey); - var arg1 = cst_encode_keychain_kind(keychainKind); - var arg2 = cst_encode_network(network); - return wire.wire__crate__api__descriptor__bdk_descriptor_new_bip49( - port_, arg0, arg1, arg2); + var arg0 = cst_encode_String(psbtBase64); + return wire.wire__crate__api__bitcoin__ffi_psbt_from_str(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_ffi_psbt, + decodeErrorData: dco_decode_psbt_parse_error, ), - constMeta: kCrateApiDescriptorBdkDescriptorNewBip49ConstMeta, - argValues: [secretKey, keychainKind, network], + constMeta: kCrateApiBitcoinFfiPsbtFromStrConstMeta, + argValues: [psbtBase64], apiImpl: this, )); } - TaskConstMeta get kCrateApiDescriptorBdkDescriptorNewBip49ConstMeta => + TaskConstMeta get kCrateApiBitcoinFfiPsbtFromStrConstMeta => const TaskConstMeta( - debugName: "bdk_descriptor_new_bip49", - argNames: ["secretKey", "keychainKind", "network"], + debugName: "ffi_psbt_from_str", + argNames: ["psbtBase64"], ); @override - Future crateApiDescriptorBdkDescriptorNewBip49Public( - {required BdkDescriptorPublicKey publicKey, - required String fingerprint, - required KeychainKind keychainKind, - required Network network}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_descriptor_public_key(publicKey); - var arg1 = cst_encode_String(fingerprint); - var arg2 = cst_encode_keychain_kind(keychainKind); - var arg3 = cst_encode_network(network); - return wire - .wire__crate__api__descriptor__bdk_descriptor_new_bip49_public( - port_, arg0, arg1, arg2, arg3); + String crateApiBitcoinFfiPsbtJsonSerialize({required FfiPsbt that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_ffi_psbt(that); + return wire.wire__crate__api__bitcoin__ffi_psbt_json_serialize(arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_psbt_error, ), - constMeta: kCrateApiDescriptorBdkDescriptorNewBip49PublicConstMeta, - argValues: [publicKey, fingerprint, keychainKind, network], + constMeta: kCrateApiBitcoinFfiPsbtJsonSerializeConstMeta, + argValues: [that], apiImpl: this, )); } - TaskConstMeta get kCrateApiDescriptorBdkDescriptorNewBip49PublicConstMeta => + TaskConstMeta get kCrateApiBitcoinFfiPsbtJsonSerializeConstMeta => const TaskConstMeta( - debugName: "bdk_descriptor_new_bip49_public", - argNames: ["publicKey", "fingerprint", "keychainKind", "network"], + debugName: "ffi_psbt_json_serialize", + argNames: ["that"], ); @override - Future crateApiDescriptorBdkDescriptorNewBip84( - {required BdkDescriptorSecretKey secretKey, - required KeychainKind keychainKind, - required Network network}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(secretKey); - var arg1 = cst_encode_keychain_kind(keychainKind); - var arg2 = cst_encode_network(network); - return wire.wire__crate__api__descriptor__bdk_descriptor_new_bip84( - port_, arg0, arg1, arg2); + Uint8List crateApiBitcoinFfiPsbtSerialize({required FfiPsbt that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_ffi_psbt(that); + return wire.wire__crate__api__bitcoin__ffi_psbt_serialize(arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_list_prim_u_8_strict, + decodeErrorData: null, ), - constMeta: kCrateApiDescriptorBdkDescriptorNewBip84ConstMeta, - argValues: [secretKey, keychainKind, network], + constMeta: kCrateApiBitcoinFfiPsbtSerializeConstMeta, + argValues: [that], apiImpl: this, )); } - TaskConstMeta get kCrateApiDescriptorBdkDescriptorNewBip84ConstMeta => + TaskConstMeta get kCrateApiBitcoinFfiPsbtSerializeConstMeta => const TaskConstMeta( - debugName: "bdk_descriptor_new_bip84", - argNames: ["secretKey", "keychainKind", "network"], + debugName: "ffi_psbt_serialize", + argNames: ["that"], ); @override - Future crateApiDescriptorBdkDescriptorNewBip84Public( - {required BdkDescriptorPublicKey publicKey, - required String fingerprint, - required KeychainKind keychainKind, - required Network network}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_descriptor_public_key(publicKey); - var arg1 = cst_encode_String(fingerprint); - var arg2 = cst_encode_keychain_kind(keychainKind); - var arg3 = cst_encode_network(network); - return wire - .wire__crate__api__descriptor__bdk_descriptor_new_bip84_public( - port_, arg0, arg1, arg2, arg3); + String crateApiBitcoinFfiScriptBufAsString({required FfiScriptBuf that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_ffi_script_buf(that); + return wire.wire__crate__api__bitcoin__ffi_script_buf_as_string(arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_String, + decodeErrorData: null, ), - constMeta: kCrateApiDescriptorBdkDescriptorNewBip84PublicConstMeta, - argValues: [publicKey, fingerprint, keychainKind, network], + constMeta: kCrateApiBitcoinFfiScriptBufAsStringConstMeta, + argValues: [that], apiImpl: this, )); } - TaskConstMeta get kCrateApiDescriptorBdkDescriptorNewBip84PublicConstMeta => + TaskConstMeta get kCrateApiBitcoinFfiScriptBufAsStringConstMeta => const TaskConstMeta( - debugName: "bdk_descriptor_new_bip84_public", - argNames: ["publicKey", "fingerprint", "keychainKind", "network"], + debugName: "ffi_script_buf_as_string", + argNames: ["that"], ); @override - Future crateApiDescriptorBdkDescriptorNewBip86( - {required BdkDescriptorSecretKey secretKey, - required KeychainKind keychainKind, - required Network network}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(secretKey); - var arg1 = cst_encode_keychain_kind(keychainKind); - var arg2 = cst_encode_network(network); - return wire.wire__crate__api__descriptor__bdk_descriptor_new_bip86( - port_, arg0, arg1, arg2); + FfiScriptBuf crateApiBitcoinFfiScriptBufEmpty() { + return handler.executeSync(SyncTask( + callFfi: () { + return wire.wire__crate__api__bitcoin__ffi_script_buf_empty(); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_ffi_script_buf, + decodeErrorData: null, ), - constMeta: kCrateApiDescriptorBdkDescriptorNewBip86ConstMeta, - argValues: [secretKey, keychainKind, network], + constMeta: kCrateApiBitcoinFfiScriptBufEmptyConstMeta, + argValues: [], apiImpl: this, )); } - TaskConstMeta get kCrateApiDescriptorBdkDescriptorNewBip86ConstMeta => + TaskConstMeta get kCrateApiBitcoinFfiScriptBufEmptyConstMeta => const TaskConstMeta( - debugName: "bdk_descriptor_new_bip86", - argNames: ["secretKey", "keychainKind", "network"], + debugName: "ffi_script_buf_empty", + argNames: [], ); @override - Future crateApiDescriptorBdkDescriptorNewBip86Public( - {required BdkDescriptorPublicKey publicKey, - required String fingerprint, - required KeychainKind keychainKind, - required Network network}) { + Future crateApiBitcoinFfiScriptBufWithCapacity( + {required BigInt capacity}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_descriptor_public_key(publicKey); - var arg1 = cst_encode_String(fingerprint); - var arg2 = cst_encode_keychain_kind(keychainKind); - var arg3 = cst_encode_network(network); - return wire - .wire__crate__api__descriptor__bdk_descriptor_new_bip86_public( - port_, arg0, arg1, arg2, arg3); + var arg0 = cst_encode_usize(capacity); + return wire.wire__crate__api__bitcoin__ffi_script_buf_with_capacity( + port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_ffi_script_buf, + decodeErrorData: null, ), - constMeta: kCrateApiDescriptorBdkDescriptorNewBip86PublicConstMeta, - argValues: [publicKey, fingerprint, keychainKind, network], + constMeta: kCrateApiBitcoinFfiScriptBufWithCapacityConstMeta, + argValues: [capacity], apiImpl: this, )); } - TaskConstMeta get kCrateApiDescriptorBdkDescriptorNewBip86PublicConstMeta => + TaskConstMeta get kCrateApiBitcoinFfiScriptBufWithCapacityConstMeta => const TaskConstMeta( - debugName: "bdk_descriptor_new_bip86_public", - argNames: ["publicKey", "fingerprint", "keychainKind", "network"], + debugName: "ffi_script_buf_with_capacity", + argNames: ["capacity"], ); @override - String crateApiDescriptorBdkDescriptorToStringPrivate( - {required BdkDescriptor that}) { + String crateApiBitcoinFfiTransactionComputeTxid( + {required FfiTransaction that}) { return handler.executeSync(SyncTask( callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_descriptor(that); + var arg0 = cst_encode_box_autoadd_ffi_transaction(that); return wire - .wire__crate__api__descriptor__bdk_descriptor_to_string_private( - arg0); + .wire__crate__api__bitcoin__ffi_transaction_compute_txid(arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_String, decodeErrorData: null, ), - constMeta: kCrateApiDescriptorBdkDescriptorToStringPrivateConstMeta, + constMeta: kCrateApiBitcoinFfiTransactionComputeTxidConstMeta, argValues: [that], apiImpl: this, )); } - TaskConstMeta get kCrateApiDescriptorBdkDescriptorToStringPrivateConstMeta => + TaskConstMeta get kCrateApiBitcoinFfiTransactionComputeTxidConstMeta => const TaskConstMeta( - debugName: "bdk_descriptor_to_string_private", + debugName: "ffi_transaction_compute_txid", argNames: ["that"], ); @override - String crateApiKeyBdkDerivationPathAsString( - {required BdkDerivationPath that}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_derivation_path(that); - return wire.wire__crate__api__key__bdk_derivation_path_as_string(arg0); + Future crateApiBitcoinFfiTransactionFromBytes( + {required List transactionBytes}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_list_prim_u_8_loose(transactionBytes); + return wire.wire__crate__api__bitcoin__ffi_transaction_from_bytes( + port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: null, + decodeSuccessData: dco_decode_ffi_transaction, + decodeErrorData: dco_decode_transaction_error, ), - constMeta: kCrateApiKeyBdkDerivationPathAsStringConstMeta, - argValues: [that], + constMeta: kCrateApiBitcoinFfiTransactionFromBytesConstMeta, + argValues: [transactionBytes], apiImpl: this, )); } - TaskConstMeta get kCrateApiKeyBdkDerivationPathAsStringConstMeta => + TaskConstMeta get kCrateApiBitcoinFfiTransactionFromBytesConstMeta => const TaskConstMeta( - debugName: "bdk_derivation_path_as_string", - argNames: ["that"], + debugName: "ffi_transaction_from_bytes", + argNames: ["transactionBytes"], ); @override - Future crateApiKeyBdkDerivationPathFromString( - {required String path}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(path); - return wire.wire__crate__api__key__bdk_derivation_path_from_string( - port_, arg0); + List crateApiBitcoinFfiTransactionInput( + {required FfiTransaction that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_ffi_transaction(that); + return wire.wire__crate__api__bitcoin__ffi_transaction_input(arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_derivation_path, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_list_tx_in, + decodeErrorData: null, ), - constMeta: kCrateApiKeyBdkDerivationPathFromStringConstMeta, - argValues: [path], + constMeta: kCrateApiBitcoinFfiTransactionInputConstMeta, + argValues: [that], apiImpl: this, )); } - TaskConstMeta get kCrateApiKeyBdkDerivationPathFromStringConstMeta => + TaskConstMeta get kCrateApiBitcoinFfiTransactionInputConstMeta => const TaskConstMeta( - debugName: "bdk_derivation_path_from_string", - argNames: ["path"], + debugName: "ffi_transaction_input", + argNames: ["that"], ); @override - String crateApiKeyBdkDescriptorPublicKeyAsString( - {required BdkDescriptorPublicKey that}) { + bool crateApiBitcoinFfiTransactionIsCoinbase({required FfiTransaction that}) { return handler.executeSync(SyncTask( callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_descriptor_public_key(that); + var arg0 = cst_encode_box_autoadd_ffi_transaction(that); return wire - .wire__crate__api__key__bdk_descriptor_public_key_as_string(arg0); + .wire__crate__api__bitcoin__ffi_transaction_is_coinbase(arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_String, + decodeSuccessData: dco_decode_bool, decodeErrorData: null, ), - constMeta: kCrateApiKeyBdkDescriptorPublicKeyAsStringConstMeta, + constMeta: kCrateApiBitcoinFfiTransactionIsCoinbaseConstMeta, argValues: [that], apiImpl: this, )); } - TaskConstMeta get kCrateApiKeyBdkDescriptorPublicKeyAsStringConstMeta => + TaskConstMeta get kCrateApiBitcoinFfiTransactionIsCoinbaseConstMeta => const TaskConstMeta( - debugName: "bdk_descriptor_public_key_as_string", + debugName: "ffi_transaction_is_coinbase", argNames: ["that"], ); @override - Future crateApiKeyBdkDescriptorPublicKeyDerive( - {required BdkDescriptorPublicKey ptr, required BdkDerivationPath path}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_descriptor_public_key(ptr); - var arg1 = cst_encode_box_autoadd_bdk_derivation_path(path); - return wire.wire__crate__api__key__bdk_descriptor_public_key_derive( - port_, arg0, arg1); + bool crateApiBitcoinFfiTransactionIsExplicitlyRbf( + {required FfiTransaction that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_ffi_transaction(that); + return wire + .wire__crate__api__bitcoin__ffi_transaction_is_explicitly_rbf(arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor_public_key, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_bool, + decodeErrorData: null, ), - constMeta: kCrateApiKeyBdkDescriptorPublicKeyDeriveConstMeta, - argValues: [ptr, path], + constMeta: kCrateApiBitcoinFfiTransactionIsExplicitlyRbfConstMeta, + argValues: [that], apiImpl: this, )); } - TaskConstMeta get kCrateApiKeyBdkDescriptorPublicKeyDeriveConstMeta => + TaskConstMeta get kCrateApiBitcoinFfiTransactionIsExplicitlyRbfConstMeta => const TaskConstMeta( - debugName: "bdk_descriptor_public_key_derive", - argNames: ["ptr", "path"], + debugName: "ffi_transaction_is_explicitly_rbf", + argNames: ["that"], ); @override - Future crateApiKeyBdkDescriptorPublicKeyExtend( - {required BdkDescriptorPublicKey ptr, required BdkDerivationPath path}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_descriptor_public_key(ptr); - var arg1 = cst_encode_box_autoadd_bdk_derivation_path(path); - return wire.wire__crate__api__key__bdk_descriptor_public_key_extend( - port_, arg0, arg1); + bool crateApiBitcoinFfiTransactionIsLockTimeEnabled( + {required FfiTransaction that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_ffi_transaction(that); + return wire + .wire__crate__api__bitcoin__ffi_transaction_is_lock_time_enabled( + arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor_public_key, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_bool, + decodeErrorData: null, ), - constMeta: kCrateApiKeyBdkDescriptorPublicKeyExtendConstMeta, - argValues: [ptr, path], + constMeta: kCrateApiBitcoinFfiTransactionIsLockTimeEnabledConstMeta, + argValues: [that], apiImpl: this, )); } - TaskConstMeta get kCrateApiKeyBdkDescriptorPublicKeyExtendConstMeta => + TaskConstMeta get kCrateApiBitcoinFfiTransactionIsLockTimeEnabledConstMeta => const TaskConstMeta( - debugName: "bdk_descriptor_public_key_extend", - argNames: ["ptr", "path"], + debugName: "ffi_transaction_is_lock_time_enabled", + argNames: ["that"], ); @override - Future crateApiKeyBdkDescriptorPublicKeyFromString( - {required String publicKey}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(publicKey); - return wire - .wire__crate__api__key__bdk_descriptor_public_key_from_string( - port_, arg0); + LockTime crateApiBitcoinFfiTransactionLockTime( + {required FfiTransaction that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_ffi_transaction(that); + return wire.wire__crate__api__bitcoin__ffi_transaction_lock_time(arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor_public_key, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_lock_time, + decodeErrorData: null, ), - constMeta: kCrateApiKeyBdkDescriptorPublicKeyFromStringConstMeta, - argValues: [publicKey], + constMeta: kCrateApiBitcoinFfiTransactionLockTimeConstMeta, + argValues: [that], apiImpl: this, )); } - TaskConstMeta get kCrateApiKeyBdkDescriptorPublicKeyFromStringConstMeta => + TaskConstMeta get kCrateApiBitcoinFfiTransactionLockTimeConstMeta => const TaskConstMeta( - debugName: "bdk_descriptor_public_key_from_string", - argNames: ["publicKey"], + debugName: "ffi_transaction_lock_time", + argNames: ["that"], ); @override - BdkDescriptorPublicKey crateApiKeyBdkDescriptorSecretKeyAsPublic( - {required BdkDescriptorSecretKey ptr}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(ptr); - return wire - .wire__crate__api__key__bdk_descriptor_secret_key_as_public(arg0); + Future crateApiBitcoinFfiTransactionNew( + {required int version, + required LockTime lockTime, + required List input, + required List output}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_i_32(version); + var arg1 = cst_encode_box_autoadd_lock_time(lockTime); + var arg2 = cst_encode_list_tx_in(input); + var arg3 = cst_encode_list_tx_out(output); + return wire.wire__crate__api__bitcoin__ffi_transaction_new( + port_, arg0, arg1, arg2, arg3); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor_public_key, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_ffi_transaction, + decodeErrorData: dco_decode_transaction_error, ), - constMeta: kCrateApiKeyBdkDescriptorSecretKeyAsPublicConstMeta, - argValues: [ptr], + constMeta: kCrateApiBitcoinFfiTransactionNewConstMeta, + argValues: [version, lockTime, input, output], apiImpl: this, )); } - TaskConstMeta get kCrateApiKeyBdkDescriptorSecretKeyAsPublicConstMeta => + TaskConstMeta get kCrateApiBitcoinFfiTransactionNewConstMeta => const TaskConstMeta( - debugName: "bdk_descriptor_secret_key_as_public", - argNames: ["ptr"], + debugName: "ffi_transaction_new", + argNames: ["version", "lockTime", "input", "output"], ); @override - String crateApiKeyBdkDescriptorSecretKeyAsString( - {required BdkDescriptorSecretKey that}) { + List crateApiBitcoinFfiTransactionOutput( + {required FfiTransaction that}) { return handler.executeSync(SyncTask( callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(that); - return wire - .wire__crate__api__key__bdk_descriptor_secret_key_as_string(arg0); + var arg0 = cst_encode_box_autoadd_ffi_transaction(that); + return wire.wire__crate__api__bitcoin__ffi_transaction_output(arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_String, + decodeSuccessData: dco_decode_list_tx_out, decodeErrorData: null, ), - constMeta: kCrateApiKeyBdkDescriptorSecretKeyAsStringConstMeta, + constMeta: kCrateApiBitcoinFfiTransactionOutputConstMeta, argValues: [that], apiImpl: this, )); } - TaskConstMeta get kCrateApiKeyBdkDescriptorSecretKeyAsStringConstMeta => + TaskConstMeta get kCrateApiBitcoinFfiTransactionOutputConstMeta => const TaskConstMeta( - debugName: "bdk_descriptor_secret_key_as_string", + debugName: "ffi_transaction_output", argNames: ["that"], ); @override - Future crateApiKeyBdkDescriptorSecretKeyCreate( - {required Network network, - required BdkMnemonic mnemonic, - String? password}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_network(network); - var arg1 = cst_encode_box_autoadd_bdk_mnemonic(mnemonic); - var arg2 = cst_encode_opt_String(password); - return wire.wire__crate__api__key__bdk_descriptor_secret_key_create( - port_, arg0, arg1, arg2); + Uint8List crateApiBitcoinFfiTransactionSerialize( + {required FfiTransaction that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_ffi_transaction(that); + return wire.wire__crate__api__bitcoin__ffi_transaction_serialize(arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor_secret_key, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_list_prim_u_8_strict, + decodeErrorData: null, ), - constMeta: kCrateApiKeyBdkDescriptorSecretKeyCreateConstMeta, - argValues: [network, mnemonic, password], + constMeta: kCrateApiBitcoinFfiTransactionSerializeConstMeta, + argValues: [that], apiImpl: this, )); } - TaskConstMeta get kCrateApiKeyBdkDescriptorSecretKeyCreateConstMeta => + TaskConstMeta get kCrateApiBitcoinFfiTransactionSerializeConstMeta => const TaskConstMeta( - debugName: "bdk_descriptor_secret_key_create", - argNames: ["network", "mnemonic", "password"], + debugName: "ffi_transaction_serialize", + argNames: ["that"], ); @override - Future crateApiKeyBdkDescriptorSecretKeyDerive( - {required BdkDescriptorSecretKey ptr, required BdkDerivationPath path}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(ptr); - var arg1 = cst_encode_box_autoadd_bdk_derivation_path(path); - return wire.wire__crate__api__key__bdk_descriptor_secret_key_derive( - port_, arg0, arg1); + int crateApiBitcoinFfiTransactionVersion({required FfiTransaction that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_ffi_transaction(that); + return wire.wire__crate__api__bitcoin__ffi_transaction_version(arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor_secret_key, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_i_32, + decodeErrorData: null, ), - constMeta: kCrateApiKeyBdkDescriptorSecretKeyDeriveConstMeta, - argValues: [ptr, path], + constMeta: kCrateApiBitcoinFfiTransactionVersionConstMeta, + argValues: [that], apiImpl: this, )); } - TaskConstMeta get kCrateApiKeyBdkDescriptorSecretKeyDeriveConstMeta => + TaskConstMeta get kCrateApiBitcoinFfiTransactionVersionConstMeta => const TaskConstMeta( - debugName: "bdk_descriptor_secret_key_derive", - argNames: ["ptr", "path"], + debugName: "ffi_transaction_version", + argNames: ["that"], ); @override - Future crateApiKeyBdkDescriptorSecretKeyExtend( - {required BdkDescriptorSecretKey ptr, required BdkDerivationPath path}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(ptr); - var arg1 = cst_encode_box_autoadd_bdk_derivation_path(path); - return wire.wire__crate__api__key__bdk_descriptor_secret_key_extend( - port_, arg0, arg1); + BigInt crateApiBitcoinFfiTransactionVsize({required FfiTransaction that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_ffi_transaction(that); + return wire.wire__crate__api__bitcoin__ffi_transaction_vsize(arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor_secret_key, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_u_64, + decodeErrorData: null, ), - constMeta: kCrateApiKeyBdkDescriptorSecretKeyExtendConstMeta, - argValues: [ptr, path], + constMeta: kCrateApiBitcoinFfiTransactionVsizeConstMeta, + argValues: [that], apiImpl: this, )); } - TaskConstMeta get kCrateApiKeyBdkDescriptorSecretKeyExtendConstMeta => + TaskConstMeta get kCrateApiBitcoinFfiTransactionVsizeConstMeta => const TaskConstMeta( - debugName: "bdk_descriptor_secret_key_extend", - argNames: ["ptr", "path"], + debugName: "ffi_transaction_vsize", + argNames: ["that"], ); @override - Future crateApiKeyBdkDescriptorSecretKeyFromString( - {required String secretKey}) { + Future crateApiBitcoinFfiTransactionWeight( + {required FfiTransaction that}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_String(secretKey); - return wire - .wire__crate__api__key__bdk_descriptor_secret_key_from_string( - port_, arg0); + var arg0 = cst_encode_box_autoadd_ffi_transaction(that); + return wire.wire__crate__api__bitcoin__ffi_transaction_weight( + port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor_secret_key, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_u_64, + decodeErrorData: null, ), - constMeta: kCrateApiKeyBdkDescriptorSecretKeyFromStringConstMeta, - argValues: [secretKey], + constMeta: kCrateApiBitcoinFfiTransactionWeightConstMeta, + argValues: [that], apiImpl: this, )); } - TaskConstMeta get kCrateApiKeyBdkDescriptorSecretKeyFromStringConstMeta => + TaskConstMeta get kCrateApiBitcoinFfiTransactionWeightConstMeta => const TaskConstMeta( - debugName: "bdk_descriptor_secret_key_from_string", - argNames: ["secretKey"], + debugName: "ffi_transaction_weight", + argNames: ["that"], ); @override - Uint8List crateApiKeyBdkDescriptorSecretKeySecretBytes( - {required BdkDescriptorSecretKey that}) { + String crateApiDescriptorFfiDescriptorAsString( + {required FfiDescriptor that}) { return handler.executeSync(SyncTask( callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(that); + var arg0 = cst_encode_box_autoadd_ffi_descriptor(that); return wire - .wire__crate__api__key__bdk_descriptor_secret_key_secret_bytes( - arg0); + .wire__crate__api__descriptor__ffi_descriptor_as_string(arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_list_prim_u_8_strict, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_String, + decodeErrorData: null, ), - constMeta: kCrateApiKeyBdkDescriptorSecretKeySecretBytesConstMeta, + constMeta: kCrateApiDescriptorFfiDescriptorAsStringConstMeta, argValues: [that], apiImpl: this, )); } - TaskConstMeta get kCrateApiKeyBdkDescriptorSecretKeySecretBytesConstMeta => + TaskConstMeta get kCrateApiDescriptorFfiDescriptorAsStringConstMeta => const TaskConstMeta( - debugName: "bdk_descriptor_secret_key_secret_bytes", + debugName: "ffi_descriptor_as_string", argNames: ["that"], ); @override - String crateApiKeyBdkMnemonicAsString({required BdkMnemonic that}) { + BigInt crateApiDescriptorFfiDescriptorMaxSatisfactionWeight( + {required FfiDescriptor that}) { return handler.executeSync(SyncTask( callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_mnemonic(that); - return wire.wire__crate__api__key__bdk_mnemonic_as_string(arg0); + var arg0 = cst_encode_box_autoadd_ffi_descriptor(that); + return wire + .wire__crate__api__descriptor__ffi_descriptor_max_satisfaction_weight( + arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: null, + decodeSuccessData: dco_decode_u_64, + decodeErrorData: dco_decode_descriptor_error, ), - constMeta: kCrateApiKeyBdkMnemonicAsStringConstMeta, + constMeta: kCrateApiDescriptorFfiDescriptorMaxSatisfactionWeightConstMeta, argValues: [that], apiImpl: this, )); } - TaskConstMeta get kCrateApiKeyBdkMnemonicAsStringConstMeta => - const TaskConstMeta( - debugName: "bdk_mnemonic_as_string", - argNames: ["that"], - ); + TaskConstMeta + get kCrateApiDescriptorFfiDescriptorMaxSatisfactionWeightConstMeta => + const TaskConstMeta( + debugName: "ffi_descriptor_max_satisfaction_weight", + argNames: ["that"], + ); @override - Future crateApiKeyBdkMnemonicFromEntropy( - {required List entropy}) { + Future crateApiDescriptorFfiDescriptorNew( + {required String descriptor, required Network network}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_list_prim_u_8_loose(entropy); - return wire.wire__crate__api__key__bdk_mnemonic_from_entropy( - port_, arg0); + var arg0 = cst_encode_String(descriptor); + var arg1 = cst_encode_network(network); + return wire.wire__crate__api__descriptor__ffi_descriptor_new( + port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_mnemonic, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_ffi_descriptor, + decodeErrorData: dco_decode_descriptor_error, ), - constMeta: kCrateApiKeyBdkMnemonicFromEntropyConstMeta, - argValues: [entropy], + constMeta: kCrateApiDescriptorFfiDescriptorNewConstMeta, + argValues: [descriptor, network], apiImpl: this, )); } - TaskConstMeta get kCrateApiKeyBdkMnemonicFromEntropyConstMeta => + TaskConstMeta get kCrateApiDescriptorFfiDescriptorNewConstMeta => const TaskConstMeta( - debugName: "bdk_mnemonic_from_entropy", - argNames: ["entropy"], + debugName: "ffi_descriptor_new", + argNames: ["descriptor", "network"], ); @override - Future crateApiKeyBdkMnemonicFromString( - {required String mnemonic}) { + Future crateApiDescriptorFfiDescriptorNewBip44( + {required FfiDescriptorSecretKey secretKey, + required KeychainKind keychainKind, + required Network network}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_String(mnemonic); - return wire.wire__crate__api__key__bdk_mnemonic_from_string( - port_, arg0); + var arg0 = cst_encode_box_autoadd_ffi_descriptor_secret_key(secretKey); + var arg1 = cst_encode_keychain_kind(keychainKind); + var arg2 = cst_encode_network(network); + return wire.wire__crate__api__descriptor__ffi_descriptor_new_bip44( + port_, arg0, arg1, arg2); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_mnemonic, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_ffi_descriptor, + decodeErrorData: dco_decode_descriptor_error, ), - constMeta: kCrateApiKeyBdkMnemonicFromStringConstMeta, - argValues: [mnemonic], + constMeta: kCrateApiDescriptorFfiDescriptorNewBip44ConstMeta, + argValues: [secretKey, keychainKind, network], apiImpl: this, )); } - TaskConstMeta get kCrateApiKeyBdkMnemonicFromStringConstMeta => + TaskConstMeta get kCrateApiDescriptorFfiDescriptorNewBip44ConstMeta => const TaskConstMeta( - debugName: "bdk_mnemonic_from_string", - argNames: ["mnemonic"], + debugName: "ffi_descriptor_new_bip44", + argNames: ["secretKey", "keychainKind", "network"], ); @override - Future crateApiKeyBdkMnemonicNew( - {required WordCount wordCount}) { + Future crateApiDescriptorFfiDescriptorNewBip44Public( + {required FfiDescriptorPublicKey publicKey, + required String fingerprint, + required KeychainKind keychainKind, + required Network network}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_word_count(wordCount); - return wire.wire__crate__api__key__bdk_mnemonic_new(port_, arg0); + var arg0 = cst_encode_box_autoadd_ffi_descriptor_public_key(publicKey); + var arg1 = cst_encode_String(fingerprint); + var arg2 = cst_encode_keychain_kind(keychainKind); + var arg3 = cst_encode_network(network); + return wire + .wire__crate__api__descriptor__ffi_descriptor_new_bip44_public( + port_, arg0, arg1, arg2, arg3); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_mnemonic, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_ffi_descriptor, + decodeErrorData: dco_decode_descriptor_error, ), - constMeta: kCrateApiKeyBdkMnemonicNewConstMeta, - argValues: [wordCount], + constMeta: kCrateApiDescriptorFfiDescriptorNewBip44PublicConstMeta, + argValues: [publicKey, fingerprint, keychainKind, network], apiImpl: this, )); } - TaskConstMeta get kCrateApiKeyBdkMnemonicNewConstMeta => const TaskConstMeta( - debugName: "bdk_mnemonic_new", - argNames: ["wordCount"], + TaskConstMeta get kCrateApiDescriptorFfiDescriptorNewBip44PublicConstMeta => + const TaskConstMeta( + debugName: "ffi_descriptor_new_bip44_public", + argNames: ["publicKey", "fingerprint", "keychainKind", "network"], ); @override - String crateApiPsbtBdkPsbtAsString({required BdkPsbt that}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_psbt(that); - return wire.wire__crate__api__psbt__bdk_psbt_as_string(arg0); + Future crateApiDescriptorFfiDescriptorNewBip49( + {required FfiDescriptorSecretKey secretKey, + required KeychainKind keychainKind, + required Network network}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ffi_descriptor_secret_key(secretKey); + var arg1 = cst_encode_keychain_kind(keychainKind); + var arg2 = cst_encode_network(network); + return wire.wire__crate__api__descriptor__ffi_descriptor_new_bip49( + port_, arg0, arg1, arg2); }, codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: null, + decodeSuccessData: dco_decode_ffi_descriptor, + decodeErrorData: dco_decode_descriptor_error, ), - constMeta: kCrateApiPsbtBdkPsbtAsStringConstMeta, - argValues: [that], + constMeta: kCrateApiDescriptorFfiDescriptorNewBip49ConstMeta, + argValues: [secretKey, keychainKind, network], apiImpl: this, )); } - TaskConstMeta get kCrateApiPsbtBdkPsbtAsStringConstMeta => + TaskConstMeta get kCrateApiDescriptorFfiDescriptorNewBip49ConstMeta => const TaskConstMeta( - debugName: "bdk_psbt_as_string", - argNames: ["that"], + debugName: "ffi_descriptor_new_bip49", + argNames: ["secretKey", "keychainKind", "network"], ); @override - Future crateApiPsbtBdkPsbtCombine( - {required BdkPsbt ptr, required BdkPsbt other}) { + Future crateApiDescriptorFfiDescriptorNewBip49Public( + {required FfiDescriptorPublicKey publicKey, + required String fingerprint, + required KeychainKind keychainKind, + required Network network}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_psbt(ptr); - var arg1 = cst_encode_box_autoadd_bdk_psbt(other); - return wire.wire__crate__api__psbt__bdk_psbt_combine(port_, arg0, arg1); + var arg0 = cst_encode_box_autoadd_ffi_descriptor_public_key(publicKey); + var arg1 = cst_encode_String(fingerprint); + var arg2 = cst_encode_keychain_kind(keychainKind); + var arg3 = cst_encode_network(network); + return wire + .wire__crate__api__descriptor__ffi_descriptor_new_bip49_public( + port_, arg0, arg1, arg2, arg3); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_psbt, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_ffi_descriptor, + decodeErrorData: dco_decode_descriptor_error, ), - constMeta: kCrateApiPsbtBdkPsbtCombineConstMeta, - argValues: [ptr, other], + constMeta: kCrateApiDescriptorFfiDescriptorNewBip49PublicConstMeta, + argValues: [publicKey, fingerprint, keychainKind, network], apiImpl: this, )); } - TaskConstMeta get kCrateApiPsbtBdkPsbtCombineConstMeta => const TaskConstMeta( - debugName: "bdk_psbt_combine", - argNames: ["ptr", "other"], + TaskConstMeta get kCrateApiDescriptorFfiDescriptorNewBip49PublicConstMeta => + const TaskConstMeta( + debugName: "ffi_descriptor_new_bip49_public", + argNames: ["publicKey", "fingerprint", "keychainKind", "network"], ); @override - BdkTransaction crateApiPsbtBdkPsbtExtractTx({required BdkPsbt ptr}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_psbt(ptr); - return wire.wire__crate__api__psbt__bdk_psbt_extract_tx(arg0); + Future crateApiDescriptorFfiDescriptorNewBip84( + {required FfiDescriptorSecretKey secretKey, + required KeychainKind keychainKind, + required Network network}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ffi_descriptor_secret_key(secretKey); + var arg1 = cst_encode_keychain_kind(keychainKind); + var arg2 = cst_encode_network(network); + return wire.wire__crate__api__descriptor__ffi_descriptor_new_bip84( + port_, arg0, arg1, arg2); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_transaction, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_ffi_descriptor, + decodeErrorData: dco_decode_descriptor_error, ), - constMeta: kCrateApiPsbtBdkPsbtExtractTxConstMeta, - argValues: [ptr], + constMeta: kCrateApiDescriptorFfiDescriptorNewBip84ConstMeta, + argValues: [secretKey, keychainKind, network], apiImpl: this, )); } - TaskConstMeta get kCrateApiPsbtBdkPsbtExtractTxConstMeta => + TaskConstMeta get kCrateApiDescriptorFfiDescriptorNewBip84ConstMeta => const TaskConstMeta( - debugName: "bdk_psbt_extract_tx", - argNames: ["ptr"], + debugName: "ffi_descriptor_new_bip84", + argNames: ["secretKey", "keychainKind", "network"], ); @override - BigInt? crateApiPsbtBdkPsbtFeeAmount({required BdkPsbt that}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_psbt(that); - return wire.wire__crate__api__psbt__bdk_psbt_fee_amount(arg0); + Future crateApiDescriptorFfiDescriptorNewBip84Public( + {required FfiDescriptorPublicKey publicKey, + required String fingerprint, + required KeychainKind keychainKind, + required Network network}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ffi_descriptor_public_key(publicKey); + var arg1 = cst_encode_String(fingerprint); + var arg2 = cst_encode_keychain_kind(keychainKind); + var arg3 = cst_encode_network(network); + return wire + .wire__crate__api__descriptor__ffi_descriptor_new_bip84_public( + port_, arg0, arg1, arg2, arg3); }, codec: DcoCodec( - decodeSuccessData: dco_decode_opt_box_autoadd_u_64, - decodeErrorData: null, + decodeSuccessData: dco_decode_ffi_descriptor, + decodeErrorData: dco_decode_descriptor_error, ), - constMeta: kCrateApiPsbtBdkPsbtFeeAmountConstMeta, - argValues: [that], + constMeta: kCrateApiDescriptorFfiDescriptorNewBip84PublicConstMeta, + argValues: [publicKey, fingerprint, keychainKind, network], apiImpl: this, )); } - TaskConstMeta get kCrateApiPsbtBdkPsbtFeeAmountConstMeta => + TaskConstMeta get kCrateApiDescriptorFfiDescriptorNewBip84PublicConstMeta => const TaskConstMeta( - debugName: "bdk_psbt_fee_amount", - argNames: ["that"], + debugName: "ffi_descriptor_new_bip84_public", + argNames: ["publicKey", "fingerprint", "keychainKind", "network"], ); @override - FeeRate? crateApiPsbtBdkPsbtFeeRate({required BdkPsbt that}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_psbt(that); - return wire.wire__crate__api__psbt__bdk_psbt_fee_rate(arg0); + Future crateApiDescriptorFfiDescriptorNewBip86( + {required FfiDescriptorSecretKey secretKey, + required KeychainKind keychainKind, + required Network network}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ffi_descriptor_secret_key(secretKey); + var arg1 = cst_encode_keychain_kind(keychainKind); + var arg2 = cst_encode_network(network); + return wire.wire__crate__api__descriptor__ffi_descriptor_new_bip86( + port_, arg0, arg1, arg2); }, codec: DcoCodec( - decodeSuccessData: dco_decode_opt_box_autoadd_fee_rate, - decodeErrorData: null, + decodeSuccessData: dco_decode_ffi_descriptor, + decodeErrorData: dco_decode_descriptor_error, ), - constMeta: kCrateApiPsbtBdkPsbtFeeRateConstMeta, - argValues: [that], + constMeta: kCrateApiDescriptorFfiDescriptorNewBip86ConstMeta, + argValues: [secretKey, keychainKind, network], apiImpl: this, )); } - TaskConstMeta get kCrateApiPsbtBdkPsbtFeeRateConstMeta => const TaskConstMeta( - debugName: "bdk_psbt_fee_rate", - argNames: ["that"], + TaskConstMeta get kCrateApiDescriptorFfiDescriptorNewBip86ConstMeta => + const TaskConstMeta( + debugName: "ffi_descriptor_new_bip86", + argNames: ["secretKey", "keychainKind", "network"], ); @override - Future crateApiPsbtBdkPsbtFromStr({required String psbtBase64}) { + Future crateApiDescriptorFfiDescriptorNewBip86Public( + {required FfiDescriptorPublicKey publicKey, + required String fingerprint, + required KeychainKind keychainKind, + required Network network}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_String(psbtBase64); - return wire.wire__crate__api__psbt__bdk_psbt_from_str(port_, arg0); + var arg0 = cst_encode_box_autoadd_ffi_descriptor_public_key(publicKey); + var arg1 = cst_encode_String(fingerprint); + var arg2 = cst_encode_keychain_kind(keychainKind); + var arg3 = cst_encode_network(network); + return wire + .wire__crate__api__descriptor__ffi_descriptor_new_bip86_public( + port_, arg0, arg1, arg2, arg3); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_psbt, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_ffi_descriptor, + decodeErrorData: dco_decode_descriptor_error, ), - constMeta: kCrateApiPsbtBdkPsbtFromStrConstMeta, - argValues: [psbtBase64], + constMeta: kCrateApiDescriptorFfiDescriptorNewBip86PublicConstMeta, + argValues: [publicKey, fingerprint, keychainKind, network], apiImpl: this, )); } - TaskConstMeta get kCrateApiPsbtBdkPsbtFromStrConstMeta => const TaskConstMeta( - debugName: "bdk_psbt_from_str", - argNames: ["psbtBase64"], + TaskConstMeta get kCrateApiDescriptorFfiDescriptorNewBip86PublicConstMeta => + const TaskConstMeta( + debugName: "ffi_descriptor_new_bip86_public", + argNames: ["publicKey", "fingerprint", "keychainKind", "network"], ); @override - String crateApiPsbtBdkPsbtJsonSerialize({required BdkPsbt that}) { + String crateApiDescriptorFfiDescriptorToStringWithSecret( + {required FfiDescriptor that}) { return handler.executeSync(SyncTask( callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_psbt(that); - return wire.wire__crate__api__psbt__bdk_psbt_json_serialize(arg0); + var arg0 = cst_encode_box_autoadd_ffi_descriptor(that); + return wire + .wire__crate__api__descriptor__ffi_descriptor_to_string_with_secret( + arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_String, decodeErrorData: null, ), - constMeta: kCrateApiPsbtBdkPsbtJsonSerializeConstMeta, + constMeta: kCrateApiDescriptorFfiDescriptorToStringWithSecretConstMeta, argValues: [that], apiImpl: this, )); } - TaskConstMeta get kCrateApiPsbtBdkPsbtJsonSerializeConstMeta => - const TaskConstMeta( - debugName: "bdk_psbt_json_serialize", - argNames: ["that"], - ); + TaskConstMeta + get kCrateApiDescriptorFfiDescriptorToStringWithSecretConstMeta => + const TaskConstMeta( + debugName: "ffi_descriptor_to_string_with_secret", + argNames: ["that"], + ); @override - Uint8List crateApiPsbtBdkPsbtSerialize({required BdkPsbt that}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_psbt(that); - return wire.wire__crate__api__psbt__bdk_psbt_serialize(arg0); + Future crateApiElectrumFfiElectrumClientBroadcast( + {required FfiElectrumClient opaque, + required FfiTransaction transaction}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ffi_electrum_client(opaque); + var arg1 = cst_encode_box_autoadd_ffi_transaction(transaction); + return wire.wire__crate__api__electrum__ffi_electrum_client_broadcast( + port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_list_prim_u_8_strict, - decodeErrorData: null, + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_electrum_error, ), - constMeta: kCrateApiPsbtBdkPsbtSerializeConstMeta, - argValues: [that], + constMeta: kCrateApiElectrumFfiElectrumClientBroadcastConstMeta, + argValues: [opaque, transaction], apiImpl: this, )); } - TaskConstMeta get kCrateApiPsbtBdkPsbtSerializeConstMeta => + TaskConstMeta get kCrateApiElectrumFfiElectrumClientBroadcastConstMeta => const TaskConstMeta( - debugName: "bdk_psbt_serialize", - argNames: ["that"], + debugName: "ffi_electrum_client_broadcast", + argNames: ["opaque", "transaction"], ); @override - String crateApiPsbtBdkPsbtTxid({required BdkPsbt that}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_psbt(that); - return wire.wire__crate__api__psbt__bdk_psbt_txid(arg0); + Future crateApiElectrumFfiElectrumClientFullScan( + {required FfiElectrumClient opaque, + required FfiFullScanRequest request, + required BigInt stopGap, + required BigInt batchSize, + required bool fetchPrevTxouts}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ffi_electrum_client(opaque); + var arg1 = cst_encode_box_autoadd_ffi_full_scan_request(request); + var arg2 = cst_encode_u_64(stopGap); + var arg3 = cst_encode_u_64(batchSize); + var arg4 = cst_encode_bool(fetchPrevTxouts); + return wire.wire__crate__api__electrum__ffi_electrum_client_full_scan( + port_, arg0, arg1, arg2, arg3, arg4); }, codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: null, + decodeSuccessData: dco_decode_ffi_update, + decodeErrorData: dco_decode_electrum_error, ), - constMeta: kCrateApiPsbtBdkPsbtTxidConstMeta, - argValues: [that], + constMeta: kCrateApiElectrumFfiElectrumClientFullScanConstMeta, + argValues: [opaque, request, stopGap, batchSize, fetchPrevTxouts], apiImpl: this, )); } - TaskConstMeta get kCrateApiPsbtBdkPsbtTxidConstMeta => const TaskConstMeta( - debugName: "bdk_psbt_txid", - argNames: ["that"], + TaskConstMeta get kCrateApiElectrumFfiElectrumClientFullScanConstMeta => + const TaskConstMeta( + debugName: "ffi_electrum_client_full_scan", + argNames: [ + "opaque", + "request", + "stopGap", + "batchSize", + "fetchPrevTxouts" + ], ); @override - String crateApiTypesBdkAddressAsString({required BdkAddress that}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_address(that); - return wire.wire__crate__api__types__bdk_address_as_string(arg0); + Future crateApiElectrumFfiElectrumClientNew( + {required String url}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(url); + return wire.wire__crate__api__electrum__ffi_electrum_client_new( + port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: null, + decodeSuccessData: dco_decode_ffi_electrum_client, + decodeErrorData: dco_decode_electrum_error, ), - constMeta: kCrateApiTypesBdkAddressAsStringConstMeta, - argValues: [that], + constMeta: kCrateApiElectrumFfiElectrumClientNewConstMeta, + argValues: [url], apiImpl: this, )); } - TaskConstMeta get kCrateApiTypesBdkAddressAsStringConstMeta => + TaskConstMeta get kCrateApiElectrumFfiElectrumClientNewConstMeta => const TaskConstMeta( - debugName: "bdk_address_as_string", - argNames: ["that"], + debugName: "ffi_electrum_client_new", + argNames: ["url"], ); @override - Future crateApiTypesBdkAddressFromScript( - {required BdkScriptBuf script, required Network network}) { + Future crateApiElectrumFfiElectrumClientSync( + {required FfiElectrumClient opaque, + required FfiSyncRequest request, + required BigInt batchSize, + required bool fetchPrevTxouts}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_script_buf(script); - var arg1 = cst_encode_network(network); - return wire.wire__crate__api__types__bdk_address_from_script( - port_, arg0, arg1); + var arg0 = cst_encode_box_autoadd_ffi_electrum_client(opaque); + var arg1 = cst_encode_box_autoadd_ffi_sync_request(request); + var arg2 = cst_encode_u_64(batchSize); + var arg3 = cst_encode_bool(fetchPrevTxouts); + return wire.wire__crate__api__electrum__ffi_electrum_client_sync( + port_, arg0, arg1, arg2, arg3); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_address, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_ffi_update, + decodeErrorData: dco_decode_electrum_error, ), - constMeta: kCrateApiTypesBdkAddressFromScriptConstMeta, - argValues: [script, network], + constMeta: kCrateApiElectrumFfiElectrumClientSyncConstMeta, + argValues: [opaque, request, batchSize, fetchPrevTxouts], apiImpl: this, )); } - TaskConstMeta get kCrateApiTypesBdkAddressFromScriptConstMeta => + TaskConstMeta get kCrateApiElectrumFfiElectrumClientSyncConstMeta => const TaskConstMeta( - debugName: "bdk_address_from_script", - argNames: ["script", "network"], + debugName: "ffi_electrum_client_sync", + argNames: ["opaque", "request", "batchSize", "fetchPrevTxouts"], ); @override - Future crateApiTypesBdkAddressFromString( - {required String address, required Network network}) { + Future crateApiEsploraFfiEsploraClientBroadcast( + {required FfiEsploraClient opaque, required FfiTransaction transaction}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_String(address); - var arg1 = cst_encode_network(network); - return wire.wire__crate__api__types__bdk_address_from_string( + var arg0 = cst_encode_box_autoadd_ffi_esplora_client(opaque); + var arg1 = cst_encode_box_autoadd_ffi_transaction(transaction); + return wire.wire__crate__api__esplora__ffi_esplora_client_broadcast( port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_address, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_unit, + decodeErrorData: dco_decode_esplora_error, ), - constMeta: kCrateApiTypesBdkAddressFromStringConstMeta, - argValues: [address, network], + constMeta: kCrateApiEsploraFfiEsploraClientBroadcastConstMeta, + argValues: [opaque, transaction], apiImpl: this, )); } - TaskConstMeta get kCrateApiTypesBdkAddressFromStringConstMeta => + TaskConstMeta get kCrateApiEsploraFfiEsploraClientBroadcastConstMeta => const TaskConstMeta( - debugName: "bdk_address_from_string", - argNames: ["address", "network"], + debugName: "ffi_esplora_client_broadcast", + argNames: ["opaque", "transaction"], ); @override - bool crateApiTypesBdkAddressIsValidForNetwork( - {required BdkAddress that, required Network network}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_address(that); - var arg1 = cst_encode_network(network); - return wire.wire__crate__api__types__bdk_address_is_valid_for_network( - arg0, arg1); + Future crateApiEsploraFfiEsploraClientFullScan( + {required FfiEsploraClient opaque, + required FfiFullScanRequest request, + required BigInt stopGap, + required BigInt parallelRequests}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ffi_esplora_client(opaque); + var arg1 = cst_encode_box_autoadd_ffi_full_scan_request(request); + var arg2 = cst_encode_u_64(stopGap); + var arg3 = cst_encode_u_64(parallelRequests); + return wire.wire__crate__api__esplora__ffi_esplora_client_full_scan( + port_, arg0, arg1, arg2, arg3); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: null, + decodeSuccessData: dco_decode_ffi_update, + decodeErrorData: dco_decode_esplora_error, ), - constMeta: kCrateApiTypesBdkAddressIsValidForNetworkConstMeta, - argValues: [that, network], + constMeta: kCrateApiEsploraFfiEsploraClientFullScanConstMeta, + argValues: [opaque, request, stopGap, parallelRequests], apiImpl: this, )); } - TaskConstMeta get kCrateApiTypesBdkAddressIsValidForNetworkConstMeta => + TaskConstMeta get kCrateApiEsploraFfiEsploraClientFullScanConstMeta => const TaskConstMeta( - debugName: "bdk_address_is_valid_for_network", - argNames: ["that", "network"], + debugName: "ffi_esplora_client_full_scan", + argNames: ["opaque", "request", "stopGap", "parallelRequests"], ); @override - Network crateApiTypesBdkAddressNetwork({required BdkAddress that}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_address(that); - return wire.wire__crate__api__types__bdk_address_network(arg0); + Future crateApiEsploraFfiEsploraClientNew( + {required String url}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(url); + return wire.wire__crate__api__esplora__ffi_esplora_client_new( + port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_network, + decodeSuccessData: dco_decode_ffi_esplora_client, decodeErrorData: null, ), - constMeta: kCrateApiTypesBdkAddressNetworkConstMeta, - argValues: [that], + constMeta: kCrateApiEsploraFfiEsploraClientNewConstMeta, + argValues: [url], apiImpl: this, )); } - TaskConstMeta get kCrateApiTypesBdkAddressNetworkConstMeta => + TaskConstMeta get kCrateApiEsploraFfiEsploraClientNewConstMeta => const TaskConstMeta( - debugName: "bdk_address_network", - argNames: ["that"], + debugName: "ffi_esplora_client_new", + argNames: ["url"], ); @override - Payload crateApiTypesBdkAddressPayload({required BdkAddress that}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_address(that); - return wire.wire__crate__api__types__bdk_address_payload(arg0); + Future crateApiEsploraFfiEsploraClientSync( + {required FfiEsploraClient opaque, + required FfiSyncRequest request, + required BigInt parallelRequests}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ffi_esplora_client(opaque); + var arg1 = cst_encode_box_autoadd_ffi_sync_request(request); + var arg2 = cst_encode_u_64(parallelRequests); + return wire.wire__crate__api__esplora__ffi_esplora_client_sync( + port_, arg0, arg1, arg2); }, codec: DcoCodec( - decodeSuccessData: dco_decode_payload, - decodeErrorData: null, + decodeSuccessData: dco_decode_ffi_update, + decodeErrorData: dco_decode_esplora_error, ), - constMeta: kCrateApiTypesBdkAddressPayloadConstMeta, - argValues: [that], + constMeta: kCrateApiEsploraFfiEsploraClientSyncConstMeta, + argValues: [opaque, request, parallelRequests], apiImpl: this, )); } - TaskConstMeta get kCrateApiTypesBdkAddressPayloadConstMeta => + TaskConstMeta get kCrateApiEsploraFfiEsploraClientSyncConstMeta => const TaskConstMeta( - debugName: "bdk_address_payload", - argNames: ["that"], + debugName: "ffi_esplora_client_sync", + argNames: ["opaque", "request", "parallelRequests"], ); @override - BdkScriptBuf crateApiTypesBdkAddressScript({required BdkAddress ptr}) { + String crateApiKeyFfiDerivationPathAsString( + {required FfiDerivationPath that}) { return handler.executeSync(SyncTask( callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_address(ptr); - return wire.wire__crate__api__types__bdk_address_script(arg0); + var arg0 = cst_encode_box_autoadd_ffi_derivation_path(that); + return wire.wire__crate__api__key__ffi_derivation_path_as_string(arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_script_buf, + decodeSuccessData: dco_decode_String, decodeErrorData: null, ), - constMeta: kCrateApiTypesBdkAddressScriptConstMeta, - argValues: [ptr], + constMeta: kCrateApiKeyFfiDerivationPathAsStringConstMeta, + argValues: [that], apiImpl: this, )); } - TaskConstMeta get kCrateApiTypesBdkAddressScriptConstMeta => + TaskConstMeta get kCrateApiKeyFfiDerivationPathAsStringConstMeta => const TaskConstMeta( - debugName: "bdk_address_script", - argNames: ["ptr"], + debugName: "ffi_derivation_path_as_string", + argNames: ["that"], ); @override - String crateApiTypesBdkAddressToQrUri({required BdkAddress that}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_address(that); - return wire.wire__crate__api__types__bdk_address_to_qr_uri(arg0); + Future crateApiKeyFfiDerivationPathFromString( + {required String path}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(path); + return wire.wire__crate__api__key__ffi_derivation_path_from_string( + port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: null, + decodeSuccessData: dco_decode_ffi_derivation_path, + decodeErrorData: dco_decode_bip_32_error, ), - constMeta: kCrateApiTypesBdkAddressToQrUriConstMeta, - argValues: [that], + constMeta: kCrateApiKeyFfiDerivationPathFromStringConstMeta, + argValues: [path], apiImpl: this, )); } - TaskConstMeta get kCrateApiTypesBdkAddressToQrUriConstMeta => + TaskConstMeta get kCrateApiKeyFfiDerivationPathFromStringConstMeta => const TaskConstMeta( - debugName: "bdk_address_to_qr_uri", - argNames: ["that"], + debugName: "ffi_derivation_path_from_string", + argNames: ["path"], ); @override - String crateApiTypesBdkScriptBufAsString({required BdkScriptBuf that}) { + String crateApiKeyFfiDescriptorPublicKeyAsString( + {required FfiDescriptorPublicKey that}) { return handler.executeSync(SyncTask( callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_script_buf(that); - return wire.wire__crate__api__types__bdk_script_buf_as_string(arg0); + var arg0 = cst_encode_box_autoadd_ffi_descriptor_public_key(that); + return wire + .wire__crate__api__key__ffi_descriptor_public_key_as_string(arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_String, decodeErrorData: null, ), - constMeta: kCrateApiTypesBdkScriptBufAsStringConstMeta, + constMeta: kCrateApiKeyFfiDescriptorPublicKeyAsStringConstMeta, argValues: [that], apiImpl: this, )); } - TaskConstMeta get kCrateApiTypesBdkScriptBufAsStringConstMeta => + TaskConstMeta get kCrateApiKeyFfiDescriptorPublicKeyAsStringConstMeta => const TaskConstMeta( - debugName: "bdk_script_buf_as_string", + debugName: "ffi_descriptor_public_key_as_string", argNames: ["that"], ); @override - BdkScriptBuf crateApiTypesBdkScriptBufEmpty() { - return handler.executeSync(SyncTask( - callFfi: () { - return wire.wire__crate__api__types__bdk_script_buf_empty(); + Future crateApiKeyFfiDescriptorPublicKeyDerive( + {required FfiDescriptorPublicKey opaque, + required FfiDerivationPath path}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ffi_descriptor_public_key(opaque); + var arg1 = cst_encode_box_autoadd_ffi_derivation_path(path); + return wire.wire__crate__api__key__ffi_descriptor_public_key_derive( + port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_script_buf, - decodeErrorData: null, + decodeSuccessData: dco_decode_ffi_descriptor_public_key, + decodeErrorData: dco_decode_descriptor_key_error, ), - constMeta: kCrateApiTypesBdkScriptBufEmptyConstMeta, - argValues: [], + constMeta: kCrateApiKeyFfiDescriptorPublicKeyDeriveConstMeta, + argValues: [opaque, path], apiImpl: this, )); } - TaskConstMeta get kCrateApiTypesBdkScriptBufEmptyConstMeta => + TaskConstMeta get kCrateApiKeyFfiDescriptorPublicKeyDeriveConstMeta => const TaskConstMeta( - debugName: "bdk_script_buf_empty", - argNames: [], + debugName: "ffi_descriptor_public_key_derive", + argNames: ["opaque", "path"], ); @override - Future crateApiTypesBdkScriptBufFromHex({required String s}) { + Future crateApiKeyFfiDescriptorPublicKeyExtend( + {required FfiDescriptorPublicKey opaque, + required FfiDerivationPath path}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_String(s); - return wire.wire__crate__api__types__bdk_script_buf_from_hex( - port_, arg0); + var arg0 = cst_encode_box_autoadd_ffi_descriptor_public_key(opaque); + var arg1 = cst_encode_box_autoadd_ffi_derivation_path(path); + return wire.wire__crate__api__key__ffi_descriptor_public_key_extend( + port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_script_buf, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_ffi_descriptor_public_key, + decodeErrorData: dco_decode_descriptor_key_error, ), - constMeta: kCrateApiTypesBdkScriptBufFromHexConstMeta, - argValues: [s], + constMeta: kCrateApiKeyFfiDescriptorPublicKeyExtendConstMeta, + argValues: [opaque, path], apiImpl: this, )); } - TaskConstMeta get kCrateApiTypesBdkScriptBufFromHexConstMeta => + TaskConstMeta get kCrateApiKeyFfiDescriptorPublicKeyExtendConstMeta => const TaskConstMeta( - debugName: "bdk_script_buf_from_hex", - argNames: ["s"], + debugName: "ffi_descriptor_public_key_extend", + argNames: ["opaque", "path"], ); @override - Future crateApiTypesBdkScriptBufWithCapacity( - {required BigInt capacity}) { + Future crateApiKeyFfiDescriptorPublicKeyFromString( + {required String publicKey}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_usize(capacity); - return wire.wire__crate__api__types__bdk_script_buf_with_capacity( - port_, arg0); + var arg0 = cst_encode_String(publicKey); + return wire + .wire__crate__api__key__ffi_descriptor_public_key_from_string( + port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_script_buf, - decodeErrorData: null, + decodeSuccessData: dco_decode_ffi_descriptor_public_key, + decodeErrorData: dco_decode_descriptor_key_error, ), - constMeta: kCrateApiTypesBdkScriptBufWithCapacityConstMeta, - argValues: [capacity], + constMeta: kCrateApiKeyFfiDescriptorPublicKeyFromStringConstMeta, + argValues: [publicKey], apiImpl: this, )); } - TaskConstMeta get kCrateApiTypesBdkScriptBufWithCapacityConstMeta => + TaskConstMeta get kCrateApiKeyFfiDescriptorPublicKeyFromStringConstMeta => const TaskConstMeta( - debugName: "bdk_script_buf_with_capacity", - argNames: ["capacity"], + debugName: "ffi_descriptor_public_key_from_string", + argNames: ["publicKey"], ); @override - Future crateApiTypesBdkTransactionFromBytes( - {required List transactionBytes}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_list_prim_u_8_loose(transactionBytes); - return wire.wire__crate__api__types__bdk_transaction_from_bytes( - port_, arg0); + FfiDescriptorPublicKey crateApiKeyFfiDescriptorSecretKeyAsPublic( + {required FfiDescriptorSecretKey opaque}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_ffi_descriptor_secret_key(opaque); + return wire + .wire__crate__api__key__ffi_descriptor_secret_key_as_public(arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_transaction, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_ffi_descriptor_public_key, + decodeErrorData: dco_decode_descriptor_key_error, ), - constMeta: kCrateApiTypesBdkTransactionFromBytesConstMeta, - argValues: [transactionBytes], + constMeta: kCrateApiKeyFfiDescriptorSecretKeyAsPublicConstMeta, + argValues: [opaque], apiImpl: this, )); } - TaskConstMeta get kCrateApiTypesBdkTransactionFromBytesConstMeta => + TaskConstMeta get kCrateApiKeyFfiDescriptorSecretKeyAsPublicConstMeta => const TaskConstMeta( - debugName: "bdk_transaction_from_bytes", - argNames: ["transactionBytes"], + debugName: "ffi_descriptor_secret_key_as_public", + argNames: ["opaque"], ); @override - Future> crateApiTypesBdkTransactionInput( - {required BdkTransaction that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_transaction(that); - return wire.wire__crate__api__types__bdk_transaction_input(port_, arg0); + String crateApiKeyFfiDescriptorSecretKeyAsString( + {required FfiDescriptorSecretKey that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_ffi_descriptor_secret_key(that); + return wire + .wire__crate__api__key__ffi_descriptor_secret_key_as_string(arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_list_tx_in, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_String, + decodeErrorData: null, ), - constMeta: kCrateApiTypesBdkTransactionInputConstMeta, + constMeta: kCrateApiKeyFfiDescriptorSecretKeyAsStringConstMeta, argValues: [that], apiImpl: this, )); } - TaskConstMeta get kCrateApiTypesBdkTransactionInputConstMeta => + TaskConstMeta get kCrateApiKeyFfiDescriptorSecretKeyAsStringConstMeta => const TaskConstMeta( - debugName: "bdk_transaction_input", + debugName: "ffi_descriptor_secret_key_as_string", argNames: ["that"], ); @override - Future crateApiTypesBdkTransactionIsCoinBase( - {required BdkTransaction that}) { + Future crateApiKeyFfiDescriptorSecretKeyCreate( + {required Network network, + required FfiMnemonic mnemonic, + String? password}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_transaction(that); - return wire.wire__crate__api__types__bdk_transaction_is_coin_base( - port_, arg0); + var arg0 = cst_encode_network(network); + var arg1 = cst_encode_box_autoadd_ffi_mnemonic(mnemonic); + var arg2 = cst_encode_opt_String(password); + return wire.wire__crate__api__key__ffi_descriptor_secret_key_create( + port_, arg0, arg1, arg2); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_ffi_descriptor_secret_key, + decodeErrorData: dco_decode_descriptor_error, ), - constMeta: kCrateApiTypesBdkTransactionIsCoinBaseConstMeta, - argValues: [that], + constMeta: kCrateApiKeyFfiDescriptorSecretKeyCreateConstMeta, + argValues: [network, mnemonic, password], apiImpl: this, )); } - TaskConstMeta get kCrateApiTypesBdkTransactionIsCoinBaseConstMeta => + TaskConstMeta get kCrateApiKeyFfiDescriptorSecretKeyCreateConstMeta => const TaskConstMeta( - debugName: "bdk_transaction_is_coin_base", - argNames: ["that"], + debugName: "ffi_descriptor_secret_key_create", + argNames: ["network", "mnemonic", "password"], ); @override - Future crateApiTypesBdkTransactionIsExplicitlyRbf( - {required BdkTransaction that}) { + Future crateApiKeyFfiDescriptorSecretKeyDerive( + {required FfiDescriptorSecretKey opaque, + required FfiDerivationPath path}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_transaction(that); - return wire.wire__crate__api__types__bdk_transaction_is_explicitly_rbf( - port_, arg0); + var arg0 = cst_encode_box_autoadd_ffi_descriptor_secret_key(opaque); + var arg1 = cst_encode_box_autoadd_ffi_derivation_path(path); + return wire.wire__crate__api__key__ffi_descriptor_secret_key_derive( + port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_ffi_descriptor_secret_key, + decodeErrorData: dco_decode_descriptor_key_error, ), - constMeta: kCrateApiTypesBdkTransactionIsExplicitlyRbfConstMeta, - argValues: [that], + constMeta: kCrateApiKeyFfiDescriptorSecretKeyDeriveConstMeta, + argValues: [opaque, path], apiImpl: this, )); } - TaskConstMeta get kCrateApiTypesBdkTransactionIsExplicitlyRbfConstMeta => + TaskConstMeta get kCrateApiKeyFfiDescriptorSecretKeyDeriveConstMeta => const TaskConstMeta( - debugName: "bdk_transaction_is_explicitly_rbf", - argNames: ["that"], + debugName: "ffi_descriptor_secret_key_derive", + argNames: ["opaque", "path"], ); @override - Future crateApiTypesBdkTransactionIsLockTimeEnabled( - {required BdkTransaction that}) { + Future crateApiKeyFfiDescriptorSecretKeyExtend( + {required FfiDescriptorSecretKey opaque, + required FfiDerivationPath path}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_transaction(that); - return wire - .wire__crate__api__types__bdk_transaction_is_lock_time_enabled( - port_, arg0); + var arg0 = cst_encode_box_autoadd_ffi_descriptor_secret_key(opaque); + var arg1 = cst_encode_box_autoadd_ffi_derivation_path(path); + return wire.wire__crate__api__key__ffi_descriptor_secret_key_extend( + port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_ffi_descriptor_secret_key, + decodeErrorData: dco_decode_descriptor_key_error, ), - constMeta: kCrateApiTypesBdkTransactionIsLockTimeEnabledConstMeta, - argValues: [that], + constMeta: kCrateApiKeyFfiDescriptorSecretKeyExtendConstMeta, + argValues: [opaque, path], apiImpl: this, )); } - TaskConstMeta get kCrateApiTypesBdkTransactionIsLockTimeEnabledConstMeta => + TaskConstMeta get kCrateApiKeyFfiDescriptorSecretKeyExtendConstMeta => const TaskConstMeta( - debugName: "bdk_transaction_is_lock_time_enabled", - argNames: ["that"], + debugName: "ffi_descriptor_secret_key_extend", + argNames: ["opaque", "path"], ); @override - Future crateApiTypesBdkTransactionLockTime( - {required BdkTransaction that}) { + Future crateApiKeyFfiDescriptorSecretKeyFromString( + {required String secretKey}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_transaction(that); - return wire.wire__crate__api__types__bdk_transaction_lock_time( - port_, arg0); + var arg0 = cst_encode_String(secretKey); + return wire + .wire__crate__api__key__ffi_descriptor_secret_key_from_string( + port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_lock_time, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_ffi_descriptor_secret_key, + decodeErrorData: dco_decode_descriptor_key_error, ), - constMeta: kCrateApiTypesBdkTransactionLockTimeConstMeta, - argValues: [that], + constMeta: kCrateApiKeyFfiDescriptorSecretKeyFromStringConstMeta, + argValues: [secretKey], apiImpl: this, )); } - TaskConstMeta get kCrateApiTypesBdkTransactionLockTimeConstMeta => + TaskConstMeta get kCrateApiKeyFfiDescriptorSecretKeyFromStringConstMeta => const TaskConstMeta( - debugName: "bdk_transaction_lock_time", - argNames: ["that"], + debugName: "ffi_descriptor_secret_key_from_string", + argNames: ["secretKey"], ); @override - Future crateApiTypesBdkTransactionNew( - {required int version, - required LockTime lockTime, - required List input, - required List output}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_i_32(version); - var arg1 = cst_encode_box_autoadd_lock_time(lockTime); - var arg2 = cst_encode_list_tx_in(input); - var arg3 = cst_encode_list_tx_out(output); - return wire.wire__crate__api__types__bdk_transaction_new( - port_, arg0, arg1, arg2, arg3); + Uint8List crateApiKeyFfiDescriptorSecretKeySecretBytes( + {required FfiDescriptorSecretKey that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_ffi_descriptor_secret_key(that); + return wire + .wire__crate__api__key__ffi_descriptor_secret_key_secret_bytes( + arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_transaction, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_list_prim_u_8_strict, + decodeErrorData: dco_decode_descriptor_key_error, ), - constMeta: kCrateApiTypesBdkTransactionNewConstMeta, - argValues: [version, lockTime, input, output], + constMeta: kCrateApiKeyFfiDescriptorSecretKeySecretBytesConstMeta, + argValues: [that], apiImpl: this, )); } - TaskConstMeta get kCrateApiTypesBdkTransactionNewConstMeta => + TaskConstMeta get kCrateApiKeyFfiDescriptorSecretKeySecretBytesConstMeta => const TaskConstMeta( - debugName: "bdk_transaction_new", - argNames: ["version", "lockTime", "input", "output"], + debugName: "ffi_descriptor_secret_key_secret_bytes", + argNames: ["that"], ); @override - Future> crateApiTypesBdkTransactionOutput( - {required BdkTransaction that}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_transaction(that); - return wire.wire__crate__api__types__bdk_transaction_output( - port_, arg0); + String crateApiKeyFfiMnemonicAsString({required FfiMnemonic that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_ffi_mnemonic(that); + return wire.wire__crate__api__key__ffi_mnemonic_as_string(arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_list_tx_out, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_String, + decodeErrorData: null, ), - constMeta: kCrateApiTypesBdkTransactionOutputConstMeta, + constMeta: kCrateApiKeyFfiMnemonicAsStringConstMeta, argValues: [that], apiImpl: this, )); } - TaskConstMeta get kCrateApiTypesBdkTransactionOutputConstMeta => + TaskConstMeta get kCrateApiKeyFfiMnemonicAsStringConstMeta => const TaskConstMeta( - debugName: "bdk_transaction_output", + debugName: "ffi_mnemonic_as_string", argNames: ["that"], ); @override - Future crateApiTypesBdkTransactionSerialize( - {required BdkTransaction that}) { + Future crateApiKeyFfiMnemonicFromEntropy( + {required List entropy}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_transaction(that); - return wire.wire__crate__api__types__bdk_transaction_serialize( + var arg0 = cst_encode_list_prim_u_8_loose(entropy); + return wire.wire__crate__api__key__ffi_mnemonic_from_entropy( port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_list_prim_u_8_strict, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_ffi_mnemonic, + decodeErrorData: dco_decode_bip_39_error, ), - constMeta: kCrateApiTypesBdkTransactionSerializeConstMeta, - argValues: [that], + constMeta: kCrateApiKeyFfiMnemonicFromEntropyConstMeta, + argValues: [entropy], apiImpl: this, )); } - TaskConstMeta get kCrateApiTypesBdkTransactionSerializeConstMeta => + TaskConstMeta get kCrateApiKeyFfiMnemonicFromEntropyConstMeta => const TaskConstMeta( - debugName: "bdk_transaction_serialize", - argNames: ["that"], + debugName: "ffi_mnemonic_from_entropy", + argNames: ["entropy"], ); @override - Future crateApiTypesBdkTransactionSize( - {required BdkTransaction that}) { + Future crateApiKeyFfiMnemonicFromString( + {required String mnemonic}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_transaction(that); - return wire.wire__crate__api__types__bdk_transaction_size(port_, arg0); + var arg0 = cst_encode_String(mnemonic); + return wire.wire__crate__api__key__ffi_mnemonic_from_string( + port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_u_64, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_ffi_mnemonic, + decodeErrorData: dco_decode_bip_39_error, ), - constMeta: kCrateApiTypesBdkTransactionSizeConstMeta, - argValues: [that], + constMeta: kCrateApiKeyFfiMnemonicFromStringConstMeta, + argValues: [mnemonic], apiImpl: this, )); } - TaskConstMeta get kCrateApiTypesBdkTransactionSizeConstMeta => + TaskConstMeta get kCrateApiKeyFfiMnemonicFromStringConstMeta => const TaskConstMeta( - debugName: "bdk_transaction_size", - argNames: ["that"], + debugName: "ffi_mnemonic_from_string", + argNames: ["mnemonic"], ); @override - Future crateApiTypesBdkTransactionTxid( - {required BdkTransaction that}) { + Future crateApiKeyFfiMnemonicNew( + {required WordCount wordCount}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_transaction(that); - return wire.wire__crate__api__types__bdk_transaction_txid(port_, arg0); + var arg0 = cst_encode_word_count(wordCount); + return wire.wire__crate__api__key__ffi_mnemonic_new(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_String, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_ffi_mnemonic, + decodeErrorData: dco_decode_bip_39_error, ), - constMeta: kCrateApiTypesBdkTransactionTxidConstMeta, - argValues: [that], + constMeta: kCrateApiKeyFfiMnemonicNewConstMeta, + argValues: [wordCount], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiKeyFfiMnemonicNewConstMeta => const TaskConstMeta( + debugName: "ffi_mnemonic_new", + argNames: ["wordCount"], + ); + + @override + Future crateApiStoreFfiConnectionNew({required String path}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(path); + return wire.wire__crate__api__store__ffi_connection_new(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_ffi_connection, + decodeErrorData: dco_decode_sqlite_error, + ), + constMeta: kCrateApiStoreFfiConnectionNewConstMeta, + argValues: [path], apiImpl: this, )); } - TaskConstMeta get kCrateApiTypesBdkTransactionTxidConstMeta => + TaskConstMeta get kCrateApiStoreFfiConnectionNewConstMeta => const TaskConstMeta( - debugName: "bdk_transaction_txid", - argNames: ["that"], + debugName: "ffi_connection_new", + argNames: ["path"], ); @override - Future crateApiTypesBdkTransactionVersion( - {required BdkTransaction that}) { + Future crateApiStoreFfiConnectionNewInMemory() { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_transaction(that); - return wire.wire__crate__api__types__bdk_transaction_version( - port_, arg0); + return wire + .wire__crate__api__store__ffi_connection_new_in_memory(port_); }, codec: DcoCodec( - decodeSuccessData: dco_decode_i_32, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_ffi_connection, + decodeErrorData: dco_decode_sqlite_error, ), - constMeta: kCrateApiTypesBdkTransactionVersionConstMeta, - argValues: [that], + constMeta: kCrateApiStoreFfiConnectionNewInMemoryConstMeta, + argValues: [], apiImpl: this, )); } - TaskConstMeta get kCrateApiTypesBdkTransactionVersionConstMeta => + TaskConstMeta get kCrateApiStoreFfiConnectionNewInMemoryConstMeta => const TaskConstMeta( - debugName: "bdk_transaction_version", - argNames: ["that"], + debugName: "ffi_connection_new_in_memory", + argNames: [], ); @override - Future crateApiTypesBdkTransactionVsize( - {required BdkTransaction that}) { + Future crateApiTxBuilderFinishBumpFeeTxBuilder( + {required String txid, + required FeeRate feeRate, + required FfiWallet wallet, + required bool enableRbf, + int? nSequence}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_transaction(that); - return wire.wire__crate__api__types__bdk_transaction_vsize(port_, arg0); + var arg0 = cst_encode_String(txid); + var arg1 = cst_encode_box_autoadd_fee_rate(feeRate); + var arg2 = cst_encode_box_autoadd_ffi_wallet(wallet); + var arg3 = cst_encode_bool(enableRbf); + var arg4 = cst_encode_opt_box_autoadd_u_32(nSequence); + return wire.wire__crate__api__tx_builder__finish_bump_fee_tx_builder( + port_, arg0, arg1, arg2, arg3, arg4); }, codec: DcoCodec( - decodeSuccessData: dco_decode_u_64, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_ffi_psbt, + decodeErrorData: dco_decode_create_tx_error, ), - constMeta: kCrateApiTypesBdkTransactionVsizeConstMeta, - argValues: [that], + constMeta: kCrateApiTxBuilderFinishBumpFeeTxBuilderConstMeta, + argValues: [txid, feeRate, wallet, enableRbf, nSequence], apiImpl: this, )); } - TaskConstMeta get kCrateApiTypesBdkTransactionVsizeConstMeta => + TaskConstMeta get kCrateApiTxBuilderFinishBumpFeeTxBuilderConstMeta => const TaskConstMeta( - debugName: "bdk_transaction_vsize", - argNames: ["that"], + debugName: "finish_bump_fee_tx_builder", + argNames: ["txid", "feeRate", "wallet", "enableRbf", "nSequence"], ); @override - Future crateApiTypesBdkTransactionWeight( - {required BdkTransaction that}) { + Future crateApiTxBuilderTxBuilderFinish( + {required FfiWallet wallet, + required List<(FfiScriptBuf, BigInt)> recipients, + required List utxos, + required List unSpendable, + required ChangeSpendPolicy changePolicy, + required bool manuallySelectedOnly, + FeeRate? feeRate, + BigInt? feeAbsolute, + required bool drainWallet, + (Map, KeychainKind)? policyPath, + FfiScriptBuf? drainTo, + RbfValue? rbf, + required List data}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_transaction(that); - return wire.wire__crate__api__types__bdk_transaction_weight( - port_, arg0); + var arg0 = cst_encode_box_autoadd_ffi_wallet(wallet); + var arg1 = cst_encode_list_record_ffi_script_buf_u_64(recipients); + var arg2 = cst_encode_list_out_point(utxos); + var arg3 = cst_encode_list_out_point(unSpendable); + var arg4 = cst_encode_change_spend_policy(changePolicy); + var arg5 = cst_encode_bool(manuallySelectedOnly); + var arg6 = cst_encode_opt_box_autoadd_fee_rate(feeRate); + var arg7 = cst_encode_opt_box_autoadd_u_64(feeAbsolute); + var arg8 = cst_encode_bool(drainWallet); + var arg9 = + cst_encode_opt_box_autoadd_record_map_string_list_prim_usize_strict_keychain_kind( + policyPath); + var arg10 = cst_encode_opt_box_autoadd_ffi_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__crate__api__tx_builder__tx_builder_finish( + port_, + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + arg6, + arg7, + arg8, + arg9, + arg10, + arg11, + arg12); }, codec: DcoCodec( - decodeSuccessData: dco_decode_u_64, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_ffi_psbt, + decodeErrorData: dco_decode_create_tx_error, + ), + constMeta: kCrateApiTxBuilderTxBuilderFinishConstMeta, + argValues: [ + wallet, + recipients, + utxos, + unSpendable, + changePolicy, + manuallySelectedOnly, + feeRate, + feeAbsolute, + drainWallet, + policyPath, + drainTo, + rbf, + data + ], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiTxBuilderTxBuilderFinishConstMeta => + const TaskConstMeta( + debugName: "tx_builder_finish", + argNames: [ + "wallet", + "recipients", + "utxos", + "unSpendable", + "changePolicy", + "manuallySelectedOnly", + "feeRate", + "feeAbsolute", + "drainWallet", + "policyPath", + "drainTo", + "rbf", + "data" + ], + ); + + @override + Future crateApiTypesChangeSpendPolicyDefault() { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + return wire.wire__crate__api__types__change_spend_policy_default(port_); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_change_spend_policy, + decodeErrorData: null, + ), + constMeta: kCrateApiTypesChangeSpendPolicyDefaultConstMeta, + argValues: [], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiTypesChangeSpendPolicyDefaultConstMeta => + const TaskConstMeta( + debugName: "change_spend_policy_default", + argNames: [], + ); + + @override + Future crateApiTypesFfiFullScanRequestBuilderBuild( + {required FfiFullScanRequestBuilder that}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ffi_full_scan_request_builder(that); + return wire + .wire__crate__api__types__ffi_full_scan_request_builder_build( + port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_ffi_full_scan_request, + decodeErrorData: dco_decode_request_builder_error, ), - constMeta: kCrateApiTypesBdkTransactionWeightConstMeta, + constMeta: kCrateApiTypesFfiFullScanRequestBuilderBuildConstMeta, argValues: [that], apiImpl: this, )); } - TaskConstMeta get kCrateApiTypesBdkTransactionWeightConstMeta => + TaskConstMeta get kCrateApiTypesFfiFullScanRequestBuilderBuildConstMeta => const TaskConstMeta( - debugName: "bdk_transaction_weight", + debugName: "ffi_full_scan_request_builder_build", argNames: ["that"], ); @override - (BdkAddress, int) crateApiWalletBdkWalletGetAddress( - {required BdkWallet ptr, required AddressIndex addressIndex}) { + Future + crateApiTypesFfiFullScanRequestBuilderInspectSpksForAllKeychains( + {required FfiFullScanRequestBuilder that, + required FutureOr Function(KeychainKind, int, FfiScriptBuf) + inspector}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ffi_full_scan_request_builder(that); + var arg1 = + cst_encode_DartFn_Inputs_keychain_kind_u_32_ffi_script_buf_Output_unit_AnyhowException( + inspector); + return wire + .wire__crate__api__types__ffi_full_scan_request_builder_inspect_spks_for_all_keychains( + port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_ffi_full_scan_request_builder, + decodeErrorData: dco_decode_request_builder_error, + ), + constMeta: + kCrateApiTypesFfiFullScanRequestBuilderInspectSpksForAllKeychainsConstMeta, + argValues: [that, inspector], + apiImpl: this, + )); + } + + TaskConstMeta + get kCrateApiTypesFfiFullScanRequestBuilderInspectSpksForAllKeychainsConstMeta => + const TaskConstMeta( + debugName: + "ffi_full_scan_request_builder_inspect_spks_for_all_keychains", + argNames: ["that", "inspector"], + ); + + @override + String crateApiTypesFfiPolicyId({required FfiPolicy that}) { return handler.executeSync(SyncTask( callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_wallet(ptr); - var arg1 = cst_encode_box_autoadd_address_index(addressIndex); - return wire.wire__crate__api__wallet__bdk_wallet_get_address( - arg0, arg1); + var arg0 = cst_encode_box_autoadd_ffi_policy(that); + return wire.wire__crate__api__types__ffi_policy_id(arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_record_bdk_address_u_32, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_String, + decodeErrorData: null, ), - constMeta: kCrateApiWalletBdkWalletGetAddressConstMeta, - argValues: [ptr, addressIndex], + constMeta: kCrateApiTypesFfiPolicyIdConstMeta, + argValues: [that], apiImpl: this, )); } - TaskConstMeta get kCrateApiWalletBdkWalletGetAddressConstMeta => - const TaskConstMeta( - debugName: "bdk_wallet_get_address", - argNames: ["ptr", "addressIndex"], + TaskConstMeta get kCrateApiTypesFfiPolicyIdConstMeta => const TaskConstMeta( + debugName: "ffi_policy_id", + argNames: ["that"], ); @override - Balance crateApiWalletBdkWalletGetBalance({required BdkWallet that}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_wallet(that); - return wire.wire__crate__api__wallet__bdk_wallet_get_balance(arg0); + Future crateApiTypesFfiSyncRequestBuilderBuild( + {required FfiSyncRequestBuilder that}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ffi_sync_request_builder(that); + return wire.wire__crate__api__types__ffi_sync_request_builder_build( + port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_balance, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_ffi_sync_request, + decodeErrorData: dco_decode_request_builder_error, ), - constMeta: kCrateApiWalletBdkWalletGetBalanceConstMeta, + constMeta: kCrateApiTypesFfiSyncRequestBuilderBuildConstMeta, argValues: [that], apiImpl: this, )); } - TaskConstMeta get kCrateApiWalletBdkWalletGetBalanceConstMeta => + TaskConstMeta get kCrateApiTypesFfiSyncRequestBuilderBuildConstMeta => const TaskConstMeta( - debugName: "bdk_wallet_get_balance", + debugName: "ffi_sync_request_builder_build", argNames: ["that"], ); @override - BdkDescriptor crateApiWalletBdkWalletGetDescriptorForKeychain( - {required BdkWallet ptr, required KeychainKind keychain}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_wallet(ptr); - var arg1 = cst_encode_keychain_kind(keychain); + Future crateApiTypesFfiSyncRequestBuilderInspectSpks( + {required FfiSyncRequestBuilder that, + required FutureOr Function(FfiScriptBuf, SyncProgress) inspector}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ffi_sync_request_builder(that); + var arg1 = + cst_encode_DartFn_Inputs_ffi_script_buf_sync_progress_Output_unit_AnyhowException( + inspector); return wire - .wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychain( - arg0, arg1); + .wire__crate__api__types__ffi_sync_request_builder_inspect_spks( + port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_descriptor, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_ffi_sync_request_builder, + decodeErrorData: dco_decode_request_builder_error, ), - constMeta: kCrateApiWalletBdkWalletGetDescriptorForKeychainConstMeta, - argValues: [ptr, keychain], + constMeta: kCrateApiTypesFfiSyncRequestBuilderInspectSpksConstMeta, + argValues: [that, inspector], apiImpl: this, )); } - TaskConstMeta get kCrateApiWalletBdkWalletGetDescriptorForKeychainConstMeta => + TaskConstMeta get kCrateApiTypesFfiSyncRequestBuilderInspectSpksConstMeta => const TaskConstMeta( - debugName: "bdk_wallet_get_descriptor_for_keychain", - argNames: ["ptr", "keychain"], + debugName: "ffi_sync_request_builder_inspect_spks", + argNames: ["that", "inspector"], ); @override - (BdkAddress, int) crateApiWalletBdkWalletGetInternalAddress( - {required BdkWallet ptr, required AddressIndex addressIndex}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_wallet(ptr); - var arg1 = cst_encode_box_autoadd_address_index(addressIndex); - return wire.wire__crate__api__wallet__bdk_wallet_get_internal_address( - arg0, arg1); + Future crateApiTypesNetworkDefault() { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + return wire.wire__crate__api__types__network_default(port_); }, codec: DcoCodec( - decodeSuccessData: dco_decode_record_bdk_address_u_32, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_network, + decodeErrorData: null, ), - constMeta: kCrateApiWalletBdkWalletGetInternalAddressConstMeta, - argValues: [ptr, addressIndex], + constMeta: kCrateApiTypesNetworkDefaultConstMeta, + argValues: [], apiImpl: this, )); } - TaskConstMeta get kCrateApiWalletBdkWalletGetInternalAddressConstMeta => + TaskConstMeta get kCrateApiTypesNetworkDefaultConstMeta => const TaskConstMeta( - debugName: "bdk_wallet_get_internal_address", - argNames: ["ptr", "addressIndex"], + debugName: "network_default", + argNames: [], ); @override - Future crateApiWalletBdkWalletGetPsbtInput( - {required BdkWallet that, - required LocalUtxo utxo, - required bool onlyWitnessUtxo, - PsbtSigHashType? sighashType}) { + Future crateApiTypesSignOptionsDefault() { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_wallet(that); - var arg1 = cst_encode_box_autoadd_local_utxo(utxo); - var arg2 = cst_encode_bool(onlyWitnessUtxo); - var arg3 = cst_encode_opt_box_autoadd_psbt_sig_hash_type(sighashType); - return wire.wire__crate__api__wallet__bdk_wallet_get_psbt_input( - port_, arg0, arg1, arg2, arg3); + return wire.wire__crate__api__types__sign_options_default(port_); }, codec: DcoCodec( - decodeSuccessData: dco_decode_input, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_sign_options, + decodeErrorData: null, ), - constMeta: kCrateApiWalletBdkWalletGetPsbtInputConstMeta, - argValues: [that, utxo, onlyWitnessUtxo, sighashType], + constMeta: kCrateApiTypesSignOptionsDefaultConstMeta, + argValues: [], apiImpl: this, )); } - TaskConstMeta get kCrateApiWalletBdkWalletGetPsbtInputConstMeta => + TaskConstMeta get kCrateApiTypesSignOptionsDefaultConstMeta => const TaskConstMeta( - debugName: "bdk_wallet_get_psbt_input", - argNames: ["that", "utxo", "onlyWitnessUtxo", "sighashType"], + debugName: "sign_options_default", + argNames: [], ); @override - bool crateApiWalletBdkWalletIsMine( - {required BdkWallet that, required BdkScriptBuf script}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_wallet(that); - var arg1 = cst_encode_box_autoadd_bdk_script_buf(script); - return wire.wire__crate__api__wallet__bdk_wallet_is_mine(arg0, arg1); + Future crateApiWalletFfiWalletApplyUpdate( + {required FfiWallet that, required FfiUpdate update}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ffi_wallet(that); + var arg1 = cst_encode_box_autoadd_ffi_update(update); + return wire.wire__crate__api__wallet__ffi_wallet_apply_update( + port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_unit, + decodeErrorData: dco_decode_cannot_connect_error, ), - constMeta: kCrateApiWalletBdkWalletIsMineConstMeta, - argValues: [that, script], + constMeta: kCrateApiWalletFfiWalletApplyUpdateConstMeta, + argValues: [that, update], apiImpl: this, )); } - TaskConstMeta get kCrateApiWalletBdkWalletIsMineConstMeta => + TaskConstMeta get kCrateApiWalletFfiWalletApplyUpdateConstMeta => const TaskConstMeta( - debugName: "bdk_wallet_is_mine", - argNames: ["that", "script"], + debugName: "ffi_wallet_apply_update", + argNames: ["that", "update"], ); @override - List crateApiWalletBdkWalletListTransactions( - {required BdkWallet that, required bool includeRaw}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_wallet(that); - var arg1 = cst_encode_bool(includeRaw); - return wire.wire__crate__api__wallet__bdk_wallet_list_transactions( - arg0, arg1); + Future crateApiWalletFfiWalletCalculateFee( + {required FfiWallet opaque, required FfiTransaction tx}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ffi_wallet(opaque); + var arg1 = cst_encode_box_autoadd_ffi_transaction(tx); + return wire.wire__crate__api__wallet__ffi_wallet_calculate_fee( + port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_list_transaction_details, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_u_64, + decodeErrorData: dco_decode_calculate_fee_error, ), - constMeta: kCrateApiWalletBdkWalletListTransactionsConstMeta, - argValues: [that, includeRaw], + constMeta: kCrateApiWalletFfiWalletCalculateFeeConstMeta, + argValues: [opaque, tx], apiImpl: this, )); } - TaskConstMeta get kCrateApiWalletBdkWalletListTransactionsConstMeta => + TaskConstMeta get kCrateApiWalletFfiWalletCalculateFeeConstMeta => const TaskConstMeta( - debugName: "bdk_wallet_list_transactions", - argNames: ["that", "includeRaw"], + debugName: "ffi_wallet_calculate_fee", + argNames: ["opaque", "tx"], ); @override - List crateApiWalletBdkWalletListUnspent( - {required BdkWallet that}) { - return handler.executeSync(SyncTask( - callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_wallet(that); - return wire.wire__crate__api__wallet__bdk_wallet_list_unspent(arg0); + Future crateApiWalletFfiWalletCalculateFeeRate( + {required FfiWallet opaque, required FfiTransaction tx}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ffi_wallet(opaque); + var arg1 = cst_encode_box_autoadd_ffi_transaction(tx); + return wire.wire__crate__api__wallet__ffi_wallet_calculate_fee_rate( + port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_list_local_utxo, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_fee_rate, + decodeErrorData: dco_decode_calculate_fee_error, ), - constMeta: kCrateApiWalletBdkWalletListUnspentConstMeta, - argValues: [that], + constMeta: kCrateApiWalletFfiWalletCalculateFeeRateConstMeta, + argValues: [opaque, tx], apiImpl: this, )); } - TaskConstMeta get kCrateApiWalletBdkWalletListUnspentConstMeta => + TaskConstMeta get kCrateApiWalletFfiWalletCalculateFeeRateConstMeta => const TaskConstMeta( - debugName: "bdk_wallet_list_unspent", - argNames: ["that"], + debugName: "ffi_wallet_calculate_fee_rate", + argNames: ["opaque", "tx"], ); @override - Network crateApiWalletBdkWalletNetwork({required BdkWallet that}) { + Balance crateApiWalletFfiWalletGetBalance({required FfiWallet that}) { return handler.executeSync(SyncTask( callFfi: () { - var arg0 = cst_encode_box_autoadd_bdk_wallet(that); - return wire.wire__crate__api__wallet__bdk_wallet_network(arg0); + var arg0 = cst_encode_box_autoadd_ffi_wallet(that); + return wire.wire__crate__api__wallet__ffi_wallet_get_balance(arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_network, + decodeSuccessData: dco_decode_balance, decodeErrorData: null, ), - constMeta: kCrateApiWalletBdkWalletNetworkConstMeta, + constMeta: kCrateApiWalletFfiWalletGetBalanceConstMeta, argValues: [that], apiImpl: this, )); } - TaskConstMeta get kCrateApiWalletBdkWalletNetworkConstMeta => + TaskConstMeta get kCrateApiWalletFfiWalletGetBalanceConstMeta => const TaskConstMeta( - debugName: "bdk_wallet_network", + debugName: "ffi_wallet_get_balance", argNames: ["that"], ); @override - Future crateApiWalletBdkWalletNew( - {required BdkDescriptor descriptor, - BdkDescriptor? changeDescriptor, - required Network network, - required DatabaseConfig databaseConfig}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_descriptor(descriptor); - var arg1 = cst_encode_opt_box_autoadd_bdk_descriptor(changeDescriptor); - var arg2 = cst_encode_network(network); - var arg3 = cst_encode_box_autoadd_database_config(databaseConfig); - return wire.wire__crate__api__wallet__bdk_wallet_new( - port_, arg0, arg1, arg2, arg3); + FfiCanonicalTx? crateApiWalletFfiWalletGetTx( + {required FfiWallet that, required String txid}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_ffi_wallet(that); + var arg1 = cst_encode_String(txid); + return wire.wire__crate__api__wallet__ffi_wallet_get_tx(arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bdk_wallet, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_opt_box_autoadd_ffi_canonical_tx, + decodeErrorData: dco_decode_txid_parse_error, ), - constMeta: kCrateApiWalletBdkWalletNewConstMeta, - argValues: [descriptor, changeDescriptor, network, databaseConfig], + constMeta: kCrateApiWalletFfiWalletGetTxConstMeta, + argValues: [that, txid], apiImpl: this, )); } - TaskConstMeta get kCrateApiWalletBdkWalletNewConstMeta => const TaskConstMeta( - debugName: "bdk_wallet_new", - argNames: [ - "descriptor", - "changeDescriptor", - "network", - "databaseConfig" - ], + TaskConstMeta get kCrateApiWalletFfiWalletGetTxConstMeta => + const TaskConstMeta( + debugName: "ffi_wallet_get_tx", + argNames: ["that", "txid"], ); @override - Future crateApiWalletBdkWalletSign( - {required BdkWallet ptr, - required BdkPsbt psbt, - SignOptions? signOptions}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_wallet(ptr); - var arg1 = cst_encode_box_autoadd_bdk_psbt(psbt); - var arg2 = cst_encode_opt_box_autoadd_sign_options(signOptions); - return wire.wire__crate__api__wallet__bdk_wallet_sign( - port_, arg0, arg1, arg2); + bool crateApiWalletFfiWalletIsMine( + {required FfiWallet that, required FfiScriptBuf script}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_ffi_wallet(that); + var arg1 = cst_encode_box_autoadd_ffi_script_buf(script); + return wire.wire__crate__api__wallet__ffi_wallet_is_mine(arg0, arg1); }, codec: DcoCodec( decodeSuccessData: dco_decode_bool, - decodeErrorData: dco_decode_bdk_error, + decodeErrorData: null, ), - constMeta: kCrateApiWalletBdkWalletSignConstMeta, - argValues: [ptr, psbt, signOptions], + constMeta: kCrateApiWalletFfiWalletIsMineConstMeta, + argValues: [that, script], apiImpl: this, )); } - TaskConstMeta get kCrateApiWalletBdkWalletSignConstMeta => + TaskConstMeta get kCrateApiWalletFfiWalletIsMineConstMeta => const TaskConstMeta( - debugName: "bdk_wallet_sign", - argNames: ["ptr", "psbt", "signOptions"], + debugName: "ffi_wallet_is_mine", + argNames: ["that", "script"], ); @override - Future crateApiWalletBdkWalletSync( - {required BdkWallet ptr, required BdkBlockchain blockchain}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_bdk_wallet(ptr); - var arg1 = cst_encode_box_autoadd_bdk_blockchain(blockchain); - return wire.wire__crate__api__wallet__bdk_wallet_sync( - port_, arg0, arg1); + List crateApiWalletFfiWalletListOutput( + {required FfiWallet that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_ffi_wallet(that); + return wire.wire__crate__api__wallet__ffi_wallet_list_output(arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_unit, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_list_local_output, + decodeErrorData: null, ), - constMeta: kCrateApiWalletBdkWalletSyncConstMeta, - argValues: [ptr, blockchain], + constMeta: kCrateApiWalletFfiWalletListOutputConstMeta, + argValues: [that], apiImpl: this, )); } - TaskConstMeta get kCrateApiWalletBdkWalletSyncConstMeta => + TaskConstMeta get kCrateApiWalletFfiWalletListOutputConstMeta => const TaskConstMeta( - debugName: "bdk_wallet_sync", - argNames: ["ptr", "blockchain"], + debugName: "ffi_wallet_list_output", + argNames: ["that"], ); @override - Future<(BdkPsbt, TransactionDetails)> crateApiWalletFinishBumpFeeTxBuilder( - {required String txid, - required double feeRate, - BdkAddress? allowShrinking, - required BdkWallet wallet, - required bool enableRbf, - int? nSequence}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(txid); - var arg1 = cst_encode_f_32(feeRate); - var arg2 = cst_encode_opt_box_autoadd_bdk_address(allowShrinking); - var arg3 = cst_encode_box_autoadd_bdk_wallet(wallet); - var arg4 = cst_encode_bool(enableRbf); - var arg5 = cst_encode_opt_box_autoadd_u_32(nSequence); - return wire.wire__crate__api__wallet__finish_bump_fee_tx_builder( - port_, arg0, arg1, arg2, arg3, arg4, arg5); + List crateApiWalletFfiWalletListUnspent( + {required FfiWallet that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_ffi_wallet(that); + return wire.wire__crate__api__wallet__ffi_wallet_list_unspent(arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_record_bdk_psbt_transaction_details, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_list_local_output, + decodeErrorData: null, ), - constMeta: kCrateApiWalletFinishBumpFeeTxBuilderConstMeta, - argValues: [txid, feeRate, allowShrinking, wallet, enableRbf, nSequence], + constMeta: kCrateApiWalletFfiWalletListUnspentConstMeta, + argValues: [that], apiImpl: this, )); } - TaskConstMeta get kCrateApiWalletFinishBumpFeeTxBuilderConstMeta => + TaskConstMeta get kCrateApiWalletFfiWalletListUnspentConstMeta => const TaskConstMeta( - debugName: "finish_bump_fee_tx_builder", - argNames: [ - "txid", - "feeRate", - "allowShrinking", - "wallet", - "enableRbf", - "nSequence" - ], + debugName: "ffi_wallet_list_unspent", + argNames: ["that"], ); @override - Future<(BdkPsbt, TransactionDetails)> crateApiWalletTxBuilderFinish( - {required BdkWallet wallet, - required List recipients, - required List utxos, - (OutPoint, Input, BigInt)? foreignUtxo, - required List unSpendable, - required ChangeSpendPolicy changePolicy, - required bool manuallySelectedOnly, - double? feeRate, - BigInt? feeAbsolute, - required bool drainWallet, - BdkScriptBuf? drainTo, - RbfValue? rbf, - required List data}) { + Future crateApiWalletFfiWalletLoad( + {required FfiDescriptor descriptor, + required FfiDescriptor changeDescriptor, + required FfiConnection connection}) { 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__crate__api__wallet__tx_builder_finish( - port_, - arg0, - arg1, - arg2, - arg3, - arg4, - arg5, - arg6, - arg7, - arg8, - arg9, - arg10, - arg11, - arg12); + var arg0 = cst_encode_box_autoadd_ffi_descriptor(descriptor); + var arg1 = cst_encode_box_autoadd_ffi_descriptor(changeDescriptor); + var arg2 = cst_encode_box_autoadd_ffi_connection(connection); + return wire.wire__crate__api__wallet__ffi_wallet_load( + port_, arg0, arg1, arg2); }, codec: DcoCodec( - decodeSuccessData: dco_decode_record_bdk_psbt_transaction_details, - decodeErrorData: dco_decode_bdk_error, + decodeSuccessData: dco_decode_ffi_wallet, + decodeErrorData: dco_decode_load_with_persist_error, ), - constMeta: kCrateApiWalletTxBuilderFinishConstMeta, - argValues: [ - wallet, - recipients, - utxos, - foreignUtxo, - unSpendable, - changePolicy, - manuallySelectedOnly, - feeRate, - feeAbsolute, - drainWallet, - drainTo, - rbf, - data - ], + constMeta: kCrateApiWalletFfiWalletLoadConstMeta, + argValues: [descriptor, changeDescriptor, connection], apiImpl: this, )); } - TaskConstMeta get kCrateApiWalletTxBuilderFinishConstMeta => + TaskConstMeta get kCrateApiWalletFfiWalletLoadConstMeta => const TaskConstMeta( - debugName: "tx_builder_finish", - argNames: [ - "wallet", - "recipients", - "utxos", - "foreignUtxo", - "unSpendable", - "changePolicy", - "manuallySelectedOnly", - "feeRate", - "feeAbsolute", - "drainWallet", - "drainTo", - "rbf", - "data" - ], + debugName: "ffi_wallet_load", + argNames: ["descriptor", "changeDescriptor", "connection"], + ); + + @override + Network crateApiWalletFfiWalletNetwork({required FfiWallet that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_ffi_wallet(that); + return wire.wire__crate__api__wallet__ffi_wallet_network(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_network, + decodeErrorData: null, + ), + constMeta: kCrateApiWalletFfiWalletNetworkConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiWalletFfiWalletNetworkConstMeta => + const TaskConstMeta( + debugName: "ffi_wallet_network", + argNames: ["that"], ); + @override + Future crateApiWalletFfiWalletNew( + {required FfiDescriptor descriptor, + required FfiDescriptor changeDescriptor, + required Network network, + required FfiConnection connection}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ffi_descriptor(descriptor); + var arg1 = cst_encode_box_autoadd_ffi_descriptor(changeDescriptor); + var arg2 = cst_encode_network(network); + var arg3 = cst_encode_box_autoadd_ffi_connection(connection); + return wire.wire__crate__api__wallet__ffi_wallet_new( + port_, arg0, arg1, arg2, arg3); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_ffi_wallet, + decodeErrorData: dco_decode_create_with_persist_error, + ), + constMeta: kCrateApiWalletFfiWalletNewConstMeta, + argValues: [descriptor, changeDescriptor, network, connection], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiWalletFfiWalletNewConstMeta => const TaskConstMeta( + debugName: "ffi_wallet_new", + argNames: ["descriptor", "changeDescriptor", "network", "connection"], + ); + + @override + Future crateApiWalletFfiWalletPersist( + {required FfiWallet opaque, required FfiConnection connection}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ffi_wallet(opaque); + var arg1 = cst_encode_box_autoadd_ffi_connection(connection); + return wire.wire__crate__api__wallet__ffi_wallet_persist( + port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bool, + decodeErrorData: dco_decode_sqlite_error, + ), + constMeta: kCrateApiWalletFfiWalletPersistConstMeta, + argValues: [opaque, connection], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiWalletFfiWalletPersistConstMeta => + const TaskConstMeta( + debugName: "ffi_wallet_persist", + argNames: ["opaque", "connection"], + ); + + @override + FfiPolicy? crateApiWalletFfiWalletPolicies( + {required FfiWallet opaque, required KeychainKind keychainKind}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_ffi_wallet(opaque); + var arg1 = cst_encode_keychain_kind(keychainKind); + return wire.wire__crate__api__wallet__ffi_wallet_policies(arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_opt_box_autoadd_ffi_policy, + decodeErrorData: dco_decode_descriptor_error, + ), + constMeta: kCrateApiWalletFfiWalletPoliciesConstMeta, + argValues: [opaque, keychainKind], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiWalletFfiWalletPoliciesConstMeta => + const TaskConstMeta( + debugName: "ffi_wallet_policies", + argNames: ["opaque", "keychainKind"], + ); + + @override + AddressInfo crateApiWalletFfiWalletRevealNextAddress( + {required FfiWallet opaque, required KeychainKind keychainKind}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_ffi_wallet(opaque); + var arg1 = cst_encode_keychain_kind(keychainKind); + return wire.wire__crate__api__wallet__ffi_wallet_reveal_next_address( + arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_address_info, + decodeErrorData: null, + ), + constMeta: kCrateApiWalletFfiWalletRevealNextAddressConstMeta, + argValues: [opaque, keychainKind], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiWalletFfiWalletRevealNextAddressConstMeta => + const TaskConstMeta( + debugName: "ffi_wallet_reveal_next_address", + argNames: ["opaque", "keychainKind"], + ); + + @override + Future crateApiWalletFfiWalletSign( + {required FfiWallet opaque, + required FfiPsbt psbt, + required SignOptions signOptions}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ffi_wallet(opaque); + var arg1 = cst_encode_box_autoadd_ffi_psbt(psbt); + var arg2 = cst_encode_box_autoadd_sign_options(signOptions); + return wire.wire__crate__api__wallet__ffi_wallet_sign( + port_, arg0, arg1, arg2); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bool, + decodeErrorData: dco_decode_signer_error, + ), + constMeta: kCrateApiWalletFfiWalletSignConstMeta, + argValues: [opaque, psbt, signOptions], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiWalletFfiWalletSignConstMeta => + const TaskConstMeta( + debugName: "ffi_wallet_sign", + argNames: ["opaque", "psbt", "signOptions"], + ); + + @override + Future crateApiWalletFfiWalletStartFullScan( + {required FfiWallet that}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ffi_wallet(that); + return wire.wire__crate__api__wallet__ffi_wallet_start_full_scan( + port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_ffi_full_scan_request_builder, + decodeErrorData: null, + ), + constMeta: kCrateApiWalletFfiWalletStartFullScanConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiWalletFfiWalletStartFullScanConstMeta => + const TaskConstMeta( + debugName: "ffi_wallet_start_full_scan", + argNames: ["that"], + ); + + @override + Future + crateApiWalletFfiWalletStartSyncWithRevealedSpks( + {required FfiWallet that}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ffi_wallet(that); + return wire + .wire__crate__api__wallet__ffi_wallet_start_sync_with_revealed_spks( + port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_ffi_sync_request_builder, + decodeErrorData: null, + ), + constMeta: kCrateApiWalletFfiWalletStartSyncWithRevealedSpksConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta + get kCrateApiWalletFfiWalletStartSyncWithRevealedSpksConstMeta => + const TaskConstMeta( + debugName: "ffi_wallet_start_sync_with_revealed_spks", + argNames: ["that"], + ); + + @override + List crateApiWalletFfiWalletTransactions( + {required FfiWallet that}) { + return handler.executeSync(SyncTask( + callFfi: () { + var arg0 = cst_encode_box_autoadd_ffi_wallet(that); + return wire.wire__crate__api__wallet__ffi_wallet_transactions(arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_ffi_canonical_tx, + decodeErrorData: null, + ), + constMeta: kCrateApiWalletFfiWalletTransactionsConstMeta, + argValues: [that], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateApiWalletFfiWalletTransactionsConstMeta => + const TaskConstMeta( + debugName: "ffi_wallet_transactions", + argNames: ["that"], + ); + + Future Function(int, dynamic, dynamic) + encode_DartFn_Inputs_ffi_script_buf_sync_progress_Output_unit_AnyhowException( + FutureOr Function(FfiScriptBuf, SyncProgress) raw) { + return (callId, rawArg0, rawArg1) async { + final arg0 = dco_decode_ffi_script_buf(rawArg0); + final arg1 = dco_decode_sync_progress(rawArg1); + + Box? rawOutput; + Box? rawError; + try { + rawOutput = Box(await raw(arg0, arg1)); + } catch (e, s) { + rawError = Box(AnyhowException("$e\n\n$s")); + } + + final serializer = SseSerializer(generalizedFrbRustBinding); + assert((rawOutput != null) ^ (rawError != null)); + if (rawOutput != null) { + serializer.buffer.putUint8(0); + sse_encode_unit(rawOutput.value, serializer); + } else { + serializer.buffer.putUint8(1); + sse_encode_AnyhowException(rawError!.value, serializer); + } + final output = serializer.intoRaw(); + + generalizedFrbRustBinding.dartFnDeliverOutput( + callId: callId, + ptr: output.ptr, + rustVecLen: output.rustVecLen, + dataLen: output.dataLen); + }; + } + + Future Function(int, dynamic, dynamic, dynamic) + encode_DartFn_Inputs_keychain_kind_u_32_ffi_script_buf_Output_unit_AnyhowException( + FutureOr Function(KeychainKind, int, FfiScriptBuf) raw) { + return (callId, rawArg0, rawArg1, rawArg2) async { + final arg0 = dco_decode_keychain_kind(rawArg0); + final arg1 = dco_decode_u_32(rawArg1); + final arg2 = dco_decode_ffi_script_buf(rawArg2); + + Box? rawOutput; + Box? rawError; + try { + rawOutput = Box(await raw(arg0, arg1, arg2)); + } catch (e, s) { + rawError = Box(AnyhowException("$e\n\n$s")); + } + + final serializer = SseSerializer(generalizedFrbRustBinding); + assert((rawOutput != null) ^ (rawError != null)); + if (rawOutput != null) { + serializer.buffer.putUint8(0); + sse_encode_unit(rawOutput.value, serializer); + } else { + serializer.buffer.putUint8(1); + sse_encode_AnyhowException(rawError!.value, serializer); + } + final output = serializer.intoRaw(); + + generalizedFrbRustBinding.dartFnDeliverOutput( + callId: callId, + ptr: output.ptr, + rustVecLen: output.rustVecLen, + dataLen: output.dataLen); + }; + } + RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_Address => - wire.rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddress; + get rust_arc_increment_strong_count_Address => wire + .rust_arc_increment_strong_count_RustOpaque_bdk_corebitcoinAddress; RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_Address => - wire.rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress; + get rust_arc_decrement_strong_count_Address => wire + .rust_arc_decrement_strong_count_RustOpaque_bdk_corebitcoinAddress; RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_DerivationPath => wire - .rust_arc_increment_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath; + get rust_arc_increment_strong_count_Transaction => wire + .rust_arc_increment_strong_count_RustOpaque_bdk_corebitcoinTransaction; RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_DerivationPath => wire - .rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath; + get rust_arc_decrement_strong_count_Transaction => wire + .rust_arc_decrement_strong_count_RustOpaque_bdk_corebitcoinTransaction; RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_AnyBlockchain => wire - .rust_arc_increment_strong_count_RustOpaque_bdkblockchainAnyBlockchain; + get rust_arc_increment_strong_count_BdkElectrumClientClient => wire + .rust_arc_increment_strong_count_RustOpaque_bdk_electrumBdkElectrumClientbdk_electrumelectrum_clientClient; RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_AnyBlockchain => wire - .rust_arc_decrement_strong_count_RustOpaque_bdkblockchainAnyBlockchain; + get rust_arc_decrement_strong_count_BdkElectrumClientClient => wire + .rust_arc_decrement_strong_count_RustOpaque_bdk_electrumBdkElectrumClientbdk_electrumelectrum_clientClient; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_BlockingClient => wire + .rust_arc_increment_strong_count_RustOpaque_bdk_esploraesplora_clientBlockingClient; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_BlockingClient => wire + .rust_arc_decrement_strong_count_RustOpaque_bdk_esploraesplora_clientBlockingClient; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_Update => + wire.rust_arc_increment_strong_count_RustOpaque_bdk_walletUpdate; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_Update => + wire.rust_arc_decrement_strong_count_RustOpaque_bdk_walletUpdate; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_DerivationPath => wire + .rust_arc_increment_strong_count_RustOpaque_bdk_walletbitcoinbip32DerivationPath; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_DerivationPath => wire + .rust_arc_decrement_strong_count_RustOpaque_bdk_walletbitcoinbip32DerivationPath; RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_ExtendedDescriptor => wire - .rust_arc_increment_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor; + .rust_arc_increment_strong_count_RustOpaque_bdk_walletdescriptorExtendedDescriptor; RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_ExtendedDescriptor => wire - .rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor; + .rust_arc_decrement_strong_count_RustOpaque_bdk_walletdescriptorExtendedDescriptor; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_Policy => wire + .rust_arc_increment_strong_count_RustOpaque_bdk_walletdescriptorPolicy; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_Policy => wire + .rust_arc_decrement_strong_count_RustOpaque_bdk_walletdescriptorPolicy; RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_DescriptorPublicKey => wire - .rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorPublicKey; + .rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysDescriptorPublicKey; RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_DescriptorPublicKey => wire - .rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorPublicKey; + .rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysDescriptorPublicKey; RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_DescriptorSecretKey => wire - .rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorSecretKey; + .rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysDescriptorSecretKey; RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_DescriptorSecretKey => wire - .rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorSecretKey; + .rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysDescriptorSecretKey; RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_KeyMap => - wire.rust_arc_increment_strong_count_RustOpaque_bdkkeysKeyMap; + wire.rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysKeyMap; RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_KeyMap => - wire.rust_arc_decrement_strong_count_RustOpaque_bdkkeysKeyMap; + wire.rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysKeyMap; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_Mnemonic => wire + .rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysbip39Mnemonic; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_Mnemonic => wire + .rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysbip39Mnemonic; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_MutexOptionFullScanRequestBuilderKeychainKind => + wire.rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestBuilderbdk_walletKeychainKind; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_MutexOptionFullScanRequestBuilderKeychainKind => + wire.rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestBuilderbdk_walletKeychainKind; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_MutexOptionFullScanRequestKeychainKind => + wire.rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestbdk_walletKeychainKind; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_MutexOptionFullScanRequestKeychainKind => + wire.rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestbdk_walletKeychainKind; RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_Mnemonic => - wire.rust_arc_increment_strong_count_RustOpaque_bdkkeysbip39Mnemonic; + get rust_arc_increment_strong_count_MutexOptionSyncRequestBuilderKeychainKindU32 => + wire.rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestBuilderbdk_walletKeychainKindu32; RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_Mnemonic => - wire.rust_arc_decrement_strong_count_RustOpaque_bdkkeysbip39Mnemonic; + get rust_arc_decrement_strong_count_MutexOptionSyncRequestBuilderKeychainKindU32 => + wire.rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestBuilderbdk_walletKeychainKindu32; RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_MutexWalletAnyDatabase => wire - .rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase; + get rust_arc_increment_strong_count_MutexOptionSyncRequestKeychainKindU32 => + wire.rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestbdk_walletKeychainKindu32; RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_MutexWalletAnyDatabase => wire - .rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase; + get rust_arc_decrement_strong_count_MutexOptionSyncRequestKeychainKindU32 => + wire.rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestbdk_walletKeychainKindu32; RustArcIncrementStrongCountFnType - get rust_arc_increment_strong_count_MutexPartiallySignedTransaction => wire - .rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction; + get rust_arc_increment_strong_count_MutexPsbt => wire + .rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdk_corebitcoinpsbtPsbt; RustArcDecrementStrongCountFnType - get rust_arc_decrement_strong_count_MutexPartiallySignedTransaction => wire - .rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction; + get rust_arc_decrement_strong_count_MutexPsbt => wire + .rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_corebitcoinpsbtPsbt; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_MutexPersistedWalletConnection => wire + .rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdk_walletPersistedWalletbdk_walletrusqliteConnection; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_MutexPersistedWalletConnection => wire + .rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_walletPersistedWalletbdk_walletrusqliteConnection; + + RustArcIncrementStrongCountFnType + get rust_arc_increment_strong_count_MutexConnection => wire + .rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdk_walletrusqliteConnection; + + RustArcDecrementStrongCountFnType + get rust_arc_decrement_strong_count_MutexConnection => wire + .rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_walletrusqliteConnection; + + @protected + AnyhowException dco_decode_AnyhowException(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return AnyhowException(raw as String); + } + + @protected + FutureOr Function(FfiScriptBuf, SyncProgress) + dco_decode_DartFn_Inputs_ffi_script_buf_sync_progress_Output_unit_AnyhowException( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + throw UnimplementedError(''); + } + + @protected + FutureOr Function(KeychainKind, int, FfiScriptBuf) + dco_decode_DartFn_Inputs_keychain_kind_u_32_ffi_script_buf_Output_unit_AnyhowException( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + throw UnimplementedError(''); + } + + @protected + Object dco_decode_DartOpaque(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return decodeDartOpaque(raw, generalizedFrbRustBinding); + } + + @protected + Map dco_decode_Map_String_list_prim_usize_strict( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return Map.fromEntries( + dco_decode_list_record_string_list_prim_usize_strict(raw) + .map((e) => MapEntry(e.$1, e.$2))); + } @protected - Address dco_decode_RustOpaque_bdkbitcoinAddress(dynamic raw) { + Address dco_decode_RustOpaque_bdk_corebitcoinAddress(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs return AddressImpl.frbInternalDcoDecode(raw as List); } @protected - DerivationPath dco_decode_RustOpaque_bdkbitcoinbip32DerivationPath( + Transaction dco_decode_RustOpaque_bdk_corebitcoinTransaction(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return TransactionImpl.frbInternalDcoDecode(raw as List); + } + + @protected + BdkElectrumClientClient + dco_decode_RustOpaque_bdk_electrumBdkElectrumClientbdk_electrumelectrum_clientClient( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return BdkElectrumClientClientImpl.frbInternalDcoDecode( + raw as List); + } + + @protected + BlockingClient dco_decode_RustOpaque_bdk_esploraesplora_clientBlockingClient( dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return DerivationPathImpl.frbInternalDcoDecode(raw as List); + return BlockingClientImpl.frbInternalDcoDecode(raw as List); } @protected - AnyBlockchain dco_decode_RustOpaque_bdkblockchainAnyBlockchain(dynamic raw) { + Update dco_decode_RustOpaque_bdk_walletUpdate(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return AnyBlockchainImpl.frbInternalDcoDecode(raw as List); + return UpdateImpl.frbInternalDcoDecode(raw as List); } @protected - ExtendedDescriptor dco_decode_RustOpaque_bdkdescriptorExtendedDescriptor( + DerivationPath dco_decode_RustOpaque_bdk_walletbitcoinbip32DerivationPath( dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs + return DerivationPathImpl.frbInternalDcoDecode(raw as List); + } + + @protected + ExtendedDescriptor + dco_decode_RustOpaque_bdk_walletdescriptorExtendedDescriptor( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs return ExtendedDescriptorImpl.frbInternalDcoDecode(raw as List); } @protected - DescriptorPublicKey dco_decode_RustOpaque_bdkkeysDescriptorPublicKey( + Policy dco_decode_RustOpaque_bdk_walletdescriptorPolicy(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return PolicyImpl.frbInternalDcoDecode(raw as List); + } + + @protected + DescriptorPublicKey dco_decode_RustOpaque_bdk_walletkeysDescriptorPublicKey( dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs return DescriptorPublicKeyImpl.frbInternalDcoDecode(raw as List); } @protected - DescriptorSecretKey dco_decode_RustOpaque_bdkkeysDescriptorSecretKey( + DescriptorSecretKey dco_decode_RustOpaque_bdk_walletkeysDescriptorSecretKey( dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs return DescriptorSecretKeyImpl.frbInternalDcoDecode(raw as List); } @protected - KeyMap dco_decode_RustOpaque_bdkkeysKeyMap(dynamic raw) { + KeyMap dco_decode_RustOpaque_bdk_walletkeysKeyMap(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs return KeyMapImpl.frbInternalDcoDecode(raw as List); } @protected - Mnemonic dco_decode_RustOpaque_bdkkeysbip39Mnemonic(dynamic raw) { + Mnemonic dco_decode_RustOpaque_bdk_walletkeysbip39Mnemonic(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs return MnemonicImpl.frbInternalDcoDecode(raw as List); } @protected - MutexWalletAnyDatabase - dco_decode_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( + MutexOptionFullScanRequestBuilderKeychainKind + dco_decode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestBuilderbdk_walletKeychainKind( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return MutexOptionFullScanRequestBuilderKeychainKindImpl + .frbInternalDcoDecode(raw as List); + } + + @protected + MutexOptionFullScanRequestKeychainKind + dco_decode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestbdk_walletKeychainKind( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return MutexOptionFullScanRequestKeychainKindImpl.frbInternalDcoDecode( + raw as List); + } + + @protected + MutexOptionSyncRequestBuilderKeychainKindU32 + dco_decode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestBuilderbdk_walletKeychainKindu32( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return MutexOptionSyncRequestBuilderKeychainKindU32Impl + .frbInternalDcoDecode(raw as List); + } + + @protected + MutexOptionSyncRequestKeychainKindU32 + dco_decode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestbdk_walletKeychainKindu32( dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return MutexWalletAnyDatabaseImpl.frbInternalDcoDecode( + return MutexOptionSyncRequestKeychainKindU32Impl.frbInternalDcoDecode( raw as List); } @protected - MutexPartiallySignedTransaction - dco_decode_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( + MutexPsbt dco_decode_RustOpaque_stdsyncMutexbdk_corebitcoinpsbtPsbt( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return MutexPsbtImpl.frbInternalDcoDecode(raw as List); + } + + @protected + MutexPersistedWalletConnection + dco_decode_RustOpaque_stdsyncMutexbdk_walletPersistedWalletbdk_walletrusqliteConnection( dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return MutexPartiallySignedTransactionImpl.frbInternalDcoDecode( + return MutexPersistedWalletConnectionImpl.frbInternalDcoDecode( raw as List); } + @protected + MutexConnection + dco_decode_RustOpaque_stdsyncMutexbdk_walletrusqliteConnection( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return MutexConnectionImpl.frbInternalDcoDecode(raw as List); + } + @protected String dco_decode_String(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -2805,78 +3548,108 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @protected - AddressError dco_decode_address_error(dynamic raw) { + 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 != 3) + throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); + return AddressInfo( + index: dco_decode_u_32(arr[0]), + address: dco_decode_ffi_address(arr[1]), + keychain: dco_decode_keychain_kind(arr[2]), + ); + } + + @protected + AddressParseError dco_decode_address_parse_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]), - ); + return AddressParseError_Base58(); case 1: - return AddressError_Bech32( - dco_decode_String(raw[1]), - ); + return AddressParseError_Bech32(); case 2: - return AddressError_EmptyBech32Payload(); + return AddressParseError_WitnessVersion( + errorMessage: dco_decode_String(raw[1]), + ); case 3: - return AddressError_InvalidBech32Variant( - expected: dco_decode_variant(raw[1]), - found: dco_decode_variant(raw[2]), + return AddressParseError_WitnessProgram( + errorMessage: dco_decode_String(raw[1]), ); case 4: - return AddressError_InvalidWitnessVersion( - dco_decode_u_8(raw[1]), - ); + return AddressParseError_UnknownHrp(); case 5: - return AddressError_UnparsableWitnessVersion( - dco_decode_String(raw[1]), - ); + return AddressParseError_LegacyAddressTooLong(); case 6: - return AddressError_MalformedWitnessVersion(); + return AddressParseError_InvalidBase58PayloadLength(); case 7: - return AddressError_InvalidWitnessProgramLength( - dco_decode_usize(raw[1]), - ); + return AddressParseError_InvalidLegacyPrefix(); case 8: - return AddressError_InvalidSegwitV0ProgramLength( - dco_decode_usize(raw[1]), - ); + return AddressParseError_NetworkValidation(); 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]), - ); + return AddressParseError_OtherAddressParseErr(); default: throw Exception("unreachable"); } } @protected - AddressIndex dco_decode_address_index(dynamic raw) { + 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 + Bip32Error dco_decode_bip_32_error(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs switch (raw[0]) { case 0: - return AddressIndex_Increase(); + return Bip32Error_CannotDeriveFromHardenedKey(); case 1: - return AddressIndex_LastUnused(); + return Bip32Error_Secp256k1( + errorMessage: dco_decode_String(raw[1]), + ); case 2: - return AddressIndex_Peek( - index: dco_decode_u_32(raw[1]), + return Bip32Error_InvalidChildNumber( + childNumber: dco_decode_u_32(raw[1]), ); case 3: - return AddressIndex_Reset( - index: dco_decode_u_32(raw[1]), + return Bip32Error_InvalidChildNumberFormat(); + case 4: + return Bip32Error_InvalidDerivationPathFormat(); + case 5: + return Bip32Error_UnknownVersion( + version: dco_decode_String(raw[1]), + ); + case 6: + return Bip32Error_WrongExtendedKeyLength( + length: dco_decode_u_32(raw[1]), + ); + case 7: + return Bip32Error_Base58( + errorMessage: dco_decode_String(raw[1]), + ); + case 8: + return Bip32Error_Hex( + errorMessage: dco_decode_String(raw[1]), + ); + case 9: + return Bip32Error_InvalidPublicKeyHexLength( + length: dco_decode_u_32(raw[1]), + ); + case 10: + return Bip32Error_UnknownError( + errorMessage: dco_decode_String(raw[1]), ); default: throw Exception("unreachable"); @@ -2884,19 +3657,30 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @protected - Auth dco_decode_auth(dynamic raw) { + Bip39Error dco_decode_bip_39_error(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs switch (raw[0]) { case 0: - return Auth_None(); + return Bip39Error_BadWordCount( + wordCount: dco_decode_u_64(raw[1]), + ); case 1: - return Auth_UserPass( - username: dco_decode_String(raw[1]), - password: dco_decode_String(raw[2]), + return Bip39Error_UnknownWord( + index: dco_decode_u_64(raw[1]), ); case 2: - return Auth_Cookie( - file: dco_decode_String(raw[1]), + return Bip39Error_BadEntropyBitCount( + bitCount: dco_decode_u_64(raw[1]), + ); + case 3: + return Bip39Error_InvalidChecksum(); + case 4: + return Bip39Error_AmbiguousLanguages( + languages: dco_decode_String(raw[1]), + ); + case 5: + return Bip39Error_Generic( + errorMessage: dco_decode_String(raw[1]), ); default: throw Exception("unreachable"); @@ -2904,763 +3688,871 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @protected - Balance dco_decode_balance(dynamic raw) { + BlockId dco_decode_block_id(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]), + if (arr.length != 2) + throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + return BlockId( + height: dco_decode_u_32(arr[0]), + hash: dco_decode_String(arr[1]), ); } @protected - BdkAddress dco_decode_bdk_address(dynamic raw) { + bool dco_decode_bool(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]), - ); + return raw as bool; } @protected - BdkBlockchain dco_decode_bdk_blockchain(dynamic raw) { + ConfirmationBlockTime dco_decode_box_autoadd_confirmation_block_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 BdkBlockchain( - ptr: dco_decode_RustOpaque_bdkblockchainAnyBlockchain(arr[0]), - ); + return dco_decode_confirmation_block_time(raw); } @protected - BdkDerivationPath dco_decode_bdk_derivation_path(dynamic raw) { + FeeRate dco_decode_box_autoadd_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 BdkDerivationPath( - ptr: dco_decode_RustOpaque_bdkbitcoinbip32DerivationPath(arr[0]), - ); + return dco_decode_fee_rate(raw); } @protected - BdkDescriptor dco_decode_bdk_descriptor(dynamic raw) { + FfiAddress dco_decode_box_autoadd_ffi_address(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 2) - throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return BdkDescriptor( - extendedDescriptor: - dco_decode_RustOpaque_bdkdescriptorExtendedDescriptor(arr[0]), - keyMap: dco_decode_RustOpaque_bdkkeysKeyMap(arr[1]), - ); + return dco_decode_ffi_address(raw); } @protected - BdkDescriptorPublicKey dco_decode_bdk_descriptor_public_key(dynamic raw) { + FfiCanonicalTx dco_decode_box_autoadd_ffi_canonical_tx(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return BdkDescriptorPublicKey( - ptr: dco_decode_RustOpaque_bdkkeysDescriptorPublicKey(arr[0]), - ); + return dco_decode_ffi_canonical_tx(raw); } @protected - BdkDescriptorSecretKey dco_decode_bdk_descriptor_secret_key(dynamic raw) { + FfiConnection dco_decode_box_autoadd_ffi_connection(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return BdkDescriptorSecretKey( - ptr: dco_decode_RustOpaque_bdkkeysDescriptorSecretKey(arr[0]), - ); + return dco_decode_ffi_connection(raw); } @protected - BdkError dco_decode_bdk_error(dynamic raw) { + FfiDerivationPath dco_decode_box_autoadd_ffi_derivation_path(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - switch (raw[0]) { - case 0: - return BdkError_Hex( - dco_decode_box_autoadd_hex_error(raw[1]), - ); - case 1: - return BdkError_Consensus( - dco_decode_box_autoadd_consensus_error(raw[1]), - ); - case 2: - return BdkError_VerifyTransaction( - dco_decode_String(raw[1]), - ); - case 3: - return BdkError_Address( - dco_decode_box_autoadd_address_error(raw[1]), - ); - case 4: - return BdkError_Descriptor( - dco_decode_box_autoadd_descriptor_error(raw[1]), - ); - case 5: - return BdkError_InvalidU32Bytes( - dco_decode_list_prim_u_8_strict(raw[1]), - ); - case 6: - return BdkError_Generic( - dco_decode_String(raw[1]), - ); - case 7: - return BdkError_ScriptDoesntHaveAddressForm(); - case 8: - return BdkError_NoRecipients(); - case 9: - return BdkError_NoUtxosSelected(); - case 10: - return BdkError_OutputBelowDustLimit( - dco_decode_usize(raw[1]), - ); - case 11: - return BdkError_InsufficientFunds( - needed: dco_decode_u_64(raw[1]), - available: dco_decode_u_64(raw[2]), - ); - case 12: - return BdkError_BnBTotalTriesExceeded(); - case 13: - return BdkError_BnBNoExactMatch(); - case 14: - return BdkError_UnknownUtxo(); - case 15: - return BdkError_TransactionNotFound(); - case 16: - return BdkError_TransactionConfirmed(); - case 17: - return BdkError_IrreplaceableTransaction(); - case 18: - return BdkError_FeeRateTooLow( - needed: dco_decode_f_32(raw[1]), - ); - case 19: - return BdkError_FeeTooLow( - needed: dco_decode_u_64(raw[1]), - ); - case 20: - return BdkError_FeeRateUnavailable(); - case 21: - return BdkError_MissingKeyOrigin( - dco_decode_String(raw[1]), - ); - case 22: - return BdkError_Key( - dco_decode_String(raw[1]), - ); - case 23: - return BdkError_ChecksumMismatch(); - case 24: - return BdkError_SpendingPolicyRequired( - dco_decode_keychain_kind(raw[1]), - ); - case 25: - return BdkError_InvalidPolicyPathError( - dco_decode_String(raw[1]), - ); - case 26: - return BdkError_Signer( - dco_decode_String(raw[1]), - ); - case 27: - return BdkError_InvalidNetwork( - requested: dco_decode_network(raw[1]), - found: dco_decode_network(raw[2]), - ); - case 28: - return BdkError_InvalidOutpoint( - dco_decode_box_autoadd_out_point(raw[1]), - ); - case 29: - return BdkError_Encode( - dco_decode_String(raw[1]), - ); - case 30: - return BdkError_Miniscript( - dco_decode_String(raw[1]), - ); - case 31: - return BdkError_MiniscriptPsbt( - dco_decode_String(raw[1]), - ); - case 32: - return BdkError_Bip32( - dco_decode_String(raw[1]), - ); - case 33: - return BdkError_Bip39( - dco_decode_String(raw[1]), - ); - case 34: - return BdkError_Secp256k1( - dco_decode_String(raw[1]), - ); - case 35: - return BdkError_Json( - dco_decode_String(raw[1]), - ); - case 36: - return BdkError_Psbt( - dco_decode_String(raw[1]), - ); - case 37: - return BdkError_PsbtParse( - dco_decode_String(raw[1]), - ); - case 38: - return BdkError_MissingCachedScripts( - dco_decode_usize(raw[1]), - dco_decode_usize(raw[2]), - ); - case 39: - return BdkError_Electrum( - dco_decode_String(raw[1]), - ); - case 40: - return BdkError_Esplora( - dco_decode_String(raw[1]), - ); - case 41: - return BdkError_Sled( - dco_decode_String(raw[1]), - ); - case 42: - return BdkError_Rpc( - dco_decode_String(raw[1]), - ); - case 43: - return BdkError_Rusqlite( - dco_decode_String(raw[1]), - ); - case 44: - return BdkError_InvalidInput( - dco_decode_String(raw[1]), - ); - case 45: - return BdkError_InvalidLockTime( - dco_decode_String(raw[1]), - ); - case 46: - return BdkError_InvalidTransaction( - dco_decode_String(raw[1]), - ); - default: - throw Exception("unreachable"); - } + return dco_decode_ffi_derivation_path(raw); + } + + @protected + FfiDescriptor dco_decode_box_autoadd_ffi_descriptor(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_ffi_descriptor(raw); + } + + @protected + FfiDescriptorPublicKey dco_decode_box_autoadd_ffi_descriptor_public_key( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_ffi_descriptor_public_key(raw); } @protected - BdkMnemonic dco_decode_bdk_mnemonic(dynamic raw) { + FfiDescriptorSecretKey dco_decode_box_autoadd_ffi_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 BdkMnemonic( - ptr: dco_decode_RustOpaque_bdkkeysbip39Mnemonic(arr[0]), - ); + return dco_decode_ffi_descriptor_secret_key(raw); } @protected - BdkPsbt dco_decode_bdk_psbt(dynamic raw) { + FfiElectrumClient dco_decode_box_autoadd_ffi_electrum_client(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return BdkPsbt( - ptr: - dco_decode_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( - arr[0]), - ); + return dco_decode_ffi_electrum_client(raw); } @protected - BdkScriptBuf dco_decode_bdk_script_buf(dynamic raw) { + FfiEsploraClient dco_decode_box_autoadd_ffi_esplora_client(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]), - ); + return dco_decode_ffi_esplora_client(raw); } @protected - BdkTransaction dco_decode_bdk_transaction(dynamic raw) { + FfiFullScanRequest dco_decode_box_autoadd_ffi_full_scan_request(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return BdkTransaction( - s: dco_decode_String(arr[0]), - ); + return dco_decode_ffi_full_scan_request(raw); } @protected - BdkWallet dco_decode_bdk_wallet(dynamic raw) { + FfiFullScanRequestBuilder + dco_decode_box_autoadd_ffi_full_scan_request_builder(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - final arr = raw as List; - if (arr.length != 1) - throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return BdkWallet( - ptr: dco_decode_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( - arr[0]), - ); + return dco_decode_ffi_full_scan_request_builder(raw); } @protected - BlockTime dco_decode_block_time(dynamic raw) { + FfiMnemonic dco_decode_box_autoadd_ffi_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]), - ); + return dco_decode_ffi_mnemonic(raw); } @protected - BlockchainConfig dco_decode_blockchain_config(dynamic raw) { + FfiPolicy dco_decode_box_autoadd_ffi_policy(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"); - } + return dco_decode_ffi_policy(raw); } @protected - bool dco_decode_bool(dynamic raw) { + FfiPsbt dco_decode_box_autoadd_ffi_psbt(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as bool; + return dco_decode_ffi_psbt(raw); } @protected - AddressError dco_decode_box_autoadd_address_error(dynamic raw) { + FfiScriptBuf dco_decode_box_autoadd_ffi_script_buf(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_address_error(raw); + return dco_decode_ffi_script_buf(raw); } @protected - AddressIndex dco_decode_box_autoadd_address_index(dynamic raw) { + FfiSyncRequest dco_decode_box_autoadd_ffi_sync_request(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_address_index(raw); + return dco_decode_ffi_sync_request(raw); } @protected - BdkAddress dco_decode_box_autoadd_bdk_address(dynamic raw) { + FfiSyncRequestBuilder dco_decode_box_autoadd_ffi_sync_request_builder( + dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_bdk_address(raw); + return dco_decode_ffi_sync_request_builder(raw); } @protected - BdkBlockchain dco_decode_box_autoadd_bdk_blockchain(dynamic raw) { + FfiTransaction dco_decode_box_autoadd_ffi_transaction(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_bdk_blockchain(raw); + return dco_decode_ffi_transaction(raw); } @protected - BdkDerivationPath dco_decode_box_autoadd_bdk_derivation_path(dynamic raw) { + FfiUpdate dco_decode_box_autoadd_ffi_update(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_bdk_derivation_path(raw); + return dco_decode_ffi_update(raw); } @protected - BdkDescriptor dco_decode_box_autoadd_bdk_descriptor(dynamic raw) { + FfiWallet dco_decode_box_autoadd_ffi_wallet(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_bdk_descriptor(raw); + return dco_decode_ffi_wallet(raw); } @protected - BdkDescriptorPublicKey dco_decode_box_autoadd_bdk_descriptor_public_key( - dynamic raw) { + 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 + RbfValue dco_decode_box_autoadd_rbf_value(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_bdk_descriptor_public_key(raw); + return dco_decode_rbf_value(raw); } @protected - BdkDescriptorSecretKey dco_decode_box_autoadd_bdk_descriptor_secret_key( + ( + Map, + KeychainKind + ) dco_decode_box_autoadd_record_map_string_list_prim_usize_strict_keychain_kind( dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_bdk_descriptor_secret_key(raw); + return raw as (Map, KeychainKind); + } + + @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 - BdkMnemonic dco_decode_box_autoadd_bdk_mnemonic(dynamic raw) { + int dco_decode_box_autoadd_u_32(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_bdk_mnemonic(raw); + return raw as int; } @protected - BdkPsbt dco_decode_box_autoadd_bdk_psbt(dynamic raw) { + BigInt dco_decode_box_autoadd_u_64(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_bdk_psbt(raw); + return dco_decode_u_64(raw); } @protected - BdkScriptBuf dco_decode_box_autoadd_bdk_script_buf(dynamic raw) { + CalculateFeeError dco_decode_calculate_fee_error(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_bdk_script_buf(raw); + switch (raw[0]) { + case 0: + return CalculateFeeError_Generic( + errorMessage: dco_decode_String(raw[1]), + ); + case 1: + return CalculateFeeError_MissingTxOut( + outPoints: dco_decode_list_out_point(raw[1]), + ); + case 2: + return CalculateFeeError_NegativeFee( + amount: dco_decode_String(raw[1]), + ); + default: + throw Exception("unreachable"); + } } @protected - BdkTransaction dco_decode_box_autoadd_bdk_transaction(dynamic raw) { + CannotConnectError dco_decode_cannot_connect_error(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_bdk_transaction(raw); + switch (raw[0]) { + case 0: + return CannotConnectError_Include( + height: dco_decode_u_32(raw[1]), + ); + default: + throw Exception("unreachable"); + } } @protected - BdkWallet dco_decode_box_autoadd_bdk_wallet(dynamic raw) { + ChainPosition dco_decode_chain_position(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_bdk_wallet(raw); + switch (raw[0]) { + case 0: + return ChainPosition_Confirmed( + confirmationBlockTime: + dco_decode_box_autoadd_confirmation_block_time(raw[1]), + ); + case 1: + return ChainPosition_Unconfirmed( + timestamp: dco_decode_u_64(raw[1]), + ); + default: + throw Exception("unreachable"); + } } @protected - BlockTime dco_decode_box_autoadd_block_time(dynamic raw) { + ChangeSpendPolicy dco_decode_change_spend_policy(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_block_time(raw); + return ChangeSpendPolicy.values[raw as int]; } @protected - BlockchainConfig dco_decode_box_autoadd_blockchain_config(dynamic raw) { + ConfirmationBlockTime dco_decode_confirmation_block_time(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_blockchain_config(raw); + final arr = raw as List; + if (arr.length != 2) + throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + return ConfirmationBlockTime( + blockId: dco_decode_block_id(arr[0]), + confirmationTime: dco_decode_u_64(arr[1]), + ); } @protected - ConsensusError dco_decode_box_autoadd_consensus_error(dynamic raw) { + CreateTxError dco_decode_create_tx_error(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_consensus_error(raw); + switch (raw[0]) { + case 0: + return CreateTxError_TransactionNotFound( + txid: dco_decode_String(raw[1]), + ); + case 1: + return CreateTxError_TransactionConfirmed( + txid: dco_decode_String(raw[1]), + ); + case 2: + return CreateTxError_IrreplaceableTransaction( + txid: dco_decode_String(raw[1]), + ); + case 3: + return CreateTxError_FeeRateUnavailable(); + case 4: + return CreateTxError_Generic( + errorMessage: dco_decode_String(raw[1]), + ); + case 5: + return CreateTxError_Descriptor( + errorMessage: dco_decode_String(raw[1]), + ); + case 6: + return CreateTxError_Policy( + errorMessage: dco_decode_String(raw[1]), + ); + case 7: + return CreateTxError_SpendingPolicyRequired( + kind: dco_decode_String(raw[1]), + ); + case 8: + return CreateTxError_Version0(); + case 9: + return CreateTxError_Version1Csv(); + case 10: + return CreateTxError_LockTime( + requestedTime: dco_decode_String(raw[1]), + requiredTime: dco_decode_String(raw[2]), + ); + case 11: + return CreateTxError_RbfSequence(); + case 12: + return CreateTxError_RbfSequenceCsv( + rbf: dco_decode_String(raw[1]), + csv: dco_decode_String(raw[2]), + ); + case 13: + return CreateTxError_FeeTooLow( + feeRequired: dco_decode_String(raw[1]), + ); + case 14: + return CreateTxError_FeeRateTooLow( + feeRateRequired: dco_decode_String(raw[1]), + ); + case 15: + return CreateTxError_NoUtxosSelected(); + case 16: + return CreateTxError_OutputBelowDustLimit( + index: dco_decode_u_64(raw[1]), + ); + case 17: + return CreateTxError_ChangePolicyDescriptor(); + case 18: + return CreateTxError_CoinSelection( + errorMessage: dco_decode_String(raw[1]), + ); + case 19: + return CreateTxError_InsufficientFunds( + needed: dco_decode_u_64(raw[1]), + available: dco_decode_u_64(raw[2]), + ); + case 20: + return CreateTxError_NoRecipients(); + case 21: + return CreateTxError_Psbt( + errorMessage: dco_decode_String(raw[1]), + ); + case 22: + return CreateTxError_MissingKeyOrigin( + key: dco_decode_String(raw[1]), + ); + case 23: + return CreateTxError_UnknownUtxo( + outpoint: dco_decode_String(raw[1]), + ); + case 24: + return CreateTxError_MissingNonWitnessUtxo( + outpoint: dco_decode_String(raw[1]), + ); + case 25: + return CreateTxError_MiniscriptPsbt( + errorMessage: dco_decode_String(raw[1]), + ); + default: + throw Exception("unreachable"); + } } @protected - DatabaseConfig dco_decode_box_autoadd_database_config(dynamic raw) { + CreateWithPersistError dco_decode_create_with_persist_error(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_database_config(raw); + switch (raw[0]) { + case 0: + return CreateWithPersistError_Persist( + errorMessage: dco_decode_String(raw[1]), + ); + case 1: + return CreateWithPersistError_DataAlreadyExists(); + case 2: + return CreateWithPersistError_Descriptor( + errorMessage: dco_decode_String(raw[1]), + ); + default: + throw Exception("unreachable"); + } } @protected - DescriptorError dco_decode_box_autoadd_descriptor_error(dynamic raw) { + DescriptorError dco_decode_descriptor_error(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_descriptor_error(raw); + switch (raw[0]) { + case 0: + return DescriptorError_InvalidHdKeyPath(); + case 1: + return DescriptorError_MissingPrivateData(); + case 2: + return DescriptorError_InvalidDescriptorChecksum(); + case 3: + return DescriptorError_HardenedDerivationXpub(); + case 4: + return DescriptorError_MultiPath(); + case 5: + return DescriptorError_Key( + errorMessage: dco_decode_String(raw[1]), + ); + case 6: + return DescriptorError_Generic( + errorMessage: dco_decode_String(raw[1]), + ); + case 7: + return DescriptorError_Policy( + errorMessage: dco_decode_String(raw[1]), + ); + case 8: + return DescriptorError_InvalidDescriptorCharacter( + charector: dco_decode_String(raw[1]), + ); + case 9: + return DescriptorError_Bip32( + errorMessage: dco_decode_String(raw[1]), + ); + case 10: + return DescriptorError_Base58( + errorMessage: dco_decode_String(raw[1]), + ); + case 11: + return DescriptorError_Pk( + errorMessage: dco_decode_String(raw[1]), + ); + case 12: + return DescriptorError_Miniscript( + errorMessage: dco_decode_String(raw[1]), + ); + case 13: + return DescriptorError_Hex( + errorMessage: dco_decode_String(raw[1]), + ); + case 14: + return DescriptorError_ExternalAndInternalAreTheSame(); + default: + throw Exception("unreachable"); + } } @protected - ElectrumConfig dco_decode_box_autoadd_electrum_config(dynamic raw) { + DescriptorKeyError dco_decode_descriptor_key_error(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_electrum_config(raw); + switch (raw[0]) { + case 0: + return DescriptorKeyError_Parse( + errorMessage: dco_decode_String(raw[1]), + ); + case 1: + return DescriptorKeyError_InvalidKeyType(); + case 2: + return DescriptorKeyError_Bip32( + errorMessage: dco_decode_String(raw[1]), + ); + default: + throw Exception("unreachable"); + } } @protected - EsploraConfig dco_decode_box_autoadd_esplora_config(dynamic raw) { + ElectrumError dco_decode_electrum_error(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_esplora_config(raw); + switch (raw[0]) { + case 0: + return ElectrumError_IOError( + errorMessage: dco_decode_String(raw[1]), + ); + case 1: + return ElectrumError_Json( + errorMessage: dco_decode_String(raw[1]), + ); + case 2: + return ElectrumError_Hex( + errorMessage: dco_decode_String(raw[1]), + ); + case 3: + return ElectrumError_Protocol( + errorMessage: dco_decode_String(raw[1]), + ); + case 4: + return ElectrumError_Bitcoin( + errorMessage: dco_decode_String(raw[1]), + ); + case 5: + return ElectrumError_AlreadySubscribed(); + case 6: + return ElectrumError_NotSubscribed(); + case 7: + return ElectrumError_InvalidResponse( + errorMessage: dco_decode_String(raw[1]), + ); + case 8: + return ElectrumError_Message( + errorMessage: dco_decode_String(raw[1]), + ); + case 9: + return ElectrumError_InvalidDNSNameError( + domain: dco_decode_String(raw[1]), + ); + case 10: + return ElectrumError_MissingDomain(); + case 11: + return ElectrumError_AllAttemptsErrored(); + case 12: + return ElectrumError_SharedIOError( + errorMessage: dco_decode_String(raw[1]), + ); + case 13: + return ElectrumError_CouldntLockReader(); + case 14: + return ElectrumError_Mpsc(); + case 15: + return ElectrumError_CouldNotCreateConnection( + errorMessage: dco_decode_String(raw[1]), + ); + case 16: + return ElectrumError_RequestAlreadyConsumed(); + default: + throw Exception("unreachable"); + } } @protected - double dco_decode_box_autoadd_f_32(dynamic raw) { + EsploraError dco_decode_esplora_error(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as double; + switch (raw[0]) { + case 0: + return EsploraError_Minreq( + errorMessage: dco_decode_String(raw[1]), + ); + case 1: + return EsploraError_HttpResponse( + status: dco_decode_u_16(raw[1]), + errorMessage: dco_decode_String(raw[2]), + ); + case 2: + return EsploraError_Parsing( + errorMessage: dco_decode_String(raw[1]), + ); + case 3: + return EsploraError_StatusCode( + errorMessage: dco_decode_String(raw[1]), + ); + case 4: + return EsploraError_BitcoinEncoding( + errorMessage: dco_decode_String(raw[1]), + ); + case 5: + return EsploraError_HexToArray( + errorMessage: dco_decode_String(raw[1]), + ); + case 6: + return EsploraError_HexToBytes( + errorMessage: dco_decode_String(raw[1]), + ); + case 7: + return EsploraError_TransactionNotFound(); + case 8: + return EsploraError_HeaderHeightNotFound( + height: dco_decode_u_32(raw[1]), + ); + case 9: + return EsploraError_HeaderHashNotFound(); + case 10: + return EsploraError_InvalidHttpHeaderName( + name: dco_decode_String(raw[1]), + ); + case 11: + return EsploraError_InvalidHttpHeaderValue( + value: dco_decode_String(raw[1]), + ); + case 12: + return EsploraError_RequestAlreadyConsumed(); + default: + throw Exception("unreachable"); + } } @protected - FeeRate dco_decode_box_autoadd_fee_rate(dynamic raw) { + ExtractTxError dco_decode_extract_tx_error(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_fee_rate(raw); + switch (raw[0]) { + case 0: + return ExtractTxError_AbsurdFeeRate( + feeRate: dco_decode_u_64(raw[1]), + ); + case 1: + return ExtractTxError_MissingInputValue(); + case 2: + return ExtractTxError_SendingTooMuch(); + case 3: + return ExtractTxError_OtherExtractTxErr(); + default: + throw Exception("unreachable"); + } } @protected - HexError dco_decode_box_autoadd_hex_error(dynamic raw) { + FeeRate dco_decode_fee_rate(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_hex_error(raw); + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return FeeRate( + satKwu: dco_decode_u_64(arr[0]), + ); } @protected - LocalUtxo dco_decode_box_autoadd_local_utxo(dynamic raw) { + FfiAddress dco_decode_ffi_address(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_local_utxo(raw); + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return FfiAddress( + field0: dco_decode_RustOpaque_bdk_corebitcoinAddress(arr[0]), + ); } @protected - LockTime dco_decode_box_autoadd_lock_time(dynamic raw) { + FfiCanonicalTx dco_decode_ffi_canonical_tx(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_lock_time(raw); + final arr = raw as List; + if (arr.length != 2) + throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + return FfiCanonicalTx( + transaction: dco_decode_ffi_transaction(arr[0]), + chainPosition: dco_decode_chain_position(arr[1]), + ); } @protected - OutPoint dco_decode_box_autoadd_out_point(dynamic raw) { + FfiConnection dco_decode_ffi_connection(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_out_point(raw); + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return FfiConnection( + field0: dco_decode_RustOpaque_stdsyncMutexbdk_walletrusqliteConnection( + arr[0]), + ); } @protected - PsbtSigHashType dco_decode_box_autoadd_psbt_sig_hash_type(dynamic raw) { + FfiDerivationPath dco_decode_ffi_derivation_path(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_psbt_sig_hash_type(raw); + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return FfiDerivationPath( + opaque: + dco_decode_RustOpaque_bdk_walletbitcoinbip32DerivationPath(arr[0]), + ); } @protected - RbfValue dco_decode_box_autoadd_rbf_value(dynamic raw) { + FfiDescriptor dco_decode_ffi_descriptor(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_rbf_value(raw); + final arr = raw as List; + if (arr.length != 2) + throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + return FfiDescriptor( + extendedDescriptor: + dco_decode_RustOpaque_bdk_walletdescriptorExtendedDescriptor(arr[0]), + keyMap: dco_decode_RustOpaque_bdk_walletkeysKeyMap(arr[1]), + ); } @protected - (OutPoint, Input, BigInt) dco_decode_box_autoadd_record_out_point_input_usize( - dynamic raw) { + FfiDescriptorPublicKey dco_decode_ffi_descriptor_public_key(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as (OutPoint, Input, BigInt); + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return FfiDescriptorPublicKey( + opaque: dco_decode_RustOpaque_bdk_walletkeysDescriptorPublicKey(arr[0]), + ); } @protected - RpcConfig dco_decode_box_autoadd_rpc_config(dynamic raw) { + FfiDescriptorSecretKey dco_decode_ffi_descriptor_secret_key(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_rpc_config(raw); + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return FfiDescriptorSecretKey( + opaque: dco_decode_RustOpaque_bdk_walletkeysDescriptorSecretKey(arr[0]), + ); } @protected - RpcSyncParams dco_decode_box_autoadd_rpc_sync_params(dynamic raw) { + FfiElectrumClient dco_decode_ffi_electrum_client(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_rpc_sync_params(raw); + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return FfiElectrumClient( + opaque: + dco_decode_RustOpaque_bdk_electrumBdkElectrumClientbdk_electrumelectrum_clientClient( + arr[0]), + ); } @protected - SignOptions dco_decode_box_autoadd_sign_options(dynamic raw) { + FfiEsploraClient dco_decode_ffi_esplora_client(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_sign_options(raw); + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return FfiEsploraClient( + opaque: + dco_decode_RustOpaque_bdk_esploraesplora_clientBlockingClient(arr[0]), + ); } @protected - SledDbConfiguration dco_decode_box_autoadd_sled_db_configuration( - dynamic raw) { + FfiFullScanRequest dco_decode_ffi_full_scan_request(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_sled_db_configuration(raw); + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return FfiFullScanRequest( + field0: + dco_decode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestbdk_walletKeychainKind( + arr[0]), + ); } @protected - SqliteDbConfiguration dco_decode_box_autoadd_sqlite_db_configuration( + FfiFullScanRequestBuilder dco_decode_ffi_full_scan_request_builder( dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_sqlite_db_configuration(raw); - } - - @protected - int dco_decode_box_autoadd_u_32(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as int; - } - - @protected - BigInt dco_decode_box_autoadd_u_64(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_u_64(raw); + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return FfiFullScanRequestBuilder( + field0: + dco_decode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestBuilderbdk_walletKeychainKind( + arr[0]), + ); } @protected - int dco_decode_box_autoadd_u_8(dynamic raw) { + FfiMnemonic dco_decode_ffi_mnemonic(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as int; + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return FfiMnemonic( + opaque: dco_decode_RustOpaque_bdk_walletkeysbip39Mnemonic(arr[0]), + ); } @protected - ChangeSpendPolicy dco_decode_change_spend_policy(dynamic raw) { + FfiPolicy dco_decode_ffi_policy(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return ChangeSpendPolicy.values[raw as int]; + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return FfiPolicy( + opaque: dco_decode_RustOpaque_bdk_walletdescriptorPolicy(arr[0]), + ); } @protected - ConsensusError dco_decode_consensus_error(dynamic raw) { + FfiPsbt dco_decode_ffi_psbt(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"); - } + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return FfiPsbt( + opaque: dco_decode_RustOpaque_stdsyncMutexbdk_corebitcoinpsbtPsbt(arr[0]), + ); } @protected - DatabaseConfig dco_decode_database_config(dynamic raw) { + FfiScriptBuf dco_decode_ffi_script_buf(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"); - } + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return FfiScriptBuf( + bytes: dco_decode_list_prim_u_8_strict(arr[0]), + ); } @protected - DescriptorError dco_decode_descriptor_error(dynamic raw) { + FfiSyncRequest dco_decode_ffi_sync_request(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"); - } + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return FfiSyncRequest( + field0: + dco_decode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestbdk_walletKeychainKindu32( + arr[0]), + ); } @protected - ElectrumConfig dco_decode_electrum_config(dynamic raw) { + FfiSyncRequestBuilder dco_decode_ffi_sync_request_builder(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]), + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return FfiSyncRequestBuilder( + field0: + dco_decode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestBuilderbdk_walletKeychainKindu32( + arr[0]), ); } @protected - EsploraConfig dco_decode_esplora_config(dynamic raw) { + FfiTransaction dco_decode_ffi_transaction(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]), + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return FfiTransaction( + opaque: dco_decode_RustOpaque_bdk_corebitcoinTransaction(arr[0]), ); } @protected - double dco_decode_f_32(dynamic raw) { + FfiUpdate dco_decode_ffi_update(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as double; + final arr = raw as List; + if (arr.length != 1) + throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); + return FfiUpdate( + field0: dco_decode_RustOpaque_bdk_walletUpdate(arr[0]), + ); } @protected - FeeRate dco_decode_fee_rate(dynamic raw) { + FfiWallet dco_decode_ffi_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 FeeRate( - satPerVb: dco_decode_f_32(arr[0]), + return FfiWallet( + opaque: + dco_decode_RustOpaque_stdsyncMutexbdk_walletPersistedWalletbdk_walletrusqliteConnection( + arr[0]), ); } @protected - HexError dco_decode_hex_error(dynamic raw) { + FromScriptError dco_decode_from_script_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]), - ); + return FromScriptError_UnrecognizedScript(); case 1: - return HexError_OddLengthString( - dco_decode_usize(raw[1]), + return FromScriptError_WitnessProgram( + errorMessage: dco_decode_String(raw[1]), ); case 2: - return HexError_InvalidLength( - dco_decode_usize(raw[1]), - dco_decode_usize(raw[2]), + return FromScriptError_WitnessVersion( + errorMessage: dco_decode_String(raw[1]), ); + case 3: + return FromScriptError_OtherFromScriptErr(); default: throw Exception("unreachable"); } @@ -3673,14 +4565,9 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @protected - Input dco_decode_input(dynamic raw) { + PlatformInt64 dco_decode_isize(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]), - ); + return dcoDecodeI64(raw); } @protected @@ -3689,6 +4576,12 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { return KeychainKind.values[raw as int]; } + @protected + List dco_decode_list_ffi_canonical_tx(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return (raw as List).map(dco_decode_ffi_canonical_tx).toList(); + } + @protected List dco_decode_list_list_prim_u_8_strict(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -3696,9 +4589,9 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @protected - List dco_decode_list_local_utxo(dynamic raw) { + List dco_decode_list_local_output(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return (raw as List).map(dco_decode_local_utxo).toList(); + return (raw as List).map(dco_decode_local_output).toList(); } @protected @@ -3720,15 +4613,27 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @protected - List dco_decode_list_script_amount(dynamic raw) { + Uint64List dco_decode_list_prim_usize_strict(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as Uint64List; + } + + @protected + List<(FfiScriptBuf, BigInt)> dco_decode_list_record_ffi_script_buf_u_64( + dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return (raw as List).map(dco_decode_script_amount).toList(); + return (raw as List) + .map(dco_decode_record_ffi_script_buf_u_64) + .toList(); } @protected - List dco_decode_list_transaction_details(dynamic raw) { + List<(String, Uint64List)> + dco_decode_list_record_string_list_prim_usize_strict(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return (raw as List).map(dco_decode_transaction_details).toList(); + return (raw as List) + .map(dco_decode_record_string_list_prim_usize_strict) + .toList(); } @protected @@ -3744,12 +4649,31 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @protected - LocalUtxo dco_decode_local_utxo(dynamic raw) { + LoadWithPersistError dco_decode_load_with_persist_error(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + switch (raw[0]) { + case 0: + return LoadWithPersistError_Persist( + errorMessage: dco_decode_String(raw[1]), + ); + case 1: + return LoadWithPersistError_InvalidChangeSet( + errorMessage: dco_decode_String(raw[1]), + ); + case 2: + return LoadWithPersistError_CouldNotLoad(); + default: + throw Exception("unreachable"); + } + } + + @protected + LocalOutput dco_decode_local_output(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( + return LocalOutput( outpoint: dco_decode_out_point(arr[0]), txout: dco_decode_tx_out(arr[1]), keychain: dco_decode_keychain_kind(arr[2]), @@ -3787,51 +4711,27 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @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) { + 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_block_time(raw); + return raw == null ? null : dco_decode_box_autoadd_fee_rate(raw); } @protected - double? dco_decode_opt_box_autoadd_f_32(dynamic raw) { + FfiCanonicalTx? dco_decode_opt_box_autoadd_ffi_canonical_tx(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return raw == null ? null : dco_decode_box_autoadd_f_32(raw); + return raw == null ? null : dco_decode_box_autoadd_ffi_canonical_tx(raw); } @protected - FeeRate? dco_decode_opt_box_autoadd_fee_rate(dynamic raw) { + FfiPolicy? dco_decode_opt_box_autoadd_ffi_policy(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return raw == null ? null : dco_decode_box_autoadd_fee_rate(raw); + return raw == null ? null : dco_decode_box_autoadd_ffi_policy(raw); } @protected - PsbtSigHashType? dco_decode_opt_box_autoadd_psbt_sig_hash_type(dynamic raw) { + FfiScriptBuf? dco_decode_opt_box_autoadd_ffi_script_buf(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); + return raw == null ? null : dco_decode_box_autoadd_ffi_script_buf(raw); } @protected @@ -3841,42 +4741,28 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @protected - (OutPoint, Input, BigInt)? - dco_decode_opt_box_autoadd_record_out_point_input_usize(dynamic raw) { + ( + Map, + KeychainKind + )? dco_decode_opt_box_autoadd_record_map_string_list_prim_usize_strict_keychain_kind( + 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); + : dco_decode_box_autoadd_record_map_string_list_prim_usize_strict_keychain_kind( + raw); } @protected int? dco_decode_opt_box_autoadd_u_32(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return raw == null ? null : dco_decode_box_autoadd_u_32(raw); - } - - @protected - BigInt? dco_decode_opt_box_autoadd_u_64(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw == null ? null : dco_decode_box_autoadd_u_64(raw); + return raw == null ? null : dco_decode_box_autoadd_u_32(raw); } @protected - int? dco_decode_opt_box_autoadd_u_8(dynamic raw) { + BigInt? dco_decode_opt_box_autoadd_u_64(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return raw == null ? null : dco_decode_box_autoadd_u_8(raw); + return raw == null ? null : dco_decode_box_autoadd_u_64(raw); } @protected @@ -3892,36 +4778,121 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @protected - Payload dco_decode_payload(dynamic raw) { + PsbtError dco_decode_psbt_error(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]), - ); + return PsbtError_InvalidMagic(); case 1: - return Payload_ScriptHash( - scriptHash: dco_decode_String(raw[1]), - ); + return PsbtError_MissingUtxo(); case 2: - return Payload_WitnessProgram( - version: dco_decode_witness_version(raw[1]), - program: dco_decode_list_prim_u_8_strict(raw[2]), + return PsbtError_InvalidSeparator(); + case 3: + return PsbtError_PsbtUtxoOutOfBounds(); + case 4: + return PsbtError_InvalidKey( + key: dco_decode_String(raw[1]), + ); + case 5: + return PsbtError_InvalidProprietaryKey(); + case 6: + return PsbtError_DuplicateKey( + key: dco_decode_String(raw[1]), + ); + case 7: + return PsbtError_UnsignedTxHasScriptSigs(); + case 8: + return PsbtError_UnsignedTxHasScriptWitnesses(); + case 9: + return PsbtError_MustHaveUnsignedTx(); + case 10: + return PsbtError_NoMorePairs(); + case 11: + return PsbtError_UnexpectedUnsignedTx(); + case 12: + return PsbtError_NonStandardSighashType( + sighash: dco_decode_u_32(raw[1]), + ); + case 13: + return PsbtError_InvalidHash( + hash: dco_decode_String(raw[1]), + ); + case 14: + return PsbtError_InvalidPreimageHashPair(); + case 15: + return PsbtError_CombineInconsistentKeySources( + xpub: dco_decode_String(raw[1]), + ); + case 16: + return PsbtError_ConsensusEncoding( + encodingError: dco_decode_String(raw[1]), + ); + case 17: + return PsbtError_NegativeFee(); + case 18: + return PsbtError_FeeOverflow(); + case 19: + return PsbtError_InvalidPublicKey( + errorMessage: dco_decode_String(raw[1]), + ); + case 20: + return PsbtError_InvalidSecp256k1PublicKey( + secp256K1Error: dco_decode_String(raw[1]), + ); + case 21: + return PsbtError_InvalidXOnlyPublicKey(); + case 22: + return PsbtError_InvalidEcdsaSignature( + errorMessage: dco_decode_String(raw[1]), + ); + case 23: + return PsbtError_InvalidTaprootSignature( + errorMessage: dco_decode_String(raw[1]), + ); + case 24: + return PsbtError_InvalidControlBlock(); + case 25: + return PsbtError_InvalidLeafVersion(); + case 26: + return PsbtError_Taproot(); + case 27: + return PsbtError_TapTree( + errorMessage: dco_decode_String(raw[1]), ); + case 28: + return PsbtError_XPubKey(); + case 29: + return PsbtError_Version( + errorMessage: dco_decode_String(raw[1]), + ); + case 30: + return PsbtError_PartialDataConsumption(); + case 31: + return PsbtError_Io( + errorMessage: dco_decode_String(raw[1]), + ); + case 32: + return PsbtError_OtherPsbtErr(); default: throw Exception("unreachable"); } } @protected - PsbtSigHashType dco_decode_psbt_sig_hash_type(dynamic raw) { + PsbtParseError dco_decode_psbt_parse_error(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]), - ); + switch (raw[0]) { + case 0: + return PsbtParseError_PsbtEncoding( + errorMessage: dco_decode_String(raw[1]), + ); + case 1: + return PsbtParseError_Base64Encoding( + errorMessage: dco_decode_String(raw[1]), + ); + default: + throw Exception("unreachable"); + } } @protected @@ -3940,144 +4911,181 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @protected - (BdkAddress, int) dco_decode_record_bdk_address_u_32(dynamic raw) { + (FfiScriptBuf, BigInt) dco_decode_record_ffi_script_buf_u_64(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]), + dco_decode_ffi_script_buf(arr[0]), + dco_decode_u_64(arr[1]), ); } @protected - (BdkPsbt, TransactionDetails) dco_decode_record_bdk_psbt_transaction_details( - dynamic raw) { + (Map, KeychainKind) + dco_decode_record_map_string_list_prim_usize_strict_keychain_kind( + 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]), + dco_decode_Map_String_list_prim_usize_strict(arr[0]), + dco_decode_keychain_kind(arr[1]), ); } @protected - (OutPoint, Input, BigInt) dco_decode_record_out_point_input_usize( + (String, Uint64List) dco_decode_record_string_list_prim_usize_strict( 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]), - ); - } - - @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]), + dco_decode_String(arr[0]), + dco_decode_list_prim_usize_strict(arr[1]), ); } @protected - ScriptAmount dco_decode_script_amount(dynamic raw) { + RequestBuilderError dco_decode_request_builder_error(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]), - ); + return RequestBuilderError.values[raw as int]; } @protected SignOptions dco_decode_sign_options(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs final arr = raw as List; - if (arr.length != 7) - throw Exception('unexpected arr length: expect 7 but see ${arr.length}'); + if (arr.length != 6) + throw Exception('unexpected arr length: expect 6 but see ${arr.length}'); return SignOptions( trustWitnessUtxo: dco_decode_bool(arr[0]), assumeHeight: dco_decode_opt_box_autoadd_u_32(arr[1]), allowAllSighashes: dco_decode_bool(arr[2]), - removePartialSigs: dco_decode_bool(arr[3]), - tryFinalize: dco_decode_bool(arr[4]), - signWithTapInternalKey: dco_decode_bool(arr[5]), - allowGrinding: dco_decode_bool(arr[6]), + tryFinalize: dco_decode_bool(arr[3]), + signWithTapInternalKey: dco_decode_bool(arr[4]), + allowGrinding: dco_decode_bool(arr[5]), ); } @protected - SledDbConfiguration dco_decode_sled_db_configuration(dynamic raw) { + SignerError dco_decode_signer_error(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]), - ); + switch (raw[0]) { + case 0: + return SignerError_MissingKey(); + case 1: + return SignerError_InvalidKey(); + case 2: + return SignerError_UserCanceled(); + case 3: + return SignerError_InputIndexOutOfRange(); + case 4: + return SignerError_MissingNonWitnessUtxo(); + case 5: + return SignerError_InvalidNonWitnessUtxo(); + case 6: + return SignerError_MissingWitnessUtxo(); + case 7: + return SignerError_MissingWitnessScript(); + case 8: + return SignerError_MissingHdKeypath(); + case 9: + return SignerError_NonStandardSighash(); + case 10: + return SignerError_InvalidSighash(); + case 11: + return SignerError_SighashP2wpkh( + errorMessage: dco_decode_String(raw[1]), + ); + case 12: + return SignerError_SighashTaproot( + errorMessage: dco_decode_String(raw[1]), + ); + case 13: + return SignerError_TxInputsIndexError( + errorMessage: dco_decode_String(raw[1]), + ); + case 14: + return SignerError_MiniscriptPsbt( + errorMessage: dco_decode_String(raw[1]), + ); + case 15: + return SignerError_External( + errorMessage: dco_decode_String(raw[1]), + ); + case 16: + return SignerError_Psbt( + errorMessage: dco_decode_String(raw[1]), + ); + default: + throw Exception("unreachable"); + } } @protected - SqliteDbConfiguration dco_decode_sqlite_db_configuration(dynamic raw) { + SqliteError dco_decode_sqlite_error(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]), - ); + switch (raw[0]) { + case 0: + return SqliteError_Sqlite( + rusqliteError: dco_decode_String(raw[1]), + ); + default: + throw Exception("unreachable"); + } } @protected - TransactionDetails dco_decode_transaction_details(dynamic raw) { + SyncProgress dco_decode_sync_progress(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]), + return SyncProgress( + spksConsumed: dco_decode_u_64(arr[0]), + spksRemaining: dco_decode_u_64(arr[1]), + txidsConsumed: dco_decode_u_64(arr[2]), + txidsRemaining: dco_decode_u_64(arr[3]), + outpointsConsumed: dco_decode_u_64(arr[4]), + outpointsRemaining: dco_decode_u_64(arr[5]), ); } + @protected + TransactionError dco_decode_transaction_error(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + switch (raw[0]) { + case 0: + return TransactionError_Io(); + case 1: + return TransactionError_OversizedVectorAllocation(); + case 2: + return TransactionError_InvalidChecksum( + expected: dco_decode_String(raw[1]), + actual: dco_decode_String(raw[2]), + ); + case 3: + return TransactionError_NonMinimalVarInt(); + case 4: + return TransactionError_ParseFailed(); + case 5: + return TransactionError_UnsupportedSegwitFlag( + flag: dco_decode_u_8(raw[1]), + ); + case 6: + return TransactionError_OtherTransactionErr(); + default: + throw Exception("unreachable"); + } + } + @protected TxIn dco_decode_tx_in(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -4086,7 +5094,7 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { 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]), + scriptSig: dco_decode_ffi_script_buf(arr[1]), sequence: dco_decode_u_32(arr[2]), witness: dco_decode_list_list_prim_u_8_strict(arr[3]), ); @@ -4100,10 +5108,29 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { 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]), + scriptPubkey: dco_decode_ffi_script_buf(arr[1]), ); } + @protected + TxidParseError dco_decode_txid_parse_error(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + switch (raw[0]) { + case 0: + return TxidParseError_InvalidTxid( + txid: dco_decode_String(raw[1]), + ); + default: + throw Exception("unreachable"); + } + } + + @protected + int dco_decode_u_16(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as int; + } + @protected int dco_decode_u_32(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -4122,12 +5149,6 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { 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 @@ -4141,25 +5162,36 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @protected - Variant dco_decode_variant(dynamic raw) { + WordCount dco_decode_word_count(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return Variant.values[raw as int]; + return WordCount.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]; + AnyhowException sse_decode_AnyhowException(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var inner = sse_decode_String(deserializer); + return AnyhowException(inner); } @protected - WordCount dco_decode_word_count(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return WordCount.values[raw as int]; + Object sse_decode_DartOpaque(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var inner = sse_decode_isize(deserializer); + return decodeDartOpaque(inner, generalizedFrbRustBinding); } @protected - Address sse_decode_RustOpaque_bdkbitcoinAddress( + Map sse_decode_Map_String_list_prim_usize_strict( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var inner = + sse_decode_list_record_string_list_prim_usize_strict(deserializer); + return Map.fromEntries(inner.map((e) => MapEntry(e.$1, e.$2))); + } + + @protected + Address sse_decode_RustOpaque_bdk_corebitcoinAddress( SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs return AddressImpl.frbInternalSseDecode( @@ -4167,31 +5199,64 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @protected - DerivationPath sse_decode_RustOpaque_bdkbitcoinbip32DerivationPath( + Transaction sse_decode_RustOpaque_bdk_corebitcoinTransaction( SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return DerivationPathImpl.frbInternalSseDecode( + return TransactionImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + + @protected + BdkElectrumClientClient + sse_decode_RustOpaque_bdk_electrumBdkElectrumClientbdk_electrumelectrum_clientClient( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return BdkElectrumClientClientImpl.frbInternalSseDecode( sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); } @protected - AnyBlockchain sse_decode_RustOpaque_bdkblockchainAnyBlockchain( + BlockingClient sse_decode_RustOpaque_bdk_esploraesplora_clientBlockingClient( SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return AnyBlockchainImpl.frbInternalSseDecode( + return BlockingClientImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + + @protected + Update sse_decode_RustOpaque_bdk_walletUpdate(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return UpdateImpl.frbInternalSseDecode( sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); } @protected - ExtendedDescriptor sse_decode_RustOpaque_bdkdescriptorExtendedDescriptor( + DerivationPath sse_decode_RustOpaque_bdk_walletbitcoinbip32DerivationPath( SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs + return DerivationPathImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + + @protected + ExtendedDescriptor + sse_decode_RustOpaque_bdk_walletdescriptorExtendedDescriptor( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs return ExtendedDescriptorImpl.frbInternalSseDecode( sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); } @protected - DescriptorPublicKey sse_decode_RustOpaque_bdkkeysDescriptorPublicKey( + Policy sse_decode_RustOpaque_bdk_walletdescriptorPolicy( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return PolicyImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + + @protected + DescriptorPublicKey sse_decode_RustOpaque_bdk_walletkeysDescriptorPublicKey( SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs return DescriptorPublicKeyImpl.frbInternalSseDecode( @@ -4199,7 +5264,7 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @protected - DescriptorSecretKey sse_decode_RustOpaque_bdkkeysDescriptorSecretKey( + DescriptorSecretKey sse_decode_RustOpaque_bdk_walletkeysDescriptorSecretKey( SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs return DescriptorSecretKeyImpl.frbInternalSseDecode( @@ -4207,14 +5272,15 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @protected - KeyMap sse_decode_RustOpaque_bdkkeysKeyMap(SseDeserializer deserializer) { + KeyMap sse_decode_RustOpaque_bdk_walletkeysKeyMap( + SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs return KeyMapImpl.frbInternalSseDecode( sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); } @protected - Mnemonic sse_decode_RustOpaque_bdkkeysbip39Mnemonic( + Mnemonic sse_decode_RustOpaque_bdk_walletkeysbip39Mnemonic( SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs return MnemonicImpl.frbInternalSseDecode( @@ -4222,826 +5288,989 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @protected - MutexWalletAnyDatabase - sse_decode_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( + MutexOptionFullScanRequestBuilderKeychainKind + sse_decode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestBuilderbdk_walletKeychainKind( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return MutexOptionFullScanRequestBuilderKeychainKindImpl + .frbInternalSseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + + @protected + MutexOptionFullScanRequestKeychainKind + sse_decode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestbdk_walletKeychainKind( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return MutexOptionFullScanRequestKeychainKindImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + + @protected + MutexOptionSyncRequestBuilderKeychainKindU32 + sse_decode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestBuilderbdk_walletKeychainKindu32( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return MutexOptionSyncRequestBuilderKeychainKindU32Impl + .frbInternalSseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + + @protected + MutexOptionSyncRequestKeychainKindU32 + sse_decode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestbdk_walletKeychainKindu32( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return MutexOptionSyncRequestKeychainKindU32Impl.frbInternalSseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + + @protected + MutexPsbt sse_decode_RustOpaque_stdsyncMutexbdk_corebitcoinpsbtPsbt( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return MutexPsbtImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + + @protected + MutexPersistedWalletConnection + sse_decode_RustOpaque_stdsyncMutexbdk_walletPersistedWalletbdk_walletrusqliteConnection( SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return MutexWalletAnyDatabaseImpl.frbInternalSseDecode( + return MutexPersistedWalletConnectionImpl.frbInternalSseDecode( sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); } @protected - MutexPartiallySignedTransaction - sse_decode_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( + MutexConnection + sse_decode_RustOpaque_stdsyncMutexbdk_walletrusqliteConnection( SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return MutexPartiallySignedTransactionImpl.frbInternalSseDecode( + return MutexConnectionImpl.frbInternalSseDecode( sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); } @protected - String sse_decode_String(SseDeserializer deserializer) { + 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 + 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_ffi_address(deserializer); + var var_keychain = sse_decode_keychain_kind(deserializer); + return AddressInfo( + index: var_index, address: var_address, keychain: var_keychain); + } + + @protected + AddressParseError sse_decode_address_parse_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 AddressParseError_Base58(); + case 1: + return AddressParseError_Bech32(); + case 2: + var var_errorMessage = sse_decode_String(deserializer); + return AddressParseError_WitnessVersion(errorMessage: var_errorMessage); + case 3: + var var_errorMessage = sse_decode_String(deserializer); + return AddressParseError_WitnessProgram(errorMessage: var_errorMessage); + case 4: + return AddressParseError_UnknownHrp(); + case 5: + return AddressParseError_LegacyAddressTooLong(); + case 6: + return AddressParseError_InvalidBase58PayloadLength(); + case 7: + return AddressParseError_InvalidLegacyPrefix(); + case 8: + return AddressParseError_NetworkValidation(); + case 9: + return AddressParseError_OtherAddressParseErr(); + default: + throw UnimplementedError(''); + } + } + + @protected + Balance sse_decode_balance(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); + 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 - AddressError sse_decode_address_error(SseDeserializer deserializer) { + Bip32Error sse_decode_bip_32_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); + return Bip32Error_CannotDeriveFromHardenedKey(); case 1: - var var_field0 = sse_decode_String(deserializer); - return AddressError_Bech32(var_field0); + var var_errorMessage = sse_decode_String(deserializer); + return Bip32Error_Secp256k1(errorMessage: var_errorMessage); case 2: - return AddressError_EmptyBech32Payload(); + var var_childNumber = sse_decode_u_32(deserializer); + return Bip32Error_InvalidChildNumber(childNumber: var_childNumber); 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); + return Bip32Error_InvalidChildNumberFormat(); case 4: - var var_field0 = sse_decode_u_8(deserializer); - return AddressError_InvalidWitnessVersion(var_field0); + return Bip32Error_InvalidDerivationPathFormat(); case 5: - var var_field0 = sse_decode_String(deserializer); - return AddressError_UnparsableWitnessVersion(var_field0); + var var_version = sse_decode_String(deserializer); + return Bip32Error_UnknownVersion(version: var_version); case 6: - return AddressError_MalformedWitnessVersion(); + var var_length = sse_decode_u_32(deserializer); + return Bip32Error_WrongExtendedKeyLength(length: var_length); case 7: - var var_field0 = sse_decode_usize(deserializer); - return AddressError_InvalidWitnessProgramLength(var_field0); + var var_errorMessage = sse_decode_String(deserializer); + return Bip32Error_Base58(errorMessage: var_errorMessage); case 8: - var var_field0 = sse_decode_usize(deserializer); - return AddressError_InvalidSegwitV0ProgramLength(var_field0); + var var_errorMessage = sse_decode_String(deserializer); + return Bip32Error_Hex(errorMessage: var_errorMessage); case 9: - return AddressError_UncompressedPubkey(); + var var_length = sse_decode_u_32(deserializer); + return Bip32Error_InvalidPublicKeyHexLength(length: var_length); 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); + var var_errorMessage = sse_decode_String(deserializer); + return Bip32Error_UnknownError(errorMessage: var_errorMessage); default: throw UnimplementedError(''); } } @protected - AddressIndex sse_decode_address_index(SseDeserializer deserializer) { + Bip39Error sse_decode_bip_39_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 AddressIndex_Increase(); + var var_wordCount = sse_decode_u_64(deserializer); + return Bip39Error_BadWordCount(wordCount: var_wordCount); case 1: - return AddressIndex_LastUnused(); + var var_index = sse_decode_u_64(deserializer); + return Bip39Error_UnknownWord(index: var_index); case 2: - var var_index = sse_decode_u_32(deserializer); - return AddressIndex_Peek(index: var_index); + var var_bitCount = sse_decode_u_64(deserializer); + return Bip39Error_BadEntropyBitCount(bitCount: var_bitCount); case 3: - var var_index = sse_decode_u_32(deserializer); - return AddressIndex_Reset(index: var_index); + return Bip39Error_InvalidChecksum(); + case 4: + var var_languages = sse_decode_String(deserializer); + return Bip39Error_AmbiguousLanguages(languages: var_languages); + case 5: + var var_errorMessage = sse_decode_String(deserializer); + return Bip39Error_Generic(errorMessage: var_errorMessage); default: throw UnimplementedError(''); } } @protected - Auth sse_decode_auth(SseDeserializer deserializer) { + BlockId sse_decode_block_id(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs + var var_height = sse_decode_u_32(deserializer); + var var_hash = sse_decode_String(deserializer); + return BlockId(height: var_height, hash: var_hash); + } - 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 + bool sse_decode_bool(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return deserializer.buffer.getUint8() != 0; } @protected - Balance sse_decode_balance(SseDeserializer deserializer) { + ConfirmationBlockTime sse_decode_box_autoadd_confirmation_block_time( + 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); + return (sse_decode_confirmation_block_time(deserializer)); } @protected - BdkAddress sse_decode_bdk_address(SseDeserializer deserializer) { + FeeRate sse_decode_box_autoadd_fee_rate(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); + return (sse_decode_fee_rate(deserializer)); } @protected - BdkBlockchain sse_decode_bdk_blockchain(SseDeserializer deserializer) { + FfiAddress sse_decode_box_autoadd_ffi_address(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - var var_ptr = - sse_decode_RustOpaque_bdkblockchainAnyBlockchain(deserializer); - return BdkBlockchain(ptr: var_ptr); + return (sse_decode_ffi_address(deserializer)); } @protected - BdkDerivationPath sse_decode_bdk_derivation_path( + FfiCanonicalTx sse_decode_box_autoadd_ffi_canonical_tx( SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - var var_ptr = - sse_decode_RustOpaque_bdkbitcoinbip32DerivationPath(deserializer); - return BdkDerivationPath(ptr: var_ptr); + return (sse_decode_ffi_canonical_tx(deserializer)); } @protected - BdkDescriptor sse_decode_bdk_descriptor(SseDeserializer deserializer) { + FfiConnection sse_decode_box_autoadd_ffi_connection( + SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - var var_extendedDescriptor = - sse_decode_RustOpaque_bdkdescriptorExtendedDescriptor(deserializer); - var var_keyMap = sse_decode_RustOpaque_bdkkeysKeyMap(deserializer); - return BdkDescriptor( - extendedDescriptor: var_extendedDescriptor, keyMap: var_keyMap); + return (sse_decode_ffi_connection(deserializer)); } @protected - BdkDescriptorPublicKey sse_decode_bdk_descriptor_public_key( + FfiDerivationPath sse_decode_box_autoadd_ffi_derivation_path( SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - var var_ptr = - sse_decode_RustOpaque_bdkkeysDescriptorPublicKey(deserializer); - return BdkDescriptorPublicKey(ptr: var_ptr); + return (sse_decode_ffi_derivation_path(deserializer)); } @protected - BdkDescriptorSecretKey sse_decode_bdk_descriptor_secret_key( + FfiDescriptor sse_decode_box_autoadd_ffi_descriptor( SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - var var_ptr = - sse_decode_RustOpaque_bdkkeysDescriptorSecretKey(deserializer); - return BdkDescriptorSecretKey(ptr: var_ptr); + return (sse_decode_ffi_descriptor(deserializer)); } @protected - BdkError sse_decode_bdk_error(SseDeserializer deserializer) { + FfiDescriptorPublicKey sse_decode_box_autoadd_ffi_descriptor_public_key( + SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_ffi_descriptor_public_key(deserializer)); + } - var tag_ = sse_decode_i_32(deserializer); - switch (tag_) { - case 0: - var var_field0 = sse_decode_box_autoadd_hex_error(deserializer); - return BdkError_Hex(var_field0); - case 1: - var var_field0 = sse_decode_box_autoadd_consensus_error(deserializer); - return BdkError_Consensus(var_field0); - case 2: - var var_field0 = sse_decode_String(deserializer); - return BdkError_VerifyTransaction(var_field0); - case 3: - var var_field0 = sse_decode_box_autoadd_address_error(deserializer); - return BdkError_Address(var_field0); - case 4: - var var_field0 = sse_decode_box_autoadd_descriptor_error(deserializer); - return BdkError_Descriptor(var_field0); - case 5: - var var_field0 = sse_decode_list_prim_u_8_strict(deserializer); - return BdkError_InvalidU32Bytes(var_field0); - case 6: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Generic(var_field0); - case 7: - return BdkError_ScriptDoesntHaveAddressForm(); - case 8: - return BdkError_NoRecipients(); - case 9: - return BdkError_NoUtxosSelected(); - case 10: - var var_field0 = sse_decode_usize(deserializer); - return BdkError_OutputBelowDustLimit(var_field0); - case 11: - var var_needed = sse_decode_u_64(deserializer); - var var_available = sse_decode_u_64(deserializer); - return BdkError_InsufficientFunds( - needed: var_needed, available: var_available); - case 12: - return BdkError_BnBTotalTriesExceeded(); - case 13: - return BdkError_BnBNoExactMatch(); - case 14: - return BdkError_UnknownUtxo(); - case 15: - return BdkError_TransactionNotFound(); - case 16: - return BdkError_TransactionConfirmed(); - case 17: - return BdkError_IrreplaceableTransaction(); - case 18: - var var_needed = sse_decode_f_32(deserializer); - return BdkError_FeeRateTooLow(needed: var_needed); - case 19: - var var_needed = sse_decode_u_64(deserializer); - return BdkError_FeeTooLow(needed: var_needed); - case 20: - return BdkError_FeeRateUnavailable(); - case 21: - var var_field0 = sse_decode_String(deserializer); - return BdkError_MissingKeyOrigin(var_field0); - case 22: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Key(var_field0); - case 23: - return BdkError_ChecksumMismatch(); - case 24: - var var_field0 = sse_decode_keychain_kind(deserializer); - return BdkError_SpendingPolicyRequired(var_field0); - case 25: - var var_field0 = sse_decode_String(deserializer); - return BdkError_InvalidPolicyPathError(var_field0); - case 26: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Signer(var_field0); - case 27: - var var_requested = sse_decode_network(deserializer); - var var_found = sse_decode_network(deserializer); - return BdkError_InvalidNetwork( - requested: var_requested, found: var_found); - case 28: - var var_field0 = sse_decode_box_autoadd_out_point(deserializer); - return BdkError_InvalidOutpoint(var_field0); - case 29: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Encode(var_field0); - case 30: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Miniscript(var_field0); - case 31: - var var_field0 = sse_decode_String(deserializer); - return BdkError_MiniscriptPsbt(var_field0); - case 32: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Bip32(var_field0); - case 33: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Bip39(var_field0); - case 34: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Secp256k1(var_field0); - case 35: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Json(var_field0); - case 36: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Psbt(var_field0); - case 37: - var var_field0 = sse_decode_String(deserializer); - return BdkError_PsbtParse(var_field0); - case 38: - var var_field0 = sse_decode_usize(deserializer); - var var_field1 = sse_decode_usize(deserializer); - return BdkError_MissingCachedScripts(var_field0, var_field1); - case 39: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Electrum(var_field0); - case 40: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Esplora(var_field0); - case 41: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Sled(var_field0); - case 42: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Rpc(var_field0); - case 43: - var var_field0 = sse_decode_String(deserializer); - return BdkError_Rusqlite(var_field0); - case 44: - var var_field0 = sse_decode_String(deserializer); - return BdkError_InvalidInput(var_field0); - case 45: - var var_field0 = sse_decode_String(deserializer); - return BdkError_InvalidLockTime(var_field0); - case 46: - var var_field0 = sse_decode_String(deserializer); - return BdkError_InvalidTransaction(var_field0); - default: - throw UnimplementedError(''); - } + @protected + FfiDescriptorSecretKey sse_decode_box_autoadd_ffi_descriptor_secret_key( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_ffi_descriptor_secret_key(deserializer)); } @protected - BdkMnemonic sse_decode_bdk_mnemonic(SseDeserializer deserializer) { + FfiElectrumClient sse_decode_box_autoadd_ffi_electrum_client( + SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - var var_ptr = sse_decode_RustOpaque_bdkkeysbip39Mnemonic(deserializer); - return BdkMnemonic(ptr: var_ptr); + return (sse_decode_ffi_electrum_client(deserializer)); } @protected - BdkPsbt sse_decode_bdk_psbt(SseDeserializer deserializer) { + FfiEsploraClient sse_decode_box_autoadd_ffi_esplora_client( + SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - var var_ptr = - sse_decode_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( - deserializer); - return BdkPsbt(ptr: var_ptr); + return (sse_decode_ffi_esplora_client(deserializer)); } @protected - BdkScriptBuf sse_decode_bdk_script_buf(SseDeserializer deserializer) { + FfiFullScanRequest sse_decode_box_autoadd_ffi_full_scan_request( + 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); + return (sse_decode_ffi_full_scan_request(deserializer)); } @protected - BdkTransaction sse_decode_bdk_transaction(SseDeserializer deserializer) { + FfiFullScanRequestBuilder + sse_decode_box_autoadd_ffi_full_scan_request_builder( + SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - var var_s = sse_decode_String(deserializer); - return BdkTransaction(s: var_s); + return (sse_decode_ffi_full_scan_request_builder(deserializer)); } @protected - BdkWallet sse_decode_bdk_wallet(SseDeserializer deserializer) { + FfiMnemonic sse_decode_box_autoadd_ffi_mnemonic( + SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - var var_ptr = - sse_decode_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( - deserializer); - return BdkWallet(ptr: var_ptr); + return (sse_decode_ffi_mnemonic(deserializer)); } @protected - BlockTime sse_decode_block_time(SseDeserializer deserializer) { + FfiPolicy sse_decode_box_autoadd_ffi_policy(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); + return (sse_decode_ffi_policy(deserializer)); } @protected - BlockchainConfig sse_decode_blockchain_config(SseDeserializer deserializer) { + FfiPsbt sse_decode_box_autoadd_ffi_psbt(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_ffi_psbt(deserializer)); + } - 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 + FfiScriptBuf sse_decode_box_autoadd_ffi_script_buf( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_ffi_script_buf(deserializer)); } @protected - bool sse_decode_bool(SseDeserializer deserializer) { + FfiSyncRequest sse_decode_box_autoadd_ffi_sync_request( + SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return deserializer.buffer.getUint8() != 0; + return (sse_decode_ffi_sync_request(deserializer)); } @protected - AddressError sse_decode_box_autoadd_address_error( + FfiSyncRequestBuilder sse_decode_box_autoadd_ffi_sync_request_builder( SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_address_error(deserializer)); + return (sse_decode_ffi_sync_request_builder(deserializer)); } @protected - AddressIndex sse_decode_box_autoadd_address_index( + FfiTransaction sse_decode_box_autoadd_ffi_transaction( SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_address_index(deserializer)); + return (sse_decode_ffi_transaction(deserializer)); } @protected - BdkAddress sse_decode_box_autoadd_bdk_address(SseDeserializer deserializer) { + FfiUpdate sse_decode_box_autoadd_ffi_update(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_bdk_address(deserializer)); + return (sse_decode_ffi_update(deserializer)); } @protected - BdkBlockchain sse_decode_box_autoadd_bdk_blockchain( - SseDeserializer deserializer) { + FfiWallet sse_decode_box_autoadd_ffi_wallet(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_bdk_blockchain(deserializer)); + return (sse_decode_ffi_wallet(deserializer)); } @protected - BdkDerivationPath sse_decode_box_autoadd_bdk_derivation_path( - SseDeserializer deserializer) { + 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 + RbfValue sse_decode_box_autoadd_rbf_value(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_bdk_derivation_path(deserializer)); + return (sse_decode_rbf_value(deserializer)); } @protected - BdkDescriptor sse_decode_box_autoadd_bdk_descriptor( + ( + Map, + KeychainKind + ) sse_decode_box_autoadd_record_map_string_list_prim_usize_strict_keychain_kind( SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_bdk_descriptor(deserializer)); + return (sse_decode_record_map_string_list_prim_usize_strict_keychain_kind( + deserializer)); } @protected - BdkDescriptorPublicKey sse_decode_box_autoadd_bdk_descriptor_public_key( + SignOptions sse_decode_box_autoadd_sign_options( SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_bdk_descriptor_public_key(deserializer)); + return (sse_decode_sign_options(deserializer)); + } + + @protected + int sse_decode_box_autoadd_u_32(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_u_32(deserializer)); + } + + @protected + BigInt sse_decode_box_autoadd_u_64(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_u_64(deserializer)); } @protected - BdkDescriptorSecretKey sse_decode_box_autoadd_bdk_descriptor_secret_key( + CalculateFeeError sse_decode_calculate_fee_error( SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_bdk_descriptor_secret_key(deserializer)); + + var tag_ = sse_decode_i_32(deserializer); + switch (tag_) { + case 0: + var var_errorMessage = sse_decode_String(deserializer); + return CalculateFeeError_Generic(errorMessage: var_errorMessage); + case 1: + var var_outPoints = sse_decode_list_out_point(deserializer); + return CalculateFeeError_MissingTxOut(outPoints: var_outPoints); + case 2: + var var_amount = sse_decode_String(deserializer); + return CalculateFeeError_NegativeFee(amount: var_amount); + default: + throw UnimplementedError(''); + } } @protected - BdkMnemonic sse_decode_box_autoadd_bdk_mnemonic( + CannotConnectError sse_decode_cannot_connect_error( SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_bdk_mnemonic(deserializer)); + + var tag_ = sse_decode_i_32(deserializer); + switch (tag_) { + case 0: + var var_height = sse_decode_u_32(deserializer); + return CannotConnectError_Include(height: var_height); + default: + throw UnimplementedError(''); + } } @protected - BdkPsbt sse_decode_box_autoadd_bdk_psbt(SseDeserializer deserializer) { + ChainPosition sse_decode_chain_position(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_bdk_psbt(deserializer)); + + var tag_ = sse_decode_i_32(deserializer); + switch (tag_) { + case 0: + var var_confirmationBlockTime = + sse_decode_box_autoadd_confirmation_block_time(deserializer); + return ChainPosition_Confirmed( + confirmationBlockTime: var_confirmationBlockTime); + case 1: + var var_timestamp = sse_decode_u_64(deserializer); + return ChainPosition_Unconfirmed(timestamp: var_timestamp); + default: + throw UnimplementedError(''); + } } @protected - BdkScriptBuf sse_decode_box_autoadd_bdk_script_buf( + ChangeSpendPolicy sse_decode_change_spend_policy( SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_bdk_script_buf(deserializer)); + var inner = sse_decode_i_32(deserializer); + return ChangeSpendPolicy.values[inner]; } @protected - BdkTransaction sse_decode_box_autoadd_bdk_transaction( + ConfirmationBlockTime sse_decode_confirmation_block_time( SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_bdk_transaction(deserializer)); + var var_blockId = sse_decode_block_id(deserializer); + var var_confirmationTime = sse_decode_u_64(deserializer); + return ConfirmationBlockTime( + blockId: var_blockId, confirmationTime: var_confirmationTime); + } + + @protected + CreateTxError sse_decode_create_tx_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_txid = sse_decode_String(deserializer); + return CreateTxError_TransactionNotFound(txid: var_txid); + case 1: + var var_txid = sse_decode_String(deserializer); + return CreateTxError_TransactionConfirmed(txid: var_txid); + case 2: + var var_txid = sse_decode_String(deserializer); + return CreateTxError_IrreplaceableTransaction(txid: var_txid); + case 3: + return CreateTxError_FeeRateUnavailable(); + case 4: + var var_errorMessage = sse_decode_String(deserializer); + return CreateTxError_Generic(errorMessage: var_errorMessage); + case 5: + var var_errorMessage = sse_decode_String(deserializer); + return CreateTxError_Descriptor(errorMessage: var_errorMessage); + case 6: + var var_errorMessage = sse_decode_String(deserializer); + return CreateTxError_Policy(errorMessage: var_errorMessage); + case 7: + var var_kind = sse_decode_String(deserializer); + return CreateTxError_SpendingPolicyRequired(kind: var_kind); + case 8: + return CreateTxError_Version0(); + case 9: + return CreateTxError_Version1Csv(); + case 10: + var var_requestedTime = sse_decode_String(deserializer); + var var_requiredTime = sse_decode_String(deserializer); + return CreateTxError_LockTime( + requestedTime: var_requestedTime, requiredTime: var_requiredTime); + case 11: + return CreateTxError_RbfSequence(); + case 12: + var var_rbf = sse_decode_String(deserializer); + var var_csv = sse_decode_String(deserializer); + return CreateTxError_RbfSequenceCsv(rbf: var_rbf, csv: var_csv); + case 13: + var var_feeRequired = sse_decode_String(deserializer); + return CreateTxError_FeeTooLow(feeRequired: var_feeRequired); + case 14: + var var_feeRateRequired = sse_decode_String(deserializer); + return CreateTxError_FeeRateTooLow( + feeRateRequired: var_feeRateRequired); + case 15: + return CreateTxError_NoUtxosSelected(); + case 16: + var var_index = sse_decode_u_64(deserializer); + return CreateTxError_OutputBelowDustLimit(index: var_index); + case 17: + return CreateTxError_ChangePolicyDescriptor(); + case 18: + var var_errorMessage = sse_decode_String(deserializer); + return CreateTxError_CoinSelection(errorMessage: var_errorMessage); + case 19: + var var_needed = sse_decode_u_64(deserializer); + var var_available = sse_decode_u_64(deserializer); + return CreateTxError_InsufficientFunds( + needed: var_needed, available: var_available); + case 20: + return CreateTxError_NoRecipients(); + case 21: + var var_errorMessage = sse_decode_String(deserializer); + return CreateTxError_Psbt(errorMessage: var_errorMessage); + case 22: + var var_key = sse_decode_String(deserializer); + return CreateTxError_MissingKeyOrigin(key: var_key); + case 23: + var var_outpoint = sse_decode_String(deserializer); + return CreateTxError_UnknownUtxo(outpoint: var_outpoint); + case 24: + var var_outpoint = sse_decode_String(deserializer); + return CreateTxError_MissingNonWitnessUtxo(outpoint: var_outpoint); + case 25: + var var_errorMessage = sse_decode_String(deserializer); + return CreateTxError_MiniscriptPsbt(errorMessage: var_errorMessage); + default: + throw UnimplementedError(''); + } } @protected - BdkWallet sse_decode_box_autoadd_bdk_wallet(SseDeserializer deserializer) { + CreateWithPersistError sse_decode_create_with_persist_error( + SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_bdk_wallet(deserializer)); + + var tag_ = sse_decode_i_32(deserializer); + switch (tag_) { + case 0: + var var_errorMessage = sse_decode_String(deserializer); + return CreateWithPersistError_Persist(errorMessage: var_errorMessage); + case 1: + return CreateWithPersistError_DataAlreadyExists(); + case 2: + var var_errorMessage = sse_decode_String(deserializer); + return CreateWithPersistError_Descriptor( + errorMessage: var_errorMessage); + default: + throw UnimplementedError(''); + } } @protected - BlockTime sse_decode_box_autoadd_block_time(SseDeserializer deserializer) { + DescriptorError sse_decode_descriptor_error(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_block_time(deserializer)); + + var tag_ = sse_decode_i_32(deserializer); + switch (tag_) { + case 0: + return DescriptorError_InvalidHdKeyPath(); + case 1: + return DescriptorError_MissingPrivateData(); + case 2: + return DescriptorError_InvalidDescriptorChecksum(); + case 3: + return DescriptorError_HardenedDerivationXpub(); + case 4: + return DescriptorError_MultiPath(); + case 5: + var var_errorMessage = sse_decode_String(deserializer); + return DescriptorError_Key(errorMessage: var_errorMessage); + case 6: + var var_errorMessage = sse_decode_String(deserializer); + return DescriptorError_Generic(errorMessage: var_errorMessage); + case 7: + var var_errorMessage = sse_decode_String(deserializer); + return DescriptorError_Policy(errorMessage: var_errorMessage); + case 8: + var var_charector = sse_decode_String(deserializer); + return DescriptorError_InvalidDescriptorCharacter( + charector: var_charector); + case 9: + var var_errorMessage = sse_decode_String(deserializer); + return DescriptorError_Bip32(errorMessage: var_errorMessage); + case 10: + var var_errorMessage = sse_decode_String(deserializer); + return DescriptorError_Base58(errorMessage: var_errorMessage); + case 11: + var var_errorMessage = sse_decode_String(deserializer); + return DescriptorError_Pk(errorMessage: var_errorMessage); + case 12: + var var_errorMessage = sse_decode_String(deserializer); + return DescriptorError_Miniscript(errorMessage: var_errorMessage); + case 13: + var var_errorMessage = sse_decode_String(deserializer); + return DescriptorError_Hex(errorMessage: var_errorMessage); + case 14: + return DescriptorError_ExternalAndInternalAreTheSame(); + default: + throw UnimplementedError(''); + } } @protected - BlockchainConfig sse_decode_box_autoadd_blockchain_config( + DescriptorKeyError sse_decode_descriptor_key_error( 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)); + var tag_ = sse_decode_i_32(deserializer); + switch (tag_) { + case 0: + var var_errorMessage = sse_decode_String(deserializer); + return DescriptorKeyError_Parse(errorMessage: var_errorMessage); + case 1: + return DescriptorKeyError_InvalidKeyType(); + case 2: + var var_errorMessage = sse_decode_String(deserializer); + return DescriptorKeyError_Bip32(errorMessage: var_errorMessage); + default: + throw UnimplementedError(''); + } } @protected - DatabaseConfig sse_decode_box_autoadd_database_config( - SseDeserializer deserializer) { + ElectrumError sse_decode_electrum_error(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)); + var tag_ = sse_decode_i_32(deserializer); + switch (tag_) { + case 0: + var var_errorMessage = sse_decode_String(deserializer); + return ElectrumError_IOError(errorMessage: var_errorMessage); + case 1: + var var_errorMessage = sse_decode_String(deserializer); + return ElectrumError_Json(errorMessage: var_errorMessage); + case 2: + var var_errorMessage = sse_decode_String(deserializer); + return ElectrumError_Hex(errorMessage: var_errorMessage); + case 3: + var var_errorMessage = sse_decode_String(deserializer); + return ElectrumError_Protocol(errorMessage: var_errorMessage); + case 4: + var var_errorMessage = sse_decode_String(deserializer); + return ElectrumError_Bitcoin(errorMessage: var_errorMessage); + case 5: + return ElectrumError_AlreadySubscribed(); + case 6: + return ElectrumError_NotSubscribed(); + case 7: + var var_errorMessage = sse_decode_String(deserializer); + return ElectrumError_InvalidResponse(errorMessage: var_errorMessage); + case 8: + var var_errorMessage = sse_decode_String(deserializer); + return ElectrumError_Message(errorMessage: var_errorMessage); + case 9: + var var_domain = sse_decode_String(deserializer); + return ElectrumError_InvalidDNSNameError(domain: var_domain); + case 10: + return ElectrumError_MissingDomain(); + case 11: + return ElectrumError_AllAttemptsErrored(); + case 12: + var var_errorMessage = sse_decode_String(deserializer); + return ElectrumError_SharedIOError(errorMessage: var_errorMessage); + case 13: + return ElectrumError_CouldntLockReader(); + case 14: + return ElectrumError_Mpsc(); + case 15: + var var_errorMessage = sse_decode_String(deserializer); + return ElectrumError_CouldNotCreateConnection( + errorMessage: var_errorMessage); + case 16: + return ElectrumError_RequestAlreadyConsumed(); + default: + throw UnimplementedError(''); + } } @protected - ElectrumConfig sse_decode_box_autoadd_electrum_config( - SseDeserializer deserializer) { + EsploraError sse_decode_esplora_error(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)); + var tag_ = sse_decode_i_32(deserializer); + switch (tag_) { + case 0: + var var_errorMessage = sse_decode_String(deserializer); + return EsploraError_Minreq(errorMessage: var_errorMessage); + case 1: + var var_status = sse_decode_u_16(deserializer); + var var_errorMessage = sse_decode_String(deserializer); + return EsploraError_HttpResponse( + status: var_status, errorMessage: var_errorMessage); + case 2: + var var_errorMessage = sse_decode_String(deserializer); + return EsploraError_Parsing(errorMessage: var_errorMessage); + case 3: + var var_errorMessage = sse_decode_String(deserializer); + return EsploraError_StatusCode(errorMessage: var_errorMessage); + case 4: + var var_errorMessage = sse_decode_String(deserializer); + return EsploraError_BitcoinEncoding(errorMessage: var_errorMessage); + case 5: + var var_errorMessage = sse_decode_String(deserializer); + return EsploraError_HexToArray(errorMessage: var_errorMessage); + case 6: + var var_errorMessage = sse_decode_String(deserializer); + return EsploraError_HexToBytes(errorMessage: var_errorMessage); + case 7: + return EsploraError_TransactionNotFound(); + case 8: + var var_height = sse_decode_u_32(deserializer); + return EsploraError_HeaderHeightNotFound(height: var_height); + case 9: + return EsploraError_HeaderHashNotFound(); + case 10: + var var_name = sse_decode_String(deserializer); + return EsploraError_InvalidHttpHeaderName(name: var_name); + case 11: + var var_value = sse_decode_String(deserializer); + return EsploraError_InvalidHttpHeaderValue(value: var_value); + case 12: + return EsploraError_RequestAlreadyConsumed(); + default: + throw UnimplementedError(''); + } } @protected - double sse_decode_box_autoadd_f_32(SseDeserializer deserializer) { + ExtractTxError sse_decode_extract_tx_error(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)); + var tag_ = sse_decode_i_32(deserializer); + switch (tag_) { + case 0: + var var_feeRate = sse_decode_u_64(deserializer); + return ExtractTxError_AbsurdFeeRate(feeRate: var_feeRate); + case 1: + return ExtractTxError_MissingInputValue(); + case 2: + return ExtractTxError_SendingTooMuch(); + case 3: + return ExtractTxError_OtherExtractTxErr(); + default: + throw UnimplementedError(''); + } } @protected - HexError sse_decode_box_autoadd_hex_error(SseDeserializer deserializer) { + FeeRate sse_decode_fee_rate(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_hex_error(deserializer)); + var var_satKwu = sse_decode_u_64(deserializer); + return FeeRate(satKwu: var_satKwu); } @protected - LocalUtxo sse_decode_box_autoadd_local_utxo(SseDeserializer deserializer) { + FfiAddress sse_decode_ffi_address(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_local_utxo(deserializer)); + var var_field0 = sse_decode_RustOpaque_bdk_corebitcoinAddress(deserializer); + return FfiAddress(field0: var_field0); } @protected - LockTime sse_decode_box_autoadd_lock_time(SseDeserializer deserializer) { + FfiCanonicalTx sse_decode_ffi_canonical_tx(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_lock_time(deserializer)); + var var_transaction = sse_decode_ffi_transaction(deserializer); + var var_chainPosition = sse_decode_chain_position(deserializer); + return FfiCanonicalTx( + transaction: var_transaction, chainPosition: var_chainPosition); } @protected - OutPoint sse_decode_box_autoadd_out_point(SseDeserializer deserializer) { + FfiConnection sse_decode_ffi_connection(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_out_point(deserializer)); + var var_field0 = + sse_decode_RustOpaque_stdsyncMutexbdk_walletrusqliteConnection( + deserializer); + return FfiConnection(field0: var_field0); } @protected - PsbtSigHashType sse_decode_box_autoadd_psbt_sig_hash_type( + FfiDerivationPath sse_decode_ffi_derivation_path( SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_psbt_sig_hash_type(deserializer)); + var var_opaque = sse_decode_RustOpaque_bdk_walletbitcoinbip32DerivationPath( + deserializer); + return FfiDerivationPath(opaque: var_opaque); } @protected - RbfValue sse_decode_box_autoadd_rbf_value(SseDeserializer deserializer) { + FfiDescriptor sse_decode_ffi_descriptor(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_rbf_value(deserializer)); + var var_extendedDescriptor = + sse_decode_RustOpaque_bdk_walletdescriptorExtendedDescriptor( + deserializer); + var var_keyMap = sse_decode_RustOpaque_bdk_walletkeysKeyMap(deserializer); + return FfiDescriptor( + extendedDescriptor: var_extendedDescriptor, keyMap: var_keyMap); } @protected - (OutPoint, Input, BigInt) sse_decode_box_autoadd_record_out_point_input_usize( + FfiDescriptorPublicKey sse_decode_ffi_descriptor_public_key( 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)); + var var_opaque = + sse_decode_RustOpaque_bdk_walletkeysDescriptorPublicKey(deserializer); + return FfiDescriptorPublicKey(opaque: var_opaque); } @protected - RpcSyncParams sse_decode_box_autoadd_rpc_sync_params( + FfiDescriptorSecretKey sse_decode_ffi_descriptor_secret_key( SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_rpc_sync_params(deserializer)); + var var_opaque = + sse_decode_RustOpaque_bdk_walletkeysDescriptorSecretKey(deserializer); + return FfiDescriptorSecretKey(opaque: var_opaque); } @protected - SignOptions sse_decode_box_autoadd_sign_options( + FfiElectrumClient sse_decode_ffi_electrum_client( SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_sign_options(deserializer)); + var var_opaque = + sse_decode_RustOpaque_bdk_electrumBdkElectrumClientbdk_electrumelectrum_clientClient( + deserializer); + return FfiElectrumClient(opaque: var_opaque); } @protected - SledDbConfiguration sse_decode_box_autoadd_sled_db_configuration( - SseDeserializer deserializer) { + FfiEsploraClient sse_decode_ffi_esplora_client(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_sled_db_configuration(deserializer)); + var var_opaque = + sse_decode_RustOpaque_bdk_esploraesplora_clientBlockingClient( + deserializer); + return FfiEsploraClient(opaque: var_opaque); } @protected - SqliteDbConfiguration sse_decode_box_autoadd_sqlite_db_configuration( + FfiFullScanRequest sse_decode_ffi_full_scan_request( 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)); + var var_field0 = + sse_decode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestbdk_walletKeychainKind( + deserializer); + return FfiFullScanRequest(field0: var_field0); } @protected - BigInt sse_decode_box_autoadd_u_64(SseDeserializer deserializer) { + FfiFullScanRequestBuilder sse_decode_ffi_full_scan_request_builder( + SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_u_64(deserializer)); + var var_field0 = + sse_decode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestBuilderbdk_walletKeychainKind( + deserializer); + return FfiFullScanRequestBuilder(field0: var_field0); } @protected - int sse_decode_box_autoadd_u_8(SseDeserializer deserializer) { + FfiMnemonic sse_decode_ffi_mnemonic(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_u_8(deserializer)); + var var_opaque = + sse_decode_RustOpaque_bdk_walletkeysbip39Mnemonic(deserializer); + return FfiMnemonic(opaque: var_opaque); } @protected - ChangeSpendPolicy sse_decode_change_spend_policy( - SseDeserializer deserializer) { + FfiPolicy sse_decode_ffi_policy(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - var inner = sse_decode_i_32(deserializer); - return ChangeSpendPolicy.values[inner]; + var var_opaque = + sse_decode_RustOpaque_bdk_walletdescriptorPolicy(deserializer); + return FfiPolicy(opaque: var_opaque); } @protected - ConsensusError sse_decode_consensus_error(SseDeserializer deserializer) { + FfiPsbt sse_decode_ffi_psbt(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(''); - } + var var_opaque = + sse_decode_RustOpaque_stdsyncMutexbdk_corebitcoinpsbtPsbt(deserializer); + return FfiPsbt(opaque: var_opaque); } @protected - DatabaseConfig sse_decode_database_config(SseDeserializer deserializer) { + FfiScriptBuf sse_decode_ffi_script_buf(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(''); - } + var var_bytes = sse_decode_list_prim_u_8_strict(deserializer); + return FfiScriptBuf(bytes: var_bytes); } @protected - DescriptorError sse_decode_descriptor_error(SseDeserializer deserializer) { + FfiSyncRequest sse_decode_ffi_sync_request(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(''); - } + var var_field0 = + sse_decode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestbdk_walletKeychainKindu32( + deserializer); + return FfiSyncRequest(field0: var_field0); } @protected - ElectrumConfig sse_decode_electrum_config(SseDeserializer deserializer) { + FfiSyncRequestBuilder sse_decode_ffi_sync_request_builder( + 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); + var var_field0 = + sse_decode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestBuilderbdk_walletKeychainKindu32( + deserializer); + return FfiSyncRequestBuilder(field0: var_field0); } @protected - EsploraConfig sse_decode_esplora_config(SseDeserializer deserializer) { + FfiTransaction sse_decode_ffi_transaction(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); + var var_opaque = + sse_decode_RustOpaque_bdk_corebitcoinTransaction(deserializer); + return FfiTransaction(opaque: var_opaque); } @protected - double sse_decode_f_32(SseDeserializer deserializer) { + FfiUpdate sse_decode_ffi_update(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return deserializer.buffer.getFloat32(); + var var_field0 = sse_decode_RustOpaque_bdk_walletUpdate(deserializer); + return FfiUpdate(field0: var_field0); } @protected - FeeRate sse_decode_fee_rate(SseDeserializer deserializer) { + FfiWallet sse_decode_ffi_wallet(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); + var var_opaque = + sse_decode_RustOpaque_stdsyncMutexbdk_walletPersistedWalletbdk_walletrusqliteConnection( + deserializer); + return FfiWallet(opaque: var_opaque); } @protected - HexError sse_decode_hex_error(SseDeserializer deserializer) { + FromScriptError sse_decode_from_script_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); + return FromScriptError_UnrecognizedScript(); case 1: - var var_field0 = sse_decode_usize(deserializer); - return HexError_OddLengthString(var_field0); + var var_errorMessage = sse_decode_String(deserializer); + return FromScriptError_WitnessProgram(errorMessage: var_errorMessage); case 2: - var var_field0 = sse_decode_usize(deserializer); - var var_field1 = sse_decode_usize(deserializer); - return HexError_InvalidLength(var_field0, var_field1); + var var_errorMessage = sse_decode_String(deserializer); + return FromScriptError_WitnessVersion(errorMessage: var_errorMessage); + case 3: + return FromScriptError_OtherFromScriptErr(); default: throw UnimplementedError(''); } @@ -5054,10 +6283,9 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @protected - Input sse_decode_input(SseDeserializer deserializer) { + PlatformInt64 sse_decode_isize(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - var var_s = sse_decode_String(deserializer); - return Input(s: var_s); + return deserializer.buffer.getPlatformInt64(); } @protected @@ -5067,6 +6295,19 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { return KeychainKind.values[inner]; } + @protected + List sse_decode_list_ffi_canonical_tx( + 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_ffi_canonical_tx(deserializer)); + } + return ans_; + } + @protected List sse_decode_list_list_prim_u_8_strict( SseDeserializer deserializer) { @@ -5081,13 +6322,13 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @protected - List sse_decode_list_local_utxo(SseDeserializer deserializer) { + List sse_decode_list_local_output(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs var len_ = sse_decode_i_32(deserializer); - var ans_ = []; + var ans_ = []; for (var idx_ = 0; idx_ < len_; ++idx_) { - ans_.add(sse_decode_local_utxo(deserializer)); + ans_.add(sse_decode_local_output(deserializer)); } return ans_; } @@ -5119,27 +6360,35 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @protected - List sse_decode_list_script_amount( + Uint64List sse_decode_list_prim_usize_strict(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var len_ = sse_decode_i_32(deserializer); + return deserializer.buffer.getUint64List(len_); + } + + @protected + List<(FfiScriptBuf, BigInt)> sse_decode_list_record_ffi_script_buf_u_64( SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs var len_ = sse_decode_i_32(deserializer); - var ans_ = []; + var ans_ = <(FfiScriptBuf, BigInt)>[]; for (var idx_ = 0; idx_ < len_; ++idx_) { - ans_.add(sse_decode_script_amount(deserializer)); + ans_.add(sse_decode_record_ffi_script_buf_u_64(deserializer)); } return ans_; } @protected - List sse_decode_list_transaction_details( - SseDeserializer deserializer) { + List<(String, Uint64List)> + sse_decode_list_record_string_list_prim_usize_strict( + SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs var len_ = sse_decode_i_32(deserializer); - var ans_ = []; + var ans_ = <(String, Uint64List)>[]; for (var idx_ = 0; idx_ < len_; ++idx_) { - ans_.add(sse_decode_transaction_details(deserializer)); + ans_.add(sse_decode_record_string_list_prim_usize_strict(deserializer)); } return ans_; } @@ -5169,13 +6418,34 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @protected - LocalUtxo sse_decode_local_utxo(SseDeserializer deserializer) { + LoadWithPersistError sse_decode_load_with_persist_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_errorMessage = sse_decode_String(deserializer); + return LoadWithPersistError_Persist(errorMessage: var_errorMessage); + case 1: + var var_errorMessage = sse_decode_String(deserializer); + return LoadWithPersistError_InvalidChangeSet( + errorMessage: var_errorMessage); + case 2: + return LoadWithPersistError_CouldNotLoad(); + default: + throw UnimplementedError(''); + } + } + + @protected + LocalOutput sse_decode_local_output(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( + return LocalOutput( outpoint: var_outpoint, txout: var_txout, keychain: var_keychain, @@ -5203,86 +6473,15 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { 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; - } + return Network.values[inner]; } @protected - double? sse_decode_opt_box_autoadd_f_32(SseDeserializer deserializer) { + 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_box_autoadd_f_32(deserializer)); + return (sse_decode_String(deserializer)); } else { return null; } @@ -5300,61 +6499,63 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @protected - PsbtSigHashType? sse_decode_opt_box_autoadd_psbt_sig_hash_type( + FfiCanonicalTx? sse_decode_opt_box_autoadd_ffi_canonical_tx( 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_ffi_canonical_tx(deserializer)); } else { return null; } } @protected - RbfValue? sse_decode_opt_box_autoadd_rbf_value(SseDeserializer deserializer) { + FfiPolicy? sse_decode_opt_box_autoadd_ffi_policy( + 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_ffi_policy(deserializer)); } else { return null; } } @protected - (OutPoint, Input, BigInt)? - sse_decode_opt_box_autoadd_record_out_point_input_usize( - SseDeserializer deserializer) { + FfiScriptBuf? sse_decode_opt_box_autoadd_ffi_script_buf( + 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_ffi_script_buf(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 - SignOptions? sse_decode_opt_box_autoadd_sign_options( + ( + Map, + KeychainKind + )? sse_decode_opt_box_autoadd_record_map_string_list_prim_usize_strict_keychain_kind( 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_record_map_string_list_prim_usize_strict_keychain_kind( + deserializer)); } else { return null; } @@ -5382,17 +6583,6 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } } - @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 @@ -5402,32 +6592,112 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @protected - Payload sse_decode_payload(SseDeserializer deserializer) { + PsbtError sse_decode_psbt_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_pubkeyHash = sse_decode_String(deserializer); - return Payload_PubkeyHash(pubkeyHash: var_pubkeyHash); + return PsbtError_InvalidMagic(); case 1: - var var_scriptHash = sse_decode_String(deserializer); - return Payload_ScriptHash(scriptHash: var_scriptHash); + return PsbtError_MissingUtxo(); 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); + return PsbtError_InvalidSeparator(); + case 3: + return PsbtError_PsbtUtxoOutOfBounds(); + case 4: + var var_key = sse_decode_String(deserializer); + return PsbtError_InvalidKey(key: var_key); + case 5: + return PsbtError_InvalidProprietaryKey(); + case 6: + var var_key = sse_decode_String(deserializer); + return PsbtError_DuplicateKey(key: var_key); + case 7: + return PsbtError_UnsignedTxHasScriptSigs(); + case 8: + return PsbtError_UnsignedTxHasScriptWitnesses(); + case 9: + return PsbtError_MustHaveUnsignedTx(); + case 10: + return PsbtError_NoMorePairs(); + case 11: + return PsbtError_UnexpectedUnsignedTx(); + case 12: + var var_sighash = sse_decode_u_32(deserializer); + return PsbtError_NonStandardSighashType(sighash: var_sighash); + case 13: + var var_hash = sse_decode_String(deserializer); + return PsbtError_InvalidHash(hash: var_hash); + case 14: + return PsbtError_InvalidPreimageHashPair(); + case 15: + var var_xpub = sse_decode_String(deserializer); + return PsbtError_CombineInconsistentKeySources(xpub: var_xpub); + case 16: + var var_encodingError = sse_decode_String(deserializer); + return PsbtError_ConsensusEncoding(encodingError: var_encodingError); + case 17: + return PsbtError_NegativeFee(); + case 18: + return PsbtError_FeeOverflow(); + case 19: + var var_errorMessage = sse_decode_String(deserializer); + return PsbtError_InvalidPublicKey(errorMessage: var_errorMessage); + case 20: + var var_secp256K1Error = sse_decode_String(deserializer); + return PsbtError_InvalidSecp256k1PublicKey( + secp256K1Error: var_secp256K1Error); + case 21: + return PsbtError_InvalidXOnlyPublicKey(); + case 22: + var var_errorMessage = sse_decode_String(deserializer); + return PsbtError_InvalidEcdsaSignature(errorMessage: var_errorMessage); + case 23: + var var_errorMessage = sse_decode_String(deserializer); + return PsbtError_InvalidTaprootSignature( + errorMessage: var_errorMessage); + case 24: + return PsbtError_InvalidControlBlock(); + case 25: + return PsbtError_InvalidLeafVersion(); + case 26: + return PsbtError_Taproot(); + case 27: + var var_errorMessage = sse_decode_String(deserializer); + return PsbtError_TapTree(errorMessage: var_errorMessage); + case 28: + return PsbtError_XPubKey(); + case 29: + var var_errorMessage = sse_decode_String(deserializer); + return PsbtError_Version(errorMessage: var_errorMessage); + case 30: + return PsbtError_PartialDataConsumption(); + case 31: + var var_errorMessage = sse_decode_String(deserializer); + return PsbtError_Io(errorMessage: var_errorMessage); + case 32: + return PsbtError_OtherPsbtErr(); default: throw UnimplementedError(''); } } @protected - PsbtSigHashType sse_decode_psbt_sig_hash_type(SseDeserializer deserializer) { + PsbtParseError sse_decode_psbt_parse_error(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); + + var tag_ = sse_decode_i_32(deserializer); + switch (tag_) { + case 0: + var var_errorMessage = sse_decode_String(deserializer); + return PsbtParseError_PsbtEncoding(errorMessage: var_errorMessage); + case 1: + var var_errorMessage = sse_decode_String(deserializer); + return PsbtParseError_Base64Encoding(errorMessage: var_errorMessage); + default: + throw UnimplementedError(''); + } } @protected @@ -5447,70 +6717,39 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @protected - (BdkAddress, int) sse_decode_record_bdk_address_u_32( + (FfiScriptBuf, BigInt) sse_decode_record_ffi_script_buf_u_64( 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); + var var_field0 = sse_decode_ffi_script_buf(deserializer); + var var_field1 = sse_decode_u_64(deserializer); return (var_field0, var_field1); } @protected - (BdkPsbt, TransactionDetails) sse_decode_record_bdk_psbt_transaction_details( - SseDeserializer deserializer) { + (Map, KeychainKind) + sse_decode_record_map_string_list_prim_usize_strict_keychain_kind( + 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); + var var_field0 = sse_decode_Map_String_list_prim_usize_strict(deserializer); + var var_field1 = sse_decode_keychain_kind(deserializer); return (var_field0, var_field1); } @protected - (OutPoint, Input, BigInt) sse_decode_record_out_point_input_usize( + (String, Uint64List) sse_decode_record_string_list_prim_usize_strict( 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); + var var_field0 = sse_decode_String(deserializer); + var var_field1 = sse_decode_list_prim_usize_strict(deserializer); + return (var_field0, var_field1); } @protected - ScriptAmount sse_decode_script_amount(SseDeserializer deserializer) { + RequestBuilderError sse_decode_request_builder_error( + 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); + var inner = sse_decode_i_32(deserializer); + return RequestBuilderError.values[inner]; } @protected @@ -5519,7 +6758,6 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { 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); @@ -5527,55 +6765,128 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { 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) { + SignerError sse_decode_signer_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 SignerError_MissingKey(); + case 1: + return SignerError_InvalidKey(); + case 2: + return SignerError_UserCanceled(); + case 3: + return SignerError_InputIndexOutOfRange(); + case 4: + return SignerError_MissingNonWitnessUtxo(); + case 5: + return SignerError_InvalidNonWitnessUtxo(); + case 6: + return SignerError_MissingWitnessUtxo(); + case 7: + return SignerError_MissingWitnessScript(); + case 8: + return SignerError_MissingHdKeypath(); + case 9: + return SignerError_NonStandardSighash(); + case 10: + return SignerError_InvalidSighash(); + case 11: + var var_errorMessage = sse_decode_String(deserializer); + return SignerError_SighashP2wpkh(errorMessage: var_errorMessage); + case 12: + var var_errorMessage = sse_decode_String(deserializer); + return SignerError_SighashTaproot(errorMessage: var_errorMessage); + case 13: + var var_errorMessage = sse_decode_String(deserializer); + return SignerError_TxInputsIndexError(errorMessage: var_errorMessage); + case 14: + var var_errorMessage = sse_decode_String(deserializer); + return SignerError_MiniscriptPsbt(errorMessage: var_errorMessage); + case 15: + var var_errorMessage = sse_decode_String(deserializer); + return SignerError_External(errorMessage: var_errorMessage); + case 16: + var var_errorMessage = sse_decode_String(deserializer); + return SignerError_Psbt(errorMessage: var_errorMessage); + default: + throw UnimplementedError(''); + } + } + + @protected + SqliteError sse_decode_sqlite_error(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); + + var tag_ = sse_decode_i_32(deserializer); + switch (tag_) { + case 0: + var var_rusqliteError = sse_decode_String(deserializer); + return SqliteError_Sqlite(rusqliteError: var_rusqliteError); + default: + throw UnimplementedError(''); + } } @protected - SqliteDbConfiguration sse_decode_sqlite_db_configuration( - SseDeserializer deserializer) { + SyncProgress sse_decode_sync_progress(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - var var_path = sse_decode_String(deserializer); - return SqliteDbConfiguration(path: var_path); + var var_spksConsumed = sse_decode_u_64(deserializer); + var var_spksRemaining = sse_decode_u_64(deserializer); + var var_txidsConsumed = sse_decode_u_64(deserializer); + var var_txidsRemaining = sse_decode_u_64(deserializer); + var var_outpointsConsumed = sse_decode_u_64(deserializer); + var var_outpointsRemaining = sse_decode_u_64(deserializer); + return SyncProgress( + spksConsumed: var_spksConsumed, + spksRemaining: var_spksRemaining, + txidsConsumed: var_txidsConsumed, + txidsRemaining: var_txidsRemaining, + outpointsConsumed: var_outpointsConsumed, + outpointsRemaining: var_outpointsRemaining); } @protected - TransactionDetails sse_decode_transaction_details( - SseDeserializer deserializer) { + TransactionError sse_decode_transaction_error(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); + + var tag_ = sse_decode_i_32(deserializer); + switch (tag_) { + case 0: + return TransactionError_Io(); + case 1: + return TransactionError_OversizedVectorAllocation(); + case 2: + var var_expected = sse_decode_String(deserializer); + var var_actual = sse_decode_String(deserializer); + return TransactionError_InvalidChecksum( + expected: var_expected, actual: var_actual); + case 3: + return TransactionError_NonMinimalVarInt(); + case 4: + return TransactionError_ParseFailed(); + case 5: + var var_flag = sse_decode_u_8(deserializer); + return TransactionError_UnsupportedSegwitFlag(flag: var_flag); + case 6: + return TransactionError_OtherTransactionErr(); + default: + throw UnimplementedError(''); + } } @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_scriptSig = sse_decode_ffi_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( @@ -5589,10 +6900,30 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { 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); + var var_scriptPubkey = sse_decode_ffi_script_buf(deserializer); return TxOut(value: var_value, scriptPubkey: var_scriptPubkey); } + @protected + TxidParseError sse_decode_txid_parse_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_txid = sse_decode_String(deserializer); + return TxidParseError_InvalidTxid(txid: var_txid); + default: + throw UnimplementedError(''); + } + } + + @protected + int sse_decode_u_16(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return deserializer.buffer.getUint16(); + } + @protected int sse_decode_u_32(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -5611,13 +6942,6 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { 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 @@ -5630,49 +6954,86 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @protected - Variant sse_decode_variant(SseDeserializer deserializer) { + 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 Variant.values[inner]; + return WordCount.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]; + PlatformPointer + cst_encode_DartFn_Inputs_ffi_script_buf_sync_progress_Output_unit_AnyhowException( + FutureOr Function(FfiScriptBuf, SyncProgress) raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_DartOpaque( + encode_DartFn_Inputs_ffi_script_buf_sync_progress_Output_unit_AnyhowException( + raw)); } @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]; + PlatformPointer + cst_encode_DartFn_Inputs_keychain_kind_u_32_ffi_script_buf_Output_unit_AnyhowException( + FutureOr Function(KeychainKind, int, FfiScriptBuf) raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_DartOpaque( + encode_DartFn_Inputs_keychain_kind_u_32_ffi_script_buf_Output_unit_AnyhowException( + raw)); + } + + @protected + PlatformPointer cst_encode_DartOpaque(Object raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return encodeDartOpaque( + raw, portManager.dartHandlerPort, generalizedFrbRustBinding); } @protected - int cst_encode_RustOpaque_bdkbitcoinAddress(Address raw) { + int cst_encode_RustOpaque_bdk_corebitcoinAddress(Address raw) { // Codec=Cst (C-struct based), see doc to use other codecs // ignore: invalid_use_of_internal_member return (raw as AddressImpl).frbInternalCstEncode(); } @protected - int cst_encode_RustOpaque_bdkbitcoinbip32DerivationPath(DerivationPath raw) { + int cst_encode_RustOpaque_bdk_corebitcoinTransaction(Transaction raw) { // Codec=Cst (C-struct based), see doc to use other codecs // ignore: invalid_use_of_internal_member - return (raw as DerivationPathImpl).frbInternalCstEncode(); + return (raw as TransactionImpl).frbInternalCstEncode(); } @protected - int cst_encode_RustOpaque_bdkblockchainAnyBlockchain(AnyBlockchain raw) { + int cst_encode_RustOpaque_bdk_electrumBdkElectrumClientbdk_electrumelectrum_clientClient( + BdkElectrumClientClient raw) { // Codec=Cst (C-struct based), see doc to use other codecs // ignore: invalid_use_of_internal_member - return (raw as AnyBlockchainImpl).frbInternalCstEncode(); + return (raw as BdkElectrumClientClientImpl).frbInternalCstEncode(); } @protected - int cst_encode_RustOpaque_bdkdescriptorExtendedDescriptor( + int cst_encode_RustOpaque_bdk_esploraesplora_clientBlockingClient( + BlockingClient raw) { + // Codec=Cst (C-struct based), see doc to use other codecs +// ignore: invalid_use_of_internal_member + return (raw as BlockingClientImpl).frbInternalCstEncode(); + } + + @protected + int cst_encode_RustOpaque_bdk_walletUpdate(Update raw) { + // Codec=Cst (C-struct based), see doc to use other codecs +// ignore: invalid_use_of_internal_member + return (raw as UpdateImpl).frbInternalCstEncode(); + } + + @protected + int cst_encode_RustOpaque_bdk_walletbitcoinbip32DerivationPath( + DerivationPath raw) { + // Codec=Cst (C-struct based), see doc to use other codecs +// ignore: invalid_use_of_internal_member + return (raw as DerivationPathImpl).frbInternalCstEncode(); + } + + @protected + int cst_encode_RustOpaque_bdk_walletdescriptorExtendedDescriptor( ExtendedDescriptor raw) { // Codec=Cst (C-struct based), see doc to use other codecs // ignore: invalid_use_of_internal_member @@ -5680,7 +7041,14 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @protected - int cst_encode_RustOpaque_bdkkeysDescriptorPublicKey( + int cst_encode_RustOpaque_bdk_walletdescriptorPolicy(Policy raw) { + // Codec=Cst (C-struct based), see doc to use other codecs +// ignore: invalid_use_of_internal_member + return (raw as PolicyImpl).frbInternalCstEncode(); + } + + @protected + int cst_encode_RustOpaque_bdk_walletkeysDescriptorPublicKey( DescriptorPublicKey raw) { // Codec=Cst (C-struct based), see doc to use other codecs // ignore: invalid_use_of_internal_member @@ -5688,7 +7056,7 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @protected - int cst_encode_RustOpaque_bdkkeysDescriptorSecretKey( + int cst_encode_RustOpaque_bdk_walletkeysDescriptorSecretKey( DescriptorSecretKey raw) { // Codec=Cst (C-struct based), see doc to use other codecs // ignore: invalid_use_of_internal_member @@ -5696,53 +7064,90 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @protected - int cst_encode_RustOpaque_bdkkeysKeyMap(KeyMap raw) { + int cst_encode_RustOpaque_bdk_walletkeysKeyMap(KeyMap raw) { // Codec=Cst (C-struct based), see doc to use other codecs // ignore: invalid_use_of_internal_member return (raw as KeyMapImpl).frbInternalCstEncode(); } @protected - int cst_encode_RustOpaque_bdkkeysbip39Mnemonic(Mnemonic raw) { + int cst_encode_RustOpaque_bdk_walletkeysbip39Mnemonic(Mnemonic raw) { // Codec=Cst (C-struct based), see doc to use other codecs // ignore: invalid_use_of_internal_member return (raw as MnemonicImpl).frbInternalCstEncode(); } @protected - int cst_encode_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( - MutexWalletAnyDatabase raw) { + int cst_encode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestBuilderbdk_walletKeychainKind( + MutexOptionFullScanRequestBuilderKeychainKind raw) { // Codec=Cst (C-struct based), see doc to use other codecs // ignore: invalid_use_of_internal_member - return (raw as MutexWalletAnyDatabaseImpl).frbInternalCstEncode(); + return (raw as MutexOptionFullScanRequestBuilderKeychainKindImpl) + .frbInternalCstEncode(); } @protected - int cst_encode_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( - MutexPartiallySignedTransaction raw) { + int cst_encode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestbdk_walletKeychainKind( + MutexOptionFullScanRequestKeychainKind raw) { // Codec=Cst (C-struct based), see doc to use other codecs // ignore: invalid_use_of_internal_member - return (raw as MutexPartiallySignedTransactionImpl).frbInternalCstEncode(); + return (raw as MutexOptionFullScanRequestKeychainKindImpl) + .frbInternalCstEncode(); } @protected - bool cst_encode_bool(bool raw) { + int cst_encode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestBuilderbdk_walletKeychainKindu32( + MutexOptionSyncRequestBuilderKeychainKindU32 raw) { // Codec=Cst (C-struct based), see doc to use other codecs - return raw; +// ignore: invalid_use_of_internal_member + return (raw as MutexOptionSyncRequestBuilderKeychainKindU32Impl) + .frbInternalCstEncode(); } @protected - int cst_encode_change_spend_policy(ChangeSpendPolicy raw) { + int cst_encode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestbdk_walletKeychainKindu32( + MutexOptionSyncRequestKeychainKindU32 raw) { // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_i_32(raw.index); +// ignore: invalid_use_of_internal_member + return (raw as MutexOptionSyncRequestKeychainKindU32Impl) + .frbInternalCstEncode(); + } + + @protected + int cst_encode_RustOpaque_stdsyncMutexbdk_corebitcoinpsbtPsbt(MutexPsbt raw) { + // Codec=Cst (C-struct based), see doc to use other codecs +// ignore: invalid_use_of_internal_member + return (raw as MutexPsbtImpl).frbInternalCstEncode(); } @protected - double cst_encode_f_32(double raw) { + int cst_encode_RustOpaque_stdsyncMutexbdk_walletPersistedWalletbdk_walletrusqliteConnection( + MutexPersistedWalletConnection raw) { + // Codec=Cst (C-struct based), see doc to use other codecs +// ignore: invalid_use_of_internal_member + return (raw as MutexPersistedWalletConnectionImpl).frbInternalCstEncode(); + } + + @protected + int cst_encode_RustOpaque_stdsyncMutexbdk_walletrusqliteConnection( + MutexConnection raw) { + // Codec=Cst (C-struct based), see doc to use other codecs +// ignore: invalid_use_of_internal_member + return (raw as MutexConnectionImpl).frbInternalCstEncode(); + } + + @protected + bool cst_encode_bool(bool raw) { // Codec=Cst (C-struct based), see doc to use other codecs return raw; } + @protected + int cst_encode_change_spend_policy(ChangeSpendPolicy raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_i_32(raw.index); + } + @protected int cst_encode_i_32(int raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -5761,6 +7166,18 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { return cst_encode_i_32(raw.index); } + @protected + int cst_encode_request_builder_error(RequestBuilderError raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_i_32(raw.index); + } + + @protected + int cst_encode_u_16(int raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw; + } + @protected int cst_encode_u_32(int raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -5768,45 +7185,116 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @protected - int cst_encode_u_8(int raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw; + 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_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_AnyhowException( + AnyhowException self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.message, serializer); + } + + @protected + void + sse_encode_DartFn_Inputs_ffi_script_buf_sync_progress_Output_unit_AnyhowException( + FutureOr Function(FfiScriptBuf, SyncProgress) self, + SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_DartOpaque( + encode_DartFn_Inputs_ffi_script_buf_sync_progress_Output_unit_AnyhowException( + self), + serializer); + } + + @protected + void + sse_encode_DartFn_Inputs_keychain_kind_u_32_ffi_script_buf_Output_unit_AnyhowException( + FutureOr Function(KeychainKind, int, FfiScriptBuf) self, + SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_DartOpaque( + encode_DartFn_Inputs_keychain_kind_u_32_ffi_script_buf_Output_unit_AnyhowException( + self), + serializer); + } + + @protected + void sse_encode_DartOpaque(Object self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_isize( + PlatformPointerUtil.ptrToPlatformInt64(encodeDartOpaque( + self, portManager.dartHandlerPort, generalizedFrbRustBinding)), + serializer); + } + + @protected + void sse_encode_Map_String_list_prim_usize_strict( + Map self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_list_record_string_list_prim_usize_strict( + self.entries.map((e) => (e.key, e.value)).toList(), serializer); } @protected - void cst_encode_unit(void raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw; + void sse_encode_RustOpaque_bdk_corebitcoinAddress( + Address self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as AddressImpl).frbInternalSseEncode(move: null), serializer); } @protected - int cst_encode_variant(Variant raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return cst_encode_i_32(raw.index); + void sse_encode_RustOpaque_bdk_corebitcoinTransaction( + Transaction self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as TransactionImpl).frbInternalSseEncode(move: null), serializer); } @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); + void + sse_encode_RustOpaque_bdk_electrumBdkElectrumClientbdk_electrumelectrum_clientClient( + BdkElectrumClientClient self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as BdkElectrumClientClientImpl).frbInternalSseEncode(move: null), + serializer); } @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); + void sse_encode_RustOpaque_bdk_esploraesplora_clientBlockingClient( + BlockingClient self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as BlockingClientImpl).frbInternalSseEncode(move: null), + serializer); } @protected - void sse_encode_RustOpaque_bdkbitcoinAddress( - Address self, SseSerializer serializer) { + void sse_encode_RustOpaque_bdk_walletUpdate( + Update self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_usize( - (self as AddressImpl).frbInternalSseEncode(move: null), serializer); + (self as UpdateImpl).frbInternalSseEncode(move: null), serializer); } @protected - void sse_encode_RustOpaque_bdkbitcoinbip32DerivationPath( + void sse_encode_RustOpaque_bdk_walletbitcoinbip32DerivationPath( DerivationPath self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_usize( @@ -5815,25 +7303,24 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @protected - void sse_encode_RustOpaque_bdkblockchainAnyBlockchain( - AnyBlockchain self, SseSerializer serializer) { + void sse_encode_RustOpaque_bdk_walletdescriptorExtendedDescriptor( + ExtendedDescriptor self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_usize( - (self as AnyBlockchainImpl).frbInternalSseEncode(move: null), + (self as ExtendedDescriptorImpl).frbInternalSseEncode(move: null), serializer); } @protected - void sse_encode_RustOpaque_bdkdescriptorExtendedDescriptor( - ExtendedDescriptor self, SseSerializer serializer) { + void sse_encode_RustOpaque_bdk_walletdescriptorPolicy( + Policy self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_usize( - (self as ExtendedDescriptorImpl).frbInternalSseEncode(move: null), - serializer); + (self as PolicyImpl).frbInternalSseEncode(move: null), serializer); } @protected - void sse_encode_RustOpaque_bdkkeysDescriptorPublicKey( + void sse_encode_RustOpaque_bdk_walletkeysDescriptorPublicKey( DescriptorPublicKey self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_usize( @@ -5842,7 +7329,7 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @protected - void sse_encode_RustOpaque_bdkkeysDescriptorSecretKey( + void sse_encode_RustOpaque_bdk_walletkeysDescriptorSecretKey( DescriptorSecretKey self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_usize( @@ -5851,7 +7338,7 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @protected - void sse_encode_RustOpaque_bdkkeysKeyMap( + void sse_encode_RustOpaque_bdk_walletkeysKeyMap( KeyMap self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_usize( @@ -5859,7 +7346,7 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @protected - void sse_encode_RustOpaque_bdkkeysbip39Mnemonic( + void sse_encode_RustOpaque_bdk_walletkeysbip39Mnemonic( Mnemonic self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_usize( @@ -5867,25 +7354,81 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @protected - void sse_encode_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( - MutexWalletAnyDatabase self, SseSerializer serializer) { + void + sse_encode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestBuilderbdk_walletKeychainKind( + MutexOptionFullScanRequestBuilderKeychainKind self, + SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as MutexOptionFullScanRequestBuilderKeychainKindImpl) + .frbInternalSseEncode(move: null), + serializer); + } + + @protected + void + sse_encode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestbdk_walletKeychainKind( + MutexOptionFullScanRequestKeychainKind self, + SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as MutexOptionFullScanRequestKeychainKindImpl) + .frbInternalSseEncode(move: null), + serializer); + } + + @protected + void + sse_encode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestBuilderbdk_walletKeychainKindu32( + MutexOptionSyncRequestBuilderKeychainKindU32 self, + SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as MutexOptionSyncRequestBuilderKeychainKindU32Impl) + .frbInternalSseEncode(move: null), + serializer); + } + + @protected + void + sse_encode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestbdk_walletKeychainKindu32( + MutexOptionSyncRequestKeychainKindU32 self, + SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_usize( - (self as MutexWalletAnyDatabaseImpl).frbInternalSseEncode(move: null), + (self as MutexOptionSyncRequestKeychainKindU32Impl) + .frbInternalSseEncode(move: null), serializer); } + @protected + void sse_encode_RustOpaque_stdsyncMutexbdk_corebitcoinpsbtPsbt( + MutexPsbt self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as MutexPsbtImpl).frbInternalSseEncode(move: null), serializer); + } + @protected void - sse_encode_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( - MutexPartiallySignedTransaction self, SseSerializer serializer) { + sse_encode_RustOpaque_stdsyncMutexbdk_walletPersistedWalletbdk_walletrusqliteConnection( + MutexPersistedWalletConnection self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_usize( - (self as MutexPartiallySignedTransactionImpl) + (self as MutexPersistedWalletConnectionImpl) .frbInternalSseEncode(move: null), serializer); } + @protected + void sse_encode_RustOpaque_stdsyncMutexbdk_walletrusqliteConnection( + MutexConnection self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize( + (self as MutexConnectionImpl).frbInternalSseEncode(move: null), + serializer); + } + @protected void sse_encode_String(String self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -5893,769 +7436,861 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @protected - void sse_encode_address_error(AddressError self, SseSerializer serializer) { + 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_ffi_address(self.address, serializer); + sse_encode_keychain_kind(self.keychain, serializer); + } + + @protected + void sse_encode_address_parse_error( + AddressParseError self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs switch (self) { - case AddressError_Base58(field0: final field0): + case AddressParseError_Base58(): sse_encode_i_32(0, serializer); - sse_encode_String(field0, serializer); - case AddressError_Bech32(field0: final field0): + case AddressParseError_Bech32(): sse_encode_i_32(1, serializer); - sse_encode_String(field0, serializer); - case AddressError_EmptyBech32Payload(): + case AddressParseError_WitnessVersion(errorMessage: final errorMessage): sse_encode_i_32(2, serializer); - case AddressError_InvalidBech32Variant( - expected: final expected, - found: final found - ): + sse_encode_String(errorMessage, serializer); + case AddressParseError_WitnessProgram(errorMessage: final errorMessage): sse_encode_i_32(3, serializer); - sse_encode_variant(expected, serializer); - sse_encode_variant(found, serializer); - case AddressError_InvalidWitnessVersion(field0: final field0): + sse_encode_String(errorMessage, serializer); + case AddressParseError_UnknownHrp(): sse_encode_i_32(4, serializer); - sse_encode_u_8(field0, serializer); - case AddressError_UnparsableWitnessVersion(field0: final field0): + case AddressParseError_LegacyAddressTooLong(): sse_encode_i_32(5, serializer); - sse_encode_String(field0, serializer); - case AddressError_MalformedWitnessVersion(): + case AddressParseError_InvalidBase58PayloadLength(): sse_encode_i_32(6, serializer); - case AddressError_InvalidWitnessProgramLength(field0: final field0): + case AddressParseError_InvalidLegacyPrefix(): sse_encode_i_32(7, serializer); - sse_encode_usize(field0, serializer); - case AddressError_InvalidSegwitV0ProgramLength(field0: final field0): + case AddressParseError_NetworkValidation(): sse_encode_i_32(8, serializer); - sse_encode_usize(field0, serializer); - case AddressError_UncompressedPubkey(): + case AddressParseError_OtherAddressParseErr(): sse_encode_i_32(9, serializer); - case AddressError_ExcessiveScriptSize(): - sse_encode_i_32(10, serializer); - case AddressError_UnrecognizedScript(): - sse_encode_i_32(11, serializer); - case AddressError_UnknownAddressType(field0: final field0): - sse_encode_i_32(12, serializer); - sse_encode_String(field0, serializer); - case AddressError_NetworkValidation( - networkRequired: final networkRequired, - networkFound: final networkFound, - address: final address - ): - sse_encode_i_32(13, serializer); - sse_encode_network(networkRequired, serializer); - sse_encode_network(networkFound, serializer); - sse_encode_String(address, serializer); default: throw UnimplementedError(''); } } @protected - void sse_encode_address_index(AddressIndex self, SseSerializer serializer) { + 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_bip_32_error(Bip32Error self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs switch (self) { - case AddressIndex_Increase(): + case Bip32Error_CannotDeriveFromHardenedKey(): sse_encode_i_32(0, serializer); - case AddressIndex_LastUnused(): + case Bip32Error_Secp256k1(errorMessage: final errorMessage): sse_encode_i_32(1, serializer); - case AddressIndex_Peek(index: final index): + sse_encode_String(errorMessage, serializer); + case Bip32Error_InvalidChildNumber(childNumber: final childNumber): sse_encode_i_32(2, serializer); - sse_encode_u_32(index, serializer); - case AddressIndex_Reset(index: final index): + sse_encode_u_32(childNumber, serializer); + case Bip32Error_InvalidChildNumberFormat(): sse_encode_i_32(3, serializer); - sse_encode_u_32(index, serializer); + case Bip32Error_InvalidDerivationPathFormat(): + sse_encode_i_32(4, serializer); + case Bip32Error_UnknownVersion(version: final version): + sse_encode_i_32(5, serializer); + sse_encode_String(version, serializer); + case Bip32Error_WrongExtendedKeyLength(length: final length): + sse_encode_i_32(6, serializer); + sse_encode_u_32(length, serializer); + case Bip32Error_Base58(errorMessage: final errorMessage): + sse_encode_i_32(7, serializer); + sse_encode_String(errorMessage, serializer); + case Bip32Error_Hex(errorMessage: final errorMessage): + sse_encode_i_32(8, serializer); + sse_encode_String(errorMessage, serializer); + case Bip32Error_InvalidPublicKeyHexLength(length: final length): + sse_encode_i_32(9, serializer); + sse_encode_u_32(length, serializer); + case Bip32Error_UnknownError(errorMessage: final errorMessage): + sse_encode_i_32(10, serializer); + sse_encode_String(errorMessage, serializer); default: throw UnimplementedError(''); } } @protected - void sse_encode_auth(Auth self, SseSerializer serializer) { + void sse_encode_bip_39_error(Bip39Error self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs switch (self) { - case Auth_None(): + case Bip39Error_BadWordCount(wordCount: final wordCount): sse_encode_i_32(0, serializer); - case Auth_UserPass(username: final username, password: final password): + sse_encode_u_64(wordCount, serializer); + case Bip39Error_UnknownWord(index: final index): sse_encode_i_32(1, serializer); - sse_encode_String(username, serializer); - sse_encode_String(password, serializer); - case Auth_Cookie(file: final file): + sse_encode_u_64(index, serializer); + case Bip39Error_BadEntropyBitCount(bitCount: final bitCount): sse_encode_i_32(2, serializer); - sse_encode_String(file, serializer); + sse_encode_u_64(bitCount, serializer); + case Bip39Error_InvalidChecksum(): + sse_encode_i_32(3, serializer); + case Bip39Error_AmbiguousLanguages(languages: final languages): + sse_encode_i_32(4, serializer); + sse_encode_String(languages, serializer); + case Bip39Error_Generic(errorMessage: final errorMessage): + sse_encode_i_32(5, serializer); + sse_encode_String(errorMessage, serializer); default: throw UnimplementedError(''); } } @protected - void sse_encode_balance(Balance self, SseSerializer serializer) { + void sse_encode_block_id(BlockId 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); + sse_encode_u_32(self.height, serializer); + sse_encode_String(self.hash, serializer); } @protected - void sse_encode_bdk_address(BdkAddress self, SseSerializer serializer) { + void sse_encode_bool(bool self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_RustOpaque_bdkbitcoinAddress(self.ptr, serializer); + serializer.buffer.putUint8(self ? 1 : 0); } @protected - void sse_encode_bdk_blockchain(BdkBlockchain self, SseSerializer serializer) { + void sse_encode_box_autoadd_confirmation_block_time( + ConfirmationBlockTime self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_RustOpaque_bdkblockchainAnyBlockchain(self.ptr, serializer); + sse_encode_confirmation_block_time(self, serializer); } @protected - void sse_encode_bdk_derivation_path( - BdkDerivationPath self, SseSerializer serializer) { + void sse_encode_box_autoadd_fee_rate(FeeRate self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_RustOpaque_bdkbitcoinbip32DerivationPath(self.ptr, serializer); + sse_encode_fee_rate(self, serializer); } @protected - void sse_encode_bdk_descriptor(BdkDescriptor self, SseSerializer serializer) { + void sse_encode_box_autoadd_ffi_address( + FfiAddress self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_RustOpaque_bdkdescriptorExtendedDescriptor( - self.extendedDescriptor, serializer); - sse_encode_RustOpaque_bdkkeysKeyMap(self.keyMap, serializer); + sse_encode_ffi_address(self, serializer); } @protected - void sse_encode_bdk_descriptor_public_key( - BdkDescriptorPublicKey self, SseSerializer serializer) { + void sse_encode_box_autoadd_ffi_canonical_tx( + FfiCanonicalTx self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_RustOpaque_bdkkeysDescriptorPublicKey(self.ptr, serializer); + sse_encode_ffi_canonical_tx(self, serializer); } @protected - void sse_encode_bdk_descriptor_secret_key( - BdkDescriptorSecretKey self, SseSerializer serializer) { + void sse_encode_box_autoadd_ffi_connection( + FfiConnection self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_RustOpaque_bdkkeysDescriptorSecretKey(self.ptr, serializer); + sse_encode_ffi_connection(self, serializer); } @protected - void sse_encode_bdk_error(BdkError self, SseSerializer serializer) { + void sse_encode_box_autoadd_ffi_derivation_path( + FfiDerivationPath self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - switch (self) { - case BdkError_Hex(field0: final field0): - sse_encode_i_32(0, serializer); - sse_encode_box_autoadd_hex_error(field0, serializer); - case BdkError_Consensus(field0: final field0): - sse_encode_i_32(1, serializer); - sse_encode_box_autoadd_consensus_error(field0, serializer); - case BdkError_VerifyTransaction(field0: final field0): - sse_encode_i_32(2, serializer); - sse_encode_String(field0, serializer); - case BdkError_Address(field0: final field0): - sse_encode_i_32(3, serializer); - sse_encode_box_autoadd_address_error(field0, serializer); - case BdkError_Descriptor(field0: final field0): - sse_encode_i_32(4, serializer); - sse_encode_box_autoadd_descriptor_error(field0, serializer); - case BdkError_InvalidU32Bytes(field0: final field0): - sse_encode_i_32(5, serializer); - sse_encode_list_prim_u_8_strict(field0, serializer); - case BdkError_Generic(field0: final field0): - sse_encode_i_32(6, serializer); - sse_encode_String(field0, serializer); - case BdkError_ScriptDoesntHaveAddressForm(): - sse_encode_i_32(7, serializer); - case BdkError_NoRecipients(): - sse_encode_i_32(8, serializer); - case BdkError_NoUtxosSelected(): - sse_encode_i_32(9, serializer); - case BdkError_OutputBelowDustLimit(field0: final field0): - sse_encode_i_32(10, serializer); - sse_encode_usize(field0, serializer); - case BdkError_InsufficientFunds( - needed: final needed, - available: final available - ): - sse_encode_i_32(11, serializer); - sse_encode_u_64(needed, serializer); - sse_encode_u_64(available, serializer); - case BdkError_BnBTotalTriesExceeded(): - sse_encode_i_32(12, serializer); - case BdkError_BnBNoExactMatch(): - sse_encode_i_32(13, serializer); - case BdkError_UnknownUtxo(): - sse_encode_i_32(14, serializer); - case BdkError_TransactionNotFound(): - sse_encode_i_32(15, serializer); - case BdkError_TransactionConfirmed(): - sse_encode_i_32(16, serializer); - case BdkError_IrreplaceableTransaction(): - sse_encode_i_32(17, serializer); - case BdkError_FeeRateTooLow(needed: final needed): - sse_encode_i_32(18, serializer); - sse_encode_f_32(needed, serializer); - case BdkError_FeeTooLow(needed: final needed): - sse_encode_i_32(19, serializer); - sse_encode_u_64(needed, serializer); - case BdkError_FeeRateUnavailable(): - sse_encode_i_32(20, serializer); - case BdkError_MissingKeyOrigin(field0: final field0): - sse_encode_i_32(21, serializer); - sse_encode_String(field0, serializer); - case BdkError_Key(field0: final field0): - sse_encode_i_32(22, serializer); - sse_encode_String(field0, serializer); - case BdkError_ChecksumMismatch(): - sse_encode_i_32(23, serializer); - case BdkError_SpendingPolicyRequired(field0: final field0): - sse_encode_i_32(24, serializer); - sse_encode_keychain_kind(field0, serializer); - case BdkError_InvalidPolicyPathError(field0: final field0): - sse_encode_i_32(25, serializer); - sse_encode_String(field0, serializer); - case BdkError_Signer(field0: final field0): - sse_encode_i_32(26, serializer); - sse_encode_String(field0, serializer); - case BdkError_InvalidNetwork( - requested: final requested, - found: final found - ): - sse_encode_i_32(27, serializer); - sse_encode_network(requested, serializer); - sse_encode_network(found, serializer); - case BdkError_InvalidOutpoint(field0: final field0): - sse_encode_i_32(28, serializer); - sse_encode_box_autoadd_out_point(field0, serializer); - case BdkError_Encode(field0: final field0): - sse_encode_i_32(29, serializer); - sse_encode_String(field0, serializer); - case BdkError_Miniscript(field0: final field0): - sse_encode_i_32(30, serializer); - sse_encode_String(field0, serializer); - case BdkError_MiniscriptPsbt(field0: final field0): - sse_encode_i_32(31, serializer); - sse_encode_String(field0, serializer); - case BdkError_Bip32(field0: final field0): - sse_encode_i_32(32, serializer); - sse_encode_String(field0, serializer); - case BdkError_Bip39(field0: final field0): - sse_encode_i_32(33, serializer); - sse_encode_String(field0, serializer); - case BdkError_Secp256k1(field0: final field0): - sse_encode_i_32(34, serializer); - sse_encode_String(field0, serializer); - case BdkError_Json(field0: final field0): - sse_encode_i_32(35, serializer); - sse_encode_String(field0, serializer); - case BdkError_Psbt(field0: final field0): - sse_encode_i_32(36, serializer); - sse_encode_String(field0, serializer); - case BdkError_PsbtParse(field0: final field0): - sse_encode_i_32(37, serializer); - sse_encode_String(field0, serializer); - case BdkError_MissingCachedScripts( - field0: final field0, - field1: final field1 - ): - sse_encode_i_32(38, serializer); - sse_encode_usize(field0, serializer); - sse_encode_usize(field1, serializer); - case BdkError_Electrum(field0: final field0): - sse_encode_i_32(39, serializer); - sse_encode_String(field0, serializer); - case BdkError_Esplora(field0: final field0): - sse_encode_i_32(40, serializer); - sse_encode_String(field0, serializer); - case BdkError_Sled(field0: final field0): - sse_encode_i_32(41, serializer); - sse_encode_String(field0, serializer); - case BdkError_Rpc(field0: final field0): - sse_encode_i_32(42, serializer); - sse_encode_String(field0, serializer); - case BdkError_Rusqlite(field0: final field0): - sse_encode_i_32(43, serializer); - sse_encode_String(field0, serializer); - case BdkError_InvalidInput(field0: final field0): - sse_encode_i_32(44, serializer); - sse_encode_String(field0, serializer); - case BdkError_InvalidLockTime(field0: final field0): - sse_encode_i_32(45, serializer); - sse_encode_String(field0, serializer); - case BdkError_InvalidTransaction(field0: final field0): - sse_encode_i_32(46, serializer); - sse_encode_String(field0, serializer); - default: - throw UnimplementedError(''); - } + sse_encode_ffi_derivation_path(self, serializer); } @protected - void sse_encode_bdk_mnemonic(BdkMnemonic self, SseSerializer serializer) { + void sse_encode_box_autoadd_ffi_descriptor( + FfiDescriptor self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_RustOpaque_bdkkeysbip39Mnemonic(self.ptr, serializer); + sse_encode_ffi_descriptor(self, serializer); } @protected - void sse_encode_bdk_psbt(BdkPsbt self, SseSerializer serializer) { + void sse_encode_box_autoadd_ffi_descriptor_public_key( + FfiDescriptorPublicKey self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( - self.ptr, serializer); + sse_encode_ffi_descriptor_public_key(self, serializer); } @protected - void sse_encode_bdk_script_buf(BdkScriptBuf self, SseSerializer serializer) { + void sse_encode_box_autoadd_ffi_descriptor_secret_key( + FfiDescriptorSecretKey self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_list_prim_u_8_strict(self.bytes, serializer); + sse_encode_ffi_descriptor_secret_key(self, serializer); } @protected - void sse_encode_bdk_transaction( - BdkTransaction self, SseSerializer serializer) { + void sse_encode_box_autoadd_ffi_electrum_client( + FfiElectrumClient self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_String(self.s, serializer); + sse_encode_ffi_electrum_client(self, serializer); } @protected - void sse_encode_bdk_wallet(BdkWallet self, SseSerializer serializer) { + void sse_encode_box_autoadd_ffi_esplora_client( + FfiEsploraClient self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( - self.ptr, serializer); + sse_encode_ffi_esplora_client(self, serializer); } @protected - void sse_encode_block_time(BlockTime self, SseSerializer serializer) { + void sse_encode_box_autoadd_ffi_full_scan_request( + FfiFullScanRequest 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_ffi_full_scan_request(self, serializer); } @protected - void sse_encode_blockchain_config( - BlockchainConfig self, SseSerializer serializer) { + void sse_encode_box_autoadd_ffi_full_scan_request_builder( + FfiFullScanRequestBuilder self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - switch (self) { - case BlockchainConfig_Electrum(config: final config): - sse_encode_i_32(0, serializer); - sse_encode_box_autoadd_electrum_config(config, serializer); - case BlockchainConfig_Esplora(config: final config): - sse_encode_i_32(1, serializer); - sse_encode_box_autoadd_esplora_config(config, serializer); - case BlockchainConfig_Rpc(config: final config): - sse_encode_i_32(2, serializer); - sse_encode_box_autoadd_rpc_config(config, serializer); - default: - throw UnimplementedError(''); - } + sse_encode_ffi_full_scan_request_builder(self, serializer); } @protected - void sse_encode_bool(bool self, SseSerializer serializer) { + void sse_encode_box_autoadd_ffi_mnemonic( + FfiMnemonic self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - serializer.buffer.putUint8(self ? 1 : 0); + sse_encode_ffi_mnemonic(self, serializer); + } + + @protected + void sse_encode_box_autoadd_ffi_policy( + FfiPolicy self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_ffi_policy(self, serializer); + } + + @protected + void sse_encode_box_autoadd_ffi_psbt(FfiPsbt self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_ffi_psbt(self, serializer); + } + + @protected + void sse_encode_box_autoadd_ffi_script_buf( + FfiScriptBuf self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_ffi_script_buf(self, serializer); + } + + @protected + void sse_encode_box_autoadd_ffi_sync_request( + FfiSyncRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_ffi_sync_request(self, serializer); } @protected - void sse_encode_box_autoadd_address_error( - AddressError self, SseSerializer serializer) { + void sse_encode_box_autoadd_ffi_sync_request_builder( + FfiSyncRequestBuilder self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_address_error(self, serializer); + sse_encode_ffi_sync_request_builder(self, serializer); } @protected - void sse_encode_box_autoadd_address_index( - AddressIndex self, SseSerializer serializer) { + void sse_encode_box_autoadd_ffi_transaction( + FfiTransaction self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_address_index(self, serializer); + sse_encode_ffi_transaction(self, serializer); } @protected - void sse_encode_box_autoadd_bdk_address( - BdkAddress self, SseSerializer serializer) { + void sse_encode_box_autoadd_ffi_update( + FfiUpdate self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_bdk_address(self, serializer); + sse_encode_ffi_update(self, serializer); } @protected - void sse_encode_box_autoadd_bdk_blockchain( - BdkBlockchain self, SseSerializer serializer) { + void sse_encode_box_autoadd_ffi_wallet( + FfiWallet self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_bdk_blockchain(self, serializer); + sse_encode_ffi_wallet(self, serializer); } @protected - void sse_encode_box_autoadd_bdk_derivation_path( - BdkDerivationPath 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_bdk_derivation_path(self, serializer); + sse_encode_lock_time(self, serializer); } @protected - void sse_encode_box_autoadd_bdk_descriptor( - BdkDescriptor self, SseSerializer serializer) { + void sse_encode_box_autoadd_rbf_value( + RbfValue self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_bdk_descriptor(self, serializer); + sse_encode_rbf_value(self, serializer); } @protected - void sse_encode_box_autoadd_bdk_descriptor_public_key( - BdkDescriptorPublicKey self, SseSerializer serializer) { + void + sse_encode_box_autoadd_record_map_string_list_prim_usize_strict_keychain_kind( + (Map, KeychainKind) self, + SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_bdk_descriptor_public_key(self, serializer); + sse_encode_record_map_string_list_prim_usize_strict_keychain_kind( + self, serializer); } @protected - void sse_encode_box_autoadd_bdk_descriptor_secret_key( - BdkDescriptorSecretKey self, SseSerializer serializer) { + void sse_encode_box_autoadd_sign_options( + SignOptions self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_bdk_descriptor_secret_key(self, serializer); + sse_encode_sign_options(self, serializer); } @protected - void sse_encode_box_autoadd_bdk_mnemonic( - BdkMnemonic self, SseSerializer serializer) { + void sse_encode_box_autoadd_u_32(int self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_bdk_mnemonic(self, serializer); + sse_encode_u_32(self, serializer); } @protected - void sse_encode_box_autoadd_bdk_psbt(BdkPsbt self, SseSerializer serializer) { + void sse_encode_box_autoadd_u_64(BigInt self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_bdk_psbt(self, serializer); + sse_encode_u_64(self, serializer); } @protected - void sse_encode_box_autoadd_bdk_script_buf( - BdkScriptBuf self, SseSerializer serializer) { + void sse_encode_calculate_fee_error( + CalculateFeeError self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_bdk_script_buf(self, serializer); + switch (self) { + case CalculateFeeError_Generic(errorMessage: final errorMessage): + sse_encode_i_32(0, serializer); + sse_encode_String(errorMessage, serializer); + case CalculateFeeError_MissingTxOut(outPoints: final outPoints): + sse_encode_i_32(1, serializer); + sse_encode_list_out_point(outPoints, serializer); + case CalculateFeeError_NegativeFee(amount: final amount): + sse_encode_i_32(2, serializer); + sse_encode_String(amount, serializer); + default: + throw UnimplementedError(''); + } } @protected - void sse_encode_box_autoadd_bdk_transaction( - BdkTransaction self, SseSerializer serializer) { + void sse_encode_cannot_connect_error( + CannotConnectError self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_bdk_transaction(self, serializer); + switch (self) { + case CannotConnectError_Include(height: final height): + sse_encode_i_32(0, serializer); + sse_encode_u_32(height, serializer); + default: + throw UnimplementedError(''); + } } @protected - void sse_encode_box_autoadd_bdk_wallet( - BdkWallet self, SseSerializer serializer) { + void sse_encode_chain_position(ChainPosition self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_bdk_wallet(self, serializer); + switch (self) { + case ChainPosition_Confirmed( + confirmationBlockTime: final confirmationBlockTime + ): + sse_encode_i_32(0, serializer); + sse_encode_box_autoadd_confirmation_block_time( + confirmationBlockTime, serializer); + case ChainPosition_Unconfirmed(timestamp: final timestamp): + sse_encode_i_32(1, serializer); + sse_encode_u_64(timestamp, serializer); + default: + throw UnimplementedError(''); + } } @protected - void sse_encode_box_autoadd_block_time( - BlockTime self, SseSerializer serializer) { + void sse_encode_change_spend_policy( + ChangeSpendPolicy self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_block_time(self, serializer); + sse_encode_i_32(self.index, serializer); } @protected - void sse_encode_box_autoadd_blockchain_config( - BlockchainConfig self, SseSerializer serializer) { + void sse_encode_confirmation_block_time( + ConfirmationBlockTime self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_blockchain_config(self, serializer); + sse_encode_block_id(self.blockId, serializer); + sse_encode_u_64(self.confirmationTime, serializer); } @protected - void sse_encode_box_autoadd_consensus_error( - ConsensusError self, SseSerializer serializer) { + void sse_encode_create_tx_error( + CreateTxError self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_consensus_error(self, serializer); + switch (self) { + case CreateTxError_TransactionNotFound(txid: final txid): + sse_encode_i_32(0, serializer); + sse_encode_String(txid, serializer); + case CreateTxError_TransactionConfirmed(txid: final txid): + sse_encode_i_32(1, serializer); + sse_encode_String(txid, serializer); + case CreateTxError_IrreplaceableTransaction(txid: final txid): + sse_encode_i_32(2, serializer); + sse_encode_String(txid, serializer); + case CreateTxError_FeeRateUnavailable(): + sse_encode_i_32(3, serializer); + case CreateTxError_Generic(errorMessage: final errorMessage): + sse_encode_i_32(4, serializer); + sse_encode_String(errorMessage, serializer); + case CreateTxError_Descriptor(errorMessage: final errorMessage): + sse_encode_i_32(5, serializer); + sse_encode_String(errorMessage, serializer); + case CreateTxError_Policy(errorMessage: final errorMessage): + sse_encode_i_32(6, serializer); + sse_encode_String(errorMessage, serializer); + case CreateTxError_SpendingPolicyRequired(kind: final kind): + sse_encode_i_32(7, serializer); + sse_encode_String(kind, serializer); + case CreateTxError_Version0(): + sse_encode_i_32(8, serializer); + case CreateTxError_Version1Csv(): + sse_encode_i_32(9, serializer); + case CreateTxError_LockTime( + requestedTime: final requestedTime, + requiredTime: final requiredTime + ): + sse_encode_i_32(10, serializer); + sse_encode_String(requestedTime, serializer); + sse_encode_String(requiredTime, serializer); + case CreateTxError_RbfSequence(): + sse_encode_i_32(11, serializer); + case CreateTxError_RbfSequenceCsv(rbf: final rbf, csv: final csv): + sse_encode_i_32(12, serializer); + sse_encode_String(rbf, serializer); + sse_encode_String(csv, serializer); + case CreateTxError_FeeTooLow(feeRequired: final feeRequired): + sse_encode_i_32(13, serializer); + sse_encode_String(feeRequired, serializer); + case CreateTxError_FeeRateTooLow(feeRateRequired: final feeRateRequired): + sse_encode_i_32(14, serializer); + sse_encode_String(feeRateRequired, serializer); + case CreateTxError_NoUtxosSelected(): + sse_encode_i_32(15, serializer); + case CreateTxError_OutputBelowDustLimit(index: final index): + sse_encode_i_32(16, serializer); + sse_encode_u_64(index, serializer); + case CreateTxError_ChangePolicyDescriptor(): + sse_encode_i_32(17, serializer); + case CreateTxError_CoinSelection(errorMessage: final errorMessage): + sse_encode_i_32(18, serializer); + sse_encode_String(errorMessage, serializer); + case CreateTxError_InsufficientFunds( + needed: final needed, + available: final available + ): + sse_encode_i_32(19, serializer); + sse_encode_u_64(needed, serializer); + sse_encode_u_64(available, serializer); + case CreateTxError_NoRecipients(): + sse_encode_i_32(20, serializer); + case CreateTxError_Psbt(errorMessage: final errorMessage): + sse_encode_i_32(21, serializer); + sse_encode_String(errorMessage, serializer); + case CreateTxError_MissingKeyOrigin(key: final key): + sse_encode_i_32(22, serializer); + sse_encode_String(key, serializer); + case CreateTxError_UnknownUtxo(outpoint: final outpoint): + sse_encode_i_32(23, serializer); + sse_encode_String(outpoint, serializer); + case CreateTxError_MissingNonWitnessUtxo(outpoint: final outpoint): + sse_encode_i_32(24, serializer); + sse_encode_String(outpoint, serializer); + case CreateTxError_MiniscriptPsbt(errorMessage: final errorMessage): + sse_encode_i_32(25, serializer); + sse_encode_String(errorMessage, serializer); + default: + throw UnimplementedError(''); + } } @protected - void sse_encode_box_autoadd_database_config( - DatabaseConfig self, SseSerializer serializer) { + void sse_encode_create_with_persist_error( + CreateWithPersistError self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_database_config(self, serializer); + switch (self) { + case CreateWithPersistError_Persist(errorMessage: final errorMessage): + sse_encode_i_32(0, serializer); + sse_encode_String(errorMessage, serializer); + case CreateWithPersistError_DataAlreadyExists(): + sse_encode_i_32(1, serializer); + case CreateWithPersistError_Descriptor(errorMessage: final errorMessage): + sse_encode_i_32(2, serializer); + sse_encode_String(errorMessage, serializer); + default: + throw UnimplementedError(''); + } } @protected - void sse_encode_box_autoadd_descriptor_error( + void sse_encode_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); + switch (self) { + case DescriptorError_InvalidHdKeyPath(): + sse_encode_i_32(0, serializer); + case DescriptorError_MissingPrivateData(): + sse_encode_i_32(1, serializer); + case DescriptorError_InvalidDescriptorChecksum(): + sse_encode_i_32(2, serializer); + case DescriptorError_HardenedDerivationXpub(): + sse_encode_i_32(3, serializer); + case DescriptorError_MultiPath(): + sse_encode_i_32(4, serializer); + case DescriptorError_Key(errorMessage: final errorMessage): + sse_encode_i_32(5, serializer); + sse_encode_String(errorMessage, serializer); + case DescriptorError_Generic(errorMessage: final errorMessage): + sse_encode_i_32(6, serializer); + sse_encode_String(errorMessage, serializer); + case DescriptorError_Policy(errorMessage: final errorMessage): + sse_encode_i_32(7, serializer); + sse_encode_String(errorMessage, serializer); + case DescriptorError_InvalidDescriptorCharacter( + charector: final charector + ): + sse_encode_i_32(8, serializer); + sse_encode_String(charector, serializer); + case DescriptorError_Bip32(errorMessage: final errorMessage): + sse_encode_i_32(9, serializer); + sse_encode_String(errorMessage, serializer); + case DescriptorError_Base58(errorMessage: final errorMessage): + sse_encode_i_32(10, serializer); + sse_encode_String(errorMessage, serializer); + case DescriptorError_Pk(errorMessage: final errorMessage): + sse_encode_i_32(11, serializer); + sse_encode_String(errorMessage, serializer); + case DescriptorError_Miniscript(errorMessage: final errorMessage): + sse_encode_i_32(12, serializer); + sse_encode_String(errorMessage, serializer); + case DescriptorError_Hex(errorMessage: final errorMessage): + sse_encode_i_32(13, serializer); + sse_encode_String(errorMessage, serializer); + case DescriptorError_ExternalAndInternalAreTheSame(): + sse_encode_i_32(14, serializer); + default: + throw UnimplementedError(''); + } } @protected - void sse_encode_box_autoadd_f_32(double self, SseSerializer serializer) { + void sse_encode_descriptor_key_error( + DescriptorKeyError self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_f_32(self, serializer); + switch (self) { + case DescriptorKeyError_Parse(errorMessage: final errorMessage): + sse_encode_i_32(0, serializer); + sse_encode_String(errorMessage, serializer); + case DescriptorKeyError_InvalidKeyType(): + sse_encode_i_32(1, serializer); + case DescriptorKeyError_Bip32(errorMessage: final errorMessage): + sse_encode_i_32(2, serializer); + sse_encode_String(errorMessage, serializer); + default: + throw UnimplementedError(''); + } } @protected - void sse_encode_box_autoadd_fee_rate(FeeRate self, SseSerializer serializer) { + void sse_encode_electrum_error(ElectrumError self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_fee_rate(self, serializer); + switch (self) { + case ElectrumError_IOError(errorMessage: final errorMessage): + sse_encode_i_32(0, serializer); + sse_encode_String(errorMessage, serializer); + case ElectrumError_Json(errorMessage: final errorMessage): + sse_encode_i_32(1, serializer); + sse_encode_String(errorMessage, serializer); + case ElectrumError_Hex(errorMessage: final errorMessage): + sse_encode_i_32(2, serializer); + sse_encode_String(errorMessage, serializer); + case ElectrumError_Protocol(errorMessage: final errorMessage): + sse_encode_i_32(3, serializer); + sse_encode_String(errorMessage, serializer); + case ElectrumError_Bitcoin(errorMessage: final errorMessage): + sse_encode_i_32(4, serializer); + sse_encode_String(errorMessage, serializer); + case ElectrumError_AlreadySubscribed(): + sse_encode_i_32(5, serializer); + case ElectrumError_NotSubscribed(): + sse_encode_i_32(6, serializer); + case ElectrumError_InvalidResponse(errorMessage: final errorMessage): + sse_encode_i_32(7, serializer); + sse_encode_String(errorMessage, serializer); + case ElectrumError_Message(errorMessage: final errorMessage): + sse_encode_i_32(8, serializer); + sse_encode_String(errorMessage, serializer); + case ElectrumError_InvalidDNSNameError(domain: final domain): + sse_encode_i_32(9, serializer); + sse_encode_String(domain, serializer); + case ElectrumError_MissingDomain(): + sse_encode_i_32(10, serializer); + case ElectrumError_AllAttemptsErrored(): + sse_encode_i_32(11, serializer); + case ElectrumError_SharedIOError(errorMessage: final errorMessage): + sse_encode_i_32(12, serializer); + sse_encode_String(errorMessage, serializer); + case ElectrumError_CouldntLockReader(): + sse_encode_i_32(13, serializer); + case ElectrumError_Mpsc(): + sse_encode_i_32(14, serializer); + case ElectrumError_CouldNotCreateConnection( + errorMessage: final errorMessage + ): + sse_encode_i_32(15, serializer); + sse_encode_String(errorMessage, serializer); + case ElectrumError_RequestAlreadyConsumed(): + sse_encode_i_32(16, serializer); + default: + throw UnimplementedError(''); + } } @protected - void sse_encode_box_autoadd_hex_error( - HexError self, SseSerializer serializer) { + void sse_encode_esplora_error(EsploraError self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_hex_error(self, serializer); + switch (self) { + case EsploraError_Minreq(errorMessage: final errorMessage): + sse_encode_i_32(0, serializer); + sse_encode_String(errorMessage, serializer); + case EsploraError_HttpResponse( + status: final status, + errorMessage: final errorMessage + ): + sse_encode_i_32(1, serializer); + sse_encode_u_16(status, serializer); + sse_encode_String(errorMessage, serializer); + case EsploraError_Parsing(errorMessage: final errorMessage): + sse_encode_i_32(2, serializer); + sse_encode_String(errorMessage, serializer); + case EsploraError_StatusCode(errorMessage: final errorMessage): + sse_encode_i_32(3, serializer); + sse_encode_String(errorMessage, serializer); + case EsploraError_BitcoinEncoding(errorMessage: final errorMessage): + sse_encode_i_32(4, serializer); + sse_encode_String(errorMessage, serializer); + case EsploraError_HexToArray(errorMessage: final errorMessage): + sse_encode_i_32(5, serializer); + sse_encode_String(errorMessage, serializer); + case EsploraError_HexToBytes(errorMessage: final errorMessage): + sse_encode_i_32(6, serializer); + sse_encode_String(errorMessage, serializer); + case EsploraError_TransactionNotFound(): + sse_encode_i_32(7, serializer); + case EsploraError_HeaderHeightNotFound(height: final height): + sse_encode_i_32(8, serializer); + sse_encode_u_32(height, serializer); + case EsploraError_HeaderHashNotFound(): + sse_encode_i_32(9, serializer); + case EsploraError_InvalidHttpHeaderName(name: final name): + sse_encode_i_32(10, serializer); + sse_encode_String(name, serializer); + case EsploraError_InvalidHttpHeaderValue(value: final value): + sse_encode_i_32(11, serializer); + sse_encode_String(value, serializer); + case EsploraError_RequestAlreadyConsumed(): + sse_encode_i_32(12, serializer); + default: + throw UnimplementedError(''); + } } @protected - void sse_encode_box_autoadd_local_utxo( - LocalUtxo self, SseSerializer serializer) { + void sse_encode_extract_tx_error( + ExtractTxError self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_local_utxo(self, serializer); + switch (self) { + case ExtractTxError_AbsurdFeeRate(feeRate: final feeRate): + sse_encode_i_32(0, serializer); + sse_encode_u_64(feeRate, serializer); + case ExtractTxError_MissingInputValue(): + sse_encode_i_32(1, serializer); + case ExtractTxError_SendingTooMuch(): + sse_encode_i_32(2, serializer); + case ExtractTxError_OtherExtractTxErr(): + sse_encode_i_32(3, serializer); + default: + throw UnimplementedError(''); + } } @protected - void sse_encode_box_autoadd_lock_time( - LockTime self, SseSerializer serializer) { + void sse_encode_fee_rate(FeeRate self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_lock_time(self, serializer); + sse_encode_u_64(self.satKwu, serializer); } @protected - void sse_encode_box_autoadd_out_point( - OutPoint self, SseSerializer serializer) { + void sse_encode_ffi_address(FfiAddress self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_out_point(self, serializer); + sse_encode_RustOpaque_bdk_corebitcoinAddress(self.field0, serializer); } @protected - void sse_encode_box_autoadd_psbt_sig_hash_type( - PsbtSigHashType self, SseSerializer serializer) { + void sse_encode_ffi_canonical_tx( + FfiCanonicalTx self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_psbt_sig_hash_type(self, serializer); + sse_encode_ffi_transaction(self.transaction, serializer); + sse_encode_chain_position(self.chainPosition, serializer); } @protected - void sse_encode_box_autoadd_rbf_value( - RbfValue self, SseSerializer serializer) { + void sse_encode_ffi_connection(FfiConnection self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_rbf_value(self, serializer); + sse_encode_RustOpaque_stdsyncMutexbdk_walletrusqliteConnection( + self.field0, serializer); } @protected - void sse_encode_box_autoadd_record_out_point_input_usize( - (OutPoint, Input, BigInt) self, SseSerializer serializer) { + void sse_encode_ffi_derivation_path( + FfiDerivationPath self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_record_out_point_input_usize(self, serializer); + sse_encode_RustOpaque_bdk_walletbitcoinbip32DerivationPath( + self.opaque, serializer); } @protected - void sse_encode_box_autoadd_rpc_config( - RpcConfig self, SseSerializer serializer) { + void sse_encode_ffi_descriptor(FfiDescriptor self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_rpc_config(self, serializer); + sse_encode_RustOpaque_bdk_walletdescriptorExtendedDescriptor( + self.extendedDescriptor, serializer); + sse_encode_RustOpaque_bdk_walletkeysKeyMap(self.keyMap, serializer); } @protected - void sse_encode_box_autoadd_rpc_sync_params( - RpcSyncParams self, SseSerializer serializer) { + void sse_encode_ffi_descriptor_public_key( + FfiDescriptorPublicKey self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_rpc_sync_params(self, serializer); + sse_encode_RustOpaque_bdk_walletkeysDescriptorPublicKey( + self.opaque, serializer); } @protected - void sse_encode_box_autoadd_sign_options( - SignOptions self, SseSerializer serializer) { + void sse_encode_ffi_descriptor_secret_key( + FfiDescriptorSecretKey self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_sign_options(self, serializer); + sse_encode_RustOpaque_bdk_walletkeysDescriptorSecretKey( + self.opaque, serializer); } @protected - void sse_encode_box_autoadd_sled_db_configuration( - SledDbConfiguration self, SseSerializer serializer) { + void sse_encode_ffi_electrum_client( + FfiElectrumClient self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_sled_db_configuration(self, serializer); + sse_encode_RustOpaque_bdk_electrumBdkElectrumClientbdk_electrumelectrum_clientClient( + self.opaque, serializer); } @protected - void sse_encode_box_autoadd_sqlite_db_configuration( - SqliteDbConfiguration self, SseSerializer serializer) { + void sse_encode_ffi_esplora_client( + FfiEsploraClient self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_sqlite_db_configuration(self, serializer); + sse_encode_RustOpaque_bdk_esploraesplora_clientBlockingClient( + self.opaque, serializer); } @protected - void sse_encode_box_autoadd_u_32(int self, SseSerializer serializer) { + void sse_encode_ffi_full_scan_request( + FfiFullScanRequest self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_u_32(self, serializer); + sse_encode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestbdk_walletKeychainKind( + self.field0, serializer); } @protected - void sse_encode_box_autoadd_u_64(BigInt self, SseSerializer serializer) { + void sse_encode_ffi_full_scan_request_builder( + FfiFullScanRequestBuilder self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_u_64(self, serializer); + sse_encode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestBuilderbdk_walletKeychainKind( + self.field0, serializer); } @protected - void sse_encode_box_autoadd_u_8(int self, SseSerializer serializer) { + void sse_encode_ffi_mnemonic(FfiMnemonic self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_u_8(self, serializer); + sse_encode_RustOpaque_bdk_walletkeysbip39Mnemonic(self.opaque, serializer); } @protected - void sse_encode_change_spend_policy( - ChangeSpendPolicy self, SseSerializer serializer) { + void sse_encode_ffi_policy(FfiPolicy self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_i_32(self.index, serializer); + sse_encode_RustOpaque_bdk_walletdescriptorPolicy(self.opaque, serializer); } @protected - void sse_encode_consensus_error( - ConsensusError self, SseSerializer serializer) { + void sse_encode_ffi_psbt(FfiPsbt self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - switch (self) { - case ConsensusError_Io(field0: final field0): - sse_encode_i_32(0, serializer); - sse_encode_String(field0, serializer); - case ConsensusError_OversizedVectorAllocation( - requested: final requested, - max: final max - ): - sse_encode_i_32(1, serializer); - sse_encode_usize(requested, serializer); - sse_encode_usize(max, serializer); - case ConsensusError_InvalidChecksum( - expected: final expected, - actual: final actual - ): - sse_encode_i_32(2, serializer); - sse_encode_u_8_array_4(expected, serializer); - sse_encode_u_8_array_4(actual, serializer); - case ConsensusError_NonMinimalVarInt(): - sse_encode_i_32(3, serializer); - case ConsensusError_ParseFailed(field0: final field0): - sse_encode_i_32(4, serializer); - sse_encode_String(field0, serializer); - case ConsensusError_UnsupportedSegwitFlag(field0: final field0): - sse_encode_i_32(5, serializer); - sse_encode_u_8(field0, serializer); - default: - throw UnimplementedError(''); - } + sse_encode_RustOpaque_stdsyncMutexbdk_corebitcoinpsbtPsbt( + self.opaque, serializer); } @protected - void sse_encode_database_config( - DatabaseConfig self, SseSerializer serializer) { + void sse_encode_ffi_script_buf(FfiScriptBuf self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - switch (self) { - case DatabaseConfig_Memory(): - sse_encode_i_32(0, serializer); - case DatabaseConfig_Sqlite(config: final config): - sse_encode_i_32(1, serializer); - sse_encode_box_autoadd_sqlite_db_configuration(config, serializer); - case DatabaseConfig_Sled(config: final config): - sse_encode_i_32(2, serializer); - sse_encode_box_autoadd_sled_db_configuration(config, serializer); - default: - throw UnimplementedError(''); - } + sse_encode_list_prim_u_8_strict(self.bytes, serializer); } @protected - void sse_encode_descriptor_error( - DescriptorError self, SseSerializer serializer) { + void sse_encode_ffi_sync_request( + FfiSyncRequest self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - switch (self) { - case DescriptorError_InvalidHdKeyPath(): - sse_encode_i_32(0, serializer); - case DescriptorError_InvalidDescriptorChecksum(): - sse_encode_i_32(1, serializer); - case DescriptorError_HardenedDerivationXpub(): - sse_encode_i_32(2, serializer); - case DescriptorError_MultiPath(): - sse_encode_i_32(3, serializer); - case DescriptorError_Key(field0: final field0): - sse_encode_i_32(4, serializer); - sse_encode_String(field0, serializer); - case DescriptorError_Policy(field0: final field0): - sse_encode_i_32(5, serializer); - sse_encode_String(field0, serializer); - case DescriptorError_InvalidDescriptorCharacter(field0: final field0): - sse_encode_i_32(6, serializer); - sse_encode_u_8(field0, serializer); - case DescriptorError_Bip32(field0: final field0): - sse_encode_i_32(7, serializer); - sse_encode_String(field0, serializer); - case DescriptorError_Base58(field0: final field0): - sse_encode_i_32(8, serializer); - sse_encode_String(field0, serializer); - case DescriptorError_Pk(field0: final field0): - sse_encode_i_32(9, serializer); - sse_encode_String(field0, serializer); - case DescriptorError_Miniscript(field0: final field0): - sse_encode_i_32(10, serializer); - sse_encode_String(field0, serializer); - case DescriptorError_Hex(field0: final field0): - sse_encode_i_32(11, serializer); - sse_encode_String(field0, serializer); - default: - throw UnimplementedError(''); - } + sse_encode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestbdk_walletKeychainKindu32( + self.field0, serializer); } @protected - void sse_encode_electrum_config( - ElectrumConfig self, SseSerializer serializer) { + void sse_encode_ffi_sync_request_builder( + FfiSyncRequestBuilder 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); + sse_encode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestBuilderbdk_walletKeychainKindu32( + self.field0, serializer); } @protected - void sse_encode_esplora_config(EsploraConfig self, SseSerializer serializer) { + void sse_encode_ffi_transaction( + FfiTransaction 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); + sse_encode_RustOpaque_bdk_corebitcoinTransaction(self.opaque, serializer); } @protected - void sse_encode_f_32(double self, SseSerializer serializer) { + void sse_encode_ffi_update(FfiUpdate self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - serializer.buffer.putFloat32(self); + sse_encode_RustOpaque_bdk_walletUpdate(self.field0, serializer); } @protected - void sse_encode_fee_rate(FeeRate self, SseSerializer serializer) { + void sse_encode_ffi_wallet(FfiWallet self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_f_32(self.satPerVb, serializer); + sse_encode_RustOpaque_stdsyncMutexbdk_walletPersistedWalletbdk_walletrusqliteConnection( + self.opaque, serializer); } @protected - void sse_encode_hex_error(HexError self, SseSerializer serializer) { + void sse_encode_from_script_error( + FromScriptError self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs switch (self) { - case HexError_InvalidChar(field0: final field0): + case FromScriptError_UnrecognizedScript(): sse_encode_i_32(0, serializer); - sse_encode_u_8(field0, serializer); - case HexError_OddLengthString(field0: final field0): + case FromScriptError_WitnessProgram(errorMessage: final errorMessage): sse_encode_i_32(1, serializer); - sse_encode_usize(field0, serializer); - case HexError_InvalidLength(field0: final field0, field1: final field1): + sse_encode_String(errorMessage, serializer); + case FromScriptError_WitnessVersion(errorMessage: final errorMessage): sse_encode_i_32(2, serializer); - sse_encode_usize(field0, serializer); - sse_encode_usize(field1, serializer); + sse_encode_String(errorMessage, serializer); + case FromScriptError_OtherFromScriptErr(): + sse_encode_i_32(3, serializer); default: throw UnimplementedError(''); } @@ -6668,9 +8303,9 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @protected - void sse_encode_input(Input self, SseSerializer serializer) { + void sse_encode_isize(PlatformInt64 self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_String(self.s, serializer); + serializer.buffer.putPlatformInt64(self); } @protected @@ -6679,6 +8314,16 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { sse_encode_i_32(self.index, serializer); } + @protected + void sse_encode_list_ffi_canonical_tx( + 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_ffi_canonical_tx(item, serializer); + } + } + @protected void sse_encode_list_list_prim_u_8_strict( List self, SseSerializer serializer) { @@ -6690,12 +8335,12 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @protected - void sse_encode_list_local_utxo( - List self, SseSerializer serializer) { + void sse_encode_list_local_output( + 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); + sse_encode_local_output(item, serializer); } } @@ -6727,22 +8372,30 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @protected - void sse_encode_list_script_amount( - List self, SseSerializer serializer) { + void sse_encode_list_prim_usize_strict( + Uint64List self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.length, serializer); + serializer.buffer.putUint64List(self); + } + + @protected + void sse_encode_list_record_ffi_script_buf_u_64( + List<(FfiScriptBuf, BigInt)> 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); + sse_encode_record_ffi_script_buf_u_64(item, serializer); } } @protected - void sse_encode_list_transaction_details( - List self, SseSerializer serializer) { + void sse_encode_list_record_string_list_prim_usize_strict( + List<(String, Uint64List)> 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); + sse_encode_record_string_list_prim_usize_strict(item, serializer); } } @@ -6765,7 +8418,27 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @protected - void sse_encode_local_utxo(LocalUtxo self, SseSerializer serializer) { + void sse_encode_load_with_persist_error( + LoadWithPersistError self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + switch (self) { + case LoadWithPersistError_Persist(errorMessage: final errorMessage): + sse_encode_i_32(0, serializer); + sse_encode_String(errorMessage, serializer); + case LoadWithPersistError_InvalidChangeSet( + errorMessage: final errorMessage + ): + sse_encode_i_32(1, serializer); + sse_encode_String(errorMessage, serializer); + case LoadWithPersistError_CouldNotLoad(): + sse_encode_i_32(2, serializer); + default: + throw UnimplementedError(''); + } + } + + @protected + void sse_encode_local_output(LocalOutput 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); @@ -6804,71 +8477,6 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } } - @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) { @@ -6881,57 +8489,60 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @protected - void sse_encode_opt_box_autoadd_psbt_sig_hash_type( - PsbtSigHashType? self, SseSerializer serializer) { + void sse_encode_opt_box_autoadd_ffi_canonical_tx( + FfiCanonicalTx? 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); + sse_encode_box_autoadd_ffi_canonical_tx(self, serializer); } } @protected - void sse_encode_opt_box_autoadd_rbf_value( - RbfValue? self, SseSerializer serializer) { + void sse_encode_opt_box_autoadd_ffi_policy( + FfiPolicy? 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); + sse_encode_box_autoadd_ffi_policy(self, serializer); } } @protected - void sse_encode_opt_box_autoadd_record_out_point_input_usize( - (OutPoint, Input, BigInt)? self, SseSerializer serializer) { + void sse_encode_opt_box_autoadd_ffi_script_buf( + FfiScriptBuf? 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); + sse_encode_box_autoadd_ffi_script_buf(self, serializer); } } @protected - void sse_encode_opt_box_autoadd_rpc_sync_params( - RpcSyncParams? self, SseSerializer serializer) { + 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_rpc_sync_params(self, serializer); + sse_encode_box_autoadd_rbf_value(self, serializer); } } @protected - void sse_encode_opt_box_autoadd_sign_options( - SignOptions? self, SseSerializer serializer) { + void + sse_encode_opt_box_autoadd_record_map_string_list_prim_usize_strict_keychain_kind( + (Map, KeychainKind)? 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); + sse_encode_box_autoadd_record_map_string_list_prim_usize_strict_keychain_kind( + self, serializer); } } @@ -6951,17 +8562,7 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { 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); + sse_encode_box_autoadd_u_64(self, serializer); } } @@ -6973,32 +8574,109 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @protected - void sse_encode_payload(Payload self, SseSerializer serializer) { + void sse_encode_psbt_error(PsbtError self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs switch (self) { - case Payload_PubkeyHash(pubkeyHash: final pubkeyHash): + case PsbtError_InvalidMagic(): sse_encode_i_32(0, serializer); - sse_encode_String(pubkeyHash, serializer); - case Payload_ScriptHash(scriptHash: final scriptHash): + case PsbtError_MissingUtxo(): sse_encode_i_32(1, serializer); - sse_encode_String(scriptHash, serializer); - case Payload_WitnessProgram( - version: final version, - program: final program - ): + case PsbtError_InvalidSeparator(): sse_encode_i_32(2, serializer); - sse_encode_witness_version(version, serializer); - sse_encode_list_prim_u_8_strict(program, serializer); + case PsbtError_PsbtUtxoOutOfBounds(): + sse_encode_i_32(3, serializer); + case PsbtError_InvalidKey(key: final key): + sse_encode_i_32(4, serializer); + sse_encode_String(key, serializer); + case PsbtError_InvalidProprietaryKey(): + sse_encode_i_32(5, serializer); + case PsbtError_DuplicateKey(key: final key): + sse_encode_i_32(6, serializer); + sse_encode_String(key, serializer); + case PsbtError_UnsignedTxHasScriptSigs(): + sse_encode_i_32(7, serializer); + case PsbtError_UnsignedTxHasScriptWitnesses(): + sse_encode_i_32(8, serializer); + case PsbtError_MustHaveUnsignedTx(): + sse_encode_i_32(9, serializer); + case PsbtError_NoMorePairs(): + sse_encode_i_32(10, serializer); + case PsbtError_UnexpectedUnsignedTx(): + sse_encode_i_32(11, serializer); + case PsbtError_NonStandardSighashType(sighash: final sighash): + sse_encode_i_32(12, serializer); + sse_encode_u_32(sighash, serializer); + case PsbtError_InvalidHash(hash: final hash): + sse_encode_i_32(13, serializer); + sse_encode_String(hash, serializer); + case PsbtError_InvalidPreimageHashPair(): + sse_encode_i_32(14, serializer); + case PsbtError_CombineInconsistentKeySources(xpub: final xpub): + sse_encode_i_32(15, serializer); + sse_encode_String(xpub, serializer); + case PsbtError_ConsensusEncoding(encodingError: final encodingError): + sse_encode_i_32(16, serializer); + sse_encode_String(encodingError, serializer); + case PsbtError_NegativeFee(): + sse_encode_i_32(17, serializer); + case PsbtError_FeeOverflow(): + sse_encode_i_32(18, serializer); + case PsbtError_InvalidPublicKey(errorMessage: final errorMessage): + sse_encode_i_32(19, serializer); + sse_encode_String(errorMessage, serializer); + case PsbtError_InvalidSecp256k1PublicKey( + secp256K1Error: final secp256K1Error + ): + sse_encode_i_32(20, serializer); + sse_encode_String(secp256K1Error, serializer); + case PsbtError_InvalidXOnlyPublicKey(): + sse_encode_i_32(21, serializer); + case PsbtError_InvalidEcdsaSignature(errorMessage: final errorMessage): + sse_encode_i_32(22, serializer); + sse_encode_String(errorMessage, serializer); + case PsbtError_InvalidTaprootSignature(errorMessage: final errorMessage): + sse_encode_i_32(23, serializer); + sse_encode_String(errorMessage, serializer); + case PsbtError_InvalidControlBlock(): + sse_encode_i_32(24, serializer); + case PsbtError_InvalidLeafVersion(): + sse_encode_i_32(25, serializer); + case PsbtError_Taproot(): + sse_encode_i_32(26, serializer); + case PsbtError_TapTree(errorMessage: final errorMessage): + sse_encode_i_32(27, serializer); + sse_encode_String(errorMessage, serializer); + case PsbtError_XPubKey(): + sse_encode_i_32(28, serializer); + case PsbtError_Version(errorMessage: final errorMessage): + sse_encode_i_32(29, serializer); + sse_encode_String(errorMessage, serializer); + case PsbtError_PartialDataConsumption(): + sse_encode_i_32(30, serializer); + case PsbtError_Io(errorMessage: final errorMessage): + sse_encode_i_32(31, serializer); + sse_encode_String(errorMessage, serializer); + case PsbtError_OtherPsbtErr(): + sse_encode_i_32(32, serializer); default: throw UnimplementedError(''); } } @protected - void sse_encode_psbt_sig_hash_type( - PsbtSigHashType self, SseSerializer serializer) { + void sse_encode_psbt_parse_error( + PsbtParseError self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_u_32(self.inner, serializer); + switch (self) { + case PsbtParseError_PsbtEncoding(errorMessage: final errorMessage): + sse_encode_i_32(0, serializer); + sse_encode_String(errorMessage, serializer); + case PsbtParseError_Base64Encoding(errorMessage: final errorMessage): + sse_encode_i_32(1, serializer); + sse_encode_String(errorMessage, serializer); + default: + throw UnimplementedError(''); + } } @protected @@ -7016,55 +8694,34 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { } @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, BigInt) self, SseSerializer serializer) { + void sse_encode_record_ffi_script_buf_u_64( + (FfiScriptBuf, BigInt) self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_out_point(self.$1, serializer); - sse_encode_input(self.$2, serializer); - sse_encode_usize(self.$3, serializer); + sse_encode_ffi_script_buf(self.$1, serializer); + sse_encode_u_64(self.$2, serializer); } @protected - void sse_encode_rpc_config(RpcConfig self, SseSerializer serializer) { + void sse_encode_record_map_string_list_prim_usize_strict_keychain_kind( + (Map, KeychainKind) 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); + sse_encode_Map_String_list_prim_usize_strict(self.$1, serializer); + sse_encode_keychain_kind(self.$2, serializer); } @protected - void sse_encode_rpc_sync_params( - RpcSyncParams self, SseSerializer serializer) { + void sse_encode_record_string_list_prim_usize_strict( + (String, Uint64List) 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); + sse_encode_String(self.$1, serializer); + sse_encode_list_prim_usize_strict(self.$2, serializer); } @protected - void sse_encode_script_amount(ScriptAmount self, SseSerializer serializer) { + void sse_encode_request_builder_error( + RequestBuilderError 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); + sse_encode_i_32(self.index, serializer); } @protected @@ -7073,44 +8730,118 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { 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) { + void sse_encode_signer_error(SignerError self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + switch (self) { + case SignerError_MissingKey(): + sse_encode_i_32(0, serializer); + case SignerError_InvalidKey(): + sse_encode_i_32(1, serializer); + case SignerError_UserCanceled(): + sse_encode_i_32(2, serializer); + case SignerError_InputIndexOutOfRange(): + sse_encode_i_32(3, serializer); + case SignerError_MissingNonWitnessUtxo(): + sse_encode_i_32(4, serializer); + case SignerError_InvalidNonWitnessUtxo(): + sse_encode_i_32(5, serializer); + case SignerError_MissingWitnessUtxo(): + sse_encode_i_32(6, serializer); + case SignerError_MissingWitnessScript(): + sse_encode_i_32(7, serializer); + case SignerError_MissingHdKeypath(): + sse_encode_i_32(8, serializer); + case SignerError_NonStandardSighash(): + sse_encode_i_32(9, serializer); + case SignerError_InvalidSighash(): + sse_encode_i_32(10, serializer); + case SignerError_SighashP2wpkh(errorMessage: final errorMessage): + sse_encode_i_32(11, serializer); + sse_encode_String(errorMessage, serializer); + case SignerError_SighashTaproot(errorMessage: final errorMessage): + sse_encode_i_32(12, serializer); + sse_encode_String(errorMessage, serializer); + case SignerError_TxInputsIndexError(errorMessage: final errorMessage): + sse_encode_i_32(13, serializer); + sse_encode_String(errorMessage, serializer); + case SignerError_MiniscriptPsbt(errorMessage: final errorMessage): + sse_encode_i_32(14, serializer); + sse_encode_String(errorMessage, serializer); + case SignerError_External(errorMessage: final errorMessage): + sse_encode_i_32(15, serializer); + sse_encode_String(errorMessage, serializer); + case SignerError_Psbt(errorMessage: final errorMessage): + sse_encode_i_32(16, serializer); + sse_encode_String(errorMessage, serializer); + default: + throw UnimplementedError(''); + } + } + + @protected + void sse_encode_sqlite_error(SqliteError 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); + switch (self) { + case SqliteError_Sqlite(rusqliteError: final rusqliteError): + sse_encode_i_32(0, serializer); + sse_encode_String(rusqliteError, serializer); + default: + throw UnimplementedError(''); + } } @protected - void sse_encode_sqlite_db_configuration( - SqliteDbConfiguration self, SseSerializer serializer) { + void sse_encode_sync_progress(SyncProgress self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_String(self.path, serializer); + sse_encode_u_64(self.spksConsumed, serializer); + sse_encode_u_64(self.spksRemaining, serializer); + sse_encode_u_64(self.txidsConsumed, serializer); + sse_encode_u_64(self.txidsRemaining, serializer); + sse_encode_u_64(self.outpointsConsumed, serializer); + sse_encode_u_64(self.outpointsRemaining, serializer); } @protected - void sse_encode_transaction_details( - TransactionDetails self, SseSerializer serializer) { + void sse_encode_transaction_error( + TransactionError 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); + switch (self) { + case TransactionError_Io(): + sse_encode_i_32(0, serializer); + case TransactionError_OversizedVectorAllocation(): + sse_encode_i_32(1, serializer); + case TransactionError_InvalidChecksum( + expected: final expected, + actual: final actual + ): + sse_encode_i_32(2, serializer); + sse_encode_String(expected, serializer); + sse_encode_String(actual, serializer); + case TransactionError_NonMinimalVarInt(): + sse_encode_i_32(3, serializer); + case TransactionError_ParseFailed(): + sse_encode_i_32(4, serializer); + case TransactionError_UnsupportedSegwitFlag(flag: final flag): + sse_encode_i_32(5, serializer); + sse_encode_u_8(flag, serializer); + case TransactionError_OtherTransactionErr(): + sse_encode_i_32(6, serializer); + default: + throw UnimplementedError(''); + } } @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_ffi_script_buf(self.scriptSig, serializer); sse_encode_u_32(self.sequence, serializer); sse_encode_list_list_prim_u_8_strict(self.witness, serializer); } @@ -7119,7 +8850,26 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { 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); + sse_encode_ffi_script_buf(self.scriptPubkey, serializer); + } + + @protected + void sse_encode_txid_parse_error( + TxidParseError self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + switch (self) { + case TxidParseError_InvalidTxid(txid: final txid): + sse_encode_i_32(0, serializer); + sse_encode_String(txid, serializer); + default: + throw UnimplementedError(''); + } + } + + @protected + void sse_encode_u_16(int self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + serializer.buffer.putUint16(self); } @protected @@ -7140,12 +8890,6 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { 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 @@ -7157,19 +8901,6 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi { serializer.buffer.putBigUint64(self); } - @protected - void sse_encode_variant(Variant self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_i_32(self.index, serializer); - } - - @protected - void sse_encode_witness_version( - WitnessVersion self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_i_32(self.index, serializer); - } - @protected void sse_encode_word_count(WordCount self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -7198,22 +8929,44 @@ class AddressImpl extends RustOpaque implements Address { } @sealed -class AnyBlockchainImpl extends RustOpaque implements AnyBlockchain { +class BdkElectrumClientClientImpl extends RustOpaque + implements BdkElectrumClientClient { + // Not to be used by end users + BdkElectrumClientClientImpl.frbInternalDcoDecode(List wire) + : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + BdkElectrumClientClientImpl.frbInternalSseDecode( + BigInt ptr, int externalSizeOnNative) + : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: core + .instance.api.rust_arc_increment_strong_count_BdkElectrumClientClient, + rustArcDecrementStrongCount: core + .instance.api.rust_arc_decrement_strong_count_BdkElectrumClientClient, + rustArcDecrementStrongCountPtr: core.instance.api + .rust_arc_decrement_strong_count_BdkElectrumClientClientPtr, + ); +} + +@sealed +class BlockingClientImpl extends RustOpaque implements BlockingClient { // Not to be used by end users - AnyBlockchainImpl.frbInternalDcoDecode(List wire) + BlockingClientImpl.frbInternalDcoDecode(List wire) : super.frbInternalDcoDecode(wire, _kStaticData); // Not to be used by end users - AnyBlockchainImpl.frbInternalSseDecode(BigInt ptr, int externalSizeOnNative) + BlockingClientImpl.frbInternalSseDecode(BigInt ptr, int externalSizeOnNative) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); static final _kStaticData = RustArcStaticData( rustArcIncrementStrongCount: - core.instance.api.rust_arc_increment_strong_count_AnyBlockchain, + core.instance.api.rust_arc_increment_strong_count_BlockingClient, rustArcDecrementStrongCount: - core.instance.api.rust_arc_decrement_strong_count_AnyBlockchain, + core.instance.api.rust_arc_decrement_strong_count_BlockingClient, rustArcDecrementStrongCountPtr: - core.instance.api.rust_arc_decrement_strong_count_AnyBlockchainPtr, + core.instance.api.rust_arc_decrement_strong_count_BlockingClientPtr, ); } @@ -7343,45 +9096,215 @@ class MnemonicImpl extends RustOpaque implements Mnemonic { } @sealed -class MutexPartiallySignedTransactionImpl extends RustOpaque - implements MutexPartiallySignedTransaction { +class MutexConnectionImpl extends RustOpaque implements MutexConnection { + // Not to be used by end users + MutexConnectionImpl.frbInternalDcoDecode(List wire) + : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + MutexConnectionImpl.frbInternalSseDecode(BigInt ptr, int externalSizeOnNative) + : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: + core.instance.api.rust_arc_increment_strong_count_MutexConnection, + rustArcDecrementStrongCount: + core.instance.api.rust_arc_decrement_strong_count_MutexConnection, + rustArcDecrementStrongCountPtr: + core.instance.api.rust_arc_decrement_strong_count_MutexConnectionPtr, + ); +} + +@sealed +class MutexOptionFullScanRequestBuilderKeychainKindImpl extends RustOpaque + implements MutexOptionFullScanRequestBuilderKeychainKind { // Not to be used by end users - MutexPartiallySignedTransactionImpl.frbInternalDcoDecode(List wire) + MutexOptionFullScanRequestBuilderKeychainKindImpl.frbInternalDcoDecode( + List wire) : super.frbInternalDcoDecode(wire, _kStaticData); // Not to be used by end users - MutexPartiallySignedTransactionImpl.frbInternalSseDecode( + MutexOptionFullScanRequestBuilderKeychainKindImpl.frbInternalSseDecode( BigInt ptr, int externalSizeOnNative) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); static final _kStaticData = RustArcStaticData( rustArcIncrementStrongCount: core.instance.api - .rust_arc_increment_strong_count_MutexPartiallySignedTransaction, + .rust_arc_increment_strong_count_MutexOptionFullScanRequestBuilderKeychainKind, rustArcDecrementStrongCount: core.instance.api - .rust_arc_decrement_strong_count_MutexPartiallySignedTransaction, + .rust_arc_decrement_strong_count_MutexOptionFullScanRequestBuilderKeychainKind, rustArcDecrementStrongCountPtr: core.instance.api - .rust_arc_decrement_strong_count_MutexPartiallySignedTransactionPtr, + .rust_arc_decrement_strong_count_MutexOptionFullScanRequestBuilderKeychainKindPtr, ); } @sealed -class MutexWalletAnyDatabaseImpl extends RustOpaque - implements MutexWalletAnyDatabase { +class MutexOptionFullScanRequestKeychainKindImpl extends RustOpaque + implements MutexOptionFullScanRequestKeychainKind { // Not to be used by end users - MutexWalletAnyDatabaseImpl.frbInternalDcoDecode(List wire) + MutexOptionFullScanRequestKeychainKindImpl.frbInternalDcoDecode( + List wire) : super.frbInternalDcoDecode(wire, _kStaticData); // Not to be used by end users - MutexWalletAnyDatabaseImpl.frbInternalSseDecode( + MutexOptionFullScanRequestKeychainKindImpl.frbInternalSseDecode( BigInt ptr, int externalSizeOnNative) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); static final _kStaticData = RustArcStaticData( - rustArcIncrementStrongCount: core - .instance.api.rust_arc_increment_strong_count_MutexWalletAnyDatabase, - rustArcDecrementStrongCount: core - .instance.api.rust_arc_decrement_strong_count_MutexWalletAnyDatabase, - rustArcDecrementStrongCountPtr: core - .instance.api.rust_arc_decrement_strong_count_MutexWalletAnyDatabasePtr, + rustArcIncrementStrongCount: core.instance.api + .rust_arc_increment_strong_count_MutexOptionFullScanRequestKeychainKind, + rustArcDecrementStrongCount: core.instance.api + .rust_arc_decrement_strong_count_MutexOptionFullScanRequestKeychainKind, + rustArcDecrementStrongCountPtr: core.instance.api + .rust_arc_decrement_strong_count_MutexOptionFullScanRequestKeychainKindPtr, + ); +} + +@sealed +class MutexOptionSyncRequestBuilderKeychainKindU32Impl extends RustOpaque + implements MutexOptionSyncRequestBuilderKeychainKindU32 { + // Not to be used by end users + MutexOptionSyncRequestBuilderKeychainKindU32Impl.frbInternalDcoDecode( + List wire) + : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + MutexOptionSyncRequestBuilderKeychainKindU32Impl.frbInternalSseDecode( + BigInt ptr, int externalSizeOnNative) + : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: core.instance.api + .rust_arc_increment_strong_count_MutexOptionSyncRequestBuilderKeychainKindU32, + rustArcDecrementStrongCount: core.instance.api + .rust_arc_decrement_strong_count_MutexOptionSyncRequestBuilderKeychainKindU32, + rustArcDecrementStrongCountPtr: core.instance.api + .rust_arc_decrement_strong_count_MutexOptionSyncRequestBuilderKeychainKindU32Ptr, + ); +} + +@sealed +class MutexOptionSyncRequestKeychainKindU32Impl extends RustOpaque + implements MutexOptionSyncRequestKeychainKindU32 { + // Not to be used by end users + MutexOptionSyncRequestKeychainKindU32Impl.frbInternalDcoDecode( + List wire) + : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + MutexOptionSyncRequestKeychainKindU32Impl.frbInternalSseDecode( + BigInt ptr, int externalSizeOnNative) + : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: core.instance.api + .rust_arc_increment_strong_count_MutexOptionSyncRequestKeychainKindU32, + rustArcDecrementStrongCount: core.instance.api + .rust_arc_decrement_strong_count_MutexOptionSyncRequestKeychainKindU32, + rustArcDecrementStrongCountPtr: core.instance.api + .rust_arc_decrement_strong_count_MutexOptionSyncRequestKeychainKindU32Ptr, + ); +} + +@sealed +class MutexPersistedWalletConnectionImpl extends RustOpaque + implements MutexPersistedWalletConnection { + // Not to be used by end users + MutexPersistedWalletConnectionImpl.frbInternalDcoDecode(List wire) + : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + MutexPersistedWalletConnectionImpl.frbInternalSseDecode( + BigInt ptr, int externalSizeOnNative) + : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: core.instance.api + .rust_arc_increment_strong_count_MutexPersistedWalletConnection, + rustArcDecrementStrongCount: core.instance.api + .rust_arc_decrement_strong_count_MutexPersistedWalletConnection, + rustArcDecrementStrongCountPtr: core.instance.api + .rust_arc_decrement_strong_count_MutexPersistedWalletConnectionPtr, + ); +} + +@sealed +class MutexPsbtImpl extends RustOpaque implements MutexPsbt { + // Not to be used by end users + MutexPsbtImpl.frbInternalDcoDecode(List wire) + : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + MutexPsbtImpl.frbInternalSseDecode(BigInt ptr, int externalSizeOnNative) + : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: + core.instance.api.rust_arc_increment_strong_count_MutexPsbt, + rustArcDecrementStrongCount: + core.instance.api.rust_arc_decrement_strong_count_MutexPsbt, + rustArcDecrementStrongCountPtr: + core.instance.api.rust_arc_decrement_strong_count_MutexPsbtPtr, + ); +} + +@sealed +class PolicyImpl extends RustOpaque implements Policy { + // Not to be used by end users + PolicyImpl.frbInternalDcoDecode(List wire) + : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + PolicyImpl.frbInternalSseDecode(BigInt ptr, int externalSizeOnNative) + : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: + core.instance.api.rust_arc_increment_strong_count_Policy, + rustArcDecrementStrongCount: + core.instance.api.rust_arc_decrement_strong_count_Policy, + rustArcDecrementStrongCountPtr: + core.instance.api.rust_arc_decrement_strong_count_PolicyPtr, + ); +} + +@sealed +class TransactionImpl extends RustOpaque implements Transaction { + // Not to be used by end users + TransactionImpl.frbInternalDcoDecode(List wire) + : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + TransactionImpl.frbInternalSseDecode(BigInt ptr, int externalSizeOnNative) + : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: + core.instance.api.rust_arc_increment_strong_count_Transaction, + rustArcDecrementStrongCount: + core.instance.api.rust_arc_decrement_strong_count_Transaction, + rustArcDecrementStrongCountPtr: + core.instance.api.rust_arc_decrement_strong_count_TransactionPtr, + ); +} + +@sealed +class UpdateImpl extends RustOpaque implements Update { + // Not to be used by end users + UpdateImpl.frbInternalDcoDecode(List wire) + : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + UpdateImpl.frbInternalSseDecode(BigInt ptr, int externalSizeOnNative) + : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: + core.instance.api.rust_arc_increment_strong_count_Update, + rustArcDecrementStrongCount: + core.instance.api.rust_arc_decrement_strong_count_Update, + rustArcDecrementStrongCountPtr: + core.instance.api.rust_arc_decrement_strong_count_UpdatePtr, ); } diff --git a/lib/src/generated/frb_generated.io.dart b/lib/src/generated/frb_generated.io.dart index 5ca00930..ddf2533d 100644 --- a/lib/src/generated/frb_generated.io.dart +++ b/lib/src/generated/frb_generated.io.dart @@ -1,13 +1,16 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0. +// @generated by `flutter_rust_bridge`@ 2.4.0. // ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field -import 'api/blockchain.dart'; +import 'api/bitcoin.dart'; import 'api/descriptor.dart'; +import 'api/electrum.dart'; import 'api/error.dart'; +import 'api/esplora.dart'; import 'api/key.dart'; -import 'api/psbt.dart'; +import 'api/store.dart'; +import 'api/tx_builder.dart'; import 'api/types.dart'; import 'api/wallet.dart'; import 'dart:async'; @@ -26,296 +29,409 @@ abstract class coreApiImplPlatform extends BaseApiImpl { }); CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_AddressPtr => - wire._rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddressPtr; + wire._rust_arc_decrement_strong_count_RustOpaque_bdk_corebitcoinAddressPtr; CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_DerivationPathPtr => wire - ._rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinbip32DerivationPathPtr; + get rust_arc_decrement_strong_count_TransactionPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_bdk_corebitcoinTransactionPtr; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_BdkElectrumClientClientPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_bdk_electrumBdkElectrumClientbdk_electrumelectrum_clientClientPtr; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_BlockingClientPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_bdk_esploraesplora_clientBlockingClientPtr; + + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_UpdatePtr => + wire._rust_arc_decrement_strong_count_RustOpaque_bdk_walletUpdatePtr; CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_AnyBlockchainPtr => wire - ._rust_arc_decrement_strong_count_RustOpaque_bdkblockchainAnyBlockchainPtr; + get rust_arc_decrement_strong_count_DerivationPathPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_bdk_walletbitcoinbip32DerivationPathPtr; CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_ExtendedDescriptorPtr => wire - ._rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorExtendedDescriptorPtr; + ._rust_arc_decrement_strong_count_RustOpaque_bdk_walletdescriptorExtendedDescriptorPtr; + + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_PolicyPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_bdk_walletdescriptorPolicyPtr; CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_DescriptorPublicKeyPtr => wire - ._rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorPublicKeyPtr; + ._rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysDescriptorPublicKeyPtr; CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_DescriptorSecretKeyPtr => wire - ._rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorSecretKeyPtr; + ._rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysDescriptorSecretKeyPtr; CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_KeyMapPtr => - wire._rust_arc_decrement_strong_count_RustOpaque_bdkkeysKeyMapPtr; + wire._rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysKeyMapPtr; + + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_MnemonicPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysbip39MnemonicPtr; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_MutexOptionFullScanRequestBuilderKeychainKindPtr => + wire._rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestBuilderbdk_walletKeychainKindPtr; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_MutexOptionFullScanRequestKeychainKindPtr => + wire._rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestbdk_walletKeychainKindPtr; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_MutexOptionSyncRequestBuilderKeychainKindU32Ptr => + wire._rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestBuilderbdk_walletKeychainKindu32Ptr; + + CrossPlatformFinalizerArg + get rust_arc_decrement_strong_count_MutexOptionSyncRequestKeychainKindU32Ptr => + wire._rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestbdk_walletKeychainKindu32Ptr; - CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_MnemonicPtr => - wire._rust_arc_decrement_strong_count_RustOpaque_bdkkeysbip39MnemonicPtr; + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_MutexPsbtPtr => + wire._rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_corebitcoinpsbtPsbtPtr; CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_MutexWalletAnyDatabasePtr => wire - ._rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabasePtr; + get rust_arc_decrement_strong_count_MutexPersistedWalletConnectionPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_walletPersistedWalletbdk_walletrusqliteConnectionPtr; CrossPlatformFinalizerArg - get rust_arc_decrement_strong_count_MutexPartiallySignedTransactionPtr => - wire._rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransactionPtr; + get rust_arc_decrement_strong_count_MutexConnectionPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_walletrusqliteConnectionPtr; + + @protected + AnyhowException dco_decode_AnyhowException(dynamic raw); + + @protected + FutureOr Function(FfiScriptBuf, SyncProgress) + dco_decode_DartFn_Inputs_ffi_script_buf_sync_progress_Output_unit_AnyhowException( + dynamic raw); + + @protected + FutureOr Function(KeychainKind, int, FfiScriptBuf) + dco_decode_DartFn_Inputs_keychain_kind_u_32_ffi_script_buf_Output_unit_AnyhowException( + dynamic raw); + + @protected + Object dco_decode_DartOpaque(dynamic raw); + + @protected + Map dco_decode_Map_String_list_prim_usize_strict( + dynamic raw); + + @protected + Address dco_decode_RustOpaque_bdk_corebitcoinAddress(dynamic raw); @protected - Address dco_decode_RustOpaque_bdkbitcoinAddress(dynamic raw); + Transaction dco_decode_RustOpaque_bdk_corebitcoinTransaction(dynamic raw); @protected - DerivationPath dco_decode_RustOpaque_bdkbitcoinbip32DerivationPath( + BdkElectrumClientClient + dco_decode_RustOpaque_bdk_electrumBdkElectrumClientbdk_electrumelectrum_clientClient( + dynamic raw); + + @protected + BlockingClient dco_decode_RustOpaque_bdk_esploraesplora_clientBlockingClient( dynamic raw); @protected - AnyBlockchain dco_decode_RustOpaque_bdkblockchainAnyBlockchain(dynamic raw); + Update dco_decode_RustOpaque_bdk_walletUpdate(dynamic raw); @protected - ExtendedDescriptor dco_decode_RustOpaque_bdkdescriptorExtendedDescriptor( + DerivationPath dco_decode_RustOpaque_bdk_walletbitcoinbip32DerivationPath( dynamic raw); @protected - DescriptorPublicKey dco_decode_RustOpaque_bdkkeysDescriptorPublicKey( + ExtendedDescriptor + dco_decode_RustOpaque_bdk_walletdescriptorExtendedDescriptor(dynamic raw); + + @protected + Policy dco_decode_RustOpaque_bdk_walletdescriptorPolicy(dynamic raw); + + @protected + DescriptorPublicKey dco_decode_RustOpaque_bdk_walletkeysDescriptorPublicKey( dynamic raw); @protected - DescriptorSecretKey dco_decode_RustOpaque_bdkkeysDescriptorSecretKey( + DescriptorSecretKey dco_decode_RustOpaque_bdk_walletkeysDescriptorSecretKey( dynamic raw); @protected - KeyMap dco_decode_RustOpaque_bdkkeysKeyMap(dynamic raw); + KeyMap dco_decode_RustOpaque_bdk_walletkeysKeyMap(dynamic raw); @protected - Mnemonic dco_decode_RustOpaque_bdkkeysbip39Mnemonic(dynamic raw); + Mnemonic dco_decode_RustOpaque_bdk_walletkeysbip39Mnemonic(dynamic raw); @protected - MutexWalletAnyDatabase - dco_decode_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( + MutexOptionFullScanRequestBuilderKeychainKind + dco_decode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestBuilderbdk_walletKeychainKind( dynamic raw); @protected - MutexPartiallySignedTransaction - dco_decode_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( + MutexOptionFullScanRequestKeychainKind + dco_decode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestbdk_walletKeychainKind( dynamic raw); @protected - String dco_decode_String(dynamic raw); + MutexOptionSyncRequestBuilderKeychainKindU32 + dco_decode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestBuilderbdk_walletKeychainKindu32( + dynamic raw); + + @protected + MutexOptionSyncRequestKeychainKindU32 + dco_decode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestbdk_walletKeychainKindu32( + dynamic raw); + + @protected + MutexPsbt dco_decode_RustOpaque_stdsyncMutexbdk_corebitcoinpsbtPsbt( + dynamic raw); + + @protected + MutexPersistedWalletConnection + dco_decode_RustOpaque_stdsyncMutexbdk_walletPersistedWalletbdk_walletrusqliteConnection( + dynamic raw); + + @protected + MutexConnection + dco_decode_RustOpaque_stdsyncMutexbdk_walletrusqliteConnection( + dynamic raw); @protected - AddressError dco_decode_address_error(dynamic raw); + String dco_decode_String(dynamic raw); @protected - AddressIndex dco_decode_address_index(dynamic raw); + AddressInfo dco_decode_address_info(dynamic raw); @protected - Auth dco_decode_auth(dynamic raw); + AddressParseError dco_decode_address_parse_error(dynamic raw); @protected Balance dco_decode_balance(dynamic raw); @protected - BdkAddress dco_decode_bdk_address(dynamic raw); + Bip32Error dco_decode_bip_32_error(dynamic raw); + + @protected + Bip39Error dco_decode_bip_39_error(dynamic raw); @protected - BdkBlockchain dco_decode_bdk_blockchain(dynamic raw); + BlockId dco_decode_block_id(dynamic raw); @protected - BdkDerivationPath dco_decode_bdk_derivation_path(dynamic raw); + bool dco_decode_bool(dynamic raw); @protected - BdkDescriptor dco_decode_bdk_descriptor(dynamic raw); + ConfirmationBlockTime dco_decode_box_autoadd_confirmation_block_time( + dynamic raw); @protected - BdkDescriptorPublicKey dco_decode_bdk_descriptor_public_key(dynamic raw); + FeeRate dco_decode_box_autoadd_fee_rate(dynamic raw); @protected - BdkDescriptorSecretKey dco_decode_bdk_descriptor_secret_key(dynamic raw); + FfiAddress dco_decode_box_autoadd_ffi_address(dynamic raw); @protected - BdkError dco_decode_bdk_error(dynamic raw); + FfiCanonicalTx dco_decode_box_autoadd_ffi_canonical_tx(dynamic raw); @protected - BdkMnemonic dco_decode_bdk_mnemonic(dynamic raw); + FfiConnection dco_decode_box_autoadd_ffi_connection(dynamic raw); @protected - BdkPsbt dco_decode_bdk_psbt(dynamic raw); + FfiDerivationPath dco_decode_box_autoadd_ffi_derivation_path(dynamic raw); @protected - BdkScriptBuf dco_decode_bdk_script_buf(dynamic raw); + FfiDescriptor dco_decode_box_autoadd_ffi_descriptor(dynamic raw); @protected - BdkTransaction dco_decode_bdk_transaction(dynamic raw); + FfiDescriptorPublicKey dco_decode_box_autoadd_ffi_descriptor_public_key( + dynamic raw); @protected - BdkWallet dco_decode_bdk_wallet(dynamic raw); + FfiDescriptorSecretKey dco_decode_box_autoadd_ffi_descriptor_secret_key( + dynamic raw); @protected - BlockTime dco_decode_block_time(dynamic raw); + FfiElectrumClient dco_decode_box_autoadd_ffi_electrum_client(dynamic raw); @protected - BlockchainConfig dco_decode_blockchain_config(dynamic raw); + FfiEsploraClient dco_decode_box_autoadd_ffi_esplora_client(dynamic raw); @protected - bool dco_decode_bool(dynamic raw); + FfiFullScanRequest dco_decode_box_autoadd_ffi_full_scan_request(dynamic raw); @protected - AddressError dco_decode_box_autoadd_address_error(dynamic raw); + FfiFullScanRequestBuilder + dco_decode_box_autoadd_ffi_full_scan_request_builder(dynamic raw); @protected - AddressIndex dco_decode_box_autoadd_address_index(dynamic raw); + FfiMnemonic dco_decode_box_autoadd_ffi_mnemonic(dynamic raw); @protected - BdkAddress dco_decode_box_autoadd_bdk_address(dynamic raw); + FfiPolicy dco_decode_box_autoadd_ffi_policy(dynamic raw); @protected - BdkBlockchain dco_decode_box_autoadd_bdk_blockchain(dynamic raw); + FfiPsbt dco_decode_box_autoadd_ffi_psbt(dynamic raw); @protected - BdkDerivationPath dco_decode_box_autoadd_bdk_derivation_path(dynamic raw); + FfiScriptBuf dco_decode_box_autoadd_ffi_script_buf(dynamic raw); @protected - BdkDescriptor dco_decode_box_autoadd_bdk_descriptor(dynamic raw); + FfiSyncRequest dco_decode_box_autoadd_ffi_sync_request(dynamic raw); @protected - BdkDescriptorPublicKey dco_decode_box_autoadd_bdk_descriptor_public_key( + FfiSyncRequestBuilder dco_decode_box_autoadd_ffi_sync_request_builder( dynamic raw); @protected - BdkDescriptorSecretKey dco_decode_box_autoadd_bdk_descriptor_secret_key( - dynamic raw); + FfiTransaction dco_decode_box_autoadd_ffi_transaction(dynamic raw); + + @protected + FfiUpdate dco_decode_box_autoadd_ffi_update(dynamic raw); @protected - BdkMnemonic dco_decode_box_autoadd_bdk_mnemonic(dynamic raw); + FfiWallet dco_decode_box_autoadd_ffi_wallet(dynamic raw); @protected - BdkPsbt dco_decode_box_autoadd_bdk_psbt(dynamic raw); + LockTime dco_decode_box_autoadd_lock_time(dynamic raw); @protected - BdkScriptBuf dco_decode_box_autoadd_bdk_script_buf(dynamic raw); + RbfValue dco_decode_box_autoadd_rbf_value(dynamic raw); @protected - BdkTransaction dco_decode_box_autoadd_bdk_transaction(dynamic raw); + ( + Map, + KeychainKind + ) dco_decode_box_autoadd_record_map_string_list_prim_usize_strict_keychain_kind( + dynamic raw); @protected - BdkWallet dco_decode_box_autoadd_bdk_wallet(dynamic raw); + SignOptions dco_decode_box_autoadd_sign_options(dynamic raw); @protected - BlockTime dco_decode_box_autoadd_block_time(dynamic raw); + int dco_decode_box_autoadd_u_32(dynamic raw); @protected - BlockchainConfig dco_decode_box_autoadd_blockchain_config(dynamic raw); + BigInt dco_decode_box_autoadd_u_64(dynamic raw); @protected - ConsensusError dco_decode_box_autoadd_consensus_error(dynamic raw); + CalculateFeeError dco_decode_calculate_fee_error(dynamic raw); @protected - DatabaseConfig dco_decode_box_autoadd_database_config(dynamic raw); + CannotConnectError dco_decode_cannot_connect_error(dynamic raw); @protected - DescriptorError dco_decode_box_autoadd_descriptor_error(dynamic raw); + ChainPosition dco_decode_chain_position(dynamic raw); @protected - ElectrumConfig dco_decode_box_autoadd_electrum_config(dynamic raw); + ChangeSpendPolicy dco_decode_change_spend_policy(dynamic raw); @protected - EsploraConfig dco_decode_box_autoadd_esplora_config(dynamic raw); + ConfirmationBlockTime dco_decode_confirmation_block_time(dynamic raw); @protected - double dco_decode_box_autoadd_f_32(dynamic raw); + CreateTxError dco_decode_create_tx_error(dynamic raw); @protected - FeeRate dco_decode_box_autoadd_fee_rate(dynamic raw); + CreateWithPersistError dco_decode_create_with_persist_error(dynamic raw); @protected - HexError dco_decode_box_autoadd_hex_error(dynamic raw); + DescriptorError dco_decode_descriptor_error(dynamic raw); @protected - LocalUtxo dco_decode_box_autoadd_local_utxo(dynamic raw); + DescriptorKeyError dco_decode_descriptor_key_error(dynamic raw); @protected - LockTime dco_decode_box_autoadd_lock_time(dynamic raw); + ElectrumError dco_decode_electrum_error(dynamic raw); @protected - OutPoint dco_decode_box_autoadd_out_point(dynamic raw); + EsploraError dco_decode_esplora_error(dynamic raw); @protected - PsbtSigHashType dco_decode_box_autoadd_psbt_sig_hash_type(dynamic raw); + ExtractTxError dco_decode_extract_tx_error(dynamic raw); @protected - RbfValue dco_decode_box_autoadd_rbf_value(dynamic raw); + FeeRate dco_decode_fee_rate(dynamic raw); @protected - (OutPoint, Input, BigInt) dco_decode_box_autoadd_record_out_point_input_usize( - dynamic raw); + FfiAddress dco_decode_ffi_address(dynamic raw); @protected - RpcConfig dco_decode_box_autoadd_rpc_config(dynamic raw); + FfiCanonicalTx dco_decode_ffi_canonical_tx(dynamic raw); @protected - RpcSyncParams dco_decode_box_autoadd_rpc_sync_params(dynamic raw); + FfiConnection dco_decode_ffi_connection(dynamic raw); @protected - SignOptions dco_decode_box_autoadd_sign_options(dynamic raw); + FfiDerivationPath dco_decode_ffi_derivation_path(dynamic raw); @protected - SledDbConfiguration dco_decode_box_autoadd_sled_db_configuration(dynamic raw); + FfiDescriptor dco_decode_ffi_descriptor(dynamic raw); @protected - SqliteDbConfiguration dco_decode_box_autoadd_sqlite_db_configuration( - dynamic raw); + FfiDescriptorPublicKey dco_decode_ffi_descriptor_public_key(dynamic raw); @protected - int dco_decode_box_autoadd_u_32(dynamic raw); + FfiDescriptorSecretKey dco_decode_ffi_descriptor_secret_key(dynamic raw); @protected - BigInt dco_decode_box_autoadd_u_64(dynamic raw); + FfiElectrumClient dco_decode_ffi_electrum_client(dynamic raw); @protected - int dco_decode_box_autoadd_u_8(dynamic raw); + FfiEsploraClient dco_decode_ffi_esplora_client(dynamic raw); @protected - ChangeSpendPolicy dco_decode_change_spend_policy(dynamic raw); + FfiFullScanRequest dco_decode_ffi_full_scan_request(dynamic raw); + + @protected + FfiFullScanRequestBuilder dco_decode_ffi_full_scan_request_builder( + dynamic raw); @protected - ConsensusError dco_decode_consensus_error(dynamic raw); + FfiMnemonic dco_decode_ffi_mnemonic(dynamic raw); @protected - DatabaseConfig dco_decode_database_config(dynamic raw); + FfiPolicy dco_decode_ffi_policy(dynamic raw); @protected - DescriptorError dco_decode_descriptor_error(dynamic raw); + FfiPsbt dco_decode_ffi_psbt(dynamic raw); @protected - ElectrumConfig dco_decode_electrum_config(dynamic raw); + FfiScriptBuf dco_decode_ffi_script_buf(dynamic raw); @protected - EsploraConfig dco_decode_esplora_config(dynamic raw); + FfiSyncRequest dco_decode_ffi_sync_request(dynamic raw); @protected - double dco_decode_f_32(dynamic raw); + FfiSyncRequestBuilder dco_decode_ffi_sync_request_builder(dynamic raw); @protected - FeeRate dco_decode_fee_rate(dynamic raw); + FfiTransaction dco_decode_ffi_transaction(dynamic raw); @protected - HexError dco_decode_hex_error(dynamic raw); + FfiUpdate dco_decode_ffi_update(dynamic raw); + + @protected + FfiWallet dco_decode_ffi_wallet(dynamic raw); + + @protected + FromScriptError dco_decode_from_script_error(dynamic raw); @protected int dco_decode_i_32(dynamic raw); @protected - Input dco_decode_input(dynamic raw); + PlatformInt64 dco_decode_isize(dynamic raw); @protected KeychainKind dco_decode_keychain_kind(dynamic raw); + @protected + List dco_decode_list_ffi_canonical_tx(dynamic raw); + @protected List dco_decode_list_list_prim_u_8_strict(dynamic raw); @protected - List dco_decode_list_local_utxo(dynamic raw); + List dco_decode_list_local_output(dynamic raw); @protected List dco_decode_list_out_point(dynamic raw); @@ -327,10 +443,15 @@ abstract class coreApiImplPlatform extends BaseApiImpl { Uint8List dco_decode_list_prim_u_8_strict(dynamic raw); @protected - List dco_decode_list_script_amount(dynamic raw); + Uint64List dco_decode_list_prim_usize_strict(dynamic raw); + + @protected + List<(FfiScriptBuf, BigInt)> dco_decode_list_record_ffi_script_buf_u_64( + dynamic raw); @protected - List dco_decode_list_transaction_details(dynamic raw); + List<(String, Uint64List)> + dco_decode_list_record_string_list_prim_usize_strict(dynamic raw); @protected List dco_decode_list_tx_in(dynamic raw); @@ -339,7 +460,10 @@ abstract class coreApiImplPlatform extends BaseApiImpl { List dco_decode_list_tx_out(dynamic raw); @protected - LocalUtxo dco_decode_local_utxo(dynamic raw); + LoadWithPersistError dco_decode_load_with_persist_error(dynamic raw); + + @protected + LocalOutput dco_decode_local_output(dynamic raw); @protected LockTime dco_decode_lock_time(dynamic raw); @@ -351,405 +475,461 @@ abstract class coreApiImplPlatform extends BaseApiImpl { String? dco_decode_opt_String(dynamic raw); @protected - BdkAddress? dco_decode_opt_box_autoadd_bdk_address(dynamic raw); + FeeRate? dco_decode_opt_box_autoadd_fee_rate(dynamic raw); @protected - BdkDescriptor? dco_decode_opt_box_autoadd_bdk_descriptor(dynamic raw); + FfiCanonicalTx? dco_decode_opt_box_autoadd_ffi_canonical_tx(dynamic raw); @protected - BdkScriptBuf? dco_decode_opt_box_autoadd_bdk_script_buf(dynamic raw); + FfiPolicy? dco_decode_opt_box_autoadd_ffi_policy(dynamic raw); @protected - BdkTransaction? dco_decode_opt_box_autoadd_bdk_transaction(dynamic raw); + FfiScriptBuf? dco_decode_opt_box_autoadd_ffi_script_buf(dynamic raw); @protected - BlockTime? dco_decode_opt_box_autoadd_block_time(dynamic raw); + RbfValue? dco_decode_opt_box_autoadd_rbf_value(dynamic raw); @protected - double? dco_decode_opt_box_autoadd_f_32(dynamic raw); + ( + Map, + KeychainKind + )? dco_decode_opt_box_autoadd_record_map_string_list_prim_usize_strict_keychain_kind( + dynamic raw); @protected - FeeRate? dco_decode_opt_box_autoadd_fee_rate(dynamic raw); + int? dco_decode_opt_box_autoadd_u_32(dynamic raw); @protected - PsbtSigHashType? dco_decode_opt_box_autoadd_psbt_sig_hash_type(dynamic raw); + BigInt? dco_decode_opt_box_autoadd_u_64(dynamic raw); @protected - RbfValue? dco_decode_opt_box_autoadd_rbf_value(dynamic raw); + OutPoint dco_decode_out_point(dynamic raw); @protected - (OutPoint, Input, BigInt)? - dco_decode_opt_box_autoadd_record_out_point_input_usize(dynamic raw); + PsbtError dco_decode_psbt_error(dynamic raw); @protected - RpcSyncParams? dco_decode_opt_box_autoadd_rpc_sync_params(dynamic raw); + PsbtParseError dco_decode_psbt_parse_error(dynamic raw); @protected - SignOptions? dco_decode_opt_box_autoadd_sign_options(dynamic raw); + RbfValue dco_decode_rbf_value(dynamic raw); @protected - int? dco_decode_opt_box_autoadd_u_32(dynamic raw); + (FfiScriptBuf, BigInt) dco_decode_record_ffi_script_buf_u_64(dynamic raw); @protected - BigInt? dco_decode_opt_box_autoadd_u_64(dynamic raw); + (Map, KeychainKind) + dco_decode_record_map_string_list_prim_usize_strict_keychain_kind( + dynamic raw); @protected - int? dco_decode_opt_box_autoadd_u_8(dynamic raw); + (String, Uint64List) dco_decode_record_string_list_prim_usize_strict( + dynamic raw); @protected - OutPoint dco_decode_out_point(dynamic raw); + RequestBuilderError dco_decode_request_builder_error(dynamic raw); @protected - Payload dco_decode_payload(dynamic raw); + SignOptions dco_decode_sign_options(dynamic raw); @protected - PsbtSigHashType dco_decode_psbt_sig_hash_type(dynamic raw); + SignerError dco_decode_signer_error(dynamic raw); @protected - RbfValue dco_decode_rbf_value(dynamic raw); + SqliteError dco_decode_sqlite_error(dynamic raw); @protected - (BdkAddress, int) dco_decode_record_bdk_address_u_32(dynamic raw); + SyncProgress dco_decode_sync_progress(dynamic raw); @protected - (BdkPsbt, TransactionDetails) dco_decode_record_bdk_psbt_transaction_details( - dynamic raw); + TransactionError dco_decode_transaction_error(dynamic raw); @protected - (OutPoint, Input, BigInt) dco_decode_record_out_point_input_usize( - dynamic raw); + TxIn dco_decode_tx_in(dynamic raw); @protected - RpcConfig dco_decode_rpc_config(dynamic raw); + TxOut dco_decode_tx_out(dynamic raw); @protected - RpcSyncParams dco_decode_rpc_sync_params(dynamic raw); + TxidParseError dco_decode_txid_parse_error(dynamic raw); @protected - ScriptAmount dco_decode_script_amount(dynamic raw); + int dco_decode_u_16(dynamic raw); @protected - SignOptions dco_decode_sign_options(dynamic raw); + int dco_decode_u_32(dynamic raw); @protected - SledDbConfiguration dco_decode_sled_db_configuration(dynamic raw); + BigInt dco_decode_u_64(dynamic raw); @protected - SqliteDbConfiguration dco_decode_sqlite_db_configuration(dynamic raw); + int dco_decode_u_8(dynamic raw); @protected - TransactionDetails dco_decode_transaction_details(dynamic raw); + void dco_decode_unit(dynamic raw); @protected - TxIn dco_decode_tx_in(dynamic raw); + BigInt dco_decode_usize(dynamic raw); @protected - TxOut dco_decode_tx_out(dynamic raw); + WordCount dco_decode_word_count(dynamic raw); @protected - int dco_decode_u_32(dynamic raw); + AnyhowException sse_decode_AnyhowException(SseDeserializer deserializer); @protected - BigInt dco_decode_u_64(dynamic raw); + Object sse_decode_DartOpaque(SseDeserializer deserializer); @protected - int dco_decode_u_8(dynamic raw); + Map sse_decode_Map_String_list_prim_usize_strict( + SseDeserializer deserializer); @protected - U8Array4 dco_decode_u_8_array_4(dynamic raw); + Address sse_decode_RustOpaque_bdk_corebitcoinAddress( + SseDeserializer deserializer); @protected - void dco_decode_unit(dynamic raw); + Transaction sse_decode_RustOpaque_bdk_corebitcoinTransaction( + SseDeserializer deserializer); @protected - BigInt dco_decode_usize(dynamic raw); + BdkElectrumClientClient + sse_decode_RustOpaque_bdk_electrumBdkElectrumClientbdk_electrumelectrum_clientClient( + SseDeserializer deserializer); @protected - Variant dco_decode_variant(dynamic raw); + BlockingClient sse_decode_RustOpaque_bdk_esploraesplora_clientBlockingClient( + SseDeserializer deserializer); @protected - WitnessVersion dco_decode_witness_version(dynamic raw); + Update sse_decode_RustOpaque_bdk_walletUpdate(SseDeserializer deserializer); @protected - WordCount dco_decode_word_count(dynamic raw); + DerivationPath sse_decode_RustOpaque_bdk_walletbitcoinbip32DerivationPath( + SseDeserializer deserializer); @protected - Address sse_decode_RustOpaque_bdkbitcoinAddress(SseDeserializer deserializer); + ExtendedDescriptor + sse_decode_RustOpaque_bdk_walletdescriptorExtendedDescriptor( + SseDeserializer deserializer); @protected - DerivationPath sse_decode_RustOpaque_bdkbitcoinbip32DerivationPath( + Policy sse_decode_RustOpaque_bdk_walletdescriptorPolicy( SseDeserializer deserializer); @protected - AnyBlockchain sse_decode_RustOpaque_bdkblockchainAnyBlockchain( + DescriptorPublicKey sse_decode_RustOpaque_bdk_walletkeysDescriptorPublicKey( SseDeserializer deserializer); @protected - ExtendedDescriptor sse_decode_RustOpaque_bdkdescriptorExtendedDescriptor( + DescriptorSecretKey sse_decode_RustOpaque_bdk_walletkeysDescriptorSecretKey( SseDeserializer deserializer); @protected - DescriptorPublicKey sse_decode_RustOpaque_bdkkeysDescriptorPublicKey( + KeyMap sse_decode_RustOpaque_bdk_walletkeysKeyMap( SseDeserializer deserializer); @protected - DescriptorSecretKey sse_decode_RustOpaque_bdkkeysDescriptorSecretKey( + Mnemonic sse_decode_RustOpaque_bdk_walletkeysbip39Mnemonic( SseDeserializer deserializer); @protected - KeyMap sse_decode_RustOpaque_bdkkeysKeyMap(SseDeserializer deserializer); + MutexOptionFullScanRequestBuilderKeychainKind + sse_decode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestBuilderbdk_walletKeychainKind( + SseDeserializer deserializer); + + @protected + MutexOptionFullScanRequestKeychainKind + sse_decode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestbdk_walletKeychainKind( + SseDeserializer deserializer); + + @protected + MutexOptionSyncRequestBuilderKeychainKindU32 + sse_decode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestBuilderbdk_walletKeychainKindu32( + SseDeserializer deserializer); @protected - Mnemonic sse_decode_RustOpaque_bdkkeysbip39Mnemonic( + MutexOptionSyncRequestKeychainKindU32 + sse_decode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestbdk_walletKeychainKindu32( + SseDeserializer deserializer); + + @protected + MutexPsbt sse_decode_RustOpaque_stdsyncMutexbdk_corebitcoinpsbtPsbt( SseDeserializer deserializer); @protected - MutexWalletAnyDatabase - sse_decode_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( + MutexPersistedWalletConnection + sse_decode_RustOpaque_stdsyncMutexbdk_walletPersistedWalletbdk_walletrusqliteConnection( SseDeserializer deserializer); @protected - MutexPartiallySignedTransaction - sse_decode_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( + MutexConnection + sse_decode_RustOpaque_stdsyncMutexbdk_walletrusqliteConnection( SseDeserializer deserializer); @protected String sse_decode_String(SseDeserializer deserializer); @protected - AddressError sse_decode_address_error(SseDeserializer deserializer); + AddressInfo sse_decode_address_info(SseDeserializer deserializer); + + @protected + AddressParseError sse_decode_address_parse_error( + SseDeserializer deserializer); @protected - AddressIndex sse_decode_address_index(SseDeserializer deserializer); + Balance sse_decode_balance(SseDeserializer deserializer); @protected - Auth sse_decode_auth(SseDeserializer deserializer); + Bip32Error sse_decode_bip_32_error(SseDeserializer deserializer); @protected - Balance sse_decode_balance(SseDeserializer deserializer); + Bip39Error sse_decode_bip_39_error(SseDeserializer deserializer); @protected - BdkAddress sse_decode_bdk_address(SseDeserializer deserializer); + BlockId sse_decode_block_id(SseDeserializer deserializer); @protected - BdkBlockchain sse_decode_bdk_blockchain(SseDeserializer deserializer); + bool sse_decode_bool(SseDeserializer deserializer); @protected - BdkDerivationPath sse_decode_bdk_derivation_path( + ConfirmationBlockTime sse_decode_box_autoadd_confirmation_block_time( SseDeserializer deserializer); @protected - BdkDescriptor sse_decode_bdk_descriptor(SseDeserializer deserializer); + FeeRate sse_decode_box_autoadd_fee_rate(SseDeserializer deserializer); @protected - BdkDescriptorPublicKey sse_decode_bdk_descriptor_public_key( - SseDeserializer deserializer); + FfiAddress sse_decode_box_autoadd_ffi_address(SseDeserializer deserializer); @protected - BdkDescriptorSecretKey sse_decode_bdk_descriptor_secret_key( + FfiCanonicalTx sse_decode_box_autoadd_ffi_canonical_tx( SseDeserializer deserializer); @protected - BdkError sse_decode_bdk_error(SseDeserializer deserializer); + FfiConnection sse_decode_box_autoadd_ffi_connection( + SseDeserializer deserializer); @protected - BdkMnemonic sse_decode_bdk_mnemonic(SseDeserializer deserializer); + FfiDerivationPath sse_decode_box_autoadd_ffi_derivation_path( + SseDeserializer deserializer); @protected - BdkPsbt sse_decode_bdk_psbt(SseDeserializer deserializer); + FfiDescriptor sse_decode_box_autoadd_ffi_descriptor( + SseDeserializer deserializer); @protected - BdkScriptBuf sse_decode_bdk_script_buf(SseDeserializer deserializer); + FfiDescriptorPublicKey sse_decode_box_autoadd_ffi_descriptor_public_key( + SseDeserializer deserializer); @protected - BdkTransaction sse_decode_bdk_transaction(SseDeserializer deserializer); + FfiDescriptorSecretKey sse_decode_box_autoadd_ffi_descriptor_secret_key( + SseDeserializer deserializer); @protected - BdkWallet sse_decode_bdk_wallet(SseDeserializer deserializer); + FfiElectrumClient sse_decode_box_autoadd_ffi_electrum_client( + SseDeserializer deserializer); @protected - BlockTime sse_decode_block_time(SseDeserializer deserializer); + FfiEsploraClient sse_decode_box_autoadd_ffi_esplora_client( + SseDeserializer deserializer); @protected - BlockchainConfig sse_decode_blockchain_config(SseDeserializer deserializer); + FfiFullScanRequest sse_decode_box_autoadd_ffi_full_scan_request( + SseDeserializer deserializer); @protected - bool sse_decode_bool(SseDeserializer deserializer); + FfiFullScanRequestBuilder + sse_decode_box_autoadd_ffi_full_scan_request_builder( + SseDeserializer deserializer); @protected - AddressError sse_decode_box_autoadd_address_error( - SseDeserializer deserializer); + FfiMnemonic sse_decode_box_autoadd_ffi_mnemonic(SseDeserializer deserializer); @protected - AddressIndex sse_decode_box_autoadd_address_index( - SseDeserializer deserializer); + FfiPolicy sse_decode_box_autoadd_ffi_policy(SseDeserializer deserializer); @protected - BdkAddress sse_decode_box_autoadd_bdk_address(SseDeserializer deserializer); + FfiPsbt sse_decode_box_autoadd_ffi_psbt(SseDeserializer deserializer); @protected - BdkBlockchain sse_decode_box_autoadd_bdk_blockchain( + FfiScriptBuf sse_decode_box_autoadd_ffi_script_buf( SseDeserializer deserializer); @protected - BdkDerivationPath sse_decode_box_autoadd_bdk_derivation_path( + FfiSyncRequest sse_decode_box_autoadd_ffi_sync_request( SseDeserializer deserializer); @protected - BdkDescriptor sse_decode_box_autoadd_bdk_descriptor( + FfiSyncRequestBuilder sse_decode_box_autoadd_ffi_sync_request_builder( SseDeserializer deserializer); @protected - BdkDescriptorPublicKey sse_decode_box_autoadd_bdk_descriptor_public_key( + FfiTransaction sse_decode_box_autoadd_ffi_transaction( SseDeserializer deserializer); @protected - BdkDescriptorSecretKey sse_decode_box_autoadd_bdk_descriptor_secret_key( - SseDeserializer deserializer); + FfiUpdate sse_decode_box_autoadd_ffi_update(SseDeserializer deserializer); @protected - BdkMnemonic sse_decode_box_autoadd_bdk_mnemonic(SseDeserializer deserializer); + FfiWallet sse_decode_box_autoadd_ffi_wallet(SseDeserializer deserializer); @protected - BdkPsbt sse_decode_box_autoadd_bdk_psbt(SseDeserializer deserializer); + LockTime sse_decode_box_autoadd_lock_time(SseDeserializer deserializer); @protected - BdkScriptBuf sse_decode_box_autoadd_bdk_script_buf( - SseDeserializer deserializer); + RbfValue sse_decode_box_autoadd_rbf_value(SseDeserializer deserializer); @protected - BdkTransaction sse_decode_box_autoadd_bdk_transaction( + ( + Map, + KeychainKind + ) sse_decode_box_autoadd_record_map_string_list_prim_usize_strict_keychain_kind( SseDeserializer deserializer); @protected - BdkWallet sse_decode_box_autoadd_bdk_wallet(SseDeserializer deserializer); + SignOptions sse_decode_box_autoadd_sign_options(SseDeserializer deserializer); + + @protected + int sse_decode_box_autoadd_u_32(SseDeserializer deserializer); @protected - BlockTime sse_decode_box_autoadd_block_time(SseDeserializer deserializer); + BigInt sse_decode_box_autoadd_u_64(SseDeserializer deserializer); @protected - BlockchainConfig sse_decode_box_autoadd_blockchain_config( + CalculateFeeError sse_decode_calculate_fee_error( SseDeserializer deserializer); @protected - ConsensusError sse_decode_box_autoadd_consensus_error( + CannotConnectError sse_decode_cannot_connect_error( SseDeserializer deserializer); @protected - DatabaseConfig sse_decode_box_autoadd_database_config( - SseDeserializer deserializer); + ChainPosition sse_decode_chain_position(SseDeserializer deserializer); @protected - DescriptorError sse_decode_box_autoadd_descriptor_error( + ChangeSpendPolicy sse_decode_change_spend_policy( SseDeserializer deserializer); @protected - ElectrumConfig sse_decode_box_autoadd_electrum_config( + ConfirmationBlockTime sse_decode_confirmation_block_time( SseDeserializer deserializer); @protected - EsploraConfig sse_decode_box_autoadd_esplora_config( - SseDeserializer deserializer); + CreateTxError sse_decode_create_tx_error(SseDeserializer deserializer); @protected - double sse_decode_box_autoadd_f_32(SseDeserializer deserializer); + CreateWithPersistError sse_decode_create_with_persist_error( + SseDeserializer deserializer); @protected - FeeRate sse_decode_box_autoadd_fee_rate(SseDeserializer deserializer); + DescriptorError sse_decode_descriptor_error(SseDeserializer deserializer); @protected - HexError sse_decode_box_autoadd_hex_error(SseDeserializer deserializer); + DescriptorKeyError sse_decode_descriptor_key_error( + SseDeserializer deserializer); @protected - LocalUtxo sse_decode_box_autoadd_local_utxo(SseDeserializer deserializer); + ElectrumError sse_decode_electrum_error(SseDeserializer deserializer); @protected - LockTime sse_decode_box_autoadd_lock_time(SseDeserializer deserializer); + EsploraError sse_decode_esplora_error(SseDeserializer deserializer); @protected - OutPoint sse_decode_box_autoadd_out_point(SseDeserializer deserializer); + ExtractTxError sse_decode_extract_tx_error(SseDeserializer deserializer); @protected - PsbtSigHashType sse_decode_box_autoadd_psbt_sig_hash_type( - SseDeserializer deserializer); + FeeRate sse_decode_fee_rate(SseDeserializer deserializer); @protected - RbfValue sse_decode_box_autoadd_rbf_value(SseDeserializer deserializer); + FfiAddress sse_decode_ffi_address(SseDeserializer deserializer); @protected - (OutPoint, Input, BigInt) sse_decode_box_autoadd_record_out_point_input_usize( - SseDeserializer deserializer); + FfiCanonicalTx sse_decode_ffi_canonical_tx(SseDeserializer deserializer); @protected - RpcConfig sse_decode_box_autoadd_rpc_config(SseDeserializer deserializer); + FfiConnection sse_decode_ffi_connection(SseDeserializer deserializer); @protected - RpcSyncParams sse_decode_box_autoadd_rpc_sync_params( + FfiDerivationPath sse_decode_ffi_derivation_path( SseDeserializer deserializer); @protected - SignOptions sse_decode_box_autoadd_sign_options(SseDeserializer deserializer); + FfiDescriptor sse_decode_ffi_descriptor(SseDeserializer deserializer); @protected - SledDbConfiguration sse_decode_box_autoadd_sled_db_configuration( + FfiDescriptorPublicKey sse_decode_ffi_descriptor_public_key( SseDeserializer deserializer); @protected - SqliteDbConfiguration sse_decode_box_autoadd_sqlite_db_configuration( + FfiDescriptorSecretKey sse_decode_ffi_descriptor_secret_key( SseDeserializer deserializer); @protected - int sse_decode_box_autoadd_u_32(SseDeserializer deserializer); + FfiElectrumClient sse_decode_ffi_electrum_client( + SseDeserializer deserializer); @protected - BigInt sse_decode_box_autoadd_u_64(SseDeserializer deserializer); + FfiEsploraClient sse_decode_ffi_esplora_client(SseDeserializer deserializer); @protected - int sse_decode_box_autoadd_u_8(SseDeserializer deserializer); + FfiFullScanRequest sse_decode_ffi_full_scan_request( + SseDeserializer deserializer); @protected - ChangeSpendPolicy sse_decode_change_spend_policy( + FfiFullScanRequestBuilder sse_decode_ffi_full_scan_request_builder( SseDeserializer deserializer); @protected - ConsensusError sse_decode_consensus_error(SseDeserializer deserializer); + FfiMnemonic sse_decode_ffi_mnemonic(SseDeserializer deserializer); @protected - DatabaseConfig sse_decode_database_config(SseDeserializer deserializer); + FfiPolicy sse_decode_ffi_policy(SseDeserializer deserializer); @protected - DescriptorError sse_decode_descriptor_error(SseDeserializer deserializer); + FfiPsbt sse_decode_ffi_psbt(SseDeserializer deserializer); + + @protected + FfiScriptBuf sse_decode_ffi_script_buf(SseDeserializer deserializer); @protected - ElectrumConfig sse_decode_electrum_config(SseDeserializer deserializer); + FfiSyncRequest sse_decode_ffi_sync_request(SseDeserializer deserializer); @protected - EsploraConfig sse_decode_esplora_config(SseDeserializer deserializer); + FfiSyncRequestBuilder sse_decode_ffi_sync_request_builder( + SseDeserializer deserializer); @protected - double sse_decode_f_32(SseDeserializer deserializer); + FfiTransaction sse_decode_ffi_transaction(SseDeserializer deserializer); @protected - FeeRate sse_decode_fee_rate(SseDeserializer deserializer); + FfiUpdate sse_decode_ffi_update(SseDeserializer deserializer); + + @protected + FfiWallet sse_decode_ffi_wallet(SseDeserializer deserializer); @protected - HexError sse_decode_hex_error(SseDeserializer deserializer); + FromScriptError sse_decode_from_script_error(SseDeserializer deserializer); @protected int sse_decode_i_32(SseDeserializer deserializer); @protected - Input sse_decode_input(SseDeserializer deserializer); + PlatformInt64 sse_decode_isize(SseDeserializer deserializer); @protected KeychainKind sse_decode_keychain_kind(SseDeserializer deserializer); + @protected + List sse_decode_list_ffi_canonical_tx( + SseDeserializer deserializer); + @protected List sse_decode_list_list_prim_u_8_strict( SseDeserializer deserializer); @protected - List sse_decode_list_local_utxo(SseDeserializer deserializer); + List sse_decode_list_local_output(SseDeserializer deserializer); @protected List sse_decode_list_out_point(SseDeserializer deserializer); @@ -761,13 +941,17 @@ abstract class coreApiImplPlatform extends BaseApiImpl { Uint8List sse_decode_list_prim_u_8_strict(SseDeserializer deserializer); @protected - List sse_decode_list_script_amount( - SseDeserializer deserializer); + Uint64List sse_decode_list_prim_usize_strict(SseDeserializer deserializer); @protected - List sse_decode_list_transaction_details( + List<(FfiScriptBuf, BigInt)> sse_decode_list_record_ffi_script_buf_u_64( SseDeserializer deserializer); + @protected + List<(String, Uint64List)> + sse_decode_list_record_string_list_prim_usize_strict( + SseDeserializer deserializer); + @protected List sse_decode_list_tx_in(SseDeserializer deserializer); @@ -775,7 +959,11 @@ abstract class coreApiImplPlatform extends BaseApiImpl { List sse_decode_list_tx_out(SseDeserializer deserializer); @protected - LocalUtxo sse_decode_local_utxo(SseDeserializer deserializer); + LoadWithPersistError sse_decode_load_with_persist_error( + SseDeserializer deserializer); + + @protected + LocalOutput sse_decode_local_output(SseDeserializer deserializer); @protected LockTime sse_decode_lock_time(SseDeserializer deserializer); @@ -787,49 +975,28 @@ abstract class coreApiImplPlatform extends BaseApiImpl { 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); + FeeRate? sse_decode_opt_box_autoadd_fee_rate(SseDeserializer deserializer); @protected - BdkTransaction? sse_decode_opt_box_autoadd_bdk_transaction( + FfiCanonicalTx? sse_decode_opt_box_autoadd_ffi_canonical_tx( SseDeserializer deserializer); @protected - BlockTime? sse_decode_opt_box_autoadd_block_time( + FfiPolicy? sse_decode_opt_box_autoadd_ffi_policy( 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( + FfiScriptBuf? sse_decode_opt_box_autoadd_ffi_script_buf( SseDeserializer deserializer); @protected RbfValue? sse_decode_opt_box_autoadd_rbf_value(SseDeserializer deserializer); @protected - (OutPoint, Input, BigInt)? - sse_decode_opt_box_autoadd_record_out_point_input_usize( - SseDeserializer deserializer); - - @protected - RpcSyncParams? sse_decode_opt_box_autoadd_rpc_sync_params( - SseDeserializer deserializer); - - @protected - SignOptions? sse_decode_opt_box_autoadd_sign_options( + ( + Map, + KeychainKind + )? sse_decode_opt_box_autoadd_record_map_string_list_prim_usize_strict_keychain_kind( SseDeserializer deserializer); @protected @@ -838,62 +1005,61 @@ abstract class coreApiImplPlatform extends BaseApiImpl { @protected BigInt? sse_decode_opt_box_autoadd_u_64(SseDeserializer deserializer); - @protected - int? sse_decode_opt_box_autoadd_u_8(SseDeserializer deserializer); - @protected OutPoint sse_decode_out_point(SseDeserializer deserializer); @protected - Payload sse_decode_payload(SseDeserializer deserializer); + PsbtError sse_decode_psbt_error(SseDeserializer deserializer); @protected - PsbtSigHashType sse_decode_psbt_sig_hash_type(SseDeserializer deserializer); + PsbtParseError sse_decode_psbt_parse_error(SseDeserializer deserializer); @protected RbfValue sse_decode_rbf_value(SseDeserializer deserializer); @protected - (BdkAddress, int) sse_decode_record_bdk_address_u_32( + (FfiScriptBuf, BigInt) sse_decode_record_ffi_script_buf_u_64( SseDeserializer deserializer); @protected - (BdkPsbt, TransactionDetails) sse_decode_record_bdk_psbt_transaction_details( + (Map, KeychainKind) + sse_decode_record_map_string_list_prim_usize_strict_keychain_kind( + SseDeserializer deserializer); + + @protected + (String, Uint64List) sse_decode_record_string_list_prim_usize_strict( SseDeserializer deserializer); @protected - (OutPoint, Input, BigInt) sse_decode_record_out_point_input_usize( + RequestBuilderError sse_decode_request_builder_error( SseDeserializer deserializer); @protected - RpcConfig sse_decode_rpc_config(SseDeserializer deserializer); + SignOptions sse_decode_sign_options(SseDeserializer deserializer); @protected - RpcSyncParams sse_decode_rpc_sync_params(SseDeserializer deserializer); + SignerError sse_decode_signer_error(SseDeserializer deserializer); @protected - ScriptAmount sse_decode_script_amount(SseDeserializer deserializer); + SqliteError sse_decode_sqlite_error(SseDeserializer deserializer); @protected - SignOptions sse_decode_sign_options(SseDeserializer deserializer); + SyncProgress sse_decode_sync_progress(SseDeserializer deserializer); @protected - SledDbConfiguration sse_decode_sled_db_configuration( - SseDeserializer deserializer); + TransactionError sse_decode_transaction_error(SseDeserializer deserializer); @protected - SqliteDbConfiguration sse_decode_sqlite_db_configuration( - SseDeserializer deserializer); + TxIn sse_decode_tx_in(SseDeserializer deserializer); @protected - TransactionDetails sse_decode_transaction_details( - SseDeserializer deserializer); + TxOut sse_decode_tx_out(SseDeserializer deserializer); @protected - TxIn sse_decode_tx_in(SseDeserializer deserializer); + TxidParseError sse_decode_txid_parse_error(SseDeserializer deserializer); @protected - TxOut sse_decode_tx_out(SseDeserializer deserializer); + int sse_decode_u_16(SseDeserializer deserializer); @protected int sse_decode_u_32(SseDeserializer deserializer); @@ -904,9 +1070,6 @@ abstract class coreApiImplPlatform extends BaseApiImpl { @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); @@ -914,13 +1077,23 @@ abstract class coreApiImplPlatform extends BaseApiImpl { BigInt sse_decode_usize(SseDeserializer deserializer); @protected - Variant sse_decode_variant(SseDeserializer deserializer); + WordCount sse_decode_word_count(SseDeserializer deserializer); @protected - WitnessVersion sse_decode_witness_version(SseDeserializer deserializer); + ffi.Pointer cst_encode_AnyhowException( + AnyhowException raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + throw UnimplementedError(); + } @protected - WordCount sse_decode_word_count(SseDeserializer deserializer); + ffi.Pointer + cst_encode_Map_String_list_prim_usize_strict( + Map raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_list_record_string_list_prim_usize_strict( + raw.entries.map((e) => (e.key, e.value)).toList()); + } @protected ffi.Pointer cst_encode_String(String raw) { @@ -929,215 +1102,203 @@ abstract class coreApiImplPlatform extends BaseApiImpl { } @protected - ffi.Pointer cst_encode_box_autoadd_address_error( - AddressError raw) { + ffi.Pointer + cst_encode_box_autoadd_confirmation_block_time( + ConfirmationBlockTime 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); + final ptr = wire.cst_new_box_autoadd_confirmation_block_time(); + cst_api_fill_to_wire_confirmation_block_time(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) { + 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_bdk_address(); - cst_api_fill_to_wire_bdk_address(raw, ptr.ref); + 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_bdk_blockchain( - BdkBlockchain raw) { + ffi.Pointer cst_encode_box_autoadd_ffi_address( + FfiAddress 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); + final ptr = wire.cst_new_box_autoadd_ffi_address(); + cst_api_fill_to_wire_ffi_address(raw, ptr.ref); return ptr; } @protected - ffi.Pointer - cst_encode_box_autoadd_bdk_derivation_path(BdkDerivationPath raw) { + ffi.Pointer + cst_encode_box_autoadd_ffi_canonical_tx(FfiCanonicalTx 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); + final ptr = wire.cst_new_box_autoadd_ffi_canonical_tx(); + cst_api_fill_to_wire_ffi_canonical_tx(raw, ptr.ref); return ptr; } @protected - ffi.Pointer cst_encode_box_autoadd_bdk_descriptor( - BdkDescriptor raw) { + ffi.Pointer cst_encode_box_autoadd_ffi_connection( + FfiConnection 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); + final ptr = wire.cst_new_box_autoadd_ffi_connection(); + cst_api_fill_to_wire_ffi_connection(raw, ptr.ref); return ptr; } @protected - ffi.Pointer - cst_encode_box_autoadd_bdk_descriptor_public_key( - BdkDescriptorPublicKey raw) { + ffi.Pointer + cst_encode_box_autoadd_ffi_derivation_path(FfiDerivationPath 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); + final ptr = wire.cst_new_box_autoadd_ffi_derivation_path(); + cst_api_fill_to_wire_ffi_derivation_path(raw, ptr.ref); return ptr; } @protected - ffi.Pointer - cst_encode_box_autoadd_bdk_descriptor_secret_key( - BdkDescriptorSecretKey raw) { + ffi.Pointer cst_encode_box_autoadd_ffi_descriptor( + FfiDescriptor 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); + final ptr = wire.cst_new_box_autoadd_ffi_descriptor(); + cst_api_fill_to_wire_ffi_descriptor(raw, ptr.ref); return ptr; } @protected - ffi.Pointer cst_encode_box_autoadd_bdk_mnemonic( - BdkMnemonic raw) { + ffi.Pointer + cst_encode_box_autoadd_ffi_descriptor_public_key( + FfiDescriptorPublicKey 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); + final ptr = wire.cst_new_box_autoadd_ffi_descriptor_public_key(); + cst_api_fill_to_wire_ffi_descriptor_public_key(raw, ptr.ref); return ptr; } @protected - ffi.Pointer cst_encode_box_autoadd_bdk_psbt(BdkPsbt raw) { + ffi.Pointer + cst_encode_box_autoadd_ffi_descriptor_secret_key( + FfiDescriptorSecretKey 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); + final ptr = wire.cst_new_box_autoadd_ffi_descriptor_secret_key(); + cst_api_fill_to_wire_ffi_descriptor_secret_key(raw, ptr.ref); return ptr; } @protected - ffi.Pointer cst_encode_box_autoadd_bdk_script_buf( - BdkScriptBuf raw) { + ffi.Pointer + cst_encode_box_autoadd_ffi_electrum_client(FfiElectrumClient 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); + final ptr = wire.cst_new_box_autoadd_ffi_electrum_client(); + cst_api_fill_to_wire_ffi_electrum_client(raw, ptr.ref); return ptr; } @protected - ffi.Pointer cst_encode_box_autoadd_bdk_transaction( - BdkTransaction raw) { + ffi.Pointer + cst_encode_box_autoadd_ffi_esplora_client(FfiEsploraClient 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); + final ptr = wire.cst_new_box_autoadd_ffi_esplora_client(); + cst_api_fill_to_wire_ffi_esplora_client(raw, ptr.ref); return ptr; } @protected - ffi.Pointer cst_encode_box_autoadd_bdk_wallet( - BdkWallet raw) { + ffi.Pointer + cst_encode_box_autoadd_ffi_full_scan_request(FfiFullScanRequest 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); + final ptr = wire.cst_new_box_autoadd_ffi_full_scan_request(); + cst_api_fill_to_wire_ffi_full_scan_request(raw, ptr.ref); return ptr; } @protected - ffi.Pointer cst_encode_box_autoadd_block_time( - BlockTime raw) { + ffi.Pointer + cst_encode_box_autoadd_ffi_full_scan_request_builder( + FfiFullScanRequestBuilder 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_ffi_full_scan_request_builder(); + cst_api_fill_to_wire_ffi_full_scan_request_builder(raw, ptr.ref); return ptr; } @protected - ffi.Pointer - cst_encode_box_autoadd_blockchain_config(BlockchainConfig raw) { + ffi.Pointer cst_encode_box_autoadd_ffi_mnemonic( + FfiMnemonic 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_ffi_mnemonic(); + cst_api_fill_to_wire_ffi_mnemonic(raw, ptr.ref); return ptr; } @protected - ffi.Pointer cst_encode_box_autoadd_consensus_error( - ConsensusError raw) { + ffi.Pointer cst_encode_box_autoadd_ffi_policy( + FfiPolicy 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_ffi_policy(); + cst_api_fill_to_wire_ffi_policy(raw, ptr.ref); return ptr; } @protected - ffi.Pointer cst_encode_box_autoadd_database_config( - DatabaseConfig raw) { + ffi.Pointer cst_encode_box_autoadd_ffi_psbt(FfiPsbt 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_ffi_psbt(); + cst_api_fill_to_wire_ffi_psbt(raw, ptr.ref); return ptr; } @protected - ffi.Pointer - cst_encode_box_autoadd_descriptor_error(DescriptorError raw) { + ffi.Pointer cst_encode_box_autoadd_ffi_script_buf( + FfiScriptBuf 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_ffi_script_buf(); + cst_api_fill_to_wire_ffi_script_buf(raw, ptr.ref); return ptr; } @protected - ffi.Pointer cst_encode_box_autoadd_electrum_config( - ElectrumConfig raw) { + ffi.Pointer + cst_encode_box_autoadd_ffi_sync_request(FfiSyncRequest 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); + final ptr = wire.cst_new_box_autoadd_ffi_sync_request(); + cst_api_fill_to_wire_ffi_sync_request(raw, ptr.ref); return ptr; } @protected - ffi.Pointer cst_encode_box_autoadd_esplora_config( - EsploraConfig raw) { + ffi.Pointer + cst_encode_box_autoadd_ffi_sync_request_builder( + FfiSyncRequestBuilder 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); + final ptr = wire.cst_new_box_autoadd_ffi_sync_request_builder(); + cst_api_fill_to_wire_ffi_sync_request_builder(raw, ptr.ref); return ptr; } @protected - ffi.Pointer cst_encode_box_autoadd_f_32(double raw) { + ffi.Pointer cst_encode_box_autoadd_ffi_transaction( + FfiTransaction 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); + final ptr = wire.cst_new_box_autoadd_ffi_transaction(); + cst_api_fill_to_wire_ffi_transaction(raw, ptr.ref); return ptr; } @protected - ffi.Pointer cst_encode_box_autoadd_hex_error( - HexError raw) { + ffi.Pointer cst_encode_box_autoadd_ffi_update( + FfiUpdate 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); + final ptr = wire.cst_new_box_autoadd_ffi_update(); + cst_api_fill_to_wire_ffi_update(raw, ptr.ref); return ptr; } @protected - ffi.Pointer cst_encode_box_autoadd_local_utxo( - LocalUtxo raw) { + ffi.Pointer cst_encode_box_autoadd_ffi_wallet( + FfiWallet 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); + final ptr = wire.cst_new_box_autoadd_ffi_wallet(); + cst_api_fill_to_wire_ffi_wallet(raw, ptr.ref); return ptr; } @@ -1150,24 +1311,6 @@ abstract class coreApiImplPlatform extends BaseApiImpl { 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) { @@ -1178,30 +1321,14 @@ abstract class coreApiImplPlatform extends BaseApiImpl { } @protected - ffi.Pointer - cst_encode_box_autoadd_record_out_point_input_usize( - (OutPoint, Input, BigInt) raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_record_out_point_input_usize(); - cst_api_fill_to_wire_record_out_point_input_usize(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer cst_encode_box_autoadd_rpc_config( - RpcConfig raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_rpc_config(); - cst_api_fill_to_wire_rpc_config(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer cst_encode_box_autoadd_rpc_sync_params( - RpcSyncParams raw) { + ffi.Pointer + cst_encode_box_autoadd_record_map_string_list_prim_usize_strict_keychain_kind( + (Map, KeychainKind) 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); + final ptr = wire + .cst_new_box_autoadd_record_map_string_list_prim_usize_strict_keychain_kind(); + cst_api_fill_to_wire_record_map_string_list_prim_usize_strict_keychain_kind( + raw, ptr.ref); return ptr; } @@ -1214,25 +1341,6 @@ abstract class coreApiImplPlatform extends BaseApiImpl { 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 @@ -1246,9 +1354,20 @@ abstract class coreApiImplPlatform extends BaseApiImpl { } @protected - ffi.Pointer cst_encode_box_autoadd_u_8(int raw) { + int cst_encode_isize(PlatformInt64 raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw.toInt(); + } + + @protected + ffi.Pointer cst_encode_list_ffi_canonical_tx( + List 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)); + final ans = wire.cst_new_list_ffi_canonical_tx(raw.length); + for (var i = 0; i < raw.length; ++i) { + cst_api_fill_to_wire_ffi_canonical_tx(raw[i], ans.ref.ptr[i]); + } + return ans; } @protected @@ -1263,12 +1382,12 @@ abstract class coreApiImplPlatform extends BaseApiImpl { } @protected - ffi.Pointer cst_encode_list_local_utxo( - List raw) { + ffi.Pointer cst_encode_list_local_output( + List raw) { // Codec=Cst (C-struct based), see doc to use other codecs - final ans = wire.cst_new_list_local_utxo(raw.length); + final ans = wire.cst_new_list_local_output(raw.length); for (var i = 0; i < raw.length; ++i) { - cst_api_fill_to_wire_local_utxo(raw[i], ans.ref.ptr[i]); + cst_api_fill_to_wire_local_output(raw[i], ans.ref.ptr[i]); } return ans; } @@ -1303,23 +1422,34 @@ abstract class coreApiImplPlatform extends BaseApiImpl { } @protected - ffi.Pointer cst_encode_list_script_amount( - List raw) { + ffi.Pointer + cst_encode_list_prim_usize_strict(Uint64List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + throw UnimplementedError('Not implemented in this codec'); + } + + @protected + ffi.Pointer + cst_encode_list_record_ffi_script_buf_u_64( + List<(FfiScriptBuf, BigInt)> raw) { // Codec=Cst (C-struct based), see doc to use other codecs - final ans = wire.cst_new_list_script_amount(raw.length); + final ans = wire.cst_new_list_record_ffi_script_buf_u_64(raw.length); for (var i = 0; i < raw.length; ++i) { - cst_api_fill_to_wire_script_amount(raw[i], ans.ref.ptr[i]); + cst_api_fill_to_wire_record_ffi_script_buf_u_64(raw[i], ans.ref.ptr[i]); } return ans; } @protected - ffi.Pointer - cst_encode_list_transaction_details(List raw) { + ffi.Pointer + cst_encode_list_record_string_list_prim_usize_strict( + List<(String, Uint64List)> raw) { // Codec=Cst (C-struct based), see doc to use other codecs - final ans = wire.cst_new_list_transaction_details(raw.length); + final ans = + wire.cst_new_list_record_string_list_prim_usize_strict(raw.length); for (var i = 0; i < raw.length; ++i) { - cst_api_fill_to_wire_transaction_details(raw[i], ans.ref.ptr[i]); + cst_api_fill_to_wire_record_string_list_prim_usize_strict( + raw[i], ans.ref.ptr[i]); } return ans; } @@ -1352,66 +1482,35 @@ abstract class coreApiImplPlatform extends BaseApiImpl { } @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) { + 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_bdk_script_buf(raw); + return raw == null ? ffi.nullptr : cst_encode_box_autoadd_fee_rate(raw); } @protected - ffi.Pointer - cst_encode_opt_box_autoadd_bdk_transaction(BdkTransaction? raw) { + ffi.Pointer + cst_encode_opt_box_autoadd_ffi_canonical_tx(FfiCanonicalTx? 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); + : cst_encode_box_autoadd_ffi_canonical_tx(raw); } @protected - ffi.Pointer cst_encode_opt_box_autoadd_fee_rate( - FeeRate? raw) { + ffi.Pointer cst_encode_opt_box_autoadd_ffi_policy( + FfiPolicy? raw) { // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null ? ffi.nullptr : cst_encode_box_autoadd_fee_rate(raw); + return raw == null ? ffi.nullptr : cst_encode_box_autoadd_ffi_policy(raw); } @protected - ffi.Pointer - cst_encode_opt_box_autoadd_psbt_sig_hash_type(PsbtSigHashType? raw) { + ffi.Pointer + cst_encode_opt_box_autoadd_ffi_script_buf(FfiScriptBuf? 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); + : cst_encode_box_autoadd_ffi_script_buf(raw); } @protected @@ -1422,29 +1521,14 @@ abstract class coreApiImplPlatform extends BaseApiImpl { } @protected - ffi.Pointer - cst_encode_opt_box_autoadd_record_out_point_input_usize( - (OutPoint, Input, BigInt)? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null - ? ffi.nullptr - : cst_encode_box_autoadd_record_out_point_input_usize(raw); - } - - @protected - ffi.Pointer - cst_encode_opt_box_autoadd_rpc_sync_params(RpcSyncParams? raw) { + ffi.Pointer + cst_encode_opt_box_autoadd_record_map_string_list_prim_usize_strict_keychain_kind( + (Map, KeychainKind)? 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); + : cst_encode_box_autoadd_record_map_string_list_prim_usize_strict_keychain_kind( + raw); } @protected @@ -1459,12 +1543,6 @@ abstract class coreApiImplPlatform extends BaseApiImpl { return raw == null ? ffi.nullptr : cst_encode_box_autoadd_u_64(raw); } - @protected - ffi.Pointer cst_encode_opt_box_autoadd_u_8(int? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null ? ffi.nullptr : cst_encode_box_autoadd_u_8(raw); - } - @protected int cst_encode_u_64(BigInt raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -1472,998 +1550,1310 @@ abstract class coreApiImplPlatform extends BaseApiImpl { } @protected - ffi.Pointer cst_encode_u_8_array_4( - U8Array4 raw) { + int cst_encode_usize(BigInt 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; + return raw.toSigned(64).toInt(); } @protected - int cst_encode_usize(BigInt raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw.toSigned(64).toInt(); + void cst_api_fill_to_wire_address_info( + AddressInfo apiObj, wire_cst_address_info wireObj) { + wireObj.index = cst_encode_u_32(apiObj.index); + cst_api_fill_to_wire_ffi_address(apiObj.address, wireObj.address); + wireObj.keychain = cst_encode_keychain_kind(apiObj.keychain); } @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); + void cst_api_fill_to_wire_address_parse_error( + AddressParseError apiObj, wire_cst_address_parse_error wireObj) { + if (apiObj is AddressParseError_Base58) { wireObj.tag = 0; - wireObj.kind.Base58.field0 = pre_field0; return; } - if (apiObj is AddressError_Bech32) { - var pre_field0 = cst_encode_String(apiObj.field0); + if (apiObj is AddressParseError_Bech32) { wireObj.tag = 1; - wireObj.kind.Bech32.field0 = pre_field0; return; } - if (apiObj is AddressError_EmptyBech32Payload) { + if (apiObj is AddressParseError_WitnessVersion) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); wireObj.tag = 2; + wireObj.kind.WitnessVersion.error_message = pre_error_message; return; } - if (apiObj is AddressError_InvalidBech32Variant) { - var pre_expected = cst_encode_variant(apiObj.expected); - var pre_found = cst_encode_variant(apiObj.found); + if (apiObj is AddressParseError_WitnessProgram) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); wireObj.tag = 3; - wireObj.kind.InvalidBech32Variant.expected = pre_expected; - wireObj.kind.InvalidBech32Variant.found = pre_found; + wireObj.kind.WitnessProgram.error_message = pre_error_message; return; } - if (apiObj is AddressError_InvalidWitnessVersion) { - var pre_field0 = cst_encode_u_8(apiObj.field0); + if (apiObj is AddressParseError_UnknownHrp) { wireObj.tag = 4; - wireObj.kind.InvalidWitnessVersion.field0 = pre_field0; return; } - if (apiObj is AddressError_UnparsableWitnessVersion) { - var pre_field0 = cst_encode_String(apiObj.field0); + if (apiObj is AddressParseError_LegacyAddressTooLong) { wireObj.tag = 5; - wireObj.kind.UnparsableWitnessVersion.field0 = pre_field0; return; } - if (apiObj is AddressError_MalformedWitnessVersion) { + if (apiObj is AddressParseError_InvalidBase58PayloadLength) { wireObj.tag = 6; return; } - if (apiObj is AddressError_InvalidWitnessProgramLength) { - var pre_field0 = cst_encode_usize(apiObj.field0); + if (apiObj is AddressParseError_InvalidLegacyPrefix) { wireObj.tag = 7; - wireObj.kind.InvalidWitnessProgramLength.field0 = pre_field0; return; } - if (apiObj is AddressError_InvalidSegwitV0ProgramLength) { - var pre_field0 = cst_encode_usize(apiObj.field0); + if (apiObj is AddressParseError_NetworkValidation) { wireObj.tag = 8; - wireObj.kind.InvalidSegwitV0ProgramLength.field0 = pre_field0; return; } - if (apiObj is AddressError_UncompressedPubkey) { + if (apiObj is AddressParseError_OtherAddressParseErr) { wireObj.tag = 9; return; } - if (apiObj is AddressError_ExcessiveScriptSize) { - wireObj.tag = 10; + } + + @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_bip_32_error( + Bip32Error apiObj, wire_cst_bip_32_error wireObj) { + if (apiObj is Bip32Error_CannotDeriveFromHardenedKey) { + wireObj.tag = 0; return; } - if (apiObj is AddressError_UnrecognizedScript) { - wireObj.tag = 11; + if (apiObj is Bip32Error_Secp256k1) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 1; + wireObj.kind.Secp256k1.error_message = pre_error_message; return; } - if (apiObj is AddressError_UnknownAddressType) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 12; - wireObj.kind.UnknownAddressType.field0 = pre_field0; + if (apiObj is Bip32Error_InvalidChildNumber) { + var pre_child_number = cst_encode_u_32(apiObj.childNumber); + wireObj.tag = 2; + wireObj.kind.InvalidChildNumber.child_number = pre_child_number; 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; + if (apiObj is Bip32Error_InvalidChildNumberFormat) { + wireObj.tag = 3; 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; + if (apiObj is Bip32Error_InvalidDerivationPathFormat) { + wireObj.tag = 4; return; } - if (apiObj is AddressIndex_LastUnused) { - wireObj.tag = 1; + if (apiObj is Bip32Error_UnknownVersion) { + var pre_version = cst_encode_String(apiObj.version); + wireObj.tag = 5; + wireObj.kind.UnknownVersion.version = pre_version; return; } - if (apiObj is AddressIndex_Peek) { - var pre_index = cst_encode_u_32(apiObj.index); - wireObj.tag = 2; - wireObj.kind.Peek.index = pre_index; + if (apiObj is Bip32Error_WrongExtendedKeyLength) { + var pre_length = cst_encode_u_32(apiObj.length); + wireObj.tag = 6; + wireObj.kind.WrongExtendedKeyLength.length = pre_length; return; } - if (apiObj is AddressIndex_Reset) { - var pre_index = cst_encode_u_32(apiObj.index); - wireObj.tag = 3; - wireObj.kind.Reset.index = pre_index; + if (apiObj is Bip32Error_Base58) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 7; + wireObj.kind.Base58.error_message = pre_error_message; + return; + } + if (apiObj is Bip32Error_Hex) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 8; + wireObj.kind.Hex.error_message = pre_error_message; + return; + } + if (apiObj is Bip32Error_InvalidPublicKeyHexLength) { + var pre_length = cst_encode_u_32(apiObj.length); + wireObj.tag = 9; + wireObj.kind.InvalidPublicKeyHexLength.length = pre_length; + return; + } + if (apiObj is Bip32Error_UnknownError) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 10; + wireObj.kind.UnknownError.error_message = pre_error_message; return; } } @protected - void cst_api_fill_to_wire_auth(Auth apiObj, wire_cst_auth wireObj) { - if (apiObj is Auth_None) { + void cst_api_fill_to_wire_bip_39_error( + Bip39Error apiObj, wire_cst_bip_39_error wireObj) { + if (apiObj is Bip39Error_BadWordCount) { + var pre_word_count = cst_encode_u_64(apiObj.wordCount); wireObj.tag = 0; + wireObj.kind.BadWordCount.word_count = pre_word_count; return; } - if (apiObj is Auth_UserPass) { - var pre_username = cst_encode_String(apiObj.username); - var pre_password = cst_encode_String(apiObj.password); + if (apiObj is Bip39Error_UnknownWord) { + var pre_index = cst_encode_u_64(apiObj.index); wireObj.tag = 1; - wireObj.kind.UserPass.username = pre_username; - wireObj.kind.UserPass.password = pre_password; + wireObj.kind.UnknownWord.index = pre_index; return; } - if (apiObj is Auth_Cookie) { - var pre_file = cst_encode_String(apiObj.file); + if (apiObj is Bip39Error_BadEntropyBitCount) { + var pre_bit_count = cst_encode_u_64(apiObj.bitCount); wireObj.tag = 2; - wireObj.kind.Cookie.file = pre_file; + wireObj.kind.BadEntropyBitCount.bit_count = pre_bit_count; + return; + } + if (apiObj is Bip39Error_InvalidChecksum) { + wireObj.tag = 3; + return; + } + if (apiObj is Bip39Error_AmbiguousLanguages) { + var pre_languages = cst_encode_String(apiObj.languages); + wireObj.tag = 4; + wireObj.kind.AmbiguousLanguages.languages = pre_languages; + return; + } + if (apiObj is Bip39Error_Generic) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 5; + wireObj.kind.Generic.error_message = pre_error_message; 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); + void cst_api_fill_to_wire_block_id( + BlockId apiObj, wire_cst_block_id wireObj) { + wireObj.height = cst_encode_u_32(apiObj.height); + wireObj.hash = cst_encode_String(apiObj.hash); } @protected - void cst_api_fill_to_wire_bdk_address( - BdkAddress apiObj, wire_cst_bdk_address wireObj) { - wireObj.ptr = cst_encode_RustOpaque_bdkbitcoinAddress(apiObj.ptr); + void cst_api_fill_to_wire_box_autoadd_confirmation_block_time( + ConfirmationBlockTime apiObj, + ffi.Pointer wireObj) { + cst_api_fill_to_wire_confirmation_block_time(apiObj, wireObj.ref); } @protected - void cst_api_fill_to_wire_bdk_blockchain( - BdkBlockchain apiObj, wire_cst_bdk_blockchain wireObj) { - wireObj.ptr = cst_encode_RustOpaque_bdkblockchainAnyBlockchain(apiObj.ptr); + 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_bdk_derivation_path( - BdkDerivationPath apiObj, wire_cst_bdk_derivation_path wireObj) { - wireObj.ptr = - cst_encode_RustOpaque_bdkbitcoinbip32DerivationPath(apiObj.ptr); + void cst_api_fill_to_wire_box_autoadd_ffi_address( + FfiAddress apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_ffi_address(apiObj, wireObj.ref); } @protected - void cst_api_fill_to_wire_bdk_descriptor( - BdkDescriptor apiObj, wire_cst_bdk_descriptor wireObj) { - wireObj.extended_descriptor = - cst_encode_RustOpaque_bdkdescriptorExtendedDescriptor( - apiObj.extendedDescriptor); - wireObj.key_map = cst_encode_RustOpaque_bdkkeysKeyMap(apiObj.keyMap); + void cst_api_fill_to_wire_box_autoadd_ffi_canonical_tx( + FfiCanonicalTx apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_ffi_canonical_tx(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_ffi_connection( + FfiConnection apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_ffi_connection(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_ffi_derivation_path( + FfiDerivationPath apiObj, + ffi.Pointer wireObj) { + cst_api_fill_to_wire_ffi_derivation_path(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_ffi_descriptor( + FfiDescriptor apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_ffi_descriptor(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_ffi_descriptor_public_key( + FfiDescriptorPublicKey apiObj, + ffi.Pointer wireObj) { + cst_api_fill_to_wire_ffi_descriptor_public_key(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_ffi_descriptor_secret_key( + FfiDescriptorSecretKey apiObj, + ffi.Pointer wireObj) { + cst_api_fill_to_wire_ffi_descriptor_secret_key(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_ffi_electrum_client( + FfiElectrumClient apiObj, + ffi.Pointer wireObj) { + cst_api_fill_to_wire_ffi_electrum_client(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_ffi_esplora_client( + FfiEsploraClient apiObj, + ffi.Pointer wireObj) { + cst_api_fill_to_wire_ffi_esplora_client(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_ffi_full_scan_request( + FfiFullScanRequest apiObj, + ffi.Pointer wireObj) { + cst_api_fill_to_wire_ffi_full_scan_request(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_ffi_full_scan_request_builder( + FfiFullScanRequestBuilder apiObj, + ffi.Pointer wireObj) { + cst_api_fill_to_wire_ffi_full_scan_request_builder(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_ffi_mnemonic( + FfiMnemonic apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_ffi_mnemonic(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_ffi_policy( + FfiPolicy apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_ffi_policy(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_ffi_psbt( + FfiPsbt apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_ffi_psbt(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_ffi_script_buf( + FfiScriptBuf apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_ffi_script_buf(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_ffi_sync_request( + FfiSyncRequest apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_ffi_sync_request(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_ffi_sync_request_builder( + FfiSyncRequestBuilder apiObj, + ffi.Pointer wireObj) { + cst_api_fill_to_wire_ffi_sync_request_builder(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_ffi_transaction( + FfiTransaction apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_ffi_transaction(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_ffi_update( + FfiUpdate apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_ffi_update(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_ffi_wallet( + FfiWallet apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_ffi_wallet(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_rbf_value( + RbfValue apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_rbf_value(apiObj, wireObj.ref); } @protected - void cst_api_fill_to_wire_bdk_descriptor_public_key( - BdkDescriptorPublicKey apiObj, - wire_cst_bdk_descriptor_public_key wireObj) { - wireObj.ptr = cst_encode_RustOpaque_bdkkeysDescriptorPublicKey(apiObj.ptr); + void cst_api_fill_to_wire_box_autoadd_record_map_string_list_prim_usize_strict_keychain_kind( + (Map, KeychainKind) apiObj, + ffi.Pointer< + wire_cst_record_map_string_list_prim_usize_strict_keychain_kind> + wireObj) { + cst_api_fill_to_wire_record_map_string_list_prim_usize_strict_keychain_kind( + apiObj, wireObj.ref); } @protected - void cst_api_fill_to_wire_bdk_descriptor_secret_key( - BdkDescriptorSecretKey apiObj, - wire_cst_bdk_descriptor_secret_key wireObj) { - wireObj.ptr = cst_encode_RustOpaque_bdkkeysDescriptorSecretKey(apiObj.ptr); + 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_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); + void cst_api_fill_to_wire_calculate_fee_error( + CalculateFeeError apiObj, wire_cst_calculate_fee_error wireObj) { + if (apiObj is CalculateFeeError_Generic) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); wireObj.tag = 0; - wireObj.kind.Hex.field0 = pre_field0; + wireObj.kind.Generic.error_message = pre_error_message; return; } - if (apiObj is BdkError_Consensus) { - var pre_field0 = cst_encode_box_autoadd_consensus_error(apiObj.field0); + if (apiObj is CalculateFeeError_MissingTxOut) { + var pre_out_points = cst_encode_list_out_point(apiObj.outPoints); wireObj.tag = 1; - wireObj.kind.Consensus.field0 = pre_field0; + wireObj.kind.MissingTxOut.out_points = pre_out_points; return; } - if (apiObj is BdkError_VerifyTransaction) { - var pre_field0 = cst_encode_String(apiObj.field0); + if (apiObj is CalculateFeeError_NegativeFee) { + var pre_amount = cst_encode_String(apiObj.amount); wireObj.tag = 2; - wireObj.kind.VerifyTransaction.field0 = pre_field0; + wireObj.kind.NegativeFee.amount = pre_amount; return; } - if (apiObj is BdkError_Address) { - var pre_field0 = cst_encode_box_autoadd_address_error(apiObj.field0); - wireObj.tag = 3; - wireObj.kind.Address.field0 = pre_field0; + } + + @protected + void cst_api_fill_to_wire_cannot_connect_error( + CannotConnectError apiObj, wire_cst_cannot_connect_error wireObj) { + if (apiObj is CannotConnectError_Include) { + var pre_height = cst_encode_u_32(apiObj.height); + wireObj.tag = 0; + wireObj.kind.Include.height = pre_height; return; } - if (apiObj is BdkError_Descriptor) { - var pre_field0 = cst_encode_box_autoadd_descriptor_error(apiObj.field0); - wireObj.tag = 4; - wireObj.kind.Descriptor.field0 = pre_field0; + } + + @protected + void cst_api_fill_to_wire_chain_position( + ChainPosition apiObj, wire_cst_chain_position wireObj) { + if (apiObj is ChainPosition_Confirmed) { + var pre_confirmation_block_time = + cst_encode_box_autoadd_confirmation_block_time( + apiObj.confirmationBlockTime); + wireObj.tag = 0; + wireObj.kind.Confirmed.confirmation_block_time = + pre_confirmation_block_time; return; } - if (apiObj is BdkError_InvalidU32Bytes) { - var pre_field0 = cst_encode_list_prim_u_8_strict(apiObj.field0); - wireObj.tag = 5; - wireObj.kind.InvalidU32Bytes.field0 = pre_field0; + if (apiObj is ChainPosition_Unconfirmed) { + var pre_timestamp = cst_encode_u_64(apiObj.timestamp); + wireObj.tag = 1; + wireObj.kind.Unconfirmed.timestamp = pre_timestamp; return; } - if (apiObj is BdkError_Generic) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 6; - wireObj.kind.Generic.field0 = pre_field0; + } + + @protected + void cst_api_fill_to_wire_confirmation_block_time( + ConfirmationBlockTime apiObj, wire_cst_confirmation_block_time wireObj) { + cst_api_fill_to_wire_block_id(apiObj.blockId, wireObj.block_id); + wireObj.confirmation_time = cst_encode_u_64(apiObj.confirmationTime); + } + + @protected + void cst_api_fill_to_wire_create_tx_error( + CreateTxError apiObj, wire_cst_create_tx_error wireObj) { + if (apiObj is CreateTxError_TransactionNotFound) { + var pre_txid = cst_encode_String(apiObj.txid); + wireObj.tag = 0; + wireObj.kind.TransactionNotFound.txid = pre_txid; return; } - if (apiObj is BdkError_ScriptDoesntHaveAddressForm) { - wireObj.tag = 7; + if (apiObj is CreateTxError_TransactionConfirmed) { + var pre_txid = cst_encode_String(apiObj.txid); + wireObj.tag = 1; + wireObj.kind.TransactionConfirmed.txid = pre_txid; + return; + } + if (apiObj is CreateTxError_IrreplaceableTransaction) { + var pre_txid = cst_encode_String(apiObj.txid); + wireObj.tag = 2; + wireObj.kind.IrreplaceableTransaction.txid = pre_txid; + return; + } + if (apiObj is CreateTxError_FeeRateUnavailable) { + wireObj.tag = 3; + return; + } + if (apiObj is CreateTxError_Generic) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 4; + wireObj.kind.Generic.error_message = pre_error_message; + return; + } + if (apiObj is CreateTxError_Descriptor) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 5; + wireObj.kind.Descriptor.error_message = pre_error_message; + return; + } + if (apiObj is CreateTxError_Policy) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 6; + wireObj.kind.Policy.error_message = pre_error_message; return; } - if (apiObj is BdkError_NoRecipients) { + if (apiObj is CreateTxError_SpendingPolicyRequired) { + var pre_kind = cst_encode_String(apiObj.kind); + wireObj.tag = 7; + wireObj.kind.SpendingPolicyRequired.kind = pre_kind; + return; + } + if (apiObj is CreateTxError_Version0) { wireObj.tag = 8; return; } - if (apiObj is BdkError_NoUtxosSelected) { + if (apiObj is CreateTxError_Version1Csv) { wireObj.tag = 9; return; } - if (apiObj is BdkError_OutputBelowDustLimit) { - var pre_field0 = cst_encode_usize(apiObj.field0); + if (apiObj is CreateTxError_LockTime) { + var pre_requested_time = cst_encode_String(apiObj.requestedTime); + var pre_required_time = cst_encode_String(apiObj.requiredTime); wireObj.tag = 10; - wireObj.kind.OutputBelowDustLimit.field0 = pre_field0; + wireObj.kind.LockTime.requested_time = pre_requested_time; + wireObj.kind.LockTime.required_time = pre_required_time; return; } - if (apiObj is BdkError_InsufficientFunds) { - var pre_needed = cst_encode_u_64(apiObj.needed); - var pre_available = cst_encode_u_64(apiObj.available); + if (apiObj is CreateTxError_RbfSequence) { wireObj.tag = 11; - wireObj.kind.InsufficientFunds.needed = pre_needed; - wireObj.kind.InsufficientFunds.available = pre_available; return; } - if (apiObj is BdkError_BnBTotalTriesExceeded) { + if (apiObj is CreateTxError_RbfSequenceCsv) { + var pre_rbf = cst_encode_String(apiObj.rbf); + var pre_csv = cst_encode_String(apiObj.csv); wireObj.tag = 12; + wireObj.kind.RbfSequenceCsv.rbf = pre_rbf; + wireObj.kind.RbfSequenceCsv.csv = pre_csv; return; } - if (apiObj is BdkError_BnBNoExactMatch) { + if (apiObj is CreateTxError_FeeTooLow) { + var pre_fee_required = cst_encode_String(apiObj.feeRequired); wireObj.tag = 13; + wireObj.kind.FeeTooLow.fee_required = pre_fee_required; return; } - if (apiObj is BdkError_UnknownUtxo) { + if (apiObj is CreateTxError_FeeRateTooLow) { + var pre_fee_rate_required = cst_encode_String(apiObj.feeRateRequired); wireObj.tag = 14; + wireObj.kind.FeeRateTooLow.fee_rate_required = pre_fee_rate_required; return; } - if (apiObj is BdkError_TransactionNotFound) { + if (apiObj is CreateTxError_NoUtxosSelected) { wireObj.tag = 15; return; } - if (apiObj is BdkError_TransactionConfirmed) { + if (apiObj is CreateTxError_OutputBelowDustLimit) { + var pre_index = cst_encode_u_64(apiObj.index); wireObj.tag = 16; + wireObj.kind.OutputBelowDustLimit.index = pre_index; return; } - if (apiObj is BdkError_IrreplaceableTransaction) { + if (apiObj is CreateTxError_ChangePolicyDescriptor) { wireObj.tag = 17; return; } - if (apiObj is BdkError_FeeRateTooLow) { - var pre_needed = cst_encode_f_32(apiObj.needed); + if (apiObj is CreateTxError_CoinSelection) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); wireObj.tag = 18; - wireObj.kind.FeeRateTooLow.needed = pre_needed; + wireObj.kind.CoinSelection.error_message = pre_error_message; return; } - if (apiObj is BdkError_FeeTooLow) { + if (apiObj is CreateTxError_InsufficientFunds) { var pre_needed = cst_encode_u_64(apiObj.needed); + var pre_available = cst_encode_u_64(apiObj.available); wireObj.tag = 19; - wireObj.kind.FeeTooLow.needed = pre_needed; + wireObj.kind.InsufficientFunds.needed = pre_needed; + wireObj.kind.InsufficientFunds.available = pre_available; return; } - if (apiObj is BdkError_FeeRateUnavailable) { + if (apiObj is CreateTxError_NoRecipients) { wireObj.tag = 20; return; } - if (apiObj is BdkError_MissingKeyOrigin) { - var pre_field0 = cst_encode_String(apiObj.field0); + if (apiObj is CreateTxError_Psbt) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); wireObj.tag = 21; - wireObj.kind.MissingKeyOrigin.field0 = pre_field0; + wireObj.kind.Psbt.error_message = pre_error_message; return; } - if (apiObj is BdkError_Key) { - var pre_field0 = cst_encode_String(apiObj.field0); + if (apiObj is CreateTxError_MissingKeyOrigin) { + var pre_key = cst_encode_String(apiObj.key); wireObj.tag = 22; - wireObj.kind.Key.field0 = pre_field0; + wireObj.kind.MissingKeyOrigin.key = pre_key; return; } - if (apiObj is BdkError_ChecksumMismatch) { + if (apiObj is CreateTxError_UnknownUtxo) { + var pre_outpoint = cst_encode_String(apiObj.outpoint); wireObj.tag = 23; + wireObj.kind.UnknownUtxo.outpoint = pre_outpoint; return; } - if (apiObj is BdkError_SpendingPolicyRequired) { - var pre_field0 = cst_encode_keychain_kind(apiObj.field0); + if (apiObj is CreateTxError_MissingNonWitnessUtxo) { + var pre_outpoint = cst_encode_String(apiObj.outpoint); wireObj.tag = 24; - wireObj.kind.SpendingPolicyRequired.field0 = pre_field0; + wireObj.kind.MissingNonWitnessUtxo.outpoint = pre_outpoint; return; } - if (apiObj is BdkError_InvalidPolicyPathError) { - var pre_field0 = cst_encode_String(apiObj.field0); + if (apiObj is CreateTxError_MiniscriptPsbt) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); wireObj.tag = 25; - wireObj.kind.InvalidPolicyPathError.field0 = pre_field0; + wireObj.kind.MiniscriptPsbt.error_message = pre_error_message; return; } - if (apiObj is BdkError_Signer) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 26; - wireObj.kind.Signer.field0 = pre_field0; + } + + @protected + void cst_api_fill_to_wire_create_with_persist_error( + CreateWithPersistError apiObj, + wire_cst_create_with_persist_error wireObj) { + if (apiObj is CreateWithPersistError_Persist) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 0; + wireObj.kind.Persist.error_message = pre_error_message; return; } - if (apiObj is BdkError_InvalidNetwork) { - var pre_requested = cst_encode_network(apiObj.requested); - var pre_found = cst_encode_network(apiObj.found); - wireObj.tag = 27; - wireObj.kind.InvalidNetwork.requested = pre_requested; - wireObj.kind.InvalidNetwork.found = pre_found; + if (apiObj is CreateWithPersistError_DataAlreadyExists) { + wireObj.tag = 1; return; } - if (apiObj is BdkError_InvalidOutpoint) { - var pre_field0 = cst_encode_box_autoadd_out_point(apiObj.field0); - wireObj.tag = 28; - wireObj.kind.InvalidOutpoint.field0 = pre_field0; + if (apiObj is CreateWithPersistError_Descriptor) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 2; + wireObj.kind.Descriptor.error_message = pre_error_message; return; } - if (apiObj is BdkError_Encode) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 29; - wireObj.kind.Encode.field0 = pre_field0; + } + + @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 BdkError_Miniscript) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 30; - wireObj.kind.Miniscript.field0 = pre_field0; + if (apiObj is DescriptorError_MissingPrivateData) { + wireObj.tag = 1; return; } - if (apiObj is BdkError_MiniscriptPsbt) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 31; - wireObj.kind.MiniscriptPsbt.field0 = pre_field0; + if (apiObj is DescriptorError_InvalidDescriptorChecksum) { + wireObj.tag = 2; return; } - if (apiObj is BdkError_Bip32) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 32; - wireObj.kind.Bip32.field0 = pre_field0; + if (apiObj is DescriptorError_HardenedDerivationXpub) { + wireObj.tag = 3; return; } - if (apiObj is BdkError_Bip39) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 33; - wireObj.kind.Bip39.field0 = pre_field0; + if (apiObj is DescriptorError_MultiPath) { + wireObj.tag = 4; return; } - if (apiObj is BdkError_Secp256k1) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 34; - wireObj.kind.Secp256k1.field0 = pre_field0; + if (apiObj is DescriptorError_Key) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 5; + wireObj.kind.Key.error_message = pre_error_message; return; } - if (apiObj is BdkError_Json) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 35; - wireObj.kind.Json.field0 = pre_field0; + if (apiObj is DescriptorError_Generic) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 6; + wireObj.kind.Generic.error_message = pre_error_message; return; } - if (apiObj is BdkError_Psbt) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 36; - wireObj.kind.Psbt.field0 = pre_field0; + if (apiObj is DescriptorError_Policy) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 7; + wireObj.kind.Policy.error_message = pre_error_message; return; } - if (apiObj is BdkError_PsbtParse) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 37; - wireObj.kind.PsbtParse.field0 = pre_field0; + if (apiObj is DescriptorError_InvalidDescriptorCharacter) { + var pre_charector = cst_encode_String(apiObj.charector); + wireObj.tag = 8; + wireObj.kind.InvalidDescriptorCharacter.charector = pre_charector; return; } - if (apiObj is BdkError_MissingCachedScripts) { - var pre_field0 = cst_encode_usize(apiObj.field0); - var pre_field1 = cst_encode_usize(apiObj.field1); - wireObj.tag = 38; - wireObj.kind.MissingCachedScripts.field0 = pre_field0; - wireObj.kind.MissingCachedScripts.field1 = pre_field1; + if (apiObj is DescriptorError_Bip32) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 9; + wireObj.kind.Bip32.error_message = pre_error_message; return; } - if (apiObj is BdkError_Electrum) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 39; - wireObj.kind.Electrum.field0 = pre_field0; + if (apiObj is DescriptorError_Base58) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 10; + wireObj.kind.Base58.error_message = pre_error_message; return; } - if (apiObj is BdkError_Esplora) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 40; - wireObj.kind.Esplora.field0 = pre_field0; + if (apiObj is DescriptorError_Pk) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 11; + wireObj.kind.Pk.error_message = pre_error_message; return; } - if (apiObj is BdkError_Sled) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 41; - wireObj.kind.Sled.field0 = pre_field0; + if (apiObj is DescriptorError_Miniscript) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 12; + wireObj.kind.Miniscript.error_message = pre_error_message; return; } - if (apiObj is BdkError_Rpc) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 42; - wireObj.kind.Rpc.field0 = pre_field0; + if (apiObj is DescriptorError_Hex) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 13; + wireObj.kind.Hex.error_message = pre_error_message; return; } - if (apiObj is BdkError_Rusqlite) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 43; - wireObj.kind.Rusqlite.field0 = pre_field0; + if (apiObj is DescriptorError_ExternalAndInternalAreTheSame) { + wireObj.tag = 14; return; } - if (apiObj is BdkError_InvalidInput) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 44; - wireObj.kind.InvalidInput.field0 = pre_field0; + } + + @protected + void cst_api_fill_to_wire_descriptor_key_error( + DescriptorKeyError apiObj, wire_cst_descriptor_key_error wireObj) { + if (apiObj is DescriptorKeyError_Parse) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 0; + wireObj.kind.Parse.error_message = pre_error_message; return; } - if (apiObj is BdkError_InvalidLockTime) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 45; - wireObj.kind.InvalidLockTime.field0 = pre_field0; + if (apiObj is DescriptorKeyError_InvalidKeyType) { + wireObj.tag = 1; return; } - if (apiObj is BdkError_InvalidTransaction) { - var pre_field0 = cst_encode_String(apiObj.field0); - wireObj.tag = 46; - wireObj.kind.InvalidTransaction.field0 = pre_field0; + if (apiObj is DescriptorKeyError_Bip32) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 2; + wireObj.kind.Bip32.error_message = pre_error_message; return; } } @protected - void cst_api_fill_to_wire_bdk_mnemonic( - BdkMnemonic apiObj, wire_cst_bdk_mnemonic wireObj) { - wireObj.ptr = cst_encode_RustOpaque_bdkkeysbip39Mnemonic(apiObj.ptr); - } - - @protected - void cst_api_fill_to_wire_bdk_psbt( - BdkPsbt apiObj, wire_cst_bdk_psbt wireObj) { - wireObj.ptr = - cst_encode_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( - apiObj.ptr); - } - - @protected - void cst_api_fill_to_wire_bdk_script_buf( - BdkScriptBuf apiObj, wire_cst_bdk_script_buf wireObj) { - wireObj.bytes = cst_encode_list_prim_u_8_strict(apiObj.bytes); - } - - @protected - void cst_api_fill_to_wire_bdk_transaction( - BdkTransaction apiObj, wire_cst_bdk_transaction wireObj) { - wireObj.s = cst_encode_String(apiObj.s); - } - - @protected - void cst_api_fill_to_wire_bdk_wallet( - BdkWallet apiObj, wire_cst_bdk_wallet wireObj) { - wireObj.ptr = - cst_encode_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( - apiObj.ptr); - } - - @protected - void cst_api_fill_to_wire_block_time( - BlockTime apiObj, wire_cst_block_time wireObj) { - wireObj.height = cst_encode_u_32(apiObj.height); - wireObj.timestamp = cst_encode_u_64(apiObj.timestamp); - } - - @protected - void cst_api_fill_to_wire_blockchain_config( - BlockchainConfig apiObj, wire_cst_blockchain_config wireObj) { - if (apiObj is BlockchainConfig_Electrum) { - var pre_config = cst_encode_box_autoadd_electrum_config(apiObj.config); + void cst_api_fill_to_wire_electrum_error( + ElectrumError apiObj, wire_cst_electrum_error wireObj) { + if (apiObj is ElectrumError_IOError) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); wireObj.tag = 0; - wireObj.kind.Electrum.config = pre_config; + wireObj.kind.IOError.error_message = pre_error_message; return; } - if (apiObj is BlockchainConfig_Esplora) { - var pre_config = cst_encode_box_autoadd_esplora_config(apiObj.config); + if (apiObj is ElectrumError_Json) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); wireObj.tag = 1; - wireObj.kind.Esplora.config = pre_config; + wireObj.kind.Json.error_message = pre_error_message; return; } - if (apiObj is BlockchainConfig_Rpc) { - var pre_config = cst_encode_box_autoadd_rpc_config(apiObj.config); + if (apiObj is ElectrumError_Hex) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); wireObj.tag = 2; - wireObj.kind.Rpc.config = pre_config; + wireObj.kind.Hex.error_message = pre_error_message; + return; + } + if (apiObj is ElectrumError_Protocol) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 3; + wireObj.kind.Protocol.error_message = pre_error_message; + return; + } + if (apiObj is ElectrumError_Bitcoin) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 4; + wireObj.kind.Bitcoin.error_message = pre_error_message; + return; + } + if (apiObj is ElectrumError_AlreadySubscribed) { + wireObj.tag = 5; + return; + } + if (apiObj is ElectrumError_NotSubscribed) { + wireObj.tag = 6; + return; + } + if (apiObj is ElectrumError_InvalidResponse) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 7; + wireObj.kind.InvalidResponse.error_message = pre_error_message; + return; + } + if (apiObj is ElectrumError_Message) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 8; + wireObj.kind.Message.error_message = pre_error_message; + return; + } + if (apiObj is ElectrumError_InvalidDNSNameError) { + var pre_domain = cst_encode_String(apiObj.domain); + wireObj.tag = 9; + wireObj.kind.InvalidDNSNameError.domain = pre_domain; + return; + } + if (apiObj is ElectrumError_MissingDomain) { + wireObj.tag = 10; + return; + } + if (apiObj is ElectrumError_AllAttemptsErrored) { + wireObj.tag = 11; + return; + } + if (apiObj is ElectrumError_SharedIOError) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 12; + wireObj.kind.SharedIOError.error_message = pre_error_message; + return; + } + if (apiObj is ElectrumError_CouldntLockReader) { + wireObj.tag = 13; + return; + } + if (apiObj is ElectrumError_Mpsc) { + wireObj.tag = 14; + return; + } + if (apiObj is ElectrumError_CouldNotCreateConnection) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 15; + wireObj.kind.CouldNotCreateConnection.error_message = pre_error_message; + return; + } + if (apiObj is ElectrumError_RequestAlreadyConsumed) { + wireObj.tag = 16; 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); + void cst_api_fill_to_wire_esplora_error( + EsploraError apiObj, wire_cst_esplora_error wireObj) { + if (apiObj is EsploraError_Minreq) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 0; + wireObj.kind.Minreq.error_message = pre_error_message; + return; + } + if (apiObj is EsploraError_HttpResponse) { + var pre_status = cst_encode_u_16(apiObj.status); + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 1; + wireObj.kind.HttpResponse.status = pre_status; + wireObj.kind.HttpResponse.error_message = pre_error_message; + return; + } + if (apiObj is EsploraError_Parsing) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 2; + wireObj.kind.Parsing.error_message = pre_error_message; + return; + } + if (apiObj is EsploraError_StatusCode) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 3; + wireObj.kind.StatusCode.error_message = pre_error_message; + return; + } + if (apiObj is EsploraError_BitcoinEncoding) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 4; + wireObj.kind.BitcoinEncoding.error_message = pre_error_message; + return; + } + if (apiObj is EsploraError_HexToArray) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 5; + wireObj.kind.HexToArray.error_message = pre_error_message; + return; + } + if (apiObj is EsploraError_HexToBytes) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 6; + wireObj.kind.HexToBytes.error_message = pre_error_message; + return; + } + if (apiObj is EsploraError_TransactionNotFound) { + wireObj.tag = 7; + return; + } + if (apiObj is EsploraError_HeaderHeightNotFound) { + var pre_height = cst_encode_u_32(apiObj.height); + wireObj.tag = 8; + wireObj.kind.HeaderHeightNotFound.height = pre_height; + return; + } + if (apiObj is EsploraError_HeaderHashNotFound) { + wireObj.tag = 9; + return; + } + if (apiObj is EsploraError_InvalidHttpHeaderName) { + var pre_name = cst_encode_String(apiObj.name); + wireObj.tag = 10; + wireObj.kind.InvalidHttpHeaderName.name = pre_name; + return; + } + if (apiObj is EsploraError_InvalidHttpHeaderValue) { + var pre_value = cst_encode_String(apiObj.value); + wireObj.tag = 11; + wireObj.kind.InvalidHttpHeaderValue.value = pre_value; + return; + } + if (apiObj is EsploraError_RequestAlreadyConsumed) { + wireObj.tag = 12; + return; + } } @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); + void cst_api_fill_to_wire_extract_tx_error( + ExtractTxError apiObj, wire_cst_extract_tx_error wireObj) { + if (apiObj is ExtractTxError_AbsurdFeeRate) { + var pre_fee_rate = cst_encode_u_64(apiObj.feeRate); + wireObj.tag = 0; + wireObj.kind.AbsurdFeeRate.fee_rate = pre_fee_rate; + return; + } + if (apiObj is ExtractTxError_MissingInputValue) { + wireObj.tag = 1; + return; + } + if (apiObj is ExtractTxError_SendingTooMuch) { + wireObj.tag = 2; + return; + } + if (apiObj is ExtractTxError_OtherExtractTxErr) { + wireObj.tag = 3; + return; + } } @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); + void cst_api_fill_to_wire_fee_rate( + FeeRate apiObj, wire_cst_fee_rate wireObj) { + wireObj.sat_kwu = cst_encode_u_64(apiObj.satKwu); } @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_ffi_address( + FfiAddress apiObj, wire_cst_ffi_address wireObj) { + wireObj.field0 = + cst_encode_RustOpaque_bdk_corebitcoinAddress(apiObj.field0); } @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); + void cst_api_fill_to_wire_ffi_canonical_tx( + FfiCanonicalTx apiObj, wire_cst_ffi_canonical_tx wireObj) { + cst_api_fill_to_wire_ffi_transaction( + apiObj.transaction, wireObj.transaction); + cst_api_fill_to_wire_chain_position( + apiObj.chainPosition, wireObj.chain_position); } @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); + void cst_api_fill_to_wire_ffi_connection( + FfiConnection apiObj, wire_cst_ffi_connection wireObj) { + wireObj.field0 = + cst_encode_RustOpaque_stdsyncMutexbdk_walletrusqliteConnection( + apiObj.field0); } @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); + void cst_api_fill_to_wire_ffi_derivation_path( + FfiDerivationPath apiObj, wire_cst_ffi_derivation_path wireObj) { + wireObj.opaque = cst_encode_RustOpaque_bdk_walletbitcoinbip32DerivationPath( + apiObj.opaque); } @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); + void cst_api_fill_to_wire_ffi_descriptor( + FfiDescriptor apiObj, wire_cst_ffi_descriptor wireObj) { + wireObj.extended_descriptor = + cst_encode_RustOpaque_bdk_walletdescriptorExtendedDescriptor( + apiObj.extendedDescriptor); + wireObj.key_map = cst_encode_RustOpaque_bdk_walletkeysKeyMap(apiObj.keyMap); } @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); + void cst_api_fill_to_wire_ffi_descriptor_public_key( + FfiDescriptorPublicKey apiObj, + wire_cst_ffi_descriptor_public_key wireObj) { + wireObj.opaque = + cst_encode_RustOpaque_bdk_walletkeysDescriptorPublicKey(apiObj.opaque); } @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); + void cst_api_fill_to_wire_ffi_descriptor_secret_key( + FfiDescriptorSecretKey apiObj, + wire_cst_ffi_descriptor_secret_key wireObj) { + wireObj.opaque = + cst_encode_RustOpaque_bdk_walletkeysDescriptorSecretKey(apiObj.opaque); } @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); + void cst_api_fill_to_wire_ffi_electrum_client( + FfiElectrumClient apiObj, wire_cst_ffi_electrum_client wireObj) { + wireObj.opaque = + cst_encode_RustOpaque_bdk_electrumBdkElectrumClientbdk_electrumelectrum_clientClient( + apiObj.opaque); } @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); + void cst_api_fill_to_wire_ffi_esplora_client( + FfiEsploraClient apiObj, wire_cst_ffi_esplora_client wireObj) { + wireObj.opaque = + cst_encode_RustOpaque_bdk_esploraesplora_clientBlockingClient( + apiObj.opaque); } @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); + void cst_api_fill_to_wire_ffi_full_scan_request( + FfiFullScanRequest apiObj, wire_cst_ffi_full_scan_request wireObj) { + wireObj.field0 = + cst_encode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestbdk_walletKeychainKind( + apiObj.field0); } @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); + void cst_api_fill_to_wire_ffi_full_scan_request_builder( + FfiFullScanRequestBuilder apiObj, + wire_cst_ffi_full_scan_request_builder wireObj) { + wireObj.field0 = + cst_encode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestBuilderbdk_walletKeychainKind( + apiObj.field0); } @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); + void cst_api_fill_to_wire_ffi_mnemonic( + FfiMnemonic apiObj, wire_cst_ffi_mnemonic wireObj) { + wireObj.opaque = + cst_encode_RustOpaque_bdk_walletkeysbip39Mnemonic(apiObj.opaque); } @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); + void cst_api_fill_to_wire_ffi_policy( + FfiPolicy apiObj, wire_cst_ffi_policy wireObj) { + wireObj.opaque = + cst_encode_RustOpaque_bdk_walletdescriptorPolicy(apiObj.opaque); } @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); + void cst_api_fill_to_wire_ffi_psbt( + FfiPsbt apiObj, wire_cst_ffi_psbt wireObj) { + wireObj.opaque = cst_encode_RustOpaque_stdsyncMutexbdk_corebitcoinpsbtPsbt( + apiObj.opaque); } @protected - void cst_api_fill_to_wire_box_autoadd_record_out_point_input_usize( - (OutPoint, Input, BigInt) apiObj, - ffi.Pointer wireObj) { - cst_api_fill_to_wire_record_out_point_input_usize(apiObj, wireObj.ref); + void cst_api_fill_to_wire_ffi_script_buf( + FfiScriptBuf apiObj, wire_cst_ffi_script_buf wireObj) { + wireObj.bytes = cst_encode_list_prim_u_8_strict(apiObj.bytes); } @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); + void cst_api_fill_to_wire_ffi_sync_request( + FfiSyncRequest apiObj, wire_cst_ffi_sync_request wireObj) { + wireObj.field0 = + cst_encode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestbdk_walletKeychainKindu32( + apiObj.field0); } @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); + void cst_api_fill_to_wire_ffi_sync_request_builder( + FfiSyncRequestBuilder apiObj, wire_cst_ffi_sync_request_builder wireObj) { + wireObj.field0 = + cst_encode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestBuilderbdk_walletKeychainKindu32( + apiObj.field0); } @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); + void cst_api_fill_to_wire_ffi_transaction( + FfiTransaction apiObj, wire_cst_ffi_transaction wireObj) { + wireObj.opaque = + cst_encode_RustOpaque_bdk_corebitcoinTransaction(apiObj.opaque); } @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); + void cst_api_fill_to_wire_ffi_update( + FfiUpdate apiObj, wire_cst_ffi_update wireObj) { + wireObj.field0 = cst_encode_RustOpaque_bdk_walletUpdate(apiObj.field0); } @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); + void cst_api_fill_to_wire_ffi_wallet( + FfiWallet apiObj, wire_cst_ffi_wallet wireObj) { + wireObj.opaque = + cst_encode_RustOpaque_stdsyncMutexbdk_walletPersistedWalletbdk_walletrusqliteConnection( + apiObj.opaque); } @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); + void cst_api_fill_to_wire_from_script_error( + FromScriptError apiObj, wire_cst_from_script_error wireObj) { + if (apiObj is FromScriptError_UnrecognizedScript) { 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); + if (apiObj is FromScriptError_WitnessProgram) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); wireObj.tag = 1; - wireObj.kind.OversizedVectorAllocation.requested = pre_requested; - wireObj.kind.OversizedVectorAllocation.max = pre_max; + wireObj.kind.WitnessProgram.error_message = pre_error_message; 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); + if (apiObj is FromScriptError_WitnessVersion) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); wireObj.tag = 2; - wireObj.kind.InvalidChecksum.expected = pre_expected; - wireObj.kind.InvalidChecksum.actual = pre_actual; + wireObj.kind.WitnessVersion.error_message = pre_error_message; return; } - if (apiObj is ConsensusError_NonMinimalVarInt) { + if (apiObj is FromScriptError_OtherFromScriptErr) { 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) { + void cst_api_fill_to_wire_load_with_persist_error( + LoadWithPersistError apiObj, wire_cst_load_with_persist_error wireObj) { + if (apiObj is LoadWithPersistError_Persist) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); wireObj.tag = 0; + wireObj.kind.Persist.error_message = pre_error_message; return; } - if (apiObj is DatabaseConfig_Sqlite) { - var pre_config = - cst_encode_box_autoadd_sqlite_db_configuration(apiObj.config); + if (apiObj is LoadWithPersistError_InvalidChangeSet) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); wireObj.tag = 1; - wireObj.kind.Sqlite.config = pre_config; + wireObj.kind.InvalidChangeSet.error_message = pre_error_message; return; } - if (apiObj is DatabaseConfig_Sled) { - var pre_config = - cst_encode_box_autoadd_sled_db_configuration(apiObj.config); + if (apiObj is LoadWithPersistError_CouldNotLoad) { 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) { + void cst_api_fill_to_wire_local_output( + LocalOutput apiObj, wire_cst_local_output 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_psbt_error( + PsbtError apiObj, wire_cst_psbt_error wireObj) { + if (apiObj is PsbtError_InvalidMagic) { + wireObj.tag = 0; + return; + } + if (apiObj is PsbtError_MissingUtxo) { + wireObj.tag = 1; + return; + } + if (apiObj is PsbtError_InvalidSeparator) { wireObj.tag = 2; return; } - if (apiObj is DescriptorError_MultiPath) { + if (apiObj is PsbtError_PsbtUtxoOutOfBounds) { wireObj.tag = 3; return; } - if (apiObj is DescriptorError_Key) { - var pre_field0 = cst_encode_String(apiObj.field0); + if (apiObj is PsbtError_InvalidKey) { + var pre_key = cst_encode_String(apiObj.key); wireObj.tag = 4; - wireObj.kind.Key.field0 = pre_field0; + wireObj.kind.InvalidKey.key = pre_key; return; } - if (apiObj is DescriptorError_Policy) { - var pre_field0 = cst_encode_String(apiObj.field0); + if (apiObj is PsbtError_InvalidProprietaryKey) { wireObj.tag = 5; - wireObj.kind.Policy.field0 = pre_field0; return; } - if (apiObj is DescriptorError_InvalidDescriptorCharacter) { - var pre_field0 = cst_encode_u_8(apiObj.field0); + if (apiObj is PsbtError_DuplicateKey) { + var pre_key = cst_encode_String(apiObj.key); wireObj.tag = 6; - wireObj.kind.InvalidDescriptorCharacter.field0 = pre_field0; + wireObj.kind.DuplicateKey.key = pre_key; return; } - if (apiObj is DescriptorError_Bip32) { - var pre_field0 = cst_encode_String(apiObj.field0); + if (apiObj is PsbtError_UnsignedTxHasScriptSigs) { wireObj.tag = 7; - wireObj.kind.Bip32.field0 = pre_field0; return; } - if (apiObj is DescriptorError_Base58) { - var pre_field0 = cst_encode_String(apiObj.field0); + if (apiObj is PsbtError_UnsignedTxHasScriptWitnesses) { wireObj.tag = 8; - wireObj.kind.Base58.field0 = pre_field0; return; } - if (apiObj is DescriptorError_Pk) { - var pre_field0 = cst_encode_String(apiObj.field0); + if (apiObj is PsbtError_MustHaveUnsignedTx) { wireObj.tag = 9; - wireObj.kind.Pk.field0 = pre_field0; return; } - if (apiObj is DescriptorError_Miniscript) { - var pre_field0 = cst_encode_String(apiObj.field0); + if (apiObj is PsbtError_NoMorePairs) { wireObj.tag = 10; - wireObj.kind.Miniscript.field0 = pre_field0; return; } - if (apiObj is DescriptorError_Hex) { - var pre_field0 = cst_encode_String(apiObj.field0); + if (apiObj is PsbtError_UnexpectedUnsignedTx) { 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; + if (apiObj is PsbtError_NonStandardSighashType) { + var pre_sighash = cst_encode_u_32(apiObj.sighash); + wireObj.tag = 12; + wireObj.kind.NonStandardSighashType.sighash = pre_sighash; return; } - if (apiObj is HexError_OddLengthString) { - var pre_field0 = cst_encode_usize(apiObj.field0); - wireObj.tag = 1; - wireObj.kind.OddLengthString.field0 = pre_field0; + if (apiObj is PsbtError_InvalidHash) { + var pre_hash = cst_encode_String(apiObj.hash); + wireObj.tag = 13; + wireObj.kind.InvalidHash.hash = pre_hash; 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; + if (apiObj is PsbtError_InvalidPreimageHashPair) { + wireObj.tag = 14; 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; + if (apiObj is PsbtError_CombineInconsistentKeySources) { + var pre_xpub = cst_encode_String(apiObj.xpub); + wireObj.tag = 15; + wireObj.kind.CombineInconsistentKeySources.xpub = pre_xpub; return; } - if (apiObj is LockTime_Seconds) { - var pre_field0 = cst_encode_u_32(apiObj.field0); - wireObj.tag = 1; - wireObj.kind.Seconds.field0 = pre_field0; + if (apiObj is PsbtError_ConsensusEncoding) { + var pre_encoding_error = cst_encode_String(apiObj.encodingError); + wireObj.tag = 16; + wireObj.kind.ConsensusEncoding.encoding_error = pre_encoding_error; 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; + if (apiObj is PsbtError_NegativeFee) { + wireObj.tag = 17; 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; + if (apiObj is PsbtError_FeeOverflow) { + wireObj.tag = 18; 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; + if (apiObj is PsbtError_InvalidPublicKey) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 19; + wireObj.kind.InvalidPublicKey.error_message = pre_error_message; + return; + } + if (apiObj is PsbtError_InvalidSecp256k1PublicKey) { + var pre_secp256k1_error = cst_encode_String(apiObj.secp256K1Error); + wireObj.tag = 20; + wireObj.kind.InvalidSecp256k1PublicKey.secp256k1_error = + pre_secp256k1_error; + return; + } + if (apiObj is PsbtError_InvalidXOnlyPublicKey) { + wireObj.tag = 21; + return; + } + if (apiObj is PsbtError_InvalidEcdsaSignature) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 22; + wireObj.kind.InvalidEcdsaSignature.error_message = pre_error_message; + return; + } + if (apiObj is PsbtError_InvalidTaprootSignature) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 23; + wireObj.kind.InvalidTaprootSignature.error_message = pre_error_message; + return; + } + if (apiObj is PsbtError_InvalidControlBlock) { + wireObj.tag = 24; + return; + } + if (apiObj is PsbtError_InvalidLeafVersion) { + wireObj.tag = 25; + return; + } + if (apiObj is PsbtError_Taproot) { + wireObj.tag = 26; + return; + } + if (apiObj is PsbtError_TapTree) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 27; + wireObj.kind.TapTree.error_message = pre_error_message; + return; + } + if (apiObj is PsbtError_XPubKey) { + wireObj.tag = 28; + return; + } + if (apiObj is PsbtError_Version) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 29; + wireObj.kind.Version.error_message = pre_error_message; + return; + } + if (apiObj is PsbtError_PartialDataConsumption) { + wireObj.tag = 30; + return; + } + if (apiObj is PsbtError_Io) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 31; + wireObj.kind.Io.error_message = pre_error_message; + return; + } + if (apiObj is PsbtError_OtherPsbtErr) { + wireObj.tag = 32; 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); + void cst_api_fill_to_wire_psbt_parse_error( + PsbtParseError apiObj, wire_cst_psbt_parse_error wireObj) { + if (apiObj is PsbtParseError_PsbtEncoding) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 0; + wireObj.kind.PsbtEncoding.error_message = pre_error_message; + return; + } + if (apiObj is PsbtParseError_Base64Encoding) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 1; + wireObj.kind.Base64Encoding.error_message = pre_error_message; + return; + } } @protected @@ -2482,54 +2872,29 @@ abstract class coreApiImplPlatform 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, BigInt) apiObj, - wire_cst_record_out_point_input_usize wireObj) { - cst_api_fill_to_wire_out_point(apiObj.$1, wireObj.field0); - cst_api_fill_to_wire_input(apiObj.$2, wireObj.field1); - wireObj.field2 = cst_encode_usize(apiObj.$3); - } - - @protected - void cst_api_fill_to_wire_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); + void cst_api_fill_to_wire_record_ffi_script_buf_u_64( + (FfiScriptBuf, BigInt) apiObj, + wire_cst_record_ffi_script_buf_u_64 wireObj) { + cst_api_fill_to_wire_ffi_script_buf(apiObj.$1, wireObj.field0); + wireObj.field1 = cst_encode_u_64(apiObj.$2); } @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); + void + cst_api_fill_to_wire_record_map_string_list_prim_usize_strict_keychain_kind( + (Map, KeychainKind) apiObj, + wire_cst_record_map_string_list_prim_usize_strict_keychain_kind + wireObj) { + wireObj.field0 = cst_encode_Map_String_list_prim_usize_strict(apiObj.$1); + wireObj.field1 = cst_encode_keychain_kind(apiObj.$2); } @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); + void cst_api_fill_to_wire_record_string_list_prim_usize_strict( + (String, Uint64List) apiObj, + wire_cst_record_string_list_prim_usize_strict wireObj) { + wireObj.field0 = cst_encode_String(apiObj.$1); + wireObj.field1 = cst_encode_list_prim_usize_strict(apiObj.$2); } @protected @@ -2539,7 +2904,6 @@ abstract class coreApiImplPlatform extends BaseApiImpl { 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); @@ -2547,36 +2911,156 @@ abstract class coreApiImplPlatform extends BaseApiImpl { } @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); + void cst_api_fill_to_wire_signer_error( + SignerError apiObj, wire_cst_signer_error wireObj) { + if (apiObj is SignerError_MissingKey) { + wireObj.tag = 0; + return; + } + if (apiObj is SignerError_InvalidKey) { + wireObj.tag = 1; + return; + } + if (apiObj is SignerError_UserCanceled) { + wireObj.tag = 2; + return; + } + if (apiObj is SignerError_InputIndexOutOfRange) { + wireObj.tag = 3; + return; + } + if (apiObj is SignerError_MissingNonWitnessUtxo) { + wireObj.tag = 4; + return; + } + if (apiObj is SignerError_InvalidNonWitnessUtxo) { + wireObj.tag = 5; + return; + } + if (apiObj is SignerError_MissingWitnessUtxo) { + wireObj.tag = 6; + return; + } + if (apiObj is SignerError_MissingWitnessScript) { + wireObj.tag = 7; + return; + } + if (apiObj is SignerError_MissingHdKeypath) { + wireObj.tag = 8; + return; + } + if (apiObj is SignerError_NonStandardSighash) { + wireObj.tag = 9; + return; + } + if (apiObj is SignerError_InvalidSighash) { + wireObj.tag = 10; + return; + } + if (apiObj is SignerError_SighashP2wpkh) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 11; + wireObj.kind.SighashP2wpkh.error_message = pre_error_message; + return; + } + if (apiObj is SignerError_SighashTaproot) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 12; + wireObj.kind.SighashTaproot.error_message = pre_error_message; + return; + } + if (apiObj is SignerError_TxInputsIndexError) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 13; + wireObj.kind.TxInputsIndexError.error_message = pre_error_message; + return; + } + if (apiObj is SignerError_MiniscriptPsbt) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 14; + wireObj.kind.MiniscriptPsbt.error_message = pre_error_message; + return; + } + if (apiObj is SignerError_External) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 15; + wireObj.kind.External.error_message = pre_error_message; + return; + } + if (apiObj is SignerError_Psbt) { + var pre_error_message = cst_encode_String(apiObj.errorMessage); + wireObj.tag = 16; + wireObj.kind.Psbt.error_message = pre_error_message; + return; + } + } + + @protected + void cst_api_fill_to_wire_sqlite_error( + SqliteError apiObj, wire_cst_sqlite_error wireObj) { + if (apiObj is SqliteError_Sqlite) { + var pre_rusqlite_error = cst_encode_String(apiObj.rusqliteError); + wireObj.tag = 0; + wireObj.kind.Sqlite.rusqlite_error = pre_rusqlite_error; + return; + } } @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); + void cst_api_fill_to_wire_sync_progress( + SyncProgress apiObj, wire_cst_sync_progress wireObj) { + wireObj.spks_consumed = cst_encode_u_64(apiObj.spksConsumed); + wireObj.spks_remaining = cst_encode_u_64(apiObj.spksRemaining); + wireObj.txids_consumed = cst_encode_u_64(apiObj.txidsConsumed); + wireObj.txids_remaining = cst_encode_u_64(apiObj.txidsRemaining); + wireObj.outpoints_consumed = cst_encode_u_64(apiObj.outpointsConsumed); + wireObj.outpoints_remaining = cst_encode_u_64(apiObj.outpointsRemaining); } @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); + void cst_api_fill_to_wire_transaction_error( + TransactionError apiObj, wire_cst_transaction_error wireObj) { + if (apiObj is TransactionError_Io) { + wireObj.tag = 0; + return; + } + if (apiObj is TransactionError_OversizedVectorAllocation) { + wireObj.tag = 1; + return; + } + if (apiObj is TransactionError_InvalidChecksum) { + var pre_expected = cst_encode_String(apiObj.expected); + var pre_actual = cst_encode_String(apiObj.actual); + wireObj.tag = 2; + wireObj.kind.InvalidChecksum.expected = pre_expected; + wireObj.kind.InvalidChecksum.actual = pre_actual; + return; + } + if (apiObj is TransactionError_NonMinimalVarInt) { + wireObj.tag = 3; + return; + } + if (apiObj is TransactionError_ParseFailed) { + wireObj.tag = 4; + return; + } + if (apiObj is TransactionError_UnsupportedSegwitFlag) { + var pre_flag = cst_encode_u_8(apiObj.flag); + wireObj.tag = 5; + wireObj.kind.UnsupportedSegwitFlag.flag = pre_flag; + return; + } + if (apiObj is TransactionError_OtherTransactionErr) { + wireObj.tag = 6; + return; + } } @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); + cst_api_fill_to_wire_ffi_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); } @@ -2584,375 +3068,521 @@ abstract class coreApiImplPlatform 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_bdk_script_buf( + cst_api_fill_to_wire_ffi_script_buf( apiObj.scriptPubkey, wireObj.script_pubkey); } @protected - int cst_encode_RustOpaque_bdkbitcoinAddress(Address raw); + void cst_api_fill_to_wire_txid_parse_error( + TxidParseError apiObj, wire_cst_txid_parse_error wireObj) { + if (apiObj is TxidParseError_InvalidTxid) { + var pre_txid = cst_encode_String(apiObj.txid); + wireObj.tag = 0; + wireObj.kind.InvalidTxid.txid = pre_txid; + return; + } + } @protected - int cst_encode_RustOpaque_bdkbitcoinbip32DerivationPath(DerivationPath raw); + PlatformPointer + cst_encode_DartFn_Inputs_ffi_script_buf_sync_progress_Output_unit_AnyhowException( + FutureOr Function(FfiScriptBuf, SyncProgress) raw); @protected - int cst_encode_RustOpaque_bdkblockchainAnyBlockchain(AnyBlockchain raw); + PlatformPointer + cst_encode_DartFn_Inputs_keychain_kind_u_32_ffi_script_buf_Output_unit_AnyhowException( + FutureOr Function(KeychainKind, int, FfiScriptBuf) raw); @protected - int cst_encode_RustOpaque_bdkdescriptorExtendedDescriptor( - ExtendedDescriptor raw); + PlatformPointer cst_encode_DartOpaque(Object raw); @protected - int cst_encode_RustOpaque_bdkkeysDescriptorPublicKey(DescriptorPublicKey raw); + int cst_encode_RustOpaque_bdk_corebitcoinAddress(Address raw); @protected - int cst_encode_RustOpaque_bdkkeysDescriptorSecretKey(DescriptorSecretKey raw); + int cst_encode_RustOpaque_bdk_corebitcoinTransaction(Transaction raw); @protected - int cst_encode_RustOpaque_bdkkeysKeyMap(KeyMap raw); + int cst_encode_RustOpaque_bdk_electrumBdkElectrumClientbdk_electrumelectrum_clientClient( + BdkElectrumClientClient raw); @protected - int cst_encode_RustOpaque_bdkkeysbip39Mnemonic(Mnemonic raw); + int cst_encode_RustOpaque_bdk_esploraesplora_clientBlockingClient( + BlockingClient raw); @protected - int cst_encode_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( - MutexWalletAnyDatabase raw); + int cst_encode_RustOpaque_bdk_walletUpdate(Update raw); @protected - int cst_encode_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( - MutexPartiallySignedTransaction raw); + int cst_encode_RustOpaque_bdk_walletbitcoinbip32DerivationPath( + DerivationPath raw); @protected - bool cst_encode_bool(bool raw); + int cst_encode_RustOpaque_bdk_walletdescriptorExtendedDescriptor( + ExtendedDescriptor raw); @protected - int cst_encode_change_spend_policy(ChangeSpendPolicy raw); + int cst_encode_RustOpaque_bdk_walletdescriptorPolicy(Policy raw); @protected - double cst_encode_f_32(double raw); + int cst_encode_RustOpaque_bdk_walletkeysDescriptorPublicKey( + DescriptorPublicKey raw); @protected - int cst_encode_i_32(int raw); + int cst_encode_RustOpaque_bdk_walletkeysDescriptorSecretKey( + DescriptorSecretKey raw); @protected - int cst_encode_keychain_kind(KeychainKind raw); + int cst_encode_RustOpaque_bdk_walletkeysKeyMap(KeyMap raw); @protected - int cst_encode_network(Network raw); + int cst_encode_RustOpaque_bdk_walletkeysbip39Mnemonic(Mnemonic raw); @protected - int cst_encode_u_32(int raw); + int cst_encode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestBuilderbdk_walletKeychainKind( + MutexOptionFullScanRequestBuilderKeychainKind raw); @protected - int cst_encode_u_8(int raw); + int cst_encode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestbdk_walletKeychainKind( + MutexOptionFullScanRequestKeychainKind raw); @protected - void cst_encode_unit(void raw); + int cst_encode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestBuilderbdk_walletKeychainKindu32( + MutexOptionSyncRequestBuilderKeychainKindU32 raw); + + @protected + int cst_encode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestbdk_walletKeychainKindu32( + MutexOptionSyncRequestKeychainKindU32 raw); + + @protected + int cst_encode_RustOpaque_stdsyncMutexbdk_corebitcoinpsbtPsbt(MutexPsbt raw); + + @protected + int cst_encode_RustOpaque_stdsyncMutexbdk_walletPersistedWalletbdk_walletrusqliteConnection( + MutexPersistedWalletConnection raw); + + @protected + int cst_encode_RustOpaque_stdsyncMutexbdk_walletrusqliteConnection( + MutexConnection raw); + + @protected + bool cst_encode_bool(bool raw); + + @protected + int cst_encode_change_spend_policy(ChangeSpendPolicy 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_variant(Variant raw); + int cst_encode_request_builder_error(RequestBuilderError raw); @protected - int cst_encode_witness_version(WitnessVersion raw); + int cst_encode_u_16(int 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_word_count(WordCount raw); @protected - void sse_encode_RustOpaque_bdkbitcoinAddress( + void sse_encode_AnyhowException( + AnyhowException self, SseSerializer serializer); + + @protected + void + sse_encode_DartFn_Inputs_ffi_script_buf_sync_progress_Output_unit_AnyhowException( + FutureOr Function(FfiScriptBuf, SyncProgress) self, + SseSerializer serializer); + + @protected + void + sse_encode_DartFn_Inputs_keychain_kind_u_32_ffi_script_buf_Output_unit_AnyhowException( + FutureOr Function(KeychainKind, int, FfiScriptBuf) self, + SseSerializer serializer); + + @protected + void sse_encode_DartOpaque(Object self, SseSerializer serializer); + + @protected + void sse_encode_Map_String_list_prim_usize_strict( + Map self, SseSerializer serializer); + + @protected + void sse_encode_RustOpaque_bdk_corebitcoinAddress( Address self, SseSerializer serializer); @protected - void sse_encode_RustOpaque_bdkbitcoinbip32DerivationPath( - DerivationPath self, SseSerializer serializer); + void sse_encode_RustOpaque_bdk_corebitcoinTransaction( + Transaction self, SseSerializer serializer); @protected - void sse_encode_RustOpaque_bdkblockchainAnyBlockchain( - AnyBlockchain self, SseSerializer serializer); + void + sse_encode_RustOpaque_bdk_electrumBdkElectrumClientbdk_electrumelectrum_clientClient( + BdkElectrumClientClient self, SseSerializer serializer); @protected - void sse_encode_RustOpaque_bdkdescriptorExtendedDescriptor( + void sse_encode_RustOpaque_bdk_esploraesplora_clientBlockingClient( + BlockingClient self, SseSerializer serializer); + + @protected + void sse_encode_RustOpaque_bdk_walletUpdate( + Update self, SseSerializer serializer); + + @protected + void sse_encode_RustOpaque_bdk_walletbitcoinbip32DerivationPath( + DerivationPath self, SseSerializer serializer); + + @protected + void sse_encode_RustOpaque_bdk_walletdescriptorExtendedDescriptor( ExtendedDescriptor self, SseSerializer serializer); @protected - void sse_encode_RustOpaque_bdkkeysDescriptorPublicKey( + void sse_encode_RustOpaque_bdk_walletdescriptorPolicy( + Policy self, SseSerializer serializer); + + @protected + void sse_encode_RustOpaque_bdk_walletkeysDescriptorPublicKey( DescriptorPublicKey self, SseSerializer serializer); @protected - void sse_encode_RustOpaque_bdkkeysDescriptorSecretKey( + void sse_encode_RustOpaque_bdk_walletkeysDescriptorSecretKey( DescriptorSecretKey self, SseSerializer serializer); @protected - void sse_encode_RustOpaque_bdkkeysKeyMap( + void sse_encode_RustOpaque_bdk_walletkeysKeyMap( KeyMap self, SseSerializer serializer); @protected - void sse_encode_RustOpaque_bdkkeysbip39Mnemonic( + void sse_encode_RustOpaque_bdk_walletkeysbip39Mnemonic( Mnemonic self, SseSerializer serializer); @protected - void sse_encode_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( - MutexWalletAnyDatabase self, SseSerializer serializer); + void + sse_encode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestBuilderbdk_walletKeychainKind( + MutexOptionFullScanRequestBuilderKeychainKind self, + SseSerializer serializer); @protected void - sse_encode_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( - MutexPartiallySignedTransaction self, SseSerializer serializer); + sse_encode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestbdk_walletKeychainKind( + MutexOptionFullScanRequestKeychainKind self, + SseSerializer serializer); @protected - void sse_encode_String(String self, SseSerializer serializer); + void + sse_encode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestBuilderbdk_walletKeychainKindu32( + MutexOptionSyncRequestBuilderKeychainKindU32 self, + SseSerializer serializer); + + @protected + void + sse_encode_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestbdk_walletKeychainKindu32( + MutexOptionSyncRequestKeychainKindU32 self, SseSerializer serializer); + + @protected + void sse_encode_RustOpaque_stdsyncMutexbdk_corebitcoinpsbtPsbt( + MutexPsbt self, SseSerializer serializer); + + @protected + void + sse_encode_RustOpaque_stdsyncMutexbdk_walletPersistedWalletbdk_walletrusqliteConnection( + MutexPersistedWalletConnection self, SseSerializer serializer); + + @protected + void sse_encode_RustOpaque_stdsyncMutexbdk_walletrusqliteConnection( + MutexConnection self, SseSerializer serializer); @protected - void sse_encode_address_error(AddressError self, SseSerializer serializer); + void sse_encode_String(String self, SseSerializer serializer); @protected - void sse_encode_address_index(AddressIndex self, SseSerializer serializer); + void sse_encode_address_info(AddressInfo self, SseSerializer serializer); @protected - void sse_encode_auth(Auth self, SseSerializer serializer); + void sse_encode_address_parse_error( + AddressParseError self, SseSerializer serializer); @protected void sse_encode_balance(Balance self, SseSerializer serializer); @protected - void sse_encode_bdk_address(BdkAddress self, SseSerializer serializer); + void sse_encode_bip_32_error(Bip32Error self, SseSerializer serializer); @protected - void sse_encode_bdk_blockchain(BdkBlockchain self, SseSerializer serializer); + void sse_encode_bip_39_error(Bip39Error self, SseSerializer serializer); @protected - void sse_encode_bdk_derivation_path( - BdkDerivationPath self, SseSerializer serializer); + void sse_encode_block_id(BlockId self, SseSerializer serializer); @protected - void sse_encode_bdk_descriptor(BdkDescriptor self, SseSerializer serializer); + void sse_encode_bool(bool self, SseSerializer serializer); @protected - void sse_encode_bdk_descriptor_public_key( - BdkDescriptorPublicKey self, SseSerializer serializer); + void sse_encode_box_autoadd_confirmation_block_time( + ConfirmationBlockTime self, SseSerializer serializer); @protected - void sse_encode_bdk_descriptor_secret_key( - BdkDescriptorSecretKey self, SseSerializer serializer); + void sse_encode_box_autoadd_fee_rate(FeeRate self, SseSerializer serializer); @protected - void sse_encode_bdk_error(BdkError self, SseSerializer serializer); + void sse_encode_box_autoadd_ffi_address( + FfiAddress self, SseSerializer serializer); @protected - void sse_encode_bdk_mnemonic(BdkMnemonic self, SseSerializer serializer); + void sse_encode_box_autoadd_ffi_canonical_tx( + FfiCanonicalTx self, SseSerializer serializer); @protected - void sse_encode_bdk_psbt(BdkPsbt self, SseSerializer serializer); + void sse_encode_box_autoadd_ffi_connection( + FfiConnection self, SseSerializer serializer); @protected - void sse_encode_bdk_script_buf(BdkScriptBuf self, SseSerializer serializer); + void sse_encode_box_autoadd_ffi_derivation_path( + FfiDerivationPath self, SseSerializer serializer); @protected - void sse_encode_bdk_transaction( - BdkTransaction self, SseSerializer serializer); + void sse_encode_box_autoadd_ffi_descriptor( + FfiDescriptor self, SseSerializer serializer); @protected - void sse_encode_bdk_wallet(BdkWallet self, SseSerializer serializer); + void sse_encode_box_autoadd_ffi_descriptor_public_key( + FfiDescriptorPublicKey self, SseSerializer serializer); @protected - void sse_encode_block_time(BlockTime self, SseSerializer serializer); + void sse_encode_box_autoadd_ffi_descriptor_secret_key( + FfiDescriptorSecretKey self, SseSerializer serializer); @protected - void sse_encode_blockchain_config( - BlockchainConfig self, SseSerializer serializer); + void sse_encode_box_autoadd_ffi_electrum_client( + FfiElectrumClient self, SseSerializer serializer); @protected - void sse_encode_bool(bool self, SseSerializer serializer); + void sse_encode_box_autoadd_ffi_esplora_client( + FfiEsploraClient self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_address_error( - AddressError self, SseSerializer serializer); + void sse_encode_box_autoadd_ffi_full_scan_request( + FfiFullScanRequest self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_address_index( - AddressIndex self, SseSerializer serializer); + void sse_encode_box_autoadd_ffi_full_scan_request_builder( + FfiFullScanRequestBuilder self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_bdk_address( - BdkAddress self, SseSerializer serializer); + void sse_encode_box_autoadd_ffi_mnemonic( + FfiMnemonic self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_bdk_blockchain( - BdkBlockchain self, SseSerializer serializer); + void sse_encode_box_autoadd_ffi_policy( + FfiPolicy self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_bdk_derivation_path( - BdkDerivationPath self, SseSerializer serializer); + void sse_encode_box_autoadd_ffi_psbt(FfiPsbt self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_bdk_descriptor( - BdkDescriptor self, SseSerializer serializer); + void sse_encode_box_autoadd_ffi_script_buf( + FfiScriptBuf self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_bdk_descriptor_public_key( - BdkDescriptorPublicKey self, SseSerializer serializer); + void sse_encode_box_autoadd_ffi_sync_request( + FfiSyncRequest self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_bdk_descriptor_secret_key( - BdkDescriptorSecretKey self, SseSerializer serializer); + void sse_encode_box_autoadd_ffi_sync_request_builder( + FfiSyncRequestBuilder self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_bdk_mnemonic( - BdkMnemonic self, SseSerializer serializer); + void sse_encode_box_autoadd_ffi_transaction( + FfiTransaction self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_bdk_psbt(BdkPsbt self, SseSerializer serializer); + void sse_encode_box_autoadd_ffi_update( + FfiUpdate self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_bdk_script_buf( - BdkScriptBuf self, SseSerializer serializer); + void sse_encode_box_autoadd_ffi_wallet( + FfiWallet self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_bdk_transaction( - BdkTransaction self, SseSerializer serializer); + void sse_encode_box_autoadd_lock_time( + LockTime self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_bdk_wallet( - BdkWallet self, SseSerializer serializer); + void sse_encode_box_autoadd_rbf_value( + RbfValue self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_block_time( - BlockTime self, SseSerializer serializer); + void + sse_encode_box_autoadd_record_map_string_list_prim_usize_strict_keychain_kind( + (Map, KeychainKind) self, + SseSerializer serializer); @protected - void sse_encode_box_autoadd_blockchain_config( - BlockchainConfig self, SseSerializer serializer); + void sse_encode_box_autoadd_sign_options( + SignOptions self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_consensus_error( - ConsensusError self, SseSerializer serializer); + void sse_encode_box_autoadd_u_32(int self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_database_config( - DatabaseConfig self, SseSerializer serializer); + void sse_encode_box_autoadd_u_64(BigInt self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_descriptor_error( - DescriptorError self, SseSerializer serializer); + void sse_encode_calculate_fee_error( + CalculateFeeError self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_electrum_config( - ElectrumConfig self, SseSerializer serializer); + void sse_encode_cannot_connect_error( + CannotConnectError self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_esplora_config( - EsploraConfig self, SseSerializer serializer); + void sse_encode_chain_position(ChainPosition self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_f_32(double self, SseSerializer serializer); + void sse_encode_change_spend_policy( + ChangeSpendPolicy self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_fee_rate(FeeRate self, SseSerializer serializer); + void sse_encode_confirmation_block_time( + ConfirmationBlockTime self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_hex_error( - HexError self, SseSerializer serializer); + void sse_encode_create_tx_error(CreateTxError self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_local_utxo( - LocalUtxo self, SseSerializer serializer); + void sse_encode_create_with_persist_error( + CreateWithPersistError self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_lock_time( - LockTime self, SseSerializer serializer); + void sse_encode_descriptor_error( + DescriptorError self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_out_point( - OutPoint self, SseSerializer serializer); + void sse_encode_descriptor_key_error( + DescriptorKeyError self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_psbt_sig_hash_type( - PsbtSigHashType self, SseSerializer serializer); + void sse_encode_electrum_error(ElectrumError self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_rbf_value( - RbfValue self, SseSerializer serializer); + void sse_encode_esplora_error(EsploraError self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_record_out_point_input_usize( - (OutPoint, Input, BigInt) self, SseSerializer serializer); + void sse_encode_extract_tx_error( + ExtractTxError self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_rpc_config( - RpcConfig self, SseSerializer serializer); + void sse_encode_fee_rate(FeeRate self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_rpc_sync_params( - RpcSyncParams self, SseSerializer serializer); + void sse_encode_ffi_address(FfiAddress self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_sign_options( - SignOptions self, SseSerializer serializer); + void sse_encode_ffi_canonical_tx( + FfiCanonicalTx self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_sled_db_configuration( - SledDbConfiguration self, SseSerializer serializer); + void sse_encode_ffi_connection(FfiConnection self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_sqlite_db_configuration( - SqliteDbConfiguration self, SseSerializer serializer); + void sse_encode_ffi_derivation_path( + FfiDerivationPath self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_u_32(int self, SseSerializer serializer); + void sse_encode_ffi_descriptor(FfiDescriptor self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_u_64(BigInt self, SseSerializer serializer); + void sse_encode_ffi_descriptor_public_key( + FfiDescriptorPublicKey self, SseSerializer serializer); @protected - void sse_encode_box_autoadd_u_8(int self, SseSerializer serializer); + void sse_encode_ffi_descriptor_secret_key( + FfiDescriptorSecretKey self, SseSerializer serializer); @protected - void sse_encode_change_spend_policy( - ChangeSpendPolicy self, SseSerializer serializer); + void sse_encode_ffi_electrum_client( + FfiElectrumClient self, SseSerializer serializer); @protected - void sse_encode_consensus_error( - ConsensusError self, SseSerializer serializer); + void sse_encode_ffi_esplora_client( + FfiEsploraClient self, SseSerializer serializer); @protected - void sse_encode_database_config( - DatabaseConfig self, SseSerializer serializer); + void sse_encode_ffi_full_scan_request( + FfiFullScanRequest self, SseSerializer serializer); @protected - void sse_encode_descriptor_error( - DescriptorError self, SseSerializer serializer); + void sse_encode_ffi_full_scan_request_builder( + FfiFullScanRequestBuilder self, SseSerializer serializer); @protected - void sse_encode_electrum_config( - ElectrumConfig self, SseSerializer serializer); + void sse_encode_ffi_mnemonic(FfiMnemonic self, SseSerializer serializer); @protected - void sse_encode_esplora_config(EsploraConfig self, SseSerializer serializer); + void sse_encode_ffi_policy(FfiPolicy self, SseSerializer serializer); @protected - void sse_encode_f_32(double self, SseSerializer serializer); + void sse_encode_ffi_psbt(FfiPsbt self, SseSerializer serializer); @protected - void sse_encode_fee_rate(FeeRate self, SseSerializer serializer); + void sse_encode_ffi_script_buf(FfiScriptBuf self, SseSerializer serializer); + + @protected + void sse_encode_ffi_sync_request( + FfiSyncRequest self, SseSerializer serializer); + + @protected + void sse_encode_ffi_sync_request_builder( + FfiSyncRequestBuilder self, SseSerializer serializer); + + @protected + void sse_encode_ffi_transaction( + FfiTransaction self, SseSerializer serializer); + + @protected + void sse_encode_ffi_update(FfiUpdate self, SseSerializer serializer); @protected - void sse_encode_hex_error(HexError self, SseSerializer serializer); + void sse_encode_ffi_wallet(FfiWallet self, SseSerializer serializer); + + @protected + void sse_encode_from_script_error( + FromScriptError self, SseSerializer serializer); @protected void sse_encode_i_32(int self, SseSerializer serializer); @protected - void sse_encode_input(Input self, SseSerializer serializer); + void sse_encode_isize(PlatformInt64 self, SseSerializer serializer); @protected void sse_encode_keychain_kind(KeychainKind self, SseSerializer serializer); + @protected + void sse_encode_list_ffi_canonical_tx( + List self, SseSerializer serializer); + @protected void sse_encode_list_list_prim_u_8_strict( List self, SseSerializer serializer); @protected - void sse_encode_list_local_utxo( - List self, SseSerializer serializer); + void sse_encode_list_local_output( + List self, SseSerializer serializer); @protected void sse_encode_list_out_point(List self, SseSerializer serializer); @@ -2965,12 +3595,16 @@ abstract class coreApiImplPlatform extends BaseApiImpl { Uint8List self, SseSerializer serializer); @protected - void sse_encode_list_script_amount( - List self, SseSerializer serializer); + void sse_encode_list_prim_usize_strict( + Uint64List self, SseSerializer serializer); + + @protected + void sse_encode_list_record_ffi_script_buf_u_64( + List<(FfiScriptBuf, BigInt)> self, SseSerializer serializer); @protected - void sse_encode_list_transaction_details( - List self, SseSerializer serializer); + void sse_encode_list_record_string_list_prim_usize_strict( + List<(String, Uint64List)> self, SseSerializer serializer); @protected void sse_encode_list_tx_in(List self, SseSerializer serializer); @@ -2979,7 +3613,11 @@ abstract class coreApiImplPlatform extends BaseApiImpl { void sse_encode_list_tx_out(List self, SseSerializer serializer); @protected - void sse_encode_local_utxo(LocalUtxo self, SseSerializer serializer); + void sse_encode_load_with_persist_error( + LoadWithPersistError self, SseSerializer serializer); + + @protected + void sse_encode_local_output(LocalOutput self, SseSerializer serializer); @protected void sse_encode_lock_time(LockTime self, SseSerializer serializer); @@ -2990,52 +3628,31 @@ abstract class coreApiImplPlatform extends BaseApiImpl { @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); + void sse_encode_opt_box_autoadd_ffi_canonical_tx( + FfiCanonicalTx? self, SseSerializer serializer); @protected - void sse_encode_opt_box_autoadd_rbf_value( - RbfValue? self, SseSerializer serializer); + void sse_encode_opt_box_autoadd_ffi_policy( + FfiPolicy? self, SseSerializer serializer); @protected - void sse_encode_opt_box_autoadd_record_out_point_input_usize( - (OutPoint, Input, BigInt)? self, SseSerializer serializer); + void sse_encode_opt_box_autoadd_ffi_script_buf( + FfiScriptBuf? self, SseSerializer serializer); @protected - void sse_encode_opt_box_autoadd_rpc_sync_params( - RpcSyncParams? self, SseSerializer serializer); + void sse_encode_opt_box_autoadd_rbf_value( + RbfValue? self, SseSerializer serializer); @protected - void sse_encode_opt_box_autoadd_sign_options( - SignOptions? self, SseSerializer serializer); + void + sse_encode_opt_box_autoadd_record_map_string_list_prim_usize_strict_keychain_kind( + (Map, KeychainKind)? self, + SseSerializer serializer); @protected void sse_encode_opt_box_autoadd_u_32(int? self, SseSerializer serializer); @@ -3043,57 +3660,50 @@ abstract class coreApiImplPlatform extends BaseApiImpl { @protected void sse_encode_opt_box_autoadd_u_64(BigInt? self, SseSerializer serializer); - @protected - void sse_encode_opt_box_autoadd_u_8(int? self, SseSerializer serializer); - @protected void sse_encode_out_point(OutPoint self, SseSerializer serializer); @protected - void sse_encode_payload(Payload self, SseSerializer serializer); + void sse_encode_psbt_error(PsbtError self, SseSerializer serializer); @protected - void sse_encode_psbt_sig_hash_type( - PsbtSigHashType self, SseSerializer serializer); + void sse_encode_psbt_parse_error( + PsbtParseError 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); + void sse_encode_record_ffi_script_buf_u_64( + (FfiScriptBuf, BigInt) self, SseSerializer serializer); @protected - void sse_encode_record_bdk_psbt_transaction_details( - (BdkPsbt, TransactionDetails) self, SseSerializer serializer); + void sse_encode_record_map_string_list_prim_usize_strict_keychain_kind( + (Map, KeychainKind) self, SseSerializer serializer); @protected - void sse_encode_record_out_point_input_usize( - (OutPoint, Input, BigInt) self, SseSerializer serializer); + void sse_encode_record_string_list_prim_usize_strict( + (String, Uint64List) self, SseSerializer serializer); @protected - void sse_encode_rpc_config(RpcConfig self, SseSerializer serializer); + void sse_encode_request_builder_error( + RequestBuilderError self, SseSerializer serializer); @protected - void sse_encode_rpc_sync_params(RpcSyncParams self, SseSerializer serializer); - - @protected - void sse_encode_script_amount(ScriptAmount self, SseSerializer serializer); + void sse_encode_sign_options(SignOptions self, SseSerializer serializer); @protected - void sse_encode_sign_options(SignOptions self, SseSerializer serializer); + void sse_encode_signer_error(SignerError self, SseSerializer serializer); @protected - void sse_encode_sled_db_configuration( - SledDbConfiguration self, SseSerializer serializer); + void sse_encode_sqlite_error(SqliteError self, SseSerializer serializer); @protected - void sse_encode_sqlite_db_configuration( - SqliteDbConfiguration self, SseSerializer serializer); + void sse_encode_sync_progress(SyncProgress self, SseSerializer serializer); @protected - void sse_encode_transaction_details( - TransactionDetails self, SseSerializer serializer); + void sse_encode_transaction_error( + TransactionError self, SseSerializer serializer); @protected void sse_encode_tx_in(TxIn self, SseSerializer serializer); @@ -3101,6 +3711,13 @@ abstract class coreApiImplPlatform extends BaseApiImpl { @protected void sse_encode_tx_out(TxOut self, SseSerializer serializer); + @protected + void sse_encode_txid_parse_error( + TxidParseError self, SseSerializer serializer); + + @protected + void sse_encode_u_16(int self, SseSerializer serializer); + @protected void sse_encode_u_32(int self, SseSerializer serializer); @@ -3110,22 +3727,12 @@ abstract class coreApiImplPlatform extends BaseApiImpl { @protected void sse_encode_u_8(int self, SseSerializer serializer); - @protected - void sse_encode_u_8_array_4(U8Array4 self, SseSerializer serializer); - @protected void sse_encode_unit(void self, SseSerializer serializer); @protected void sse_encode_usize(BigInt self, SseSerializer serializer); - @protected - void sse_encode_variant(Variant self, SseSerializer serializer); - - @protected - void sse_encode_witness_version( - WitnessVersion self, SseSerializer serializer); - @protected void sse_encode_word_count(WordCount self, SseSerializer serializer); } @@ -3164,185 +3771,622 @@ class coreWire implements BaseWire { ); } - late final _store_dart_post_cobjectPtr = - _lookup>( - 'store_dart_post_cobject'); - late final _store_dart_post_cobject = _store_dart_post_cobjectPtr - .asFunction(); + late final _store_dart_post_cobjectPtr = + _lookup>( + 'store_dart_post_cobject'); + late final _store_dart_post_cobject = _store_dart_post_cobjectPtr + .asFunction(); + + WireSyncRust2DartDco wire__crate__api__bitcoin__ffi_address_as_string( + ffi.Pointer that, + ) { + return _wire__crate__api__bitcoin__ffi_address_as_string( + that, + ); + } + + late final _wire__crate__api__bitcoin__ffi_address_as_stringPtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_as_string'); + late final _wire__crate__api__bitcoin__ffi_address_as_string = + _wire__crate__api__bitcoin__ffi_address_as_stringPtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>(); + + void wire__crate__api__bitcoin__ffi_address_from_script( + int port_, + ffi.Pointer script, + int network, + ) { + return _wire__crate__api__bitcoin__ffi_address_from_script( + port_, + script, + network, + ); + } + + late final _wire__crate__api__bitcoin__ffi_address_from_scriptPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer, ffi.Int32)>>( + 'frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_from_script'); + late final _wire__crate__api__bitcoin__ffi_address_from_script = + _wire__crate__api__bitcoin__ffi_address_from_scriptPtr.asFunction< + void Function(int, ffi.Pointer, int)>(); + + void wire__crate__api__bitcoin__ffi_address_from_string( + int port_, + ffi.Pointer address, + int network, + ) { + return _wire__crate__api__bitcoin__ffi_address_from_string( + port_, + address, + network, + ); + } + + late final _wire__crate__api__bitcoin__ffi_address_from_stringPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, + ffi.Pointer, ffi.Int32)>>( + 'frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_from_string'); + late final _wire__crate__api__bitcoin__ffi_address_from_string = + _wire__crate__api__bitcoin__ffi_address_from_stringPtr.asFunction< + void Function( + int, ffi.Pointer, int)>(); + + WireSyncRust2DartDco + wire__crate__api__bitcoin__ffi_address_is_valid_for_network( + ffi.Pointer that, + int network, + ) { + return _wire__crate__api__bitcoin__ffi_address_is_valid_for_network( + that, + network, + ); + } + + late final _wire__crate__api__bitcoin__ffi_address_is_valid_for_networkPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function( + ffi.Pointer, ffi.Int32)>>( + 'frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_is_valid_for_network'); + late final _wire__crate__api__bitcoin__ffi_address_is_valid_for_network = + _wire__crate__api__bitcoin__ffi_address_is_valid_for_networkPtr + .asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer, int)>(); + + WireSyncRust2DartDco wire__crate__api__bitcoin__ffi_address_script( + ffi.Pointer opaque, + ) { + return _wire__crate__api__bitcoin__ffi_address_script( + opaque, + ); + } + + late final _wire__crate__api__bitcoin__ffi_address_scriptPtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_script'); + late final _wire__crate__api__bitcoin__ffi_address_script = + _wire__crate__api__bitcoin__ffi_address_scriptPtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__bitcoin__ffi_address_to_qr_uri( + ffi.Pointer that, + ) { + return _wire__crate__api__bitcoin__ffi_address_to_qr_uri( + that, + ); + } + + late final _wire__crate__api__bitcoin__ffi_address_to_qr_uriPtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_to_qr_uri'); + late final _wire__crate__api__bitcoin__ffi_address_to_qr_uri = + _wire__crate__api__bitcoin__ffi_address_to_qr_uriPtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__bitcoin__ffi_psbt_as_string( + ffi.Pointer that, + ) { + return _wire__crate__api__bitcoin__ffi_psbt_as_string( + that, + ); + } + + late final _wire__crate__api__bitcoin__ffi_psbt_as_stringPtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_as_string'); + late final _wire__crate__api__bitcoin__ffi_psbt_as_string = + _wire__crate__api__bitcoin__ffi_psbt_as_stringPtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>(); + + void wire__crate__api__bitcoin__ffi_psbt_combine( + int port_, + ffi.Pointer opaque, + ffi.Pointer other, + ) { + return _wire__crate__api__bitcoin__ffi_psbt_combine( + port_, + opaque, + other, + ); + } + + late final _wire__crate__api__bitcoin__ffi_psbt_combinePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_combine'); + late final _wire__crate__api__bitcoin__ffi_psbt_combine = + _wire__crate__api__bitcoin__ffi_psbt_combinePtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__bitcoin__ffi_psbt_extract_tx( + ffi.Pointer opaque, + ) { + return _wire__crate__api__bitcoin__ffi_psbt_extract_tx( + opaque, + ); + } + + late final _wire__crate__api__bitcoin__ffi_psbt_extract_txPtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_extract_tx'); + late final _wire__crate__api__bitcoin__ffi_psbt_extract_tx = + _wire__crate__api__bitcoin__ffi_psbt_extract_txPtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__bitcoin__ffi_psbt_fee_amount( + ffi.Pointer that, + ) { + return _wire__crate__api__bitcoin__ffi_psbt_fee_amount( + that, + ); + } + + late final _wire__crate__api__bitcoin__ffi_psbt_fee_amountPtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_fee_amount'); + late final _wire__crate__api__bitcoin__ffi_psbt_fee_amount = + _wire__crate__api__bitcoin__ffi_psbt_fee_amountPtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>(); + + void wire__crate__api__bitcoin__ffi_psbt_from_str( + int port_, + ffi.Pointer psbt_base64, + ) { + return _wire__crate__api__bitcoin__ffi_psbt_from_str( + port_, + psbt_base64, + ); + } + + late final _wire__crate__api__bitcoin__ffi_psbt_from_strPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_from_str'); + late final _wire__crate__api__bitcoin__ffi_psbt_from_str = + _wire__crate__api__bitcoin__ffi_psbt_from_strPtr.asFunction< + void Function(int, ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__bitcoin__ffi_psbt_json_serialize( + ffi.Pointer that, + ) { + return _wire__crate__api__bitcoin__ffi_psbt_json_serialize( + that, + ); + } + + late final _wire__crate__api__bitcoin__ffi_psbt_json_serializePtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_json_serialize'); + late final _wire__crate__api__bitcoin__ffi_psbt_json_serialize = + _wire__crate__api__bitcoin__ffi_psbt_json_serializePtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__bitcoin__ffi_psbt_serialize( + ffi.Pointer that, + ) { + return _wire__crate__api__bitcoin__ffi_psbt_serialize( + that, + ); + } + + late final _wire__crate__api__bitcoin__ffi_psbt_serializePtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_serialize'); + late final _wire__crate__api__bitcoin__ffi_psbt_serialize = + _wire__crate__api__bitcoin__ffi_psbt_serializePtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__bitcoin__ffi_script_buf_as_string( + ffi.Pointer that, + ) { + return _wire__crate__api__bitcoin__ffi_script_buf_as_string( + that, + ); + } + + late final _wire__crate__api__bitcoin__ffi_script_buf_as_stringPtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_script_buf_as_string'); + late final _wire__crate__api__bitcoin__ffi_script_buf_as_string = + _wire__crate__api__bitcoin__ffi_script_buf_as_stringPtr.asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__bitcoin__ffi_script_buf_empty() { + return _wire__crate__api__bitcoin__ffi_script_buf_empty(); + } + + late final _wire__crate__api__bitcoin__ffi_script_buf_emptyPtr = + _lookup>( + 'frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_script_buf_empty'); + late final _wire__crate__api__bitcoin__ffi_script_buf_empty = + _wire__crate__api__bitcoin__ffi_script_buf_emptyPtr + .asFunction(); + + void wire__crate__api__bitcoin__ffi_script_buf_with_capacity( + int port_, + int capacity, + ) { + return _wire__crate__api__bitcoin__ffi_script_buf_with_capacity( + port_, + capacity, + ); + } + + late final _wire__crate__api__bitcoin__ffi_script_buf_with_capacityPtr = _lookup< + ffi.NativeFunction>( + 'frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_script_buf_with_capacity'); + late final _wire__crate__api__bitcoin__ffi_script_buf_with_capacity = + _wire__crate__api__bitcoin__ffi_script_buf_with_capacityPtr + .asFunction(); + + WireSyncRust2DartDco wire__crate__api__bitcoin__ffi_transaction_compute_txid( + ffi.Pointer that, + ) { + return _wire__crate__api__bitcoin__ffi_transaction_compute_txid( + that, + ); + } + + late final _wire__crate__api__bitcoin__ffi_transaction_compute_txidPtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_compute_txid'); + late final _wire__crate__api__bitcoin__ffi_transaction_compute_txid = + _wire__crate__api__bitcoin__ffi_transaction_compute_txidPtr.asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>(); + + void wire__crate__api__bitcoin__ffi_transaction_from_bytes( + int port_, + ffi.Pointer transaction_bytes, + ) { + return _wire__crate__api__bitcoin__ffi_transaction_from_bytes( + port_, + transaction_bytes, + ); + } + + late final _wire__crate__api__bitcoin__ffi_transaction_from_bytesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_from_bytes'); + late final _wire__crate__api__bitcoin__ffi_transaction_from_bytes = + _wire__crate__api__bitcoin__ffi_transaction_from_bytesPtr.asFunction< + void Function(int, ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__bitcoin__ffi_transaction_input( + ffi.Pointer that, + ) { + return _wire__crate__api__bitcoin__ffi_transaction_input( + that, + ); + } + + late final _wire__crate__api__bitcoin__ffi_transaction_inputPtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_input'); + late final _wire__crate__api__bitcoin__ffi_transaction_input = + _wire__crate__api__bitcoin__ffi_transaction_inputPtr.asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__bitcoin__ffi_transaction_is_coinbase( + ffi.Pointer that, + ) { + return _wire__crate__api__bitcoin__ffi_transaction_is_coinbase( + that, + ); + } + + late final _wire__crate__api__bitcoin__ffi_transaction_is_coinbasePtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_is_coinbase'); + late final _wire__crate__api__bitcoin__ffi_transaction_is_coinbase = + _wire__crate__api__bitcoin__ffi_transaction_is_coinbasePtr.asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>(); + + WireSyncRust2DartDco + wire__crate__api__bitcoin__ffi_transaction_is_explicitly_rbf( + ffi.Pointer that, + ) { + return _wire__crate__api__bitcoin__ffi_transaction_is_explicitly_rbf( + that, + ); + } + + late final _wire__crate__api__bitcoin__ffi_transaction_is_explicitly_rbfPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_is_explicitly_rbf'); + late final _wire__crate__api__bitcoin__ffi_transaction_is_explicitly_rbf = + _wire__crate__api__bitcoin__ffi_transaction_is_explicitly_rbfPtr + .asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>(); + + WireSyncRust2DartDco + wire__crate__api__bitcoin__ffi_transaction_is_lock_time_enabled( + ffi.Pointer that, + ) { + return _wire__crate__api__bitcoin__ffi_transaction_is_lock_time_enabled( + that, + ); + } + + late final _wire__crate__api__bitcoin__ffi_transaction_is_lock_time_enabledPtr = + _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_is_lock_time_enabled'); + late final _wire__crate__api__bitcoin__ffi_transaction_is_lock_time_enabled = + _wire__crate__api__bitcoin__ffi_transaction_is_lock_time_enabledPtr + .asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__bitcoin__ffi_transaction_lock_time( + ffi.Pointer that, + ) { + return _wire__crate__api__bitcoin__ffi_transaction_lock_time( + that, + ); + } + + late final _wire__crate__api__bitcoin__ffi_transaction_lock_timePtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_lock_time'); + late final _wire__crate__api__bitcoin__ffi_transaction_lock_time = + _wire__crate__api__bitcoin__ffi_transaction_lock_timePtr.asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>(); + + void wire__crate__api__bitcoin__ffi_transaction_new( + int port_, + int version, + ffi.Pointer lock_time, + ffi.Pointer input, + ffi.Pointer output, + ) { + return _wire__crate__api__bitcoin__ffi_transaction_new( + port_, + version, + lock_time, + input, + output, + ); + } + + late final _wire__crate__api__bitcoin__ffi_transaction_newPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Int32, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_new'); + late final _wire__crate__api__bitcoin__ffi_transaction_new = + _wire__crate__api__bitcoin__ffi_transaction_newPtr.asFunction< + void Function( + int, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - void wire__crate__api__blockchain__bdk_blockchain_broadcast( - int port_, - ffi.Pointer that, - ffi.Pointer transaction, + WireSyncRust2DartDco wire__crate__api__bitcoin__ffi_transaction_output( + ffi.Pointer that, ) { - return _wire__crate__api__blockchain__bdk_blockchain_broadcast( - port_, + return _wire__crate__api__bitcoin__ffi_transaction_output( that, - transaction, ); } - late final _wire__crate__api__blockchain__bdk_blockchain_broadcastPtr = _lookup< + late final _wire__crate__api__bitcoin__ffi_transaction_outputPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_broadcast'); - late final _wire__crate__api__blockchain__bdk_blockchain_broadcast = - _wire__crate__api__blockchain__bdk_blockchain_broadcastPtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); - - void wire__crate__api__blockchain__bdk_blockchain_create( - int port_, - ffi.Pointer blockchain_config, + WireSyncRust2DartDco Function( + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_output'); + late final _wire__crate__api__bitcoin__ffi_transaction_output = + _wire__crate__api__bitcoin__ffi_transaction_outputPtr.asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__bitcoin__ffi_transaction_serialize( + ffi.Pointer that, ) { - return _wire__crate__api__blockchain__bdk_blockchain_create( - port_, - blockchain_config, + return _wire__crate__api__bitcoin__ffi_transaction_serialize( + that, ); } - late final _wire__crate__api__blockchain__bdk_blockchain_createPtr = _lookup< + late final _wire__crate__api__bitcoin__ffi_transaction_serializePtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_create'); - late final _wire__crate__api__blockchain__bdk_blockchain_create = - _wire__crate__api__blockchain__bdk_blockchain_createPtr.asFunction< - void Function(int, ffi.Pointer)>(); + WireSyncRust2DartDco Function( + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_serialize'); + late final _wire__crate__api__bitcoin__ffi_transaction_serialize = + _wire__crate__api__bitcoin__ffi_transaction_serializePtr.asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>(); - void wire__crate__api__blockchain__bdk_blockchain_estimate_fee( - int port_, - ffi.Pointer that, - int target, + WireSyncRust2DartDco wire__crate__api__bitcoin__ffi_transaction_version( + ffi.Pointer that, ) { - return _wire__crate__api__blockchain__bdk_blockchain_estimate_fee( - port_, + return _wire__crate__api__bitcoin__ffi_transaction_version( that, - target, ); } - late final _wire__crate__api__blockchain__bdk_blockchain_estimate_feePtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer, ffi.Uint64)>>( - 'frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_estimate_fee'); - late final _wire__crate__api__blockchain__bdk_blockchain_estimate_fee = - _wire__crate__api__blockchain__bdk_blockchain_estimate_feePtr.asFunction< - void Function(int, ffi.Pointer, int)>(); + late final _wire__crate__api__bitcoin__ffi_transaction_versionPtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_version'); + late final _wire__crate__api__bitcoin__ffi_transaction_version = + _wire__crate__api__bitcoin__ffi_transaction_versionPtr.asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>(); - void wire__crate__api__blockchain__bdk_blockchain_get_block_hash( - int port_, - ffi.Pointer that, - int height, + WireSyncRust2DartDco wire__crate__api__bitcoin__ffi_transaction_vsize( + ffi.Pointer that, ) { - return _wire__crate__api__blockchain__bdk_blockchain_get_block_hash( - port_, + return _wire__crate__api__bitcoin__ffi_transaction_vsize( that, - height, ); } - late final _wire__crate__api__blockchain__bdk_blockchain_get_block_hashPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer, ffi.Uint32)>>( - 'frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_get_block_hash'); - late final _wire__crate__api__blockchain__bdk_blockchain_get_block_hash = - _wire__crate__api__blockchain__bdk_blockchain_get_block_hashPtr - .asFunction< - void Function(int, ffi.Pointer, int)>(); + late final _wire__crate__api__bitcoin__ffi_transaction_vsizePtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_vsize'); + late final _wire__crate__api__bitcoin__ffi_transaction_vsize = + _wire__crate__api__bitcoin__ffi_transaction_vsizePtr.asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer)>(); - void wire__crate__api__blockchain__bdk_blockchain_get_height( + void wire__crate__api__bitcoin__ffi_transaction_weight( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire__crate__api__blockchain__bdk_blockchain_get_height( + return _wire__crate__api__bitcoin__ffi_transaction_weight( port_, that, ); } - late final _wire__crate__api__blockchain__bdk_blockchain_get_heightPtr = _lookup< + late final _wire__crate__api__bitcoin__ffi_transaction_weightPtr = _lookup< ffi.NativeFunction< ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_get_height'); - late final _wire__crate__api__blockchain__bdk_blockchain_get_height = - _wire__crate__api__blockchain__bdk_blockchain_get_heightPtr.asFunction< - void Function(int, ffi.Pointer)>(); - - WireSyncRust2DartDco wire__crate__api__descriptor__bdk_descriptor_as_string( - ffi.Pointer that, + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_weight'); + late final _wire__crate__api__bitcoin__ffi_transaction_weight = + _wire__crate__api__bitcoin__ffi_transaction_weightPtr.asFunction< + void Function(int, ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__descriptor__ffi_descriptor_as_string( + ffi.Pointer that, ) { - return _wire__crate__api__descriptor__bdk_descriptor_as_string( + return _wire__crate__api__descriptor__ffi_descriptor_as_string( that, ); } - late final _wire__crate__api__descriptor__bdk_descriptor_as_stringPtr = _lookup< + late final _wire__crate__api__descriptor__ffi_descriptor_as_stringPtr = _lookup< ffi.NativeFunction< WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_as_string'); - late final _wire__crate__api__descriptor__bdk_descriptor_as_string = - _wire__crate__api__descriptor__bdk_descriptor_as_stringPtr.asFunction< + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_as_string'); + late final _wire__crate__api__descriptor__ffi_descriptor_as_string = + _wire__crate__api__descriptor__ffi_descriptor_as_stringPtr.asFunction< WireSyncRust2DartDco Function( - ffi.Pointer)>(); + ffi.Pointer)>(); WireSyncRust2DartDco - wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weight( - ffi.Pointer that, + wire__crate__api__descriptor__ffi_descriptor_max_satisfaction_weight( + ffi.Pointer that, ) { - return _wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weight( + return _wire__crate__api__descriptor__ffi_descriptor_max_satisfaction_weight( that, ); } - late final _wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weightPtr = + late final _wire__crate__api__descriptor__ffi_descriptor_max_satisfaction_weightPtr = _lookup< ffi.NativeFunction< WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weight'); - late final _wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weight = - _wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weightPtr + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_max_satisfaction_weight'); + late final _wire__crate__api__descriptor__ffi_descriptor_max_satisfaction_weight = + _wire__crate__api__descriptor__ffi_descriptor_max_satisfaction_weightPtr .asFunction< WireSyncRust2DartDco Function( - ffi.Pointer)>(); + ffi.Pointer)>(); - void wire__crate__api__descriptor__bdk_descriptor_new( + void wire__crate__api__descriptor__ffi_descriptor_new( int port_, ffi.Pointer descriptor, int network, ) { - return _wire__crate__api__descriptor__bdk_descriptor_new( + return _wire__crate__api__descriptor__ffi_descriptor_new( port_, descriptor, network, ); } - late final _wire__crate__api__descriptor__bdk_descriptor_newPtr = _lookup< + late final _wire__crate__api__descriptor__ffi_descriptor_newPtr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Int64, ffi.Pointer, ffi.Int32)>>( - 'frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new'); - late final _wire__crate__api__descriptor__bdk_descriptor_new = - _wire__crate__api__descriptor__bdk_descriptor_newPtr.asFunction< + 'frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new'); + late final _wire__crate__api__descriptor__ffi_descriptor_new = + _wire__crate__api__descriptor__ffi_descriptor_newPtr.asFunction< void Function( int, ffi.Pointer, int)>(); - void wire__crate__api__descriptor__bdk_descriptor_new_bip44( + void wire__crate__api__descriptor__ffi_descriptor_new_bip44( int port_, - ffi.Pointer secret_key, + ffi.Pointer secret_key, int keychain_kind, int network, ) { - return _wire__crate__api__descriptor__bdk_descriptor_new_bip44( + return _wire__crate__api__descriptor__ffi_descriptor_new_bip44( port_, secret_key, keychain_kind, @@ -3350,27 +4394,27 @@ class coreWire implements BaseWire { ); } - late final _wire__crate__api__descriptor__bdk_descriptor_new_bip44Ptr = _lookup< + late final _wire__crate__api__descriptor__ffi_descriptor_new_bip44Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, - ffi.Pointer, + ffi.Pointer, ffi.Int32, ffi.Int32)>>( - 'frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44'); - late final _wire__crate__api__descriptor__bdk_descriptor_new_bip44 = - _wire__crate__api__descriptor__bdk_descriptor_new_bip44Ptr.asFunction< - void Function(int, ffi.Pointer, + 'frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip44'); + late final _wire__crate__api__descriptor__ffi_descriptor_new_bip44 = + _wire__crate__api__descriptor__ffi_descriptor_new_bip44Ptr.asFunction< + void Function(int, ffi.Pointer, int, int)>(); - void wire__crate__api__descriptor__bdk_descriptor_new_bip44_public( + void wire__crate__api__descriptor__ffi_descriptor_new_bip44_public( int port_, - ffi.Pointer public_key, + ffi.Pointer public_key, ffi.Pointer fingerprint, int keychain_kind, int network, ) { - return _wire__crate__api__descriptor__bdk_descriptor_new_bip44_public( + return _wire__crate__api__descriptor__ffi_descriptor_new_bip44_public( port_, public_key, fingerprint, @@ -3379,33 +4423,33 @@ class coreWire implements BaseWire { ); } - late final _wire__crate__api__descriptor__bdk_descriptor_new_bip44_publicPtr = + late final _wire__crate__api__descriptor__ffi_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__crate__api__descriptor__bdk_descriptor_new_bip44_public'); - late final _wire__crate__api__descriptor__bdk_descriptor_new_bip44_public = - _wire__crate__api__descriptor__bdk_descriptor_new_bip44_publicPtr + 'frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip44_public'); + late final _wire__crate__api__descriptor__ffi_descriptor_new_bip44_public = + _wire__crate__api__descriptor__ffi_descriptor_new_bip44_publicPtr .asFunction< void Function( int, - ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, int)>(); - void wire__crate__api__descriptor__bdk_descriptor_new_bip49( + void wire__crate__api__descriptor__ffi_descriptor_new_bip49( int port_, - ffi.Pointer secret_key, + ffi.Pointer secret_key, int keychain_kind, int network, ) { - return _wire__crate__api__descriptor__bdk_descriptor_new_bip49( + return _wire__crate__api__descriptor__ffi_descriptor_new_bip49( port_, secret_key, keychain_kind, @@ -3413,27 +4457,27 @@ class coreWire implements BaseWire { ); } - late final _wire__crate__api__descriptor__bdk_descriptor_new_bip49Ptr = _lookup< + late final _wire__crate__api__descriptor__ffi_descriptor_new_bip49Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, - ffi.Pointer, + ffi.Pointer, ffi.Int32, ffi.Int32)>>( - 'frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip49'); - late final _wire__crate__api__descriptor__bdk_descriptor_new_bip49 = - _wire__crate__api__descriptor__bdk_descriptor_new_bip49Ptr.asFunction< - void Function(int, ffi.Pointer, + 'frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip49'); + late final _wire__crate__api__descriptor__ffi_descriptor_new_bip49 = + _wire__crate__api__descriptor__ffi_descriptor_new_bip49Ptr.asFunction< + void Function(int, ffi.Pointer, int, int)>(); - void wire__crate__api__descriptor__bdk_descriptor_new_bip49_public( + void wire__crate__api__descriptor__ffi_descriptor_new_bip49_public( int port_, - ffi.Pointer public_key, + ffi.Pointer public_key, ffi.Pointer fingerprint, int keychain_kind, int network, ) { - return _wire__crate__api__descriptor__bdk_descriptor_new_bip49_public( + return _wire__crate__api__descriptor__ffi_descriptor_new_bip49_public( port_, public_key, fingerprint, @@ -3442,33 +4486,33 @@ class coreWire implements BaseWire { ); } - late final _wire__crate__api__descriptor__bdk_descriptor_new_bip49_publicPtr = + late final _wire__crate__api__descriptor__ffi_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__crate__api__descriptor__bdk_descriptor_new_bip49_public'); - late final _wire__crate__api__descriptor__bdk_descriptor_new_bip49_public = - _wire__crate__api__descriptor__bdk_descriptor_new_bip49_publicPtr + 'frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip49_public'); + late final _wire__crate__api__descriptor__ffi_descriptor_new_bip49_public = + _wire__crate__api__descriptor__ffi_descriptor_new_bip49_publicPtr .asFunction< void Function( int, - ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, int)>(); - void wire__crate__api__descriptor__bdk_descriptor_new_bip84( + void wire__crate__api__descriptor__ffi_descriptor_new_bip84( int port_, - ffi.Pointer secret_key, + ffi.Pointer secret_key, int keychain_kind, int network, ) { - return _wire__crate__api__descriptor__bdk_descriptor_new_bip84( + return _wire__crate__api__descriptor__ffi_descriptor_new_bip84( port_, secret_key, keychain_kind, @@ -3476,27 +4520,27 @@ class coreWire implements BaseWire { ); } - late final _wire__crate__api__descriptor__bdk_descriptor_new_bip84Ptr = _lookup< + late final _wire__crate__api__descriptor__ffi_descriptor_new_bip84Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, - ffi.Pointer, + ffi.Pointer, ffi.Int32, ffi.Int32)>>( - 'frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip84'); - late final _wire__crate__api__descriptor__bdk_descriptor_new_bip84 = - _wire__crate__api__descriptor__bdk_descriptor_new_bip84Ptr.asFunction< - void Function(int, ffi.Pointer, + 'frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip84'); + late final _wire__crate__api__descriptor__ffi_descriptor_new_bip84 = + _wire__crate__api__descriptor__ffi_descriptor_new_bip84Ptr.asFunction< + void Function(int, ffi.Pointer, int, int)>(); - void wire__crate__api__descriptor__bdk_descriptor_new_bip84_public( + void wire__crate__api__descriptor__ffi_descriptor_new_bip84_public( int port_, - ffi.Pointer public_key, + ffi.Pointer public_key, ffi.Pointer fingerprint, int keychain_kind, int network, ) { - return _wire__crate__api__descriptor__bdk_descriptor_new_bip84_public( + return _wire__crate__api__descriptor__ffi_descriptor_new_bip84_public( port_, public_key, fingerprint, @@ -3505,33 +4549,33 @@ class coreWire implements BaseWire { ); } - late final _wire__crate__api__descriptor__bdk_descriptor_new_bip84_publicPtr = + late final _wire__crate__api__descriptor__ffi_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__crate__api__descriptor__bdk_descriptor_new_bip84_public'); - late final _wire__crate__api__descriptor__bdk_descriptor_new_bip84_public = - _wire__crate__api__descriptor__bdk_descriptor_new_bip84_publicPtr + 'frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip84_public'); + late final _wire__crate__api__descriptor__ffi_descriptor_new_bip84_public = + _wire__crate__api__descriptor__ffi_descriptor_new_bip84_publicPtr .asFunction< void Function( int, - ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, int)>(); - void wire__crate__api__descriptor__bdk_descriptor_new_bip86( + void wire__crate__api__descriptor__ffi_descriptor_new_bip86( int port_, - ffi.Pointer secret_key, + ffi.Pointer secret_key, int keychain_kind, int network, ) { - return _wire__crate__api__descriptor__bdk_descriptor_new_bip86( + return _wire__crate__api__descriptor__ffi_descriptor_new_bip86( port_, secret_key, keychain_kind, @@ -3539,27 +4583,27 @@ class coreWire implements BaseWire { ); } - late final _wire__crate__api__descriptor__bdk_descriptor_new_bip86Ptr = _lookup< + late final _wire__crate__api__descriptor__ffi_descriptor_new_bip86Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, - ffi.Pointer, + ffi.Pointer, ffi.Int32, ffi.Int32)>>( - 'frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip86'); - late final _wire__crate__api__descriptor__bdk_descriptor_new_bip86 = - _wire__crate__api__descriptor__bdk_descriptor_new_bip86Ptr.asFunction< - void Function(int, ffi.Pointer, + 'frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip86'); + late final _wire__crate__api__descriptor__ffi_descriptor_new_bip86 = + _wire__crate__api__descriptor__ffi_descriptor_new_bip86Ptr.asFunction< + void Function(int, ffi.Pointer, int, int)>(); - void wire__crate__api__descriptor__bdk_descriptor_new_bip86_public( + void wire__crate__api__descriptor__ffi_descriptor_new_bip86_public( int port_, - ffi.Pointer public_key, + ffi.Pointer public_key, ffi.Pointer fingerprint, int keychain_kind, int network, ) { - return _wire__crate__api__descriptor__bdk_descriptor_new_bip86_public( + return _wire__crate__api__descriptor__ffi_descriptor_new_bip86_public( port_, public_key, fingerprint, @@ -3568,220 +4612,428 @@ class coreWire implements BaseWire { ); } - late final _wire__crate__api__descriptor__bdk_descriptor_new_bip86_publicPtr = + late final _wire__crate__api__descriptor__ffi_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__crate__api__descriptor__bdk_descriptor_new_bip86_public'); - late final _wire__crate__api__descriptor__bdk_descriptor_new_bip86_public = - _wire__crate__api__descriptor__bdk_descriptor_new_bip86_publicPtr + 'frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip86_public'); + late final _wire__crate__api__descriptor__ffi_descriptor_new_bip86_public = + _wire__crate__api__descriptor__ffi_descriptor_new_bip86_publicPtr .asFunction< void Function( int, - ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, int)>(); WireSyncRust2DartDco - wire__crate__api__descriptor__bdk_descriptor_to_string_private( - ffi.Pointer that, + wire__crate__api__descriptor__ffi_descriptor_to_string_with_secret( + ffi.Pointer that, ) { - return _wire__crate__api__descriptor__bdk_descriptor_to_string_private( + return _wire__crate__api__descriptor__ffi_descriptor_to_string_with_secret( that, ); } - late final _wire__crate__api__descriptor__bdk_descriptor_to_string_privatePtr = + late final _wire__crate__api__descriptor__ffi_descriptor_to_string_with_secretPtr = _lookup< ffi.NativeFunction< WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_to_string_private'); - late final _wire__crate__api__descriptor__bdk_descriptor_to_string_private = - _wire__crate__api__descriptor__bdk_descriptor_to_string_privatePtr + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_to_string_with_secret'); + late final _wire__crate__api__descriptor__ffi_descriptor_to_string_with_secret = + _wire__crate__api__descriptor__ffi_descriptor_to_string_with_secretPtr .asFunction< WireSyncRust2DartDco Function( - ffi.Pointer)>(); + ffi.Pointer)>(); + + void wire__crate__api__electrum__ffi_electrum_client_broadcast( + int port_, + ffi.Pointer opaque, + ffi.Pointer transaction, + ) { + return _wire__crate__api__electrum__ffi_electrum_client_broadcast( + port_, + opaque, + transaction, + ); + } + + late final _wire__crate__api__electrum__ffi_electrum_client_broadcastPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__electrum__ffi_electrum_client_broadcast'); + late final _wire__crate__api__electrum__ffi_electrum_client_broadcast = + _wire__crate__api__electrum__ffi_electrum_client_broadcastPtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer)>(); + + void wire__crate__api__electrum__ffi_electrum_client_full_scan( + int port_, + ffi.Pointer opaque, + ffi.Pointer request, + int stop_gap, + int batch_size, + bool fetch_prev_txouts, + ) { + return _wire__crate__api__electrum__ffi_electrum_client_full_scan( + port_, + opaque, + request, + stop_gap, + batch_size, + fetch_prev_txouts, + ); + } + + late final _wire__crate__api__electrum__ffi_electrum_client_full_scanPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Uint64, + ffi.Uint64, + ffi.Bool)>>( + 'frbgen_bdk_flutter_wire__crate__api__electrum__ffi_electrum_client_full_scan'); + late final _wire__crate__api__electrum__ffi_electrum_client_full_scan = + _wire__crate__api__electrum__ffi_electrum_client_full_scanPtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer, int, int, bool)>(); + + void wire__crate__api__electrum__ffi_electrum_client_new( + int port_, + ffi.Pointer url, + ) { + return _wire__crate__api__electrum__ffi_electrum_client_new( + port_, + url, + ); + } + + late final _wire__crate__api__electrum__ffi_electrum_client_newPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__electrum__ffi_electrum_client_new'); + late final _wire__crate__api__electrum__ffi_electrum_client_new = + _wire__crate__api__electrum__ffi_electrum_client_newPtr.asFunction< + void Function(int, ffi.Pointer)>(); + + void wire__crate__api__electrum__ffi_electrum_client_sync( + int port_, + ffi.Pointer opaque, + ffi.Pointer request, + int batch_size, + bool fetch_prev_txouts, + ) { + return _wire__crate__api__electrum__ffi_electrum_client_sync( + port_, + opaque, + request, + batch_size, + fetch_prev_txouts, + ); + } + + late final _wire__crate__api__electrum__ffi_electrum_client_syncPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Uint64, + ffi.Bool)>>( + 'frbgen_bdk_flutter_wire__crate__api__electrum__ffi_electrum_client_sync'); + late final _wire__crate__api__electrum__ffi_electrum_client_sync = + _wire__crate__api__electrum__ffi_electrum_client_syncPtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer, int, bool)>(); + + void wire__crate__api__esplora__ffi_esplora_client_broadcast( + int port_, + ffi.Pointer opaque, + ffi.Pointer transaction, + ) { + return _wire__crate__api__esplora__ffi_esplora_client_broadcast( + port_, + opaque, + transaction, + ); + } + + late final _wire__crate__api__esplora__ffi_esplora_client_broadcastPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__esplora__ffi_esplora_client_broadcast'); + late final _wire__crate__api__esplora__ffi_esplora_client_broadcast = + _wire__crate__api__esplora__ffi_esplora_client_broadcastPtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer)>(); + + void wire__crate__api__esplora__ffi_esplora_client_full_scan( + int port_, + ffi.Pointer opaque, + ffi.Pointer request, + int stop_gap, + int parallel_requests, + ) { + return _wire__crate__api__esplora__ffi_esplora_client_full_scan( + port_, + opaque, + request, + stop_gap, + parallel_requests, + ); + } + + late final _wire__crate__api__esplora__ffi_esplora_client_full_scanPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Uint64, + ffi.Uint64)>>( + 'frbgen_bdk_flutter_wire__crate__api__esplora__ffi_esplora_client_full_scan'); + late final _wire__crate__api__esplora__ffi_esplora_client_full_scan = + _wire__crate__api__esplora__ffi_esplora_client_full_scanPtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer, int, int)>(); + + void wire__crate__api__esplora__ffi_esplora_client_new( + int port_, + ffi.Pointer url, + ) { + return _wire__crate__api__esplora__ffi_esplora_client_new( + port_, + url, + ); + } + + late final _wire__crate__api__esplora__ffi_esplora_client_newPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__esplora__ffi_esplora_client_new'); + late final _wire__crate__api__esplora__ffi_esplora_client_new = + _wire__crate__api__esplora__ffi_esplora_client_newPtr.asFunction< + void Function(int, ffi.Pointer)>(); + + void wire__crate__api__esplora__ffi_esplora_client_sync( + int port_, + ffi.Pointer opaque, + ffi.Pointer request, + int parallel_requests, + ) { + return _wire__crate__api__esplora__ffi_esplora_client_sync( + port_, + opaque, + request, + parallel_requests, + ); + } - WireSyncRust2DartDco wire__crate__api__key__bdk_derivation_path_as_string( - ffi.Pointer that, + late final _wire__crate__api__esplora__ffi_esplora_client_syncPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Uint64)>>( + 'frbgen_bdk_flutter_wire__crate__api__esplora__ffi_esplora_client_sync'); + late final _wire__crate__api__esplora__ffi_esplora_client_sync = + _wire__crate__api__esplora__ffi_esplora_client_syncPtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer, int)>(); + + WireSyncRust2DartDco wire__crate__api__key__ffi_derivation_path_as_string( + ffi.Pointer that, ) { - return _wire__crate__api__key__bdk_derivation_path_as_string( + return _wire__crate__api__key__ffi_derivation_path_as_string( that, ); } - late final _wire__crate__api__key__bdk_derivation_path_as_stringPtr = _lookup< + late final _wire__crate__api__key__ffi_derivation_path_as_stringPtr = _lookup< ffi.NativeFunction< WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__key__bdk_derivation_path_as_string'); - late final _wire__crate__api__key__bdk_derivation_path_as_string = - _wire__crate__api__key__bdk_derivation_path_as_stringPtr.asFunction< + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__key__ffi_derivation_path_as_string'); + late final _wire__crate__api__key__ffi_derivation_path_as_string = + _wire__crate__api__key__ffi_derivation_path_as_stringPtr.asFunction< WireSyncRust2DartDco Function( - ffi.Pointer)>(); + ffi.Pointer)>(); - void wire__crate__api__key__bdk_derivation_path_from_string( + void wire__crate__api__key__ffi_derivation_path_from_string( int port_, ffi.Pointer path, ) { - return _wire__crate__api__key__bdk_derivation_path_from_string( + return _wire__crate__api__key__ffi_derivation_path_from_string( port_, path, ); } - late final _wire__crate__api__key__bdk_derivation_path_from_stringPtr = _lookup< + late final _wire__crate__api__key__ffi_derivation_path_from_stringPtr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__key__bdk_derivation_path_from_string'); - late final _wire__crate__api__key__bdk_derivation_path_from_string = - _wire__crate__api__key__bdk_derivation_path_from_stringPtr.asFunction< + 'frbgen_bdk_flutter_wire__crate__api__key__ffi_derivation_path_from_string'); + late final _wire__crate__api__key__ffi_derivation_path_from_string = + _wire__crate__api__key__ffi_derivation_path_from_stringPtr.asFunction< void Function(int, ffi.Pointer)>(); WireSyncRust2DartDco - wire__crate__api__key__bdk_descriptor_public_key_as_string( - ffi.Pointer that, + wire__crate__api__key__ffi_descriptor_public_key_as_string( + ffi.Pointer that, ) { - return _wire__crate__api__key__bdk_descriptor_public_key_as_string( + return _wire__crate__api__key__ffi_descriptor_public_key_as_string( that, ); } - late final _wire__crate__api__key__bdk_descriptor_public_key_as_stringPtr = + late final _wire__crate__api__key__ffi_descriptor_public_key_as_stringPtr = _lookup< ffi.NativeFunction< WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_as_string'); - late final _wire__crate__api__key__bdk_descriptor_public_key_as_string = - _wire__crate__api__key__bdk_descriptor_public_key_as_stringPtr.asFunction< + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_public_key_as_string'); + late final _wire__crate__api__key__ffi_descriptor_public_key_as_string = + _wire__crate__api__key__ffi_descriptor_public_key_as_stringPtr.asFunction< WireSyncRust2DartDco Function( - ffi.Pointer)>(); + ffi.Pointer)>(); - void wire__crate__api__key__bdk_descriptor_public_key_derive( + void wire__crate__api__key__ffi_descriptor_public_key_derive( int port_, - ffi.Pointer ptr, - ffi.Pointer path, + ffi.Pointer opaque, + ffi.Pointer path, ) { - return _wire__crate__api__key__bdk_descriptor_public_key_derive( + return _wire__crate__api__key__ffi_descriptor_public_key_derive( port_, - ptr, + opaque, path, ); } - late final _wire__crate__api__key__bdk_descriptor_public_key_derivePtr = _lookup< + late final _wire__crate__api__key__ffi_descriptor_public_key_derivePtr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_derive'); - late final _wire__crate__api__key__bdk_descriptor_public_key_derive = - _wire__crate__api__key__bdk_descriptor_public_key_derivePtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); - - void wire__crate__api__key__bdk_descriptor_public_key_extend( + ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_public_key_derive'); + late final _wire__crate__api__key__ffi_descriptor_public_key_derive = + _wire__crate__api__key__ffi_descriptor_public_key_derivePtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer)>(); + + void wire__crate__api__key__ffi_descriptor_public_key_extend( int port_, - ffi.Pointer ptr, - ffi.Pointer path, + ffi.Pointer opaque, + ffi.Pointer path, ) { - return _wire__crate__api__key__bdk_descriptor_public_key_extend( + return _wire__crate__api__key__ffi_descriptor_public_key_extend( port_, - ptr, + opaque, path, ); } - late final _wire__crate__api__key__bdk_descriptor_public_key_extendPtr = _lookup< + late final _wire__crate__api__key__ffi_descriptor_public_key_extendPtr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_extend'); - late final _wire__crate__api__key__bdk_descriptor_public_key_extend = - _wire__crate__api__key__bdk_descriptor_public_key_extendPtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); - - void wire__crate__api__key__bdk_descriptor_public_key_from_string( + ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_public_key_extend'); + late final _wire__crate__api__key__ffi_descriptor_public_key_extend = + _wire__crate__api__key__ffi_descriptor_public_key_extendPtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer)>(); + + void wire__crate__api__key__ffi_descriptor_public_key_from_string( int port_, ffi.Pointer public_key, ) { - return _wire__crate__api__key__bdk_descriptor_public_key_from_string( + return _wire__crate__api__key__ffi_descriptor_public_key_from_string( port_, public_key, ); } - late final _wire__crate__api__key__bdk_descriptor_public_key_from_stringPtr = + late final _wire__crate__api__key__ffi_descriptor_public_key_from_stringPtr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_from_string'); - late final _wire__crate__api__key__bdk_descriptor_public_key_from_string = - _wire__crate__api__key__bdk_descriptor_public_key_from_stringPtr + 'frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_public_key_from_string'); + late final _wire__crate__api__key__ffi_descriptor_public_key_from_string = + _wire__crate__api__key__ffi_descriptor_public_key_from_stringPtr .asFunction< void Function(int, ffi.Pointer)>(); WireSyncRust2DartDco - wire__crate__api__key__bdk_descriptor_secret_key_as_public( - ffi.Pointer ptr, + wire__crate__api__key__ffi_descriptor_secret_key_as_public( + ffi.Pointer opaque, ) { - return _wire__crate__api__key__bdk_descriptor_secret_key_as_public( - ptr, + return _wire__crate__api__key__ffi_descriptor_secret_key_as_public( + opaque, ); } - late final _wire__crate__api__key__bdk_descriptor_secret_key_as_publicPtr = + late final _wire__crate__api__key__ffi_descriptor_secret_key_as_publicPtr = _lookup< ffi.NativeFunction< WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_as_public'); - late final _wire__crate__api__key__bdk_descriptor_secret_key_as_public = - _wire__crate__api__key__bdk_descriptor_secret_key_as_publicPtr.asFunction< + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_as_public'); + late final _wire__crate__api__key__ffi_descriptor_secret_key_as_public = + _wire__crate__api__key__ffi_descriptor_secret_key_as_publicPtr.asFunction< WireSyncRust2DartDco Function( - ffi.Pointer)>(); + ffi.Pointer)>(); WireSyncRust2DartDco - wire__crate__api__key__bdk_descriptor_secret_key_as_string( - ffi.Pointer that, + wire__crate__api__key__ffi_descriptor_secret_key_as_string( + ffi.Pointer that, ) { - return _wire__crate__api__key__bdk_descriptor_secret_key_as_string( + return _wire__crate__api__key__ffi_descriptor_secret_key_as_string( that, ); } - late final _wire__crate__api__key__bdk_descriptor_secret_key_as_stringPtr = + late final _wire__crate__api__key__ffi_descriptor_secret_key_as_stringPtr = _lookup< ffi.NativeFunction< WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_as_string'); - late final _wire__crate__api__key__bdk_descriptor_secret_key_as_string = - _wire__crate__api__key__bdk_descriptor_secret_key_as_stringPtr.asFunction< + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_as_string'); + late final _wire__crate__api__key__ffi_descriptor_secret_key_as_string = + _wire__crate__api__key__ffi_descriptor_secret_key_as_stringPtr.asFunction< WireSyncRust2DartDco Function( - ffi.Pointer)>(); + ffi.Pointer)>(); - void wire__crate__api__key__bdk_descriptor_secret_key_create( + void wire__crate__api__key__ffi_descriptor_secret_key_create( int port_, int network, - ffi.Pointer mnemonic, + ffi.Pointer mnemonic, ffi.Pointer password, ) { - return _wire__crate__api__key__bdk_descriptor_secret_key_create( + return _wire__crate__api__key__ffi_descriptor_secret_key_create( port_, network, mnemonic, @@ -3789,1798 +5041,1720 @@ class coreWire implements BaseWire { ); } - late final _wire__crate__api__key__bdk_descriptor_secret_key_createPtr = _lookup< + late final _wire__crate__api__key__ffi_descriptor_secret_key_createPtr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, ffi.Int32, - ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_create'); - late final _wire__crate__api__key__bdk_descriptor_secret_key_create = - _wire__crate__api__key__bdk_descriptor_secret_key_createPtr.asFunction< - void Function(int, int, ffi.Pointer, + 'frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_create'); + late final _wire__crate__api__key__ffi_descriptor_secret_key_create = + _wire__crate__api__key__ffi_descriptor_secret_key_createPtr.asFunction< + void Function(int, int, ffi.Pointer, ffi.Pointer)>(); - void wire__crate__api__key__bdk_descriptor_secret_key_derive( + void wire__crate__api__key__ffi_descriptor_secret_key_derive( int port_, - ffi.Pointer ptr, - ffi.Pointer path, + ffi.Pointer opaque, + ffi.Pointer path, ) { - return _wire__crate__api__key__bdk_descriptor_secret_key_derive( + return _wire__crate__api__key__ffi_descriptor_secret_key_derive( port_, - ptr, + opaque, path, ); } - late final _wire__crate__api__key__bdk_descriptor_secret_key_derivePtr = _lookup< + late final _wire__crate__api__key__ffi_descriptor_secret_key_derivePtr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_derive'); - late final _wire__crate__api__key__bdk_descriptor_secret_key_derive = - _wire__crate__api__key__bdk_descriptor_secret_key_derivePtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); - - void wire__crate__api__key__bdk_descriptor_secret_key_extend( + ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_derive'); + late final _wire__crate__api__key__ffi_descriptor_secret_key_derive = + _wire__crate__api__key__ffi_descriptor_secret_key_derivePtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer)>(); + + void wire__crate__api__key__ffi_descriptor_secret_key_extend( int port_, - ffi.Pointer ptr, - ffi.Pointer path, + ffi.Pointer opaque, + ffi.Pointer path, ) { - return _wire__crate__api__key__bdk_descriptor_secret_key_extend( + return _wire__crate__api__key__ffi_descriptor_secret_key_extend( port_, - ptr, + opaque, path, ); } - late final _wire__crate__api__key__bdk_descriptor_secret_key_extendPtr = _lookup< + late final _wire__crate__api__key__ffi_descriptor_secret_key_extendPtr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_extend'); - late final _wire__crate__api__key__bdk_descriptor_secret_key_extend = - _wire__crate__api__key__bdk_descriptor_secret_key_extendPtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); - - void wire__crate__api__key__bdk_descriptor_secret_key_from_string( + ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_extend'); + late final _wire__crate__api__key__ffi_descriptor_secret_key_extend = + _wire__crate__api__key__ffi_descriptor_secret_key_extendPtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer)>(); + + void wire__crate__api__key__ffi_descriptor_secret_key_from_string( int port_, ffi.Pointer secret_key, ) { - return _wire__crate__api__key__bdk_descriptor_secret_key_from_string( + return _wire__crate__api__key__ffi_descriptor_secret_key_from_string( port_, secret_key, ); } - late final _wire__crate__api__key__bdk_descriptor_secret_key_from_stringPtr = + late final _wire__crate__api__key__ffi_descriptor_secret_key_from_stringPtr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_from_string'); - late final _wire__crate__api__key__bdk_descriptor_secret_key_from_string = - _wire__crate__api__key__bdk_descriptor_secret_key_from_stringPtr + 'frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_from_string'); + late final _wire__crate__api__key__ffi_descriptor_secret_key_from_string = + _wire__crate__api__key__ffi_descriptor_secret_key_from_stringPtr .asFunction< void Function(int, ffi.Pointer)>(); WireSyncRust2DartDco - wire__crate__api__key__bdk_descriptor_secret_key_secret_bytes( - ffi.Pointer that, + wire__crate__api__key__ffi_descriptor_secret_key_secret_bytes( + ffi.Pointer that, ) { - return _wire__crate__api__key__bdk_descriptor_secret_key_secret_bytes( + return _wire__crate__api__key__ffi_descriptor_secret_key_secret_bytes( that, ); } - late final _wire__crate__api__key__bdk_descriptor_secret_key_secret_bytesPtr = + late final _wire__crate__api__key__ffi_descriptor_secret_key_secret_bytesPtr = _lookup< ffi.NativeFunction< WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_secret_bytes'); - late final _wire__crate__api__key__bdk_descriptor_secret_key_secret_bytes = - _wire__crate__api__key__bdk_descriptor_secret_key_secret_bytesPtr + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_secret_bytes'); + late final _wire__crate__api__key__ffi_descriptor_secret_key_secret_bytes = + _wire__crate__api__key__ffi_descriptor_secret_key_secret_bytesPtr .asFunction< WireSyncRust2DartDco Function( - ffi.Pointer)>(); + ffi.Pointer)>(); - WireSyncRust2DartDco wire__crate__api__key__bdk_mnemonic_as_string( - ffi.Pointer that, + WireSyncRust2DartDco wire__crate__api__key__ffi_mnemonic_as_string( + ffi.Pointer that, ) { - return _wire__crate__api__key__bdk_mnemonic_as_string( + return _wire__crate__api__key__ffi_mnemonic_as_string( that, ); } - late final _wire__crate__api__key__bdk_mnemonic_as_stringPtr = _lookup< + late final _wire__crate__api__key__ffi_mnemonic_as_stringPtr = _lookup< ffi.NativeFunction< WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_as_string'); - late final _wire__crate__api__key__bdk_mnemonic_as_string = - _wire__crate__api__key__bdk_mnemonic_as_stringPtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>(); + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__key__ffi_mnemonic_as_string'); + late final _wire__crate__api__key__ffi_mnemonic_as_string = + _wire__crate__api__key__ffi_mnemonic_as_stringPtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>(); - void wire__crate__api__key__bdk_mnemonic_from_entropy( + void wire__crate__api__key__ffi_mnemonic_from_entropy( int port_, ffi.Pointer entropy, ) { - return _wire__crate__api__key__bdk_mnemonic_from_entropy( + return _wire__crate__api__key__ffi_mnemonic_from_entropy( port_, entropy, ); } - late final _wire__crate__api__key__bdk_mnemonic_from_entropyPtr = _lookup< + late final _wire__crate__api__key__ffi_mnemonic_from_entropyPtr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_entropy'); - late final _wire__crate__api__key__bdk_mnemonic_from_entropy = - _wire__crate__api__key__bdk_mnemonic_from_entropyPtr.asFunction< + 'frbgen_bdk_flutter_wire__crate__api__key__ffi_mnemonic_from_entropy'); + late final _wire__crate__api__key__ffi_mnemonic_from_entropy = + _wire__crate__api__key__ffi_mnemonic_from_entropyPtr.asFunction< void Function(int, ffi.Pointer)>(); - void wire__crate__api__key__bdk_mnemonic_from_string( + void wire__crate__api__key__ffi_mnemonic_from_string( int port_, ffi.Pointer mnemonic, ) { - return _wire__crate__api__key__bdk_mnemonic_from_string( + return _wire__crate__api__key__ffi_mnemonic_from_string( port_, mnemonic, ); } - late final _wire__crate__api__key__bdk_mnemonic_from_stringPtr = _lookup< + late final _wire__crate__api__key__ffi_mnemonic_from_stringPtr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_string'); - late final _wire__crate__api__key__bdk_mnemonic_from_string = - _wire__crate__api__key__bdk_mnemonic_from_stringPtr.asFunction< + 'frbgen_bdk_flutter_wire__crate__api__key__ffi_mnemonic_from_string'); + late final _wire__crate__api__key__ffi_mnemonic_from_string = + _wire__crate__api__key__ffi_mnemonic_from_stringPtr.asFunction< void Function(int, ffi.Pointer)>(); - void wire__crate__api__key__bdk_mnemonic_new( + void wire__crate__api__key__ffi_mnemonic_new( int port_, int word_count, ) { - return _wire__crate__api__key__bdk_mnemonic_new( + return _wire__crate__api__key__ffi_mnemonic_new( port_, word_count, ); } - late final _wire__crate__api__key__bdk_mnemonic_newPtr = + late final _wire__crate__api__key__ffi_mnemonic_newPtr = _lookup>( - 'frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_new'); - late final _wire__crate__api__key__bdk_mnemonic_new = - _wire__crate__api__key__bdk_mnemonic_newPtr + 'frbgen_bdk_flutter_wire__crate__api__key__ffi_mnemonic_new'); + late final _wire__crate__api__key__ffi_mnemonic_new = + _wire__crate__api__key__ffi_mnemonic_newPtr .asFunction(); - WireSyncRust2DartDco wire__crate__api__psbt__bdk_psbt_as_string( - ffi.Pointer that, + void wire__crate__api__store__ffi_connection_new( + int port_, + ffi.Pointer path, ) { - return _wire__crate__api__psbt__bdk_psbt_as_string( - that, + return _wire__crate__api__store__ffi_connection_new( + port_, + path, ); } - late final _wire__crate__api__psbt__bdk_psbt_as_stringPtr = _lookup< + late final _wire__crate__api__store__ffi_connection_newPtr = _lookup< ffi.NativeFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_as_string'); - late final _wire__crate__api__psbt__bdk_psbt_as_string = - _wire__crate__api__psbt__bdk_psbt_as_stringPtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>(); + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__store__ffi_connection_new'); + late final _wire__crate__api__store__ffi_connection_new = + _wire__crate__api__store__ffi_connection_newPtr.asFunction< + void Function(int, ffi.Pointer)>(); - void wire__crate__api__psbt__bdk_psbt_combine( + void wire__crate__api__store__ffi_connection_new_in_memory( int port_, - ffi.Pointer ptr, - ffi.Pointer other, ) { - return _wire__crate__api__psbt__bdk_psbt_combine( + return _wire__crate__api__store__ffi_connection_new_in_memory( port_, - ptr, - other, - ); - } - - late final _wire__crate__api__psbt__bdk_psbt_combinePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_combine'); - late final _wire__crate__api__psbt__bdk_psbt_combine = - _wire__crate__api__psbt__bdk_psbt_combinePtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); - - WireSyncRust2DartDco wire__crate__api__psbt__bdk_psbt_extract_tx( - ffi.Pointer ptr, - ) { - return _wire__crate__api__psbt__bdk_psbt_extract_tx( - ptr, ); } - late final _wire__crate__api__psbt__bdk_psbt_extract_txPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_extract_tx'); - late final _wire__crate__api__psbt__bdk_psbt_extract_tx = - _wire__crate__api__psbt__bdk_psbt_extract_txPtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>(); + late final _wire__crate__api__store__ffi_connection_new_in_memoryPtr = _lookup< + ffi.NativeFunction>( + 'frbgen_bdk_flutter_wire__crate__api__store__ffi_connection_new_in_memory'); + late final _wire__crate__api__store__ffi_connection_new_in_memory = + _wire__crate__api__store__ffi_connection_new_in_memoryPtr + .asFunction(); - WireSyncRust2DartDco wire__crate__api__psbt__bdk_psbt_fee_amount( - ffi.Pointer that, + void wire__crate__api__tx_builder__finish_bump_fee_tx_builder( + int port_, + ffi.Pointer txid, + ffi.Pointer fee_rate, + ffi.Pointer wallet, + bool enable_rbf, + ffi.Pointer n_sequence, ) { - return _wire__crate__api__psbt__bdk_psbt_fee_amount( - that, + return _wire__crate__api__tx_builder__finish_bump_fee_tx_builder( + port_, + txid, + fee_rate, + wallet, + enable_rbf, + n_sequence, ); } - late final _wire__crate__api__psbt__bdk_psbt_fee_amountPtr = _lookup< + late final _wire__crate__api__tx_builder__finish_bump_fee_tx_builderPtr = _lookup< ffi.NativeFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_fee_amount'); - late final _wire__crate__api__psbt__bdk_psbt_fee_amount = - _wire__crate__api__psbt__bdk_psbt_fee_amountPtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>(); + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__tx_builder__finish_bump_fee_tx_builder'); + late final _wire__crate__api__tx_builder__finish_bump_fee_tx_builder = + _wire__crate__api__tx_builder__finish_bump_fee_tx_builderPtr.asFunction< + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer)>(); - WireSyncRust2DartDco wire__crate__api__psbt__bdk_psbt_fee_rate( - ffi.Pointer that, + void wire__crate__api__tx_builder__tx_builder_finish( + int port_, + ffi.Pointer wallet, + ffi.Pointer recipients, + ffi.Pointer utxos, + ffi.Pointer un_spendable, + int change_policy, + bool manually_selected_only, + ffi.Pointer fee_rate, + ffi.Pointer fee_absolute, + bool drain_wallet, + ffi.Pointer + policy_path, + ffi.Pointer drain_to, + ffi.Pointer rbf, + ffi.Pointer data, ) { - return _wire__crate__api__psbt__bdk_psbt_fee_rate( - that, + return _wire__crate__api__tx_builder__tx_builder_finish( + port_, + wallet, + recipients, + utxos, + un_spendable, + change_policy, + manually_selected_only, + fee_rate, + fee_absolute, + drain_wallet, + policy_path, + drain_to, + rbf, + data, ); } - late final _wire__crate__api__psbt__bdk_psbt_fee_ratePtr = _lookup< + late final _wire__crate__api__tx_builder__tx_builder_finishPtr = _lookup< ffi.NativeFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_fee_rate'); - late final _wire__crate__api__psbt__bdk_psbt_fee_rate = - _wire__crate__api__psbt__bdk_psbt_fee_ratePtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>(); + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Bool, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer< + wire_cst_record_map_string_list_prim_usize_strict_keychain_kind>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__tx_builder__tx_builder_finish'); + late final _wire__crate__api__tx_builder__tx_builder_finish = + _wire__crate__api__tx_builder__tx_builder_finishPtr.asFunction< + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + bool, + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer< + wire_cst_record_map_string_list_prim_usize_strict_keychain_kind>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - void wire__crate__api__psbt__bdk_psbt_from_str( + void wire__crate__api__types__change_spend_policy_default( int port_, - ffi.Pointer psbt_base64, ) { - return _wire__crate__api__psbt__bdk_psbt_from_str( + return _wire__crate__api__types__change_spend_policy_default( port_, - psbt_base64, ); } - late final _wire__crate__api__psbt__bdk_psbt_from_strPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_from_str'); - late final _wire__crate__api__psbt__bdk_psbt_from_str = - _wire__crate__api__psbt__bdk_psbt_from_strPtr.asFunction< - void Function(int, ffi.Pointer)>(); + late final _wire__crate__api__types__change_spend_policy_defaultPtr = _lookup< + ffi.NativeFunction>( + 'frbgen_bdk_flutter_wire__crate__api__types__change_spend_policy_default'); + late final _wire__crate__api__types__change_spend_policy_default = + _wire__crate__api__types__change_spend_policy_defaultPtr + .asFunction(); - WireSyncRust2DartDco wire__crate__api__psbt__bdk_psbt_json_serialize( - ffi.Pointer that, + void wire__crate__api__types__ffi_full_scan_request_builder_build( + int port_, + ffi.Pointer that, ) { - return _wire__crate__api__psbt__bdk_psbt_json_serialize( + return _wire__crate__api__types__ffi_full_scan_request_builder_build( + port_, that, ); } - late final _wire__crate__api__psbt__bdk_psbt_json_serializePtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_json_serialize'); - late final _wire__crate__api__psbt__bdk_psbt_json_serialize = - _wire__crate__api__psbt__bdk_psbt_json_serializePtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>(); + late final _wire__crate__api__types__ffi_full_scan_request_builder_buildPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__types__ffi_full_scan_request_builder_build'); + late final _wire__crate__api__types__ffi_full_scan_request_builder_build = + _wire__crate__api__types__ffi_full_scan_request_builder_buildPtr + .asFunction< + void Function( + int, ffi.Pointer)>(); - WireSyncRust2DartDco wire__crate__api__psbt__bdk_psbt_serialize( - ffi.Pointer that, + void + wire__crate__api__types__ffi_full_scan_request_builder_inspect_spks_for_all_keychains( + int port_, + ffi.Pointer that, + ffi.Pointer inspector, ) { - return _wire__crate__api__psbt__bdk_psbt_serialize( + return _wire__crate__api__types__ffi_full_scan_request_builder_inspect_spks_for_all_keychains( + port_, that, + inspector, ); } - late final _wire__crate__api__psbt__bdk_psbt_serializePtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_serialize'); - late final _wire__crate__api__psbt__bdk_psbt_serialize = - _wire__crate__api__psbt__bdk_psbt_serializePtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>(); + late final _wire__crate__api__types__ffi_full_scan_request_builder_inspect_spks_for_all_keychainsPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__types__ffi_full_scan_request_builder_inspect_spks_for_all_keychains'); + late final _wire__crate__api__types__ffi_full_scan_request_builder_inspect_spks_for_all_keychains = + _wire__crate__api__types__ffi_full_scan_request_builder_inspect_spks_for_all_keychainsPtr + .asFunction< + void Function( + int, + ffi.Pointer, + ffi.Pointer)>(); - WireSyncRust2DartDco wire__crate__api__psbt__bdk_psbt_txid( - ffi.Pointer that, + WireSyncRust2DartDco wire__crate__api__types__ffi_policy_id( + ffi.Pointer that, ) { - return _wire__crate__api__psbt__bdk_psbt_txid( + return _wire__crate__api__types__ffi_policy_id( that, ); } - late final _wire__crate__api__psbt__bdk_psbt_txidPtr = _lookup< + late final _wire__crate__api__types__ffi_policy_idPtr = _lookup< ffi.NativeFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_txid'); - late final _wire__crate__api__psbt__bdk_psbt_txid = - _wire__crate__api__psbt__bdk_psbt_txidPtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>(); + WireSyncRust2DartDco Function(ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__types__ffi_policy_id'); + late final _wire__crate__api__types__ffi_policy_id = + _wire__crate__api__types__ffi_policy_idPtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>(); - WireSyncRust2DartDco wire__crate__api__types__bdk_address_as_string( - ffi.Pointer that, + void wire__crate__api__types__ffi_sync_request_builder_build( + int port_, + ffi.Pointer that, ) { - return _wire__crate__api__types__bdk_address_as_string( + return _wire__crate__api__types__ffi_sync_request_builder_build( + port_, that, ); } - late final _wire__crate__api__types__bdk_address_as_stringPtr = _lookup< + late final _wire__crate__api__types__ffi_sync_request_builder_buildPtr = _lookup< ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_address_as_string'); - late final _wire__crate__api__types__bdk_address_as_string = - _wire__crate__api__types__bdk_address_as_stringPtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>(); + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__types__ffi_sync_request_builder_build'); + late final _wire__crate__api__types__ffi_sync_request_builder_build = + _wire__crate__api__types__ffi_sync_request_builder_buildPtr.asFunction< + void Function(int, ffi.Pointer)>(); - void wire__crate__api__types__bdk_address_from_script( + void wire__crate__api__types__ffi_sync_request_builder_inspect_spks( int port_, - ffi.Pointer script, - int network, + ffi.Pointer that, + ffi.Pointer inspector, ) { - return _wire__crate__api__types__bdk_address_from_script( + return _wire__crate__api__types__ffi_sync_request_builder_inspect_spks( port_, - script, - network, + that, + inspector, ); } - late final _wire__crate__api__types__bdk_address_from_scriptPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer, ffi.Int32)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_address_from_script'); - late final _wire__crate__api__types__bdk_address_from_script = - _wire__crate__api__types__bdk_address_from_scriptPtr.asFunction< - void Function(int, ffi.Pointer, int)>(); + late final _wire__crate__api__types__ffi_sync_request_builder_inspect_spksPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, + ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__types__ffi_sync_request_builder_inspect_spks'); + late final _wire__crate__api__types__ffi_sync_request_builder_inspect_spks = + _wire__crate__api__types__ffi_sync_request_builder_inspect_spksPtr + .asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer)>(); - void wire__crate__api__types__bdk_address_from_string( + void wire__crate__api__types__network_default( int port_, - ffi.Pointer address, - int network, ) { - return _wire__crate__api__types__bdk_address_from_string( + return _wire__crate__api__types__network_default( port_, - address, - network, ); } - late final _wire__crate__api__types__bdk_address_from_stringPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, - ffi.Pointer, ffi.Int32)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_address_from_string'); - late final _wire__crate__api__types__bdk_address_from_string = - _wire__crate__api__types__bdk_address_from_stringPtr.asFunction< - void Function( - int, ffi.Pointer, int)>(); + late final _wire__crate__api__types__network_defaultPtr = + _lookup>( + 'frbgen_bdk_flutter_wire__crate__api__types__network_default'); + late final _wire__crate__api__types__network_default = + _wire__crate__api__types__network_defaultPtr + .asFunction(); - WireSyncRust2DartDco - wire__crate__api__types__bdk_address_is_valid_for_network( - ffi.Pointer that, - int network, + void wire__crate__api__types__sign_options_default( + int port_, ) { - return _wire__crate__api__types__bdk_address_is_valid_for_network( - that, - network, + return _wire__crate__api__types__sign_options_default( + port_, ); } - late final _wire__crate__api__types__bdk_address_is_valid_for_networkPtr = - _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer, ffi.Int32)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_address_is_valid_for_network'); - late final _wire__crate__api__types__bdk_address_is_valid_for_network = - _wire__crate__api__types__bdk_address_is_valid_for_networkPtr.asFunction< - WireSyncRust2DartDco Function( - ffi.Pointer, int)>(); + late final _wire__crate__api__types__sign_options_defaultPtr = + _lookup>( + 'frbgen_bdk_flutter_wire__crate__api__types__sign_options_default'); + late final _wire__crate__api__types__sign_options_default = + _wire__crate__api__types__sign_options_defaultPtr + .asFunction(); - WireSyncRust2DartDco wire__crate__api__types__bdk_address_network( - ffi.Pointer that, + void wire__crate__api__wallet__ffi_wallet_apply_update( + int port_, + ffi.Pointer that, + ffi.Pointer update, ) { - return _wire__crate__api__types__bdk_address_network( + return _wire__crate__api__wallet__ffi_wallet_apply_update( + port_, that, + update, ); } - late final _wire__crate__api__types__bdk_address_networkPtr = _lookup< + late final _wire__crate__api__wallet__ffi_wallet_apply_updatePtr = _lookup< ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_address_network'); - late final _wire__crate__api__types__bdk_address_network = - _wire__crate__api__types__bdk_address_networkPtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>(); - - WireSyncRust2DartDco wire__crate__api__types__bdk_address_payload( - ffi.Pointer that, + ffi.Void Function(ffi.Int64, ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_apply_update'); + late final _wire__crate__api__wallet__ffi_wallet_apply_update = + _wire__crate__api__wallet__ffi_wallet_apply_updatePtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer)>(); + + void wire__crate__api__wallet__ffi_wallet_calculate_fee( + int port_, + ffi.Pointer opaque, + ffi.Pointer tx, ) { - return _wire__crate__api__types__bdk_address_payload( - that, + return _wire__crate__api__wallet__ffi_wallet_calculate_fee( + port_, + opaque, + tx, ); } - late final _wire__crate__api__types__bdk_address_payloadPtr = _lookup< + late final _wire__crate__api__wallet__ffi_wallet_calculate_feePtr = _lookup< ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_address_payload'); - late final _wire__crate__api__types__bdk_address_payload = - _wire__crate__api__types__bdk_address_payloadPtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>(); - - WireSyncRust2DartDco wire__crate__api__types__bdk_address_script( - ffi.Pointer ptr, + ffi.Void Function(ffi.Int64, ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_calculate_fee'); + late final _wire__crate__api__wallet__ffi_wallet_calculate_fee = + _wire__crate__api__wallet__ffi_wallet_calculate_feePtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer)>(); + + void wire__crate__api__wallet__ffi_wallet_calculate_fee_rate( + int port_, + ffi.Pointer opaque, + ffi.Pointer tx, ) { - return _wire__crate__api__types__bdk_address_script( - ptr, + return _wire__crate__api__wallet__ffi_wallet_calculate_fee_rate( + port_, + opaque, + tx, ); } - late final _wire__crate__api__types__bdk_address_scriptPtr = _lookup< + late final _wire__crate__api__wallet__ffi_wallet_calculate_fee_ratePtr = _lookup< ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_address_script'); - late final _wire__crate__api__types__bdk_address_script = - _wire__crate__api__types__bdk_address_scriptPtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>(); - - WireSyncRust2DartDco wire__crate__api__types__bdk_address_to_qr_uri( - ffi.Pointer that, + ffi.Void Function(ffi.Int64, ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_calculate_fee_rate'); + late final _wire__crate__api__wallet__ffi_wallet_calculate_fee_rate = + _wire__crate__api__wallet__ffi_wallet_calculate_fee_ratePtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__wallet__ffi_wallet_get_balance( + ffi.Pointer that, ) { - return _wire__crate__api__types__bdk_address_to_qr_uri( + return _wire__crate__api__wallet__ffi_wallet_get_balance( that, ); } - late final _wire__crate__api__types__bdk_address_to_qr_uriPtr = _lookup< + late final _wire__crate__api__wallet__ffi_wallet_get_balancePtr = _lookup< ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_address_to_qr_uri'); - late final _wire__crate__api__types__bdk_address_to_qr_uri = - _wire__crate__api__types__bdk_address_to_qr_uriPtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>(); - - WireSyncRust2DartDco wire__crate__api__types__bdk_script_buf_as_string( - ffi.Pointer that, + WireSyncRust2DartDco Function(ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_get_balance'); + late final _wire__crate__api__wallet__ffi_wallet_get_balance = + _wire__crate__api__wallet__ffi_wallet_get_balancePtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__wallet__ffi_wallet_get_tx( + ffi.Pointer that, + ffi.Pointer txid, ) { - return _wire__crate__api__types__bdk_script_buf_as_string( + return _wire__crate__api__wallet__ffi_wallet_get_tx( that, + txid, ); } - late final _wire__crate__api__types__bdk_script_buf_as_stringPtr = _lookup< + late final _wire__crate__api__wallet__ffi_wallet_get_txPtr = _lookup< ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_as_string'); - late final _wire__crate__api__types__bdk_script_buf_as_string = - _wire__crate__api__types__bdk_script_buf_as_stringPtr.asFunction< - WireSyncRust2DartDco Function( - ffi.Pointer)>(); + WireSyncRust2DartDco Function(ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_get_tx'); + late final _wire__crate__api__wallet__ffi_wallet_get_tx = + _wire__crate__api__wallet__ffi_wallet_get_txPtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer, + ffi.Pointer)>(); - WireSyncRust2DartDco wire__crate__api__types__bdk_script_buf_empty() { - return _wire__crate__api__types__bdk_script_buf_empty(); + WireSyncRust2DartDco wire__crate__api__wallet__ffi_wallet_is_mine( + ffi.Pointer that, + ffi.Pointer script, + ) { + return _wire__crate__api__wallet__ffi_wallet_is_mine( + that, + script, + ); } - late final _wire__crate__api__types__bdk_script_buf_emptyPtr = - _lookup>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_empty'); - late final _wire__crate__api__types__bdk_script_buf_empty = - _wire__crate__api__types__bdk_script_buf_emptyPtr - .asFunction(); - - void wire__crate__api__types__bdk_script_buf_from_hex( - int port_, - ffi.Pointer s, + late final _wire__crate__api__wallet__ffi_wallet_is_minePtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_is_mine'); + late final _wire__crate__api__wallet__ffi_wallet_is_mine = + _wire__crate__api__wallet__ffi_wallet_is_minePtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer, + ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__wallet__ffi_wallet_list_output( + ffi.Pointer that, ) { - return _wire__crate__api__types__bdk_script_buf_from_hex( - port_, - s, + return _wire__crate__api__wallet__ffi_wallet_list_output( + that, ); } - late final _wire__crate__api__types__bdk_script_buf_from_hexPtr = _lookup< + late final _wire__crate__api__wallet__ffi_wallet_list_outputPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_from_hex'); - late final _wire__crate__api__types__bdk_script_buf_from_hex = - _wire__crate__api__types__bdk_script_buf_from_hexPtr.asFunction< - void Function(int, ffi.Pointer)>(); - - void wire__crate__api__types__bdk_script_buf_with_capacity( - int port_, - int capacity, + WireSyncRust2DartDco Function(ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_list_output'); + late final _wire__crate__api__wallet__ffi_wallet_list_output = + _wire__crate__api__wallet__ffi_wallet_list_outputPtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__wallet__ffi_wallet_list_unspent( + ffi.Pointer that, ) { - return _wire__crate__api__types__bdk_script_buf_with_capacity( - port_, - capacity, + return _wire__crate__api__wallet__ffi_wallet_list_unspent( + that, ); } - late final _wire__crate__api__types__bdk_script_buf_with_capacityPtr = _lookup< - ffi.NativeFunction>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_with_capacity'); - late final _wire__crate__api__types__bdk_script_buf_with_capacity = - _wire__crate__api__types__bdk_script_buf_with_capacityPtr - .asFunction(); + late final _wire__crate__api__wallet__ffi_wallet_list_unspentPtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_list_unspent'); + late final _wire__crate__api__wallet__ffi_wallet_list_unspent = + _wire__crate__api__wallet__ffi_wallet_list_unspentPtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>(); - void wire__crate__api__types__bdk_transaction_from_bytes( + void wire__crate__api__wallet__ffi_wallet_load( int port_, - ffi.Pointer transaction_bytes, + ffi.Pointer descriptor, + ffi.Pointer change_descriptor, + ffi.Pointer connection, ) { - return _wire__crate__api__types__bdk_transaction_from_bytes( + return _wire__crate__api__wallet__ffi_wallet_load( port_, - transaction_bytes, + descriptor, + change_descriptor, + connection, ); } - late final _wire__crate__api__types__bdk_transaction_from_bytesPtr = _lookup< + late final _wire__crate__api__wallet__ffi_wallet_loadPtr = _lookup< ffi.NativeFunction< ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_from_bytes'); - late final _wire__crate__api__types__bdk_transaction_from_bytes = - _wire__crate__api__types__bdk_transaction_from_bytesPtr.asFunction< - void Function(int, ffi.Pointer)>(); + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_load'); + late final _wire__crate__api__wallet__ffi_wallet_load = + _wire__crate__api__wallet__ffi_wallet_loadPtr.asFunction< + void Function( + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - void wire__crate__api__types__bdk_transaction_input( - int port_, - ffi.Pointer that, + WireSyncRust2DartDco wire__crate__api__wallet__ffi_wallet_network( + ffi.Pointer that, ) { - return _wire__crate__api__types__bdk_transaction_input( - port_, + return _wire__crate__api__wallet__ffi_wallet_network( that, ); } - late final _wire__crate__api__types__bdk_transaction_inputPtr = _lookup< + late final _wire__crate__api__wallet__ffi_wallet_networkPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_input'); - late final _wire__crate__api__types__bdk_transaction_input = - _wire__crate__api__types__bdk_transaction_inputPtr.asFunction< - void Function(int, ffi.Pointer)>(); + WireSyncRust2DartDco Function(ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_network'); + late final _wire__crate__api__wallet__ffi_wallet_network = + _wire__crate__api__wallet__ffi_wallet_networkPtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>(); - void wire__crate__api__types__bdk_transaction_is_coin_base( + void wire__crate__api__wallet__ffi_wallet_new( int port_, - ffi.Pointer that, + ffi.Pointer descriptor, + ffi.Pointer change_descriptor, + int network, + ffi.Pointer connection, ) { - return _wire__crate__api__types__bdk_transaction_is_coin_base( + return _wire__crate__api__wallet__ffi_wallet_new( port_, - that, + descriptor, + change_descriptor, + network, + connection, ); } - late final _wire__crate__api__types__bdk_transaction_is_coin_basePtr = _lookup< + late final _wire__crate__api__wallet__ffi_wallet_newPtr = _lookup< ffi.NativeFunction< ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_coin_base'); - late final _wire__crate__api__types__bdk_transaction_is_coin_base = - _wire__crate__api__types__bdk_transaction_is_coin_basePtr.asFunction< - void Function(int, ffi.Pointer)>(); + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_new'); + late final _wire__crate__api__wallet__ffi_wallet_new = + _wire__crate__api__wallet__ffi_wallet_newPtr.asFunction< + void Function( + int, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); - void wire__crate__api__types__bdk_transaction_is_explicitly_rbf( + void wire__crate__api__wallet__ffi_wallet_persist( int port_, - ffi.Pointer that, + ffi.Pointer opaque, + ffi.Pointer connection, ) { - return _wire__crate__api__types__bdk_transaction_is_explicitly_rbf( + return _wire__crate__api__wallet__ffi_wallet_persist( port_, - that, + opaque, + connection, ); } - late final _wire__crate__api__types__bdk_transaction_is_explicitly_rbfPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_explicitly_rbf'); - late final _wire__crate__api__types__bdk_transaction_is_explicitly_rbf = - _wire__crate__api__types__bdk_transaction_is_explicitly_rbfPtr.asFunction< - void Function(int, ffi.Pointer)>(); - - void wire__crate__api__types__bdk_transaction_is_lock_time_enabled( - int port_, - ffi.Pointer that, + late final _wire__crate__api__wallet__ffi_wallet_persistPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_persist'); + late final _wire__crate__api__wallet__ffi_wallet_persist = + _wire__crate__api__wallet__ffi_wallet_persistPtr.asFunction< + void Function(int, ffi.Pointer, + ffi.Pointer)>(); + + WireSyncRust2DartDco wire__crate__api__wallet__ffi_wallet_policies( + ffi.Pointer opaque, + int keychain_kind, ) { - return _wire__crate__api__types__bdk_transaction_is_lock_time_enabled( - port_, - that, + return _wire__crate__api__wallet__ffi_wallet_policies( + opaque, + keychain_kind, ); } - late final _wire__crate__api__types__bdk_transaction_is_lock_time_enabledPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_lock_time_enabled'); - late final _wire__crate__api__types__bdk_transaction_is_lock_time_enabled = - _wire__crate__api__types__bdk_transaction_is_lock_time_enabledPtr - .asFunction< - void Function(int, ffi.Pointer)>(); + late final _wire__crate__api__wallet__ffi_wallet_policiesPtr = _lookup< + ffi.NativeFunction< + WireSyncRust2DartDco Function( + ffi.Pointer, ffi.Int32)>>( + 'frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_policies'); + late final _wire__crate__api__wallet__ffi_wallet_policies = + _wire__crate__api__wallet__ffi_wallet_policiesPtr.asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer, int)>(); - void wire__crate__api__types__bdk_transaction_lock_time( - int port_, - ffi.Pointer that, + WireSyncRust2DartDco wire__crate__api__wallet__ffi_wallet_reveal_next_address( + ffi.Pointer opaque, + int keychain_kind, ) { - return _wire__crate__api__types__bdk_transaction_lock_time( - port_, - that, + return _wire__crate__api__wallet__ffi_wallet_reveal_next_address( + opaque, + keychain_kind, ); } - late final _wire__crate__api__types__bdk_transaction_lock_timePtr = _lookup< + late final _wire__crate__api__wallet__ffi_wallet_reveal_next_addressPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_lock_time'); - late final _wire__crate__api__types__bdk_transaction_lock_time = - _wire__crate__api__types__bdk_transaction_lock_timePtr.asFunction< - void Function(int, ffi.Pointer)>(); + WireSyncRust2DartDco Function( + ffi.Pointer, ffi.Int32)>>( + 'frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_reveal_next_address'); + late final _wire__crate__api__wallet__ffi_wallet_reveal_next_address = + _wire__crate__api__wallet__ffi_wallet_reveal_next_addressPtr.asFunction< + WireSyncRust2DartDco Function( + ffi.Pointer, int)>(); - void wire__crate__api__types__bdk_transaction_new( + void wire__crate__api__wallet__ffi_wallet_sign( int port_, - int version, - ffi.Pointer lock_time, - ffi.Pointer input, - ffi.Pointer output, + ffi.Pointer opaque, + ffi.Pointer psbt, + ffi.Pointer sign_options, ) { - return _wire__crate__api__types__bdk_transaction_new( + return _wire__crate__api__wallet__ffi_wallet_sign( port_, - version, - lock_time, - input, - output, + opaque, + psbt, + sign_options, ); } - late final _wire__crate__api__types__bdk_transaction_newPtr = _lookup< + late final _wire__crate__api__wallet__ffi_wallet_signPtr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Int64, - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_new'); - late final _wire__crate__api__types__bdk_transaction_new = - _wire__crate__api__types__bdk_transaction_newPtr.asFunction< + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_sign'); + late final _wire__crate__api__wallet__ffi_wallet_sign = + _wire__crate__api__wallet__ffi_wallet_signPtr.asFunction< void Function( int, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - void wire__crate__api__types__bdk_transaction_output( + void wire__crate__api__wallet__ffi_wallet_start_full_scan( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire__crate__api__types__bdk_transaction_output( + return _wire__crate__api__wallet__ffi_wallet_start_full_scan( port_, that, ); } - late final _wire__crate__api__types__bdk_transaction_outputPtr = _lookup< + late final _wire__crate__api__wallet__ffi_wallet_start_full_scanPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_output'); - late final _wire__crate__api__types__bdk_transaction_output = - _wire__crate__api__types__bdk_transaction_outputPtr.asFunction< - void Function(int, ffi.Pointer)>(); + ffi.Void Function(ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_start_full_scan'); + late final _wire__crate__api__wallet__ffi_wallet_start_full_scan = + _wire__crate__api__wallet__ffi_wallet_start_full_scanPtr + .asFunction)>(); - void wire__crate__api__types__bdk_transaction_serialize( + void wire__crate__api__wallet__ffi_wallet_start_sync_with_revealed_spks( int port_, - ffi.Pointer that, + ffi.Pointer that, ) { - return _wire__crate__api__types__bdk_transaction_serialize( + return _wire__crate__api__wallet__ffi_wallet_start_sync_with_revealed_spks( port_, that, ); } - late final _wire__crate__api__types__bdk_transaction_serializePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_serialize'); - late final _wire__crate__api__types__bdk_transaction_serialize = - _wire__crate__api__types__bdk_transaction_serializePtr.asFunction< - void Function(int, ffi.Pointer)>(); - - void wire__crate__api__types__bdk_transaction_size( - int port_, - ffi.Pointer that, + late final _wire__crate__api__wallet__ffi_wallet_start_sync_with_revealed_spksPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_start_sync_with_revealed_spks'); + late final _wire__crate__api__wallet__ffi_wallet_start_sync_with_revealed_spks = + _wire__crate__api__wallet__ffi_wallet_start_sync_with_revealed_spksPtr + .asFunction)>(); + + WireSyncRust2DartDco wire__crate__api__wallet__ffi_wallet_transactions( + ffi.Pointer that, ) { - return _wire__crate__api__types__bdk_transaction_size( - port_, + return _wire__crate__api__wallet__ffi_wallet_transactions( that, ); } - late final _wire__crate__api__types__bdk_transaction_sizePtr = _lookup< + late final _wire__crate__api__wallet__ffi_wallet_transactionsPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_size'); - late final _wire__crate__api__types__bdk_transaction_size = - _wire__crate__api__types__bdk_transaction_sizePtr.asFunction< - void Function(int, ffi.Pointer)>(); + WireSyncRust2DartDco Function(ffi.Pointer)>>( + 'frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_transactions'); + late final _wire__crate__api__wallet__ffi_wallet_transactions = + _wire__crate__api__wallet__ffi_wallet_transactionsPtr.asFunction< + WireSyncRust2DartDco Function(ffi.Pointer)>(); - void wire__crate__api__types__bdk_transaction_txid( - int port_, - ffi.Pointer that, + void rust_arc_increment_strong_count_RustOpaque_bdk_corebitcoinAddress( + ffi.Pointer ptr, ) { - return _wire__crate__api__types__bdk_transaction_txid( - port_, - that, + return _rust_arc_increment_strong_count_RustOpaque_bdk_corebitcoinAddress( + ptr, ); } - late final _wire__crate__api__types__bdk_transaction_txidPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_txid'); - late final _wire__crate__api__types__bdk_transaction_txid = - _wire__crate__api__types__bdk_transaction_txidPtr.asFunction< - void Function(int, ffi.Pointer)>(); + late final _rust_arc_increment_strong_count_RustOpaque_bdk_corebitcoinAddressPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_corebitcoinAddress'); + late final _rust_arc_increment_strong_count_RustOpaque_bdk_corebitcoinAddress = + _rust_arc_increment_strong_count_RustOpaque_bdk_corebitcoinAddressPtr + .asFunction)>(); - void wire__crate__api__types__bdk_transaction_version( - int port_, - ffi.Pointer that, + void rust_arc_decrement_strong_count_RustOpaque_bdk_corebitcoinAddress( + ffi.Pointer ptr, ) { - return _wire__crate__api__types__bdk_transaction_version( - port_, - that, + return _rust_arc_decrement_strong_count_RustOpaque_bdk_corebitcoinAddress( + ptr, ); } - late final _wire__crate__api__types__bdk_transaction_versionPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_version'); - late final _wire__crate__api__types__bdk_transaction_version = - _wire__crate__api__types__bdk_transaction_versionPtr.asFunction< - void Function(int, ffi.Pointer)>(); + late final _rust_arc_decrement_strong_count_RustOpaque_bdk_corebitcoinAddressPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_corebitcoinAddress'); + late final _rust_arc_decrement_strong_count_RustOpaque_bdk_corebitcoinAddress = + _rust_arc_decrement_strong_count_RustOpaque_bdk_corebitcoinAddressPtr + .asFunction)>(); - void wire__crate__api__types__bdk_transaction_vsize( - int port_, - ffi.Pointer that, + void rust_arc_increment_strong_count_RustOpaque_bdk_corebitcoinTransaction( + ffi.Pointer ptr, ) { - return _wire__crate__api__types__bdk_transaction_vsize( - port_, - that, + return _rust_arc_increment_strong_count_RustOpaque_bdk_corebitcoinTransaction( + ptr, ); } - late final _wire__crate__api__types__bdk_transaction_vsizePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_vsize'); - late final _wire__crate__api__types__bdk_transaction_vsize = - _wire__crate__api__types__bdk_transaction_vsizePtr.asFunction< - void Function(int, ffi.Pointer)>(); + late final _rust_arc_increment_strong_count_RustOpaque_bdk_corebitcoinTransactionPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_corebitcoinTransaction'); + late final _rust_arc_increment_strong_count_RustOpaque_bdk_corebitcoinTransaction = + _rust_arc_increment_strong_count_RustOpaque_bdk_corebitcoinTransactionPtr + .asFunction)>(); - void wire__crate__api__types__bdk_transaction_weight( - int port_, - ffi.Pointer that, + void rust_arc_decrement_strong_count_RustOpaque_bdk_corebitcoinTransaction( + ffi.Pointer ptr, ) { - return _wire__crate__api__types__bdk_transaction_weight( - port_, - that, + return _rust_arc_decrement_strong_count_RustOpaque_bdk_corebitcoinTransaction( + ptr, ); } - late final _wire__crate__api__types__bdk_transaction_weightPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_weight'); - late final _wire__crate__api__types__bdk_transaction_weight = - _wire__crate__api__types__bdk_transaction_weightPtr.asFunction< - void Function(int, ffi.Pointer)>(); + late final _rust_arc_decrement_strong_count_RustOpaque_bdk_corebitcoinTransactionPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_corebitcoinTransaction'); + late final _rust_arc_decrement_strong_count_RustOpaque_bdk_corebitcoinTransaction = + _rust_arc_decrement_strong_count_RustOpaque_bdk_corebitcoinTransactionPtr + .asFunction)>(); - WireSyncRust2DartDco wire__crate__api__wallet__bdk_wallet_get_address( - ffi.Pointer ptr, - ffi.Pointer address_index, + void + rust_arc_increment_strong_count_RustOpaque_bdk_electrumBdkElectrumClientbdk_electrumelectrum_clientClient( + ffi.Pointer ptr, ) { - return _wire__crate__api__wallet__bdk_wallet_get_address( + return _rust_arc_increment_strong_count_RustOpaque_bdk_electrumBdkElectrumClientbdk_electrumelectrum_clientClient( ptr, - address_index, ); } - late final _wire__crate__api__wallet__bdk_wallet_get_addressPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function(ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_address'); - late final _wire__crate__api__wallet__bdk_wallet_get_address = - _wire__crate__api__wallet__bdk_wallet_get_addressPtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer, - ffi.Pointer)>(); - - WireSyncRust2DartDco wire__crate__api__wallet__bdk_wallet_get_balance( - ffi.Pointer that, - ) { - return _wire__crate__api__wallet__bdk_wallet_get_balance( - that, + late final _rust_arc_increment_strong_count_RustOpaque_bdk_electrumBdkElectrumClientbdk_electrumelectrum_clientClientPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_electrumBdkElectrumClientbdk_electrumelectrum_clientClient'); + late final _rust_arc_increment_strong_count_RustOpaque_bdk_electrumBdkElectrumClientbdk_electrumelectrum_clientClient = + _rust_arc_increment_strong_count_RustOpaque_bdk_electrumBdkElectrumClientbdk_electrumelectrum_clientClientPtr + .asFunction)>(); + + void + rust_arc_decrement_strong_count_RustOpaque_bdk_electrumBdkElectrumClientbdk_electrumelectrum_clientClient( + ffi.Pointer ptr, + ) { + return _rust_arc_decrement_strong_count_RustOpaque_bdk_electrumBdkElectrumClientbdk_electrumelectrum_clientClient( + ptr, ); } - late final _wire__crate__api__wallet__bdk_wallet_get_balancePtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_balance'); - late final _wire__crate__api__wallet__bdk_wallet_get_balance = - _wire__crate__api__wallet__bdk_wallet_get_balancePtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>(); + late final _rust_arc_decrement_strong_count_RustOpaque_bdk_electrumBdkElectrumClientbdk_electrumelectrum_clientClientPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_electrumBdkElectrumClientbdk_electrumelectrum_clientClient'); + late final _rust_arc_decrement_strong_count_RustOpaque_bdk_electrumBdkElectrumClientbdk_electrumelectrum_clientClient = + _rust_arc_decrement_strong_count_RustOpaque_bdk_electrumBdkElectrumClientbdk_electrumelectrum_clientClientPtr + .asFunction)>(); - WireSyncRust2DartDco - wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychain( - ffi.Pointer ptr, - int keychain, + void + rust_arc_increment_strong_count_RustOpaque_bdk_esploraesplora_clientBlockingClient( + ffi.Pointer ptr, ) { - return _wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychain( + return _rust_arc_increment_strong_count_RustOpaque_bdk_esploraesplora_clientBlockingClient( ptr, - keychain, ); } - late final _wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychainPtr = - _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer, ffi.Int32)>>( - 'frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychain'); - late final _wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychain = - _wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychainPtr - .asFunction< - WireSyncRust2DartDco Function( - ffi.Pointer, int)>(); + late final _rust_arc_increment_strong_count_RustOpaque_bdk_esploraesplora_clientBlockingClientPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_esploraesplora_clientBlockingClient'); + late final _rust_arc_increment_strong_count_RustOpaque_bdk_esploraesplora_clientBlockingClient = + _rust_arc_increment_strong_count_RustOpaque_bdk_esploraesplora_clientBlockingClientPtr + .asFunction)>(); - WireSyncRust2DartDco - wire__crate__api__wallet__bdk_wallet_get_internal_address( - ffi.Pointer ptr, - ffi.Pointer address_index, + void + rust_arc_decrement_strong_count_RustOpaque_bdk_esploraesplora_clientBlockingClient( + ffi.Pointer ptr, ) { - return _wire__crate__api__wallet__bdk_wallet_get_internal_address( + return _rust_arc_decrement_strong_count_RustOpaque_bdk_esploraesplora_clientBlockingClient( ptr, - address_index, ); } - late final _wire__crate__api__wallet__bdk_wallet_get_internal_addressPtr = - _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_internal_address'); - late final _wire__crate__api__wallet__bdk_wallet_get_internal_address = - _wire__crate__api__wallet__bdk_wallet_get_internal_addressPtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer, - ffi.Pointer)>(); - - void wire__crate__api__wallet__bdk_wallet_get_psbt_input( - int port_, - ffi.Pointer that, - ffi.Pointer utxo, - bool only_witness_utxo, - ffi.Pointer sighash_type, + late final _rust_arc_decrement_strong_count_RustOpaque_bdk_esploraesplora_clientBlockingClientPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_esploraesplora_clientBlockingClient'); + late final _rust_arc_decrement_strong_count_RustOpaque_bdk_esploraesplora_clientBlockingClient = + _rust_arc_decrement_strong_count_RustOpaque_bdk_esploraesplora_clientBlockingClientPtr + .asFunction)>(); + + void rust_arc_increment_strong_count_RustOpaque_bdk_walletUpdate( + ffi.Pointer ptr, ) { - return _wire__crate__api__wallet__bdk_wallet_get_psbt_input( - port_, - that, - utxo, - only_witness_utxo, - sighash_type, + return _rust_arc_increment_strong_count_RustOpaque_bdk_walletUpdate( + ptr, ); } - late final _wire__crate__api__wallet__bdk_wallet_get_psbt_inputPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_psbt_input'); - late final _wire__crate__api__wallet__bdk_wallet_get_psbt_input = - _wire__crate__api__wallet__bdk_wallet_get_psbt_inputPtr.asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>(); + late final _rust_arc_increment_strong_count_RustOpaque_bdk_walletUpdatePtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletUpdate'); + late final _rust_arc_increment_strong_count_RustOpaque_bdk_walletUpdate = + _rust_arc_increment_strong_count_RustOpaque_bdk_walletUpdatePtr + .asFunction)>(); - WireSyncRust2DartDco wire__crate__api__wallet__bdk_wallet_is_mine( - ffi.Pointer that, - ffi.Pointer script, + void rust_arc_decrement_strong_count_RustOpaque_bdk_walletUpdate( + ffi.Pointer ptr, ) { - return _wire__crate__api__wallet__bdk_wallet_is_mine( - that, - script, + return _rust_arc_decrement_strong_count_RustOpaque_bdk_walletUpdate( + ptr, ); } - late final _wire__crate__api__wallet__bdk_wallet_is_minePtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function(ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_is_mine'); - late final _wire__crate__api__wallet__bdk_wallet_is_mine = - _wire__crate__api__wallet__bdk_wallet_is_minePtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer, - ffi.Pointer)>(); - - WireSyncRust2DartDco wire__crate__api__wallet__bdk_wallet_list_transactions( - ffi.Pointer that, - bool include_raw, - ) { - return _wire__crate__api__wallet__bdk_wallet_list_transactions( - that, - include_raw, + late final _rust_arc_decrement_strong_count_RustOpaque_bdk_walletUpdatePtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletUpdate'); + late final _rust_arc_decrement_strong_count_RustOpaque_bdk_walletUpdate = + _rust_arc_decrement_strong_count_RustOpaque_bdk_walletUpdatePtr + .asFunction)>(); + + void + rust_arc_increment_strong_count_RustOpaque_bdk_walletbitcoinbip32DerivationPath( + ffi.Pointer ptr, + ) { + return _rust_arc_increment_strong_count_RustOpaque_bdk_walletbitcoinbip32DerivationPath( + ptr, ); } - late final _wire__crate__api__wallet__bdk_wallet_list_transactionsPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function( - ffi.Pointer, ffi.Bool)>>( - 'frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_list_transactions'); - late final _wire__crate__api__wallet__bdk_wallet_list_transactions = - _wire__crate__api__wallet__bdk_wallet_list_transactionsPtr.asFunction< - WireSyncRust2DartDco Function( - ffi.Pointer, bool)>(); + late final _rust_arc_increment_strong_count_RustOpaque_bdk_walletbitcoinbip32DerivationPathPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletbitcoinbip32DerivationPath'); + late final _rust_arc_increment_strong_count_RustOpaque_bdk_walletbitcoinbip32DerivationPath = + _rust_arc_increment_strong_count_RustOpaque_bdk_walletbitcoinbip32DerivationPathPtr + .asFunction)>(); - WireSyncRust2DartDco wire__crate__api__wallet__bdk_wallet_list_unspent( - ffi.Pointer that, + void + rust_arc_decrement_strong_count_RustOpaque_bdk_walletbitcoinbip32DerivationPath( + ffi.Pointer ptr, ) { - return _wire__crate__api__wallet__bdk_wallet_list_unspent( - that, + return _rust_arc_decrement_strong_count_RustOpaque_bdk_walletbitcoinbip32DerivationPath( + ptr, ); } - late final _wire__crate__api__wallet__bdk_wallet_list_unspentPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_list_unspent'); - late final _wire__crate__api__wallet__bdk_wallet_list_unspent = - _wire__crate__api__wallet__bdk_wallet_list_unspentPtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>(); + late final _rust_arc_decrement_strong_count_RustOpaque_bdk_walletbitcoinbip32DerivationPathPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletbitcoinbip32DerivationPath'); + late final _rust_arc_decrement_strong_count_RustOpaque_bdk_walletbitcoinbip32DerivationPath = + _rust_arc_decrement_strong_count_RustOpaque_bdk_walletbitcoinbip32DerivationPathPtr + .asFunction)>(); - WireSyncRust2DartDco wire__crate__api__wallet__bdk_wallet_network( - ffi.Pointer that, + void + rust_arc_increment_strong_count_RustOpaque_bdk_walletdescriptorExtendedDescriptor( + ffi.Pointer ptr, ) { - return _wire__crate__api__wallet__bdk_wallet_network( - that, + return _rust_arc_increment_strong_count_RustOpaque_bdk_walletdescriptorExtendedDescriptor( + ptr, ); } - late final _wire__crate__api__wallet__bdk_wallet_networkPtr = _lookup< - ffi.NativeFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_network'); - late final _wire__crate__api__wallet__bdk_wallet_network = - _wire__crate__api__wallet__bdk_wallet_networkPtr.asFunction< - WireSyncRust2DartDco Function(ffi.Pointer)>(); + late final _rust_arc_increment_strong_count_RustOpaque_bdk_walletdescriptorExtendedDescriptorPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletdescriptorExtendedDescriptor'); + late final _rust_arc_increment_strong_count_RustOpaque_bdk_walletdescriptorExtendedDescriptor = + _rust_arc_increment_strong_count_RustOpaque_bdk_walletdescriptorExtendedDescriptorPtr + .asFunction)>(); - void wire__crate__api__wallet__bdk_wallet_new( - int port_, - ffi.Pointer descriptor, - ffi.Pointer change_descriptor, - int network, - ffi.Pointer database_config, + void + rust_arc_decrement_strong_count_RustOpaque_bdk_walletdescriptorExtendedDescriptor( + ffi.Pointer ptr, ) { - return _wire__crate__api__wallet__bdk_wallet_new( - port_, - descriptor, - change_descriptor, - network, - database_config, + return _rust_arc_decrement_strong_count_RustOpaque_bdk_walletdescriptorExtendedDescriptor( + ptr, ); } - late final _wire__crate__api__wallet__bdk_wallet_newPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_new'); - late final _wire__crate__api__wallet__bdk_wallet_new = - _wire__crate__api__wallet__bdk_wallet_newPtr.asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); + late final _rust_arc_decrement_strong_count_RustOpaque_bdk_walletdescriptorExtendedDescriptorPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletdescriptorExtendedDescriptor'); + late final _rust_arc_decrement_strong_count_RustOpaque_bdk_walletdescriptorExtendedDescriptor = + _rust_arc_decrement_strong_count_RustOpaque_bdk_walletdescriptorExtendedDescriptorPtr + .asFunction)>(); - void wire__crate__api__wallet__bdk_wallet_sign( - int port_, - ffi.Pointer ptr, - ffi.Pointer psbt, - ffi.Pointer sign_options, + void rust_arc_increment_strong_count_RustOpaque_bdk_walletdescriptorPolicy( + ffi.Pointer ptr, ) { - return _wire__crate__api__wallet__bdk_wallet_sign( - port_, + return _rust_arc_increment_strong_count_RustOpaque_bdk_walletdescriptorPolicy( ptr, - psbt, - sign_options, ); } - late final _wire__crate__api__wallet__bdk_wallet_signPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sign'); - late final _wire__crate__api__wallet__bdk_wallet_sign = - _wire__crate__api__wallet__bdk_wallet_signPtr.asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + late final _rust_arc_increment_strong_count_RustOpaque_bdk_walletdescriptorPolicyPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletdescriptorPolicy'); + late final _rust_arc_increment_strong_count_RustOpaque_bdk_walletdescriptorPolicy = + _rust_arc_increment_strong_count_RustOpaque_bdk_walletdescriptorPolicyPtr + .asFunction)>(); - void wire__crate__api__wallet__bdk_wallet_sync( - int port_, - ffi.Pointer ptr, - ffi.Pointer blockchain, + void rust_arc_decrement_strong_count_RustOpaque_bdk_walletdescriptorPolicy( + ffi.Pointer ptr, ) { - return _wire__crate__api__wallet__bdk_wallet_sync( - port_, + return _rust_arc_decrement_strong_count_RustOpaque_bdk_walletdescriptorPolicy( ptr, - blockchain, ); } - late final _wire__crate__api__wallet__bdk_wallet_syncPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sync'); - late final _wire__crate__api__wallet__bdk_wallet_sync = - _wire__crate__api__wallet__bdk_wallet_syncPtr.asFunction< - void Function(int, ffi.Pointer, - ffi.Pointer)>(); - - void wire__crate__api__wallet__finish_bump_fee_tx_builder( - int port_, - ffi.Pointer txid, - double fee_rate, - ffi.Pointer allow_shrinking, - ffi.Pointer wallet, - bool enable_rbf, - ffi.Pointer n_sequence, + late final _rust_arc_decrement_strong_count_RustOpaque_bdk_walletdescriptorPolicyPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletdescriptorPolicy'); + late final _rust_arc_decrement_strong_count_RustOpaque_bdk_walletdescriptorPolicy = + _rust_arc_decrement_strong_count_RustOpaque_bdk_walletdescriptorPolicyPtr + .asFunction)>(); + + void + rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysDescriptorPublicKey( + ffi.Pointer ptr, ) { - return _wire__crate__api__wallet__finish_bump_fee_tx_builder( - port_, - txid, - fee_rate, - allow_shrinking, - wallet, - enable_rbf, - n_sequence, + return _rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysDescriptorPublicKey( + ptr, ); } - late final _wire__crate__api__wallet__finish_bump_fee_tx_builderPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Float, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__wallet__finish_bump_fee_tx_builder'); - late final _wire__crate__api__wallet__finish_bump_fee_tx_builder = - _wire__crate__api__wallet__finish_bump_fee_tx_builderPtr.asFunction< - void Function( - int, - ffi.Pointer, - double, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>(); + late final _rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysDescriptorPublicKeyPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysDescriptorPublicKey'); + late final _rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysDescriptorPublicKey = + _rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysDescriptorPublicKeyPtr + .asFunction)>(); - void wire__crate__api__wallet__tx_builder_finish( - int port_, - ffi.Pointer wallet, - ffi.Pointer recipients, - ffi.Pointer utxos, - ffi.Pointer foreign_utxo, - ffi.Pointer un_spendable, - int change_policy, - bool manually_selected_only, - ffi.Pointer fee_rate, - ffi.Pointer fee_absolute, - bool drain_wallet, - ffi.Pointer drain_to, - ffi.Pointer rbf, - ffi.Pointer data, + void + rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysDescriptorPublicKey( + ffi.Pointer ptr, ) { - return _wire__crate__api__wallet__tx_builder_finish( - port_, - wallet, - recipients, - utxos, - foreign_utxo, - un_spendable, - change_policy, - manually_selected_only, - fee_rate, - fee_absolute, - drain_wallet, - drain_to, - rbf, - data, + return _rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysDescriptorPublicKey( + ptr, ); } - late final _wire__crate__api__wallet__tx_builder_finishPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Bool, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'frbgen_bdk_flutter_wire__crate__api__wallet__tx_builder_finish'); - late final _wire__crate__api__wallet__tx_builder_finish = - _wire__crate__api__wallet__tx_builder_finishPtr.asFunction< - void Function( - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - bool, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + late final _rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysDescriptorPublicKeyPtr = + _lookup)>>( + 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysDescriptorPublicKey'); + late final _rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysDescriptorPublicKey = + _rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysDescriptorPublicKeyPtr + .asFunction)>(); - void rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddress( + void + rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysDescriptorSecretKey( ffi.Pointer ptr, ) { - return _rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddress( + return _rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysDescriptorSecretKey( ptr, ); } - late final _rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddressPtr = + late final _rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysDescriptorSecretKeyPtr = _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 + 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysDescriptorSecretKey'); + late final _rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysDescriptorSecretKey = + _rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysDescriptorSecretKeyPtr .asFunction)>(); - void rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress( + void + rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysDescriptorSecretKey( ffi.Pointer ptr, ) { - return _rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress( + return _rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysDescriptorSecretKey( ptr, ); } - late final _rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddressPtr = + late final _rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysDescriptorSecretKeyPtr = _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 + 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysDescriptorSecretKey'); + late final _rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysDescriptorSecretKey = + _rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysDescriptorSecretKeyPtr .asFunction)>(); - void rust_arc_increment_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath( + void rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysKeyMap( ffi.Pointer ptr, ) { - return _rust_arc_increment_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath( + return _rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysKeyMap( ptr, ); } - late final _rust_arc_increment_strong_count_RustOpaque_bdkbitcoinbip32DerivationPathPtr = + late final _rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysKeyMapPtr = _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath'); - late final _rust_arc_increment_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath = - _rust_arc_increment_strong_count_RustOpaque_bdkbitcoinbip32DerivationPathPtr + 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysKeyMap'); + late final _rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysKeyMap = + _rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysKeyMapPtr .asFunction)>(); - void rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath( + void rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysKeyMap( ffi.Pointer ptr, ) { - return _rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath( + return _rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysKeyMap( ptr, ); } - late final _rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinbip32DerivationPathPtr = + late final _rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysKeyMapPtr = _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath'); - late final _rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath = - _rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinbip32DerivationPathPtr + 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysKeyMap'); + late final _rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysKeyMap = + _rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysKeyMapPtr .asFunction)>(); - void rust_arc_increment_strong_count_RustOpaque_bdkblockchainAnyBlockchain( + void rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysbip39Mnemonic( ffi.Pointer ptr, ) { - return _rust_arc_increment_strong_count_RustOpaque_bdkblockchainAnyBlockchain( + return _rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysbip39Mnemonic( ptr, ); } - late final _rust_arc_increment_strong_count_RustOpaque_bdkblockchainAnyBlockchainPtr = + late final _rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysbip39MnemonicPtr = _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkblockchainAnyBlockchain'); - late final _rust_arc_increment_strong_count_RustOpaque_bdkblockchainAnyBlockchain = - _rust_arc_increment_strong_count_RustOpaque_bdkblockchainAnyBlockchainPtr + 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysbip39Mnemonic'); + late final _rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysbip39Mnemonic = + _rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysbip39MnemonicPtr .asFunction)>(); - void rust_arc_decrement_strong_count_RustOpaque_bdkblockchainAnyBlockchain( + void rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysbip39Mnemonic( ffi.Pointer ptr, ) { - return _rust_arc_decrement_strong_count_RustOpaque_bdkblockchainAnyBlockchain( + return _rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysbip39Mnemonic( ptr, ); } - late final _rust_arc_decrement_strong_count_RustOpaque_bdkblockchainAnyBlockchainPtr = + late final _rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysbip39MnemonicPtr = _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkblockchainAnyBlockchain'); - late final _rust_arc_decrement_strong_count_RustOpaque_bdkblockchainAnyBlockchain = - _rust_arc_decrement_strong_count_RustOpaque_bdkblockchainAnyBlockchainPtr + 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysbip39Mnemonic'); + late final _rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysbip39Mnemonic = + _rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysbip39MnemonicPtr .asFunction)>(); void - rust_arc_increment_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor( + rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestBuilderbdk_walletKeychainKind( ffi.Pointer ptr, ) { - return _rust_arc_increment_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor( + return _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestBuilderbdk_walletKeychainKind( ptr, ); } - late final _rust_arc_increment_strong_count_RustOpaque_bdkdescriptorExtendedDescriptorPtr = + late final _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestBuilderbdk_walletKeychainKindPtr = _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor'); - late final _rust_arc_increment_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor = - _rust_arc_increment_strong_count_RustOpaque_bdkdescriptorExtendedDescriptorPtr + 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestBuilderbdk_walletKeychainKind'); + late final _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestBuilderbdk_walletKeychainKind = + _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestBuilderbdk_walletKeychainKindPtr .asFunction)>(); void - rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor( + rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestBuilderbdk_walletKeychainKind( ffi.Pointer ptr, ) { - return _rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor( + return _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestBuilderbdk_walletKeychainKind( ptr, ); } - late final _rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorExtendedDescriptorPtr = + late final _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestBuilderbdk_walletKeychainKindPtr = _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor'); - late final _rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor = - _rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorExtendedDescriptorPtr + 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestBuilderbdk_walletKeychainKind'); + late final _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestBuilderbdk_walletKeychainKind = + _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestBuilderbdk_walletKeychainKindPtr .asFunction)>(); - void rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorPublicKey( + void + rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestbdk_walletKeychainKind( ffi.Pointer ptr, ) { - return _rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorPublicKey( + return _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestbdk_walletKeychainKind( ptr, ); } - late final _rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorPublicKeyPtr = + late final _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestbdk_walletKeychainKindPtr = _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorPublicKey'); - late final _rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorPublicKey = - _rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorPublicKeyPtr + 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestbdk_walletKeychainKind'); + late final _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestbdk_walletKeychainKind = + _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestbdk_walletKeychainKindPtr .asFunction)>(); - void rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorPublicKey( + void + rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestbdk_walletKeychainKind( ffi.Pointer ptr, ) { - return _rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorPublicKey( + return _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestbdk_walletKeychainKind( ptr, ); } - late final _rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorPublicKeyPtr = + late final _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestbdk_walletKeychainKindPtr = _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorPublicKey'); - late final _rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorPublicKey = - _rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorPublicKeyPtr + 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestbdk_walletKeychainKind'); + late final _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestbdk_walletKeychainKind = + _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestbdk_walletKeychainKindPtr .asFunction)>(); - void rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorSecretKey( + void + rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestBuilderbdk_walletKeychainKindu32( ffi.Pointer ptr, ) { - return _rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorSecretKey( + return _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestBuilderbdk_walletKeychainKindu32( ptr, ); } - late final _rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorSecretKeyPtr = + late final _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestBuilderbdk_walletKeychainKindu32Ptr = _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorSecretKey'); - late final _rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorSecretKey = - _rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorSecretKeyPtr + 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestBuilderbdk_walletKeychainKindu32'); + late final _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestBuilderbdk_walletKeychainKindu32 = + _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestBuilderbdk_walletKeychainKindu32Ptr .asFunction)>(); - void rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorSecretKey( + void + rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestBuilderbdk_walletKeychainKindu32( ffi.Pointer ptr, ) { - return _rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorSecretKey( + return _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestBuilderbdk_walletKeychainKindu32( ptr, ); } - late final _rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorSecretKeyPtr = + late final _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestBuilderbdk_walletKeychainKindu32Ptr = _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorSecretKey'); - late final _rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorSecretKey = - _rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorSecretKeyPtr + 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestBuilderbdk_walletKeychainKindu32'); + late final _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestBuilderbdk_walletKeychainKindu32 = + _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestBuilderbdk_walletKeychainKindu32Ptr .asFunction)>(); - void rust_arc_increment_strong_count_RustOpaque_bdkkeysKeyMap( + void + rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestbdk_walletKeychainKindu32( ffi.Pointer ptr, ) { - return _rust_arc_increment_strong_count_RustOpaque_bdkkeysKeyMap( + return _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestbdk_walletKeychainKindu32( ptr, ); } - late final _rust_arc_increment_strong_count_RustOpaque_bdkkeysKeyMapPtr = + late final _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestbdk_walletKeychainKindu32Ptr = _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysKeyMap'); - late final _rust_arc_increment_strong_count_RustOpaque_bdkkeysKeyMap = - _rust_arc_increment_strong_count_RustOpaque_bdkkeysKeyMapPtr + 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestbdk_walletKeychainKindu32'); + late final _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestbdk_walletKeychainKindu32 = + _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestbdk_walletKeychainKindu32Ptr .asFunction)>(); - void rust_arc_decrement_strong_count_RustOpaque_bdkkeysKeyMap( + void + rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestbdk_walletKeychainKindu32( ffi.Pointer ptr, ) { - return _rust_arc_decrement_strong_count_RustOpaque_bdkkeysKeyMap( + return _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestbdk_walletKeychainKindu32( ptr, ); } - late final _rust_arc_decrement_strong_count_RustOpaque_bdkkeysKeyMapPtr = + late final _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestbdk_walletKeychainKindu32Ptr = _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysKeyMap'); - late final _rust_arc_decrement_strong_count_RustOpaque_bdkkeysKeyMap = - _rust_arc_decrement_strong_count_RustOpaque_bdkkeysKeyMapPtr + 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestbdk_walletKeychainKindu32'); + late final _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestbdk_walletKeychainKindu32 = + _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestbdk_walletKeychainKindu32Ptr .asFunction)>(); - void rust_arc_increment_strong_count_RustOpaque_bdkkeysbip39Mnemonic( + void + rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdk_corebitcoinpsbtPsbt( ffi.Pointer ptr, ) { - return _rust_arc_increment_strong_count_RustOpaque_bdkkeysbip39Mnemonic( + return _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdk_corebitcoinpsbtPsbt( ptr, ); } - late final _rust_arc_increment_strong_count_RustOpaque_bdkkeysbip39MnemonicPtr = + late final _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdk_corebitcoinpsbtPsbtPtr = _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysbip39Mnemonic'); - late final _rust_arc_increment_strong_count_RustOpaque_bdkkeysbip39Mnemonic = - _rust_arc_increment_strong_count_RustOpaque_bdkkeysbip39MnemonicPtr + 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdk_corebitcoinpsbtPsbt'); + late final _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdk_corebitcoinpsbtPsbt = + _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdk_corebitcoinpsbtPsbtPtr .asFunction)>(); - void rust_arc_decrement_strong_count_RustOpaque_bdkkeysbip39Mnemonic( + void + rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_corebitcoinpsbtPsbt( ffi.Pointer ptr, ) { - return _rust_arc_decrement_strong_count_RustOpaque_bdkkeysbip39Mnemonic( + return _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_corebitcoinpsbtPsbt( ptr, ); } - late final _rust_arc_decrement_strong_count_RustOpaque_bdkkeysbip39MnemonicPtr = + late final _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_corebitcoinpsbtPsbtPtr = _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysbip39Mnemonic'); - late final _rust_arc_decrement_strong_count_RustOpaque_bdkkeysbip39Mnemonic = - _rust_arc_decrement_strong_count_RustOpaque_bdkkeysbip39MnemonicPtr + 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_corebitcoinpsbtPsbt'); + late final _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_corebitcoinpsbtPsbt = + _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_corebitcoinpsbtPsbtPtr .asFunction)>(); void - rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( + rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdk_walletPersistedWalletbdk_walletrusqliteConnection( ffi.Pointer ptr, ) { - return _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( + return _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdk_walletPersistedWalletbdk_walletrusqliteConnection( ptr, ); } - late final _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabasePtr = + late final _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdk_walletPersistedWalletbdk_walletrusqliteConnectionPtr = _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase'); - late final _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase = - _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabasePtr + 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdk_walletPersistedWalletbdk_walletrusqliteConnection'); + late final _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdk_walletPersistedWalletbdk_walletrusqliteConnection = + _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdk_walletPersistedWalletbdk_walletrusqliteConnectionPtr .asFunction)>(); void - rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( + rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_walletPersistedWalletbdk_walletrusqliteConnection( ffi.Pointer ptr, ) { - return _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( + return _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_walletPersistedWalletbdk_walletrusqliteConnection( ptr, ); } - late final _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabasePtr = + late final _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_walletPersistedWalletbdk_walletrusqliteConnectionPtr = _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase'); - late final _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase = - _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabasePtr + 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_walletPersistedWalletbdk_walletrusqliteConnection'); + late final _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_walletPersistedWalletbdk_walletrusqliteConnection = + _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_walletPersistedWalletbdk_walletrusqliteConnectionPtr .asFunction)>(); void - rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( + rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdk_walletrusqliteConnection( ffi.Pointer ptr, ) { - return _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( + return _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdk_walletrusqliteConnection( ptr, ); } - late final _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransactionPtr = + late final _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdk_walletrusqliteConnectionPtr = _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction'); - late final _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction = - _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransactionPtr + 'frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdk_walletrusqliteConnection'); + late final _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdk_walletrusqliteConnection = + _rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdk_walletrusqliteConnectionPtr .asFunction)>(); void - rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( + rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_walletrusqliteConnection( ffi.Pointer ptr, ) { - return _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( + return _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_walletrusqliteConnection( ptr, ); } - late final _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransactionPtr = + late final _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_walletrusqliteConnectionPtr = _lookup)>>( - 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction'); - late final _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction = - _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransactionPtr + 'frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_walletrusqliteConnection'); + late final _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_walletrusqliteConnection = + _rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_walletrusqliteConnectionPtr .asFunction)>(); - ffi.Pointer cst_new_box_autoadd_address_error() { - return _cst_new_box_autoadd_address_error(); + ffi.Pointer + cst_new_box_autoadd_confirmation_block_time() { + return _cst_new_box_autoadd_confirmation_block_time(); } - 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()>(); + late final _cst_new_box_autoadd_confirmation_block_timePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_confirmation_block_time'); + late final _cst_new_box_autoadd_confirmation_block_time = + _cst_new_box_autoadd_confirmation_block_timePtr.asFunction< + ffi.Pointer Function()>(); - ffi.Pointer cst_new_box_autoadd_address_index() { - return _cst_new_box_autoadd_address_index(); + ffi.Pointer cst_new_box_autoadd_fee_rate() { + return _cst_new_box_autoadd_fee_rate(); } - 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()>(); + 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_bdk_address() { - return _cst_new_box_autoadd_bdk_address(); + ffi.Pointer cst_new_box_autoadd_ffi_address() { + return _cst_new_box_autoadd_ffi_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()>(); + late final _cst_new_box_autoadd_ffi_addressPtr = + _lookup Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_ffi_address'); + late final _cst_new_box_autoadd_ffi_address = + _cst_new_box_autoadd_ffi_addressPtr + .asFunction Function()>(); - ffi.Pointer cst_new_box_autoadd_bdk_blockchain() { - return _cst_new_box_autoadd_bdk_blockchain(); + ffi.Pointer + cst_new_box_autoadd_ffi_canonical_tx() { + return _cst_new_box_autoadd_ffi_canonical_tx(); } - 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()>(); + late final _cst_new_box_autoadd_ffi_canonical_txPtr = _lookup< + ffi + .NativeFunction Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_ffi_canonical_tx'); + late final _cst_new_box_autoadd_ffi_canonical_tx = + _cst_new_box_autoadd_ffi_canonical_txPtr + .asFunction Function()>(); - ffi.Pointer - cst_new_box_autoadd_bdk_derivation_path() { - return _cst_new_box_autoadd_bdk_derivation_path(); + ffi.Pointer cst_new_box_autoadd_ffi_connection() { + return _cst_new_box_autoadd_ffi_connection(); } - 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()>(); + late final _cst_new_box_autoadd_ffi_connectionPtr = _lookup< + ffi.NativeFunction Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_ffi_connection'); + late final _cst_new_box_autoadd_ffi_connection = + _cst_new_box_autoadd_ffi_connectionPtr + .asFunction Function()>(); - ffi.Pointer cst_new_box_autoadd_bdk_descriptor() { - return _cst_new_box_autoadd_bdk_descriptor(); + ffi.Pointer + cst_new_box_autoadd_ffi_derivation_path() { + return _cst_new_box_autoadd_ffi_derivation_path(); } - 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()>(); + late final _cst_new_box_autoadd_ffi_derivation_pathPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_ffi_derivation_path'); + late final _cst_new_box_autoadd_ffi_derivation_path = + _cst_new_box_autoadd_ffi_derivation_pathPtr + .asFunction Function()>(); - ffi.Pointer - cst_new_box_autoadd_bdk_descriptor_public_key() { - return _cst_new_box_autoadd_bdk_descriptor_public_key(); + ffi.Pointer cst_new_box_autoadd_ffi_descriptor() { + return _cst_new_box_autoadd_ffi_descriptor(); } - 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()>(); + late final _cst_new_box_autoadd_ffi_descriptorPtr = _lookup< + ffi.NativeFunction Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_ffi_descriptor'); + late final _cst_new_box_autoadd_ffi_descriptor = + _cst_new_box_autoadd_ffi_descriptorPtr + .asFunction Function()>(); - ffi.Pointer - cst_new_box_autoadd_bdk_descriptor_secret_key() { - return _cst_new_box_autoadd_bdk_descriptor_secret_key(); + ffi.Pointer + cst_new_box_autoadd_ffi_descriptor_public_key() { + return _cst_new_box_autoadd_ffi_descriptor_public_key(); } - late final _cst_new_box_autoadd_bdk_descriptor_secret_keyPtr = _lookup< + late final _cst_new_box_autoadd_ffi_descriptor_public_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 Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_ffi_descriptor_public_key'); + late final _cst_new_box_autoadd_ffi_descriptor_public_key = + _cst_new_box_autoadd_ffi_descriptor_public_keyPtr.asFunction< + ffi.Pointer Function()>(); - ffi.Pointer cst_new_box_autoadd_bdk_mnemonic() { - return _cst_new_box_autoadd_bdk_mnemonic(); + ffi.Pointer + cst_new_box_autoadd_ffi_descriptor_secret_key() { + return _cst_new_box_autoadd_ffi_descriptor_secret_key(); } - 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()>(); + late final _cst_new_box_autoadd_ffi_descriptor_secret_keyPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_ffi_descriptor_secret_key'); + late final _cst_new_box_autoadd_ffi_descriptor_secret_key = + _cst_new_box_autoadd_ffi_descriptor_secret_keyPtr.asFunction< + ffi.Pointer Function()>(); - ffi.Pointer cst_new_box_autoadd_bdk_psbt() { - return _cst_new_box_autoadd_bdk_psbt(); + ffi.Pointer + cst_new_box_autoadd_ffi_electrum_client() { + return _cst_new_box_autoadd_ffi_electrum_client(); } - 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()>(); + late final _cst_new_box_autoadd_ffi_electrum_clientPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_ffi_electrum_client'); + late final _cst_new_box_autoadd_ffi_electrum_client = + _cst_new_box_autoadd_ffi_electrum_clientPtr + .asFunction Function()>(); - ffi.Pointer cst_new_box_autoadd_bdk_script_buf() { - return _cst_new_box_autoadd_bdk_script_buf(); + ffi.Pointer + cst_new_box_autoadd_ffi_esplora_client() { + return _cst_new_box_autoadd_ffi_esplora_client(); } - 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()>(); + late final _cst_new_box_autoadd_ffi_esplora_clientPtr = _lookup< + ffi + .NativeFunction Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_ffi_esplora_client'); + late final _cst_new_box_autoadd_ffi_esplora_client = + _cst_new_box_autoadd_ffi_esplora_clientPtr + .asFunction Function()>(); - ffi.Pointer cst_new_box_autoadd_bdk_transaction() { - return _cst_new_box_autoadd_bdk_transaction(); + ffi.Pointer + cst_new_box_autoadd_ffi_full_scan_request() { + return _cst_new_box_autoadd_ffi_full_scan_request(); } - 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()>(); + late final _cst_new_box_autoadd_ffi_full_scan_requestPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_ffi_full_scan_request'); + late final _cst_new_box_autoadd_ffi_full_scan_request = + _cst_new_box_autoadd_ffi_full_scan_requestPtr + .asFunction Function()>(); - ffi.Pointer cst_new_box_autoadd_bdk_wallet() { - return _cst_new_box_autoadd_bdk_wallet(); + ffi.Pointer + cst_new_box_autoadd_ffi_full_scan_request_builder() { + return _cst_new_box_autoadd_ffi_full_scan_request_builder(); } - 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()>(); + late final _cst_new_box_autoadd_ffi_full_scan_request_builderPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_ffi_full_scan_request_builder'); + late final _cst_new_box_autoadd_ffi_full_scan_request_builder = + _cst_new_box_autoadd_ffi_full_scan_request_builderPtr.asFunction< + ffi.Pointer Function()>(); - ffi.Pointer cst_new_box_autoadd_block_time() { - return _cst_new_box_autoadd_block_time(); + ffi.Pointer cst_new_box_autoadd_ffi_mnemonic() { + return _cst_new_box_autoadd_ffi_mnemonic(); } - 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()>(); + late final _cst_new_box_autoadd_ffi_mnemonicPtr = _lookup< + ffi.NativeFunction Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_ffi_mnemonic'); + late final _cst_new_box_autoadd_ffi_mnemonic = + _cst_new_box_autoadd_ffi_mnemonicPtr + .asFunction Function()>(); - ffi.Pointer - cst_new_box_autoadd_blockchain_config() { - return _cst_new_box_autoadd_blockchain_config(); + ffi.Pointer cst_new_box_autoadd_ffi_policy() { + return _cst_new_box_autoadd_ffi_policy(); } - 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()>(); + late final _cst_new_box_autoadd_ffi_policyPtr = + _lookup Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_ffi_policy'); + late final _cst_new_box_autoadd_ffi_policy = + _cst_new_box_autoadd_ffi_policyPtr + .asFunction Function()>(); - ffi.Pointer cst_new_box_autoadd_consensus_error() { - return _cst_new_box_autoadd_consensus_error(); + ffi.Pointer cst_new_box_autoadd_ffi_psbt() { + return _cst_new_box_autoadd_ffi_psbt(); } - 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()>(); + late final _cst_new_box_autoadd_ffi_psbtPtr = + _lookup Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_ffi_psbt'); + late final _cst_new_box_autoadd_ffi_psbt = _cst_new_box_autoadd_ffi_psbtPtr + .asFunction Function()>(); - ffi.Pointer cst_new_box_autoadd_database_config() { - return _cst_new_box_autoadd_database_config(); + ffi.Pointer cst_new_box_autoadd_ffi_script_buf() { + return _cst_new_box_autoadd_ffi_script_buf(); } - 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()>(); + late final _cst_new_box_autoadd_ffi_script_bufPtr = _lookup< + ffi.NativeFunction Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_ffi_script_buf'); + late final _cst_new_box_autoadd_ffi_script_buf = + _cst_new_box_autoadd_ffi_script_bufPtr + .asFunction Function()>(); - ffi.Pointer - cst_new_box_autoadd_descriptor_error() { - return _cst_new_box_autoadd_descriptor_error(); + ffi.Pointer + cst_new_box_autoadd_ffi_sync_request() { + return _cst_new_box_autoadd_ffi_sync_request(); } - late final _cst_new_box_autoadd_descriptor_errorPtr = _lookup< + late final _cst_new_box_autoadd_ffi_sync_requestPtr = _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()>(); + .NativeFunction Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_ffi_sync_request'); + late final _cst_new_box_autoadd_ffi_sync_request = + _cst_new_box_autoadd_ffi_sync_requestPtr + .asFunction Function()>(); - ffi.Pointer cst_new_box_autoadd_f_32( - double value, - ) { - return _cst_new_box_autoadd_f_32( - value, - ); + ffi.Pointer + cst_new_box_autoadd_ffi_sync_request_builder() { + return _cst_new_box_autoadd_ffi_sync_request_builder(); } - 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)>(); + late final _cst_new_box_autoadd_ffi_sync_request_builderPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_ffi_sync_request_builder'); + late final _cst_new_box_autoadd_ffi_sync_request_builder = + _cst_new_box_autoadd_ffi_sync_request_builderPtr.asFunction< + ffi.Pointer Function()>(); - ffi.Pointer cst_new_box_autoadd_fee_rate() { - return _cst_new_box_autoadd_fee_rate(); + ffi.Pointer cst_new_box_autoadd_ffi_transaction() { + return _cst_new_box_autoadd_ffi_transaction(); } - 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()>(); + late final _cst_new_box_autoadd_ffi_transactionPtr = _lookup< + ffi.NativeFunction Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_ffi_transaction'); + late final _cst_new_box_autoadd_ffi_transaction = + _cst_new_box_autoadd_ffi_transactionPtr + .asFunction Function()>(); - ffi.Pointer cst_new_box_autoadd_hex_error() { - return _cst_new_box_autoadd_hex_error(); + ffi.Pointer cst_new_box_autoadd_ffi_update() { + return _cst_new_box_autoadd_ffi_update(); } - 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()>(); + late final _cst_new_box_autoadd_ffi_updatePtr = + _lookup Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_ffi_update'); + late final _cst_new_box_autoadd_ffi_update = + _cst_new_box_autoadd_ffi_updatePtr + .asFunction Function()>(); - ffi.Pointer cst_new_box_autoadd_local_utxo() { - return _cst_new_box_autoadd_local_utxo(); + ffi.Pointer cst_new_box_autoadd_ffi_wallet() { + return _cst_new_box_autoadd_ffi_wallet(); } - 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()>(); + late final _cst_new_box_autoadd_ffi_walletPtr = + _lookup Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_ffi_wallet'); + late final _cst_new_box_autoadd_ffi_wallet = + _cst_new_box_autoadd_ffi_walletPtr + .asFunction Function()>(); ffi.Pointer cst_new_box_autoadd_lock_time() { return _cst_new_box_autoadd_lock_time(); @@ -5592,29 +6766,6 @@ class coreWire implements BaseWire { 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(); } @@ -5625,40 +6776,24 @@ class coreWire implements BaseWire { 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(); + ffi.Pointer + cst_new_box_autoadd_record_map_string_list_prim_usize_strict_keychain_kind() { + return _cst_new_box_autoadd_record_map_string_list_prim_usize_strict_keychain_kind(); } - 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()>(); + late final _cst_new_box_autoadd_record_map_string_list_prim_usize_strict_keychain_kindPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer< + wire_cst_record_map_string_list_prim_usize_strict_keychain_kind> + Function()>>( + 'frbgen_bdk_flutter_cst_new_box_autoadd_record_map_string_list_prim_usize_strict_keychain_kind'); + late final _cst_new_box_autoadd_record_map_string_list_prim_usize_strict_keychain_kind = + _cst_new_box_autoadd_record_map_string_list_prim_usize_strict_keychain_kindPtr + .asFunction< + ffi.Pointer< + wire_cst_record_map_string_list_prim_usize_strict_keychain_kind> + Function()>(); ffi.Pointer cst_new_box_autoadd_sign_options() { return _cst_new_box_autoadd_sign_options(); @@ -5671,32 +6806,6 @@ class coreWire implements BaseWire { _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, ) { @@ -5725,19 +6834,20 @@ class coreWire implements BaseWire { 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, + ffi.Pointer cst_new_list_ffi_canonical_tx( + int len, ) { - return _cst_new_box_autoadd_u_8( - value, + return _cst_new_list_ffi_canonical_tx( + len, ); } - 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)>(); + late final _cst_new_list_ffi_canonical_txPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Int32)>>('frbgen_bdk_flutter_cst_new_list_ffi_canonical_tx'); + late final _cst_new_list_ffi_canonical_tx = _cst_new_list_ffi_canonical_txPtr + .asFunction Function(int)>(); ffi.Pointer cst_new_list_list_prim_u_8_strict( @@ -5757,20 +6867,20 @@ class coreWire implements BaseWire { _cst_new_list_list_prim_u_8_strictPtr.asFunction< ffi.Pointer Function(int)>(); - ffi.Pointer cst_new_list_local_utxo( + ffi.Pointer cst_new_list_local_output( int len, ) { - return _cst_new_list_local_utxo( + return _cst_new_list_local_output( len, ); } - late final _cst_new_list_local_utxoPtr = _lookup< + late final _cst_new_list_local_outputPtr = _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 Function( + ffi.Int32)>>('frbgen_bdk_flutter_cst_new_list_local_output'); + late final _cst_new_list_local_output = _cst_new_list_local_outputPtr + .asFunction Function(int)>(); ffi.Pointer cst_new_list_out_point( int len, @@ -5817,38 +6927,59 @@ class coreWire implements BaseWire { 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( + ffi.Pointer cst_new_list_prim_usize_strict( int len, ) { - return _cst_new_list_script_amount( + return _cst_new_list_prim_usize_strict( len, ); } - late final _cst_new_list_script_amountPtr = _lookup< + late final _cst_new_list_prim_usize_strictPtr = _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( + ffi.Pointer Function( + ffi.Int32)>>('frbgen_bdk_flutter_cst_new_list_prim_usize_strict'); + late final _cst_new_list_prim_usize_strict = + _cst_new_list_prim_usize_strictPtr.asFunction< + ffi.Pointer Function(int)>(); + + ffi.Pointer + cst_new_list_record_ffi_script_buf_u_64( int len, ) { - return _cst_new_list_transaction_details( + return _cst_new_list_record_ffi_script_buf_u_64( len, ); } - late final _cst_new_list_transaction_detailsPtr = _lookup< + late final _cst_new_list_record_ffi_script_buf_u_64Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( + 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)>(); + 'frbgen_bdk_flutter_cst_new_list_record_ffi_script_buf_u_64'); + late final _cst_new_list_record_ffi_script_buf_u_64 = + _cst_new_list_record_ffi_script_buf_u_64Ptr.asFunction< + ffi.Pointer Function( + int)>(); + + ffi.Pointer + cst_new_list_record_string_list_prim_usize_strict( + int len, + ) { + return _cst_new_list_record_string_list_prim_usize_strict( + len, + ); + } + + late final _cst_new_list_record_string_list_prim_usize_strictPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer + Function(ffi.Int32)>>( + 'frbgen_bdk_flutter_cst_new_list_record_string_list_prim_usize_strict'); + late final _cst_new_list_record_string_list_prim_usize_strict = + _cst_new_list_record_string_list_prim_usize_strictPtr.asFunction< + ffi.Pointer + Function(int)>(); ffi.Pointer cst_new_list_tx_in( int len, @@ -5891,578 +7022,748 @@ class coreWire implements BaseWire { _dummy_method_to_enforce_bundlingPtr.asFunction(); } -typedef DartPostCObjectFnType - = ffi.Pointer>; -typedef DartPostCObjectFnTypeFunction = ffi.Bool Function( - DartPort port_id, ffi.Pointer message); -typedef DartDartPostCObjectFnTypeFunction = bool Function( - DartDartPort port_id, ffi.Pointer message); -typedef DartPort = ffi.Int64; -typedef DartDartPort = int; +typedef DartPostCObjectFnType + = ffi.Pointer>; +typedef DartPostCObjectFnTypeFunction = ffi.Bool Function( + DartPort port_id, ffi.Pointer message); +typedef DartDartPostCObjectFnTypeFunction = bool Function( + DartDartPort port_id, ffi.Pointer message); +typedef DartPort = ffi.Int64; +typedef DartDartPort = int; + +final class wire_cst_ffi_address extends ffi.Struct { + @ffi.UintPtr() + external int field0; +} + +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_ffi_script_buf extends ffi.Struct { + external ffi.Pointer bytes; +} + +final class wire_cst_ffi_psbt extends ffi.Struct { + @ffi.UintPtr() + external int opaque; +} + +final class wire_cst_ffi_transaction extends ffi.Struct { + @ffi.UintPtr() + external int opaque; +} + +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_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; -final class wire_cst_bdk_blockchain extends ffi.Struct { - @ffi.UintPtr() - external int ptr; + @ffi.Uint32() + external int vout; } -final class wire_cst_list_prim_u_8_strict extends ffi.Struct { - external ffi.Pointer ptr; +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_bdk_transaction extends ffi.Struct { - external ffi.Pointer s; -} +final class wire_cst_tx_in extends ffi.Struct { + external wire_cst_out_point previous_output; -final class wire_cst_electrum_config extends ffi.Struct { - external ffi.Pointer url; + external wire_cst_ffi_script_buf script_sig; - external ffi.Pointer socks5; + @ffi.Uint32() + external int sequence; - @ffi.Uint8() - external int retry; + external ffi.Pointer witness; +} + +final class wire_cst_list_tx_in extends ffi.Struct { + external ffi.Pointer ptr; - external ffi.Pointer timeout; + @ffi.Int32() + external int len; +} +final class wire_cst_tx_out extends ffi.Struct { @ffi.Uint64() - external int stop_gap; + external int value; - @ffi.Bool() - external bool validate_domain; + external wire_cst_ffi_script_buf script_pubkey; } -final class wire_cst_BlockchainConfig_Electrum extends ffi.Struct { - external ffi.Pointer config; -} +final class wire_cst_list_tx_out extends ffi.Struct { + external ffi.Pointer ptr; -final class wire_cst_esplora_config extends ffi.Struct { - external ffi.Pointer base_url; + @ffi.Int32() + external int len; +} - external ffi.Pointer proxy; +final class wire_cst_ffi_descriptor extends ffi.Struct { + @ffi.UintPtr() + external int extended_descriptor; - external ffi.Pointer concurrency; + @ffi.UintPtr() + external int key_map; +} - @ffi.Uint64() - external int stop_gap; +final class wire_cst_ffi_descriptor_secret_key extends ffi.Struct { + @ffi.UintPtr() + external int opaque; +} - external ffi.Pointer timeout; +final class wire_cst_ffi_descriptor_public_key extends ffi.Struct { + @ffi.UintPtr() + external int opaque; } -final class wire_cst_BlockchainConfig_Esplora extends ffi.Struct { - external ffi.Pointer config; +final class wire_cst_ffi_electrum_client extends ffi.Struct { + @ffi.UintPtr() + external int opaque; } -final class wire_cst_Auth_UserPass extends ffi.Struct { - external ffi.Pointer username; +final class wire_cst_ffi_full_scan_request extends ffi.Struct { + @ffi.UintPtr() + external int field0; +} - external ffi.Pointer password; +final class wire_cst_ffi_sync_request extends ffi.Struct { + @ffi.UintPtr() + external int field0; } -final class wire_cst_Auth_Cookie extends ffi.Struct { - external ffi.Pointer file; +final class wire_cst_ffi_esplora_client extends ffi.Struct { + @ffi.UintPtr() + external int opaque; } -final class AuthKind extends ffi.Union { - external wire_cst_Auth_UserPass UserPass; +final class wire_cst_ffi_derivation_path extends ffi.Struct { + @ffi.UintPtr() + external int opaque; +} - external wire_cst_Auth_Cookie Cookie; +final class wire_cst_ffi_mnemonic extends ffi.Struct { + @ffi.UintPtr() + external int opaque; } -final class wire_cst_auth extends ffi.Struct { - @ffi.Int32() - external int tag; +final class wire_cst_fee_rate extends ffi.Struct { + @ffi.Uint64() + external int sat_kwu; +} - external AuthKind kind; +final class wire_cst_ffi_wallet extends ffi.Struct { + @ffi.UintPtr() + external int opaque; } -final class wire_cst_rpc_sync_params extends ffi.Struct { - @ffi.Uint64() - external int start_script_count; +final class wire_cst_record_ffi_script_buf_u_64 extends ffi.Struct { + external wire_cst_ffi_script_buf field0; @ffi.Uint64() - external int start_time; + external int field1; +} - @ffi.Bool() - external bool force_start_time; +final class wire_cst_list_record_ffi_script_buf_u_64 extends ffi.Struct { + external ffi.Pointer ptr; - @ffi.Uint64() - external int poll_rate_sec; + @ffi.Int32() + external int len; } -final class wire_cst_rpc_config extends ffi.Struct { - external ffi.Pointer url; +final class wire_cst_list_out_point extends ffi.Struct { + external ffi.Pointer ptr; + + @ffi.Int32() + external int len; +} - external wire_cst_auth auth; +final class wire_cst_list_prim_usize_strict extends ffi.Struct { + external ffi.Pointer ptr; @ffi.Int32() - external int network; + external int len; +} - external ffi.Pointer wallet_name; +final class wire_cst_record_string_list_prim_usize_strict extends ffi.Struct { + external ffi.Pointer field0; - external ffi.Pointer sync_params; + external ffi.Pointer field1; } -final class wire_cst_BlockchainConfig_Rpc extends ffi.Struct { - external ffi.Pointer config; +final class wire_cst_list_record_string_list_prim_usize_strict + extends ffi.Struct { + external ffi.Pointer ptr; + + @ffi.Int32() + external int len; } -final class BlockchainConfigKind extends ffi.Union { - external wire_cst_BlockchainConfig_Electrum Electrum; +final class wire_cst_record_map_string_list_prim_usize_strict_keychain_kind + extends ffi.Struct { + external ffi.Pointer + field0; + + @ffi.Int32() + external int field1; +} - external wire_cst_BlockchainConfig_Esplora Esplora; +final class wire_cst_RbfValue_Value extends ffi.Struct { + @ffi.Uint32() + external int field0; +} - external wire_cst_BlockchainConfig_Rpc Rpc; +final class RbfValueKind extends ffi.Union { + external wire_cst_RbfValue_Value Value; } -final class wire_cst_blockchain_config extends ffi.Struct { +final class wire_cst_rbf_value extends ffi.Struct { @ffi.Int32() external int tag; - external BlockchainConfigKind kind; + external RbfValueKind kind; } -final class wire_cst_bdk_descriptor extends ffi.Struct { - @ffi.UintPtr() - external int extended_descriptor; - +final class wire_cst_ffi_full_scan_request_builder extends ffi.Struct { @ffi.UintPtr() - external int key_map; + external int field0; } -final class wire_cst_bdk_descriptor_secret_key extends ffi.Struct { +final class wire_cst_ffi_policy extends ffi.Struct { @ffi.UintPtr() - external int ptr; + external int opaque; } -final class wire_cst_bdk_descriptor_public_key extends ffi.Struct { +final class wire_cst_ffi_sync_request_builder extends ffi.Struct { @ffi.UintPtr() - external int ptr; + external int field0; } -final class wire_cst_bdk_derivation_path extends ffi.Struct { +final class wire_cst_ffi_update extends ffi.Struct { @ffi.UintPtr() - external int ptr; + external int field0; } -final class wire_cst_bdk_mnemonic extends ffi.Struct { +final class wire_cst_ffi_connection extends ffi.Struct { @ffi.UintPtr() - external int ptr; + external int field0; } -final class wire_cst_list_prim_u_8_loose extends ffi.Struct { - external ffi.Pointer ptr; +final class wire_cst_sign_options extends ffi.Struct { + @ffi.Bool() + external bool trust_witness_utxo; - @ffi.Int32() - external int len; -} + external ffi.Pointer assume_height; -final class wire_cst_bdk_psbt extends ffi.Struct { - @ffi.UintPtr() - external int ptr; + @ffi.Bool() + external bool allow_all_sighashes; + + @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_bdk_address extends ffi.Struct { - @ffi.UintPtr() - external int ptr; +final class wire_cst_block_id extends ffi.Struct { + @ffi.Uint32() + external int height; + + external ffi.Pointer hash; } -final class wire_cst_bdk_script_buf extends ffi.Struct { - external ffi.Pointer bytes; +final class wire_cst_confirmation_block_time extends ffi.Struct { + external wire_cst_block_id block_id; + + @ffi.Uint64() + external int confirmation_time; } -final class wire_cst_LockTime_Blocks extends ffi.Struct { - @ffi.Uint32() - external int field0; +final class wire_cst_ChainPosition_Confirmed extends ffi.Struct { + external ffi.Pointer + confirmation_block_time; } -final class wire_cst_LockTime_Seconds extends ffi.Struct { - @ffi.Uint32() - external int field0; +final class wire_cst_ChainPosition_Unconfirmed extends ffi.Struct { + @ffi.Uint64() + external int timestamp; } -final class LockTimeKind extends ffi.Union { - external wire_cst_LockTime_Blocks Blocks; +final class ChainPositionKind extends ffi.Union { + external wire_cst_ChainPosition_Confirmed Confirmed; - external wire_cst_LockTime_Seconds Seconds; + external wire_cst_ChainPosition_Unconfirmed Unconfirmed; } -final class wire_cst_lock_time extends ffi.Struct { +final class wire_cst_chain_position extends ffi.Struct { @ffi.Int32() external int tag; - external LockTimeKind kind; + external ChainPositionKind kind; } -final class wire_cst_out_point extends ffi.Struct { - external ffi.Pointer txid; +final class wire_cst_ffi_canonical_tx extends ffi.Struct { + external wire_cst_ffi_transaction transaction; - @ffi.Uint32() - external int vout; + external wire_cst_chain_position chain_position; } -final class wire_cst_list_list_prim_u_8_strict extends ffi.Struct { - external ffi.Pointer> ptr; +final class wire_cst_list_ffi_canonical_tx 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; +final class wire_cst_local_output extends ffi.Struct { + external wire_cst_out_point outpoint; - external wire_cst_bdk_script_buf script_sig; + external wire_cst_tx_out txout; - @ffi.Uint32() - external int sequence; + @ffi.Int32() + external int keychain; - external ffi.Pointer witness; + @ffi.Bool() + external bool is_spent; } -final class wire_cst_list_tx_in extends ffi.Struct { - external ffi.Pointer ptr; +final class wire_cst_list_local_output 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; +final class wire_cst_address_info extends ffi.Struct { + @ffi.Uint32() + external int index; + + external wire_cst_ffi_address address; - external wire_cst_bdk_script_buf script_pubkey; + @ffi.Int32() + external int keychain; } -final class wire_cst_list_tx_out extends ffi.Struct { - external ffi.Pointer ptr; +final class wire_cst_AddressParseError_WitnessVersion extends ffi.Struct { + external ffi.Pointer error_message; +} + +final class wire_cst_AddressParseError_WitnessProgram extends ffi.Struct { + external ffi.Pointer error_message; +} + +final class AddressParseErrorKind extends ffi.Union { + external wire_cst_AddressParseError_WitnessVersion WitnessVersion; + external wire_cst_AddressParseError_WitnessProgram WitnessProgram; +} + +final class wire_cst_address_parse_error extends ffi.Struct { @ffi.Int32() - external int len; + external int tag; + + external AddressParseErrorKind kind; } -final class wire_cst_bdk_wallet extends ffi.Struct { - @ffi.UintPtr() - external int ptr; +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_AddressIndex_Peek extends ffi.Struct { +final class wire_cst_Bip32Error_Secp256k1 extends ffi.Struct { + external ffi.Pointer error_message; +} + +final class wire_cst_Bip32Error_InvalidChildNumber extends ffi.Struct { @ffi.Uint32() - external int index; + external int child_number; +} + +final class wire_cst_Bip32Error_UnknownVersion extends ffi.Struct { + external ffi.Pointer version; } -final class wire_cst_AddressIndex_Reset extends ffi.Struct { +final class wire_cst_Bip32Error_WrongExtendedKeyLength extends ffi.Struct { @ffi.Uint32() - external int index; + external int length; } -final class AddressIndexKind extends ffi.Union { - external wire_cst_AddressIndex_Peek Peek; +final class wire_cst_Bip32Error_Base58 extends ffi.Struct { + external ffi.Pointer error_message; +} - external wire_cst_AddressIndex_Reset Reset; +final class wire_cst_Bip32Error_Hex extends ffi.Struct { + external ffi.Pointer error_message; } -final class wire_cst_address_index extends ffi.Struct { - @ffi.Int32() - external int tag; +final class wire_cst_Bip32Error_InvalidPublicKeyHexLength extends ffi.Struct { + @ffi.Uint32() + external int length; +} - external AddressIndexKind kind; +final class wire_cst_Bip32Error_UnknownError extends ffi.Struct { + external ffi.Pointer error_message; } -final class wire_cst_local_utxo extends ffi.Struct { - external wire_cst_out_point outpoint; +final class Bip32ErrorKind extends ffi.Union { + external wire_cst_Bip32Error_Secp256k1 Secp256k1; - external wire_cst_tx_out txout; + external wire_cst_Bip32Error_InvalidChildNumber InvalidChildNumber; - @ffi.Int32() - external int keychain; + external wire_cst_Bip32Error_UnknownVersion UnknownVersion; - @ffi.Bool() - external bool is_spent; + external wire_cst_Bip32Error_WrongExtendedKeyLength WrongExtendedKeyLength; + + external wire_cst_Bip32Error_Base58 Base58; + + external wire_cst_Bip32Error_Hex Hex; + + external wire_cst_Bip32Error_InvalidPublicKeyHexLength + InvalidPublicKeyHexLength; + + external wire_cst_Bip32Error_UnknownError UnknownError; } -final class wire_cst_psbt_sig_hash_type extends ffi.Struct { - @ffi.Uint32() - external int inner; +final class wire_cst_bip_32_error extends ffi.Struct { + @ffi.Int32() + external int tag; + + external Bip32ErrorKind kind; } -final class wire_cst_sqlite_db_configuration extends ffi.Struct { - external ffi.Pointer path; +final class wire_cst_Bip39Error_BadWordCount extends ffi.Struct { + @ffi.Uint64() + external int word_count; } -final class wire_cst_DatabaseConfig_Sqlite extends ffi.Struct { - external ffi.Pointer config; +final class wire_cst_Bip39Error_UnknownWord extends ffi.Struct { + @ffi.Uint64() + external int index; } -final class wire_cst_sled_db_configuration extends ffi.Struct { - external ffi.Pointer path; +final class wire_cst_Bip39Error_BadEntropyBitCount extends ffi.Struct { + @ffi.Uint64() + external int bit_count; +} - external ffi.Pointer tree_name; +final class wire_cst_Bip39Error_AmbiguousLanguages extends ffi.Struct { + external ffi.Pointer languages; } -final class wire_cst_DatabaseConfig_Sled extends ffi.Struct { - external ffi.Pointer config; +final class wire_cst_Bip39Error_Generic extends ffi.Struct { + external ffi.Pointer error_message; } -final class DatabaseConfigKind extends ffi.Union { - external wire_cst_DatabaseConfig_Sqlite Sqlite; +final class Bip39ErrorKind extends ffi.Union { + external wire_cst_Bip39Error_BadWordCount BadWordCount; + + external wire_cst_Bip39Error_UnknownWord UnknownWord; + + external wire_cst_Bip39Error_BadEntropyBitCount BadEntropyBitCount; - external wire_cst_DatabaseConfig_Sled Sled; + external wire_cst_Bip39Error_AmbiguousLanguages AmbiguousLanguages; + + external wire_cst_Bip39Error_Generic Generic; } -final class wire_cst_database_config extends ffi.Struct { +final class wire_cst_bip_39_error extends ffi.Struct { @ffi.Int32() external int tag; - external DatabaseConfigKind kind; + external Bip39ErrorKind kind; } -final class wire_cst_sign_options extends ffi.Struct { - @ffi.Bool() - external bool trust_witness_utxo; - - external ffi.Pointer assume_height; +final class wire_cst_CalculateFeeError_Generic extends ffi.Struct { + external ffi.Pointer error_message; +} - @ffi.Bool() - external bool allow_all_sighashes; +final class wire_cst_CalculateFeeError_MissingTxOut extends ffi.Struct { + external ffi.Pointer out_points; +} - @ffi.Bool() - external bool remove_partial_sigs; +final class wire_cst_CalculateFeeError_NegativeFee extends ffi.Struct { + external ffi.Pointer amount; +} - @ffi.Bool() - external bool try_finalize; +final class CalculateFeeErrorKind extends ffi.Union { + external wire_cst_CalculateFeeError_Generic Generic; - @ffi.Bool() - external bool sign_with_tap_internal_key; + external wire_cst_CalculateFeeError_MissingTxOut MissingTxOut; - @ffi.Bool() - external bool allow_grinding; + external wire_cst_CalculateFeeError_NegativeFee NegativeFee; } -final class wire_cst_script_amount extends ffi.Struct { - external wire_cst_bdk_script_buf script; +final class wire_cst_calculate_fee_error extends ffi.Struct { + @ffi.Int32() + external int tag; + + external CalculateFeeErrorKind kind; +} - @ffi.Uint64() - external int amount; +final class wire_cst_CannotConnectError_Include extends ffi.Struct { + @ffi.Uint32() + external int height; } -final class wire_cst_list_script_amount extends ffi.Struct { - external ffi.Pointer ptr; +final class CannotConnectErrorKind extends ffi.Union { + external wire_cst_CannotConnectError_Include Include; +} +final class wire_cst_cannot_connect_error extends ffi.Struct { @ffi.Int32() - external int len; + external int tag; + + external CannotConnectErrorKind kind; } -final class wire_cst_list_out_point extends ffi.Struct { - external ffi.Pointer ptr; +final class wire_cst_CreateTxError_TransactionNotFound extends ffi.Struct { + external ffi.Pointer txid; +} - @ffi.Int32() - external int len; +final class wire_cst_CreateTxError_TransactionConfirmed extends ffi.Struct { + external ffi.Pointer txid; } -final class wire_cst_input extends ffi.Struct { - external ffi.Pointer s; +final class wire_cst_CreateTxError_IrreplaceableTransaction extends ffi.Struct { + external ffi.Pointer txid; } -final class wire_cst_record_out_point_input_usize extends ffi.Struct { - external wire_cst_out_point field0; +final class wire_cst_CreateTxError_Generic extends ffi.Struct { + external ffi.Pointer error_message; +} - external wire_cst_input field1; +final class wire_cst_CreateTxError_Descriptor extends ffi.Struct { + external ffi.Pointer error_message; +} - @ffi.UintPtr() - external int field2; +final class wire_cst_CreateTxError_Policy extends ffi.Struct { + external ffi.Pointer error_message; } -final class wire_cst_RbfValue_Value extends ffi.Struct { - @ffi.Uint32() - external int field0; +final class wire_cst_CreateTxError_SpendingPolicyRequired extends ffi.Struct { + external ffi.Pointer kind; } -final class RbfValueKind extends ffi.Union { - external wire_cst_RbfValue_Value Value; +final class wire_cst_CreateTxError_LockTime extends ffi.Struct { + external ffi.Pointer requested_time; + + external ffi.Pointer required_time; } -final class wire_cst_rbf_value extends ffi.Struct { - @ffi.Int32() - external int tag; +final class wire_cst_CreateTxError_RbfSequenceCsv extends ffi.Struct { + external ffi.Pointer rbf; - external RbfValueKind kind; + external ffi.Pointer csv; } -final class wire_cst_AddressError_Base58 extends ffi.Struct { - external ffi.Pointer field0; +final class wire_cst_CreateTxError_FeeTooLow extends ffi.Struct { + external ffi.Pointer fee_required; } -final class wire_cst_AddressError_Bech32 extends ffi.Struct { - external ffi.Pointer field0; +final class wire_cst_CreateTxError_FeeRateTooLow extends ffi.Struct { + external ffi.Pointer fee_rate_required; } -final class wire_cst_AddressError_InvalidBech32Variant extends ffi.Struct { - @ffi.Int32() - external int expected; +final class wire_cst_CreateTxError_OutputBelowDustLimit extends ffi.Struct { + @ffi.Uint64() + external int index; +} - @ffi.Int32() - external int found; +final class wire_cst_CreateTxError_CoinSelection extends ffi.Struct { + external ffi.Pointer error_message; } -final class wire_cst_AddressError_InvalidWitnessVersion extends ffi.Struct { - @ffi.Uint8() - external int field0; +final class wire_cst_CreateTxError_InsufficientFunds extends ffi.Struct { + @ffi.Uint64() + external int needed; + + @ffi.Uint64() + external int available; } -final class wire_cst_AddressError_UnparsableWitnessVersion extends ffi.Struct { - external ffi.Pointer field0; +final class wire_cst_CreateTxError_Psbt extends ffi.Struct { + external ffi.Pointer error_message; } -final class wire_cst_AddressError_InvalidWitnessProgramLength - extends ffi.Struct { - @ffi.UintPtr() - external int field0; +final class wire_cst_CreateTxError_MissingKeyOrigin extends ffi.Struct { + external ffi.Pointer key; } -final class wire_cst_AddressError_InvalidSegwitV0ProgramLength - extends ffi.Struct { - @ffi.UintPtr() - external int field0; +final class wire_cst_CreateTxError_UnknownUtxo extends ffi.Struct { + external ffi.Pointer outpoint; } -final class wire_cst_AddressError_UnknownAddressType extends ffi.Struct { - external ffi.Pointer field0; +final class wire_cst_CreateTxError_MissingNonWitnessUtxo extends ffi.Struct { + external ffi.Pointer outpoint; } -final class wire_cst_AddressError_NetworkValidation extends ffi.Struct { - @ffi.Int32() - external int network_required; +final class wire_cst_CreateTxError_MiniscriptPsbt extends ffi.Struct { + external ffi.Pointer error_message; +} - @ffi.Int32() - external int network_found; +final class CreateTxErrorKind extends ffi.Union { + external wire_cst_CreateTxError_TransactionNotFound TransactionNotFound; - external ffi.Pointer address; -} + external wire_cst_CreateTxError_TransactionConfirmed TransactionConfirmed; -final class AddressErrorKind extends ffi.Union { - external wire_cst_AddressError_Base58 Base58; + external wire_cst_CreateTxError_IrreplaceableTransaction + IrreplaceableTransaction; - external wire_cst_AddressError_Bech32 Bech32; + external wire_cst_CreateTxError_Generic Generic; - external wire_cst_AddressError_InvalidBech32Variant InvalidBech32Variant; + external wire_cst_CreateTxError_Descriptor Descriptor; - external wire_cst_AddressError_InvalidWitnessVersion InvalidWitnessVersion; + external wire_cst_CreateTxError_Policy Policy; - external wire_cst_AddressError_UnparsableWitnessVersion - UnparsableWitnessVersion; + external wire_cst_CreateTxError_SpendingPolicyRequired SpendingPolicyRequired; - external wire_cst_AddressError_InvalidWitnessProgramLength - InvalidWitnessProgramLength; + external wire_cst_CreateTxError_LockTime LockTime; - external wire_cst_AddressError_InvalidSegwitV0ProgramLength - InvalidSegwitV0ProgramLength; + external wire_cst_CreateTxError_RbfSequenceCsv RbfSequenceCsv; - external wire_cst_AddressError_UnknownAddressType UnknownAddressType; + external wire_cst_CreateTxError_FeeTooLow FeeTooLow; - external wire_cst_AddressError_NetworkValidation NetworkValidation; -} + external wire_cst_CreateTxError_FeeRateTooLow FeeRateTooLow; -final class wire_cst_address_error extends ffi.Struct { - @ffi.Int32() - external int tag; + external wire_cst_CreateTxError_OutputBelowDustLimit OutputBelowDustLimit; - external AddressErrorKind kind; -} + external wire_cst_CreateTxError_CoinSelection CoinSelection; -final class wire_cst_block_time extends ffi.Struct { - @ffi.Uint32() - external int height; + external wire_cst_CreateTxError_InsufficientFunds InsufficientFunds; - @ffi.Uint64() - external int timestamp; -} + external wire_cst_CreateTxError_Psbt Psbt; -final class wire_cst_ConsensusError_Io extends ffi.Struct { - external ffi.Pointer field0; -} + external wire_cst_CreateTxError_MissingKeyOrigin MissingKeyOrigin; -final class wire_cst_ConsensusError_OversizedVectorAllocation - extends ffi.Struct { - @ffi.UintPtr() - external int requested; + external wire_cst_CreateTxError_UnknownUtxo UnknownUtxo; - @ffi.UintPtr() - external int max; + external wire_cst_CreateTxError_MissingNonWitnessUtxo MissingNonWitnessUtxo; + + external wire_cst_CreateTxError_MiniscriptPsbt MiniscriptPsbt; } -final class wire_cst_ConsensusError_InvalidChecksum extends ffi.Struct { - external ffi.Pointer expected; +final class wire_cst_create_tx_error extends ffi.Struct { + @ffi.Int32() + external int tag; - external ffi.Pointer actual; + external CreateTxErrorKind kind; } -final class wire_cst_ConsensusError_ParseFailed extends ffi.Struct { - external ffi.Pointer field0; +final class wire_cst_CreateWithPersistError_Persist extends ffi.Struct { + external ffi.Pointer error_message; } -final class wire_cst_ConsensusError_UnsupportedSegwitFlag extends ffi.Struct { - @ffi.Uint8() - external int field0; +final class wire_cst_CreateWithPersistError_Descriptor extends ffi.Struct { + external ffi.Pointer error_message; } -final class ConsensusErrorKind extends ffi.Union { - external wire_cst_ConsensusError_Io Io; - - external wire_cst_ConsensusError_OversizedVectorAllocation - OversizedVectorAllocation; - - external wire_cst_ConsensusError_InvalidChecksum InvalidChecksum; +final class CreateWithPersistErrorKind extends ffi.Union { + external wire_cst_CreateWithPersistError_Persist Persist; - external wire_cst_ConsensusError_ParseFailed ParseFailed; - - external wire_cst_ConsensusError_UnsupportedSegwitFlag UnsupportedSegwitFlag; + external wire_cst_CreateWithPersistError_Descriptor Descriptor; } -final class wire_cst_consensus_error extends ffi.Struct { +final class wire_cst_create_with_persist_error extends ffi.Struct { @ffi.Int32() external int tag; - external ConsensusErrorKind kind; + external CreateWithPersistErrorKind kind; } final class wire_cst_DescriptorError_Key extends ffi.Struct { - external ffi.Pointer field0; + external ffi.Pointer error_message; +} + +final class wire_cst_DescriptorError_Generic extends ffi.Struct { + external ffi.Pointer error_message; } final class wire_cst_DescriptorError_Policy extends ffi.Struct { - external ffi.Pointer field0; + external ffi.Pointer error_message; } final class wire_cst_DescriptorError_InvalidDescriptorCharacter extends ffi.Struct { - @ffi.Uint8() - external int field0; + external ffi.Pointer charector; } final class wire_cst_DescriptorError_Bip32 extends ffi.Struct { - external ffi.Pointer field0; + external ffi.Pointer error_message; } final class wire_cst_DescriptorError_Base58 extends ffi.Struct { - external ffi.Pointer field0; + external ffi.Pointer error_message; } final class wire_cst_DescriptorError_Pk extends ffi.Struct { - external ffi.Pointer field0; + external ffi.Pointer error_message; } final class wire_cst_DescriptorError_Miniscript extends ffi.Struct { - external ffi.Pointer field0; + external ffi.Pointer error_message; } final class wire_cst_DescriptorError_Hex extends ffi.Struct { - external ffi.Pointer field0; + external ffi.Pointer error_message; } final class DescriptorErrorKind extends ffi.Union { external wire_cst_DescriptorError_Key Key; + external wire_cst_DescriptorError_Generic Generic; + external wire_cst_DescriptorError_Policy Policy; external wire_cst_DescriptorError_InvalidDescriptorCharacter @@ -6486,374 +7787,456 @@ final class wire_cst_descriptor_error extends ffi.Struct { external DescriptorErrorKind kind; } -final class wire_cst_fee_rate extends ffi.Struct { - @ffi.Float() - external double sat_per_vb; +final class wire_cst_DescriptorKeyError_Parse extends ffi.Struct { + external ffi.Pointer error_message; } -final class wire_cst_HexError_InvalidChar extends ffi.Struct { - @ffi.Uint8() - external int field0; +final class wire_cst_DescriptorKeyError_Bip32 extends ffi.Struct { + external ffi.Pointer error_message; } -final class wire_cst_HexError_OddLengthString extends ffi.Struct { - @ffi.UintPtr() - external int field0; +final class DescriptorKeyErrorKind extends ffi.Union { + external wire_cst_DescriptorKeyError_Parse Parse; + + external wire_cst_DescriptorKeyError_Bip32 Bip32; } -final class wire_cst_HexError_InvalidLength extends ffi.Struct { - @ffi.UintPtr() - external int field0; +final class wire_cst_descriptor_key_error extends ffi.Struct { + @ffi.Int32() + external int tag; - @ffi.UintPtr() - external int field1; + external DescriptorKeyErrorKind kind; } -final class HexErrorKind extends ffi.Union { - external wire_cst_HexError_InvalidChar InvalidChar; - - external wire_cst_HexError_OddLengthString OddLengthString; +final class wire_cst_ElectrumError_IOError extends ffi.Struct { + external ffi.Pointer error_message; +} - external wire_cst_HexError_InvalidLength InvalidLength; +final class wire_cst_ElectrumError_Json extends ffi.Struct { + external ffi.Pointer error_message; } -final class wire_cst_hex_error extends ffi.Struct { - @ffi.Int32() - external int tag; +final class wire_cst_ElectrumError_Hex extends ffi.Struct { + external ffi.Pointer error_message; +} - external HexErrorKind kind; +final class wire_cst_ElectrumError_Protocol extends ffi.Struct { + external ffi.Pointer error_message; } -final class wire_cst_list_local_utxo extends ffi.Struct { - external ffi.Pointer ptr; +final class wire_cst_ElectrumError_Bitcoin extends ffi.Struct { + external ffi.Pointer error_message; +} - @ffi.Int32() - external int len; +final class wire_cst_ElectrumError_InvalidResponse extends ffi.Struct { + external ffi.Pointer error_message; } -final class wire_cst_transaction_details extends ffi.Struct { - external ffi.Pointer transaction; +final class wire_cst_ElectrumError_Message extends ffi.Struct { + external ffi.Pointer error_message; +} - external ffi.Pointer txid; +final class wire_cst_ElectrumError_InvalidDNSNameError extends ffi.Struct { + external ffi.Pointer domain; +} - @ffi.Uint64() - external int received; +final class wire_cst_ElectrumError_SharedIOError extends ffi.Struct { + external ffi.Pointer error_message; +} - @ffi.Uint64() - external int sent; +final class wire_cst_ElectrumError_CouldNotCreateConnection extends ffi.Struct { + external ffi.Pointer error_message; +} - external ffi.Pointer fee; +final class ElectrumErrorKind extends ffi.Union { + external wire_cst_ElectrumError_IOError IOError; - external ffi.Pointer confirmation_time; -} + external wire_cst_ElectrumError_Json Json; -final class wire_cst_list_transaction_details extends ffi.Struct { - external ffi.Pointer ptr; + external wire_cst_ElectrumError_Hex Hex; - @ffi.Int32() - external int len; -} + external wire_cst_ElectrumError_Protocol Protocol; -final class wire_cst_balance extends ffi.Struct { - @ffi.Uint64() - external int immature; + external wire_cst_ElectrumError_Bitcoin Bitcoin; - @ffi.Uint64() - external int trusted_pending; + external wire_cst_ElectrumError_InvalidResponse InvalidResponse; - @ffi.Uint64() - external int untrusted_pending; + external wire_cst_ElectrumError_Message Message; - @ffi.Uint64() - external int confirmed; + external wire_cst_ElectrumError_InvalidDNSNameError InvalidDNSNameError; - @ffi.Uint64() - external int spendable; + external wire_cst_ElectrumError_SharedIOError SharedIOError; - @ffi.Uint64() - external int total; + external wire_cst_ElectrumError_CouldNotCreateConnection + CouldNotCreateConnection; } -final class wire_cst_BdkError_Hex extends ffi.Struct { - external ffi.Pointer field0; -} +final class wire_cst_electrum_error extends ffi.Struct { + @ffi.Int32() + external int tag; -final class wire_cst_BdkError_Consensus extends ffi.Struct { - external ffi.Pointer field0; + external ElectrumErrorKind kind; } -final class wire_cst_BdkError_VerifyTransaction extends ffi.Struct { - external ffi.Pointer field0; +final class wire_cst_EsploraError_Minreq extends ffi.Struct { + external ffi.Pointer error_message; } -final class wire_cst_BdkError_Address extends ffi.Struct { - external ffi.Pointer field0; -} +final class wire_cst_EsploraError_HttpResponse extends ffi.Struct { + @ffi.Uint16() + external int status; -final class wire_cst_BdkError_Descriptor extends ffi.Struct { - external ffi.Pointer field0; + external ffi.Pointer error_message; } -final class wire_cst_BdkError_InvalidU32Bytes extends ffi.Struct { - external ffi.Pointer field0; +final class wire_cst_EsploraError_Parsing extends ffi.Struct { + external ffi.Pointer error_message; } -final class wire_cst_BdkError_Generic extends ffi.Struct { - external ffi.Pointer field0; +final class wire_cst_EsploraError_StatusCode extends ffi.Struct { + external ffi.Pointer error_message; } -final class wire_cst_BdkError_OutputBelowDustLimit extends ffi.Struct { - @ffi.UintPtr() - external int field0; +final class wire_cst_EsploraError_BitcoinEncoding extends ffi.Struct { + external ffi.Pointer error_message; } -final class wire_cst_BdkError_InsufficientFunds extends ffi.Struct { - @ffi.Uint64() - external int needed; +final class wire_cst_EsploraError_HexToArray extends ffi.Struct { + external ffi.Pointer error_message; +} - @ffi.Uint64() - external int available; +final class wire_cst_EsploraError_HexToBytes extends ffi.Struct { + external ffi.Pointer error_message; } -final class wire_cst_BdkError_FeeRateTooLow extends ffi.Struct { - @ffi.Float() - external double needed; +final class wire_cst_EsploraError_HeaderHeightNotFound extends ffi.Struct { + @ffi.Uint32() + external int height; } -final class wire_cst_BdkError_FeeTooLow extends ffi.Struct { - @ffi.Uint64() - external int needed; +final class wire_cst_EsploraError_InvalidHttpHeaderName extends ffi.Struct { + external ffi.Pointer name; } -final class wire_cst_BdkError_MissingKeyOrigin extends ffi.Struct { - external ffi.Pointer field0; +final class wire_cst_EsploraError_InvalidHttpHeaderValue extends ffi.Struct { + external ffi.Pointer value; } -final class wire_cst_BdkError_Key extends ffi.Struct { - external ffi.Pointer field0; +final class EsploraErrorKind extends ffi.Union { + external wire_cst_EsploraError_Minreq Minreq; + + external wire_cst_EsploraError_HttpResponse HttpResponse; + + external wire_cst_EsploraError_Parsing Parsing; + + external wire_cst_EsploraError_StatusCode StatusCode; + + external wire_cst_EsploraError_BitcoinEncoding BitcoinEncoding; + + external wire_cst_EsploraError_HexToArray HexToArray; + + external wire_cst_EsploraError_HexToBytes HexToBytes; + + external wire_cst_EsploraError_HeaderHeightNotFound HeaderHeightNotFound; + + external wire_cst_EsploraError_InvalidHttpHeaderName InvalidHttpHeaderName; + + external wire_cst_EsploraError_InvalidHttpHeaderValue InvalidHttpHeaderValue; } -final class wire_cst_BdkError_SpendingPolicyRequired extends ffi.Struct { +final class wire_cst_esplora_error extends ffi.Struct { @ffi.Int32() - external int field0; + external int tag; + + external EsploraErrorKind kind; } -final class wire_cst_BdkError_InvalidPolicyPathError extends ffi.Struct { - external ffi.Pointer field0; +final class wire_cst_ExtractTxError_AbsurdFeeRate extends ffi.Struct { + @ffi.Uint64() + external int fee_rate; } -final class wire_cst_BdkError_Signer extends ffi.Struct { - external ffi.Pointer field0; +final class ExtractTxErrorKind extends ffi.Union { + external wire_cst_ExtractTxError_AbsurdFeeRate AbsurdFeeRate; } -final class wire_cst_BdkError_InvalidNetwork extends ffi.Struct { +final class wire_cst_extract_tx_error extends ffi.Struct { @ffi.Int32() - external int requested; + external int tag; - @ffi.Int32() - external int found; + external ExtractTxErrorKind kind; } -final class wire_cst_BdkError_InvalidOutpoint extends ffi.Struct { - external ffi.Pointer field0; +final class wire_cst_FromScriptError_WitnessProgram extends ffi.Struct { + external ffi.Pointer error_message; } -final class wire_cst_BdkError_Encode extends ffi.Struct { - external ffi.Pointer field0; +final class wire_cst_FromScriptError_WitnessVersion extends ffi.Struct { + external ffi.Pointer error_message; } -final class wire_cst_BdkError_Miniscript extends ffi.Struct { - external ffi.Pointer field0; -} +final class FromScriptErrorKind extends ffi.Union { + external wire_cst_FromScriptError_WitnessProgram WitnessProgram; -final class wire_cst_BdkError_MiniscriptPsbt extends ffi.Struct { - external ffi.Pointer field0; + external wire_cst_FromScriptError_WitnessVersion WitnessVersion; } -final class wire_cst_BdkError_Bip32 extends ffi.Struct { - external ffi.Pointer field0; -} +final class wire_cst_from_script_error extends ffi.Struct { + @ffi.Int32() + external int tag; -final class wire_cst_BdkError_Bip39 extends ffi.Struct { - external ffi.Pointer field0; + external FromScriptErrorKind kind; } -final class wire_cst_BdkError_Secp256k1 extends ffi.Struct { - external ffi.Pointer field0; +final class wire_cst_LoadWithPersistError_Persist extends ffi.Struct { + external ffi.Pointer error_message; } -final class wire_cst_BdkError_Json extends ffi.Struct { - external ffi.Pointer field0; +final class wire_cst_LoadWithPersistError_InvalidChangeSet extends ffi.Struct { + external ffi.Pointer error_message; } -final class wire_cst_BdkError_Psbt extends ffi.Struct { - external ffi.Pointer field0; +final class LoadWithPersistErrorKind extends ffi.Union { + external wire_cst_LoadWithPersistError_Persist Persist; + + external wire_cst_LoadWithPersistError_InvalidChangeSet InvalidChangeSet; } -final class wire_cst_BdkError_PsbtParse extends ffi.Struct { - external ffi.Pointer field0; +final class wire_cst_load_with_persist_error extends ffi.Struct { + @ffi.Int32() + external int tag; + + external LoadWithPersistErrorKind kind; } -final class wire_cst_BdkError_MissingCachedScripts extends ffi.Struct { - @ffi.UintPtr() - external int field0; +final class wire_cst_PsbtError_InvalidKey extends ffi.Struct { + external ffi.Pointer key; +} - @ffi.UintPtr() - external int field1; +final class wire_cst_PsbtError_DuplicateKey extends ffi.Struct { + external ffi.Pointer key; } -final class wire_cst_BdkError_Electrum extends ffi.Struct { - external ffi.Pointer field0; +final class wire_cst_PsbtError_NonStandardSighashType extends ffi.Struct { + @ffi.Uint32() + external int sighash; } -final class wire_cst_BdkError_Esplora extends ffi.Struct { - external ffi.Pointer field0; +final class wire_cst_PsbtError_InvalidHash extends ffi.Struct { + external ffi.Pointer hash; } -final class wire_cst_BdkError_Sled extends ffi.Struct { - external ffi.Pointer field0; +final class wire_cst_PsbtError_CombineInconsistentKeySources + extends ffi.Struct { + external ffi.Pointer xpub; } -final class wire_cst_BdkError_Rpc extends ffi.Struct { - external ffi.Pointer field0; +final class wire_cst_PsbtError_ConsensusEncoding extends ffi.Struct { + external ffi.Pointer encoding_error; } -final class wire_cst_BdkError_Rusqlite extends ffi.Struct { - external ffi.Pointer field0; +final class wire_cst_PsbtError_InvalidPublicKey extends ffi.Struct { + external ffi.Pointer error_message; } -final class wire_cst_BdkError_InvalidInput extends ffi.Struct { - external ffi.Pointer field0; +final class wire_cst_PsbtError_InvalidSecp256k1PublicKey extends ffi.Struct { + external ffi.Pointer secp256k1_error; } -final class wire_cst_BdkError_InvalidLockTime extends ffi.Struct { - external ffi.Pointer field0; +final class wire_cst_PsbtError_InvalidEcdsaSignature extends ffi.Struct { + external ffi.Pointer error_message; } -final class wire_cst_BdkError_InvalidTransaction extends ffi.Struct { - external ffi.Pointer field0; +final class wire_cst_PsbtError_InvalidTaprootSignature extends ffi.Struct { + external ffi.Pointer error_message; } -final class BdkErrorKind extends ffi.Union { - external wire_cst_BdkError_Hex Hex; +final class wire_cst_PsbtError_TapTree extends ffi.Struct { + external ffi.Pointer error_message; +} - external wire_cst_BdkError_Consensus Consensus; +final class wire_cst_PsbtError_Version extends ffi.Struct { + external ffi.Pointer error_message; +} - external wire_cst_BdkError_VerifyTransaction VerifyTransaction; +final class wire_cst_PsbtError_Io extends ffi.Struct { + external ffi.Pointer error_message; +} - external wire_cst_BdkError_Address Address; +final class PsbtErrorKind extends ffi.Union { + external wire_cst_PsbtError_InvalidKey InvalidKey; - external wire_cst_BdkError_Descriptor Descriptor; + external wire_cst_PsbtError_DuplicateKey DuplicateKey; - external wire_cst_BdkError_InvalidU32Bytes InvalidU32Bytes; + external wire_cst_PsbtError_NonStandardSighashType NonStandardSighashType; - external wire_cst_BdkError_Generic Generic; + external wire_cst_PsbtError_InvalidHash InvalidHash; - external wire_cst_BdkError_OutputBelowDustLimit OutputBelowDustLimit; + external wire_cst_PsbtError_CombineInconsistentKeySources + CombineInconsistentKeySources; - external wire_cst_BdkError_InsufficientFunds InsufficientFunds; + external wire_cst_PsbtError_ConsensusEncoding ConsensusEncoding; - external wire_cst_BdkError_FeeRateTooLow FeeRateTooLow; + external wire_cst_PsbtError_InvalidPublicKey InvalidPublicKey; - external wire_cst_BdkError_FeeTooLow FeeTooLow; + external wire_cst_PsbtError_InvalidSecp256k1PublicKey + InvalidSecp256k1PublicKey; - external wire_cst_BdkError_MissingKeyOrigin MissingKeyOrigin; + external wire_cst_PsbtError_InvalidEcdsaSignature InvalidEcdsaSignature; - external wire_cst_BdkError_Key Key; + external wire_cst_PsbtError_InvalidTaprootSignature InvalidTaprootSignature; - external wire_cst_BdkError_SpendingPolicyRequired SpendingPolicyRequired; + external wire_cst_PsbtError_TapTree TapTree; - external wire_cst_BdkError_InvalidPolicyPathError InvalidPolicyPathError; + external wire_cst_PsbtError_Version Version; - external wire_cst_BdkError_Signer Signer; + external wire_cst_PsbtError_Io Io; +} - external wire_cst_BdkError_InvalidNetwork InvalidNetwork; +final class wire_cst_psbt_error extends ffi.Struct { + @ffi.Int32() + external int tag; - external wire_cst_BdkError_InvalidOutpoint InvalidOutpoint; + external PsbtErrorKind kind; +} - external wire_cst_BdkError_Encode Encode; +final class wire_cst_PsbtParseError_PsbtEncoding extends ffi.Struct { + external ffi.Pointer error_message; +} - external wire_cst_BdkError_Miniscript Miniscript; +final class wire_cst_PsbtParseError_Base64Encoding extends ffi.Struct { + external ffi.Pointer error_message; +} - external wire_cst_BdkError_MiniscriptPsbt MiniscriptPsbt; +final class PsbtParseErrorKind extends ffi.Union { + external wire_cst_PsbtParseError_PsbtEncoding PsbtEncoding; - external wire_cst_BdkError_Bip32 Bip32; + external wire_cst_PsbtParseError_Base64Encoding Base64Encoding; +} - external wire_cst_BdkError_Bip39 Bip39; +final class wire_cst_psbt_parse_error extends ffi.Struct { + @ffi.Int32() + external int tag; - external wire_cst_BdkError_Secp256k1 Secp256k1; + external PsbtParseErrorKind kind; +} - external wire_cst_BdkError_Json Json; +final class wire_cst_SignerError_SighashP2wpkh extends ffi.Struct { + external ffi.Pointer error_message; +} - external wire_cst_BdkError_Psbt Psbt; +final class wire_cst_SignerError_SighashTaproot extends ffi.Struct { + external ffi.Pointer error_message; +} - external wire_cst_BdkError_PsbtParse PsbtParse; +final class wire_cst_SignerError_TxInputsIndexError extends ffi.Struct { + external ffi.Pointer error_message; +} - external wire_cst_BdkError_MissingCachedScripts MissingCachedScripts; +final class wire_cst_SignerError_MiniscriptPsbt extends ffi.Struct { + external ffi.Pointer error_message; +} - external wire_cst_BdkError_Electrum Electrum; +final class wire_cst_SignerError_External extends ffi.Struct { + external ffi.Pointer error_message; +} - external wire_cst_BdkError_Esplora Esplora; +final class wire_cst_SignerError_Psbt extends ffi.Struct { + external ffi.Pointer error_message; +} - external wire_cst_BdkError_Sled Sled; +final class SignerErrorKind extends ffi.Union { + external wire_cst_SignerError_SighashP2wpkh SighashP2wpkh; - external wire_cst_BdkError_Rpc Rpc; + external wire_cst_SignerError_SighashTaproot SighashTaproot; - external wire_cst_BdkError_Rusqlite Rusqlite; + external wire_cst_SignerError_TxInputsIndexError TxInputsIndexError; - external wire_cst_BdkError_InvalidInput InvalidInput; + external wire_cst_SignerError_MiniscriptPsbt MiniscriptPsbt; - external wire_cst_BdkError_InvalidLockTime InvalidLockTime; + external wire_cst_SignerError_External External; - external wire_cst_BdkError_InvalidTransaction InvalidTransaction; + external wire_cst_SignerError_Psbt Psbt; } -final class wire_cst_bdk_error extends ffi.Struct { +final class wire_cst_signer_error extends ffi.Struct { @ffi.Int32() external int tag; - external BdkErrorKind kind; + external SignerErrorKind kind; } -final class wire_cst_Payload_PubkeyHash extends ffi.Struct { - external ffi.Pointer pubkey_hash; +final class wire_cst_SqliteError_Sqlite extends ffi.Struct { + external ffi.Pointer rusqlite_error; } -final class wire_cst_Payload_ScriptHash extends ffi.Struct { - external ffi.Pointer script_hash; +final class SqliteErrorKind extends ffi.Union { + external wire_cst_SqliteError_Sqlite Sqlite; } -final class wire_cst_Payload_WitnessProgram extends ffi.Struct { +final class wire_cst_sqlite_error extends ffi.Struct { @ffi.Int32() - external int version; + external int tag; + + external SqliteErrorKind kind; +} + +final class wire_cst_sync_progress extends ffi.Struct { + @ffi.Uint64() + external int spks_consumed; + + @ffi.Uint64() + external int spks_remaining; + + @ffi.Uint64() + external int txids_consumed; + + @ffi.Uint64() + external int txids_remaining; - external ffi.Pointer program; + @ffi.Uint64() + external int outpoints_consumed; + + @ffi.Uint64() + external int outpoints_remaining; +} + +final class wire_cst_TransactionError_InvalidChecksum extends ffi.Struct { + external ffi.Pointer expected; + + external ffi.Pointer actual; } -final class PayloadKind extends ffi.Union { - external wire_cst_Payload_PubkeyHash PubkeyHash; +final class wire_cst_TransactionError_UnsupportedSegwitFlag extends ffi.Struct { + @ffi.Uint8() + external int flag; +} - external wire_cst_Payload_ScriptHash ScriptHash; +final class TransactionErrorKind extends ffi.Union { + external wire_cst_TransactionError_InvalidChecksum InvalidChecksum; - external wire_cst_Payload_WitnessProgram WitnessProgram; + external wire_cst_TransactionError_UnsupportedSegwitFlag + UnsupportedSegwitFlag; } -final class wire_cst_payload extends ffi.Struct { +final class wire_cst_transaction_error extends ffi.Struct { @ffi.Int32() external int tag; - external PayloadKind kind; + external TransactionErrorKind kind; } -final class wire_cst_record_bdk_address_u_32 extends ffi.Struct { - external wire_cst_bdk_address field0; +final class wire_cst_TxidParseError_InvalidTxid extends ffi.Struct { + external ffi.Pointer txid; +} - @ffi.Uint32() - external int field1; +final class TxidParseErrorKind extends ffi.Union { + external wire_cst_TxidParseError_InvalidTxid InvalidTxid; } -final class wire_cst_record_bdk_psbt_transaction_details extends ffi.Struct { - external wire_cst_bdk_psbt field0; +final class wire_cst_txid_parse_error extends ffi.Struct { + @ffi.Int32() + external int tag; - external wire_cst_transaction_details field1; + external TxidParseErrorKind kind; } diff --git a/lib/src/generated/lib.dart b/lib/src/generated/lib.dart index c4436031..881365c7 100644 --- a/lib/src/generated/lib.dart +++ b/lib/src/generated/lib.dart @@ -1,52 +1,40 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0. +// @generated by `flutter_rust_bridge`@ 2.4.0. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import import 'frb_generated.dart'; -import 'package:collection/collection.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; -// Rust type: RustOpaqueNom +// Rust type: RustOpaqueNom abstract class Address implements RustOpaqueInterface {} -// Rust type: RustOpaqueNom -abstract class DerivationPath implements RustOpaqueInterface {} +// Rust type: RustOpaqueNom +abstract class Transaction implements RustOpaqueInterface {} -// Rust type: RustOpaqueNom -abstract class AnyBlockchain implements RustOpaqueInterface {} +// Rust type: RustOpaqueNom +abstract class DerivationPath implements RustOpaqueInterface {} -// Rust type: RustOpaqueNom +// Rust type: RustOpaqueNom abstract class ExtendedDescriptor implements RustOpaqueInterface {} -// Rust type: RustOpaqueNom +// Rust type: RustOpaqueNom +abstract class Policy implements RustOpaqueInterface {} + +// Rust type: RustOpaqueNom abstract class DescriptorPublicKey implements RustOpaqueInterface {} -// Rust type: RustOpaqueNom +// Rust type: RustOpaqueNom abstract class DescriptorSecretKey implements RustOpaqueInterface {} -// Rust type: RustOpaqueNom +// Rust type: RustOpaqueNom abstract class KeyMap implements RustOpaqueInterface {} -// Rust type: RustOpaqueNom +// Rust type: RustOpaqueNom abstract class Mnemonic implements RustOpaqueInterface {} -// Rust type: RustOpaqueNom >> -abstract class MutexWalletAnyDatabase implements RustOpaqueInterface {} - -// Rust type: RustOpaqueNom> -abstract class MutexPartiallySignedTransaction implements RustOpaqueInterface {} - -class U8Array4 extends NonGrowableListView { - static const arraySize = 4; - - @internal - Uint8List get inner => _inner; - final Uint8List _inner; - - U8Array4(this._inner) - : assert(_inner.length == arraySize), - super(_inner); +// Rust type: RustOpaqueNom> +abstract class MutexPsbt implements RustOpaqueInterface {} - U8Array4.init() : this(Uint8List(arraySize)); -} +// Rust type: RustOpaqueNom >> +abstract class MutexPersistedWalletConnection implements RustOpaqueInterface {} diff --git a/lib/src/root.dart b/lib/src/root.dart index 760afe41..8c4e11df 100644 --- a/lib/src/root.dart +++ b/lib/src/root.dart @@ -1,29 +1,35 @@ -import 'dart:typed_data'; +import 'dart:async'; import 'package:bdk_flutter/bdk_flutter.dart'; +import 'package:bdk_flutter/src/generated/api/bitcoin.dart' as bitcoin; +import 'package:bdk_flutter/src/generated/api/descriptor.dart'; +import 'package:bdk_flutter/src/generated/api/electrum.dart'; +import 'package:bdk_flutter/src/generated/api/error.dart'; +import 'package:bdk_flutter/src/generated/api/esplora.dart'; +import 'package:bdk_flutter/src/generated/api/key.dart'; +import 'package:bdk_flutter/src/generated/api/store.dart'; +import 'package:bdk_flutter/src/generated/api/tx_builder.dart'; +import 'package:bdk_flutter/src/generated/api/types.dart'; +import 'package:bdk_flutter/src/generated/api/wallet.dart'; 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'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; ///A Bitcoin address. -class Address extends BdkAddress { - Address._({required super.ptr}); +class Address extends bitcoin.FfiAddress { + Address._({required super.field0}); /// [Address] constructor 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 mapBdkError(e); + final res = + await bitcoin.FfiAddress.fromScript(script: script, network: network); + return Address._(field0: res.field0); + } on FromScriptError catch (e) { + throw mapFromScriptError(e); + } on PanicException catch (e) { + throw FromScriptException(code: "Unknown", errorMessage: e.message); } } @@ -32,20 +38,19 @@ class Address extends BdkAddress { {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 mapBdkError(e); + final res = + await bitcoin.FfiAddress.fromString(address: s, network: network); + return Address._(field0: res.field0); + } on AddressParseError catch (e) { + throw mapAddressParseError(e); + } on PanicException catch (e) { + throw AddressParseException(code: "Unknown", errorMessage: e.message); } } ///Generates a script pubkey spending to this address - ScriptBuf scriptPubkey() { - try { - return ScriptBuf(bytes: BdkAddress.script(ptr: this).bytes); - } on BdkError catch (e) { - throw mapBdkError(e); - } + ScriptBuf script() { + return ScriptBuf(bytes: bitcoin.FfiAddress.script(opaque: this).bytes); } //Creates a URI string bitcoin:address optimized to be encoded in QR codes. @@ -55,11 +60,7 @@ class Address extends BdkAddress { /// If you want to avoid allocation you can use alternate display instead: @override String toQrUri() { - try { - return super.toQrUri(); - } on BdkError catch (e) { - throw mapBdkError(e); - } + return super.toQrUri(); } ///Parsed addresses do not always have one network. The problem is that legacy testnet, regtest and signet addresses use the same prefix instead of multiple different ones. @@ -67,31 +68,7 @@ class Address extends BdkAddress { ///So if one wants to check if an address belongs to a certain network a simple comparison is not enough anymore. Instead this function can be used. @override bool isValidForNetwork({required Network network}) { - try { - return super.isValidForNetwork(network: network); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///The network on which this address is usable. - @override - Network network() { - try { - return super.network(); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///The type of the address. - @override - Payload payload() { - try { - return super.payload(); - } on BdkError catch (e) { - throw mapBdkError(e); - } + return super.isValidForNetwork(network: network); } @override @@ -100,111 +77,15 @@ class Address extends BdkAddress { } } -/// Blockchain backends module provides the implementation of a few commonly-used backends like Electrum, and Esplora. -class Blockchain extends BdkBlockchain { - Blockchain._({required super.ptr}); - - /// [Blockchain] constructor - - static Future create({required BlockchainConfig config}) async { - try { - await Api.initialize(); - final res = await BdkBlockchain.create(blockchainConfig: config); - return Blockchain._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - /// [Blockchain] constructor for creating `Esplora` blockchain in `Mutinynet` - /// Esplora url: https://mutinynet.ltbl.io/api - static Future createMutinynet({ - int stopGap = 20, - }) async { - final config = BlockchainConfig.esplora( - config: EsploraConfig( - baseUrl: 'https://mutinynet.ltbl.io/api', - stopGap: BigInt.from(stopGap), - ), - ); - return create(config: config); - } - - /// [Blockchain] constructor for creating `Esplora` blockchain in `Testnet` - /// Esplora url: https://testnet.ltbl.io/api - static Future createTestnet({ - int stopGap = 20, - }) async { - final config = BlockchainConfig.esplora( - config: EsploraConfig( - baseUrl: 'https://testnet.ltbl.io/api', - stopGap: BigInt.from(stopGap), - ), - ); - return create(config: config); - } - - ///Estimate the fee rate required to confirm a transaction in a given target of blocks - @override - Future estimateFee({required BigInt target, hint}) async { - try { - return super.estimateFee(target: target); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///The function for broadcasting a transaction - @override - Future broadcast({required BdkTransaction transaction, hint}) async { - try { - return super.broadcast(transaction: transaction); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///The function for getting block hash by block height - @override - Future getBlockHash({required int height, hint}) async { - try { - return super.getBlockHash(height: height); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///The function for getting the current height of the blockchain. - @override - Future getHeight({hint}) { - try { - return super.getHeight(); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } -} - /// The BumpFeeTxBuilder is used to bump the fee on a transaction that has been broadcast and has its RBF flag set to true. class BumpFeeTxBuilder { int? _nSequence; - Address? _allowShrinking; bool _enableRbf = false; final String txid; - final double feeRate; + final FeeRate 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` @@ -224,36 +105,38 @@ class BumpFeeTxBuilder { return this; } - /// Finish building the transaction. Returns the [PartiallySignedTransaction]& [TransactionDetails]. - Future<(PartiallySignedTransaction, TransactionDetails)> finish( - Wallet wallet) async { + /// Finish building the transaction. Returns the [PSBT]. + Future 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 mapBdkError(e); + nSequence: _nSequence); + return PSBT._(opaque: res.opaque); + } on CreateTxError catch (e) { + throw mapCreateTxError(e); + } on PanicException catch (e) { + throw CreateTxException(code: "Unknown", errorMessage: e.message); } } } ///A `BIP-32` derivation path -class DerivationPath extends BdkDerivationPath { - DerivationPath._({required super.ptr}); +class DerivationPath extends FfiDerivationPath { + DerivationPath._({required super.opaque}); /// [DerivationPath] constructor static Future create({required String path}) async { try { await Api.initialize(); - final res = await BdkDerivationPath.fromString(path: path); - return DerivationPath._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapBdkError(e); + final res = await FfiDerivationPath.fromString(path: path); + return DerivationPath._(opaque: res.opaque); + } on Bip32Error catch (e) { + throw mapBip32Error(e); + } on PanicException catch (e) { + throw Bip32Exception(code: "Unknown", errorMessage: e.message); } } @@ -264,7 +147,7 @@ class DerivationPath extends BdkDerivationPath { } ///Script descriptor -class Descriptor extends BdkDescriptor { +class Descriptor extends FfiDescriptor { Descriptor._({required super.extendedDescriptor, required super.keyMap}); /// [Descriptor] constructor @@ -272,12 +155,14 @@ class Descriptor extends BdkDescriptor { {required String descriptor, required Network network}) async { try { await Api.initialize(); - final res = await BdkDescriptor.newInstance( + final res = await FfiDescriptor.newInstance( descriptor: descriptor, network: network); return Descriptor._( extendedDescriptor: res.extendedDescriptor, keyMap: res.keyMap); - } on BdkError catch (e) { - throw mapBdkError(e); + } on DescriptorError catch (e) { + throw mapDescriptorError(e); + } on PanicException catch (e) { + throw DescriptorException(code: "Unknown", errorMessage: e.message); } } @@ -290,12 +175,14 @@ class Descriptor extends BdkDescriptor { required KeychainKind keychain}) async { try { await Api.initialize(); - final res = await BdkDescriptor.newBip44( + final res = await FfiDescriptor.newBip44( secretKey: secretKey, network: network, keychainKind: keychain); return Descriptor._( extendedDescriptor: res.extendedDescriptor, keyMap: res.keyMap); - } on BdkError catch (e) { - throw mapBdkError(e); + } on DescriptorError catch (e) { + throw mapDescriptorError(e); + } on PanicException catch (e) { + throw DescriptorException(code: "Unknown", errorMessage: e.message); } } @@ -311,15 +198,17 @@ class Descriptor extends BdkDescriptor { required KeychainKind keychain}) async { try { await Api.initialize(); - final res = await BdkDescriptor.newBip44Public( + final res = await FfiDescriptor.newBip44Public( network: network, keychainKind: keychain, publicKey: publicKey, fingerprint: fingerPrint); return Descriptor._( extendedDescriptor: res.extendedDescriptor, keyMap: res.keyMap); - } on BdkError catch (e) { - throw mapBdkError(e); + } on DescriptorError catch (e) { + throw mapDescriptorError(e); + } on PanicException catch (e) { + throw DescriptorException(code: "Unknown", errorMessage: e.message); } } @@ -332,12 +221,14 @@ class Descriptor extends BdkDescriptor { required KeychainKind keychain}) async { try { await Api.initialize(); - final res = await BdkDescriptor.newBip49( + final res = await FfiDescriptor.newBip49( secretKey: secretKey, network: network, keychainKind: keychain); return Descriptor._( extendedDescriptor: res.extendedDescriptor, keyMap: res.keyMap); - } on BdkError catch (e) { - throw mapBdkError(e); + } on DescriptorError catch (e) { + throw mapDescriptorError(e); + } on PanicException catch (e) { + throw DescriptorException(code: "Unknown", errorMessage: e.message); } } @@ -353,15 +244,17 @@ class Descriptor extends BdkDescriptor { required KeychainKind keychain}) async { try { await Api.initialize(); - final res = await BdkDescriptor.newBip49Public( + final res = await FfiDescriptor.newBip49Public( network: network, keychainKind: keychain, publicKey: publicKey, fingerprint: fingerPrint); return Descriptor._( extendedDescriptor: res.extendedDescriptor, keyMap: res.keyMap); - } on BdkError catch (e) { - throw mapBdkError(e); + } on DescriptorError catch (e) { + throw mapDescriptorError(e); + } on PanicException catch (e) { + throw DescriptorException(code: "Unknown", errorMessage: e.message); } } @@ -374,12 +267,14 @@ class Descriptor extends BdkDescriptor { required KeychainKind keychain}) async { try { await Api.initialize(); - final res = await BdkDescriptor.newBip84( + final res = await FfiDescriptor.newBip84( secretKey: secretKey, network: network, keychainKind: keychain); return Descriptor._( extendedDescriptor: res.extendedDescriptor, keyMap: res.keyMap); - } on BdkError catch (e) { - throw mapBdkError(e); + } on DescriptorError catch (e) { + throw mapDescriptorError(e); + } on PanicException catch (e) { + throw DescriptorException(code: "Unknown", errorMessage: e.message); } } @@ -395,15 +290,17 @@ class Descriptor extends BdkDescriptor { required KeychainKind keychain}) async { try { await Api.initialize(); - final res = await BdkDescriptor.newBip84Public( + final res = await FfiDescriptor.newBip84Public( network: network, keychainKind: keychain, publicKey: publicKey, fingerprint: fingerPrint); return Descriptor._( extendedDescriptor: res.extendedDescriptor, keyMap: res.keyMap); - } on BdkError catch (e) { - throw mapBdkError(e); + } on DescriptorError catch (e) { + throw mapDescriptorError(e); + } on PanicException catch (e) { + throw DescriptorException(code: "Unknown", errorMessage: e.message); } } @@ -416,12 +313,14 @@ class Descriptor extends BdkDescriptor { required KeychainKind keychain}) async { try { await Api.initialize(); - final res = await BdkDescriptor.newBip86( + final res = await FfiDescriptor.newBip86( secretKey: secretKey, network: network, keychainKind: keychain); return Descriptor._( extendedDescriptor: res.extendedDescriptor, keyMap: res.keyMap); - } on BdkError catch (e) { - throw mapBdkError(e); + } on DescriptorError catch (e) { + throw mapDescriptorError(e); + } on PanicException catch (e) { + throw DescriptorException(code: "Unknown", errorMessage: e.message); } } @@ -437,15 +336,17 @@ class Descriptor extends BdkDescriptor { required KeychainKind keychain}) async { try { await Api.initialize(); - final res = await BdkDescriptor.newBip86Public( + final res = await FfiDescriptor.newBip86Public( network: network, keychainKind: keychain, publicKey: publicKey, fingerprint: fingerPrint); return Descriptor._( extendedDescriptor: res.extendedDescriptor, keyMap: res.keyMap); - } on BdkError catch (e) { - throw mapBdkError(e); + } on DescriptorError catch (e) { + throw mapDescriptorError(e); + } on PanicException catch (e) { + throw DescriptorException(code: "Unknown", errorMessage: e.message); } } @@ -457,11 +358,11 @@ class Descriptor extends BdkDescriptor { ///Return the private version of the output descriptor if available, otherwise return the public version. @override - String toStringPrivate({hint}) { + String toStringWithSecret({hint}) { try { - return super.toStringPrivate(); - } on BdkError catch (e) { - throw mapBdkError(e); + return super.toStringWithSecret(); + } on DescriptorError catch (e) { + throw mapDescriptorError(e); } } @@ -470,24 +371,28 @@ class Descriptor extends BdkDescriptor { BigInt maxSatisfactionWeight({hint}) { try { return super.maxSatisfactionWeight(); - } on BdkError catch (e) { - throw mapBdkError(e); + } on DescriptorError catch (e) { + throw mapDescriptorError(e); + } on PanicException catch (e) { + throw DescriptorException(code: "Unknown", errorMessage: e.message); } } } ///An extended public key. -class DescriptorPublicKey extends BdkDescriptorPublicKey { - DescriptorPublicKey._({required super.ptr}); +class DescriptorPublicKey extends FfiDescriptorPublicKey { + DescriptorPublicKey._({required super.opaque}); /// [DescriptorPublicKey] constructor static Future fromString(String publicKey) async { try { await Api.initialize(); - final res = await BdkDescriptorPublicKey.fromString(publicKey: publicKey); - return DescriptorPublicKey._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapBdkError(e); + final res = await FfiDescriptorPublicKey.fromString(publicKey: publicKey); + return DescriptorPublicKey._(opaque: res.opaque); + } on DescriptorKeyError catch (e) { + throw mapDescriptorKeyError(e); + } on PanicException catch (e) { + throw DescriptorKeyException(code: "Unknown", errorMessage: e.message); } } @@ -501,10 +406,12 @@ class DescriptorPublicKey extends BdkDescriptorPublicKey { Future derive( {required DerivationPath path, hint}) async { try { - final res = await BdkDescriptorPublicKey.derive(ptr: this, path: path); - return DescriptorPublicKey._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapBdkError(e); + final res = await FfiDescriptorPublicKey.derive(opaque: this, path: path); + return DescriptorPublicKey._(opaque: res.opaque); + } on DescriptorKeyError catch (e) { + throw mapDescriptorKeyError(e); + } on PanicException catch (e) { + throw DescriptorKeyException(code: "Unknown", errorMessage: e.message); } } @@ -512,26 +419,30 @@ class DescriptorPublicKey extends BdkDescriptorPublicKey { Future extend( {required DerivationPath path, hint}) async { try { - final res = await BdkDescriptorPublicKey.extend(ptr: this, path: path); - return DescriptorPublicKey._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapBdkError(e); + final res = await FfiDescriptorPublicKey.extend(opaque: this, path: path); + return DescriptorPublicKey._(opaque: res.opaque); + } on DescriptorKeyError catch (e) { + throw mapDescriptorKeyError(e); + } on PanicException catch (e) { + throw DescriptorKeyException(code: "Unknown", errorMessage: e.message); } } } ///Script descriptor -class DescriptorSecretKey extends BdkDescriptorSecretKey { - DescriptorSecretKey._({required super.ptr}); +class DescriptorSecretKey extends FfiDescriptorSecretKey { + DescriptorSecretKey._({required super.opaque}); /// [DescriptorSecretKey] constructor static Future fromString(String secretKey) async { try { await Api.initialize(); - final res = await BdkDescriptorSecretKey.fromString(secretKey: secretKey); - return DescriptorSecretKey._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapBdkError(e); + final res = await FfiDescriptorSecretKey.fromString(secretKey: secretKey); + return DescriptorSecretKey._(opaque: res.opaque); + } on DescriptorKeyError catch (e) { + throw mapDescriptorKeyError(e); + } on PanicException catch (e) { + throw DescriptorKeyException(code: "Unknown", errorMessage: e.message); } } @@ -542,41 +453,49 @@ class DescriptorSecretKey extends BdkDescriptorSecretKey { String? password}) async { try { await Api.initialize(); - final res = await BdkDescriptorSecretKey.create( + final res = await FfiDescriptorSecretKey.create( network: network, mnemonic: mnemonic, password: password); - return DescriptorSecretKey._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapBdkError(e); + return DescriptorSecretKey._(opaque: res.opaque); + } on DescriptorError catch (e) { + throw mapDescriptorError(e); + } on PanicException catch (e) { + throw DescriptorKeyException(code: "Unknown", errorMessage: e.message); } } ///Derived the XPrv using the derivation path Future derive(DerivationPath path) async { try { - final res = await BdkDescriptorSecretKey.derive(ptr: this, path: path); - return DescriptorSecretKey._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapBdkError(e); + final res = await FfiDescriptorSecretKey.derive(opaque: this, path: path); + return DescriptorSecretKey._(opaque: res.opaque); + } on DescriptorKeyError catch (e) { + throw mapDescriptorKeyError(e); + } on PanicException catch (e) { + throw DescriptorKeyException(code: "Unknown", errorMessage: e.message); } } ///Extends the XPrv using the derivation path Future extend(DerivationPath path) async { try { - final res = await BdkDescriptorSecretKey.extend(ptr: this, path: path); - return DescriptorSecretKey._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapBdkError(e); + final res = await FfiDescriptorSecretKey.extend(opaque: this, path: path); + return DescriptorSecretKey._(opaque: res.opaque); + } on DescriptorKeyError catch (e) { + throw mapDescriptorKeyError(e); + } on PanicException catch (e) { + throw DescriptorKeyException(code: "Unknown", errorMessage: e.message); } } ///Returns the public version of this key. DescriptorPublicKey toPublic() { try { - final res = BdkDescriptorSecretKey.asPublic(ptr: this); - return DescriptorPublicKey._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapBdkError(e); + final res = FfiDescriptorSecretKey.asPublic(opaque: this); + return DescriptorPublicKey._(opaque: res.opaque); + } on DescriptorKeyError catch (e) { + throw mapDescriptorKeyError(e); + } on PanicException catch (e) { + throw DescriptorKeyException(code: "Unknown", errorMessage: e.message); } } @@ -591,15 +510,158 @@ class DescriptorSecretKey extends BdkDescriptorSecretKey { Uint8List secretBytes({hint}) { try { return super.secretBytes(); - } on BdkError catch (e) { - throw mapBdkError(e); + } on DescriptorKeyError catch (e) { + throw mapDescriptorKeyError(e); + } on PanicException catch (e) { + throw DescriptorKeyException(code: "Unknown", errorMessage: e.message); + } + } +} + +class EsploraClient extends FfiEsploraClient { + EsploraClient._({required super.opaque}); + + static Future create(String url) async { + try { + await Api.initialize(); + final res = await FfiEsploraClient.newInstance(url: url); + return EsploraClient._(opaque: res.opaque); + } on EsploraError catch (e) { + throw mapEsploraError(e); + } on PanicException catch (e) { + throw EsploraException(code: "Unknown", errorMessage: e.message); + } + } + + /// [EsploraClient] constructor for creating `Esplora` blockchain in `Mutinynet` + /// Esplora url: https://mutinynet.ltbl.io/api + static Future createMutinynet() async { + final client = await EsploraClient.create('https://mutinynet.ltbl.io/api'); + return client; + } + + /// [EsploraClient] constructor for creating `Esplora` blockchain in `Testnet` + /// Esplora url: https://testnet.ltbl.io/api + static Future createTestnet() async { + final client = await EsploraClient.create('https://testnet.ltbl.io/api'); + return client; + } + + Future broadcast({required Transaction transaction}) async { + try { + await FfiEsploraClient.broadcast(opaque: this, transaction: transaction); + return; + } on EsploraError catch (e) { + throw mapEsploraError(e); + } on PanicException catch (e) { + throw EsploraException(code: "Unknown", errorMessage: e.message); + } + } + + Future fullScan({ + required FullScanRequest request, + required BigInt stopGap, + required BigInt parallelRequests, + }) async { + try { + final res = await FfiEsploraClient.fullScan( + opaque: this, + request: request, + stopGap: stopGap, + parallelRequests: parallelRequests); + return Update._(field0: res.field0); + } on EsploraError catch (e) { + throw mapEsploraError(e); + } on PanicException catch (e) { + throw EsploraException(code: "Unknown", errorMessage: e.message); + } + } + + Future sync( + {required SyncRequest request, required BigInt parallelRequests}) async { + try { + final res = await FfiEsploraClient.sync_( + opaque: this, request: request, parallelRequests: parallelRequests); + return Update._(field0: res.field0); + } on EsploraError catch (e) { + throw mapEsploraError(e); + } on PanicException catch (e) { + throw EsploraException(code: "Unknown", errorMessage: e.message); + } + } +} + +class ElectrumClient extends FfiElectrumClient { + ElectrumClient._({required super.opaque}); + static Future create(String url) async { + try { + await Api.initialize(); + final res = await FfiElectrumClient.newInstance(url: url); + return ElectrumClient._(opaque: res.opaque); + } on ElectrumError catch (e) { + throw mapElectrumError(e); + } on PanicException catch (e) { + throw ElectrumException(code: "Unknown", errorMessage: e.message); + } + } + + Future broadcast({required Transaction transaction}) async { + try { + return await FfiElectrumClient.broadcast( + opaque: this, transaction: transaction); + } on ElectrumError catch (e) { + throw mapElectrumError(e); + } on PanicException catch (e) { + throw ElectrumException(code: "Unknown", errorMessage: e.message); + } + } + + Future fullScan({ + required FfiFullScanRequest request, + required BigInt stopGap, + required BigInt batchSize, + required bool fetchPrevTxouts, + }) async { + try { + final res = await FfiElectrumClient.fullScan( + opaque: this, + request: request, + stopGap: stopGap, + batchSize: batchSize, + fetchPrevTxouts: fetchPrevTxouts, + ); + return Update._(field0: res.field0); + } on ElectrumError catch (e) { + throw mapElectrumError(e); + } on PanicException catch (e) { + throw ElectrumException(code: "Unknown", errorMessage: e.message); + } + } + + Future sync({ + required SyncRequest request, + required BigInt batchSize, + required bool fetchPrevTxouts, + }) async { + try { + final res = await FfiElectrumClient.sync_( + opaque: this, + request: request, + batchSize: batchSize, + fetchPrevTxouts: fetchPrevTxouts, + ); + return Update._(field0: res.field0); + } on ElectrumError catch (e) { + throw mapElectrumError(e); + } on PanicException catch (e) { + throw ElectrumException(code: "Unknown", errorMessage: e.message); } } } ///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}); +class Mnemonic extends FfiMnemonic { + Mnemonic._({required super.opaque}); /// Generates [Mnemonic] with given [WordCount] /// @@ -607,10 +669,12 @@ class Mnemonic extends BdkMnemonic { 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 mapBdkError(e); + final res = await FfiMnemonic.newInstance(wordCount: wordCount); + return Mnemonic._(opaque: res.opaque); + } on Bip39Error catch (e) { + throw mapBip39Error(e); + } on PanicException catch (e) { + throw Bip39Exception(code: "Unknown", errorMessage: e.message); } } @@ -621,10 +685,12 @@ class Mnemonic extends BdkMnemonic { static Future fromEntropy(List entropy) async { try { await Api.initialize(); - final res = await BdkMnemonic.fromEntropy(entropy: entropy); - return Mnemonic._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapBdkError(e); + final res = await FfiMnemonic.fromEntropy(entropy: entropy); + return Mnemonic._(opaque: res.opaque); + } on Bip39Error catch (e) { + throw mapBip39Error(e); + } on PanicException catch (e) { + throw Bip39Exception(code: "Unknown", errorMessage: e.message); } } @@ -634,10 +700,12 @@ class Mnemonic extends BdkMnemonic { static Future fromString(String mnemonic) async { try { await Api.initialize(); - final res = await BdkMnemonic.fromString(mnemonic: mnemonic); - return Mnemonic._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapBdkError(e); + final res = await FfiMnemonic.fromString(mnemonic: mnemonic); + return Mnemonic._(opaque: res.opaque); + } on Bip39Error catch (e) { + throw mapBip39Error(e); + } on PanicException catch (e) { + throw Bip39Exception(code: "Unknown", errorMessage: e.message); } } @@ -649,49 +717,38 @@ class Mnemonic extends BdkMnemonic { } ///A Partially Signed Transaction -class PartiallySignedTransaction extends BdkPsbt { - PartiallySignedTransaction._({required super.ptr}); +class PSBT extends bitcoin.FfiPsbt { + PSBT._({required super.opaque}); - /// Parse a [PartiallySignedTransaction] with given Base64 string + /// Parse a [PSBT] with given Base64 string /// - /// [PartiallySignedTransaction] constructor - static Future fromString( - String psbtBase64) async { + /// [PSBT] constructor + static Future fromString(String psbtBase64) async { try { await Api.initialize(); - final res = await BdkPsbt.fromStr(psbtBase64: psbtBase64); - return PartiallySignedTransaction._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapBdkError(e); + final res = await bitcoin.FfiPsbt.fromStr(psbtBase64: psbtBase64); + return PSBT._(opaque: res.opaque); + } on PsbtParseError catch (e) { + throw mapPsbtParseError(e); + } on PanicException catch (e) { + throw PsbtException(code: "Unknown", errorMessage: e.message); } } ///Return fee amount @override BigInt? feeAmount({hint}) { - try { - return super.feeAmount(); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///Return fee rate - @override - FeeRate? feeRate({hint}) { - try { - return super.feeRate(); - } on BdkError catch (e) { - throw mapBdkError(e); - } + return super.feeAmount(); } @override String jsonSerialize({hint}) { try { return super.jsonSerialize(); - } on BdkError catch (e) { - throw mapBdkError(e); + } on PsbtError catch (e) { + throw mapPsbtError(e); + } on PanicException catch (e) { + throw PsbtException(code: "Unknown", errorMessage: e.message); } } @@ -703,80 +760,50 @@ class PartiallySignedTransaction extends BdkPsbt { ///Serialize as raw binary data @override Uint8List serialize({hint}) { - try { - return super.serialize(); - } on BdkError catch (e) { - throw mapBdkError(e); - } + return super.serialize(); } ///Return the transaction as bytes. Transaction extractTx() { try { - final res = BdkPsbt.extractTx(ptr: this); - return Transaction._(s: res.s); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///Combines this [PartiallySignedTransaction] with other PSBT as described by BIP 174. - Future combine( - PartiallySignedTransaction other) async { - try { - final res = await BdkPsbt.combine(ptr: this, other: other); - return PartiallySignedTransaction._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapBdkError(e); + final res = bitcoin.FfiPsbt.extractTx(opaque: this); + return Transaction._(opaque: res.opaque); + } on ExtractTxError catch (e) { + throw mapExtractTxError(e); + } on PanicException catch (e) { + throw ExtractTxException(code: "Unknown", errorMessage: e.message); } } - ///Returns the [PartiallySignedTransaction]'s transaction id - @override - String txid({hint}) { + ///Combines this [PSBT] with other PSBT as described by BIP 174. + Future combine(PSBT other) async { try { - return super.txid(); - } on BdkError catch (e) { - throw mapBdkError(e); + final res = await bitcoin.FfiPsbt.combine(opaque: this, other: other); + return PSBT._(opaque: res.opaque); + } on PsbtError catch (e) { + throw mapPsbtError(e); + } on PanicException catch (e) { + throw PsbtException(code: "Unknown", errorMessage: e.message); } } } ///Bitcoin script. -class ScriptBuf extends BdkScriptBuf { +class ScriptBuf extends bitcoin.FfiScriptBuf { /// [ScriptBuf] constructor ScriptBuf({required super.bytes}); ///Creates a new empty script. static Future empty() async { - try { - await Api.initialize(); - return ScriptBuf(bytes: BdkScriptBuf.empty().bytes); - } on BdkError catch (e) { - throw mapBdkError(e); - } + await Api.initialize(); + return ScriptBuf(bytes: bitcoin.FfiScriptBuf.empty().bytes); } ///Creates a new empty script with pre-allocated capacity. static Future withCapacity(BigInt capacity) async { - try { - await Api.initialize(); - final res = await BdkScriptBuf.withCapacity(capacity: capacity); - return ScriptBuf(bytes: res.bytes); - } on BdkError catch (e) { - throw mapBdkError(e); - } - } - - ///Creates a ScriptBuf from a hex string. - static Future fromHex(String s) async { - try { - await Api.initialize(); - final res = await BdkScriptBuf.fromHex(s: s); - return ScriptBuf(bytes: res.bytes); - } on BdkError catch (e) { - throw mapBdkError(e); - } + await Api.initialize(); + final res = await bitcoin.FfiScriptBuf.withCapacity(capacity: capacity); + return ScriptBuf(bytes: res.bytes); } @override @@ -786,28 +813,40 @@ class ScriptBuf extends BdkScriptBuf { } ///A bitcoin transaction. -class Transaction extends BdkTransaction { - Transaction._({required super.s}); +class Transaction extends bitcoin.FfiTransaction { + Transaction._({required super.opaque}); /// [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, + static Future create({ + required int version, + required LockTime lockTime, + required List input, + required List output, }) async { try { await Api.initialize(); - final res = - await BdkTransaction.fromBytes(transactionBytes: transactionBytes); - return Transaction._(s: res.s); - } on BdkError catch (e) { - throw mapBdkError(e); + final res = await bitcoin.FfiTransaction.newInstance( + version: version, lockTime: lockTime, input: input, output: output); + return Transaction._(opaque: res.opaque); + } on TransactionError catch (e) { + throw mapTransactionError(e); + } on PanicException catch (e) { + throw TransactionException(code: "Unknown", errorMessage: e.message); } } - @override - String toString() { - return s; + static Future fromBytes(List transactionByte) async { + try { + await Api.initialize(); + final res = await bitcoin.FfiTransaction.fromBytes( + transactionBytes: transactionByte); + return Transaction._(opaque: res.opaque); + } on TransactionError catch (e) { + throw mapTransactionError(e); + } on PanicException catch (e) { + throw TransactionException(code: "Unknown", errorMessage: e.message); + } } } @@ -816,18 +855,18 @@ class Transaction extends BdkTransaction { /// A TxBuilder is created by calling TxBuilder or BumpFeeTxBuilder on a wallet. /// After assigning it, you set options on it until finally calling finish to consume the builder and generate the transaction. class TxBuilder { - final List _recipients = []; + final List<(ScriptBuf, BigInt)> _recipients = []; final List _utxos = []; final List _unSpendable = []; - (OutPoint, Input, BigInt)? _foreignUtxo; bool _manuallySelectedOnly = false; - double? _feeRate; + FeeRate? _feeRate; ChangeSpendPolicy _changeSpendPolicy = ChangeSpendPolicy.changeAllowed; BigInt? _feeAbsolute; bool _drainWallet = false; ScriptBuf? _drainTo; RbfValue? _rbfValue; List _data = []; + (Map, KeychainKind)? _policyPath; ///Add data as an output, using OP_RETURN TxBuilder addData({required List data}) { @@ -837,7 +876,7 @@ class TxBuilder { ///Add a recipient to the internal list TxBuilder addRecipient(ScriptBuf script, BigInt amount) { - _recipients.add(ScriptAmount(script: script, amount: amount)); + _recipients.add((script, amount)); return this; } @@ -872,24 +911,6 @@ class TxBuilder { 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, BigInt satisfactionWeight) { - _foreignUtxo = (outPoint, psbtInput, satisfactionWeight); - return this; - } - ///Do not spend change outputs /// /// This effectively adds all the change outputs to the “unspendable” list. See TxBuilder().addUtxos @@ -944,19 +965,11 @@ class TxBuilder { } ///Set a custom fee rate - TxBuilder feeRate(double satPerVbyte) { + TxBuilder feeRate(FeeRate 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. @@ -974,6 +987,54 @@ class TxBuilder { return this; } + /// Set the policy path to use while creating the transaction for a given keychain. + /// + /// This method accepts a map where the key is the policy node id (see + /// policy.id()) and the value is the list of the indexes of + /// the items that are intended to be satisfied from the policy node + /// ## Example + /// + /// An example of when the policy path is needed is the following descriptor: + /// `wsh(thresh(2,pk(A),sj:and_v(v:pk(B),n:older(6)),snj:and_v(v:pk(C),after(630000))))`, + /// derived from the miniscript policy `thresh(2,pk(A),and(pk(B),older(6)),and(pk(C),after(630000)))`. + /// It declares three descriptor fragments, and at the top level it uses `thresh()` to + /// ensure that at least two of them are satisfied. The individual fragments are: + /// + /// 1. `pk(A)` + /// 2. `and(pk(B),older(6))` + /// 3. `and(pk(C),after(630000))` + /// + /// When those conditions are combined in pairs, it's clear that the transaction needs to be created + /// differently depending on how the user intends to satisfy the policy afterwards: + /// + /// * If fragments `1` and `2` are used, the transaction will need to use a specific + /// `n_sequence` in order to spend an `OP_CSV` branch. + /// * If fragments `1` and `3` are used, the transaction will need to use a specific `locktime` + /// in order to spend an `OP_CLTV` branch. + /// * If fragments `2` and `3` are used, the transaction will need both. + /// + /// When the spending policy is represented as a tree every node + /// is assigned a unique identifier that can be used in the policy path to specify which of + /// the node's children the user intends to satisfy: for instance, assuming the `thresh()` + /// root node of this example has an id of `aabbccdd`, the policy path map would look like: + /// + /// `{ "aabbccdd" => [0, 1] }` + /// + /// where the key is the node's id, and the value is a list of the children that should be + /// used, in no particular order. + /// + /// If a particularly complex descriptor has multiple ambiguous thresholds in its structure, + /// multiple entries can be added to the map, one for each node that requires an explicit path. + TxBuilder policyPath( + KeychainKind keychain, Map> policies) { + _policyPath = ( + policies.map((key, value) => + MapEntry(key, Uint64List.fromList(value.cast()))), + keychain + ); + return this; + } + ///Only spend change outputs /// /// This effectively adds all the non-change outputs to the “unspendable” list. @@ -984,19 +1045,15 @@ class TxBuilder { ///Finish building the transaction. /// - /// Returns a [PartiallySignedTransaction] & [TransactionDetails] + /// Returns a [PSBT] & [TransactionDetails] - Future<(PartiallySignedTransaction, TransactionDetails)> finish( - Wallet wallet) async { - if (_recipients.isEmpty && _drainTo == null) { - throw NoRecipientsException(); - } + Future finish(Wallet wallet) async { try { final res = await txBuilderFinish( wallet: wallet, + policyPath: _policyPath, recipients: _recipients, utxos: _utxos, - foreignUtxo: _foreignUtxo, unSpendable: _unSpendable, manuallySelectedOnly: _manuallySelectedOnly, drainWallet: _drainWallet, @@ -1007,9 +1064,11 @@ class TxBuilder { data: _data, changePolicy: _changeSpendPolicy); - return (PartiallySignedTransaction._(ptr: res.$1.ptr), res.$2); - } on BdkError catch (e) { - throw mapBdkError(e); + return PSBT._(opaque: res.opaque); + } on CreateTxError catch (e) { + throw mapCreateTxError(e); + } on PanicException catch (e) { + throw CreateTxException(code: "Unknown", errorMessage: e.message); } } } @@ -1019,193 +1078,298 @@ 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 BdkWallet { - Wallet._({required super.ptr}); +class Wallet extends FfiWallet { + Wallet._({required super.opaque}); /// [Wallet] constructor ///Create a wallet. - // The only way this can fail is if the descriptors passed in do not match the checksums in database. + // If you have previously created a wallet, use [Wallet.load] instead. static Future create({ required Descriptor descriptor, - Descriptor? changeDescriptor, + required Descriptor changeDescriptor, required Network network, - required DatabaseConfig databaseConfig, + required Connection connection, }) async { try { await Api.initialize(); - final res = await BdkWallet.newInstance( + final res = await FfiWallet.newInstance( descriptor: descriptor, changeDescriptor: changeDescriptor, network: network, - databaseConfig: databaseConfig, + connection: connection, ); - return Wallet._(ptr: res.ptr); - } on BdkError catch (e) { - throw mapBdkError(e); + return Wallet._(opaque: res.opaque); + } on CreateWithPersistError catch (e) { + throw mapCreateWithPersistError(e); + } on PanicException catch (e) { + throw CreateWithPersistException( + code: "Unknown", errorMessage: e.message); } } - /// Return a derived address using the external descriptor, see AddressIndex for available address index selection - /// strategies. If none of the keys in the descriptor are derivable (i.e. the descriptor does not end with a * character) - /// then the same address will always be returned for any AddressIndex. - AddressInfo getAddress({required AddressIndex addressIndex, hint}) { + static Future load({ + required Descriptor descriptor, + required Descriptor changeDescriptor, + required Connection connection, + }) async { try { - final res = BdkWallet.getAddress(ptr: this, addressIndex: addressIndex); - return AddressInfo(res.$2, Address._(ptr: res.$1.ptr)); - } on BdkError catch (e) { - throw mapBdkError(e); + await Api.initialize(); + final res = await FfiWallet.load( + descriptor: descriptor, + changeDescriptor: changeDescriptor, + connection: connection, + ); + return Wallet._(opaque: res.opaque); + } on CreateWithPersistError catch (e) { + throw mapCreateWithPersistError(e); + } on PanicException catch (e) { + throw CreateWithPersistException( + code: "Unknown", errorMessage: e.message); } } + /// Attempt to reveal the next address of the given `keychain`. + /// + /// This will increment the keychain's derivation index. If the keychain's descriptor doesn't + /// contain a wildcard or every address is already revealed up to the maximum derivation + /// index defined in [BIP32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki), + /// then the last revealed address will be returned. + AddressInfo revealNextAddress({required KeychainKind keychainKind}) { + final res = + FfiWallet.revealNextAddress(opaque: this, keychainKind: keychainKind); + return AddressInfo(res.index, Address._(field0: res.address.field0)); + } + /// Return the balance, meaning the sum of this wallet’s unspent outputs’ values. Note that this method only operates /// on the internal database, which first needs to be Wallet.sync manually. @override Balance getBalance({hint}) { + return super.getBalance(); + } + + /// Iterate over the transactions in the wallet. + @override + List transactions() { + final res = super.transactions(); + return res + .map((e) => CanonicalTx._( + transaction: e.transaction, chainPosition: e.chainPosition)) + .toList(); + } + + @override + CanonicalTx? getTx({required String txid}) { + final res = super.getTx(txid: txid); + if (res == null) return null; + return CanonicalTx._( + transaction: res.transaction, chainPosition: res.chainPosition); + } + + /// 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. + @override + List listUnspent({hint}) { + return super.listUnspent(); + } + + ///List all relevant outputs (includes both spent and unspent, confirmed and unconfirmed). + @override + List listOutput() { + return super.listOutput(); + } + + ///Return the spending policies for the wallet's descriptor + Policy? policies(KeychainKind keychainKind) { + final res = FfiWallet.policies(opaque: this, keychainKind: keychainKind); + if (res == null) return null; + return Policy._(opaque: res.opaque); + } + + /// 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 PSBT psbt, SignOptions? signOptions}) async { try { - return super.getBalance(); - } on BdkError catch (e) { - throw mapBdkError(e); + final res = await FfiWallet.sign( + opaque: this, + psbt: psbt, + signOptions: signOptions ?? + SignOptions( + trustWitnessUtxo: false, + allowAllSighashes: false, + tryFinalize: true, + signWithTapInternalKey: true, + allowGrinding: true)); + return res; + } on SignerError catch (e) { + throw mapSignerError(e); + } on PanicException catch (e) { + throw SignerException(code: "Unknown", errorMessage: e.message); } } - ///Returns the descriptor used to create addresses for a particular keychain. - Future getDescriptorForKeychain( - {required KeychainKind keychain, hint}) async { + Future calculateFee({required Transaction tx}) async { try { - final res = - BdkWallet.getDescriptorForKeychain(ptr: this, keychain: keychain); - return Descriptor._( - extendedDescriptor: res.extendedDescriptor, keyMap: res.keyMap); - } on BdkError catch (e) { - throw mapBdkError(e); + final res = await FfiWallet.calculateFee(opaque: this, tx: tx); + return res; + } on CalculateFeeError catch (e) { + throw mapCalculateFeeError(e); + } on PanicException catch (e) { + throw CalculateFeeException(code: "Unknown", errorMessage: e.message); } } - /// Return a derived address using the internal (change) descriptor. - /// - /// If the wallet doesn't have an internal descriptor it will use the external descriptor. - /// - /// see [AddressIndex] for available address index selection strategies. If none of the keys - /// in the descriptor are derivable (i.e. does not end with /*) then the same address will always - /// be returned for any [AddressIndex]. - - AddressInfo getInternalAddress({required AddressIndex addressIndex, hint}) { + Future calculateFeeRate({required Transaction tx}) async { try { - final res = - BdkWallet.getInternalAddress(ptr: this, addressIndex: addressIndex); - return AddressInfo(res.$2, Address._(ptr: res.$1.ptr)); - } on BdkError catch (e) { - throw mapBdkError(e); + final res = await FfiWallet.calculateFeeRate(opaque: this, tx: tx); + return res; + } on CalculateFeeError catch (e) { + throw mapCalculateFeeError(e); + } on PanicException catch (e) { + throw CalculateFeeException(code: "Unknown", errorMessage: e.message); } } - ///get the corresponding PSBT Input for a LocalUtxo @override - Future getPsbtInput( - {required LocalUtxo utxo, - required bool onlyWitnessUtxo, - PsbtSigHashType? sighashType, - hint}) async { + Future startFullScan() async { + final res = await super.startFullScan(); + return FullScanRequestBuilder._(field0: res.field0); + } + + @override + Future startSyncWithRevealedSpks() async { + final res = await super.startSyncWithRevealedSpks(); + return SyncRequestBuilder._(field0: res.field0); + } + + Future persist({required Connection connection}) async { try { - return super.getPsbtInput( - utxo: utxo, - onlyWitnessUtxo: onlyWitnessUtxo, - sighashType: sighashType); - } on BdkError catch (e) { - throw mapBdkError(e); + final res = await FfiWallet.persist(opaque: this, connection: connection); + return res; + } on SqliteError catch (e) { + throw mapSqliteError(e); + } on PanicException catch (e) { + throw SqliteException(code: "Unknown", errorMessage: e.message); } } +} - /// Return whether or not a script is part of this wallet (either internal or external). +class SyncRequestBuilder extends FfiSyncRequestBuilder { + SyncRequestBuilder._({required super.field0}); @override - bool isMine({required BdkScriptBuf script, hint}) { + Future inspectSpks( + {required FutureOr Function(ScriptBuf script, SyncProgress progress) + inspector}) async { try { - return super.isMine(script: script); - } on BdkError catch (e) { - throw mapBdkError(e); + final res = await super.inspectSpks( + inspector: (script, progress) => + inspector(ScriptBuf(bytes: script.bytes), progress)); + return SyncRequestBuilder._(field0: res.field0); + } on RequestBuilderError catch (e) { + throw mapRequestBuilderError(e); + } on PanicException catch (e) { + throw RequestBuilderException(code: "Unknown", errorMessage: e.message); } } - /// Return the list of transactions made and received by the wallet. Note that this method only operate on the internal database, which first needs to be [Wallet.sync] manually. @override - List listTransactions({required bool includeRaw, hint}) { + Future build() async { try { - return super.listTransactions(includeRaw: includeRaw); - } on BdkError catch (e) { - throw mapBdkError(e); + final res = await super.build(); + return SyncRequest._(field0: res.field0); + } on RequestBuilderError catch (e) { + throw mapRequestBuilderError(e); + } on PanicException catch (e) { + throw RequestBuilderException(code: "Unknown", errorMessage: e.message); } } +} - /// 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 +class SyncRequest extends FfiSyncRequest { + SyncRequest._({required super.field0}); +} + +class FullScanRequestBuilder extends FfiFullScanRequestBuilder { + FullScanRequestBuilder._({required super.field0}); @override - List listUnspent({hint}) { + Future inspectSpksForAllKeychains( + {required FutureOr Function( + KeychainKind keychain, int index, ScriptBuf script) + inspector}) async { try { - return super.listUnspent(); - } on BdkError catch (e) { - throw mapBdkError(e); + await Api.initialize(); + final res = await super.inspectSpksForAllKeychains( + inspector: (keychain, index, script) => + inspector(keychain, index, ScriptBuf(bytes: script.bytes))); + return FullScanRequestBuilder._(field0: res.field0); + } on RequestBuilderError catch (e) { + throw mapRequestBuilderError(e); + } on PanicException catch (e) { + throw RequestBuilderException(code: "Unknown", errorMessage: e.message); } } - /// Get the Bitcoin network the wallet is using. @override - Network network({hint}) { + Future build() async { try { - return super.network(); - } on BdkError catch (e) { - throw mapBdkError(e); + final res = await super.build(); + return FullScanRequest._(field0: res.field0); + } on RequestBuilderError catch (e) { + throw mapRequestBuilderError(e); + } on PanicException catch (e) { + throw RequestBuilderException(code: "Unknown", errorMessage: e.message); } } +} - /// 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 { +class FullScanRequest extends FfiFullScanRequest { + FullScanRequest._({required super.field0}); +} + +class Connection extends FfiConnection { + Connection._({required super.field0}); + + static Future createInMemory() async { try { - final res = - await BdkWallet.sign(ptr: this, psbt: psbt, signOptions: signOptions); - return res; - } on BdkError catch (e) { - throw mapBdkError(e); + await Api.initialize(); + final res = await FfiConnection.newInMemory(); + return Connection._(field0: res.field0); + } on SqliteError catch (e) { + throw mapSqliteError(e); + } on PanicException catch (e) { + throw SqliteException(code: "Unknown", errorMessage: e.message); } } - /// Sync the internal database with the blockchain. - - Future sync({required Blockchain blockchain, hint}) async { + static Future create(String path) async { try { - final res = await BdkWallet.sync(ptr: this, blockchain: blockchain); - return res; - } on BdkError catch (e) { - throw mapBdkError(e); + await Api.initialize(); + final res = await FfiConnection.newInstance(path: path); + return Connection._(field0: res.field0); + } on SqliteError catch (e) { + throw mapSqliteError(e); + } on PanicException catch (e) { + throw SqliteException(code: "Unknown", errorMessage: e.message); } } +} - /// Verify a transaction against the consensus rules - /// - /// This function uses `bitcoinconsensus` to verify transactions by fetching the required data - /// from the Wallet Database or using the [`Blockchain`]. - /// - /// Depending on the capabilities of the - /// [Blockchain] backend, the method could fail when called with old "historical" transactions or - /// with unconfirmed transactions that have been evicted from the backend's memory. - /// Make sure you sync the wallet to get the optimal results. - // Future verifyTx({required Transaction tx}) async { - // try { - // await BdkWallet.verifyTx(ptr: this, tx: tx); - // } on BdkError catch (e) { - // throw mapBdkError(e); - // } - // } +class CanonicalTx extends FfiCanonicalTx { + CanonicalTx._({required super.transaction, required super.chainPosition}); + @override + Transaction get transaction { + return Transaction._(opaque: super.transaction.opaque); + } +} + +class Update extends FfiUpdate { + Update._({required super.field0}); } ///A derived address and the index it was found at For convenience this automatically derefs to Address @@ -1218,3 +1382,27 @@ class AddressInfo { AddressInfo(this.index, this.address); } + +class TxIn extends bitcoin.TxIn { + TxIn( + {required super.previousOutput, + required super.scriptSig, + required super.sequence, + required super.witness}); +} + +///A transaction output, which defines new coins to be created from old ones. +class TxOut extends bitcoin.TxOut { + TxOut({required super.value, required ScriptBuf scriptPubkey}) + : super(scriptPubkey: scriptPubkey); +} + +class Policy extends FfiPolicy { + Policy._({required super.opaque}); + + ///Identifier for this policy node + @override + String id() { + return super.id(); + } +} diff --git a/lib/src/utils/exceptions.dart b/lib/src/utils/exceptions.dart index 05ae163d..05fb46b0 100644 --- a/lib/src/utils/exceptions.dart +++ b/lib/src/utils/exceptions.dart @@ -1,459 +1,612 @@ -import '../generated/api/error.dart'; +import 'package:bdk_flutter/src/generated/api/error.dart'; abstract class BdkFfiException implements Exception { - String? message; - BdkFfiException({this.message}); + String? errorMessage; + String code; + BdkFfiException({this.errorMessage, required this.code}); @override - String toString() => - (message != null) ? '$runtimeType( $message )' : runtimeType.toString(); + String toString() => (errorMessage != null) + ? '$runtimeType( code:$code, error:$errorMessage )' + : '$runtimeType( code:$code )'; } -/// 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 parsing an address +class AddressParseException extends BdkFfiException { + /// Constructs the [AddressParseException] + AddressParseException({super.errorMessage, required super.code}); } -/// 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}); +Exception mapAddressParseError(AddressParseError error) { + return error.when( + base58: () => AddressParseException( + code: "Base58", errorMessage: "base58 address encoding error"), + bech32: () => AddressParseException( + code: "Bech32", errorMessage: "bech32 address encoding error"), + witnessVersion: (e) => AddressParseException( + code: "WitnessVersion", + errorMessage: "witness version conversion/parsing error:$e"), + witnessProgram: (e) => AddressParseException( + code: "WitnessProgram", errorMessage: "witness program error:$e"), + unknownHrp: () => AddressParseException( + code: "UnknownHrp", errorMessage: "tried to parse an unknown hrp"), + legacyAddressTooLong: () => AddressParseException( + code: "LegacyAddressTooLong", + errorMessage: "legacy address base58 string"), + invalidBase58PayloadLength: () => AddressParseException( + code: "InvalidBase58PayloadLength", + errorMessage: "legacy address base58 data"), + invalidLegacyPrefix: () => AddressParseException( + code: "InvalidLegacyPrefix", + errorMessage: "segwit address bech32 string"), + networkValidation: () => AddressParseException(code: "NetworkValidation"), + otherAddressParseErr: () => + AddressParseException(code: "OtherAddressParseErr")); } 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}); + Bip32Exception({super.errorMessage, required super.code}); } -///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 mapBip32Error(Bip32Error error) { + return error.when( + cannotDeriveFromHardenedKey: () => + Bip32Exception(code: "CannotDeriveFromHardenedKey"), + secp256K1: (e) => Bip32Exception(code: "Secp256k1", errorMessage: e), + invalidChildNumber: (e) => Bip32Exception( + code: "InvalidChildNumber", errorMessage: "invalid child number: $e"), + invalidChildNumberFormat: () => + Bip32Exception(code: "InvalidChildNumberFormat"), + invalidDerivationPathFormat: () => + Bip32Exception(code: "InvalidDerivationPathFormat"), + unknownVersion: (e) => + Bip32Exception(code: "UnknownVersion", errorMessage: e), + wrongExtendedKeyLength: (e) => Bip32Exception( + code: "WrongExtendedKeyLength", errorMessage: e.toString()), + base58: (e) => Bip32Exception(code: "Base58", errorMessage: e), + hex: (e) => + Bip32Exception(code: "HexadecimalConversion", errorMessage: e), + invalidPublicKeyHexLength: (e) => + Bip32Exception(code: "InvalidPublicKeyHexLength", errorMessage: "$e"), + unknownError: (e) => + Bip32Exception(code: "UnknownError", errorMessage: e)); } -/// 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}); +class Bip39Exception extends BdkFfiException { + /// Constructs the [Bip39Exception] + Bip39Exception({super.errorMessage, required super.code}); } -///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 mapBip39Error(Bip39Error error) { + return error.when( + badWordCount: (e) => Bip39Exception( + code: "BadWordCount", + errorMessage: "the word count ${e.toString()} is not supported"), + unknownWord: (e) => Bip39Exception( + code: "UnknownWord", + errorMessage: "unknown word at index ${e.toString()} "), + badEntropyBitCount: (e) => Bip39Exception( + code: "BadEntropyBitCount", + errorMessage: "entropy bit count ${e.toString()} is invalid"), + invalidChecksum: () => Bip39Exception(code: "InvalidChecksum"), + ambiguousLanguages: (e) => Bip39Exception( + code: "AmbiguousLanguages", + errorMessage: "ambiguous languages detected: ${e.toString()}"), + generic: (e) => Bip39Exception(code: "Unknown"), + ); } -///Exception thrown when trying to bump a transaction that is already confirmed -class TransactionNotFoundException extends BdkFfiException { - /// Constructs the [TransactionNotFoundException] - TransactionNotFoundException({super.message}); +class CalculateFeeException extends BdkFfiException { + /// Constructs the [ CalculateFeeException] + CalculateFeeException({super.errorMessage, required super.code}); } -///Exception thrown when node doesn’t have data to estimate a fee rate -class FeeRateUnavailableException extends BdkFfiException { - /// Constructs the [FeeRateUnavailableException] - FeeRateUnavailableException({super.message}); +CalculateFeeException mapCalculateFeeError(CalculateFeeError error) { + return error.when( + generic: (e) => + CalculateFeeException(code: "Unknown", errorMessage: e.toString()), + missingTxOut: (e) => CalculateFeeException( + code: "MissingTxOut", + errorMessage: "missing transaction output: ${e.toString()}"), + negativeFee: (e) => CalculateFeeException( + code: "NegativeFee", errorMessage: "value: ${e.toString()}"), + ); } -///Exception thrown when the descriptor checksum mismatch -class ChecksumMismatchException extends BdkFfiException { - /// Constructs the [ChecksumMismatchException] - ChecksumMismatchException({super.message}); +class CannotConnectException extends BdkFfiException { + /// Constructs the [ CannotConnectException] + CannotConnectException({super.errorMessage, required super.code}); } -///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}); +CannotConnectException mapCannotConnectError(CannotConnectError error) { + return error.when( + include: (e) => CannotConnectException( + code: "Include", + errorMessage: "cannot include height: ${e.toString()}"), + ); } -///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}); +class CreateTxException extends BdkFfiException { + /// Constructs the [ CreateTxException] + CreateTxException({super.errorMessage, required super.code}); } -///Exception thrown when bumping a tx, the fee rate requested is lower than required -class FeeRateTooLowException extends BdkFfiException { - /// Constructs the [FeeRateTooLowException] - FeeRateTooLowException({super.message}); +CreateTxException mapCreateTxError(CreateTxError error) { + return error.when( + generic: (e) => + CreateTxException(code: "Unknown", errorMessage: e.toString()), + descriptor: (e) => + CreateTxException(code: "Descriptor", errorMessage: e.toString()), + policy: (e) => + CreateTxException(code: "Policy", errorMessage: e.toString()), + spendingPolicyRequired: (e) => CreateTxException( + code: "SpendingPolicyRequired", + errorMessage: "spending policy required for: ${e.toString()}"), + version0: () => CreateTxException( + code: "Version0", errorMessage: "unsupported version 0"), + version1Csv: () => CreateTxException( + code: "Version1Csv", errorMessage: "unsupported version 1 with csv"), + lockTime: (requested, required) => CreateTxException( + code: "LockTime", + errorMessage: + "lock time conflict: requested $requested, but required $required"), + rbfSequence: () => CreateTxException( + code: "RbfSequence", + errorMessage: "transaction requires rbf sequence number"), + rbfSequenceCsv: (rbf, csv) => CreateTxException( + code: "RbfSequenceCsv", + errorMessage: "rbf sequence: $rbf, csv sequence: $csv"), + feeTooLow: (e) => CreateTxException( + code: "FeeTooLow", + errorMessage: "fee too low: required ${e.toString()}"), + feeRateTooLow: (e) => CreateTxException( + code: "FeeRateTooLow", + errorMessage: "fee rate too low: ${e.toString()}"), + noUtxosSelected: () => CreateTxException( + code: "NoUtxosSelected", + errorMessage: "no utxos selected for the transaction"), + outputBelowDustLimit: (e) => CreateTxException( + code: "OutputBelowDustLimit", + errorMessage: "output value below dust limit at index $e"), + changePolicyDescriptor: () => CreateTxException( + code: "ChangePolicyDescriptor", + errorMessage: "change policy descriptor error"), + coinSelection: (e) => CreateTxException( + code: "CoinSelectionFailed", errorMessage: e.toString()), + insufficientFunds: (needed, available) => CreateTxException( + code: "InsufficientFunds", + errorMessage: + "insufficient funds: needed $needed sat, available $available sat"), + noRecipients: () => CreateTxException( + code: "NoRecipients", errorMessage: "transaction has no recipients"), + psbt: (e) => CreateTxException( + code: "Psbt", + errorMessage: "spending policy required for: ${e.toString()}"), + missingKeyOrigin: (e) => CreateTxException( + code: "MissingKeyOrigin", + errorMessage: "missing key origin for: ${e.toString()}"), + unknownUtxo: (e) => CreateTxException( + code: "UnknownUtxo", + errorMessage: "reference to an unknown utxo: ${e.toString()}"), + missingNonWitnessUtxo: (e) => CreateTxException( + code: "MissingNonWitnessUtxo", + errorMessage: "missing non-witness utxo for outpoint:${e.toString()}"), + miniscriptPsbt: (e) => + CreateTxException(code: "MiniscriptPsbt", errorMessage: e.toString()), + transactionNotFound: (e) => CreateTxException( + code: "TransactionNotFound", + errorMessage: "transaction: $e is not found in the internal database"), + transactionConfirmed: (e) => CreateTxException( + code: "TransactionConfirmed", + errorMessage: "transaction: $e that is already confirmed"), + irreplaceableTransaction: (e) => CreateTxException( + code: "IrreplaceableTransaction", + errorMessage: + "trying to replace a transaction: $e that has a sequence >= `0xFFFFFFFE`"), + feeRateUnavailable: () => CreateTxException( + code: "FeeRateUnavailable", + errorMessage: "node doesn't have data to estimate a fee rate"), + ); } -///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}); +class CreateWithPersistException extends BdkFfiException { + /// Constructs the [ CreateWithPersistException] + CreateWithPersistException({super.errorMessage, required super.code}); } -///Sled database error -class SledException extends BdkFfiException { - /// Constructs the [SledException] - SledException({super.message}); +CreateWithPersistException mapCreateWithPersistError( + CreateWithPersistError error) { + return error.when( + persist: (e) => CreateWithPersistException( + code: "SqlitePersist", errorMessage: e.toString()), + dataAlreadyExists: () => CreateWithPersistException( + code: "DataAlreadyExists", + errorMessage: "the wallet has already been created"), + descriptor: (e) => CreateWithPersistException( + code: "Descriptor", + errorMessage: + "the loaded changeset cannot construct wallet: ${e.toString()}")); } -///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}); + /// Constructs the [ DescriptorException] + DescriptorException({super.errorMessage, required super.code}); } -///Exception thrown when trying to bump a transaction that is already confirmed -class TransactionConfirmedException extends BdkFfiException { - /// Constructs the [TransactionConfirmedException] - TransactionConfirmedException({super.message}); +DescriptorException mapDescriptorError(DescriptorError error) { + return error.when( + invalidHdKeyPath: () => DescriptorException(code: "InvalidHdKeyPath"), + missingPrivateData: () => DescriptorException( + code: "MissingPrivateData", + errorMessage: "the extended key does not contain private data"), + invalidDescriptorChecksum: () => DescriptorException( + code: "InvalidDescriptorChecksum", + errorMessage: "the provided descriptor doesn't match its checksum"), + hardenedDerivationXpub: () => DescriptorException( + code: "HardenedDerivationXpub", + errorMessage: + "the descriptor contains hardened derivation steps on public extended keys"), + multiPath: () => DescriptorException( + code: "MultiPath", + errorMessage: + "the descriptor contains multipath keys, which are not supported yet"), + key: (e) => DescriptorException(code: "Key", errorMessage: e), + generic: (e) => DescriptorException(code: "Unknown", errorMessage: e), + policy: (e) => DescriptorException(code: "Policy", errorMessage: e), + invalidDescriptorCharacter: (e) => DescriptorException( + code: "InvalidDescriptorCharacter", + errorMessage: "invalid descriptor character: $e"), + bip32: (e) => DescriptorException(code: "Bip32", errorMessage: e), + base58: (e) => DescriptorException(code: "Base58", errorMessage: e), + pk: (e) => DescriptorException(code: "PrivateKey", errorMessage: e), + miniscript: (e) => + DescriptorException(code: "Miniscript", errorMessage: e), + hex: (e) => DescriptorException(code: "HexDecoding", errorMessage: e), + externalAndInternalAreTheSame: () => DescriptorException( + code: "ExternalAndInternalAreTheSame", + errorMessage: "external and internal descriptors are the same")); +} + +class DescriptorKeyException extends BdkFfiException { + /// Constructs the [ DescriptorKeyException] + DescriptorKeyException({super.errorMessage, required super.code}); +} + +DescriptorKeyException mapDescriptorKeyError(DescriptorKeyError error) { + return error.when( + parse: (e) => + DescriptorKeyException(code: "ParseFailed", errorMessage: e), + invalidKeyType: () => DescriptorKeyException( + code: "InvalidKeyType", + ), + bip32: (e) => DescriptorKeyException(code: "Bip32", errorMessage: e)); } class ElectrumException extends BdkFfiException { - /// Constructs the [ElectrumException] - ElectrumException({super.message}); + /// Constructs the [ ElectrumException] + ElectrumException({super.errorMessage, required super.code}); } -class RpcException extends BdkFfiException { - /// Constructs the [RpcException] - RpcException({super.message}); -} - -class RusqliteException extends BdkFfiException { - /// Constructs the [RusqliteException] - RusqliteException({super.message}); +ElectrumException mapElectrumError(ElectrumError error) { + return error.when( + ioError: (e) => ElectrumException(code: "IoError", errorMessage: e), + json: (e) => ElectrumException(code: "Json", errorMessage: e), + hex: (e) => ElectrumException(code: "Hex", errorMessage: e), + protocol: (e) => + ElectrumException(code: "ElectrumProtocol", errorMessage: e), + bitcoin: (e) => ElectrumException(code: "Bitcoin", errorMessage: e), + alreadySubscribed: () => ElectrumException( + code: "AlreadySubscribed", + errorMessage: + "already subscribed to the notifications of an address"), + notSubscribed: () => ElectrumException( + code: "NotSubscribed", + errorMessage: "not subscribed to the notifications of an address"), + invalidResponse: (e) => ElectrumException( + code: "InvalidResponse", + errorMessage: + "error during the deserialization of a response from the server: $e"), + message: (e) => ElectrumException(code: "Message", errorMessage: e), + invalidDnsNameError: (e) => ElectrumException( + code: "InvalidDNSNameError", + errorMessage: "invalid domain name $e not matching SSL certificate"), + missingDomain: () => ElectrumException( + code: "MissingDomain", + errorMessage: + "missing domain while it was explicitly asked to validate it"), + allAttemptsErrored: () => ElectrumException( + code: "AllAttemptsErrored", + errorMessage: "made one or multiple attempts, all errored"), + sharedIoError: (e) => + ElectrumException(code: "SharedIOError", errorMessage: e), + couldntLockReader: () => ElectrumException( + code: "CouldntLockReader", + errorMessage: + "couldn't take a lock on the reader mutex. This means that there's already another reader thread is running"), + mpsc: () => ElectrumException( + code: "Mpsc", + errorMessage: + "broken IPC communication channel: the other thread probably has exited"), + couldNotCreateConnection: (e) => + ElectrumException(code: "CouldNotCreateConnection", errorMessage: e), + requestAlreadyConsumed: () => + ElectrumException(code: "RequestAlreadyConsumed")); } -class InvalidNetworkException extends BdkFfiException { - /// Constructs the [InvalidNetworkException] - InvalidNetworkException({super.message}); +class EsploraException extends BdkFfiException { + /// Constructs the [ EsploraException] + EsploraException({super.errorMessage, required super.code}); } -class JsonException extends BdkFfiException { - /// Constructs the [JsonException] - JsonException({super.message}); +EsploraException mapEsploraError(EsploraError error) { + return error.when( + minreq: (e) => EsploraException(code: "Minreq", errorMessage: e), + httpResponse: (s, e) => EsploraException( + code: "HttpResponse", + errorMessage: "http error with status code $s and message $e"), + parsing: (e) => EsploraException(code: "ParseFailed", errorMessage: e), + statusCode: (e) => EsploraException( + code: "StatusCode", + errorMessage: "invalid status code, unable to convert to u16: $e"), + bitcoinEncoding: (e) => + EsploraException(code: "BitcoinEncoding", errorMessage: e), + hexToArray: (e) => EsploraException( + code: "HexToArrayFailed", + errorMessage: "invalid hex data returned: $e"), + hexToBytes: (e) => EsploraException( + code: "HexToBytesFailed", + errorMessage: "invalid hex data returned: $e"), + transactionNotFound: () => EsploraException(code: "TransactionNotFound"), + headerHeightNotFound: (e) => EsploraException( + code: "HeaderHeightNotFound", + errorMessage: "header height $e not found"), + headerHashNotFound: () => EsploraException(code: "HeaderHashNotFound"), + invalidHttpHeaderName: (e) => EsploraException( + code: "InvalidHttpHeaderName", errorMessage: "header name: $e"), + invalidHttpHeaderValue: (e) => EsploraException( + code: "InvalidHttpHeaderValue", errorMessage: "header value: $e"), + requestAlreadyConsumed: () => EsploraException( + code: "RequestAlreadyConsumed", + errorMessage: "the request has already been consumed")); +} + +class ExtractTxException extends BdkFfiException { + /// Constructs the [ ExtractTxException] + ExtractTxException({super.errorMessage, required super.code}); +} + +ExtractTxException mapExtractTxError(ExtractTxError error) { + return error.when( + absurdFeeRate: (e) => ExtractTxException( + code: "AbsurdFeeRate", + errorMessage: + "an absurdly high fee rate of ${e.toString()} sat/vbyte"), + missingInputValue: () => ExtractTxException( + code: "MissingInputValue", + errorMessage: + "one of the inputs lacked value information (witness_utxo or non_witness_utxo)"), + sendingTooMuch: () => ExtractTxException( + code: "SendingTooMuch", + errorMessage: + "transaction would be invalid due to output value being greater than input value"), + otherExtractTxErr: () => ExtractTxException( + code: "OtherExtractTxErr", errorMessage: "non-exhaustive error")); +} + +class FromScriptException extends BdkFfiException { + /// Constructs the [ FromScriptException] + FromScriptException({super.errorMessage, required super.code}); +} + +FromScriptException mapFromScriptError(FromScriptError error) { + return error.when( + unrecognizedScript: () => FromScriptException( + code: "UnrecognizedScript", + errorMessage: "script is not a p2pkh, p2sh or witness program"), + witnessProgram: (e) => + FromScriptException(code: "WitnessProgram", errorMessage: e), + witnessVersion: (e) => FromScriptException( + code: "WitnessVersionConstructionFailed", errorMessage: e), + otherFromScriptErr: () => FromScriptException( + code: "OtherFromScriptErr", + ), + ); } -class HexException extends BdkFfiException { - /// Constructs the [HexException] - HexException({super.message}); +class RequestBuilderException extends BdkFfiException { + /// Constructs the [ RequestBuilderException] + RequestBuilderException({super.errorMessage, required super.code}); } -class AddressException extends BdkFfiException { - /// Constructs the [AddressException] - AddressException({super.message}); +RequestBuilderException mapRequestBuilderError(RequestBuilderError error) { + return RequestBuilderException(code: "RequestAlreadyConsumed"); } -class ConsensusException extends BdkFfiException { - /// Constructs the [ConsensusException] - ConsensusException({super.message}); +class LoadWithPersistException extends BdkFfiException { + /// Constructs the [ LoadWithPersistException] + LoadWithPersistException({super.errorMessage, required super.code}); } -class Bip39Exception extends BdkFfiException { - /// Constructs the [Bip39Exception] - Bip39Exception({super.message}); +LoadWithPersistException mapLoadWithPersistError(LoadWithPersistError error) { + return error.when( + persist: (e) => LoadWithPersistException( + errorMessage: e, code: "SqlitePersistenceFailed"), + invalidChangeSet: (e) => LoadWithPersistException( + errorMessage: "the loaded changeset cannot construct wallet: $e", + code: "InvalidChangeSet"), + couldNotLoad: () => + LoadWithPersistException(code: "CouldNotLoadConnection")); } -class InvalidTransactionException extends BdkFfiException { - /// Constructs the [InvalidTransactionException] - InvalidTransactionException({super.message}); +class PersistenceException extends BdkFfiException { + /// Constructs the [ PersistenceException] + PersistenceException({super.errorMessage, required super.code}); } -class InvalidLockTimeException extends BdkFfiException { - /// Constructs the [InvalidLockTimeException] - InvalidLockTimeException({super.message}); +class PsbtException extends BdkFfiException { + /// Constructs the [ PsbtException] + PsbtException({super.errorMessage, required super.code}); } -class InvalidInputException extends BdkFfiException { - /// Constructs the [InvalidInputException] - InvalidInputException({super.message}); +PsbtException mapPsbtError(PsbtError error) { + return error.when( + invalidMagic: () => PsbtException(code: "InvalidMagic"), + missingUtxo: () => PsbtException( + code: "MissingUtxo", + errorMessage: "UTXO information is not present in PSBT"), + invalidSeparator: () => PsbtException(code: "InvalidSeparator"), + psbtUtxoOutOfBounds: () => PsbtException( + code: "PsbtUtxoOutOfBounds", + errorMessage: + "output index is out of bounds of non witness script output array"), + invalidKey: (e) => PsbtException(code: "InvalidKey", errorMessage: e), + invalidProprietaryKey: () => PsbtException( + code: "InvalidProprietaryKey", + errorMessage: + "non-proprietary key type found when proprietary key was expected"), + duplicateKey: (e) => PsbtException(code: "DuplicateKey", errorMessage: e), + unsignedTxHasScriptSigs: () => PsbtException( + code: "UnsignedTxHasScriptSigs", + errorMessage: "the unsigned transaction has script sigs"), + unsignedTxHasScriptWitnesses: () => PsbtException( + code: "UnsignedTxHasScriptWitnesses", + errorMessage: "the unsigned transaction has script witnesses"), + mustHaveUnsignedTx: () => PsbtException( + code: "MustHaveUnsignedTx", + errorMessage: + "partially signed transactions must have an unsigned transaction"), + noMorePairs: () => PsbtException( + code: "NoMorePairs", + errorMessage: "no more key-value pairs for this psbt map"), + unexpectedUnsignedTx: () => PsbtException( + code: "UnexpectedUnsignedTx", + errorMessage: "different unsigned transaction"), + nonStandardSighashType: (e) => PsbtException( + code: "NonStandardSighashType", errorMessage: e.toString()), + invalidHash: (e) => PsbtException( + code: "InvalidHash", + errorMessage: "invalid hash when parsing slice: $e"), + invalidPreimageHashPair: () => + PsbtException(code: "InvalidPreimageHashPair"), + combineInconsistentKeySources: (e) => PsbtException( + code: "CombineInconsistentKeySources", + errorMessage: "combine conflict: $e"), + consensusEncoding: (e) => PsbtException( + code: "ConsensusEncoding", + errorMessage: "bitcoin consensus encoding error: $e"), + negativeFee: () => PsbtException(code: "NegativeFee", errorMessage: "PSBT has a negative fee which is not allowed"), + feeOverflow: () => PsbtException(code: "FeeOverflow", errorMessage: "integer overflow in fee calculation"), + invalidPublicKey: (e) => PsbtException(code: "InvalidPublicKey", errorMessage: e), + invalidSecp256K1PublicKey: (e) => PsbtException(code: "InvalidSecp256k1PublicKey", errorMessage: e), + invalidXOnlyPublicKey: () => PsbtException(code: "InvalidXOnlyPublicKey"), + invalidEcdsaSignature: (e) => PsbtException(code: "InvalidEcdsaSignature", errorMessage: e), + invalidTaprootSignature: (e) => PsbtException(code: "InvalidTaprootSignature", errorMessage: e), + invalidControlBlock: () => PsbtException(code: "InvalidControlBlock"), + invalidLeafVersion: () => PsbtException(code: "InvalidLeafVersion"), + taproot: () => PsbtException(code: "Taproot"), + tapTree: (e) => PsbtException(code: "TapTree", errorMessage: e), + xPubKey: () => PsbtException(code: "XPubKey"), + version: (e) => PsbtException(code: "Version", errorMessage: e), + partialDataConsumption: () => PsbtException(code: "PartialDataConsumption", errorMessage: "data not consumed entirely when explicitly deserializing"), + io: (e) => PsbtException(code: "I/O error", errorMessage: e), + otherPsbtErr: () => PsbtException(code: "OtherPsbtErr")); +} + +PsbtException mapPsbtParseError(PsbtParseError error) { + return error.when( + psbtEncoding: (e) => PsbtException( + code: "PsbtEncoding", + errorMessage: "error in internal psbt data structure: $e"), + base64Encoding: (e) => PsbtException( + code: "Base64Encoding", + errorMessage: "error in psbt base64 encoding: $e")); } -class VerifyTransactionException extends BdkFfiException { - /// Constructs the [VerifyTransactionException] - VerifyTransactionException({super.message}); +class SignerException extends BdkFfiException { + /// Constructs the [ SignerException] + SignerException({super.errorMessage, required super.code}); } -Exception mapHexError(HexError error) { +SignerException mapSignerError(SignerError error) { return error.when( - invalidChar: (e) => HexException(message: "Non-hexadecimal character $e"), - oddLengthString: (e) => - HexException(message: "Purported hex string had odd length $e"), - invalidLength: (BigInt expected, BigInt found) => HexException( - message: - "Tried to parse fixed-length hash from a string with the wrong type; \n expected: ${expected.toString()}, found: ${found.toString()}.")); + missingKey: () => SignerException( + code: "MissingKey", errorMessage: "missing key for signing"), + invalidKey: () => SignerException(code: "InvalidKeyProvided"), + userCanceled: () => SignerException( + code: "UserOptionCanceled", errorMessage: "missing key for signing"), + inputIndexOutOfRange: () => SignerException( + code: "InputIndexOutOfRange", + errorMessage: "input index out of range"), + missingNonWitnessUtxo: () => SignerException( + code: "MissingNonWitnessUtxo", + errorMessage: "missing non-witness utxo information"), + invalidNonWitnessUtxo: () => SignerException( + code: "InvalidNonWitnessUtxo", + errorMessage: "invalid non-witness utxo information provided"), + missingWitnessUtxo: () => SignerException(code: "MissingWitnessUtxo"), + missingWitnessScript: () => SignerException(code: "MissingWitnessScript"), + missingHdKeypath: () => SignerException(code: "MissingHdKeypath"), + nonStandardSighash: () => SignerException(code: "NonStandardSighash"), + invalidSighash: () => SignerException(code: "InvalidSighashProvided"), + sighashP2Wpkh: (e) => SignerException( + code: "SighashP2wpkh", + errorMessage: + "error while computing the hash to sign a P2WPKH input: $e"), + sighashTaproot: (e) => SignerException( + code: "SighashTaproot", + errorMessage: + "error while computing the hash to sign a taproot input: $e"), + txInputsIndexError: (e) => SignerException( + code: "TxInputsIndexError", + errorMessage: + "Error while computing the hash, out of bounds access on the transaction inputs: $e"), + miniscriptPsbt: (e) => + SignerException(code: "MiniscriptPsbt", errorMessage: e), + external_: (e) => SignerException(code: "External", errorMessage: e), + psbt: (e) => SignerException(code: "InvalidPsbt", errorMessage: e)); +} + +class SqliteException extends BdkFfiException { + /// Constructs the [ SqliteException] + SqliteException({super.errorMessage, required super.code}); +} + +SqliteException mapSqliteError(SqliteError error) { + return error.when( + sqlite: (e) => SqliteException(code: "IO/Sqlite", errorMessage: e)); } -Exception mapAddressError(AddressError error) { - return error.when( - base58: (e) => AddressException(message: "Base58 encoding error: $e"), - bech32: (e) => AddressException(message: "Bech32 encoding error: $e"), - emptyBech32Payload: () => - AddressException(message: "The bech32 payload was empty."), - invalidBech32Variant: (e, f) => AddressException( - message: - "Invalid bech32 variant: The wrong checksum algorithm was used. See BIP-0350; \n expected:$e, found: $f "), - invalidWitnessVersion: (e) => AddressException( - message: - "Invalid witness version script: $e, version must be 0 to 16 inclusive."), - unparsableWitnessVersion: (e) => AddressException( - message: "Unable to parse witness version from string: $e"), - malformedWitnessVersion: () => AddressException( - message: - "Bitcoin script opcode does not match any known witness version, the script is malformed."), - invalidWitnessProgramLength: (e) => AddressException( - message: - "Invalid witness program length: $e, The witness program must be between 2 and 40 bytes in length."), - invalidSegwitV0ProgramLength: (e) => AddressException( - message: - "Invalid segwitV0 program length: $e, A v0 witness program must be either of length 20 or 32."), - uncompressedPubkey: () => AddressException( - message: "An uncompressed pubkey was used where it is not allowed."), - excessiveScriptSize: () => AddressException( - message: "Address size more than 520 bytes is not allowed."), - unrecognizedScript: () => AddressException( - message: - "Unrecognized script: Script is not a p2pkh, p2sh or witness program."), - unknownAddressType: (e) => AddressException( - message: "Unknown address type: $e, Address type is either invalid or not supported in rust-bitcoin."), - networkValidation: (required, found, _) => AddressException(message: "Address’s network differs from required one; \n required: $required, found: $found ")); -} - -Exception mapDescriptorError(DescriptorError error) { - return error.when( - invalidHdKeyPath: () => DescriptorException( - message: - "Invalid HD Key path, such as having a wildcard but a length != 1"), - invalidDescriptorChecksum: () => DescriptorException( - message: "The provided descriptor doesn’t match its checksum"), - hardenedDerivationXpub: () => DescriptorException( - message: "The provided descriptor doesn’t match its checksum"), - multiPath: () => - DescriptorException(message: "The descriptor contains multipath keys"), - key: (e) => KeyException(message: e), - policy: (e) => DescriptorException( - message: "Error while extracting and manipulating policies: $e"), - bip32: (e) => Bip32Exception(message: e), - base58: (e) => - DescriptorException(message: "Error during base58 decoding: $e"), - pk: (e) => KeyException(message: e), - miniscript: (e) => MiniscriptException(message: e), - hex: (e) => HexException(message: e), - invalidDescriptorCharacter: (e) => DescriptorException( - message: "Invalid byte found in the descriptor checksum: $e"), - ); +class TransactionException extends BdkFfiException { + /// Constructs the [ TransactionException] + TransactionException({super.errorMessage, required super.code}); } -Exception mapConsensusError(ConsensusError error) { +TransactionException mapTransactionError(TransactionError error) { return error.when( - io: (e) => ConsensusException(message: "I/O error: $e"), - oversizedVectorAllocation: (e, f) => ConsensusException( - message: - "Tried to allocate an oversized vector. The capacity requested: $e, found: $f "), - invalidChecksum: (e, f) => ConsensusException( - message: - "Checksum was invalid, expected: ${e.toString()}, actual:${f.toString()}"), - nonMinimalVarInt: () => ConsensusException( - message: "VarInt was encoded in a non-minimal way."), - parseFailed: (e) => ConsensusException(message: "Parsing error: $e"), - unsupportedSegwitFlag: (e) => - ConsensusException(message: "Unsupported segwit flag $e")); -} - -Exception mapBdkError(BdkError error) { + io: () => TransactionException(code: "IO/Transaction"), + oversizedVectorAllocation: () => TransactionException( + code: "OversizedVectorAllocation", + errorMessage: "allocation of oversized vector"), + invalidChecksum: (expected, actual) => TransactionException( + code: "InvalidChecksum", + errorMessage: "expected=$expected actual=$actual"), + nonMinimalVarInt: () => TransactionException( + code: "NonMinimalVarInt", errorMessage: "non-minimal var int"), + parseFailed: () => TransactionException(code: "ParseFailed"), + unsupportedSegwitFlag: (e) => TransactionException( + code: "UnsupportedSegwitFlag", + errorMessage: "unsupported segwit version: $e"), + otherTransactionErr: () => + TransactionException(code: "OtherTransactionErr")); +} + +class TxidParseException extends BdkFfiException { + /// Constructs the [ TxidParseException] + TxidParseException({super.errorMessage, required super.code}); +} + +TxidParseException mapTxidParseError(TxidParseError error) { return error.when( - noUtxosSelected: () => NoUtxosSelectedException( - message: - "manuallySelectedOnly option is selected but no utxo has been passed"), - invalidU32Bytes: (e) => InvalidByteException( - message: - 'Wrong number of bytes found when trying to convert the bytes, ${e.toString()}'), - generic: (e) => GenericException(message: e), - scriptDoesntHaveAddressForm: () => ScriptDoesntHaveAddressFormException(), - noRecipients: () => NoRecipientsException( - message: "Failed to build a transaction without recipients"), - outputBelowDustLimit: (e) => OutputBelowDustLimitException( - message: - 'Output created is under the dust limit (546 sats). Output value: ${e.toString()}'), - insufficientFunds: (needed, available) => InsufficientFundsException( - message: - "Wallet's UTXO set is not enough to cover recipient's requested plus fee; \n Needed: $needed, Available: $available"), - bnBTotalTriesExceeded: () => BnBTotalTriesExceededException( - message: - "Utxo branch and bound coin selection attempts have reached its limit"), - bnBNoExactMatch: () => BnBNoExactMatchException( - message: - "Utxo branch and bound coin selection failed to find the correct inputs for the desired outputs."), - unknownUtxo: () => UnknownUtxoException( - message: "Utxo not found in the internal database"), - transactionNotFound: () => TransactionNotFoundException(), - transactionConfirmed: () => TransactionConfirmedException(), - irreplaceableTransaction: () => IrreplaceableTransactionException( - message: - "Trying to replace the transaction that has a sequence >= 0xFFFFFFFE"), - feeRateTooLow: (e) => FeeRateTooLowException( - message: - "The Fee rate requested is lower than required. Required: ${e.toString()}"), - feeTooLow: (e) => FeeTooLowException( - message: - "The absolute fee requested is lower than replaced tx's absolute fee; \n Required: ${e.toString()}"), - feeRateUnavailable: () => FeeRateUnavailableException( - message: "Node doesn't have data to estimate a fee rate"), - missingKeyOrigin: (e) => MissingKeyOriginException(message: e.toString()), - key: (e) => KeyException(message: e.toString()), - checksumMismatch: () => ChecksumMismatchException(), - spendingPolicyRequired: (e) => SpendingPolicyRequiredException( - message: "Spending policy is not compatible with: ${e.toString()}"), - invalidPolicyPathError: (e) => - InvalidPolicyPathException(message: e.toString()), - signer: (e) => SignerException(message: e.toString()), - invalidNetwork: (requested, found) => InvalidNetworkException( - message: 'Requested; $requested, Found: $found'), - invalidOutpoint: (e) => InvalidOutpointException( - message: - "${e.toString()} doesn’t exist in the tx (vout greater than available outputs)"), - descriptor: (e) => mapDescriptorError(e), - encode: (e) => EncodeException(message: e.toString()), - miniscript: (e) => MiniscriptException(message: e.toString()), - miniscriptPsbt: (e) => MiniscriptPsbtException(message: e.toString()), - bip32: (e) => Bip32Exception(message: e.toString()), - secp256K1: (e) => Secp256k1Exception(message: e.toString()), - missingCachedScripts: (missingCount, lastCount) => - MissingCachedScriptsException( - message: - 'Sync attempt failed due to missing scripts in cache which are needed to satisfy stop_gap; \n MissingCount: $missingCount, LastCount: $lastCount '), - json: (e) => JsonException(message: e.toString()), - hex: (e) => mapHexError(e), - psbt: (e) => PsbtException(message: e.toString()), - psbtParse: (e) => PsbtParseException(message: e.toString()), - electrum: (e) => ElectrumException(message: e.toString()), - esplora: (e) => EsploraException(message: e.toString()), - sled: (e) => SledException(message: e.toString()), - rpc: (e) => RpcException(message: e.toString()), - rusqlite: (e) => RusqliteException(message: e.toString()), - consensus: (e) => mapConsensusError(e), - address: (e) => mapAddressError(e), - bip39: (e) => Bip39Exception(message: e.toString()), - invalidInput: (e) => InvalidInputException(message: e), - invalidLockTime: (e) => InvalidLockTimeException(message: e), - invalidTransaction: (e) => InvalidTransactionException(message: e), - verifyTransaction: (e) => VerifyTransactionException(message: e), - ); + invalidTxid: (e) => + TxidParseException(code: "InvalidTxid", errorMessage: e)); } diff --git a/macos/Classes/frb_generated.h b/macos/Classes/frb_generated.h index 45bed664..601a7c4d 100644 --- a/macos/Classes/frb_generated.h +++ b/macos/Classes/frb_generated.h @@ -14,131 +14,32 @@ 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_ffi_address { + uintptr_t field0; +} wire_cst_ffi_address; typedef struct wire_cst_list_prim_u_8_strict { uint8_t *ptr; int32_t len; } wire_cst_list_prim_u_8_strict; -typedef struct wire_cst_bdk_transaction { - struct wire_cst_list_prim_u_8_strict *s; -} wire_cst_bdk_transaction; - -typedef struct wire_cst_electrum_config { - struct wire_cst_list_prim_u_8_strict *url; - struct wire_cst_list_prim_u_8_strict *socks5; - uint8_t retry; - uint8_t *timeout; - uint64_t stop_gap; - bool validate_domain; -} wire_cst_electrum_config; - -typedef struct wire_cst_BlockchainConfig_Electrum { - struct wire_cst_electrum_config *config; -} wire_cst_BlockchainConfig_Electrum; - -typedef struct wire_cst_esplora_config { - struct wire_cst_list_prim_u_8_strict *base_url; - struct wire_cst_list_prim_u_8_strict *proxy; - uint8_t *concurrency; - uint64_t stop_gap; - uint64_t *timeout; -} wire_cst_esplora_config; - -typedef struct wire_cst_BlockchainConfig_Esplora { - struct wire_cst_esplora_config *config; -} wire_cst_BlockchainConfig_Esplora; - -typedef struct wire_cst_Auth_UserPass { - struct wire_cst_list_prim_u_8_strict *username; - struct wire_cst_list_prim_u_8_strict *password; -} wire_cst_Auth_UserPass; - -typedef struct wire_cst_Auth_Cookie { - struct wire_cst_list_prim_u_8_strict *file; -} wire_cst_Auth_Cookie; - -typedef union AuthKind { - struct wire_cst_Auth_UserPass UserPass; - struct wire_cst_Auth_Cookie Cookie; -} AuthKind; - -typedef struct wire_cst_auth { - int32_t tag; - union AuthKind kind; -} wire_cst_auth; - -typedef struct wire_cst_rpc_sync_params { - uint64_t start_script_count; - uint64_t start_time; - bool force_start_time; - uint64_t poll_rate_sec; -} wire_cst_rpc_sync_params; - -typedef struct wire_cst_rpc_config { - struct wire_cst_list_prim_u_8_strict *url; - struct wire_cst_auth auth; - int32_t network; - struct wire_cst_list_prim_u_8_strict *wallet_name; - struct wire_cst_rpc_sync_params *sync_params; -} wire_cst_rpc_config; - -typedef struct wire_cst_BlockchainConfig_Rpc { - struct wire_cst_rpc_config *config; -} wire_cst_BlockchainConfig_Rpc; - -typedef union BlockchainConfigKind { - struct wire_cst_BlockchainConfig_Electrum Electrum; - struct wire_cst_BlockchainConfig_Esplora Esplora; - struct wire_cst_BlockchainConfig_Rpc Rpc; -} BlockchainConfigKind; - -typedef struct wire_cst_blockchain_config { - int32_t tag; - union BlockchainConfigKind kind; -} wire_cst_blockchain_config; - -typedef struct wire_cst_bdk_descriptor { - uintptr_t extended_descriptor; - uintptr_t key_map; -} wire_cst_bdk_descriptor; - -typedef struct wire_cst_bdk_descriptor_secret_key { - uintptr_t ptr; -} wire_cst_bdk_descriptor_secret_key; - -typedef struct wire_cst_bdk_descriptor_public_key { - uintptr_t ptr; -} wire_cst_bdk_descriptor_public_key; +typedef struct wire_cst_ffi_script_buf { + struct wire_cst_list_prim_u_8_strict *bytes; +} wire_cst_ffi_script_buf; -typedef struct wire_cst_bdk_derivation_path { - uintptr_t ptr; -} wire_cst_bdk_derivation_path; +typedef struct wire_cst_ffi_psbt { + uintptr_t opaque; +} wire_cst_ffi_psbt; -typedef struct wire_cst_bdk_mnemonic { - uintptr_t ptr; -} wire_cst_bdk_mnemonic; +typedef struct wire_cst_ffi_transaction { + uintptr_t opaque; +} wire_cst_ffi_transaction; 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; @@ -169,7 +70,7 @@ typedef struct 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; + struct wire_cst_ffi_script_buf script_sig; uint32_t sequence; struct wire_cst_list_list_prim_u_8_strict *witness; } wire_cst_tx_in; @@ -181,7 +82,7 @@ typedef struct wire_cst_list_tx_in { typedef struct wire_cst_tx_out { uint64_t value; - struct wire_cst_bdk_script_buf script_pubkey; + struct wire_cst_ffi_script_buf script_pubkey; } wire_cst_tx_out; typedef struct wire_cst_list_tx_out { @@ -189,100 +90,85 @@ typedef struct wire_cst_list_tx_out { 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_ffi_descriptor { + uintptr_t extended_descriptor; + uintptr_t key_map; +} wire_cst_ffi_descriptor; -typedef struct wire_cst_address_index { - int32_t tag; - union AddressIndexKind kind; -} wire_cst_address_index; +typedef struct wire_cst_ffi_descriptor_secret_key { + uintptr_t opaque; +} wire_cst_ffi_descriptor_secret_key; -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_ffi_descriptor_public_key { + uintptr_t opaque; +} wire_cst_ffi_descriptor_public_key; -typedef struct wire_cst_psbt_sig_hash_type { - uint32_t inner; -} wire_cst_psbt_sig_hash_type; +typedef struct wire_cst_ffi_electrum_client { + uintptr_t opaque; +} wire_cst_ffi_electrum_client; -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_ffi_full_scan_request { + uintptr_t field0; +} wire_cst_ffi_full_scan_request; -typedef struct wire_cst_DatabaseConfig_Sqlite { - struct wire_cst_sqlite_db_configuration *config; -} wire_cst_DatabaseConfig_Sqlite; +typedef struct wire_cst_ffi_sync_request { + uintptr_t field0; +} wire_cst_ffi_sync_request; -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_ffi_esplora_client { + uintptr_t opaque; +} wire_cst_ffi_esplora_client; -typedef struct wire_cst_DatabaseConfig_Sled { - struct wire_cst_sled_db_configuration *config; -} wire_cst_DatabaseConfig_Sled; +typedef struct wire_cst_ffi_derivation_path { + uintptr_t opaque; +} wire_cst_ffi_derivation_path; -typedef union DatabaseConfigKind { - struct wire_cst_DatabaseConfig_Sqlite Sqlite; - struct wire_cst_DatabaseConfig_Sled Sled; -} DatabaseConfigKind; +typedef struct wire_cst_ffi_mnemonic { + uintptr_t opaque; +} wire_cst_ffi_mnemonic; -typedef struct wire_cst_database_config { - int32_t tag; - union DatabaseConfigKind kind; -} wire_cst_database_config; +typedef struct wire_cst_fee_rate { + uint64_t sat_kwu; +} wire_cst_fee_rate; -typedef struct wire_cst_sign_options { - bool trust_witness_utxo; - uint32_t *assume_height; - bool allow_all_sighashes; - bool remove_partial_sigs; - bool try_finalize; - bool sign_with_tap_internal_key; - bool allow_grinding; -} wire_cst_sign_options; +typedef struct wire_cst_ffi_wallet { + uintptr_t opaque; +} wire_cst_ffi_wallet; -typedef struct wire_cst_script_amount { - struct wire_cst_bdk_script_buf script; - uint64_t amount; -} wire_cst_script_amount; +typedef struct wire_cst_record_ffi_script_buf_u_64 { + struct wire_cst_ffi_script_buf field0; + uint64_t field1; +} wire_cst_record_ffi_script_buf_u_64; -typedef struct wire_cst_list_script_amount { - struct wire_cst_script_amount *ptr; +typedef struct wire_cst_list_record_ffi_script_buf_u_64 { + struct wire_cst_record_ffi_script_buf_u_64 *ptr; int32_t len; -} wire_cst_list_script_amount; +} wire_cst_list_record_ffi_script_buf_u_64; 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_list_prim_usize_strict { + uintptr_t *ptr; + int32_t len; +} wire_cst_list_prim_usize_strict; -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_record_string_list_prim_usize_strict { + struct wire_cst_list_prim_u_8_strict *field0; + struct wire_cst_list_prim_usize_strict *field1; +} wire_cst_record_string_list_prim_usize_strict; + +typedef struct wire_cst_list_record_string_list_prim_usize_strict { + struct wire_cst_record_string_list_prim_usize_strict *ptr; + int32_t len; +} wire_cst_list_record_string_list_prim_usize_strict; + +typedef struct wire_cst_record_map_string_list_prim_usize_strict_keychain_kind { + struct wire_cst_list_record_string_list_prim_usize_strict *field0; + int32_t field1; +} wire_cst_record_map_string_list_prim_usize_strict_keychain_kind; typedef struct wire_cst_RbfValue_Value { uint32_t field0; @@ -297,136 +183,398 @@ typedef struct wire_cst_rbf_value { 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_ffi_full_scan_request_builder { + uintptr_t field0; +} wire_cst_ffi_full_scan_request_builder; -typedef struct wire_cst_AddressError_InvalidWitnessVersion { - uint8_t field0; -} wire_cst_AddressError_InvalidWitnessVersion; +typedef struct wire_cst_ffi_policy { + uintptr_t opaque; +} wire_cst_ffi_policy; -typedef struct wire_cst_AddressError_UnparsableWitnessVersion { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_AddressError_UnparsableWitnessVersion; +typedef struct wire_cst_ffi_sync_request_builder { + uintptr_t field0; +} wire_cst_ffi_sync_request_builder; -typedef struct wire_cst_AddressError_InvalidWitnessProgramLength { +typedef struct wire_cst_ffi_update { uintptr_t field0; -} wire_cst_AddressError_InvalidWitnessProgramLength; +} wire_cst_ffi_update; -typedef struct wire_cst_AddressError_InvalidSegwitV0ProgramLength { +typedef struct wire_cst_ffi_connection { uintptr_t field0; -} wire_cst_AddressError_InvalidSegwitV0ProgramLength; +} wire_cst_ffi_connection; -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_sign_options { + bool trust_witness_utxo; + uint32_t *assume_height; + bool allow_all_sighashes; + bool try_finalize; + bool sign_with_tap_internal_key; + bool allow_grinding; +} wire_cst_sign_options; -typedef struct wire_cst_block_time { +typedef struct wire_cst_block_id { uint32_t height; + struct wire_cst_list_prim_u_8_strict *hash; +} wire_cst_block_id; + +typedef struct wire_cst_confirmation_block_time { + struct wire_cst_block_id block_id; + uint64_t confirmation_time; +} wire_cst_confirmation_block_time; + +typedef struct wire_cst_ChainPosition_Confirmed { + struct wire_cst_confirmation_block_time *confirmation_block_time; +} wire_cst_ChainPosition_Confirmed; + +typedef struct wire_cst_ChainPosition_Unconfirmed { uint64_t timestamp; -} wire_cst_block_time; +} wire_cst_ChainPosition_Unconfirmed; -typedef struct wire_cst_ConsensusError_Io { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_ConsensusError_Io; +typedef union ChainPositionKind { + struct wire_cst_ChainPosition_Confirmed Confirmed; + struct wire_cst_ChainPosition_Unconfirmed Unconfirmed; +} ChainPositionKind; -typedef struct wire_cst_ConsensusError_OversizedVectorAllocation { - uintptr_t requested; - uintptr_t max; -} wire_cst_ConsensusError_OversizedVectorAllocation; +typedef struct wire_cst_chain_position { + int32_t tag; + union ChainPositionKind kind; +} wire_cst_chain_position; -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_ffi_canonical_tx { + struct wire_cst_ffi_transaction transaction; + struct wire_cst_chain_position chain_position; +} wire_cst_ffi_canonical_tx; -typedef struct wire_cst_ConsensusError_ParseFailed { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_ConsensusError_ParseFailed; +typedef struct wire_cst_list_ffi_canonical_tx { + struct wire_cst_ffi_canonical_tx *ptr; + int32_t len; +} wire_cst_list_ffi_canonical_tx; + +typedef struct wire_cst_local_output { + struct wire_cst_out_point outpoint; + struct wire_cst_tx_out txout; + int32_t keychain; + bool is_spent; +} wire_cst_local_output; + +typedef struct wire_cst_list_local_output { + struct wire_cst_local_output *ptr; + int32_t len; +} wire_cst_list_local_output; + +typedef struct wire_cst_address_info { + uint32_t index; + struct wire_cst_ffi_address address; + int32_t keychain; +} wire_cst_address_info; + +typedef struct wire_cst_AddressParseError_WitnessVersion { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_AddressParseError_WitnessVersion; + +typedef struct wire_cst_AddressParseError_WitnessProgram { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_AddressParseError_WitnessProgram; + +typedef union AddressParseErrorKind { + struct wire_cst_AddressParseError_WitnessVersion WitnessVersion; + struct wire_cst_AddressParseError_WitnessProgram WitnessProgram; +} AddressParseErrorKind; + +typedef struct wire_cst_address_parse_error { + int32_t tag; + union AddressParseErrorKind kind; +} wire_cst_address_parse_error; + +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_ConsensusError_UnsupportedSegwitFlag { - uint8_t field0; -} wire_cst_ConsensusError_UnsupportedSegwitFlag; +typedef struct wire_cst_Bip32Error_Secp256k1 { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_Bip32Error_Secp256k1; + +typedef struct wire_cst_Bip32Error_InvalidChildNumber { + uint32_t child_number; +} wire_cst_Bip32Error_InvalidChildNumber; + +typedef struct wire_cst_Bip32Error_UnknownVersion { + struct wire_cst_list_prim_u_8_strict *version; +} wire_cst_Bip32Error_UnknownVersion; + +typedef struct wire_cst_Bip32Error_WrongExtendedKeyLength { + uint32_t length; +} wire_cst_Bip32Error_WrongExtendedKeyLength; + +typedef struct wire_cst_Bip32Error_Base58 { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_Bip32Error_Base58; + +typedef struct wire_cst_Bip32Error_Hex { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_Bip32Error_Hex; + +typedef struct wire_cst_Bip32Error_InvalidPublicKeyHexLength { + uint32_t length; +} wire_cst_Bip32Error_InvalidPublicKeyHexLength; + +typedef struct wire_cst_Bip32Error_UnknownError { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_Bip32Error_UnknownError; + +typedef union Bip32ErrorKind { + struct wire_cst_Bip32Error_Secp256k1 Secp256k1; + struct wire_cst_Bip32Error_InvalidChildNumber InvalidChildNumber; + struct wire_cst_Bip32Error_UnknownVersion UnknownVersion; + struct wire_cst_Bip32Error_WrongExtendedKeyLength WrongExtendedKeyLength; + struct wire_cst_Bip32Error_Base58 Base58; + struct wire_cst_Bip32Error_Hex Hex; + struct wire_cst_Bip32Error_InvalidPublicKeyHexLength InvalidPublicKeyHexLength; + struct wire_cst_Bip32Error_UnknownError UnknownError; +} Bip32ErrorKind; + +typedef struct wire_cst_bip_32_error { + int32_t tag; + union Bip32ErrorKind kind; +} wire_cst_bip_32_error; + +typedef struct wire_cst_Bip39Error_BadWordCount { + uint64_t word_count; +} wire_cst_Bip39Error_BadWordCount; + +typedef struct wire_cst_Bip39Error_UnknownWord { + uint64_t index; +} wire_cst_Bip39Error_UnknownWord; + +typedef struct wire_cst_Bip39Error_BadEntropyBitCount { + uint64_t bit_count; +} wire_cst_Bip39Error_BadEntropyBitCount; + +typedef struct wire_cst_Bip39Error_AmbiguousLanguages { + struct wire_cst_list_prim_u_8_strict *languages; +} wire_cst_Bip39Error_AmbiguousLanguages; + +typedef struct wire_cst_Bip39Error_Generic { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_Bip39Error_Generic; + +typedef union Bip39ErrorKind { + struct wire_cst_Bip39Error_BadWordCount BadWordCount; + struct wire_cst_Bip39Error_UnknownWord UnknownWord; + struct wire_cst_Bip39Error_BadEntropyBitCount BadEntropyBitCount; + struct wire_cst_Bip39Error_AmbiguousLanguages AmbiguousLanguages; + struct wire_cst_Bip39Error_Generic Generic; +} Bip39ErrorKind; + +typedef struct wire_cst_bip_39_error { + int32_t tag; + union Bip39ErrorKind kind; +} wire_cst_bip_39_error; -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_CalculateFeeError_Generic { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_CalculateFeeError_Generic; -typedef struct wire_cst_consensus_error { +typedef struct wire_cst_CalculateFeeError_MissingTxOut { + struct wire_cst_list_out_point *out_points; +} wire_cst_CalculateFeeError_MissingTxOut; + +typedef struct wire_cst_CalculateFeeError_NegativeFee { + struct wire_cst_list_prim_u_8_strict *amount; +} wire_cst_CalculateFeeError_NegativeFee; + +typedef union CalculateFeeErrorKind { + struct wire_cst_CalculateFeeError_Generic Generic; + struct wire_cst_CalculateFeeError_MissingTxOut MissingTxOut; + struct wire_cst_CalculateFeeError_NegativeFee NegativeFee; +} CalculateFeeErrorKind; + +typedef struct wire_cst_calculate_fee_error { int32_t tag; - union ConsensusErrorKind kind; -} wire_cst_consensus_error; + union CalculateFeeErrorKind kind; +} wire_cst_calculate_fee_error; + +typedef struct wire_cst_CannotConnectError_Include { + uint32_t height; +} wire_cst_CannotConnectError_Include; + +typedef union CannotConnectErrorKind { + struct wire_cst_CannotConnectError_Include Include; +} CannotConnectErrorKind; + +typedef struct wire_cst_cannot_connect_error { + int32_t tag; + union CannotConnectErrorKind kind; +} wire_cst_cannot_connect_error; + +typedef struct wire_cst_CreateTxError_TransactionNotFound { + struct wire_cst_list_prim_u_8_strict *txid; +} wire_cst_CreateTxError_TransactionNotFound; + +typedef struct wire_cst_CreateTxError_TransactionConfirmed { + struct wire_cst_list_prim_u_8_strict *txid; +} wire_cst_CreateTxError_TransactionConfirmed; + +typedef struct wire_cst_CreateTxError_IrreplaceableTransaction { + struct wire_cst_list_prim_u_8_strict *txid; +} wire_cst_CreateTxError_IrreplaceableTransaction; + +typedef struct wire_cst_CreateTxError_Generic { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_CreateTxError_Generic; + +typedef struct wire_cst_CreateTxError_Descriptor { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_CreateTxError_Descriptor; + +typedef struct wire_cst_CreateTxError_Policy { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_CreateTxError_Policy; + +typedef struct wire_cst_CreateTxError_SpendingPolicyRequired { + struct wire_cst_list_prim_u_8_strict *kind; +} wire_cst_CreateTxError_SpendingPolicyRequired; + +typedef struct wire_cst_CreateTxError_LockTime { + struct wire_cst_list_prim_u_8_strict *requested_time; + struct wire_cst_list_prim_u_8_strict *required_time; +} wire_cst_CreateTxError_LockTime; + +typedef struct wire_cst_CreateTxError_RbfSequenceCsv { + struct wire_cst_list_prim_u_8_strict *rbf; + struct wire_cst_list_prim_u_8_strict *csv; +} wire_cst_CreateTxError_RbfSequenceCsv; + +typedef struct wire_cst_CreateTxError_FeeTooLow { + struct wire_cst_list_prim_u_8_strict *fee_required; +} wire_cst_CreateTxError_FeeTooLow; + +typedef struct wire_cst_CreateTxError_FeeRateTooLow { + struct wire_cst_list_prim_u_8_strict *fee_rate_required; +} wire_cst_CreateTxError_FeeRateTooLow; + +typedef struct wire_cst_CreateTxError_OutputBelowDustLimit { + uint64_t index; +} wire_cst_CreateTxError_OutputBelowDustLimit; + +typedef struct wire_cst_CreateTxError_CoinSelection { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_CreateTxError_CoinSelection; + +typedef struct wire_cst_CreateTxError_InsufficientFunds { + uint64_t needed; + uint64_t available; +} wire_cst_CreateTxError_InsufficientFunds; + +typedef struct wire_cst_CreateTxError_Psbt { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_CreateTxError_Psbt; + +typedef struct wire_cst_CreateTxError_MissingKeyOrigin { + struct wire_cst_list_prim_u_8_strict *key; +} wire_cst_CreateTxError_MissingKeyOrigin; + +typedef struct wire_cst_CreateTxError_UnknownUtxo { + struct wire_cst_list_prim_u_8_strict *outpoint; +} wire_cst_CreateTxError_UnknownUtxo; + +typedef struct wire_cst_CreateTxError_MissingNonWitnessUtxo { + struct wire_cst_list_prim_u_8_strict *outpoint; +} wire_cst_CreateTxError_MissingNonWitnessUtxo; + +typedef struct wire_cst_CreateTxError_MiniscriptPsbt { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_CreateTxError_MiniscriptPsbt; + +typedef union CreateTxErrorKind { + struct wire_cst_CreateTxError_TransactionNotFound TransactionNotFound; + struct wire_cst_CreateTxError_TransactionConfirmed TransactionConfirmed; + struct wire_cst_CreateTxError_IrreplaceableTransaction IrreplaceableTransaction; + struct wire_cst_CreateTxError_Generic Generic; + struct wire_cst_CreateTxError_Descriptor Descriptor; + struct wire_cst_CreateTxError_Policy Policy; + struct wire_cst_CreateTxError_SpendingPolicyRequired SpendingPolicyRequired; + struct wire_cst_CreateTxError_LockTime LockTime; + struct wire_cst_CreateTxError_RbfSequenceCsv RbfSequenceCsv; + struct wire_cst_CreateTxError_FeeTooLow FeeTooLow; + struct wire_cst_CreateTxError_FeeRateTooLow FeeRateTooLow; + struct wire_cst_CreateTxError_OutputBelowDustLimit OutputBelowDustLimit; + struct wire_cst_CreateTxError_CoinSelection CoinSelection; + struct wire_cst_CreateTxError_InsufficientFunds InsufficientFunds; + struct wire_cst_CreateTxError_Psbt Psbt; + struct wire_cst_CreateTxError_MissingKeyOrigin MissingKeyOrigin; + struct wire_cst_CreateTxError_UnknownUtxo UnknownUtxo; + struct wire_cst_CreateTxError_MissingNonWitnessUtxo MissingNonWitnessUtxo; + struct wire_cst_CreateTxError_MiniscriptPsbt MiniscriptPsbt; +} CreateTxErrorKind; + +typedef struct wire_cst_create_tx_error { + int32_t tag; + union CreateTxErrorKind kind; +} wire_cst_create_tx_error; + +typedef struct wire_cst_CreateWithPersistError_Persist { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_CreateWithPersistError_Persist; + +typedef struct wire_cst_CreateWithPersistError_Descriptor { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_CreateWithPersistError_Descriptor; + +typedef union CreateWithPersistErrorKind { + struct wire_cst_CreateWithPersistError_Persist Persist; + struct wire_cst_CreateWithPersistError_Descriptor Descriptor; +} CreateWithPersistErrorKind; + +typedef struct wire_cst_create_with_persist_error { + int32_t tag; + union CreateWithPersistErrorKind kind; +} wire_cst_create_with_persist_error; typedef struct wire_cst_DescriptorError_Key { - struct wire_cst_list_prim_u_8_strict *field0; + struct wire_cst_list_prim_u_8_strict *error_message; } wire_cst_DescriptorError_Key; +typedef struct wire_cst_DescriptorError_Generic { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_DescriptorError_Generic; + typedef struct wire_cst_DescriptorError_Policy { - struct wire_cst_list_prim_u_8_strict *field0; + struct wire_cst_list_prim_u_8_strict *error_message; } wire_cst_DescriptorError_Policy; typedef struct wire_cst_DescriptorError_InvalidDescriptorCharacter { - uint8_t field0; + struct wire_cst_list_prim_u_8_strict *charector; } wire_cst_DescriptorError_InvalidDescriptorCharacter; typedef struct wire_cst_DescriptorError_Bip32 { - struct wire_cst_list_prim_u_8_strict *field0; + struct wire_cst_list_prim_u_8_strict *error_message; } wire_cst_DescriptorError_Bip32; typedef struct wire_cst_DescriptorError_Base58 { - struct wire_cst_list_prim_u_8_strict *field0; + struct wire_cst_list_prim_u_8_strict *error_message; } wire_cst_DescriptorError_Base58; typedef struct wire_cst_DescriptorError_Pk { - struct wire_cst_list_prim_u_8_strict *field0; + struct wire_cst_list_prim_u_8_strict *error_message; } wire_cst_DescriptorError_Pk; typedef struct wire_cst_DescriptorError_Miniscript { - struct wire_cst_list_prim_u_8_strict *field0; + struct wire_cst_list_prim_u_8_strict *error_message; } wire_cst_DescriptorError_Miniscript; typedef struct wire_cst_DescriptorError_Hex { - struct wire_cst_list_prim_u_8_strict *field0; + struct wire_cst_list_prim_u_8_strict *error_message; } wire_cst_DescriptorError_Hex; typedef union DescriptorErrorKind { struct wire_cst_DescriptorError_Key Key; + struct wire_cst_DescriptorError_Generic Generic; struct wire_cst_DescriptorError_Policy Policy; struct wire_cst_DescriptorError_InvalidDescriptorCharacter InvalidDescriptorCharacter; struct wire_cst_DescriptorError_Bip32 Bip32; @@ -441,688 +589,834 @@ typedef struct wire_cst_descriptor_error { 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_DescriptorKeyError_Parse { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_DescriptorKeyError_Parse; -typedef struct wire_cst_HexError_InvalidChar { - uint8_t field0; -} wire_cst_HexError_InvalidChar; +typedef struct wire_cst_DescriptorKeyError_Bip32 { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_DescriptorKeyError_Bip32; -typedef struct wire_cst_HexError_OddLengthString { - uintptr_t field0; -} wire_cst_HexError_OddLengthString; +typedef union DescriptorKeyErrorKind { + struct wire_cst_DescriptorKeyError_Parse Parse; + struct wire_cst_DescriptorKeyError_Bip32 Bip32; +} DescriptorKeyErrorKind; -typedef struct wire_cst_HexError_InvalidLength { - uintptr_t field0; - uintptr_t field1; -} wire_cst_HexError_InvalidLength; +typedef struct wire_cst_descriptor_key_error { + int32_t tag; + union DescriptorKeyErrorKind kind; +} wire_cst_descriptor_key_error; + +typedef struct wire_cst_ElectrumError_IOError { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_ElectrumError_IOError; + +typedef struct wire_cst_ElectrumError_Json { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_ElectrumError_Json; + +typedef struct wire_cst_ElectrumError_Hex { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_ElectrumError_Hex; + +typedef struct wire_cst_ElectrumError_Protocol { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_ElectrumError_Protocol; + +typedef struct wire_cst_ElectrumError_Bitcoin { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_ElectrumError_Bitcoin; + +typedef struct wire_cst_ElectrumError_InvalidResponse { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_ElectrumError_InvalidResponse; + +typedef struct wire_cst_ElectrumError_Message { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_ElectrumError_Message; + +typedef struct wire_cst_ElectrumError_InvalidDNSNameError { + struct wire_cst_list_prim_u_8_strict *domain; +} wire_cst_ElectrumError_InvalidDNSNameError; + +typedef struct wire_cst_ElectrumError_SharedIOError { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_ElectrumError_SharedIOError; + +typedef struct wire_cst_ElectrumError_CouldNotCreateConnection { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_ElectrumError_CouldNotCreateConnection; + +typedef union ElectrumErrorKind { + struct wire_cst_ElectrumError_IOError IOError; + struct wire_cst_ElectrumError_Json Json; + struct wire_cst_ElectrumError_Hex Hex; + struct wire_cst_ElectrumError_Protocol Protocol; + struct wire_cst_ElectrumError_Bitcoin Bitcoin; + struct wire_cst_ElectrumError_InvalidResponse InvalidResponse; + struct wire_cst_ElectrumError_Message Message; + struct wire_cst_ElectrumError_InvalidDNSNameError InvalidDNSNameError; + struct wire_cst_ElectrumError_SharedIOError SharedIOError; + struct wire_cst_ElectrumError_CouldNotCreateConnection CouldNotCreateConnection; +} ElectrumErrorKind; + +typedef struct wire_cst_electrum_error { + int32_t tag; + union ElectrumErrorKind kind; +} wire_cst_electrum_error; + +typedef struct wire_cst_EsploraError_Minreq { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_EsploraError_Minreq; + +typedef struct wire_cst_EsploraError_HttpResponse { + uint16_t status; + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_EsploraError_HttpResponse; + +typedef struct wire_cst_EsploraError_Parsing { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_EsploraError_Parsing; -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_EsploraError_StatusCode { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_EsploraError_StatusCode; -typedef struct wire_cst_hex_error { +typedef struct wire_cst_EsploraError_BitcoinEncoding { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_EsploraError_BitcoinEncoding; + +typedef struct wire_cst_EsploraError_HexToArray { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_EsploraError_HexToArray; + +typedef struct wire_cst_EsploraError_HexToBytes { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_EsploraError_HexToBytes; + +typedef struct wire_cst_EsploraError_HeaderHeightNotFound { + uint32_t height; +} wire_cst_EsploraError_HeaderHeightNotFound; + +typedef struct wire_cst_EsploraError_InvalidHttpHeaderName { + struct wire_cst_list_prim_u_8_strict *name; +} wire_cst_EsploraError_InvalidHttpHeaderName; + +typedef struct wire_cst_EsploraError_InvalidHttpHeaderValue { + struct wire_cst_list_prim_u_8_strict *value; +} wire_cst_EsploraError_InvalidHttpHeaderValue; + +typedef union EsploraErrorKind { + struct wire_cst_EsploraError_Minreq Minreq; + struct wire_cst_EsploraError_HttpResponse HttpResponse; + struct wire_cst_EsploraError_Parsing Parsing; + struct wire_cst_EsploraError_StatusCode StatusCode; + struct wire_cst_EsploraError_BitcoinEncoding BitcoinEncoding; + struct wire_cst_EsploraError_HexToArray HexToArray; + struct wire_cst_EsploraError_HexToBytes HexToBytes; + struct wire_cst_EsploraError_HeaderHeightNotFound HeaderHeightNotFound; + struct wire_cst_EsploraError_InvalidHttpHeaderName InvalidHttpHeaderName; + struct wire_cst_EsploraError_InvalidHttpHeaderValue InvalidHttpHeaderValue; +} EsploraErrorKind; + +typedef struct wire_cst_esplora_error { int32_t tag; - union HexErrorKind kind; -} wire_cst_hex_error; + union EsploraErrorKind kind; +} wire_cst_esplora_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_ExtractTxError_AbsurdFeeRate { + uint64_t fee_rate; +} wire_cst_ExtractTxError_AbsurdFeeRate; -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 union ExtractTxErrorKind { + struct wire_cst_ExtractTxError_AbsurdFeeRate AbsurdFeeRate; +} ExtractTxErrorKind; -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_extract_tx_error { + int32_t tag; + union ExtractTxErrorKind kind; +} wire_cst_extract_tx_error; -typedef struct wire_cst_BdkError_Hex { - struct wire_cst_hex_error *field0; -} wire_cst_BdkError_Hex; +typedef struct wire_cst_FromScriptError_WitnessProgram { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_FromScriptError_WitnessProgram; -typedef struct wire_cst_BdkError_Consensus { - struct wire_cst_consensus_error *field0; -} wire_cst_BdkError_Consensus; +typedef struct wire_cst_FromScriptError_WitnessVersion { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_FromScriptError_WitnessVersion; -typedef struct wire_cst_BdkError_VerifyTransaction { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_VerifyTransaction; +typedef union FromScriptErrorKind { + struct wire_cst_FromScriptError_WitnessProgram WitnessProgram; + struct wire_cst_FromScriptError_WitnessVersion WitnessVersion; +} FromScriptErrorKind; -typedef struct wire_cst_BdkError_Address { - struct wire_cst_address_error *field0; -} wire_cst_BdkError_Address; +typedef struct wire_cst_from_script_error { + int32_t tag; + union FromScriptErrorKind kind; +} wire_cst_from_script_error; -typedef struct wire_cst_BdkError_Descriptor { - struct wire_cst_descriptor_error *field0; -} wire_cst_BdkError_Descriptor; +typedef struct wire_cst_LoadWithPersistError_Persist { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_LoadWithPersistError_Persist; -typedef struct wire_cst_BdkError_InvalidU32Bytes { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_InvalidU32Bytes; +typedef struct wire_cst_LoadWithPersistError_InvalidChangeSet { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_LoadWithPersistError_InvalidChangeSet; -typedef struct wire_cst_BdkError_Generic { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Generic; +typedef union LoadWithPersistErrorKind { + struct wire_cst_LoadWithPersistError_Persist Persist; + struct wire_cst_LoadWithPersistError_InvalidChangeSet InvalidChangeSet; +} LoadWithPersistErrorKind; -typedef struct wire_cst_BdkError_OutputBelowDustLimit { - uintptr_t field0; -} wire_cst_BdkError_OutputBelowDustLimit; +typedef struct wire_cst_load_with_persist_error { + int32_t tag; + union LoadWithPersistErrorKind kind; +} wire_cst_load_with_persist_error; + +typedef struct wire_cst_PsbtError_InvalidKey { + struct wire_cst_list_prim_u_8_strict *key; +} wire_cst_PsbtError_InvalidKey; + +typedef struct wire_cst_PsbtError_DuplicateKey { + struct wire_cst_list_prim_u_8_strict *key; +} wire_cst_PsbtError_DuplicateKey; + +typedef struct wire_cst_PsbtError_NonStandardSighashType { + uint32_t sighash; +} wire_cst_PsbtError_NonStandardSighashType; + +typedef struct wire_cst_PsbtError_InvalidHash { + struct wire_cst_list_prim_u_8_strict *hash; +} wire_cst_PsbtError_InvalidHash; + +typedef struct wire_cst_PsbtError_CombineInconsistentKeySources { + struct wire_cst_list_prim_u_8_strict *xpub; +} wire_cst_PsbtError_CombineInconsistentKeySources; + +typedef struct wire_cst_PsbtError_ConsensusEncoding { + struct wire_cst_list_prim_u_8_strict *encoding_error; +} wire_cst_PsbtError_ConsensusEncoding; + +typedef struct wire_cst_PsbtError_InvalidPublicKey { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_PsbtError_InvalidPublicKey; + +typedef struct wire_cst_PsbtError_InvalidSecp256k1PublicKey { + struct wire_cst_list_prim_u_8_strict *secp256k1_error; +} wire_cst_PsbtError_InvalidSecp256k1PublicKey; + +typedef struct wire_cst_PsbtError_InvalidEcdsaSignature { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_PsbtError_InvalidEcdsaSignature; + +typedef struct wire_cst_PsbtError_InvalidTaprootSignature { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_PsbtError_InvalidTaprootSignature; + +typedef struct wire_cst_PsbtError_TapTree { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_PsbtError_TapTree; + +typedef struct wire_cst_PsbtError_Version { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_PsbtError_Version; + +typedef struct wire_cst_PsbtError_Io { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_PsbtError_Io; + +typedef union PsbtErrorKind { + struct wire_cst_PsbtError_InvalidKey InvalidKey; + struct wire_cst_PsbtError_DuplicateKey DuplicateKey; + struct wire_cst_PsbtError_NonStandardSighashType NonStandardSighashType; + struct wire_cst_PsbtError_InvalidHash InvalidHash; + struct wire_cst_PsbtError_CombineInconsistentKeySources CombineInconsistentKeySources; + struct wire_cst_PsbtError_ConsensusEncoding ConsensusEncoding; + struct wire_cst_PsbtError_InvalidPublicKey InvalidPublicKey; + struct wire_cst_PsbtError_InvalidSecp256k1PublicKey InvalidSecp256k1PublicKey; + struct wire_cst_PsbtError_InvalidEcdsaSignature InvalidEcdsaSignature; + struct wire_cst_PsbtError_InvalidTaprootSignature InvalidTaprootSignature; + struct wire_cst_PsbtError_TapTree TapTree; + struct wire_cst_PsbtError_Version Version; + struct wire_cst_PsbtError_Io Io; +} PsbtErrorKind; + +typedef struct wire_cst_psbt_error { + int32_t tag; + union PsbtErrorKind kind; +} wire_cst_psbt_error; -typedef struct wire_cst_BdkError_InsufficientFunds { - uint64_t needed; - uint64_t available; -} wire_cst_BdkError_InsufficientFunds; +typedef struct wire_cst_PsbtParseError_PsbtEncoding { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_PsbtParseError_PsbtEncoding; -typedef struct wire_cst_BdkError_FeeRateTooLow { - float needed; -} wire_cst_BdkError_FeeRateTooLow; +typedef struct wire_cst_PsbtParseError_Base64Encoding { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_PsbtParseError_Base64Encoding; -typedef struct wire_cst_BdkError_FeeTooLow { - uint64_t needed; -} wire_cst_BdkError_FeeTooLow; +typedef union PsbtParseErrorKind { + struct wire_cst_PsbtParseError_PsbtEncoding PsbtEncoding; + struct wire_cst_PsbtParseError_Base64Encoding Base64Encoding; +} PsbtParseErrorKind; -typedef struct wire_cst_BdkError_MissingKeyOrigin { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_MissingKeyOrigin; +typedef struct wire_cst_psbt_parse_error { + int32_t tag; + union PsbtParseErrorKind kind; +} wire_cst_psbt_parse_error; + +typedef struct wire_cst_SignerError_SighashP2wpkh { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_SignerError_SighashP2wpkh; + +typedef struct wire_cst_SignerError_SighashTaproot { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_SignerError_SighashTaproot; + +typedef struct wire_cst_SignerError_TxInputsIndexError { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_SignerError_TxInputsIndexError; + +typedef struct wire_cst_SignerError_MiniscriptPsbt { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_SignerError_MiniscriptPsbt; + +typedef struct wire_cst_SignerError_External { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_SignerError_External; + +typedef struct wire_cst_SignerError_Psbt { + struct wire_cst_list_prim_u_8_strict *error_message; +} wire_cst_SignerError_Psbt; + +typedef union SignerErrorKind { + struct wire_cst_SignerError_SighashP2wpkh SighashP2wpkh; + struct wire_cst_SignerError_SighashTaproot SighashTaproot; + struct wire_cst_SignerError_TxInputsIndexError TxInputsIndexError; + struct wire_cst_SignerError_MiniscriptPsbt MiniscriptPsbt; + struct wire_cst_SignerError_External External; + struct wire_cst_SignerError_Psbt Psbt; +} SignerErrorKind; + +typedef struct wire_cst_signer_error { + int32_t tag; + union SignerErrorKind kind; +} wire_cst_signer_error; -typedef struct wire_cst_BdkError_Key { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Key; +typedef struct wire_cst_SqliteError_Sqlite { + struct wire_cst_list_prim_u_8_strict *rusqlite_error; +} wire_cst_SqliteError_Sqlite; -typedef struct wire_cst_BdkError_SpendingPolicyRequired { - int32_t field0; -} wire_cst_BdkError_SpendingPolicyRequired; +typedef union SqliteErrorKind { + struct wire_cst_SqliteError_Sqlite Sqlite; +} SqliteErrorKind; -typedef struct wire_cst_BdkError_InvalidPolicyPathError { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_InvalidPolicyPathError; +typedef struct wire_cst_sqlite_error { + int32_t tag; + union SqliteErrorKind kind; +} wire_cst_sqlite_error; + +typedef struct wire_cst_sync_progress { + uint64_t spks_consumed; + uint64_t spks_remaining; + uint64_t txids_consumed; + uint64_t txids_remaining; + uint64_t outpoints_consumed; + uint64_t outpoints_remaining; +} wire_cst_sync_progress; + +typedef struct wire_cst_TransactionError_InvalidChecksum { + struct wire_cst_list_prim_u_8_strict *expected; + struct wire_cst_list_prim_u_8_strict *actual; +} wire_cst_TransactionError_InvalidChecksum; -typedef struct wire_cst_BdkError_Signer { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Signer; +typedef struct wire_cst_TransactionError_UnsupportedSegwitFlag { + uint8_t flag; +} wire_cst_TransactionError_UnsupportedSegwitFlag; -typedef struct wire_cst_BdkError_InvalidNetwork { - int32_t requested; - int32_t found; -} wire_cst_BdkError_InvalidNetwork; +typedef union TransactionErrorKind { + struct wire_cst_TransactionError_InvalidChecksum InvalidChecksum; + struct wire_cst_TransactionError_UnsupportedSegwitFlag UnsupportedSegwitFlag; +} TransactionErrorKind; -typedef struct wire_cst_BdkError_InvalidOutpoint { - struct wire_cst_out_point *field0; -} wire_cst_BdkError_InvalidOutpoint; +typedef struct wire_cst_transaction_error { + int32_t tag; + union TransactionErrorKind kind; +} wire_cst_transaction_error; -typedef struct wire_cst_BdkError_Encode { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Encode; +typedef struct wire_cst_TxidParseError_InvalidTxid { + struct wire_cst_list_prim_u_8_strict *txid; +} wire_cst_TxidParseError_InvalidTxid; -typedef struct wire_cst_BdkError_Miniscript { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Miniscript; +typedef union TxidParseErrorKind { + struct wire_cst_TxidParseError_InvalidTxid InvalidTxid; +} TxidParseErrorKind; -typedef struct wire_cst_BdkError_MiniscriptPsbt { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_MiniscriptPsbt; +typedef struct wire_cst_txid_parse_error { + int32_t tag; + union TxidParseErrorKind kind; +} wire_cst_txid_parse_error; -typedef struct wire_cst_BdkError_Bip32 { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Bip32; +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_as_string(struct wire_cst_ffi_address *that); -typedef struct wire_cst_BdkError_Bip39 { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Bip39; +void frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_from_script(int64_t port_, + struct wire_cst_ffi_script_buf *script, + int32_t network); -typedef struct wire_cst_BdkError_Secp256k1 { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Secp256k1; +void frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_from_string(int64_t port_, + struct wire_cst_list_prim_u_8_strict *address, + int32_t network); -typedef struct wire_cst_BdkError_Json { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Json; +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_is_valid_for_network(struct wire_cst_ffi_address *that, + int32_t network); -typedef struct wire_cst_BdkError_Psbt { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Psbt; +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_script(struct wire_cst_ffi_address *opaque); -typedef struct wire_cst_BdkError_PsbtParse { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_PsbtParse; +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_to_qr_uri(struct wire_cst_ffi_address *that); -typedef struct wire_cst_BdkError_MissingCachedScripts { - uintptr_t field0; - uintptr_t field1; -} wire_cst_BdkError_MissingCachedScripts; +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_as_string(struct wire_cst_ffi_psbt *that); -typedef struct wire_cst_BdkError_Electrum { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Electrum; +void frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_combine(int64_t port_, + struct wire_cst_ffi_psbt *opaque, + struct wire_cst_ffi_psbt *other); -typedef struct wire_cst_BdkError_Esplora { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Esplora; +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_extract_tx(struct wire_cst_ffi_psbt *opaque); -typedef struct wire_cst_BdkError_Sled { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Sled; +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_fee_amount(struct wire_cst_ffi_psbt *that); -typedef struct wire_cst_BdkError_Rpc { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Rpc; +void frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_from_str(int64_t port_, + struct wire_cst_list_prim_u_8_strict *psbt_base64); -typedef struct wire_cst_BdkError_Rusqlite { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_Rusqlite; +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_json_serialize(struct wire_cst_ffi_psbt *that); -typedef struct wire_cst_BdkError_InvalidInput { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_InvalidInput; +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_serialize(struct wire_cst_ffi_psbt *that); -typedef struct wire_cst_BdkError_InvalidLockTime { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_InvalidLockTime; +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_script_buf_as_string(struct wire_cst_ffi_script_buf *that); -typedef struct wire_cst_BdkError_InvalidTransaction { - struct wire_cst_list_prim_u_8_strict *field0; -} wire_cst_BdkError_InvalidTransaction; - -typedef union BdkErrorKind { - struct wire_cst_BdkError_Hex Hex; - struct wire_cst_BdkError_Consensus Consensus; - struct wire_cst_BdkError_VerifyTransaction VerifyTransaction; - struct wire_cst_BdkError_Address Address; - struct wire_cst_BdkError_Descriptor Descriptor; - struct wire_cst_BdkError_InvalidU32Bytes InvalidU32Bytes; - struct wire_cst_BdkError_Generic Generic; - struct wire_cst_BdkError_OutputBelowDustLimit OutputBelowDustLimit; - struct wire_cst_BdkError_InsufficientFunds InsufficientFunds; - struct wire_cst_BdkError_FeeRateTooLow FeeRateTooLow; - struct wire_cst_BdkError_FeeTooLow FeeTooLow; - struct wire_cst_BdkError_MissingKeyOrigin MissingKeyOrigin; - struct wire_cst_BdkError_Key Key; - struct wire_cst_BdkError_SpendingPolicyRequired SpendingPolicyRequired; - struct wire_cst_BdkError_InvalidPolicyPathError InvalidPolicyPathError; - struct wire_cst_BdkError_Signer Signer; - struct wire_cst_BdkError_InvalidNetwork InvalidNetwork; - struct wire_cst_BdkError_InvalidOutpoint InvalidOutpoint; - struct wire_cst_BdkError_Encode Encode; - struct wire_cst_BdkError_Miniscript Miniscript; - struct wire_cst_BdkError_MiniscriptPsbt MiniscriptPsbt; - struct wire_cst_BdkError_Bip32 Bip32; - struct wire_cst_BdkError_Bip39 Bip39; - struct wire_cst_BdkError_Secp256k1 Secp256k1; - struct wire_cst_BdkError_Json Json; - struct wire_cst_BdkError_Psbt Psbt; - struct wire_cst_BdkError_PsbtParse PsbtParse; - struct wire_cst_BdkError_MissingCachedScripts MissingCachedScripts; - struct wire_cst_BdkError_Electrum Electrum; - struct wire_cst_BdkError_Esplora Esplora; - struct wire_cst_BdkError_Sled Sled; - struct wire_cst_BdkError_Rpc Rpc; - struct wire_cst_BdkError_Rusqlite Rusqlite; - struct wire_cst_BdkError_InvalidInput InvalidInput; - struct wire_cst_BdkError_InvalidLockTime InvalidLockTime; - struct wire_cst_BdkError_InvalidTransaction InvalidTransaction; -} BdkErrorKind; - -typedef struct wire_cst_bdk_error { - int32_t tag; - union BdkErrorKind kind; -} wire_cst_bdk_error; +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_script_buf_empty(void); -typedef struct wire_cst_Payload_PubkeyHash { - struct wire_cst_list_prim_u_8_strict *pubkey_hash; -} wire_cst_Payload_PubkeyHash; +void frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_script_buf_with_capacity(int64_t port_, + uintptr_t capacity); -typedef struct wire_cst_Payload_ScriptHash { - struct wire_cst_list_prim_u_8_strict *script_hash; -} wire_cst_Payload_ScriptHash; +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_compute_txid(struct wire_cst_ffi_transaction *that); -typedef struct wire_cst_Payload_WitnessProgram { - int32_t version; - struct wire_cst_list_prim_u_8_strict *program; -} wire_cst_Payload_WitnessProgram; +void frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_from_bytes(int64_t port_, + struct wire_cst_list_prim_u_8_loose *transaction_bytes); -typedef union PayloadKind { - struct wire_cst_Payload_PubkeyHash PubkeyHash; - struct wire_cst_Payload_ScriptHash ScriptHash; - struct wire_cst_Payload_WitnessProgram WitnessProgram; -} PayloadKind; +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_input(struct wire_cst_ffi_transaction *that); -typedef struct wire_cst_payload { - int32_t tag; - union PayloadKind kind; -} wire_cst_payload; +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_is_coinbase(struct wire_cst_ffi_transaction *that); -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; +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_is_explicitly_rbf(struct wire_cst_ffi_transaction *that); -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; +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_is_lock_time_enabled(struct wire_cst_ffi_transaction *that); -void frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_broadcast(int64_t port_, - struct wire_cst_bdk_blockchain *that, - struct wire_cst_bdk_transaction *transaction); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_lock_time(struct wire_cst_ffi_transaction *that); -void frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_create(int64_t port_, - struct wire_cst_blockchain_config *blockchain_config); +void frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_new(int64_t port_, + int32_t version, + struct wire_cst_lock_time *lock_time, + struct wire_cst_list_tx_in *input, + struct wire_cst_list_tx_out *output); -void frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_estimate_fee(int64_t port_, - struct wire_cst_bdk_blockchain *that, - uint64_t target); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_output(struct wire_cst_ffi_transaction *that); -void frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_get_block_hash(int64_t port_, - struct wire_cst_bdk_blockchain *that, - uint32_t height); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_serialize(struct wire_cst_ffi_transaction *that); -void frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_get_height(int64_t port_, - struct wire_cst_bdk_blockchain *that); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_version(struct wire_cst_ffi_transaction *that); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_as_string(struct wire_cst_bdk_descriptor *that); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_vsize(struct wire_cst_ffi_transaction *that); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weight(struct wire_cst_bdk_descriptor *that); +void frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_weight(int64_t port_, + struct wire_cst_ffi_transaction *that); -void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new(int64_t port_, +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_as_string(struct wire_cst_ffi_descriptor *that); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_max_satisfaction_weight(struct wire_cst_ffi_descriptor *that); + +void frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new(int64_t port_, struct wire_cst_list_prim_u_8_strict *descriptor, int32_t network); -void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44(int64_t port_, - struct wire_cst_bdk_descriptor_secret_key *secret_key, +void frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip44(int64_t port_, + struct wire_cst_ffi_descriptor_secret_key *secret_key, int32_t keychain_kind, int32_t network); -void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44_public(int64_t port_, - struct wire_cst_bdk_descriptor_public_key *public_key, +void frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip44_public(int64_t port_, + struct wire_cst_ffi_descriptor_public_key *public_key, struct wire_cst_list_prim_u_8_strict *fingerprint, int32_t keychain_kind, int32_t network); -void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip49(int64_t port_, - struct wire_cst_bdk_descriptor_secret_key *secret_key, +void frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip49(int64_t port_, + struct wire_cst_ffi_descriptor_secret_key *secret_key, int32_t keychain_kind, int32_t network); -void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip49_public(int64_t port_, - struct wire_cst_bdk_descriptor_public_key *public_key, +void frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip49_public(int64_t port_, + struct wire_cst_ffi_descriptor_public_key *public_key, struct wire_cst_list_prim_u_8_strict *fingerprint, int32_t keychain_kind, int32_t network); -void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip84(int64_t port_, - struct wire_cst_bdk_descriptor_secret_key *secret_key, +void frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip84(int64_t port_, + struct wire_cst_ffi_descriptor_secret_key *secret_key, int32_t keychain_kind, int32_t network); -void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip84_public(int64_t port_, - struct wire_cst_bdk_descriptor_public_key *public_key, +void frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip84_public(int64_t port_, + struct wire_cst_ffi_descriptor_public_key *public_key, struct wire_cst_list_prim_u_8_strict *fingerprint, int32_t keychain_kind, int32_t network); -void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip86(int64_t port_, - struct wire_cst_bdk_descriptor_secret_key *secret_key, +void frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip86(int64_t port_, + struct wire_cst_ffi_descriptor_secret_key *secret_key, int32_t keychain_kind, int32_t network); -void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip86_public(int64_t port_, - struct wire_cst_bdk_descriptor_public_key *public_key, +void frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip86_public(int64_t port_, + struct wire_cst_ffi_descriptor_public_key *public_key, struct wire_cst_list_prim_u_8_strict *fingerprint, int32_t keychain_kind, int32_t network); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_to_string_private(struct wire_cst_bdk_descriptor *that); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_to_string_with_secret(struct wire_cst_ffi_descriptor *that); + +void frbgen_bdk_flutter_wire__crate__api__electrum__ffi_electrum_client_broadcast(int64_t port_, + struct wire_cst_ffi_electrum_client *opaque, + struct wire_cst_ffi_transaction *transaction); + +void frbgen_bdk_flutter_wire__crate__api__electrum__ffi_electrum_client_full_scan(int64_t port_, + struct wire_cst_ffi_electrum_client *opaque, + struct wire_cst_ffi_full_scan_request *request, + uint64_t stop_gap, + uint64_t batch_size, + bool fetch_prev_txouts); + +void frbgen_bdk_flutter_wire__crate__api__electrum__ffi_electrum_client_new(int64_t port_, + struct wire_cst_list_prim_u_8_strict *url); + +void frbgen_bdk_flutter_wire__crate__api__electrum__ffi_electrum_client_sync(int64_t port_, + struct wire_cst_ffi_electrum_client *opaque, + struct wire_cst_ffi_sync_request *request, + uint64_t batch_size, + bool fetch_prev_txouts); + +void frbgen_bdk_flutter_wire__crate__api__esplora__ffi_esplora_client_broadcast(int64_t port_, + struct wire_cst_ffi_esplora_client *opaque, + struct wire_cst_ffi_transaction *transaction); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_derivation_path_as_string(struct wire_cst_bdk_derivation_path *that); +void frbgen_bdk_flutter_wire__crate__api__esplora__ffi_esplora_client_full_scan(int64_t port_, + struct wire_cst_ffi_esplora_client *opaque, + struct wire_cst_ffi_full_scan_request *request, + uint64_t stop_gap, + uint64_t parallel_requests); -void frbgen_bdk_flutter_wire__crate__api__key__bdk_derivation_path_from_string(int64_t port_, +void frbgen_bdk_flutter_wire__crate__api__esplora__ffi_esplora_client_new(int64_t port_, + struct wire_cst_list_prim_u_8_strict *url); + +void frbgen_bdk_flutter_wire__crate__api__esplora__ffi_esplora_client_sync(int64_t port_, + struct wire_cst_ffi_esplora_client *opaque, + struct wire_cst_ffi_sync_request *request, + uint64_t parallel_requests); + +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__ffi_derivation_path_as_string(struct wire_cst_ffi_derivation_path *that); + +void frbgen_bdk_flutter_wire__crate__api__key__ffi_derivation_path_from_string(int64_t port_, struct wire_cst_list_prim_u_8_strict *path); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_as_string(struct wire_cst_bdk_descriptor_public_key *that); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_public_key_as_string(struct wire_cst_ffi_descriptor_public_key *that); -void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_derive(int64_t port_, - struct wire_cst_bdk_descriptor_public_key *ptr, - struct wire_cst_bdk_derivation_path *path); +void frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_public_key_derive(int64_t port_, + struct wire_cst_ffi_descriptor_public_key *opaque, + struct wire_cst_ffi_derivation_path *path); -void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_extend(int64_t port_, - struct wire_cst_bdk_descriptor_public_key *ptr, - struct wire_cst_bdk_derivation_path *path); +void frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_public_key_extend(int64_t port_, + struct wire_cst_ffi_descriptor_public_key *opaque, + struct wire_cst_ffi_derivation_path *path); -void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_from_string(int64_t port_, +void frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_public_key_from_string(int64_t port_, struct wire_cst_list_prim_u_8_strict *public_key); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_as_public(struct wire_cst_bdk_descriptor_secret_key *ptr); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_as_public(struct wire_cst_ffi_descriptor_secret_key *opaque); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_as_string(struct wire_cst_bdk_descriptor_secret_key *that); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_as_string(struct wire_cst_ffi_descriptor_secret_key *that); -void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_create(int64_t port_, +void frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_create(int64_t port_, int32_t network, - struct wire_cst_bdk_mnemonic *mnemonic, + struct wire_cst_ffi_mnemonic *mnemonic, struct wire_cst_list_prim_u_8_strict *password); -void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_derive(int64_t port_, - struct wire_cst_bdk_descriptor_secret_key *ptr, - struct wire_cst_bdk_derivation_path *path); +void frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_derive(int64_t port_, + struct wire_cst_ffi_descriptor_secret_key *opaque, + struct wire_cst_ffi_derivation_path *path); -void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_extend(int64_t port_, - struct wire_cst_bdk_descriptor_secret_key *ptr, - struct wire_cst_bdk_derivation_path *path); +void frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_extend(int64_t port_, + struct wire_cst_ffi_descriptor_secret_key *opaque, + struct wire_cst_ffi_derivation_path *path); -void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_from_string(int64_t port_, +void frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_from_string(int64_t port_, struct wire_cst_list_prim_u_8_strict *secret_key); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_secret_bytes(struct wire_cst_bdk_descriptor_secret_key *that); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_secret_bytes(struct wire_cst_ffi_descriptor_secret_key *that); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_as_string(struct wire_cst_bdk_mnemonic *that); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__ffi_mnemonic_as_string(struct wire_cst_ffi_mnemonic *that); -void frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_entropy(int64_t port_, +void frbgen_bdk_flutter_wire__crate__api__key__ffi_mnemonic_from_entropy(int64_t port_, struct wire_cst_list_prim_u_8_loose *entropy); -void frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_string(int64_t port_, +void frbgen_bdk_flutter_wire__crate__api__key__ffi_mnemonic_from_string(int64_t port_, struct wire_cst_list_prim_u_8_strict *mnemonic); -void frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_new(int64_t port_, int32_t word_count); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_as_string(struct wire_cst_bdk_psbt *that); +void frbgen_bdk_flutter_wire__crate__api__key__ffi_mnemonic_new(int64_t port_, int32_t word_count); -void frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_combine(int64_t port_, - struct wire_cst_bdk_psbt *ptr, - struct wire_cst_bdk_psbt *other); +void frbgen_bdk_flutter_wire__crate__api__store__ffi_connection_new(int64_t port_, + struct wire_cst_list_prim_u_8_strict *path); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_extract_tx(struct wire_cst_bdk_psbt *ptr); +void frbgen_bdk_flutter_wire__crate__api__store__ffi_connection_new_in_memory(int64_t port_); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_fee_amount(struct wire_cst_bdk_psbt *that); +void frbgen_bdk_flutter_wire__crate__api__tx_builder__finish_bump_fee_tx_builder(int64_t port_, + struct wire_cst_list_prim_u_8_strict *txid, + struct wire_cst_fee_rate *fee_rate, + struct wire_cst_ffi_wallet *wallet, + bool enable_rbf, + uint32_t *n_sequence); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_fee_rate(struct wire_cst_bdk_psbt *that); +void frbgen_bdk_flutter_wire__crate__api__tx_builder__tx_builder_finish(int64_t port_, + struct wire_cst_ffi_wallet *wallet, + struct wire_cst_list_record_ffi_script_buf_u_64 *recipients, + struct wire_cst_list_out_point *utxos, + struct wire_cst_list_out_point *un_spendable, + int32_t change_policy, + bool manually_selected_only, + struct wire_cst_fee_rate *fee_rate, + uint64_t *fee_absolute, + bool drain_wallet, + struct wire_cst_record_map_string_list_prim_usize_strict_keychain_kind *policy_path, + struct wire_cst_ffi_script_buf *drain_to, + struct wire_cst_rbf_value *rbf, + struct wire_cst_list_prim_u_8_loose *data); -void frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_from_str(int64_t port_, - struct wire_cst_list_prim_u_8_strict *psbt_base64); +void frbgen_bdk_flutter_wire__crate__api__types__change_spend_policy_default(int64_t port_); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_json_serialize(struct wire_cst_bdk_psbt *that); +void frbgen_bdk_flutter_wire__crate__api__types__ffi_full_scan_request_builder_build(int64_t port_, + struct wire_cst_ffi_full_scan_request_builder *that); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_serialize(struct wire_cst_bdk_psbt *that); +void frbgen_bdk_flutter_wire__crate__api__types__ffi_full_scan_request_builder_inspect_spks_for_all_keychains(int64_t port_, + struct wire_cst_ffi_full_scan_request_builder *that, + const void *inspector); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_txid(struct wire_cst_bdk_psbt *that); - -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_address_as_string(struct wire_cst_bdk_address *that); - -void frbgen_bdk_flutter_wire__crate__api__types__bdk_address_from_script(int64_t port_, - struct wire_cst_bdk_script_buf *script, - int32_t network); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__ffi_policy_id(struct wire_cst_ffi_policy *that); -void frbgen_bdk_flutter_wire__crate__api__types__bdk_address_from_string(int64_t port_, - struct wire_cst_list_prim_u_8_strict *address, - int32_t network); +void frbgen_bdk_flutter_wire__crate__api__types__ffi_sync_request_builder_build(int64_t port_, + struct wire_cst_ffi_sync_request_builder *that); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_address_is_valid_for_network(struct wire_cst_bdk_address *that, - int32_t network); +void frbgen_bdk_flutter_wire__crate__api__types__ffi_sync_request_builder_inspect_spks(int64_t port_, + struct wire_cst_ffi_sync_request_builder *that, + const void *inspector); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_address_network(struct wire_cst_bdk_address *that); +void frbgen_bdk_flutter_wire__crate__api__types__network_default(int64_t port_); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_address_payload(struct wire_cst_bdk_address *that); +void frbgen_bdk_flutter_wire__crate__api__types__sign_options_default(int64_t port_); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_address_script(struct wire_cst_bdk_address *ptr); +void frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_apply_update(int64_t port_, + struct wire_cst_ffi_wallet *that, + struct wire_cst_ffi_update *update); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_address_to_qr_uri(struct wire_cst_bdk_address *that); +void frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_calculate_fee(int64_t port_, + struct wire_cst_ffi_wallet *opaque, + struct wire_cst_ffi_transaction *tx); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_as_string(struct wire_cst_bdk_script_buf *that); +void frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_calculate_fee_rate(int64_t port_, + struct wire_cst_ffi_wallet *opaque, + struct wire_cst_ffi_transaction *tx); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_empty(void); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_get_balance(struct wire_cst_ffi_wallet *that); -void frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_from_hex(int64_t port_, - struct wire_cst_list_prim_u_8_strict *s); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_get_tx(struct wire_cst_ffi_wallet *that, + struct wire_cst_list_prim_u_8_strict *txid); -void frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_with_capacity(int64_t port_, - uintptr_t capacity); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_is_mine(struct wire_cst_ffi_wallet *that, + struct wire_cst_ffi_script_buf *script); -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_from_bytes(int64_t port_, - struct wire_cst_list_prim_u_8_loose *transaction_bytes); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_list_output(struct wire_cst_ffi_wallet *that); -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_input(int64_t port_, - struct wire_cst_bdk_transaction *that); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_list_unspent(struct wire_cst_ffi_wallet *that); -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_coin_base(int64_t port_, - struct wire_cst_bdk_transaction *that); +void frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_load(int64_t port_, + struct wire_cst_ffi_descriptor *descriptor, + struct wire_cst_ffi_descriptor *change_descriptor, + struct wire_cst_ffi_connection *connection); -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_explicitly_rbf(int64_t port_, - struct wire_cst_bdk_transaction *that); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_network(struct wire_cst_ffi_wallet *that); -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_lock_time_enabled(int64_t port_, - struct wire_cst_bdk_transaction *that); +void frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_new(int64_t port_, + struct wire_cst_ffi_descriptor *descriptor, + struct wire_cst_ffi_descriptor *change_descriptor, + int32_t network, + struct wire_cst_ffi_connection *connection); -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_lock_time(int64_t port_, - struct wire_cst_bdk_transaction *that); +void frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_persist(int64_t port_, + struct wire_cst_ffi_wallet *opaque, + struct wire_cst_ffi_connection *connection); -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_new(int64_t port_, - int32_t version, - struct wire_cst_lock_time *lock_time, - struct wire_cst_list_tx_in *input, - struct wire_cst_list_tx_out *output); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_policies(struct wire_cst_ffi_wallet *opaque, + int32_t keychain_kind); -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_output(int64_t port_, - struct wire_cst_bdk_transaction *that); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_reveal_next_address(struct wire_cst_ffi_wallet *opaque, + int32_t keychain_kind); -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_serialize(int64_t port_, - struct wire_cst_bdk_transaction *that); +void frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_sign(int64_t port_, + struct wire_cst_ffi_wallet *opaque, + struct wire_cst_ffi_psbt *psbt, + struct wire_cst_sign_options *sign_options); -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_size(int64_t port_, - struct wire_cst_bdk_transaction *that); +void frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_start_full_scan(int64_t port_, + struct wire_cst_ffi_wallet *that); -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_txid(int64_t port_, - struct wire_cst_bdk_transaction *that); +void frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_start_sync_with_revealed_spks(int64_t port_, + struct wire_cst_ffi_wallet *that); -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_version(int64_t port_, - struct wire_cst_bdk_transaction *that); +WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_transactions(struct wire_cst_ffi_wallet *that); -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_vsize(int64_t port_, - struct wire_cst_bdk_transaction *that); +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_corebitcoinAddress(const void *ptr); -void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_weight(int64_t port_, - struct wire_cst_bdk_transaction *that); +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_corebitcoinAddress(const void *ptr); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_address(struct wire_cst_bdk_wallet *ptr, - struct wire_cst_address_index *address_index); +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_corebitcoinTransaction(const void *ptr); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_balance(struct wire_cst_bdk_wallet *that); +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_corebitcoinTransaction(const void *ptr); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychain(struct wire_cst_bdk_wallet *ptr, - int32_t keychain); +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_electrumBdkElectrumClientbdk_electrumelectrum_clientClient(const void *ptr); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_internal_address(struct wire_cst_bdk_wallet *ptr, - struct wire_cst_address_index *address_index); +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_electrumBdkElectrumClientbdk_electrumelectrum_clientClient(const void *ptr); -void frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_psbt_input(int64_t port_, - struct wire_cst_bdk_wallet *that, - struct wire_cst_local_utxo *utxo, - bool only_witness_utxo, - struct wire_cst_psbt_sig_hash_type *sighash_type); +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_esploraesplora_clientBlockingClient(const void *ptr); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_is_mine(struct wire_cst_bdk_wallet *that, - struct wire_cst_bdk_script_buf *script); +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_esploraesplora_clientBlockingClient(const void *ptr); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_list_transactions(struct wire_cst_bdk_wallet *that, - bool include_raw); +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletUpdate(const void *ptr); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_list_unspent(struct wire_cst_bdk_wallet *that); +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletUpdate(const void *ptr); -WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_network(struct wire_cst_bdk_wallet *that); +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletbitcoinbip32DerivationPath(const void *ptr); -void frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_new(int64_t port_, - struct wire_cst_bdk_descriptor *descriptor, - struct wire_cst_bdk_descriptor *change_descriptor, - int32_t network, - struct wire_cst_database_config *database_config); +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletbitcoinbip32DerivationPath(const void *ptr); -void frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sign(int64_t port_, - struct wire_cst_bdk_wallet *ptr, - struct wire_cst_bdk_psbt *psbt, - struct wire_cst_sign_options *sign_options); +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletdescriptorExtendedDescriptor(const void *ptr); -void frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sync(int64_t port_, - struct wire_cst_bdk_wallet *ptr, - struct wire_cst_bdk_blockchain *blockchain); +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletdescriptorExtendedDescriptor(const void *ptr); -void frbgen_bdk_flutter_wire__crate__api__wallet__finish_bump_fee_tx_builder(int64_t port_, - struct wire_cst_list_prim_u_8_strict *txid, - float fee_rate, - struct wire_cst_bdk_address *allow_shrinking, - struct wire_cst_bdk_wallet *wallet, - bool enable_rbf, - uint32_t *n_sequence); +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletdescriptorPolicy(const void *ptr); -void frbgen_bdk_flutter_wire__crate__api__wallet__tx_builder_finish(int64_t port_, - struct wire_cst_bdk_wallet *wallet, - struct wire_cst_list_script_amount *recipients, - struct wire_cst_list_out_point *utxos, - struct wire_cst_record_out_point_input_usize *foreign_utxo, - struct wire_cst_list_out_point *un_spendable, - int32_t change_policy, - bool manually_selected_only, - float *fee_rate, - uint64_t *fee_absolute, - bool drain_wallet, - struct wire_cst_bdk_script_buf *drain_to, - struct wire_cst_rbf_value *rbf, - struct wire_cst_list_prim_u_8_loose *data); +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletdescriptorPolicy(const void *ptr); -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddress(const void *ptr); +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysDescriptorPublicKey(const void *ptr); -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress(const void *ptr); +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysDescriptorPublicKey(const void *ptr); -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath(const void *ptr); +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysDescriptorSecretKey(const void *ptr); -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath(const void *ptr); +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysDescriptorSecretKey(const void *ptr); -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkblockchainAnyBlockchain(const void *ptr); +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysKeyMap(const void *ptr); -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkblockchainAnyBlockchain(const void *ptr); +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysKeyMap(const void *ptr); -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor(const void *ptr); +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysbip39Mnemonic(const void *ptr); -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor(const void *ptr); +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysbip39Mnemonic(const void *ptr); -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorPublicKey(const void *ptr); +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestBuilderbdk_walletKeychainKind(const void *ptr); -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorPublicKey(const void *ptr); +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestBuilderbdk_walletKeychainKind(const void *ptr); -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorSecretKey(const void *ptr); +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestbdk_walletKeychainKind(const void *ptr); -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorSecretKey(const void *ptr); +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestbdk_walletKeychainKind(const void *ptr); -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysKeyMap(const void *ptr); +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestBuilderbdk_walletKeychainKindu32(const void *ptr); -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysKeyMap(const void *ptr); +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestBuilderbdk_walletKeychainKindu32(const void *ptr); -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysbip39Mnemonic(const void *ptr); +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestbdk_walletKeychainKindu32(const void *ptr); -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysbip39Mnemonic(const void *ptr); +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestbdk_walletKeychainKindu32(const void *ptr); -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase(const void *ptr); +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdk_corebitcoinpsbtPsbt(const void *ptr); -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase(const void *ptr); +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_corebitcoinpsbtPsbt(const void *ptr); -void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction(const void *ptr); +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdk_walletPersistedWalletbdk_walletrusqliteConnection(const void *ptr); -void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction(const void *ptr); +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_walletPersistedWalletbdk_walletrusqliteConnection(const void *ptr); -struct wire_cst_address_error *frbgen_bdk_flutter_cst_new_box_autoadd_address_error(void); +void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdk_walletrusqliteConnection(const void *ptr); -struct wire_cst_address_index *frbgen_bdk_flutter_cst_new_box_autoadd_address_index(void); +void frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_walletrusqliteConnection(const void *ptr); -struct wire_cst_bdk_address *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_address(void); +struct wire_cst_confirmation_block_time *frbgen_bdk_flutter_cst_new_box_autoadd_confirmation_block_time(void); -struct wire_cst_bdk_blockchain *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_blockchain(void); +struct wire_cst_fee_rate *frbgen_bdk_flutter_cst_new_box_autoadd_fee_rate(void); -struct wire_cst_bdk_derivation_path *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_derivation_path(void); +struct wire_cst_ffi_address *frbgen_bdk_flutter_cst_new_box_autoadd_ffi_address(void); -struct wire_cst_bdk_descriptor *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor(void); +struct wire_cst_ffi_canonical_tx *frbgen_bdk_flutter_cst_new_box_autoadd_ffi_canonical_tx(void); -struct wire_cst_bdk_descriptor_public_key *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor_public_key(void); +struct wire_cst_ffi_connection *frbgen_bdk_flutter_cst_new_box_autoadd_ffi_connection(void); -struct wire_cst_bdk_descriptor_secret_key *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_descriptor_secret_key(void); +struct wire_cst_ffi_derivation_path *frbgen_bdk_flutter_cst_new_box_autoadd_ffi_derivation_path(void); -struct wire_cst_bdk_mnemonic *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_mnemonic(void); +struct wire_cst_ffi_descriptor *frbgen_bdk_flutter_cst_new_box_autoadd_ffi_descriptor(void); -struct wire_cst_bdk_psbt *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_psbt(void); +struct wire_cst_ffi_descriptor_public_key *frbgen_bdk_flutter_cst_new_box_autoadd_ffi_descriptor_public_key(void); -struct wire_cst_bdk_script_buf *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_script_buf(void); +struct wire_cst_ffi_descriptor_secret_key *frbgen_bdk_flutter_cst_new_box_autoadd_ffi_descriptor_secret_key(void); -struct wire_cst_bdk_transaction *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_transaction(void); +struct wire_cst_ffi_electrum_client *frbgen_bdk_flutter_cst_new_box_autoadd_ffi_electrum_client(void); -struct wire_cst_bdk_wallet *frbgen_bdk_flutter_cst_new_box_autoadd_bdk_wallet(void); +struct wire_cst_ffi_esplora_client *frbgen_bdk_flutter_cst_new_box_autoadd_ffi_esplora_client(void); -struct wire_cst_block_time *frbgen_bdk_flutter_cst_new_box_autoadd_block_time(void); +struct wire_cst_ffi_full_scan_request *frbgen_bdk_flutter_cst_new_box_autoadd_ffi_full_scan_request(void); -struct wire_cst_blockchain_config *frbgen_bdk_flutter_cst_new_box_autoadd_blockchain_config(void); +struct wire_cst_ffi_full_scan_request_builder *frbgen_bdk_flutter_cst_new_box_autoadd_ffi_full_scan_request_builder(void); -struct wire_cst_consensus_error *frbgen_bdk_flutter_cst_new_box_autoadd_consensus_error(void); +struct wire_cst_ffi_mnemonic *frbgen_bdk_flutter_cst_new_box_autoadd_ffi_mnemonic(void); -struct wire_cst_database_config *frbgen_bdk_flutter_cst_new_box_autoadd_database_config(void); +struct wire_cst_ffi_policy *frbgen_bdk_flutter_cst_new_box_autoadd_ffi_policy(void); -struct wire_cst_descriptor_error *frbgen_bdk_flutter_cst_new_box_autoadd_descriptor_error(void); +struct wire_cst_ffi_psbt *frbgen_bdk_flutter_cst_new_box_autoadd_ffi_psbt(void); -struct wire_cst_electrum_config *frbgen_bdk_flutter_cst_new_box_autoadd_electrum_config(void); +struct wire_cst_ffi_script_buf *frbgen_bdk_flutter_cst_new_box_autoadd_ffi_script_buf(void); -struct wire_cst_esplora_config *frbgen_bdk_flutter_cst_new_box_autoadd_esplora_config(void); +struct wire_cst_ffi_sync_request *frbgen_bdk_flutter_cst_new_box_autoadd_ffi_sync_request(void); -float *frbgen_bdk_flutter_cst_new_box_autoadd_f_32(float value); +struct wire_cst_ffi_sync_request_builder *frbgen_bdk_flutter_cst_new_box_autoadd_ffi_sync_request_builder(void); -struct wire_cst_fee_rate *frbgen_bdk_flutter_cst_new_box_autoadd_fee_rate(void); +struct wire_cst_ffi_transaction *frbgen_bdk_flutter_cst_new_box_autoadd_ffi_transaction(void); -struct wire_cst_hex_error *frbgen_bdk_flutter_cst_new_box_autoadd_hex_error(void); +struct wire_cst_ffi_update *frbgen_bdk_flutter_cst_new_box_autoadd_ffi_update(void); -struct wire_cst_local_utxo *frbgen_bdk_flutter_cst_new_box_autoadd_local_utxo(void); +struct wire_cst_ffi_wallet *frbgen_bdk_flutter_cst_new_box_autoadd_ffi_wallet(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_record_map_string_list_prim_usize_strict_keychain_kind *frbgen_bdk_flutter_cst_new_box_autoadd_record_map_string_list_prim_usize_strict_keychain_kind(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_ffi_canonical_tx *frbgen_bdk_flutter_cst_new_list_ffi_canonical_tx(int32_t len); struct wire_cst_list_list_prim_u_8_strict *frbgen_bdk_flutter_cst_new_list_list_prim_u_8_strict(int32_t len); -struct wire_cst_list_local_utxo *frbgen_bdk_flutter_cst_new_list_local_utxo(int32_t len); +struct wire_cst_list_local_output *frbgen_bdk_flutter_cst_new_list_local_output(int32_t len); struct wire_cst_list_out_point *frbgen_bdk_flutter_cst_new_list_out_point(int32_t len); @@ -1130,164 +1424,190 @@ struct wire_cst_list_prim_u_8_loose *frbgen_bdk_flutter_cst_new_list_prim_u_8_lo 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_prim_usize_strict *frbgen_bdk_flutter_cst_new_list_prim_usize_strict(int32_t len); + +struct wire_cst_list_record_ffi_script_buf_u_64 *frbgen_bdk_flutter_cst_new_list_record_ffi_script_buf_u_64(int32_t len); -struct wire_cst_list_transaction_details *frbgen_bdk_flutter_cst_new_list_transaction_details(int32_t len); +struct wire_cst_list_record_string_list_prim_usize_strict *frbgen_bdk_flutter_cst_new_list_record_string_list_prim_usize_strict(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_confirmation_block_time); 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_ffi_address); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_ffi_canonical_tx); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_ffi_connection); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_ffi_derivation_path); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_ffi_descriptor); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_ffi_descriptor_public_key); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_ffi_descriptor_secret_key); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_ffi_electrum_client); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_ffi_esplora_client); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_ffi_full_scan_request); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_ffi_full_scan_request_builder); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_ffi_mnemonic); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_ffi_policy); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_ffi_psbt); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_ffi_script_buf); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_ffi_sync_request); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_ffi_sync_request_builder); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_ffi_transaction); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_ffi_update); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_ffi_wallet); 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_record_map_string_list_prim_usize_strict_keychain_kind); 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_ffi_canonical_tx); 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_local_output); 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_prim_usize_strict); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_record_ffi_script_buf_u_64); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_record_string_list_prim_usize_strict); dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_tx_in); dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_tx_out); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkblockchainAnyBlockchain); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorPublicKey); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorSecretKey); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysKeyMap); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysbip39Mnemonic); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddress); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkblockchainAnyBlockchain); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorPublicKey); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorSecretKey); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysKeyMap); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysbip39Mnemonic); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_broadcast); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_create); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_estimate_fee); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_get_block_hash); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_get_height); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weight); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44_public); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip49); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip49_public); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip84); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip84_public); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip86); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip86_public); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_to_string_private); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_derivation_path_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_derivation_path_from_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_derive); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_extend); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_from_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_as_public); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_create); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_derive); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_extend); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_from_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_secret_bytes); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_entropy); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_new); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_combine); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_extract_tx); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_fee_amount); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_fee_rate); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_from_str); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_json_serialize); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_serialize); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_txid); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_from_script); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_from_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_is_valid_for_network); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_network); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_payload); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_script); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_address_to_qr_uri); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_as_string); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_empty); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_from_hex); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_with_capacity); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_from_bytes); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_input); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_coin_base); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_explicitly_rbf); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_lock_time_enabled); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_lock_time); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_new); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_output); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_serialize); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_size); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_txid); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_version); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_vsize); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_weight); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_address); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_balance); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychain); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_internal_address); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_psbt_input); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_is_mine); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_list_transactions); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_list_unspent); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_network); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_new); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sign); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sync); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__finish_bump_fee_tx_builder); - dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__tx_builder_finish); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_corebitcoinAddress); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_corebitcoinTransaction); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_electrumBdkElectrumClientbdk_electrumelectrum_clientClient); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_esploraesplora_clientBlockingClient); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletUpdate); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletbitcoinbip32DerivationPath); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletdescriptorExtendedDescriptor); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletdescriptorPolicy); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysDescriptorPublicKey); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysDescriptorSecretKey); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysKeyMap); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysbip39Mnemonic); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestBuilderbdk_walletKeychainKind); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestbdk_walletKeychainKind); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestBuilderbdk_walletKeychainKindu32); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestbdk_walletKeychainKindu32); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_corebitcoinpsbtPsbt); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_walletPersistedWalletbdk_walletrusqliteConnection); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_walletrusqliteConnection); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_corebitcoinAddress); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_corebitcoinTransaction); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_electrumBdkElectrumClientbdk_electrumelectrum_clientClient); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_esploraesplora_clientBlockingClient); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletUpdate); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletbitcoinbip32DerivationPath); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletdescriptorExtendedDescriptor); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletdescriptorPolicy); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysDescriptorPublicKey); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysDescriptorSecretKey); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysKeyMap); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysbip39Mnemonic); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestBuilderbdk_walletKeychainKind); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestbdk_walletKeychainKind); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestBuilderbdk_walletKeychainKindu32); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestbdk_walletKeychainKindu32); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdk_corebitcoinpsbtPsbt); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdk_walletPersistedWalletbdk_walletrusqliteConnection); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdk_walletrusqliteConnection); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_from_script); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_from_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_is_valid_for_network); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_script); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_to_qr_uri); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_combine); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_extract_tx); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_fee_amount); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_from_str); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_json_serialize); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_serialize); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_script_buf_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_script_buf_empty); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_script_buf_with_capacity); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_compute_txid); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_from_bytes); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_input); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_is_coinbase); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_is_explicitly_rbf); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_is_lock_time_enabled); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_lock_time); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_output); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_serialize); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_version); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_vsize); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_weight); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_max_satisfaction_weight); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip44); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip44_public); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip49); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip49_public); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip84); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip84_public); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip86); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip86_public); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_to_string_with_secret); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__electrum__ffi_electrum_client_broadcast); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__electrum__ffi_electrum_client_full_scan); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__electrum__ffi_electrum_client_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__electrum__ffi_electrum_client_sync); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__esplora__ffi_esplora_client_broadcast); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__esplora__ffi_esplora_client_full_scan); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__esplora__ffi_esplora_client_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__esplora__ffi_esplora_client_sync); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__ffi_derivation_path_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__ffi_derivation_path_from_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_public_key_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_public_key_derive); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_public_key_extend); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_public_key_from_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_as_public); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_create); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_derive); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_extend); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_from_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_secret_bytes); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__ffi_mnemonic_as_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__ffi_mnemonic_from_entropy); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__ffi_mnemonic_from_string); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__ffi_mnemonic_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__store__ffi_connection_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__store__ffi_connection_new_in_memory); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__tx_builder__finish_bump_fee_tx_builder); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__tx_builder__tx_builder_finish); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__change_spend_policy_default); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__ffi_full_scan_request_builder_build); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__ffi_full_scan_request_builder_inspect_spks_for_all_keychains); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__ffi_policy_id); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__ffi_sync_request_builder_build); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__ffi_sync_request_builder_inspect_spks); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__network_default); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__sign_options_default); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_apply_update); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_calculate_fee); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_calculate_fee_rate); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_get_balance); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_get_tx); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_is_mine); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_list_output); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_list_unspent); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_load); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_network); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_new); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_persist); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_policies); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_reveal_next_address); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_sign); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_start_full_scan); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_start_sync_with_revealed_spks); + dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_transactions); dummy_var ^= ((int64_t) (void*) store_dart_post_cobject); return dummy_var; } diff --git a/macos/bdk_flutter.podspec b/macos/bdk_flutter.podspec index c1ff53ea..be902df8 100644 --- a/macos/bdk_flutter.podspec +++ b/macos/bdk_flutter.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'bdk_flutter' - s.version = "0.31.2" + s.version = '1.0.0-alpha.11' 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 a003e3c9..b4c87284 100644 --- a/makefile +++ b/makefile @@ -11,12 +11,12 @@ help: makefile ## init: Install missing dependencies. init: - cargo install flutter_rust_bridge_codegen --version 2.0.0 + cargo install flutter_rust_bridge_codegen --version 2.4.0 ## : -all: init generate-bindings +all: init native -generate-bindings: +native: @echo "[GENERATING FRB CODE] $@" flutter_rust_bridge_codegen generate @echo "[Done ✅]" diff --git a/pubspec.lock b/pubspec.lock index b05e769c..458e5fb8 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -234,10 +234,10 @@ packages: dependency: "direct main" description: name: flutter_rust_bridge - sha256: f703c4b50e253e53efc604d50281bbaefe82d615856f8ae1e7625518ae252e98 + sha256: a43a6649385b853bc836ef2bc1b056c264d476c35e131d2d69c38219b5e799f1 url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.4.0" flutter_test: dependency: "direct dev" description: flutter @@ -327,18 +327,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" url: "https://pub.dev" source: hosted - version: "10.0.4" + version: "10.0.5" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.5" leak_tracker_testing: dependency: transitive description: @@ -375,18 +375,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" meta: dependency: "direct main" description: name: meta - sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.12.0" + version: "1.15.0" mime: dependency: transitive description: @@ -540,10 +540,10 @@ packages: dependency: transitive description: name: test_api - sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.7.0" + version: "0.7.2" timing: dependency: transitive description: @@ -580,10 +580,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" url: "https://pub.dev" source: hosted - version: "14.2.1" + version: "14.2.5" watcher: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index aab02e5f..a36c5072 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: bdk_flutter description: A Flutter library for the Bitcoin Development Kit(bdk) (https://bitcoindevkit.org/) -version: 0.31.2 +version: 1.0.0-alpha.11 homepage: https://github.com/LtbLightning/bdk-flutter environment: @@ -10,7 +10,7 @@ environment: dependencies: flutter: sdk: flutter - flutter_rust_bridge: ">2.0.0-dev.41 <= 2.0.0" + flutter_rust_bridge: ">2.3.0 <=2.4.0" ffi: ^2.0.1 freezed_annotation: ^2.2.0 mockito: ^5.4.0 diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 845c186e..6621578a 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -19,14 +19,9 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "ahash" -version = "0.7.8" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" -dependencies = [ - "getrandom", - "once_cell", - "version_check", -] +checksum = "0453232ace82dee0dd0b4c87a59bd90f7b53b314f3e0f61fe2ee7c8a16482289" [[package]] name = "ahash" @@ -60,12 +55,6 @@ dependencies = [ "backtrace", ] -[[package]] -name = "allocator-api2" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" - [[package]] name = "android_log-sys" version = "0.3.1" @@ -91,21 +80,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" [[package]] -name = "assert_matches" -version = "1.5.0" +name = "arrayvec" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] -name = "async-trait" -version = "0.1.80" +name = "assert_matches" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.59", -] +checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" [[package]] name = "atomic" @@ -134,6 +118,22 @@ dependencies = [ "rustc-demangle", ] +[[package]] +name = "base58ck" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c8d66485a3a2ea485c1913c4572ce0256067a5377ac8c75c4960e1cda98605f" +dependencies = [ + "bitcoin-internals", + "bitcoin_hashes 0.14.0", +] + +[[package]] +name = "base64" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" + [[package]] name = "base64" version = "0.13.1" @@ -147,60 +147,101 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] -name = "bdk" -version = "0.29.0" +name = "bdk_bitcoind_rpc" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fc1fc1a92e0943bfbcd6eb7d32c1b2a79f2f1357eb1e2eee9d7f36d6d7ca44a" +checksum = "5baa4cee070856947029bcaec4a5c070d1b34825909b364cfdb124f4ed3b7e40" dependencies = [ - "ahash 0.7.8", - "async-trait", - "bdk-macros", - "bip39", + "bdk_core", + "bitcoin", + "bitcoincore-rpc", +] + +[[package]] +name = "bdk_chain" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e553c45ffed860aa7e0c6998c3a827fcdc039a2df76307563208ecfcae2f750" +dependencies = [ + "bdk_core", "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" +name = "bdk_core" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81c1980e50ae23bb6efa9283ae8679d6ea2c6fa6a99fe62533f65f4a25a1a56c" +checksum = "5c0b45300422611971b0bbe84b04d18e38e81a056a66860c9dd3434f6d0f5396" dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "bitcoin", + "hashbrown 0.9.1", + "serde", +] + +[[package]] +name = "bdk_electrum" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d371f3684d55ab4fd741ac95840a9ba6e53a2654ad9edfbdb3c22f29fd48546f" +dependencies = [ + "bdk_core", + "electrum-client", +] + +[[package]] +name = "bdk_esplora" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cc9b320b2042e9729739eed66c6fc47b208554c8c6e393785cd56d257045e9f" +dependencies = [ + "bdk_core", + "esplora-client", + "miniscript", ] [[package]] name = "bdk_flutter" -version = "0.31.2" +version = "1.0.0-alpha.11" dependencies = [ "anyhow", "assert_matches", - "bdk", + "bdk_bitcoind_rpc", + "bdk_core", + "bdk_electrum", + "bdk_esplora", + "bdk_wallet", "flutter_rust_bridge", - "rand", + "lazy_static", + "serde", + "serde_json", + "thiserror", + "tokio", +] + +[[package]] +name = "bdk_wallet" +version = "1.0.0-beta.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aeb48cd8e0a15d0bf7351fc8c30e44c474be01f4f98eb29f20ab59b645bd29c" +dependencies = [ + "bdk_chain", + "bip39", + "bitcoin", + "miniscript", + "rand_core", "serde", "serde_json", ] [[package]] name = "bech32" -version = "0.9.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" +checksum = "d965446196e3b7decd44aa7ee49e31d630118f90ef12f97900f262eb915c951d" [[package]] name = "bip39" @@ -215,14 +256,18 @@ dependencies = [ [[package]] name = "bitcoin" -version = "0.30.2" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1945a5048598e4189e239d3f809b19bdad4845c4b2ba400d304d2dcf26d2c462" +checksum = "ea507acc1cd80fc084ace38544bbcf7ced7c2aa65b653b102de0ce718df668f6" dependencies = [ - "base64 0.13.1", + "base58ck", + "base64 0.21.7", "bech32", - "bitcoin-private", - "bitcoin_hashes 0.12.0", + "bitcoin-internals", + "bitcoin-io", + "bitcoin-units", + "bitcoin_hashes 0.14.0", + "hex-conservative", "hex_lit", "secp256k1", "serde", @@ -230,15 +275,28 @@ dependencies = [ [[package]] name = "bitcoin-internals" -version = "0.1.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f9997f8650dd818369931b5672a18dbef95324d0513aa99aae758de8ce86e5b" +checksum = "30bdbe14aa07b06e6cfeffc529a1f099e5fbe249524f8125358604df99a4bed2" +dependencies = [ + "serde", +] [[package]] -name = "bitcoin-private" -version = "0.1.0" +name = "bitcoin-io" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73290177011694f38ec25e165d0387ab7ea749a4b81cd4c80dae5988229f7a57" +checksum = "340e09e8399c7bd8912f495af6aa58bea0c9214773417ffaa8f6460f93aaee56" + +[[package]] +name = "bitcoin-units" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5285c8bcaa25876d07f37e3d30c303f2609179716e11d688f51e8f1fe70063e2" +dependencies = [ + "bitcoin-internals", + "serde", +] [[package]] name = "bitcoin_hashes" @@ -248,19 +306,44 @@ checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4" [[package]] name = "bitcoin_hashes" -version = "0.12.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d7066118b13d4b20b23645932dfb3a81ce7e29f95726c2036fa33cd7b092501" +checksum = "bb18c03d0db0247e147a21a6faafd5a7eb851c743db062de72018b6b7e8e4d16" dependencies = [ - "bitcoin-private", + "bitcoin-io", + "hex-conservative", "serde", ] +[[package]] +name = "bitcoincore-rpc" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aedd23ae0fd321affb4bbbc36126c6f49a32818dc6b979395d24da8c9d4e80ee" +dependencies = [ + "bitcoincore-rpc-json", + "jsonrpc", + "log", + "serde", + "serde_json", +] + +[[package]] +name = "bitcoincore-rpc-json" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8909583c5fab98508e80ef73e5592a651c954993dc6b7739963257d19f0e71a" +dependencies = [ + "bitcoin", + "serde", + "serde_json", +] + [[package]] name = "bitflags" -version = "1.3.2" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "block-buffer" @@ -317,56 +400,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "core-rpc" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d77079e1b71c2778d6e1daf191adadcd4ff5ec3ccad8298a79061d865b235b" -dependencies = [ - "bitcoin-private", - "core-rpc-json", - "jsonrpc", - "log", - "serde", - "serde_json", -] - -[[package]] -name = "core-rpc-json" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581898ed9a83f31c64731b1d8ca2dfffcfec14edf1635afacd5234cddbde3a41" -dependencies = [ - "bitcoin", - "bitcoin-private", - "serde", - "serde_json", -] - -[[package]] -name = "crc32fast" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" - [[package]] name = "crypto-common" version = "0.1.6" @@ -404,7 +437,7 @@ checksum = "51aac4c99b2e6775164b412ea33ae8441b2fde2dbf05a20bc0052a63d08c475b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn", ] [[package]] @@ -419,20 +452,18 @@ dependencies = [ [[package]] name = "electrum-client" -version = "0.18.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bc133f1c8d829d254f013f946653cbeb2b08674b960146361d1e9b67733ad19" +checksum = "7a0bd443023f9f5c4b7153053721939accc7113cbdf810a024434eed454b3db1" dependencies = [ "bitcoin", - "bitcoin-private", "byteorder", "libc", "log", - "rustls 0.21.10", + "rustls 0.23.12", "serde", "serde_json", - "webpki", - "webpki-roots 0.22.6", + "webpki-roots", "winapi", ] @@ -448,22 +479,22 @@ dependencies = [ [[package]] name = "esplora-client" -version = "0.6.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cb1f7f2489cce83bc3bd92784f9ba5271eeb6e729b975895fc541f78cbfcdca" +checksum = "9b546e91283ebfc56337de34e0cf814e3ad98083afde593b8e58495ee5355d0e" dependencies = [ "bitcoin", - "bitcoin-internals", + "hex-conservative", "log", + "minreq", "serde", - "ureq", ] [[package]] name = "fallible-iterator" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" +checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" [[package]] name = "fallible-streaming-iterator" @@ -471,21 +502,11 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" -[[package]] -name = "flate2" -version = "1.0.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - [[package]] name = "flutter_rust_bridge" -version = "2.0.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "033e831e28f1077ceae3490fb6d093dfdefefd09c5c6e8544c6579effe7e814f" +checksum = "6ff967a5893be60d849e4362910762acdc275febe44333153a11dcec1bca2cd2" dependencies = [ "allo-isolate", "android_logger", @@ -500,6 +521,7 @@ dependencies = [ "futures", "js-sys", "lazy_static", + "log", "oslog", "threadpool", "tokio", @@ -510,34 +532,15 @@ dependencies = [ [[package]] name = "flutter_rust_bridge_macros" -version = "2.0.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0217fc4b7131b52578be60bbe38c76b3edfc2f9fecab46d9f930510f40ef9023" +checksum = "d48b4d3fae9d29377b19134a38386d8792bde70b9448cde49e96391bcfc8fed1" dependencies = [ "hex", "md-5", "proc-macro2", "quote", - "syn 2.0.59", -] - -[[package]] -name = "form_urlencoded" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "fs2" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" -dependencies = [ - "libc", - "winapi", + "syn", ] [[package]] @@ -596,7 +599,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn", ] [[package]] @@ -629,15 +632,6 @@ dependencies = [ "slab", ] -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - [[package]] name = "generic-array" version = "0.14.7" @@ -667,21 +661,30 @@ checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" +dependencies = [ + "ahash 0.4.8", + "serde", +] + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash 0.8.11", - "allocator-api2", ] [[package]] name = "hashlink" -version = "0.8.4" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" +checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" dependencies = [ - "hashbrown", + "hashbrown 0.14.5", ] [[package]] @@ -697,29 +700,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] -name = "hex_lit" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3011d1213f159867b13cfd6ac92d2cd5f1345762c63be3554e84092d85a50bbd" - -[[package]] -name = "idna" -version = "0.5.0" +name = "hex-conservative" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "5313b072ce3c597065a808dbf612c4c8e8590bdbf8b579508bf7a762c5eae6cd" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "arrayvec", ] [[package]] -name = "instant" -version = "0.1.12" +name = "hex_lit" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] +checksum = "3011d1213f159867b13cfd6ac92d2cd5f1345762c63be3554e84092d85a50bbd" [[package]] name = "itoa" @@ -738,20 +731,21 @@ dependencies = [ [[package]] name = "jsonrpc" -version = "0.13.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd8d6b3f301ba426b30feca834a2a18d48d5b54e5065496b5c1b05537bee3639" +checksum = "3662a38d341d77efecb73caf01420cfa5aa63c0253fd7bc05289ef9f6616e1bf" dependencies = [ "base64 0.13.1", + "minreq", "serde", "serde_json", ] [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" @@ -761,25 +755,15 @@ checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "libsqlite3-sys" -version = "0.25.2" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29f835d03d717946d28b1d1ed632eb6f0e24a299388ee623d0c23118d3e8a7fa" +checksum = "0c10584274047cb335c23d3e61bcef8e323adae7c5c8c760540f73610177fc3f" dependencies = [ "cc", "pkg-config", "vcpkg", ] -[[package]] -name = "lock_api" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" -dependencies = [ - "autocfg", - "scopeguard", -] - [[package]] name = "log" version = "0.4.21" @@ -804,12 +788,12 @@ checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "miniscript" -version = "10.0.0" +version = "12.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1eb102b66b2127a872dbcc73095b7b47aeb9d92f7b03c2b2298253ffc82c7594" +checksum = "add2d4aee30e4291ce5cffa3a322e441ff4d4bc57b38c8d9bf0e94faa50ab626" dependencies = [ + "bech32", "bitcoin", - "bitcoin-private", "serde", ] @@ -822,6 +806,22 @@ dependencies = [ "adler", ] +[[package]] +name = "minreq" +version = "2.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "763d142cdff44aaadd9268bebddb156ef6c65a0e13486bb81673cf2d8739f9b0" +dependencies = [ + "base64 0.12.3", + "log", + "once_cell", + "rustls 0.21.10", + "rustls-webpki 0.101.7", + "serde", + "serde_json", + "webpki-roots", +] + [[package]] name = "num_cpus" version = "1.16.0" @@ -858,37 +858,6 @@ dependencies = [ "log", ] -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" -dependencies = [ - "cfg-if", - "instant", - "libc", - "redox_syscall", - "smallvec", - "winapi", -] - -[[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - [[package]] name = "pin-project-lite" version = "0.2.14" @@ -961,15 +930,6 @@ dependencies = [ "getrandom", ] -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags", -] - [[package]] name = "regex" version = "1.10.4" @@ -1016,9 +976,9 @@ dependencies = [ [[package]] name = "rusqlite" -version = "0.28.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01e213bc3ecb39ac32e81e51ebe31fd888a940515173e3a18a35f8c6e896422a" +checksum = "b838eba278d213a8beaf485bd313fd580ca4505a00d5871caeb1457c55322cae" dependencies = [ "bitflags", "fallible-iterator", @@ -1048,23 +1008,24 @@ dependencies = [ [[package]] name = "rustls" -version = "0.22.3" +version = "0.23.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99008d7ad0bbbea527ec27bddbc0e432c5b87d8175178cee68d2eec9c4a1813c" +checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" dependencies = [ "log", + "once_cell", "ring", "rustls-pki-types", - "rustls-webpki 0.102.2", + "rustls-webpki 0.102.7", "subtle", "zeroize", ] [[package]] name = "rustls-pki-types" -version = "1.4.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd36cc4259e3e4514335c4a138c6b43171a8d61d8f5c9348f9fc7529416f247" +checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" [[package]] name = "rustls-webpki" @@ -1078,9 +1039,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.102.2" +version = "0.102.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faaa0a62740bedb9b2ef5afa303da42764c012f743917351dc9a237ea1663610" +checksum = "84678086bd54edf2b415183ed7a94d0efb049f1b646a33e22a36f3794be6ae56" dependencies = [ "ring", "rustls-pki-types", @@ -1093,12 +1054,6 @@ version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - [[package]] name = "sct" version = "0.7.1" @@ -1111,11 +1066,11 @@ dependencies = [ [[package]] name = "secp256k1" -version = "0.27.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25996b82292a7a57ed3508f052cfff8640d38d32018784acd714758b43da9c8f" +checksum = "0e0cc0f1cf93f4969faf3ea1c7d8a9faed25918d96affa959720823dfe86d4f3" dependencies = [ - "bitcoin_hashes 0.12.0", + "bitcoin_hashes 0.14.0", "rand", "secp256k1-sys", "serde", @@ -1123,9 +1078,9 @@ dependencies = [ [[package]] name = "secp256k1-sys" -version = "0.8.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70a129b9e9efbfb223753b9163c4ab3b13cff7fd9c7f010fbac25ab4099fa07e" +checksum = "1433bd67156263443f14d603720b082dd3121779323fce20cba2aa07b874bc1b" dependencies = [ "cc", ] @@ -1147,7 +1102,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn", ] [[package]] @@ -1170,39 +1125,12 @@ dependencies = [ "autocfg", ] -[[package]] -name = "sled" -version = "0.34.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f96b4737c2ce5987354855aed3797279def4ebf734436c6aa4552cf8e169935" -dependencies = [ - "crc32fast", - "crossbeam-epoch", - "crossbeam-utils", - "fs2", - "fxhash", - "libc", - "log", - "parking_lot", -] - [[package]] name = "smallvec" version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" -[[package]] -name = "socks" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0c3dbbd9ae980613c6dd8e28a9407b50509d3803b57624d5dfe8315218cd58b" -dependencies = [ - "byteorder", - "libc", - "winapi", -] - [[package]] name = "spin" version = "0.9.8" @@ -1217,9 +1145,9 @@ checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "syn" -version = "1.0.109" +version = "2.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +checksum = "4a6531ffc7b071655e4ce2e04bd464c4830bb585a61cabb96cf808f05172615a" dependencies = [ "proc-macro2", "quote", @@ -1227,14 +1155,23 @@ dependencies = [ ] [[package]] -name = "syn" -version = "2.0.59" +name = "thiserror" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a6531ffc7b071655e4ce2e04bd464c4830bb585a61cabb96cf808f05172615a" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "unicode-ident", + "syn", ] [[package]] @@ -1248,9 +1185,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -1263,25 +1200,12 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.37.0" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" 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]] @@ -1290,12 +1214,6 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" -[[package]] -name = "unicode-bidi" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" - [[package]] name = "unicode-ident" version = "1.0.12" @@ -1317,37 +1235,6 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" -[[package]] -name = "ureq" -version = "2.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11f214ce18d8b2cbe84ed3aa6486ed3f5b285cf8d8fbdbce9f3f767a724adc35" -dependencies = [ - "base64 0.21.7", - "flate2", - "log", - "once_cell", - "rustls 0.22.3", - "rustls-pki-types", - "rustls-webpki 0.102.2", - "serde", - "serde_json", - "socks", - "url", - "webpki-roots 0.26.1", -] - -[[package]] -name = "url" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - [[package]] name = "vcpkg" version = "0.2.15" @@ -1387,7 +1274,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.59", + "syn", "wasm-bindgen-shared", ] @@ -1421,7 +1308,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -1442,33 +1329,11 @@ dependencies = [ "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" +version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3de34ae270483955a94f4b21bdaaeb83d508bb84a01435f393818edb0012009" -dependencies = [ - "rustls-pki-types", -] +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "winapi" @@ -1567,22 +1432,22 @@ checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] name = "zerocopy" -version = "0.7.32" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.32" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.59", + "syn", ] [[package]] diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 00455be6..f1d39f02 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bdk_flutter" -version = "0.31.2" +version = "1.0.0-alpha.11" edition = "2021" [lib] @@ -9,12 +9,18 @@ crate-type = ["staticlib", "cdylib"] assert_matches = "1.5" anyhow = "1.0.68" [dependencies] -flutter_rust_bridge = "=2.0.0" -rand = "0.8" -bdk = { version = "0.29.0", features = ["all-keys", "use-esplora-ureq", "sqlite-bundled", "rpc"] } +flutter_rust_bridge = "=2.4.0" +bdk_wallet = { version = "1.0.0-beta.4", features = ["all-keys", "keys-bip39", "rusqlite"] } +bdk_core = { version = "0.2.0" } +bdk_esplora = { version = "0.18.0", default-features = false, features = ["std", "blocking", "blocking-https-rustls"] } +bdk_electrum = { version = "0.18.0", default-features = false, features = ["use-rustls-ring"] } +bdk_bitcoind_rpc = { version = "0.15.0" } serde = "1.0.89" serde_json = "1.0.96" anyhow = "1.0.68" +thiserror = "1.0.63" +tokio = {version = "1.40.0", default-features = false, features = ["rt"]} +lazy_static = "1.5.0" [profile.release] strip = true diff --git a/rust/src/api/bitcoin.rs b/rust/src/api/bitcoin.rs new file mode 100644 index 00000000..60229246 --- /dev/null +++ b/rust/src/api/bitcoin.rs @@ -0,0 +1,840 @@ +use bdk_core::bitcoin::{ + absolute::{Height, Time}, + address::FromScriptError, + consensus::Decodable, + io::Cursor, + transaction::Version, +}; +use bdk_wallet::psbt::PsbtUtils; +use flutter_rust_bridge::frb; +use std::{ops::Deref, str::FromStr}; + +use crate::frb_generated::RustOpaque; + +use super::{ + error::{ + AddressParseError, ExtractTxError, PsbtError, PsbtParseError, TransactionError, + TxidParseError, + }, + types::{LockTime, Network}, +}; + +pub struct FfiAddress(pub RustOpaque); +impl From for FfiAddress { + fn from(value: bdk_core::bitcoin::Address) -> Self { + Self(RustOpaque::new(value)) + } +} +impl From<&FfiAddress> for bdk_core::bitcoin::Address { + fn from(value: &FfiAddress) -> Self { + (*value.0).clone() + } +} +impl FfiAddress { + pub fn from_string(address: String, network: Network) -> Result { + match bdk_core::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: FfiScriptBuf, network: Network) -> Result { + bdk_core::bitcoin::Address::from_script( + >::into(script).as_script(), + bdk_core::bitcoin::params::Params::new(network.into()), + ) + .map(|a| a.into()) + .map_err(|e| e.into()) + } + + #[frb(sync)] + pub fn to_qr_uri(&self) -> String { + self.0.to_qr_uri() + } + + #[frb(sync)] + pub fn script(opaque: FfiAddress) -> FfiScriptBuf { + opaque.0.script_pubkey().into() + } + + #[frb(sync)] + pub fn is_valid_for_network(&self, network: Network) -> bool { + if + let Ok(unchecked_address) = self.0 + .to_string() + .parse::>() + { + unchecked_address.is_valid_for_network(network.into()) + } else { + false + } + } + #[frb(sync)] + pub fn as_string(&self) -> String { + self.0.to_string() + } +} + +#[derive(Clone, Debug)] +pub struct FfiScriptBuf { + pub bytes: Vec, +} +impl From for FfiScriptBuf { + fn from(value: bdk_core::bitcoin::ScriptBuf) -> Self { + Self { + bytes: value.as_bytes().to_vec(), + } + } +} +impl From for bdk_core::bitcoin::ScriptBuf { + fn from(value: FfiScriptBuf) -> Self { + bdk_core::bitcoin::ScriptBuf::from_bytes(value.bytes) + } +} +impl FfiScriptBuf { + #[frb(sync)] + ///Creates a new empty script. + pub fn empty() -> FfiScriptBuf { + bdk_core::bitcoin::ScriptBuf::new().into() + } + ///Creates a new empty script with pre-allocated capacity. + pub fn with_capacity(capacity: usize) -> FfiScriptBuf { + bdk_core::bitcoin::ScriptBuf::with_capacity(capacity).into() + } + + // pub fn from_hex(s: String) -> Result { + // bdk_core::bitcoin::ScriptBuf + // ::from_hex(s.as_str()) + // .map(|e| e.into()) + // .map_err(|e| { + // match e { + // bdk_core::bitcoin::hex::HexToBytesError::InvalidChar(e) => HexToByteError(e), + // HexToBytesError::OddLengthString(e) => + // BdkError::Hex(HexError::OddLengthString(e)), + // } + // }) + // } + #[frb(sync)] + pub fn as_string(&self) -> String { + let script: bdk_core::bitcoin::ScriptBuf = self.to_owned().into(); + script.to_string() + } +} + +pub struct FfiTransaction { + pub opaque: RustOpaque, +} +impl From<&FfiTransaction> for bdk_core::bitcoin::Transaction { + fn from(value: &FfiTransaction) -> Self { + (*value.opaque).clone() + } +} +impl From for FfiTransaction { + fn from(value: bdk_core::bitcoin::Transaction) -> Self { + FfiTransaction { + opaque: RustOpaque::new(value), + } + } +} +impl FfiTransaction { + 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() + .map_err(|_| TransactionError::OtherTransactionErr)?, + ); + } + let output = output + .into_iter() + .map(|e| <&TxOut as Into>::into(&e)) + .collect(); + let lock_time = match lock_time { + LockTime::Blocks(height) => bdk_core::bitcoin::absolute::LockTime::Blocks( + Height::from_consensus(height) + .map_err(|_| TransactionError::OtherTransactionErr)?, + ), + LockTime::Seconds(time) => bdk_core::bitcoin::absolute::LockTime::Seconds( + Time::from_consensus(time).map_err(|_| TransactionError::OtherTransactionErr)?, + ), + }; + Ok((bdk_core::bitcoin::Transaction { + version: Version::non_standard(version), + lock_time: lock_time, + input: inputs, + output, + }) + .into()) + } + + pub fn from_bytes(transaction_bytes: Vec) -> Result { + let mut decoder = Cursor::new(transaction_bytes); + let tx: bdk_core::bitcoin::transaction::Transaction = + bdk_core::bitcoin::transaction::Transaction::consensus_decode(&mut decoder)?; + Ok(tx.into()) + } + #[frb(sync)] + /// Computes the [`Txid`]. + /// + /// Hashes the transaction **excluding** the segwit data (i.e. the marker, flag bytes, and the + /// witness fields themselves). For non-segwit transactions which do not have any segwit data, + pub fn compute_txid(&self) -> String { + <&FfiTransaction as Into>::into(self) + .compute_txid() + .to_string() + } + ///Returns the regular byte-wise consensus-serialized size of this transaction. + pub fn weight(&self) -> u64 { + <&FfiTransaction as Into>::into(self) + .weight() + .to_wu() + } + #[frb(sync)] + ///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 { + <&FfiTransaction as Into>::into(self).vsize() as u64 + } + #[frb(sync)] + ///Encodes an object into a vector. + pub fn serialize(&self) -> Vec { + let tx = <&FfiTransaction as Into>::into(self); + bdk_core::bitcoin::consensus::serialize(&tx) + } + #[frb(sync)] + ///Is this a coin base transaction? + pub fn is_coinbase(&self) -> bool { + <&FfiTransaction as Into>::into(self).is_coinbase() + } + #[frb(sync)] + ///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 { + <&FfiTransaction as Into>::into(self).is_explicitly_rbf() + } + #[frb(sync)] + ///Returns true if this transactions nLockTime is enabled (BIP-65 ). + pub fn is_lock_time_enabled(&self) -> bool { + <&FfiTransaction as Into>::into(self).is_lock_time_enabled() + } + #[frb(sync)] + ///The protocol version, is currently expected to be 1 or 2 (BIP 68). + pub fn version(&self) -> i32 { + <&FfiTransaction as Into>::into(self) + .version + .0 + } + #[frb(sync)] + ///Block height or timestamp. Transaction cannot be included in a block until this height/time. + pub fn lock_time(&self) -> LockTime { + <&FfiTransaction as Into>::into(self) + .lock_time + .into() + } + #[frb(sync)] + ///List of transaction inputs. + pub fn input(&self) -> Vec { + <&FfiTransaction as Into>::into(self) + .input + .iter() + .map(|x| x.into()) + .collect() + } + #[frb(sync)] + ///List of transaction outputs. + pub fn output(&self) -> Vec { + <&FfiTransaction as Into>::into(self) + .output + .iter() + .map(|x| x.into()) + .collect() + } +} + +#[derive(Debug)] +pub struct FfiPsbt { + pub opaque: RustOpaque>, +} + +impl From for FfiPsbt { + fn from(value: bdk_core::bitcoin::psbt::Psbt) -> Self { + Self { + opaque: RustOpaque::new(std::sync::Mutex::new(value)), + } + } +} +impl FfiPsbt { + //todo; resolve unhandled unwrap()s + pub fn from_str(psbt_base64: String) -> Result { + let psbt: bdk_core::bitcoin::psbt::Psbt = + bdk_core::bitcoin::psbt::Psbt::from_str(&psbt_base64)?; + Ok(psbt.into()) + } + + #[frb(sync)] + pub fn as_string(&self) -> String { + self.opaque.lock().unwrap().to_string() + } + + /// Return the transaction. + #[frb(sync)] + pub fn extract_tx(opaque: FfiPsbt) -> Result { + let tx = opaque.opaque.lock().unwrap().clone().extract_tx()?; + Ok(tx.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(opaque: FfiPsbt, other: FfiPsbt) -> Result { + let other_psbt = other.opaque.lock().unwrap().clone(); + let mut original_psbt = opaque.opaque.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. + #[frb(sync)] + pub fn fee_amount(&self) -> Option { + self.opaque.lock().unwrap().fee_amount().map(|e| e.to_sat()) + } + + ///Serialize as raw binary data + #[frb(sync)] + pub fn serialize(&self) -> Vec { + let psbt = self.opaque.lock().unwrap().clone(); + psbt.serialize() + } + + /// Serialize the PSBT data structure as a String of JSON. + #[frb(sync)] + pub fn json_serialize(&self) -> Result { + let psbt = self.opaque.lock().unwrap(); + serde_json::to_string(psbt.deref()).map_err(|_| PsbtError::OtherPsbtErr) + } +} + +// A reference to a transaction output. +#[derive(Clone, Debug, PartialEq, Eq, Hash)] +pub struct OutPoint { + /// The referenced transaction's txid. + pub txid: String, + /// The index of the referenced output in its transaction's vout. + pub vout: u32, +} +impl TryFrom<&OutPoint> for bdk_core::bitcoin::OutPoint { + type Error = TxidParseError; + + fn try_from(x: &OutPoint) -> Result { + Ok(bdk_core::bitcoin::OutPoint { + txid: bdk_core::bitcoin::Txid::from_str(x.txid.as_str()).map_err(|_| { + TxidParseError::InvalidTxid { + txid: x.txid.to_owned(), + } + })?, + vout: x.clone().vout, + }) + } +} + +impl From for OutPoint { + fn from(x: bdk_core::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: FfiScriptBuf, + pub sequence: u32, + pub witness: Vec>, +} +impl TryFrom<&TxIn> for bdk_core::bitcoin::TxIn { + type Error = TxidParseError; + + fn try_from(x: &TxIn) -> Result { + Ok(bdk_core::bitcoin::TxIn { + previous_output: (&x.previous_output).try_into()?, + script_sig: x.clone().script_sig.into(), + sequence: bdk_core::bitcoin::blockdata::transaction::Sequence::from_consensus( + x.sequence.clone(), + ), + witness: bdk_core::bitcoin::blockdata::witness::Witness::from_slice( + x.clone().witness.as_slice(), + ), + }) + } +} +impl From<&bdk_core::bitcoin::TxIn> for TxIn { + fn from(x: &bdk_core::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: FfiScriptBuf, +} +impl From for bdk_core::bitcoin::TxOut { + fn from(value: TxOut) -> Self { + Self { + value: bdk_core::bitcoin::Amount::from_sat(value.value), + script_pubkey: value.script_pubkey.into(), + } + } +} +impl From<&bdk_core::bitcoin::TxOut> for TxOut { + fn from(x: &bdk_core::bitcoin::TxOut) -> Self { + TxOut { + value: x.clone().value.to_sat(), + script_pubkey: x.clone().script_pubkey.into(), + } + } +} +impl From<&TxOut> for bdk_core::bitcoin::TxOut { + fn from(value: &TxOut) -> Self { + Self { + value: bdk_core::bitcoin::Amount::from_sat(value.value.to_owned()), + script_pubkey: value.script_pubkey.clone().into(), + } + } +} + +#[derive(Copy, Clone)] +pub struct FeeRate { + ///Constructs FeeRate from satoshis per 1000 weight units. + pub sat_kwu: u64, +} +impl From for bdk_core::bitcoin::FeeRate { + fn from(value: FeeRate) -> Self { + bdk_core::bitcoin::FeeRate::from_sat_per_kwu(value.sat_kwu) + } +} +impl From for FeeRate { + fn from(value: bdk_core::bitcoin::FeeRate) -> Self { + Self { + sat_kwu: value.to_sat_per_kwu(), + } + } +} + +// /// Parameters that influence chain consensus. +// #[derive(Debug, Clone)] +// pub struct Params { +// /// Network for which parameters are valid. +// pub network: Network, +// /// Time when BIP16 becomes active. +// pub bip16_time: u32, +// /// Block height at which BIP34 becomes active. +// pub bip34_height: u32, +// /// Block height at which BIP65 becomes active. +// pub bip65_height: u32, +// /// Block height at which BIP66 becomes active. +// pub bip66_height: u32, +// /// Minimum blocks including miner confirmation of the total of 2016 blocks in a retargeting period, +// /// (nPowTargetTimespan / nPowTargetSpacing) which is also used for BIP9 deployments. +// /// Examples: 1916 for 95%, 1512 for testchains. +// pub rule_change_activation_threshold: u32, +// /// Number of blocks with the same set of rules. +// pub miner_confirmation_window: u32, +// /// The maximum **attainable** target value for these params. +// /// +// /// Not all target values are attainable because consensus code uses the compact format to +// /// represent targets (see [`CompactTarget`]). +// /// +// /// Note that this value differs from Bitcoin Core's powLimit field in that this value is +// /// attainable, but Bitcoin Core's is not. Specifically, because targets in Bitcoin are always +// /// rounded to the nearest float expressible in "compact form", not all targets are attainable. +// /// Still, this should not affect consensus as the only place where the non-compact form of +// /// this is used in Bitcoin Core's consensus algorithm is in comparison and there are no +// /// compact-expressible values between Bitcoin Core's and the limit expressed here. +// pub max_attainable_target: FfiTarget, +// /// Expected amount of time to mine one block. +// pub pow_target_spacing: u64, +// /// Difficulty recalculation interval. +// pub pow_target_timespan: u64, +// /// Determines whether minimal difficulty may be used for blocks or not. +// pub allow_min_difficulty_blocks: bool, +// /// Determines whether retargeting is disabled for this network or not. +// pub no_pow_retargeting: bool, +// } +// impl From for bdk_core::bitcoin::params::Params { +// fn from(value: Params) -> Self { + +// } +// } + +// ///A 256 bit integer representing target. +// ///The SHA-256 hash of a block's header must be lower than or equal to the current target for the block to be accepted by the network. The lower the target, the more difficult it is to generate a block. (See also Work.) +// ///ref: https://en.bitcoin.it/wiki/Target + +// #[derive(Debug, Clone)] +// pub struct FfiTarget(pub u32); +// impl From for bdk_core::bitcoin::pow::Target { +// fn from(value: FfiTarget) -> Self { +// let c_target = bdk_core::bitcoin::pow::CompactTarget::from_consensus(value.0); +// bdk_core::bitcoin::pow::Target::from_compact(c_target) +// } +// } +// impl FfiTarget { +// ///Creates `` from a prefixed hex string. +// pub fn from_hex(s: String) -> Result { +// bdk_core::bitcoin::pow::Target +// ::from_hex(s.as_str()) +// .map(|e| FfiTarget(e.to_compact_lossy().to_consensus())) +// .map_err(|e| e.into()) +// } +// } +#[cfg(test)] +mod tests { + use crate::api::{bitcoin::FfiAddress, types::Network}; + + #[test] + fn test_is_valid_for_network() { + // ====Docs tests==== + // https://docs.rs/bitcoin/0.29.2/src/bitcoin/util/address.rs.html#798-802 + + let docs_address_testnet_str = "2N83imGV3gPwBzKJQvWJ7cRUY2SpUyU6A5e"; + let docs_address_testnet = + FfiAddress::from_string(docs_address_testnet_str.to_string(), Network::Testnet) + .unwrap(); + assert!( + docs_address_testnet.is_valid_for_network(Network::Testnet), + "Address should be valid for Testnet" + ); + assert!( + docs_address_testnet.is_valid_for_network(Network::Signet), + "Address should be valid for Signet" + ); + assert!( + docs_address_testnet.is_valid_for_network(Network::Regtest), + "Address should be valid for Regtest" + ); + + let docs_address_mainnet_str = "32iVBEu4dxkUQk9dJbZUiBiQdmypcEyJRf"; + let docs_address_mainnet = + FfiAddress::from_string(docs_address_mainnet_str.to_string(), Network::Bitcoin) + .unwrap(); + assert!( + docs_address_mainnet.is_valid_for_network(Network::Bitcoin), + "Address should be valid for Bitcoin" + ); + + // ====Bech32==== + + // | Network | Prefix | Address Type | + // |-----------------|---------|--------------| + // | Bitcoin Mainnet | `bc1` | Bech32 | + // | Bitcoin Testnet | `tb1` | Bech32 | + // | Bitcoin Signet | `tb1` | Bech32 | + // | Bitcoin Regtest | `bcrt1` | Bech32 | + + // Bech32 - Bitcoin + // Valid for: + // - Bitcoin + // Not valid for: + // - Testnet + // - Signet + // - Regtest + let bitcoin_mainnet_bech32_address_str = "bc1qxhmdufsvnuaaaer4ynz88fspdsxq2h9e9cetdj"; + let bitcoin_mainnet_bech32_address = FfiAddress::from_string( + bitcoin_mainnet_bech32_address_str.to_string(), + Network::Bitcoin, + ) + .unwrap(); + assert!( + bitcoin_mainnet_bech32_address.is_valid_for_network(Network::Bitcoin), + "Address should be valid for Bitcoin" + ); + assert!( + !bitcoin_mainnet_bech32_address.is_valid_for_network(Network::Testnet), + "Address should not be valid for Testnet" + ); + assert!( + !bitcoin_mainnet_bech32_address.is_valid_for_network(Network::Signet), + "Address should not be valid for Signet" + ); + assert!( + !bitcoin_mainnet_bech32_address.is_valid_for_network(Network::Regtest), + "Address should not be valid for Regtest" + ); + + // Bech32 - Testnet + // Valid for: + // - Testnet + // - Regtest + // Not valid for: + // - Bitcoin + // - Regtest + let bitcoin_testnet_bech32_address_str = + "tb1p4nel7wkc34raczk8c4jwk5cf9d47u2284rxn98rsjrs4w3p2sheqvjmfdh"; + let bitcoin_testnet_bech32_address = FfiAddress::from_string( + bitcoin_testnet_bech32_address_str.to_string(), + Network::Testnet, + ) + .unwrap(); + assert!( + !bitcoin_testnet_bech32_address.is_valid_for_network(Network::Bitcoin), + "Address should not be valid for Bitcoin" + ); + assert!( + bitcoin_testnet_bech32_address.is_valid_for_network(Network::Testnet), + "Address should be valid for Testnet" + ); + assert!( + bitcoin_testnet_bech32_address.is_valid_for_network(Network::Signet), + "Address should be valid for Signet" + ); + assert!( + !bitcoin_testnet_bech32_address.is_valid_for_network(Network::Regtest), + "Address should not not be valid for Regtest" + ); + + // Bech32 - Signet + // Valid for: + // - Signet + // - Testnet + // Not valid for: + // - Bitcoin + // - Regtest + let bitcoin_signet_bech32_address_str = + "tb1pwzv7fv35yl7ypwj8w7al2t8apd6yf4568cs772qjwper74xqc99sk8x7tk"; + let bitcoin_signet_bech32_address = FfiAddress::from_string( + bitcoin_signet_bech32_address_str.to_string(), + Network::Signet, + ) + .unwrap(); + assert!( + !bitcoin_signet_bech32_address.is_valid_for_network(Network::Bitcoin), + "Address should not be valid for Bitcoin" + ); + assert!( + bitcoin_signet_bech32_address.is_valid_for_network(Network::Testnet), + "Address should be valid for Testnet" + ); + assert!( + bitcoin_signet_bech32_address.is_valid_for_network(Network::Signet), + "Address should be valid for Signet" + ); + assert!( + !bitcoin_signet_bech32_address.is_valid_for_network(Network::Regtest), + "Address should not not be valid for Regtest" + ); + + // Bech32 - Regtest + // Valid for: + // - Regtest + // Not valid for: + // - Bitcoin + // - Testnet + // - Signet + let bitcoin_regtest_bech32_address_str = "bcrt1q39c0vrwpgfjkhasu5mfke9wnym45nydfwaeems"; + let bitcoin_regtest_bech32_address = FfiAddress::from_string( + bitcoin_regtest_bech32_address_str.to_string(), + Network::Regtest, + ) + .unwrap(); + assert!( + !bitcoin_regtest_bech32_address.is_valid_for_network(Network::Bitcoin), + "Address should not be valid for Bitcoin" + ); + assert!( + !bitcoin_regtest_bech32_address.is_valid_for_network(Network::Testnet), + "Address should not be valid for Testnet" + ); + assert!( + !bitcoin_regtest_bech32_address.is_valid_for_network(Network::Signet), + "Address should not be valid for Signet" + ); + assert!( + bitcoin_regtest_bech32_address.is_valid_for_network(Network::Regtest), + "Address should be valid for Regtest" + ); + + // ====P2PKH==== + + // | Network | Prefix for P2PKH | Prefix for P2SH | + // |------------------------------------|------------------|-----------------| + // | Bitcoin Mainnet | `1` | `3` | + // | Bitcoin Testnet, Regtest, Signet | `m` or `n` | `2` | + + // P2PKH - Bitcoin + // Valid for: + // - Bitcoin + // Not valid for: + // - Testnet + // - Regtest + let bitcoin_mainnet_p2pkh_address_str = "1FfmbHfnpaZjKFvyi1okTjJJusN455paPH"; + let bitcoin_mainnet_p2pkh_address = FfiAddress::from_string( + bitcoin_mainnet_p2pkh_address_str.to_string(), + Network::Bitcoin, + ) + .unwrap(); + assert!( + bitcoin_mainnet_p2pkh_address.is_valid_for_network(Network::Bitcoin), + "Address should be valid for Bitcoin" + ); + assert!( + !bitcoin_mainnet_p2pkh_address.is_valid_for_network(Network::Testnet), + "Address should not be valid for Testnet" + ); + assert!( + !bitcoin_mainnet_p2pkh_address.is_valid_for_network(Network::Regtest), + "Address should not be valid for Regtest" + ); + + // P2PKH - Testnet + // Valid for: + // - Testnet + // - Regtest + // Not valid for: + // - Bitcoin + let bitcoin_testnet_p2pkh_address_str = "mucFNhKMYoBQYUAEsrFVscQ1YaFQPekBpg"; + let bitcoin_testnet_p2pkh_address = FfiAddress::from_string( + bitcoin_testnet_p2pkh_address_str.to_string(), + Network::Testnet, + ) + .unwrap(); + assert!( + !bitcoin_testnet_p2pkh_address.is_valid_for_network(Network::Bitcoin), + "Address should not be valid for Bitcoin" + ); + assert!( + bitcoin_testnet_p2pkh_address.is_valid_for_network(Network::Testnet), + "Address should be valid for Testnet" + ); + assert!( + bitcoin_testnet_p2pkh_address.is_valid_for_network(Network::Regtest), + "Address should be valid for Regtest" + ); + + // P2PKH - Regtest + // Valid for: + // - Testnet + // - Regtest + // Not valid for: + // - Bitcoin + let bitcoin_regtest_p2pkh_address_str = "msiGFK1PjCk8E6FXeoGkQPTscmcpyBdkgS"; + let bitcoin_regtest_p2pkh_address = FfiAddress::from_string( + bitcoin_regtest_p2pkh_address_str.to_string(), + Network::Regtest, + ) + .unwrap(); + assert!( + !bitcoin_regtest_p2pkh_address.is_valid_for_network(Network::Bitcoin), + "Address should not be valid for Bitcoin" + ); + assert!( + bitcoin_regtest_p2pkh_address.is_valid_for_network(Network::Testnet), + "Address should be valid for Testnet" + ); + assert!( + bitcoin_regtest_p2pkh_address.is_valid_for_network(Network::Regtest), + "Address should be valid for Regtest" + ); + + // ====P2SH==== + + // | Network | Prefix for P2PKH | Prefix for P2SH | + // |------------------------------------|------------------|-----------------| + // | Bitcoin Mainnet | `1` | `3` | + // | Bitcoin Testnet, Regtest, Signet | `m` or `n` | `2` | + + // P2SH - Bitcoin + // Valid for: + // - Bitcoin + // Not valid for: + // - Testnet + // - Regtest + let bitcoin_mainnet_p2sh_address_str = "3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy"; + let bitcoin_mainnet_p2sh_address = FfiAddress::from_string( + bitcoin_mainnet_p2sh_address_str.to_string(), + Network::Bitcoin, + ) + .unwrap(); + assert!( + bitcoin_mainnet_p2sh_address.is_valid_for_network(Network::Bitcoin), + "Address should be valid for Bitcoin" + ); + assert!( + !bitcoin_mainnet_p2sh_address.is_valid_for_network(Network::Testnet), + "Address should not be valid for Testnet" + ); + assert!( + !bitcoin_mainnet_p2sh_address.is_valid_for_network(Network::Regtest), + "Address should not be valid for Regtest" + ); + + // P2SH - Testnet + // Valid for: + // - Testnet + // - Regtest + // Not valid for: + // - Bitcoin + let bitcoin_testnet_p2sh_address_str = "2NFUBBRcTJbYc1D4HSCbJhKZp6YCV4PQFpQ"; + let bitcoin_testnet_p2sh_address = FfiAddress::from_string( + bitcoin_testnet_p2sh_address_str.to_string(), + Network::Testnet, + ) + .unwrap(); + assert!( + !bitcoin_testnet_p2sh_address.is_valid_for_network(Network::Bitcoin), + "Address should not be valid for Bitcoin" + ); + assert!( + bitcoin_testnet_p2sh_address.is_valid_for_network(Network::Testnet), + "Address should be valid for Testnet" + ); + assert!( + bitcoin_testnet_p2sh_address.is_valid_for_network(Network::Regtest), + "Address should be valid for Regtest" + ); + + // P2SH - Regtest + // Valid for: + // - Testnet + // - Regtest + // Not valid for: + // - Bitcoin + let bitcoin_regtest_p2sh_address_str = "2NEb8N5B9jhPUCBchz16BB7bkJk8VCZQjf3"; + let bitcoin_regtest_p2sh_address = FfiAddress::from_string( + bitcoin_regtest_p2sh_address_str.to_string(), + Network::Regtest, + ) + .unwrap(); + assert!( + !bitcoin_regtest_p2sh_address.is_valid_for_network(Network::Bitcoin), + "Address should not be valid for Bitcoin" + ); + assert!( + bitcoin_regtest_p2sh_address.is_valid_for_network(Network::Testnet), + "Address should be valid for Testnet" + ); + assert!( + bitcoin_regtest_p2sh_address.is_valid_for_network(Network::Regtest), + "Address should be valid for Regtest" + ); + } +} diff --git a/rust/src/api/blockchain.rs b/rust/src/api/blockchain.rs deleted file mode 100644 index c80362e1..00000000 --- a/rust/src/api/blockchain.rs +++ /dev/null @@ -1,207 +0,0 @@ -use crate::api::types::{BdkTransaction, FeeRate, Network}; - -use crate::api::error::BdkError; -use crate::frb_generated::RustOpaque; -use bdk::bitcoin::Transaction; - -use bdk::blockchain::esplora::EsploraBlockchainConfig; - -pub use bdk::blockchain::{ - AnyBlockchainConfig, Blockchain, ConfigurableBlockchain, ElectrumBlockchainConfig, - GetBlockHash, GetHeight, -}; - -use std::path::PathBuf; - -pub struct BdkBlockchain { - pub ptr: RustOpaque, -} - -impl From for BdkBlockchain { - fn from(value: bdk::blockchain::AnyBlockchain) -> Self { - Self { - ptr: RustOpaque::new(value), - } - } -} -impl BdkBlockchain { - pub fn create(blockchain_config: BlockchainConfig) -> Result { - let any_blockchain_config = match blockchain_config { - BlockchainConfig::Electrum { config } => { - AnyBlockchainConfig::Electrum(ElectrumBlockchainConfig { - retry: config.retry, - socks5: config.socks5, - timeout: config.timeout, - url: config.url, - stop_gap: 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(bdk::blockchain::rpc::RpcConfig { - url: config.url, - auth: config.auth.into(), - network: config.network.into(), - wallet_name: config.wallet_name, - sync_params: config.sync_params.map(|p| p.into()), - }) - } - }; - let blockchain = bdk::blockchain::AnyBlockchain::from_config(&any_blockchain_config)?; - Ok(blockchain.into()) - } - pub(crate) fn get_blockchain(&self) -> RustOpaque { - self.ptr.clone() - } - pub fn broadcast(&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 bdk::blockchain::rpc::Auth { - fn from(auth: Auth) -> Self { - match auth { - Auth::None => bdk::blockchain::rpc::Auth::None, - Auth::UserPass { username, password } => { - bdk::blockchain::rpc::Auth::UserPass { username, password } - } - Auth::Cookie { file } => bdk::blockchain::rpc::Auth::Cookie { - file: PathBuf::from(file), - }, - } - } -} - -/// Sync parameters for Bitcoin Core RPC. -/// -/// In general, BDK tries to sync `scriptPubKey`s cached in `Database` with -/// `scriptPubKey`s imported in the Bitcoin Core Wallet. These parameters are used for determining -/// how the `importdescriptors` RPC calls are to be made. -pub struct RpcSyncParams { - /// The minimum number of scripts to scan for on initial sync. - pub start_script_count: u64, - /// Time in unix seconds in which initial sync will start scanning from (0 to start from genesis). - pub start_time: u64, - /// Forces every sync to use `start_time` as import timestamp. - pub force_start_time: bool, - /// RPC poll rate (in seconds) to get state updates. - pub poll_rate_sec: u64, -} - -impl From for bdk::blockchain::rpc::RpcSyncParams { - fn from(params: RpcSyncParams) -> Self { - bdk::blockchain::rpc::RpcSyncParams { - start_script_count: params.start_script_count as usize, - start_time: params.start_time, - force_start_time: params.force_start_time, - poll_rate_sec: params.poll_rate_sec, - } - } -} - -/// RpcBlockchain configuration options -pub struct RpcConfig { - /// The bitcoin node url - pub url: String, - /// The bitcoin node authentication mechanism - pub auth: Auth, - /// The network we are using (it will be checked the bitcoin node network matches this) - pub network: Network, - /// The wallet name in the bitcoin node. - pub wallet_name: String, - /// Sync parameters - pub sync_params: Option, -} - -/// Type that can contain any of the blockchain configurations defined by the library. -pub enum BlockchainConfig { - /// Electrum client - Electrum { config: ElectrumConfig }, - /// Esplora client - Esplora { config: EsploraConfig }, - /// Bitcoin Core RPC client - Rpc { config: RpcConfig }, -} diff --git a/rust/src/api/descriptor.rs b/rust/src/api/descriptor.rs index e7f6f0d2..4f1d274e 100644 --- a/rust/src/api/descriptor.rs +++ b/rust/src/api/descriptor.rs @@ -1,26 +1,27 @@ -use crate::api::error::BdkError; -use crate::api::key::{BdkDescriptorPublicKey, BdkDescriptorSecretKey}; +use crate::api::key::{FfiDescriptorPublicKey, FfiDescriptorSecretKey}; use crate::api::types::{KeychainKind, Network}; use crate::frb_generated::RustOpaque; -use bdk::bitcoin::bip32::Fingerprint; -use bdk::bitcoin::key::Secp256k1; -pub use bdk::descriptor::IntoWalletDescriptor; -pub use bdk::keys; -use bdk::template::{ +use bdk_wallet::bitcoin::bip32::Fingerprint; +use bdk_wallet::bitcoin::key::Secp256k1; +pub use bdk_wallet::descriptor::IntoWalletDescriptor; +pub use bdk_wallet::keys; +use bdk_wallet::template::{ Bip44, Bip44Public, Bip49, Bip49Public, Bip84, Bip84Public, Bip86, Bip86Public, DescriptorTemplate, }; use flutter_rust_bridge::frb; use std::str::FromStr; +use super::error::DescriptorError; + #[derive(Debug)] -pub struct BdkDescriptor { - pub extended_descriptor: RustOpaque, - pub key_map: RustOpaque, +pub struct FfiDescriptor { + pub extended_descriptor: RustOpaque, + pub key_map: RustOpaque, } -impl BdkDescriptor { - pub fn new(descriptor: String, network: Network) -> Result { +impl FfiDescriptor { + pub fn new(descriptor: String, network: Network) -> Result { let secp = Secp256k1::new(); let (extended_descriptor, key_map) = descriptor.into_wallet_descriptor(&secp, network.into())?; @@ -31,11 +32,11 @@ impl BdkDescriptor { } pub fn new_bip44( - secret_key: BdkDescriptorSecretKey, + secret_key: FfiDescriptorSecretKey, keychain_kind: KeychainKind, network: Network, - ) -> Result { - let derivable_key = &*secret_key.ptr; + ) -> Result { + let derivable_key = &*secret_key.opaque; match derivable_key { keys::DescriptorSecretKey::XPrv(descriptor_x_key) => { let derivable_key = descriptor_x_key.xkey; @@ -46,24 +47,26 @@ impl BdkDescriptor { 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(), - )), + keys::DescriptorSecretKey::Single(_) => Err(DescriptorError::Generic { + error_message: "Cannot derive from a single key".to_string(), + }), + keys::DescriptorSecretKey::MultiXPrv(_) => Err(DescriptorError::Generic { + error_message: "Cannot derive from a multi key".to_string(), + }), } } pub fn new_bip44_public( - public_key: BdkDescriptorPublicKey, + public_key: FfiDescriptorPublicKey, fingerprint: String, keychain_kind: KeychainKind, network: Network, - ) -> Result { - let fingerprint = Fingerprint::from_str(fingerprint.as_str()) - .map_err(|e| BdkError::Generic(e.to_string()))?; - let derivable_key = &*public_key.ptr; + ) -> Result { + let fingerprint = + Fingerprint::from_str(fingerprint.as_str()).map_err(|e| DescriptorError::Generic { + error_message: e.to_string(), + })?; + let derivable_key = &*public_key.opaque; match derivable_key { keys::DescriptorPublicKey::XPub(descriptor_x_key) => { let derivable_key = descriptor_x_key.xkey; @@ -76,21 +79,21 @@ impl BdkDescriptor { 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(), - )), + keys::DescriptorPublicKey::Single(_) => Err(DescriptorError::Generic { + error_message: "Cannot derive from a single key".to_string(), + }), + keys::DescriptorPublicKey::MultiXPub(_) => Err(DescriptorError::Generic { + error_message: "Cannot derive from a multi key".to_string(), + }), } } pub fn new_bip49( - secret_key: BdkDescriptorSecretKey, + secret_key: FfiDescriptorSecretKey, keychain_kind: KeychainKind, network: Network, - ) -> Result { - let derivable_key = &*secret_key.ptr; + ) -> Result { + let derivable_key = &*secret_key.opaque; match derivable_key { keys::DescriptorSecretKey::XPrv(descriptor_x_key) => { let derivable_key = descriptor_x_key.xkey; @@ -101,24 +104,26 @@ impl BdkDescriptor { 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(), - )), + keys::DescriptorSecretKey::Single(_) => Err(DescriptorError::Generic { + error_message: "Cannot derive from a single key".to_string(), + }), + keys::DescriptorSecretKey::MultiXPrv(_) => Err(DescriptorError::Generic { + error_message: "Cannot derive from a multi key".to_string(), + }), } } pub fn new_bip49_public( - public_key: BdkDescriptorPublicKey, + public_key: FfiDescriptorPublicKey, fingerprint: String, keychain_kind: KeychainKind, network: Network, - ) -> Result { - let fingerprint = Fingerprint::from_str(fingerprint.as_str()) - .map_err(|e| BdkError::Generic(e.to_string()))?; - let derivable_key = &*public_key.ptr; + ) -> Result { + let fingerprint = + Fingerprint::from_str(fingerprint.as_str()).map_err(|e| DescriptorError::Generic { + error_message: e.to_string(), + })?; + let derivable_key = &*public_key.opaque; match derivable_key { keys::DescriptorPublicKey::XPub(descriptor_x_key) => { @@ -132,21 +137,21 @@ impl BdkDescriptor { 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(), - )), + keys::DescriptorPublicKey::Single(_) => Err(DescriptorError::Generic { + error_message: "Cannot derive from a single key".to_string(), + }), + keys::DescriptorPublicKey::MultiXPub(_) => Err(DescriptorError::Generic { + error_message: "Cannot derive from a multi key".to_string(), + }), } } pub fn new_bip84( - secret_key: BdkDescriptorSecretKey, + secret_key: FfiDescriptorSecretKey, keychain_kind: KeychainKind, network: Network, - ) -> Result { - let derivable_key = &*secret_key.ptr; + ) -> Result { + let derivable_key = &*secret_key.opaque; match derivable_key { keys::DescriptorSecretKey::XPrv(descriptor_x_key) => { let derivable_key = descriptor_x_key.xkey; @@ -157,24 +162,26 @@ impl BdkDescriptor { 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(), - )), + keys::DescriptorSecretKey::Single(_) => Err(DescriptorError::Generic { + error_message: "Cannot derive from a single key".to_string(), + }), + keys::DescriptorSecretKey::MultiXPrv(_) => Err(DescriptorError::Generic { + error_message: "Cannot derive from a multi key".to_string(), + }), } } pub fn new_bip84_public( - public_key: BdkDescriptorPublicKey, + public_key: FfiDescriptorPublicKey, fingerprint: String, keychain_kind: KeychainKind, network: Network, - ) -> Result { - let fingerprint = Fingerprint::from_str(fingerprint.as_str()) - .map_err(|e| BdkError::Generic(e.to_string()))?; - let derivable_key = &*public_key.ptr; + ) -> Result { + let fingerprint = + Fingerprint::from_str(fingerprint.as_str()).map_err(|e| DescriptorError::Generic { + error_message: e.to_string(), + })?; + let derivable_key = &*public_key.opaque; match derivable_key { keys::DescriptorPublicKey::XPub(descriptor_x_key) => { @@ -188,21 +195,21 @@ impl BdkDescriptor { 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(), - )), + keys::DescriptorPublicKey::Single(_) => Err(DescriptorError::Generic { + error_message: "Cannot derive from a single key".to_string(), + }), + keys::DescriptorPublicKey::MultiXPub(_) => Err(DescriptorError::Generic { + error_message: "Cannot derive from a multi key".to_string(), + }), } } pub fn new_bip86( - secret_key: BdkDescriptorSecretKey, + secret_key: FfiDescriptorSecretKey, keychain_kind: KeychainKind, network: Network, - ) -> Result { - let derivable_key = &*secret_key.ptr; + ) -> Result { + let derivable_key = &*secret_key.opaque; match derivable_key { keys::DescriptorSecretKey::XPrv(descriptor_x_key) => { @@ -214,24 +221,26 @@ impl BdkDescriptor { 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(), - )), + keys::DescriptorSecretKey::Single(_) => Err(DescriptorError::Generic { + error_message: "Cannot derive from a single key".to_string(), + }), + keys::DescriptorSecretKey::MultiXPrv(_) => Err(DescriptorError::Generic { + error_message: "Cannot derive from a multi key".to_string(), + }), } } pub fn new_bip86_public( - public_key: BdkDescriptorPublicKey, + public_key: FfiDescriptorPublicKey, fingerprint: String, keychain_kind: KeychainKind, network: Network, - ) -> Result { - let fingerprint = Fingerprint::from_str(fingerprint.as_str()) - .map_err(|e| BdkError::Generic(e.to_string()))?; - let derivable_key = &*public_key.ptr; + ) -> Result { + let fingerprint = + Fingerprint::from_str(fingerprint.as_str()).map_err(|e| DescriptorError::Generic { + error_message: e.to_string(), + })?; + let derivable_key = &*public_key.opaque; match derivable_key { keys::DescriptorPublicKey::XPub(descriptor_x_key) => { @@ -245,17 +254,17 @@ impl BdkDescriptor { 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(), - )), + keys::DescriptorPublicKey::Single(_) => Err(DescriptorError::Generic { + error_message: "Cannot derive from a single key".to_string(), + }), + keys::DescriptorPublicKey::MultiXPub(_) => Err(DescriptorError::Generic { + error_message: "Cannot derive from a multi key".to_string(), + }), } } #[frb(sync)] - pub fn to_string_private(&self) -> String { + pub fn to_string_with_secret(&self) -> String { let descriptor = &self.extended_descriptor; let key_map = &*self.key_map; descriptor.to_string_with_secret(key_map) @@ -265,10 +274,12 @@ impl BdkDescriptor { pub fn as_string(&self) -> String { self.extended_descriptor.to_string() } + ///Returns raw weight units. #[frb(sync)] - pub fn max_satisfaction_weight(&self) -> Result { + pub fn max_satisfaction_weight(&self) -> Result { self.extended_descriptor .max_weight_to_satisfy() .map_err(|e| e.into()) + .map(|e| e.to_wu()) } } diff --git a/rust/src/api/electrum.rs b/rust/src/api/electrum.rs new file mode 100644 index 00000000..87888237 --- /dev/null +++ b/rust/src/api/electrum.rs @@ -0,0 +1,100 @@ +use crate::api::bitcoin::FfiTransaction; +use crate::frb_generated::RustOpaque; +use bdk_core::spk_client::SyncRequest as BdkSyncRequest; +use bdk_core::spk_client::SyncResult as BdkSyncResult; +use bdk_wallet::KeychainKind; + +use std::collections::BTreeMap; + +use super::error::ElectrumError; +use super::types::FfiFullScanRequest; +use super::types::FfiSyncRequest; + +// NOTE: We are keeping our naming convention where the alias of the inner type is the Rust type +// prefixed with `Bdk`. In this case the inner type is `BdkElectrumClient`, so the alias is +// funnily enough named `BdkBdkElectrumClient`. +pub struct FfiElectrumClient { + pub opaque: RustOpaque>, +} + +impl FfiElectrumClient { + pub fn new(url: String) -> Result { + let inner_client: bdk_electrum::electrum_client::Client = + bdk_electrum::electrum_client::Client::new(url.as_str())?; + let client = bdk_electrum::BdkElectrumClient::new(inner_client); + Ok(Self { + opaque: RustOpaque::new(client), + }) + } + + pub fn full_scan( + opaque: FfiElectrumClient, + request: FfiFullScanRequest, + stop_gap: u64, + batch_size: u64, + fetch_prev_txouts: bool, + ) -> Result { + //todo; resolve unhandled unwrap()s + // using option and take is not ideal but the only way to take full ownership of the request + let request = request + .0 + .lock() + .unwrap() + .take() + .ok_or(ElectrumError::RequestAlreadyConsumed)?; + + let full_scan_result = opaque.opaque.full_scan( + request, + stop_gap as usize, + batch_size as usize, + fetch_prev_txouts, + )?; + + let update = bdk_wallet::Update { + last_active_indices: full_scan_result.last_active_indices, + tx_update: full_scan_result.tx_update, + chain: full_scan_result.chain_update, + }; + + Ok(super::types::FfiUpdate(RustOpaque::new(update))) + } + pub fn sync( + opaque: FfiElectrumClient, + request: FfiSyncRequest, + batch_size: u64, + fetch_prev_txouts: bool, + ) -> Result { + //todo; resolve unhandled unwrap()s + // using option and take is not ideal but the only way to take full ownership of the request + let request: BdkSyncRequest<(KeychainKind, u32)> = request + .0 + .lock() + .unwrap() + .take() + .ok_or(ElectrumError::RequestAlreadyConsumed)?; + + let sync_result: BdkSyncResult = + opaque + .opaque + .sync(request, batch_size as usize, fetch_prev_txouts)?; + + let update = bdk_wallet::Update { + last_active_indices: BTreeMap::default(), + tx_update: sync_result.tx_update, + chain: sync_result.chain_update, + }; + + Ok(super::types::FfiUpdate(RustOpaque::new(update))) + } + + pub fn broadcast( + opaque: FfiElectrumClient, + transaction: &FfiTransaction, + ) -> Result { + opaque + .opaque + .transaction_broadcast(&transaction.into()) + .map_err(ElectrumError::from) + .map(|txid| txid.to_string()) + } +} diff --git a/rust/src/api/error.rs b/rust/src/api/error.rs index df88e2ed..e0e26c92 100644 --- a/rust/src/api/error.rs +++ b/rust/src/api/error.rs @@ -1,363 +1,1280 @@ -use crate::api::types::{KeychainKind, Network, OutPoint, Variant}; -use bdk::descriptor::error::Error as BdkDescriptorError; - -#[derive(Debug)] -pub enum BdkError { - /// Hex decoding error - Hex(HexError), - /// Encoding error - Consensus(ConsensusError), - VerifyTransaction(String), - /// Address error. - Address(AddressError), - /// Error related to the parsing and usage of descriptors - Descriptor(DescriptorError), - /// Wrong number of bytes found when trying to convert to u32 - InvalidU32Bytes(Vec), - /// Generic error - Generic(String), - /// This error is thrown when trying to convert Bare and Public key script to address - ScriptDoesntHaveAddressForm, - /// Cannot build a tx without recipients - NoRecipients, - /// `manually_selected_only` option is selected but no utxo has been passed - NoUtxosSelected, - /// Output created is under the dust limit, 546 satoshis - OutputBelowDustLimit(usize), - /// Wallet's UTXO set is not enough to cover recipient's requested plus fee - InsufficientFunds { - /// Sats needed for some transaction - needed: u64, - /// Sats available for spending - available: u64, - }, - /// Branch and bound coin selection possible attempts with sufficiently big UTXO set could grow - /// exponentially, thus a limit is set, and when hit, this error is thrown - BnBTotalTriesExceeded, - /// Branch and bound coin selection tries to avoid needing a change by finding the right inputs for - /// the desired outputs plus fee, if there is not such combination this error is thrown - BnBNoExactMatch, - /// Happens when trying to spend an UTXO that is not in the internal database - UnknownUtxo, - /// Thrown when a tx is not found in the internal database - TransactionNotFound, - /// Happens when trying to bump a transaction that is already confirmed - TransactionConfirmed, - /// Trying to replace a tx that has a sequence >= `0xFFFFFFFE` - IrreplaceableTransaction, - /// When bumping a tx the fee rate requested is lower than required - FeeRateTooLow { - /// Required fee rate (satoshi/vbyte) - needed: f32, - }, - /// When bumping a tx the absolute fee requested is lower than replaced tx absolute fee - FeeTooLow { - /// Required fee absolute value (satoshi) - needed: u64, - }, - /// Node doesn't have data to estimate a fee rate +use bdk_bitcoind_rpc::bitcoincore_rpc::bitcoin::address::ParseError; +use bdk_electrum::electrum_client::Error as BdkElectrumError; +use bdk_esplora::esplora_client::{Error as BdkEsploraError, Error}; +use bdk_wallet::bitcoin::address::FromScriptError as BdkFromScriptError; +use bdk_wallet::bitcoin::address::ParseError as BdkParseError; +use bdk_wallet::bitcoin::bip32::Error as BdkBip32Error; +use bdk_wallet::bitcoin::consensus::encode::Error as BdkEncodeError; +use bdk_wallet::bitcoin::hex::DisplayHex; +use bdk_wallet::bitcoin::psbt::Error as BdkPsbtError; +use bdk_wallet::bitcoin::psbt::ExtractTxError as BdkExtractTxError; +use bdk_wallet::bitcoin::psbt::PsbtParseError as BdkPsbtParseError; +use bdk_wallet::chain::local_chain::CannotConnectError as BdkCannotConnectError; +use bdk_wallet::chain::rusqlite::Error as BdkSqliteError; +use bdk_wallet::chain::tx_graph::CalculateFeeError as BdkCalculateFeeError; +use bdk_wallet::descriptor::DescriptorError as BdkDescriptorError; +use bdk_wallet::error::BuildFeeBumpError; +use bdk_wallet::error::CreateTxError as BdkCreateTxError; +use bdk_wallet::keys::bip39::Error as BdkBip39Error; +use bdk_wallet::keys::KeyError; +use bdk_wallet::miniscript::descriptor::DescriptorKeyParseError as BdkDescriptorKeyParseError; +use bdk_wallet::signer::SignerError as BdkSignerError; +use bdk_wallet::tx_builder::AddUtxoError; +use bdk_wallet::LoadWithPersistError as BdkLoadWithPersistError; +use bdk_wallet::{chain, CreateWithPersistError as BdkCreateWithPersistError}; + +use super::bitcoin::OutPoint; +use std::convert::TryInto; + +// ------------------------------------------------------------------------ +// error definitions +// ------------------------------------------------------------------------ + +#[derive(Debug, thiserror::Error)] +pub enum AddressParseError { + #[error("base58 address encoding error")] + Base58, + + #[error("bech32 address encoding error")] + Bech32, + + #[error("witness version conversion/parsing error: {error_message}")] + WitnessVersion { error_message: String }, + + #[error("witness program error: {error_message}")] + WitnessProgram { error_message: String }, + + #[error("tried to parse an unknown hrp")] + UnknownHrp, + + #[error("legacy address base58 string")] + LegacyAddressTooLong, + + #[error("legacy address base58 data")] + InvalidBase58PayloadLength, + + #[error("segwit address bech32 string")] + InvalidLegacyPrefix, + + #[error("validation error")] + NetworkValidation, + + // This error is required because the bdk::bitcoin::address::ParseError is non-exhaustive + #[error("other address parse error")] + OtherAddressParseErr, +} + +#[derive(Debug, thiserror::Error)] +pub enum Bip32Error { + #[error("cannot derive from a hardened key")] + CannotDeriveFromHardenedKey, + + #[error("secp256k1 error: {error_message}")] + Secp256k1 { error_message: String }, + + #[error("invalid child number: {child_number}")] + InvalidChildNumber { child_number: u32 }, + + #[error("invalid format for child number")] + InvalidChildNumberFormat, + + #[error("invalid derivation path format")] + InvalidDerivationPathFormat, + + #[error("unknown version: {version}")] + UnknownVersion { version: String }, + + #[error("wrong extended key length: {length}")] + WrongExtendedKeyLength { length: u32 }, + + #[error("base58 error: {error_message}")] + Base58 { error_message: String }, + + #[error("hexadecimal conversion error: {error_message}")] + Hex { error_message: String }, + + #[error("invalid public key hex length: {length}")] + InvalidPublicKeyHexLength { length: u32 }, + + #[error("unknown error: {error_message}")] + UnknownError { error_message: String }, +} + +#[derive(Debug, thiserror::Error)] +pub enum Bip39Error { + #[error("the word count {word_count} is not supported")] + BadWordCount { word_count: u64 }, + + #[error("unknown word at index {index}")] + UnknownWord { index: u64 }, + + #[error("entropy bit count {bit_count} is invalid")] + BadEntropyBitCount { bit_count: u64 }, + + #[error("checksum is invalid")] + InvalidChecksum, + + #[error("ambiguous languages detected: {languages}")] + AmbiguousLanguages { languages: String }, + #[error("generic error: {error_message}")] + Generic { error_message: String }, +} + +#[derive(Debug, thiserror::Error)] +pub enum CalculateFeeError { + #[error("generic error: {error_message}")] + Generic { error_message: String }, + #[error("missing transaction output: {out_points:?}")] + MissingTxOut { out_points: Vec }, + + #[error("negative fee value: {amount}")] + NegativeFee { amount: String }, +} + +#[derive(Debug, thiserror::Error)] +pub enum CannotConnectError { + #[error("cannot include height: {height}")] + Include { height: u32 }, +} + +#[derive(Debug, thiserror::Error)] +pub enum CreateTxError { + #[error("bump error transaction: {txid} is not found in the internal database")] + TransactionNotFound { txid: String }, + #[error("bump error: transaction: {txid} that is already confirmed")] + TransactionConfirmed { txid: String }, + + #[error( + "bump error: trying to replace a transaction: {txid} that has a sequence >= `0xFFFFFFFE`" + )] + IrreplaceableTransaction { txid: String }, + #[error("bump error: 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, + + #[error("generic error: {error_message}")] + Generic { error_message: String }, + #[error("descriptor error: {error_message}")] + Descriptor { error_message: String }, + + #[error("policy error: {error_message}")] + Policy { error_message: String }, + + #[error("spending policy required for {kind}")] + SpendingPolicyRequired { kind: String }, + + #[error("unsupported version 0")] + Version0, + + #[error("unsupported version 1 with csv")] + Version1Csv, + + #[error("lock time conflict: requested {requested_time}, but required {required_time}")] + LockTime { + requested_time: String, + required_time: String, }, - /// 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()), - } - } + + #[error("transaction requires rbf sequence number")] + RbfSequence, + + #[error("rbf sequence: {rbf}, csv sequence: {csv}")] + RbfSequenceCsv { rbf: String, csv: String }, + + #[error("fee too low: required {fee_required}")] + FeeTooLow { fee_required: String }, + + #[error("fee rate too low: {fee_rate_required}")] + FeeRateTooLow { fee_rate_required: String }, + + #[error("no utxos selected for the transaction")] + NoUtxosSelected, + + #[error("output value below dust limit at index {index}")] + OutputBelowDustLimit { index: u64 }, + + #[error("change policy descriptor error")] + ChangePolicyDescriptor, + + #[error("coin selection failed: {error_message}")] + CoinSelection { error_message: String }, + + #[error("insufficient funds: needed {needed} sat, available {available} sat")] + InsufficientFunds { needed: u64, available: u64 }, + + #[error("transaction has no recipients")] + NoRecipients, + + #[error("psbt creation error: {error_message}")] + Psbt { error_message: String }, + + #[error("missing key origin for: {key}")] + MissingKeyOrigin { key: String }, + + #[error("reference to an unknown utxo: {outpoint}")] + UnknownUtxo { outpoint: String }, + + #[error("missing non-witness utxo for outpoint: {outpoint}")] + MissingNonWitnessUtxo { outpoint: String }, + + #[error("miniscript psbt error: {error_message}")] + MiniscriptPsbt { error_message: String }, +} + +#[derive(Debug, thiserror::Error)] +pub enum CreateWithPersistError { + #[error("sqlite persistence error: {error_message}")] + Persist { error_message: String }, + + #[error("the wallet has already been created")] + DataAlreadyExists, + + #[error("the loaded changeset cannot construct wallet: {error_message}")] + Descriptor { error_message: String }, } -#[derive(Debug)] + +#[derive(Debug, thiserror::Error)] pub enum DescriptorError { + #[error("invalid hd key path")] InvalidHdKeyPath, + + #[error("the extended key does not contain private data.")] + MissingPrivateData, + + #[error("the provided descriptor doesn't match its checksum")] InvalidDescriptorChecksum, + + #[error("the descriptor contains hardened derivation steps on public extended keys")] HardenedDerivationXpub, + + #[error("the descriptor contains multipath keys, which are not supported yet")] 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()) + + #[error("key error: {error_message}")] + Key { error_message: String }, + #[error("generic error: {error_message}")] + Generic { error_message: String }, + + #[error("policy error: {error_message}")] + Policy { error_message: String }, + + #[error("invalid descriptor character: {charector}")] + InvalidDescriptorCharacter { charector: String }, + + #[error("bip32 error: {error_message}")] + Bip32 { error_message: String }, + + #[error("base58 error: {error_message}")] + Base58 { error_message: String }, + + #[error("key-related error: {error_message}")] + Pk { error_message: String }, + + #[error("miniscript error: {error_message}")] + Miniscript { error_message: String }, + + #[error("hex decoding error: {error_message}")] + Hex { error_message: String }, + + #[error("external and internal descriptors are the same")] + ExternalAndInternalAreTheSame, +} + +#[derive(Debug, thiserror::Error)] +pub enum DescriptorKeyError { + #[error("error parsing descriptor key: {error_message}")] + Parse { error_message: String }, + + #[error("error invalid key type")] + InvalidKeyType, + + #[error("error bip 32 related: {error_message}")] + Bip32 { error_message: String }, +} + +#[derive(Debug, thiserror::Error)] +pub enum ElectrumError { + #[error("{error_message}")] + IOError { error_message: String }, + + #[error("{error_message}")] + Json { error_message: String }, + + #[error("{error_message}")] + Hex { error_message: String }, + + #[error("electrum server error: {error_message}")] + Protocol { error_message: String }, + + #[error("{error_message}")] + Bitcoin { error_message: String }, + + #[error("already subscribed to the notifications of an address")] + AlreadySubscribed, + + #[error("not subscribed to the notifications of an address")] + NotSubscribed, + + #[error("error during the deserialization of a response from the server: {error_message}")] + InvalidResponse { error_message: String }, + + #[error("{error_message}")] + Message { error_message: String }, + + #[error("invalid domain name {domain} not matching SSL certificate")] + InvalidDNSNameError { domain: String }, + + #[error("missing domain while it was explicitly asked to validate it")] + MissingDomain, + + #[error("made one or multiple attempts, all errored")] + AllAttemptsErrored, + + #[error("{error_message}")] + SharedIOError { error_message: String }, + + #[error( + "couldn't take a lock on the reader mutex. This means that there's already another reader thread is running" + )] + CouldntLockReader, + + #[error("broken IPC communication channel: the other thread probably has exited")] + Mpsc, + + #[error("{error_message}")] + CouldNotCreateConnection { error_message: String }, + + #[error("the request has already been consumed")] + RequestAlreadyConsumed, +} + +#[derive(Debug, thiserror::Error)] +pub enum EsploraError { + #[error("minreq error: {error_message}")] + Minreq { error_message: String }, + + #[error("http error with status code {status} and message {error_message}")] + HttpResponse { status: u16, error_message: String }, + + #[error("parsing error: {error_message}")] + Parsing { error_message: String }, + + #[error("invalid status code, unable to convert to u16: {error_message}")] + StatusCode { error_message: String }, + + #[error("bitcoin encoding error: {error_message}")] + BitcoinEncoding { error_message: String }, + + #[error("invalid hex data returned: {error_message}")] + HexToArray { error_message: String }, + + #[error("invalid hex data returned: {error_message}")] + HexToBytes { error_message: String }, + + #[error("transaction not found")] + TransactionNotFound, + + #[error("header height {height} not found")] + HeaderHeightNotFound { height: u32 }, + + #[error("header hash not found")] + HeaderHashNotFound, + + #[error("invalid http header name: {name}")] + InvalidHttpHeaderName { name: String }, + + #[error("invalid http header value: {value}")] + InvalidHttpHeaderValue { value: String }, + + #[error("the request has already been consumed")] + RequestAlreadyConsumed, +} + +#[derive(Debug, thiserror::Error)] +pub enum ExtractTxError { + #[error("an absurdly high fee rate of {fee_rate} sat/vbyte")] + AbsurdFeeRate { fee_rate: u64 }, + + #[error("one of the inputs lacked value information (witness_utxo or non_witness_utxo)")] + MissingInputValue, + + #[error("transaction would be invalid due to output value being greater than input value")] + SendingTooMuch, + + #[error( + "this error is required because the bdk::bitcoin::psbt::ExtractTxError is non-exhaustive" + )] + OtherExtractTxErr, +} + +#[derive(Debug, thiserror::Error)] +pub enum FromScriptError { + #[error("script is not a p2pkh, p2sh or witness program")] + UnrecognizedScript, + + #[error("witness program error: {error_message}")] + WitnessProgram { error_message: String }, + + #[error("witness version construction error: {error_message}")] + WitnessVersion { error_message: String }, + + // This error is required because the bdk::bitcoin::address::FromScriptError is non-exhaustive + #[error("other from script error")] + OtherFromScriptErr, +} + +#[derive(Debug, thiserror::Error)] +pub enum RequestBuilderError { + #[error("the request has already been consumed")] + RequestAlreadyConsumed, +} + +#[derive(Debug, thiserror::Error)] +pub enum LoadWithPersistError { + #[error("sqlite persistence error: {error_message}")] + Persist { error_message: String }, + + #[error("the loaded changeset cannot construct wallet: {error_message}")] + InvalidChangeSet { error_message: String }, + + #[error("could not load")] + CouldNotLoad, +} + +#[derive(Debug, thiserror::Error)] +pub enum PersistenceError { + #[error("writing to persistence error: {error_message}")] + Write { error_message: String }, +} + +#[derive(Debug, thiserror::Error)] +pub enum PsbtError { + #[error("invalid magic")] + InvalidMagic, + + #[error("UTXO information is not present in PSBT")] + MissingUtxo, + + #[error("invalid separator")] + InvalidSeparator, + + #[error("output index is out of bounds of non witness script output array")] + PsbtUtxoOutOfBounds, + + #[error("invalid key: {key}")] + InvalidKey { key: String }, + + #[error("non-proprietary key type found when proprietary key was expected")] + InvalidProprietaryKey, + + #[error("duplicate key: {key}")] + DuplicateKey { key: String }, + + #[error("the unsigned transaction has script sigs")] + UnsignedTxHasScriptSigs, + + #[error("the unsigned transaction has script witnesses")] + UnsignedTxHasScriptWitnesses, + + #[error("partially signed transactions must have an unsigned transaction")] + MustHaveUnsignedTx, + + #[error("no more key-value pairs for this psbt map")] + NoMorePairs, + + // Note: this error would be nice to unpack and provide the two transactions + #[error("different unsigned transaction")] + UnexpectedUnsignedTx, + + #[error("non-standard sighash type: {sighash}")] + NonStandardSighashType { sighash: u32 }, + + #[error("invalid hash when parsing slice: {hash}")] + InvalidHash { hash: String }, + + // Note: to provide the data returned in Rust, we need to dereference the fields + #[error("preimage does not match")] + InvalidPreimageHashPair, + + #[error("combine conflict: {xpub}")] + CombineInconsistentKeySources { xpub: String }, + + #[error("bitcoin consensus encoding error: {encoding_error}")] + ConsensusEncoding { encoding_error: String }, + + #[error("PSBT has a negative fee which is not allowed")] + NegativeFee, + + #[error("integer overflow in fee calculation")] + FeeOverflow, + + #[error("invalid public key {error_message}")] + InvalidPublicKey { error_message: String }, + + #[error("invalid secp256k1 public key: {secp256k1_error}")] + InvalidSecp256k1PublicKey { secp256k1_error: String }, + + #[error("invalid xonly public key")] + InvalidXOnlyPublicKey, + + #[error("invalid ECDSA signature: {error_message}")] + InvalidEcdsaSignature { error_message: String }, + + #[error("invalid taproot signature: {error_message}")] + InvalidTaprootSignature { error_message: String }, + + #[error("invalid control block")] + InvalidControlBlock, + + #[error("invalid leaf version")] + InvalidLeafVersion, + + #[error("taproot error")] + Taproot, + + #[error("taproot tree error: {error_message}")] + TapTree { error_message: String }, + + #[error("xpub key error")] + XPubKey, + + #[error("version error: {error_message}")] + Version { error_message: String }, + + #[error("data not consumed entirely when explicitly deserializing")] + PartialDataConsumption, + + #[error("I/O error: {error_message}")] + Io { error_message: String }, + + #[error("other PSBT error")] + OtherPsbtErr, +} + +#[derive(Debug, thiserror::Error)] +pub enum PsbtParseError { + #[error("error in internal psbt data structure: {error_message}")] + PsbtEncoding { error_message: String }, + + #[error("error in psbt base64 encoding: {error_message}")] + Base64Encoding { error_message: String }, +} + +#[derive(Debug, thiserror::Error)] +pub enum SignerError { + #[error("missing key for signing")] + MissingKey, + + #[error("invalid key provided")] + InvalidKey, + + #[error("user canceled operation")] + UserCanceled, + + #[error("input index out of range")] + InputIndexOutOfRange, + + #[error("missing non-witness utxo information")] + MissingNonWitnessUtxo, + + #[error("invalid non-witness utxo information provided")] + InvalidNonWitnessUtxo, + + #[error("missing witness utxo")] + MissingWitnessUtxo, + + #[error("missing witness script")] + MissingWitnessScript, + + #[error("missing hd keypath")] + MissingHdKeypath, + + #[error("non-standard sighash type used")] + NonStandardSighash, + + #[error("invalid sighash type provided")] + InvalidSighash, + + #[error("error while computing the hash to sign a P2WPKH input: {error_message}")] + SighashP2wpkh { error_message: String }, + + #[error("error while computing the hash to sign a taproot input: {error_message}")] + SighashTaproot { error_message: String }, + + #[error( + "Error while computing the hash, out of bounds access on the transaction inputs: {error_message}" + )] + TxInputsIndexError { error_message: String }, + + #[error("miniscript psbt error: {error_message}")] + MiniscriptPsbt { error_message: String }, + + #[error("external error: {error_message}")] + External { error_message: String }, + + #[error("Psbt error: {error_message}")] + Psbt { error_message: String }, +} + +#[derive(Debug, thiserror::Error)] +pub enum SqliteError { + #[error("sqlite error: {rusqlite_error}")] + Sqlite { rusqlite_error: String }, +} + +#[derive(Debug, thiserror::Error)] +pub enum TransactionError { + #[error("io error")] + Io, + + #[error("allocation of oversized vector")] + OversizedVectorAllocation, + + #[error("invalid checksum: expected={expected} actual={actual}")] + InvalidChecksum { expected: String, actual: String }, + + #[error("non-minimal var int")] + NonMinimalVarInt, + + #[error("parse failed")] + ParseFailed, + + #[error("unsupported segwit version: {flag}")] + UnsupportedSegwitFlag { flag: u8 }, + + // This is required because the bdk::bitcoin::consensus::encode::Error is non-exhaustive + #[error("other transaction error")] + OtherTransactionErr, +} + +#[derive(Debug, thiserror::Error)] +pub enum TxidParseError { + #[error("invalid txid: {txid}")] + InvalidTxid { txid: String }, +} +#[derive(Debug, thiserror::Error)] +pub enum LockError { + #[error("error: {error_message}")] + Generic { error_message: String }, +} +// ------------------------------------------------------------------------ +// error conversions +// ------------------------------------------------------------------------ + +impl From for ElectrumError { + fn from(error: BdkElectrumError) -> Self { + match error { + BdkElectrumError::IOError(e) => ElectrumError::IOError { + error_message: e.to_string(), + }, + BdkElectrumError::JSON(e) => ElectrumError::Json { + error_message: e.to_string(), + }, + BdkElectrumError::Hex(e) => ElectrumError::Hex { + error_message: e.to_string(), + }, + BdkElectrumError::Protocol(e) => ElectrumError::Protocol { + error_message: e.to_string(), + }, + BdkElectrumError::Bitcoin(e) => ElectrumError::Bitcoin { + error_message: e.to_string(), + }, + BdkElectrumError::AlreadySubscribed(_) => ElectrumError::AlreadySubscribed, + BdkElectrumError::NotSubscribed(_) => ElectrumError::NotSubscribed, + BdkElectrumError::InvalidResponse(e) => ElectrumError::InvalidResponse { + error_message: e.to_string(), + }, + BdkElectrumError::Message(e) => ElectrumError::Message { + error_message: e.to_string(), + }, + BdkElectrumError::InvalidDNSNameError(domain) => { + ElectrumError::InvalidDNSNameError { domain } + } + BdkElectrumError::MissingDomain => ElectrumError::MissingDomain, + BdkElectrumError::AllAttemptsErrored(_) => ElectrumError::AllAttemptsErrored, + BdkElectrumError::SharedIOError(e) => ElectrumError::SharedIOError { + error_message: e.to_string(), + }, + BdkElectrumError::CouldntLockReader => ElectrumError::CouldntLockReader, + BdkElectrumError::Mpsc => ElectrumError::Mpsc, + BdkElectrumError::CouldNotCreateConnection(error_message) => { + ElectrumError::CouldNotCreateConnection { + error_message: error_message.to_string(), + } + } + } + } +} + +impl From for AddressParseError { + fn from(error: BdkParseError) -> Self { + match error { + BdkParseError::Base58(_) => AddressParseError::Base58, + BdkParseError::Bech32(_) => AddressParseError::Bech32, + BdkParseError::WitnessVersion(e) => AddressParseError::WitnessVersion { + error_message: e.to_string(), + }, + BdkParseError::WitnessProgram(e) => AddressParseError::WitnessProgram { + error_message: e.to_string(), + }, + ParseError::UnknownHrp(_) => AddressParseError::UnknownHrp, + ParseError::LegacyAddressTooLong(_) => AddressParseError::LegacyAddressTooLong, + ParseError::InvalidBase58PayloadLength(_) => { + AddressParseError::InvalidBase58PayloadLength + } + ParseError::InvalidLegacyPrefix(_) => AddressParseError::InvalidLegacyPrefix, + ParseError::NetworkValidation(_) => AddressParseError::NetworkValidation, + _ => AddressParseError::OtherAddressParseErr, + } + } +} + +impl From for Bip32Error { + fn from(error: BdkBip32Error) -> Self { + match error { + BdkBip32Error::CannotDeriveFromHardenedKey => Bip32Error::CannotDeriveFromHardenedKey, + BdkBip32Error::Secp256k1(e) => Bip32Error::Secp256k1 { + error_message: e.to_string(), + }, + BdkBip32Error::InvalidChildNumber(num) => { + Bip32Error::InvalidChildNumber { child_number: num } + } + BdkBip32Error::InvalidChildNumberFormat => Bip32Error::InvalidChildNumberFormat, + BdkBip32Error::InvalidDerivationPathFormat => Bip32Error::InvalidDerivationPathFormat, + BdkBip32Error::UnknownVersion(bytes) => Bip32Error::UnknownVersion { + version: bytes.to_lower_hex_string(), + }, + BdkBip32Error::WrongExtendedKeyLength(len) => { + Bip32Error::WrongExtendedKeyLength { length: len as u32 } + } + BdkBip32Error::Base58(e) => Bip32Error::Base58 { + error_message: e.to_string(), + }, + BdkBip32Error::Hex(e) => Bip32Error::Hex { + error_message: e.to_string(), + }, + BdkBip32Error::InvalidPublicKeyHexLength(len) => { + Bip32Error::InvalidPublicKeyHexLength { length: len as u32 } + } + _ => Bip32Error::UnknownError { + error_message: format!("Unhandled error: {:?}", error), + }, + } + } +} + +impl From for Bip39Error { + fn from(error: BdkBip39Error) -> Self { + match error { + BdkBip39Error::BadWordCount(word_count) => Bip39Error::BadWordCount { + word_count: word_count.try_into().expect("word count exceeds u64"), + }, + BdkBip39Error::UnknownWord(index) => Bip39Error::UnknownWord { + index: index.try_into().expect("index exceeds u64"), + }, + BdkBip39Error::BadEntropyBitCount(bit_count) => Bip39Error::BadEntropyBitCount { + bit_count: bit_count.try_into().expect("bit count exceeds u64"), + }, + BdkBip39Error::InvalidChecksum => Bip39Error::InvalidChecksum, + BdkBip39Error::AmbiguousLanguages(info) => Bip39Error::AmbiguousLanguages { + languages: format!("{:?}", info), + }, + } + } +} + +impl From for CalculateFeeError { + fn from(error: BdkCalculateFeeError) -> Self { + match error { + BdkCalculateFeeError::MissingTxOut(out_points) => CalculateFeeError::MissingTxOut { + out_points: out_points.iter().map(|e| e.to_owned().into()).collect(), + }, + BdkCalculateFeeError::NegativeFee(signed_amount) => CalculateFeeError::NegativeFee { + amount: signed_amount.to_string(), + }, + } + } +} + +impl From for CannotConnectError { + fn from(error: BdkCannotConnectError) -> Self { + CannotConnectError::Include { + height: error.try_include_height, + } + } +} + +impl From for CreateTxError { + fn from(error: BdkCreateTxError) -> Self { + match error { + BdkCreateTxError::Descriptor(e) => CreateTxError::Descriptor { + error_message: e.to_string(), + }, + BdkCreateTxError::Policy(e) => CreateTxError::Policy { + error_message: e.to_string(), + }, + BdkCreateTxError::SpendingPolicyRequired(kind) => { + CreateTxError::SpendingPolicyRequired { + kind: format!("{:?}", kind), + } + } + BdkCreateTxError::Version0 => CreateTxError::Version0, + BdkCreateTxError::Version1Csv => CreateTxError::Version1Csv, + BdkCreateTxError::LockTime { + requested, + required, + } => CreateTxError::LockTime { + requested_time: requested.to_string(), + required_time: required.to_string(), + }, + BdkCreateTxError::RbfSequence => CreateTxError::RbfSequence, + BdkCreateTxError::RbfSequenceCsv { rbf, csv } => CreateTxError::RbfSequenceCsv { + rbf: rbf.to_string(), + csv: csv.to_string(), + }, + BdkCreateTxError::FeeTooLow { required } => CreateTxError::FeeTooLow { + fee_required: required.to_string(), + }, + BdkCreateTxError::FeeRateTooLow { required } => CreateTxError::FeeRateTooLow { + fee_rate_required: required.to_string(), + }, + BdkCreateTxError::NoUtxosSelected => CreateTxError::NoUtxosSelected, + BdkCreateTxError::OutputBelowDustLimit(index) => CreateTxError::OutputBelowDustLimit { + index: index as u64, + }, + BdkCreateTxError::CoinSelection(e) => CreateTxError::CoinSelection { + error_message: e.to_string(), + }, + BdkCreateTxError::NoRecipients => CreateTxError::NoRecipients, + BdkCreateTxError::Psbt(e) => CreateTxError::Psbt { + error_message: e.to_string(), + }, + BdkCreateTxError::MissingKeyOrigin(key) => CreateTxError::MissingKeyOrigin { key }, + BdkCreateTxError::UnknownUtxo => CreateTxError::UnknownUtxo { + outpoint: "Unknown".to_string(), + }, + BdkCreateTxError::MissingNonWitnessUtxo(outpoint) => { + CreateTxError::MissingNonWitnessUtxo { + outpoint: outpoint.to_string(), + } + } + BdkCreateTxError::MiniscriptPsbt(e) => CreateTxError::MiniscriptPsbt { + error_message: e.to_string(), + }, + } + } +} + +impl From> for CreateWithPersistError { + fn from(error: BdkCreateWithPersistError) -> Self { + match error { + BdkCreateWithPersistError::Persist(e) => CreateWithPersistError::Persist { + error_message: e.to_string(), + }, + BdkCreateWithPersistError::Descriptor(e) => CreateWithPersistError::Descriptor { + error_message: e.to_string(), + }, + // Objects cannot currently be used in enumerations + BdkCreateWithPersistError::DataAlreadyExists(_e) => { + CreateWithPersistError::DataAlreadyExists + } + } + } +} + +impl From for CreateTxError { + fn from(error: AddUtxoError) -> Self { + match error { + AddUtxoError::UnknownUtxo(outpoint) => CreateTxError::UnknownUtxo { + outpoint: outpoint.to_string(), + }, + } + } +} + +impl From for CreateTxError { + fn from(error: BuildFeeBumpError) -> Self { + match error { + BuildFeeBumpError::UnknownUtxo(outpoint) => CreateTxError::UnknownUtxo { + outpoint: outpoint.to_string(), + }, + BuildFeeBumpError::TransactionNotFound(txid) => CreateTxError::TransactionNotFound { + txid: txid.to_string(), + }, + BuildFeeBumpError::TransactionConfirmed(txid) => CreateTxError::TransactionConfirmed { + txid: txid.to_string(), + }, + BuildFeeBumpError::IrreplaceableTransaction(txid) => { + CreateTxError::IrreplaceableTransaction { + txid: txid.to_string(), + } + } + BuildFeeBumpError::FeeRateUnavailable => CreateTxError::FeeRateUnavailable, + } } } + impl From for DescriptorError { - fn from(value: BdkDescriptorError) -> Self { - match value { + fn from(error: BdkDescriptorError) -> Self { + match error { 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::Key(e) => DescriptorError::Key { + error_message: e.to_string(), + }, + BdkDescriptorError::Policy(e) => DescriptorError::Policy { + error_message: e.to_string(), + }, + BdkDescriptorError::InvalidDescriptorCharacter(char) => { + DescriptorError::InvalidDescriptorCharacter { + charector: char.to_string(), + } + } + BdkDescriptorError::Bip32(e) => DescriptorError::Bip32 { + error_message: e.to_string(), + }, + BdkDescriptorError::Base58(e) => DescriptorError::Base58 { + error_message: e.to_string(), + }, + BdkDescriptorError::Pk(e) => DescriptorError::Pk { + error_message: e.to_string(), + }, + BdkDescriptorError::Miniscript(e) => DescriptorError::Miniscript { + error_message: e.to_string(), + }, + BdkDescriptorError::Hex(e) => DescriptorError::Hex { + error_message: e.to_string(), + }, + BdkDescriptorError::ExternalAndInternalAreTheSame => { + DescriptorError::ExternalAndInternalAreTheSame } - BdkDescriptorError::Bip32(e) => DescriptorError::Bip32(e.to_string()), - BdkDescriptorError::Base58(e) => DescriptorError::Base58(e.to_string()), - BdkDescriptorError::Pk(e) => DescriptorError::Pk(e.to_string()), - BdkDescriptorError::Miniscript(e) => DescriptorError::Miniscript(e.to_string()), - BdkDescriptorError::Hex(e) => DescriptorError::Hex(e.to_string()), } } } -#[derive(Debug)] -pub enum HexError { - InvalidChar(u8), - OddLengthString(usize), - InvalidLength(usize, usize), -} -impl From for HexError { - fn from(value: bdk::bitcoin::hashes::hex::Error) -> Self { - match value { - bdk::bitcoin::hashes::hex::Error::InvalidChar(e) => HexError::InvalidChar(e), - bdk::bitcoin::hashes::hex::Error::OddLengthString(e) => HexError::OddLengthString(e), - bdk::bitcoin::hashes::hex::Error::InvalidLength(e, f) => HexError::InvalidLength(e, f), +impl From for DescriptorKeyError { + fn from(err: BdkDescriptorKeyParseError) -> DescriptorKeyError { + DescriptorKeyError::Parse { + error_message: format!("DescriptorKeyError error: {:?}", err), } } } -#[derive(Debug)] -pub enum ConsensusError { - Io(String), - OversizedVectorAllocation { requested: usize, max: usize }, - InvalidChecksum { expected: [u8; 4], actual: [u8; 4] }, - NonMinimalVarInt, - ParseFailed(String), - UnsupportedSegwitFlag(u8), +impl From for DescriptorKeyError { + fn from(error: BdkBip32Error) -> DescriptorKeyError { + DescriptorKeyError::Bip32 { + error_message: format!("BIP32 derivation error: {:?}", error), + } + } } -impl From for BdkError { - fn from(value: bdk::bitcoin::consensus::encode::Error) -> Self { - BdkError::Consensus(value.into()) +impl From for DescriptorError { + fn from(value: KeyError) -> Self { + DescriptorError::Key { + error_message: value.to_string(), + } } } -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 } + +impl From for EsploraError { + fn from(error: BdkEsploraError) -> Self { + match error { + BdkEsploraError::Minreq(e) => EsploraError::Minreq { + error_message: e.to_string(), + }, + BdkEsploraError::HttpResponse { status, message } => EsploraError::HttpResponse { + status, + error_message: message, + }, + BdkEsploraError::Parsing(e) => EsploraError::Parsing { + error_message: e.to_string(), + }, + Error::StatusCode(e) => EsploraError::StatusCode { + error_message: e.to_string(), + }, + BdkEsploraError::BitcoinEncoding(e) => EsploraError::BitcoinEncoding { + error_message: e.to_string(), + }, + BdkEsploraError::HexToArray(e) => EsploraError::HexToArray { + error_message: e.to_string(), + }, + BdkEsploraError::HexToBytes(e) => EsploraError::HexToBytes { + error_message: e.to_string(), + }, + BdkEsploraError::TransactionNotFound(_) => EsploraError::TransactionNotFound, + BdkEsploraError::HeaderHeightNotFound(height) => { + EsploraError::HeaderHeightNotFound { height } } - bdk::bitcoin::consensus::encode::Error::NonMinimalVarInt => { - ConsensusError::NonMinimalVarInt + BdkEsploraError::HeaderHashNotFound(_) => EsploraError::HeaderHashNotFound, + Error::InvalidHttpHeaderName(name) => EsploraError::InvalidHttpHeaderName { name }, + BdkEsploraError::InvalidHttpHeaderValue(value) => { + EsploraError::InvalidHttpHeaderValue { value } } - bdk::bitcoin::consensus::encode::Error::ParseFailed(e) => { - ConsensusError::ParseFailed(e.to_string()) + } + } +} + +impl From> for EsploraError { + fn from(error: Box) -> Self { + match *error { + BdkEsploraError::Minreq(e) => EsploraError::Minreq { + error_message: e.to_string(), + }, + BdkEsploraError::HttpResponse { status, message } => EsploraError::HttpResponse { + status, + error_message: message, + }, + BdkEsploraError::Parsing(e) => EsploraError::Parsing { + error_message: e.to_string(), + }, + Error::StatusCode(e) => EsploraError::StatusCode { + error_message: e.to_string(), + }, + BdkEsploraError::BitcoinEncoding(e) => EsploraError::BitcoinEncoding { + error_message: e.to_string(), + }, + BdkEsploraError::HexToArray(e) => EsploraError::HexToArray { + error_message: e.to_string(), + }, + BdkEsploraError::HexToBytes(e) => EsploraError::HexToBytes { + error_message: e.to_string(), + }, + BdkEsploraError::TransactionNotFound(_) => EsploraError::TransactionNotFound, + BdkEsploraError::HeaderHeightNotFound(height) => { + EsploraError::HeaderHeightNotFound { height } } - bdk::bitcoin::consensus::encode::Error::UnsupportedSegwitFlag(e) => { - ConsensusError::UnsupportedSegwitFlag(e) + BdkEsploraError::HeaderHashNotFound(_) => EsploraError::HeaderHashNotFound, + Error::InvalidHttpHeaderName(name) => EsploraError::InvalidHttpHeaderName { name }, + BdkEsploraError::InvalidHttpHeaderValue(value) => { + EsploraError::InvalidHttpHeaderValue { value } } - _ => unreachable!(), } } } -#[derive(Debug)] -pub enum AddressError { - Base58(String), - Bech32(String), - EmptyBech32Payload, - InvalidBech32Variant { - expected: Variant, - found: Variant, - }, - InvalidWitnessVersion(u8), - UnparsableWitnessVersion(String), - MalformedWitnessVersion, - InvalidWitnessProgramLength(usize), - InvalidSegwitV0ProgramLength(usize), - UncompressedPubkey, - ExcessiveScriptSize, - UnrecognizedScript, - UnknownAddressType(String), - NetworkValidation { - network_required: Network, - network_found: Network, - address: String, - }, + +impl From for ExtractTxError { + fn from(error: BdkExtractTxError) -> Self { + match error { + BdkExtractTxError::AbsurdFeeRate { fee_rate, .. } => { + let sat_per_vbyte = fee_rate.to_sat_per_vb_ceil(); + ExtractTxError::AbsurdFeeRate { + fee_rate: sat_per_vbyte, + } + } + BdkExtractTxError::MissingInputValue { .. } => ExtractTxError::MissingInputValue, + BdkExtractTxError::SendingTooMuch { .. } => ExtractTxError::SendingTooMuch, + _ => ExtractTxError::OtherExtractTxErr, + } + } } -impl From for BdkError { - fn from(value: bdk::bitcoin::address::Error) -> Self { - BdkError::Address(value.into()) + +impl From for FromScriptError { + fn from(error: BdkFromScriptError) -> Self { + match error { + BdkFromScriptError::UnrecognizedScript => FromScriptError::UnrecognizedScript, + BdkFromScriptError::WitnessProgram(e) => FromScriptError::WitnessProgram { + error_message: e.to_string(), + }, + BdkFromScriptError::WitnessVersion(e) => FromScriptError::WitnessVersion { + error_message: e.to_string(), + }, + _ => FromScriptError::OtherFromScriptErr, + } } } -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(), +impl From> for LoadWithPersistError { + fn from(error: BdkLoadWithPersistError) -> Self { + match error { + BdkLoadWithPersistError::Persist(e) => LoadWithPersistError::Persist { + error_message: e.to_string(), + }, + BdkLoadWithPersistError::InvalidChangeSet(e) => { + LoadWithPersistError::InvalidChangeSet { + error_message: e.to_string(), } } - bdk::bitcoin::address::Error::InvalidWitnessVersion(e) => { - AddressError::InvalidWitnessVersion(e) + } + } +} + +impl From for PersistenceError { + fn from(error: std::io::Error) -> Self { + PersistenceError::Write { + error_message: error.to_string(), + } + } +} + +impl From for PsbtError { + fn from(error: BdkPsbtError) -> Self { + match error { + BdkPsbtError::InvalidMagic => PsbtError::InvalidMagic, + BdkPsbtError::MissingUtxo => PsbtError::MissingUtxo, + BdkPsbtError::InvalidSeparator => PsbtError::InvalidSeparator, + BdkPsbtError::PsbtUtxoOutOfbounds => PsbtError::PsbtUtxoOutOfBounds, + BdkPsbtError::InvalidKey(key) => PsbtError::InvalidKey { + key: key.to_string(), + }, + BdkPsbtError::InvalidProprietaryKey => PsbtError::InvalidProprietaryKey, + BdkPsbtError::DuplicateKey(key) => PsbtError::DuplicateKey { + key: key.to_string(), + }, + BdkPsbtError::UnsignedTxHasScriptSigs => PsbtError::UnsignedTxHasScriptSigs, + BdkPsbtError::UnsignedTxHasScriptWitnesses => PsbtError::UnsignedTxHasScriptWitnesses, + BdkPsbtError::MustHaveUnsignedTx => PsbtError::MustHaveUnsignedTx, + BdkPsbtError::NoMorePairs => PsbtError::NoMorePairs, + BdkPsbtError::UnexpectedUnsignedTx { .. } => PsbtError::UnexpectedUnsignedTx, + BdkPsbtError::NonStandardSighashType(sighash) => { + PsbtError::NonStandardSighashType { sighash } } - bdk::bitcoin::address::Error::UnparsableWitnessVersion(e) => { - AddressError::UnparsableWitnessVersion(e.to_string()) + BdkPsbtError::InvalidHash(hash) => PsbtError::InvalidHash { + hash: hash.to_string(), + }, + BdkPsbtError::InvalidPreimageHashPair { .. } => PsbtError::InvalidPreimageHashPair, + BdkPsbtError::CombineInconsistentKeySources(xpub) => { + PsbtError::CombineInconsistentKeySources { + xpub: xpub.to_string(), + } } - bdk::bitcoin::address::Error::MalformedWitnessVersion => { - AddressError::MalformedWitnessVersion + BdkPsbtError::ConsensusEncoding(encoding_error) => PsbtError::ConsensusEncoding { + encoding_error: encoding_error.to_string(), + }, + BdkPsbtError::NegativeFee => PsbtError::NegativeFee, + BdkPsbtError::FeeOverflow => PsbtError::FeeOverflow, + BdkPsbtError::InvalidPublicKey(e) => PsbtError::InvalidPublicKey { + error_message: e.to_string(), + }, + BdkPsbtError::InvalidSecp256k1PublicKey(e) => PsbtError::InvalidSecp256k1PublicKey { + secp256k1_error: e.to_string(), + }, + BdkPsbtError::InvalidXOnlyPublicKey => PsbtError::InvalidXOnlyPublicKey, + BdkPsbtError::InvalidEcdsaSignature(e) => PsbtError::InvalidEcdsaSignature { + error_message: e.to_string(), + }, + BdkPsbtError::InvalidTaprootSignature(e) => PsbtError::InvalidTaprootSignature { + error_message: e.to_string(), + }, + BdkPsbtError::InvalidControlBlock => PsbtError::InvalidControlBlock, + BdkPsbtError::InvalidLeafVersion => PsbtError::InvalidLeafVersion, + BdkPsbtError::Taproot(_) => PsbtError::Taproot, + BdkPsbtError::TapTree(e) => PsbtError::TapTree { + error_message: e.to_string(), + }, + BdkPsbtError::XPubKey(_) => PsbtError::XPubKey, + BdkPsbtError::Version(e) => PsbtError::Version { + error_message: e.to_string(), + }, + BdkPsbtError::PartialDataConsumption => PsbtError::PartialDataConsumption, + BdkPsbtError::Io(e) => PsbtError::Io { + error_message: e.to_string(), + }, + _ => PsbtError::OtherPsbtErr, + } + } +} + +impl From for PsbtParseError { + fn from(error: BdkPsbtParseError) -> Self { + match error { + BdkPsbtParseError::PsbtEncoding(e) => PsbtParseError::PsbtEncoding { + error_message: e.to_string(), + }, + BdkPsbtParseError::Base64Encoding(e) => PsbtParseError::Base64Encoding { + error_message: e.to_string(), + }, + _ => { + unreachable!("this is required because of the non-exhaustive enum in rust-bitcoin") } - bdk::bitcoin::address::Error::InvalidWitnessProgramLength(e) => { - AddressError::InvalidWitnessProgramLength(e) + } + } +} + +impl From for SignerError { + fn from(error: BdkSignerError) -> Self { + match error { + BdkSignerError::MissingKey => SignerError::MissingKey, + BdkSignerError::InvalidKey => SignerError::InvalidKey, + BdkSignerError::UserCanceled => SignerError::UserCanceled, + BdkSignerError::InputIndexOutOfRange => SignerError::InputIndexOutOfRange, + BdkSignerError::MissingNonWitnessUtxo => SignerError::MissingNonWitnessUtxo, + BdkSignerError::InvalidNonWitnessUtxo => SignerError::InvalidNonWitnessUtxo, + BdkSignerError::MissingWitnessUtxo => SignerError::MissingWitnessUtxo, + BdkSignerError::MissingWitnessScript => SignerError::MissingWitnessScript, + BdkSignerError::MissingHdKeypath => SignerError::MissingHdKeypath, + BdkSignerError::NonStandardSighash => SignerError::NonStandardSighash, + BdkSignerError::InvalidSighash => SignerError::InvalidSighash, + BdkSignerError::SighashTaproot(e) => SignerError::SighashTaproot { + error_message: e.to_string(), + }, + BdkSignerError::MiniscriptPsbt(e) => SignerError::MiniscriptPsbt { + error_message: e.to_string(), + }, + BdkSignerError::External(e) => SignerError::External { error_message: e }, + BdkSignerError::Psbt(e) => SignerError::Psbt { + error_message: e.to_string(), + }, + } + } +} + +impl From for TransactionError { + fn from(error: BdkEncodeError) -> Self { + match error { + BdkEncodeError::Io(_) => TransactionError::Io, + BdkEncodeError::OversizedVectorAllocation { .. } => { + TransactionError::OversizedVectorAllocation } - bdk::bitcoin::address::Error::InvalidSegwitV0ProgramLength(e) => { - AddressError::InvalidSegwitV0ProgramLength(e) + BdkEncodeError::InvalidChecksum { expected, actual } => { + TransactionError::InvalidChecksum { + expected: DisplayHex::to_lower_hex_string(&expected), + actual: DisplayHex::to_lower_hex_string(&actual), + } } - 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) + BdkEncodeError::NonMinimalVarInt => TransactionError::NonMinimalVarInt, + BdkEncodeError::ParseFailed(_) => TransactionError::ParseFailed, + BdkEncodeError::UnsupportedSegwitFlag(flag) => { + TransactionError::UnsupportedSegwitFlag { flag } } - 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!(), + _ => TransactionError::OtherTransactionErr, } } } -impl From for BdkError { - fn from(value: bdk::miniscript::Error) -> Self { - BdkError::Miniscript(value.to_string()) +impl From for SqliteError { + fn from(error: BdkSqliteError) -> Self { + SqliteError::Sqlite { + rusqlite_error: error.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()) +// /// Error returned when parsing integer from an supposedly prefixed hex string for +// /// a type that can be created infallibly from an integer. +// #[derive(Debug, Clone, Eq, PartialEq)] +// pub enum PrefixedHexError { +// /// Hex string is missing prefix. +// MissingPrefix(String), +// /// Error parsing integer from hex string. +// ParseInt(String), +// } +// impl From for PrefixedHexError { +// fn from(value: bdk_core::bitcoin::error::PrefixedHexError) -> Self { +// match value { +// chain::bitcoin::error::PrefixedHexError::MissingPrefix(e) => +// PrefixedHexError::MissingPrefix(e.to_string()), +// chain::bitcoin::error::PrefixedHexError::ParseInt(e) => +// PrefixedHexError::ParseInt(e.to_string()), +// } +// } +// } + +impl From for DescriptorError { + fn from(value: bdk_wallet::miniscript::Error) -> Self { + DescriptorError::Miniscript { + error_message: value.to_string(), + } } } diff --git a/rust/src/api/esplora.rs b/rust/src/api/esplora.rs new file mode 100644 index 00000000..aa4180ea --- /dev/null +++ b/rust/src/api/esplora.rs @@ -0,0 +1,93 @@ +use bdk_esplora::esplora_client::Builder; +use bdk_esplora::EsploraExt; +use bdk_wallet::chain::spk_client::FullScanRequest as BdkFullScanRequest; +use bdk_wallet::chain::spk_client::FullScanResult as BdkFullScanResult; +use bdk_wallet::chain::spk_client::SyncRequest as BdkSyncRequest; +use bdk_wallet::chain::spk_client::SyncResult as BdkSyncResult; +use bdk_wallet::KeychainKind; +use bdk_wallet::Update as BdkUpdate; + +use std::collections::BTreeMap; + +use crate::frb_generated::RustOpaque; + +use super::bitcoin::FfiTransaction; +use super::error::EsploraError; +use super::types::{FfiFullScanRequest, FfiSyncRequest, FfiUpdate}; + +pub struct FfiEsploraClient { + pub opaque: RustOpaque, +} + +impl FfiEsploraClient { + pub fn new(url: String) -> Self { + let client = Builder::new(url.as_str()).build_blocking(); + Self { + opaque: RustOpaque::new(client), + } + } + + pub fn full_scan( + opaque: FfiEsploraClient, + request: FfiFullScanRequest, + stop_gap: u64, + parallel_requests: u64, + ) -> Result { + //todo; resolve unhandled unwrap()s + // using option and take is not ideal but the only way to take full ownership of the request + let request: BdkFullScanRequest = request + .0 + .lock() + .unwrap() + .take() + .ok_or(EsploraError::RequestAlreadyConsumed)?; + + let result: BdkFullScanResult = + opaque + .opaque + .full_scan(request, stop_gap as usize, parallel_requests as usize)?; + + let update = BdkUpdate { + last_active_indices: result.last_active_indices, + tx_update: result.tx_update, + chain: result.chain_update, + }; + + Ok(FfiUpdate(RustOpaque::new(update))) + } + + pub fn sync( + opaque: FfiEsploraClient, + request: FfiSyncRequest, + parallel_requests: u64, + ) -> Result { + //todo; resolve unhandled unwrap()s + // using option and take is not ideal but the only way to take full ownership of the request + let request: BdkSyncRequest<(KeychainKind, u32)> = request + .0 + .lock() + .unwrap() + .take() + .ok_or(EsploraError::RequestAlreadyConsumed)?; + + let result: BdkSyncResult = opaque.opaque.sync(request, parallel_requests as usize)?; + + let update = BdkUpdate { + last_active_indices: BTreeMap::default(), + tx_update: result.tx_update, + chain: result.chain_update, + }; + + Ok(FfiUpdate(RustOpaque::new(update))) + } + + pub fn broadcast( + opaque: FfiEsploraClient, + transaction: &FfiTransaction, + ) -> Result<(), EsploraError> { + opaque + .opaque + .broadcast(&transaction.into()) + .map_err(EsploraError::from) + } +} diff --git a/rust/src/api/key.rs b/rust/src/api/key.rs index 9d106e0a..60e8fb9b 100644 --- a/rust/src/api/key.rs +++ b/rust/src/api/key.rs @@ -1,124 +1,140 @@ -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; +pub use bdk_wallet::bitcoin; +use bdk_wallet::bitcoin::secp256k1::Secp256k1; +pub use bdk_wallet::keys; +use bdk_wallet::keys::bip39::Language; +use bdk_wallet::keys::{DerivableKey, GeneratableKey}; +use bdk_wallet::miniscript::descriptor::{DescriptorXKey, Wildcard}; +use bdk_wallet::miniscript::BareCtx; use flutter_rust_bridge::frb; use std::str::FromStr; -pub struct BdkMnemonic { - pub ptr: RustOpaque, +use super::error::{Bip32Error, Bip39Error, DescriptorError, DescriptorKeyError}; + +pub struct FfiMnemonic { + pub opaque: RustOpaque, } -impl From for BdkMnemonic { +impl From for FfiMnemonic { fn from(value: keys::bip39::Mnemonic) -> Self { Self { - ptr: RustOpaque::new(value), + opaque: RustOpaque::new(value), } } } -impl BdkMnemonic { +impl FfiMnemonic { /// Generates Mnemonic with a random entropy - pub fn new(word_count: WordCount) -> Result { + pub fn new(word_count: WordCount) -> Result { + //todo; resolve unhandled unwrap()s let generated_key: keys::GeneratedKey<_, BareCtx> = - keys::bip39::Mnemonic::generate((word_count.into(), Language::English)).unwrap(); + (match keys::bip39::Mnemonic::generate((word_count.into(), Language::English)) { + Ok(value) => Ok(value), + Err(Some(err)) => Err(err.into()), + Err(None) => Err(Bip39Error::Generic { + error_message: "".to_string(), + }), + })?; + keys::bip39::Mnemonic::parse_in(Language::English, generated_key.to_string()) .map(|e| e.into()) - .map_err(|e| BdkError::Bip39(e.to_string())) + .map_err(Bip39Error::from) } /// Parse a Mnemonic with given string - pub fn from_string(mnemonic: String) -> Result { + 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())) + .map_err(Bip39Error::from) } /// 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 { + 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())) + .map_err(Bip39Error::from) } #[frb(sync)] pub fn as_string(&self) -> String { - self.ptr.to_string() + self.opaque.to_string() } } -pub struct BdkDerivationPath { - pub ptr: RustOpaque, +pub struct FfiDerivationPath { + pub opaque: RustOpaque, } -impl From for BdkDerivationPath { +impl From for FfiDerivationPath { fn from(value: bitcoin::bip32::DerivationPath) -> Self { - BdkDerivationPath { - ptr: RustOpaque::new(value), + FfiDerivationPath { + opaque: RustOpaque::new(value), } } } -impl BdkDerivationPath { - pub fn from_string(path: String) -> Result { +impl FfiDerivationPath { + 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())) + .map_err(Bip32Error::from) } #[frb(sync)] pub fn as_string(&self) -> String { - self.ptr.to_string() + self.opaque.to_string() } } #[derive(Debug)] -pub struct BdkDescriptorSecretKey { - pub ptr: RustOpaque, +pub struct FfiDescriptorSecretKey { + pub opaque: RustOpaque, } -impl From for BdkDescriptorSecretKey { +impl From for FfiDescriptorSecretKey { fn from(value: keys::DescriptorSecretKey) -> Self { Self { - ptr: RustOpaque::new(value), + opaque: RustOpaque::new(value), } } } -impl BdkDescriptorSecretKey { +impl FfiDescriptorSecretKey { pub fn create( network: Network, - mnemonic: BdkMnemonic, + mnemonic: FfiMnemonic, password: Option, - ) -> Result { - let mnemonic = (*mnemonic.ptr).clone(); - let xkey: keys::ExtendedKey = (mnemonic, password).into_extended_key().unwrap(); + ) -> Result { + let mnemonic = (*mnemonic.opaque).clone(); + let xkey: keys::ExtendedKey = (mnemonic, password).into_extended_key()?; + let xpriv = match xkey.into_xprv(network.into()) { + Some(e) => Ok(e), + None => Err(DescriptorError::MissingPrivateData), + }; let descriptor_secret_key = keys::DescriptorSecretKey::XPrv(DescriptorXKey { origin: None, - xkey: xkey.into_xprv(network.into()).unwrap(), + xkey: xpriv?, derivation_path: bitcoin::bip32::DerivationPath::master(), wildcard: Wildcard::Unhardened, }); Ok(descriptor_secret_key.into()) } - pub fn derive(ptr: BdkDescriptorSecretKey, path: BdkDerivationPath) -> Result { + pub fn derive( + opaque: FfiDescriptorSecretKey, + path: FfiDerivationPath, + ) -> Result { let secp = Secp256k1::new(); - let descriptor_secret_key = (*ptr.ptr).clone(); + let descriptor_secret_key = (*opaque.opaque).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()))?; + .derive_priv(&secp, &(*path.opaque).clone()) + .map_err(DescriptorKeyError::from)?; let key_source = match descriptor_x_key.origin.clone() { Some((fingerprint, origin_path)) => { - (fingerprint, origin_path.extend(&(*path.ptr).clone())) + (fingerprint, origin_path.extend(&(*path.opaque).clone())) } None => ( descriptor_x_key.xkey.fingerprint(&secp), - (*path.ptr).clone(), + (*path.opaque).clone(), ), }; let derived_descriptor_secret_key = @@ -130,19 +146,20 @@ impl BdkDescriptorSecretKey { }); 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(), - )), + keys::DescriptorSecretKey::Single(_) => Err(DescriptorKeyError::InvalidKeyType), + keys::DescriptorSecretKey::MultiXPrv(_) => Err(DescriptorKeyError::InvalidKeyType), } } - pub fn extend(ptr: BdkDescriptorSecretKey, path: BdkDerivationPath) -> Result { - let descriptor_secret_key = (*ptr.ptr).clone(); + pub fn extend( + opaque: FfiDescriptorSecretKey, + path: FfiDerivationPath, + ) -> Result { + let descriptor_secret_key = (*opaque.opaque).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_path = descriptor_x_key + .derivation_path + .extend((*path.opaque).clone()); let extended_descriptor_secret_key = keys::DescriptorSecretKey::XPrv(DescriptorXKey { origin: descriptor_x_key.origin.clone(), @@ -152,78 +169,77 @@ impl BdkDescriptorSecretKey { }); 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(), - )), + keys::DescriptorSecretKey::Single(_) => Err(DescriptorKeyError::InvalidKeyType), + keys::DescriptorSecretKey::MultiXPrv(_) => Err(DescriptorKeyError::InvalidKeyType), } } #[frb(sync)] - pub fn as_public(ptr: BdkDescriptorSecretKey) -> Result { + pub fn as_public( + opaque: FfiDescriptorSecretKey, + ) -> Result { let secp = Secp256k1::new(); - let descriptor_public_key = ptr.ptr.to_public(&secp).unwrap(); + let descriptor_public_key = opaque.opaque.to_public(&secp)?; Ok(descriptor_public_key.into()) } #[frb(sync)] /// Get the private key as bytes. - pub fn secret_bytes(&self) -> Result, BdkError> { - let descriptor_secret_key = &*self.ptr; + pub fn secret_bytes(&self) -> Result, DescriptorKeyError> { + let descriptor_secret_key = &*self.opaque; 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(), - )), + keys::DescriptorSecretKey::Single(_) => Err(DescriptorKeyError::InvalidKeyType), + keys::DescriptorSecretKey::MultiXPrv(_) => Err(DescriptorKeyError::InvalidKeyType), } } - pub fn from_string(secret_key: String) -> Result { - let key = keys::DescriptorSecretKey::from_str(&*secret_key).unwrap(); + pub fn from_string(secret_key: String) -> Result { + let key = + keys::DescriptorSecretKey::from_str(&*secret_key).map_err(DescriptorKeyError::from)?; Ok(key.into()) } #[frb(sync)] pub fn as_string(&self) -> String { - self.ptr.to_string() + self.opaque.to_string() } } #[derive(Debug)] -pub struct BdkDescriptorPublicKey { - pub ptr: RustOpaque, +pub struct FfiDescriptorPublicKey { + pub opaque: RustOpaque, } -impl From for BdkDescriptorPublicKey { +impl From for FfiDescriptorPublicKey { fn from(value: keys::DescriptorPublicKey) -> Self { Self { - ptr: RustOpaque::new(value), + opaque: 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()) +impl FfiDescriptorPublicKey { + pub fn from_string(public_key: String) -> Result { + match keys::DescriptorPublicKey::from_str(public_key.as_str()) { + Ok(e) => Ok(e.into()), + Err(e) => Err(e.into()), + } } - pub fn derive(ptr: BdkDescriptorPublicKey, path: BdkDerivationPath) -> Result { + pub fn derive( + opaque: FfiDescriptorPublicKey, + path: FfiDerivationPath, + ) -> Result { let secp = Secp256k1::new(); - let descriptor_public_key = (*ptr.ptr).clone(); + let descriptor_public_key = (*opaque.opaque).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()))?; + .derive_pub(&secp, &(*path.opaque).clone()) + .map_err(DescriptorKeyError::from)?; let key_source = match descriptor_x_key.origin.clone() { Some((fingerprint, origin_path)) => { - (fingerprint, origin_path.extend(&(*path.ptr).clone())) + (fingerprint, origin_path.extend(&(*path.opaque).clone())) } - None => (descriptor_x_key.xkey.fingerprint(), (*path.ptr).clone()), + None => (descriptor_x_key.xkey.fingerprint(), (*path.opaque).clone()), }; let derived_descriptor_public_key = keys::DescriptorPublicKey::XPub(DescriptorXKey { @@ -233,25 +249,24 @@ impl BdkDescriptorPublicKey { wildcard: descriptor_x_key.wildcard, }); Ok(Self { - ptr: RustOpaque::new(derived_descriptor_public_key), + opaque: 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(), - )), + keys::DescriptorPublicKey::Single(_) => Err(DescriptorKeyError::InvalidKeyType), + keys::DescriptorPublicKey::MultiXPub(_) => Err(DescriptorKeyError::InvalidKeyType), } } - pub fn extend(ptr: BdkDescriptorPublicKey, path: BdkDerivationPath) -> Result { - let descriptor_public_key = (*ptr.ptr).clone(); + pub fn extend( + opaque: FfiDescriptorPublicKey, + path: FfiDerivationPath, + ) -> Result { + let descriptor_public_key = (*opaque.opaque).clone(); match descriptor_public_key { keys::DescriptorPublicKey::XPub(descriptor_x_key) => { let extended_path = descriptor_x_key .derivation_path - .extend(&(*path.ptr).clone()); + .extend(&(*path.opaque).clone()); let extended_descriptor_public_key = keys::DescriptorPublicKey::XPub(DescriptorXKey { origin: descriptor_x_key.origin.clone(), @@ -260,20 +275,16 @@ impl BdkDescriptorPublicKey { wildcard: descriptor_x_key.wildcard, }); Ok(Self { - ptr: RustOpaque::new(extended_descriptor_public_key), + opaque: 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(), - )), + keys::DescriptorPublicKey::Single(_) => Err(DescriptorKeyError::InvalidKeyType), + keys::DescriptorPublicKey::MultiXPub(_) => Err(DescriptorKeyError::InvalidKeyType), } } #[frb(sync)] pub fn as_string(&self) -> String { - self.ptr.to_string() + self.opaque.to_string() } } diff --git a/rust/src/api/mod.rs b/rust/src/api/mod.rs index 73e4799d..26771a2e 100644 --- a/rust/src/api/mod.rs +++ b/rust/src/api/mod.rs @@ -1,7 +1,26 @@ -pub mod blockchain; +// use std::{ fmt::Debug, sync::Mutex }; + +// use error::LockError; + +pub mod bitcoin; pub mod descriptor; +pub mod electrum; pub mod error; +pub mod esplora; pub mod key; -pub mod psbt; +pub mod store; +pub mod tx_builder; pub mod types; pub mod wallet; + +// pub(crate) fn handle_mutex(lock: &Mutex, operation: F) -> Result, E> +// where T: Debug, F: FnOnce(&mut T) -> Result +// { +// match lock.lock() { +// Ok(mut mutex_guard) => Ok(operation(&mut *mutex_guard)), +// Err(poisoned) => { +// drop(poisoned.into_inner()); +// Err(E::Generic { error_message: "Poison Error!".to_string() }) +// } +// } +// } diff --git a/rust/src/api/psbt.rs b/rust/src/api/psbt.rs deleted file mode 100644 index 30c1f6c6..00000000 --- a/rust/src/api/psbt.rs +++ /dev/null @@ -1,91 +0,0 @@ -use crate::api::error::BdkError; -use crate::api::types::{BdkTransaction, FeeRate}; -use crate::frb_generated::RustOpaque; - -use bdk::psbt::PsbtUtils; -use std::ops::Deref; -use std::str::FromStr; - -use flutter_rust_bridge::frb; - -#[derive(Debug)] -pub struct BdkPsbt { - pub ptr: RustOpaque>, -} - -impl From for BdkPsbt { - fn from(value: bdk::bitcoin::psbt::PartiallySignedTransaction) -> Self { - Self { - ptr: RustOpaque::new(std::sync::Mutex::new(value)), - } - } -} -impl BdkPsbt { - pub fn from_str(psbt_base64: String) -> Result { - let psbt: bdk::bitcoin::psbt::PartiallySignedTransaction = - bdk::bitcoin::psbt::PartiallySignedTransaction::from_str(&psbt_base64)?; - Ok(psbt.into()) - } - - #[frb(sync)] - pub fn as_string(&self) -> String { - let psbt = self.ptr.lock().unwrap().clone(); - psbt.to_string() - } - - ///Computes the `Txid`. - /// Hashes the transaction excluding the segwit data (i. e. the marker, flag bytes, and the witness fields themselves). - /// For non-segwit transactions which do not have any segwit data, this will be equal to transaction.wtxid(). - #[frb(sync)] - pub fn txid(&self) -> String { - let tx = self.ptr.lock().unwrap().clone().extract_tx(); - let txid = tx.txid(); - txid.to_string() - } - - /// Return the transaction. - #[frb(sync)] - 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. - #[frb(sync)] - 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. - #[frb(sync)] - pub fn fee_rate(&self) -> Option { - self.ptr.lock().unwrap().fee_rate().map(|e| e.into()) - } - - ///Serialize as raw binary data - #[frb(sync)] - pub fn serialize(&self) -> Vec { - let psbt = self.ptr.lock().unwrap().clone(); - psbt.serialize() - } - /// Serialize the PSBT data structure as a String of JSON. - #[frb(sync)] - pub fn json_serialize(&self) -> String { - let psbt = self.ptr.lock().unwrap(); - serde_json::to_string(psbt.deref()).unwrap() - } -} diff --git a/rust/src/api/store.rs b/rust/src/api/store.rs new file mode 100644 index 00000000..e2476161 --- /dev/null +++ b/rust/src/api/store.rs @@ -0,0 +1,23 @@ +use std::sync::MutexGuard; + +use crate::frb_generated::RustOpaque; + +use super::error::SqliteError; + +pub struct FfiConnection(pub RustOpaque>); + +impl FfiConnection { + pub fn new(path: String) -> Result { + let connection = bdk_wallet::rusqlite::Connection::open(path)?; + Ok(Self(RustOpaque::new(std::sync::Mutex::new(connection)))) + } + + pub fn new_in_memory() -> Result { + let connection = bdk_wallet::rusqlite::Connection::open_in_memory()?; + Ok(Self(RustOpaque::new(std::sync::Mutex::new(connection)))) + } + + pub(crate) fn get_store(&self) -> MutexGuard { + self.0.lock().expect("must lock") + } +} diff --git a/rust/src/api/tx_builder.rs b/rust/src/api/tx_builder.rs new file mode 100644 index 00000000..3ace084d --- /dev/null +++ b/rust/src/api/tx_builder.rs @@ -0,0 +1,145 @@ +use std::{ + collections::{BTreeMap, HashMap}, + str::FromStr, +}; + +use bdk_core::bitcoin::{script::PushBytesBuf, Amount, Sequence, Txid}; + +use super::{ + bitcoin::{FeeRate, FfiPsbt, FfiScriptBuf, OutPoint}, + error::{CreateTxError, TxidParseError}, + types::{ChangeSpendPolicy, KeychainKind, RbfValue}, + wallet::FfiWallet, +}; + +pub fn finish_bump_fee_tx_builder( + txid: String, + fee_rate: FeeRate, + wallet: FfiWallet, + enable_rbf: bool, + n_sequence: Option, +) -> anyhow::Result { + let txid = Txid::from_str(txid.as_str()).map_err(|e| CreateTxError::Generic { + error_message: e.to_string(), + })?; + //todo; resolve unhandled unwrap()s + let mut bdk_wallet = wallet.opaque.lock().unwrap(); + + let mut tx_builder = bdk_wallet.build_fee_bump(txid)?; + tx_builder.fee_rate(fee_rate.into()); + 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.into()), + Err(e) => Err(e.into()), + }; +} + +pub fn tx_builder_finish( + wallet: FfiWallet, + recipients: Vec<(FfiScriptBuf, u64)>, + utxos: Vec, + un_spendable: Vec, + change_policy: ChangeSpendPolicy, + manually_selected_only: bool, + fee_rate: Option, + fee_absolute: Option, + drain_wallet: bool, + policy_path: Option<(HashMap>, KeychainKind)>, + drain_to: Option, + rbf: Option, + data: Vec, +) -> anyhow::Result { + //todo; resolve unhandled unwrap()s + let mut binding = wallet.opaque.lock().unwrap(); + + let mut tx_builder = binding.build_tx(); + + for e in recipients { + tx_builder.add_recipient(e.0.into(), Amount::from_sat(e.1)); + } + + tx_builder.change_policy(change_policy.into()); + if let Some((map, chain)) = policy_path { + tx_builder.policy_path( + map.clone() + .into_iter() + .map(|(key, value)| (key, value.into_iter().map(|x| x as usize).collect())) + .collect::>>(), + chain.into(), + ); + } + + if !utxos.is_empty() { + let bdk_utxos = utxos + .iter() + .map(|e| { + <&OutPoint as TryInto>::try_into(e).map_err( + |e: TxidParseError| CreateTxError::Generic { + error_message: e.to_string(), + }, + ) + }) + .filter_map(Result::ok) + .collect::>(); + tx_builder + .add_utxos(bdk_utxos.as_slice()) + .map_err(CreateTxError::from)?; + } + if !un_spendable.is_empty() { + let bdk_unspendable = utxos + .iter() + .map(|e| { + <&OutPoint as TryInto>::try_into(e).map_err( + |e: TxidParseError| CreateTxError::Generic { + error_message: e.to_string(), + }, + ) + }) + .filter_map(Result::ok) + .collect::>(); + 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(sat_per_vb.into()); + } + if let Some(fee_amount) = fee_absolute { + tx_builder.fee_absolute(Amount::from_sat(fee_amount)); + } + if drain_wallet { + tx_builder.drain_wallet(); + } + if let Some(script_) = drain_to { + tx_builder.drain_to(script_.into()); + } + + 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(|_| CreateTxError::Generic { + error_message: "Failed to convert data to PushBytes".to_string(), + })?; + tx_builder.add_data(&push_bytes); + } + + return match tx_builder.finish() { + Ok(e) => Ok(e.into()), + Err(e) => Err(e.into()), + }; +} diff --git a/rust/src/api/types.rs b/rust/src/api/types.rs index 09685f48..13f1f900 100644 --- a/rust/src/api/types.rs +++ b/rust/src/api/types.rs @@ -1,157 +1,53 @@ -use crate::api::error::{BdkError, HexError}; +use std::sync::Arc; + use crate::frb_generated::RustOpaque; -use bdk::bitcoin::consensus::{serialize, Decodable}; -use bdk::bitcoin::hashes::hex::Error; -use bdk::database::AnyDatabaseConfig; -use flutter_rust_bridge::frb; -use serde::{Deserialize, Serialize}; -use std::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; +use bdk_core::spk_client::SyncItem; - 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, - } - } +// use bdk_core::spk_client::{ +// FullScanRequest, +// // SyncItem +// }; +use super::{ + bitcoin::{ + FfiAddress, + FfiScriptBuf, + FfiTransaction, + OutPoint, + TxOut, + // OutPoint, TxOut + }, + error::RequestBuilderError, +}; +use flutter_rust_bridge::{ + // frb, + frb, + DartFnFuture, +}; +use serde::Deserialize; +pub struct AddressInfo { + pub index: u32, + pub address: FfiAddress, + pub keychain: KeychainKind, } -#[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 AddressInfo { + fn from(address_info: bdk_wallet::AddressInfo) -> Self { + AddressInfo { + index: address_info.index, + address: address_info.address.into(), + keychain: address_info.keychain.into(), } } } -impl From for bdk::bitcoin::ScriptBuf { - fn from(value: BdkScriptBuf) -> Self { - bdk::bitcoin::ScriptBuf::from_bytes(value.bytes) - } -} -impl BdkScriptBuf { - #[frb(sync)] - ///Creates a new empty script. - pub fn empty() -> BdkScriptBuf { - bdk::bitcoin::ScriptBuf::new().into() - } - ///Creates a new empty script with pre-allocated capacity. - pub fn with_capacity(capacity: usize) -> BdkScriptBuf { - bdk::bitcoin::ScriptBuf::with_capacity(capacity).into() - } - - pub fn from_hex(s: String) -> Result { - bdk::bitcoin::ScriptBuf::from_hex(s.as_str()) - .map(|e| e.into()) - .map_err(|e| match e { - Error::InvalidChar(e) => BdkError::Hex(HexError::InvalidChar(e)), - Error::OddLengthString(e) => BdkError::Hex(HexError::OddLengthString(e)), - Error::InvalidLength(e, f) => BdkError::Hex(HexError::InvalidLength(e, f)), - }) - } - #[frb(sync)] - pub fn as_string(&self) -> String { - let script: bdk::bitcoin::ScriptBuf = self.to_owned().into(); - script.to_string() - } -} -pub struct PsbtSigHashType { - pub inner: u32, -} -impl From for bdk::bitcoin::psbt::PsbtSighashType { - fn from(value: PsbtSigHashType) -> Self { - bdk::bitcoin::psbt::PsbtSighashType::from_u32(value.inner) - } -} +// pub struct PsbtSigHashType { +// pub inner: u32, +// } +// impl From for bdk::bitcoin::psbt::PsbtSighashType { +// fn from(value: PsbtSigHashType) -> Self { +// bdk::bitcoin::psbt::PsbtSighashType::from_u32(value.inner) +// } +// } /// Local Wallet's Balance #[derive(Deserialize, Debug)] pub struct Balance { @@ -168,15 +64,15 @@ pub struct Balance { /// Get the whole balance visible to the wallet pub total: u64, } -impl From for Balance { - fn from(value: bdk::Balance) -> Self { +impl From for Balance { + fn from(value: bdk_wallet::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(), + immature: value.immature.to_sat(), + trusted_pending: value.trusted_pending.to_sat(), + untrusted_pending: value.untrusted_pending.to_sat(), + confirmed: value.confirmed.to_sat(), + spendable: value.trusted_spendable().to_sat(), + total: value.total().to_sat(), } } } @@ -202,97 +98,83 @@ pub enum AddressIndex { /// 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; +// impl From for bdk_core::bitcoin::address::AddressIndex { +// fn from(x: AddressIndex) -> bdk_core::bitcoin::AddressIndex { +// match x { +// AddressIndex::Increase => bdk_core::bitcoin::AddressIndex::New, +// AddressIndex::LastUnused => bdk_core::bitcoin::AddressIndex::LastUnused, +// AddressIndex::Peek { index } => bdk_core::bitcoin::AddressIndex::Peek(index), +// AddressIndex::Reset { index } => bdk_core::bitcoin::AddressIndex::Reset(index), +// } +// } +// } - 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()), - }) - } +#[derive(Debug)] +pub enum ChainPosition { + Confirmed { + confirmation_block_time: ConfirmationBlockTime, + }, + Unconfirmed { + timestamp: u64, + }, } -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)] +pub struct ConfirmationBlockTime { + pub block_id: BlockId, + pub confirmation_time: u64, } -#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize)] -///Block height and timestamp of a block -pub struct BlockTime { - ///Confirmation block height + +#[derive(Debug)] +pub struct BlockId { 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, + pub hash: String, +} +pub struct FfiCanonicalTx { + pub transaction: FfiTransaction, + pub chain_position: ChainPosition, +} +//TODO; Replace From with TryFrom +impl + From< + bdk_wallet::chain::tx_graph::CanonicalTx< + '_, + Arc, + bdk_wallet::chain::ConfirmationBlockTime, + >, + > for FfiCanonicalTx +{ + fn from( + value: bdk_wallet::chain::tx_graph::CanonicalTx< + '_, + Arc, + bdk_wallet::chain::ConfirmationBlockTime, + >, + ) -> Self { + let chain_position = match value.chain_position { + bdk_wallet::chain::ChainPosition::Confirmed(anchor) => { + let block_id = BlockId { + height: anchor.block_id.height, + hash: anchor.block_id.hash.to_string(), + }; + ChainPosition::Confirmed { + confirmation_block_time: ConfirmationBlockTime { + block_id, + confirmation_time: anchor.confirmation_time, + }, + } + } + bdk_wallet::chain::ChainPosition::Unconfirmed(timestamp) => { + ChainPosition::Unconfirmed { timestamp } + } + }; + //todo; resolve unhandled unwrap()s + FfiCanonicalTx { + transaction: (*value.tx_node.tx).clone().try_into().unwrap(), + chain_position, } } } -/// 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 { @@ -316,27 +198,29 @@ impl Default for Network { Network::Testnet } } -impl From for bdk::bitcoin::Network { +impl From for bdk_core::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, + Network::Signet => bdk_core::bitcoin::Network::Signet, + Network::Testnet => bdk_core::bitcoin::Network::Testnet, + Network::Regtest => bdk_core::bitcoin::Network::Regtest, + Network::Bitcoin => bdk_core::bitcoin::Network::Bitcoin, } } } -impl From for Network { - fn from(network: bdk::bitcoin::Network) -> Self { + +impl From for Network { + fn from(network: bdk_core::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, + bdk_core::bitcoin::Network::Signet => Network::Signet, + bdk_core::bitcoin::Network::Testnet => Network::Testnet, + bdk_core::bitcoin::Network::Regtest => Network::Regtest, + bdk_core::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) @@ -346,465 +230,57 @@ pub enum WordCount { ///24 words mnemonic (256 bits entropy) Words24, } -impl From for bdk::keys::bip39::WordCount { +impl From for bdk_wallet::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 - } + WordCount::Words12 => bdk_wallet::keys::bip39::WordCount::Words12, + WordCount::Words18 => bdk_wallet::keys::bip39::WordCount::Words18, + WordCount::Words24 => bdk_wallet::keys::bip39::WordCount::Words24, } } } -pub struct BdkAddress { - pub ptr: RustOpaque, -} -impl From for BdkAddress { - fn from(value: bdk::bitcoin::Address) -> Self { - Self { - ptr: RustOpaque::new(value), - } - } -} -impl From<&BdkAddress> for bdk::bitcoin::Address { - fn from(value: &BdkAddress) -> Self { - (*value.ptr).clone() - } -} -impl BdkAddress { - pub fn from_string(address: String, network: Network) -> Result { - match bdk::bitcoin::Address::from_str(address.as_str()) { - Ok(e) => match e.require_network(network.into()) { - Ok(e) => Ok(e.into()), - Err(e) => Err(e.into()), - }, - Err(e) => Err(e.into()), - } - } - - pub fn from_script(script: BdkScriptBuf, network: Network) -> Result { - bdk::bitcoin::Address::from_script( - >::into(script).as_script(), - network.into(), - ) - .map(|a| a.into()) - .map_err(|e| e.into()) - } - #[frb(sync)] - pub fn payload(&self) -> Payload { - match <&BdkAddress as Into>::into(self).payload { - bdk::bitcoin::address::Payload::PubkeyHash(pubkey_hash) => Payload::PubkeyHash { - pubkey_hash: pubkey_hash.to_string(), - }, - bdk::bitcoin::address::Payload::ScriptHash(script_hash) => Payload::ScriptHash { - script_hash: script_hash.to_string(), - }, - bdk::bitcoin::address::Payload::WitnessProgram(e) => Payload::WitnessProgram { - version: e.version().into(), - program: e.program().as_bytes().to_vec(), - }, - _ => unreachable!(), - } - } - - #[frb(sync)] - pub fn to_qr_uri(&self) -> String { - self.ptr.to_qr_uri() - } - #[frb(sync)] - pub fn network(&self) -> Network { - self.ptr.network.into() - } - #[frb(sync)] - pub fn script(ptr: BdkAddress) -> BdkScriptBuf { - ptr.ptr.script_pubkey().into() - } - - #[frb(sync)] - pub fn is_valid_for_network(&self, network: Network) -> bool { - if let Ok(unchecked_address) = self - .ptr - .to_string() - .parse::>() - { - unchecked_address.is_valid_for_network(network.into()) - } else { - false - } - } - #[frb(sync)] - pub fn as_string(&self) -> String { - self.ptr.to_string() - } -} -#[derive(Debug)] -pub enum Variant { - Bech32, - Bech32m, -} -impl From for Variant { - fn from(value: bdk::bitcoin::bech32::Variant) -> Self { - match value { - bdk::bitcoin::bech32::Variant::Bech32 => Variant::Bech32, - bdk::bitcoin::bech32::Variant::Bech32m => Variant::Bech32m, - } - } -} 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 { +impl From for LockTime { + fn from(value: bdk_wallet::bitcoin::absolute::LockTime) -> Self { match value { - bdk::bitcoin::blockdata::locktime::absolute::LockTime::Blocks(e) => { - LockTime::Blocks(e.to_consensus_u32()) - } - bdk::bitcoin::blockdata::locktime::absolute::LockTime::Seconds(e) => { - LockTime::Seconds(e.to_consensus_u32()) - } - } - } -} - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct BdkTransaction { - pub s: String, -} -impl BdkTransaction { - pub fn new( - version: i32, - lock_time: LockTime, - input: Vec, - output: Vec, - ) -> Result { - let mut inputs: Vec = vec![]; - for e in input.iter() { - inputs.push(e.try_into()?); - } - let output = output - .into_iter() - .map(|e| <&TxOut as Into>::into(&e)) - .collect(); - - (bdk::bitcoin::Transaction { - version, - lock_time: lock_time.try_into()?, - input: inputs, - output, - }) - .try_into() - } - pub fn from_bytes(transaction_bytes: Vec) -> Result { - let mut decoder = Cursor::new(transaction_bytes); - let tx: bdk::bitcoin::transaction::Transaction = - bdk::bitcoin::transaction::Transaction::consensus_decode(&mut decoder)?; - tx.try_into() - } - ///Computes the txid. For non-segwit transactions this will be identical to the output of wtxid(), - /// but for segwit transactions, this will give the correct txid (not including witnesses) while wtxid will also hash witnesses. - pub fn txid(&self) -> Result { - self.try_into() - .map(|e: bdk::bitcoin::Transaction| e.txid().to_string()) - } - ///Returns the regular byte-wise consensus-serialized size of this transaction. - pub fn weight(&self) -> Result { - self.try_into() - .map(|e: bdk::bitcoin::Transaction| e.weight().to_wu()) - } - ///Returns the regular byte-wise consensus-serialized size of this transaction. - pub fn size(&self) -> Result { - self.try_into() - .map(|e: bdk::bitcoin::Transaction| e.size() as u64) - } - ///Returns the “virtual size” (vsize) of this transaction. - /// - // Will be ceil(weight / 4.0). Note this implements the virtual size as per BIP141, which is different to what is implemented in Bitcoin Core. - // The computation should be the same for any remotely sane transaction, and a standardness-rule-correct version is available in the policy module. - pub fn vsize(&self) -> Result { - self.try_into() - .map(|e: bdk::bitcoin::Transaction| e.vsize() as u64) - } - ///Encodes an object into a vector. - pub fn serialize(&self) -> Result, BdkError> { - self.try_into() - .map(|e: bdk::bitcoin::Transaction| serialize(&e)) - } - ///Is this a coin base transaction? - pub fn is_coin_base(&self) -> Result { - self.try_into() - .map(|e: bdk::bitcoin::Transaction| e.is_coin_base()) - } - ///Returns true if the transaction itself opted in to be BIP-125-replaceable (RBF). - /// This does not cover the case where a transaction becomes replaceable due to ancestors being RBF. - pub fn is_explicitly_rbf(&self) -> Result { - self.try_into() - .map(|e: bdk::bitcoin::Transaction| e.is_explicitly_rbf()) - } - ///Returns true if this transactions nLockTime is enabled (BIP-65 ). - pub fn is_lock_time_enabled(&self) -> Result { - self.try_into() - .map(|e: bdk::bitcoin::Transaction| e.is_lock_time_enabled()) - } - ///The protocol version, is currently expected to be 1 or 2 (BIP 68). - pub fn version(&self) -> Result { - self.try_into() - .map(|e: bdk::bitcoin::Transaction| e.version) - } - ///Block height or timestamp. Transaction cannot be included in a block until this height/time. - pub fn lock_time(&self) -> Result { - self.try_into() - .map(|e: bdk::bitcoin::Transaction| e.lock_time.into()) - } - ///List of transaction inputs. - pub fn input(&self) -> Result, BdkError> { - self.try_into() - .map(|e: bdk::bitcoin::Transaction| e.input.iter().map(|x| x.into()).collect()) - } - ///List of transaction outputs. - pub fn output(&self) -> Result, BdkError> { - self.try_into() - .map(|e: bdk::bitcoin::Transaction| e.output.iter().map(|x| x.into()).collect()) - } -} -impl TryFrom for BdkTransaction { - type Error = BdkError; - fn try_from(tx: bdk::bitcoin::Transaction) -> Result { - Ok(BdkTransaction { - s: serde_json::to_string(&tx) - .map_err(|e| BdkError::InvalidTransaction(e.to_string()))?, - }) - } -} -impl TryFrom<&BdkTransaction> for bdk::bitcoin::Transaction { - type Error = BdkError; - fn try_from(tx: &BdkTransaction) -> Result { - serde_json::from_str(&tx.s).map_err(|e| BdkError::InvalidTransaction(e.to_string())) - } -} -///Configuration type for a SqliteDatabase database -pub struct SqliteDbConfiguration { - ///Main directory of the db - pub path: String, -} -///Configuration type for a sled Tree database -pub struct SledDbConfiguration { - ///Main directory of the db - pub path: String, - ///Name of the database tree, a separated namespace for the data - pub tree_name: String, -} -/// Type that can contain any of the database configurations defined by the library -/// This allows storing a single configuration that can be loaded into an DatabaseConfig -/// instance. Wallets that plan to offer users the ability to switch blockchain backend at runtime -/// will find this particularly useful. -pub enum DatabaseConfig { - Memory, - ///Simple key-value embedded database based on sled - Sqlite { - config: SqliteDbConfiguration, - }, - ///Sqlite embedded database using rusqlite - Sled { - config: SledDbConfiguration, - }, -} -impl From for AnyDatabaseConfig { - fn from(config: DatabaseConfig) -> Self { - match config { - DatabaseConfig::Memory => AnyDatabaseConfig::Memory(()), - DatabaseConfig::Sqlite { config } => { - AnyDatabaseConfig::Sqlite(bdk::database::any::SqliteDbConfiguration { - path: config.path, - }) + bdk_core::bitcoin::absolute::LockTime::Blocks(height) => { + LockTime::Blocks(height.to_consensus_u32()) } - DatabaseConfig::Sled { config } => { - AnyDatabaseConfig::Sled(bdk::database::any::SledDbConfiguration { - path: config.path, - tree_name: config.tree_name, - }) + bdk_core::bitcoin::absolute::LockTime::Seconds(time) => { + LockTime::Seconds(time.to_consensus_u32()) } } } } -#[derive(Debug, Clone)] +#[derive(Eq, Ord, PartialEq, PartialOrd)] ///Types of keychains pub enum KeychainKind { ExternalChain, ///Internal, usually used for change outputs InternalChain, } -impl From for KeychainKind { - fn from(e: bdk::KeychainKind) -> Self { +impl From for KeychainKind { + fn from(e: bdk_wallet::KeychainKind) -> Self { match e { - bdk::KeychainKind::External => KeychainKind::ExternalChain, - bdk::KeychainKind::Internal => KeychainKind::InternalChain, + bdk_wallet::KeychainKind::External => KeychainKind::ExternalChain, + bdk_wallet::KeychainKind::Internal => KeychainKind::InternalChain, } } } -impl From for bdk::KeychainKind { +impl From for bdk_wallet::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, + KeychainKind::ExternalChain => bdk_wallet::KeychainKind::External, + KeychainKind::InternalChain => bdk_wallet::KeychainKind::Internal, } } } -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 { @@ -836,16 +312,11 @@ pub struct SignOptions { /// 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, - + //TODO; Expose tap_leaves_options. // Specifies which Taproot script-spend leaves we should sign for. This option is // ignored if we're signing a non-taproot PSBT. // @@ -862,13 +333,12 @@ pub struct SignOptions { /// Defaults to `true`, i.e., we always grind ECDSA signature to sign with low r. pub allow_grinding: bool, } -impl From for bdk::SignOptions { +impl From for bdk_wallet::SignOptions { fn from(sign_options: SignOptions) -> Self { - bdk::SignOptions { + bdk_wallet::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, @@ -876,39 +346,217 @@ impl From for bdk::SignOptions { } } } -#[derive(Copy, Clone)] -pub struct FeeRate { - pub sat_per_vb: f32, + +pub struct FfiFullScanRequestBuilder( + pub RustOpaque< + std::sync::Mutex< + Option>, + >, + >, +); + +impl FfiFullScanRequestBuilder { + pub fn inspect_spks_for_all_keychains( + &self, + inspector: impl (Fn(KeychainKind, u32, FfiScriptBuf) -> DartFnFuture<()>) + + Send + + 'static + + std::marker::Sync, + ) -> Result { + let guard = self + .0 + .lock() + .unwrap() + .take() + .ok_or(RequestBuilderError::RequestAlreadyConsumed)?; + + let runtime = tokio::runtime::Runtime::new().unwrap(); + + // Inspect with the async inspector function + let full_scan_request_builder = guard.inspect(move |keychain, index, script| { + // Run the async Dart function in a blocking way within the runtime + runtime.block_on(inspector(keychain.into(), index, script.to_owned().into())) + }); + + Ok(FfiFullScanRequestBuilder(RustOpaque::new( + std::sync::Mutex::new(Some(full_scan_request_builder)), + ))) + } + pub fn build(&self) -> Result { + //todo; resolve unhandled unwrap()s + let guard = self + .0 + .lock() + .unwrap() + .take() + .ok_or(RequestBuilderError::RequestAlreadyConsumed)?; + Ok(FfiFullScanRequest(RustOpaque::new(std::sync::Mutex::new( + Some(guard.build()), + )))) + } +} +pub struct FfiSyncRequestBuilder( + pub RustOpaque< + std::sync::Mutex< + Option>, + >, + >, +); + +impl FfiSyncRequestBuilder { + pub fn inspect_spks( + &self, + inspector: impl (Fn(FfiScriptBuf, SyncProgress) -> DartFnFuture<()>) + + Send + + 'static + + std::marker::Sync, + ) -> Result { + //todo; resolve unhandled unwrap()s + let guard = self + .0 + .lock() + .unwrap() + .take() + .ok_or(RequestBuilderError::RequestAlreadyConsumed)?; + let runtime = tokio::runtime::Runtime::new().unwrap(); + + let sync_request_builder = guard.inspect({ + move |script, progress| { + if let SyncItem::Spk(_, spk) = script { + runtime.block_on(inspector(spk.to_owned().into(), progress.into())); + } + } + }); + Ok(FfiSyncRequestBuilder(RustOpaque::new( + std::sync::Mutex::new(Some(sync_request_builder)), + ))) + } + + pub fn build(&self) -> Result { + //todo; resolve unhandled unwrap()s + let guard = self + .0 + .lock() + .unwrap() + .take() + .ok_or(RequestBuilderError::RequestAlreadyConsumed)?; + Ok(FfiSyncRequest(RustOpaque::new(std::sync::Mutex::new( + Some(guard.build()), + )))) + } } -impl From for bdk::FeeRate { - fn from(value: FeeRate) -> Self { - bdk::FeeRate::from_sat_per_vb(value.sat_per_vb) + +//Todo; remove cloning the update +pub struct FfiUpdate(pub RustOpaque); +impl From for bdk_wallet::Update { + fn from(value: FfiUpdate) -> Self { + (*value.0).clone() } } -impl From for FeeRate { - fn from(value: bdk::FeeRate) -> Self { - Self { - sat_per_vb: value.as_sat_per_vb(), +pub struct SentAndReceivedValues { + pub sent: u64, + pub received: u64, +} +pub struct FfiFullScanRequest( + pub RustOpaque< + std::sync::Mutex>>, + >, +); +pub struct FfiSyncRequest( + pub RustOpaque< + std::sync::Mutex< + Option>, + >, + >, +); +/// Policy regarding the use of change outputs when creating a transaction +#[derive(Default, Debug, Ord, PartialOrd, Eq, PartialEq, Hash, Clone, Copy)] +pub enum ChangeSpendPolicy { + /// Use both change and non-change outputs (default) + #[default] + ChangeAllowed, + /// Only use change outputs (see [`TxBuilder::only_spend_change`]) + OnlyChange, + /// Only use non-change outputs (see [`TxBuilder::do_not_spend_change`]) + ChangeForbidden, +} +impl From for bdk_wallet::ChangeSpendPolicy { + fn from(value: ChangeSpendPolicy) -> Self { + match value { + ChangeSpendPolicy::ChangeAllowed => bdk_wallet::ChangeSpendPolicy::ChangeAllowed, + ChangeSpendPolicy::OnlyChange => bdk_wallet::ChangeSpendPolicy::OnlyChange, + ChangeSpendPolicy::ChangeForbidden => bdk_wallet::ChangeSpendPolicy::ChangeForbidden, } } } -/// 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())) +pub struct LocalOutput { + pub outpoint: OutPoint, + pub txout: TxOut, + pub keychain: KeychainKind, + pub is_spent: bool, +} + +impl From for LocalOutput { + fn from(local_utxo: bdk_wallet::LocalOutput) -> Self { + LocalOutput { + outpoint: OutPoint { + txid: local_utxo.outpoint.txid.to_string(), + vout: local_utxo.outpoint.vout, + }, + txout: TxOut { + value: local_utxo.txout.value.to_sat(), + script_pubkey: FfiScriptBuf { + bytes: local_utxo.txout.script_pubkey.to_bytes(), + }, + }, + keychain: local_utxo.keychain.into(), + is_spent: local_utxo.is_spent, + } } } -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()))?, - }) +/// The progress of [`SyncRequest`]. +#[derive(Debug, Clone)] +pub struct SyncProgress { + /// Script pubkeys consumed by the request. + pub spks_consumed: u64, + /// Script pubkeys remaining in the request. + pub spks_remaining: u64, + /// Txids consumed by the request. + pub txids_consumed: u64, + /// Txids remaining in the request. + pub txids_remaining: u64, + /// Outpoints consumed by the request. + pub outpoints_consumed: u64, + /// Outpoints remaining in the request. + pub outpoints_remaining: u64, +} +impl From for SyncProgress { + fn from(value: bdk_core::spk_client::SyncProgress) -> Self { + SyncProgress { + spks_consumed: value.spks_consumed as u64, + spks_remaining: value.spks_remaining as u64, + txids_consumed: value.txids_consumed as u64, + txids_remaining: value.txids_remaining as u64, + outpoints_consumed: value.outpoints_consumed as u64, + outpoints_remaining: value.outpoints_remaining as u64, + } + } +} +pub struct FfiPolicy { + pub opaque: RustOpaque, +} +impl FfiPolicy { + #[frb(sync)] + pub fn id(&self) -> String { + self.opaque.id.clone() + } +} +impl From for FfiPolicy { + fn from(value: bdk_wallet::descriptor::Policy) -> Self { + FfiPolicy { + opaque: RustOpaque::new(value), + } } } diff --git a/rust/src/api/wallet.rs b/rust/src/api/wallet.rs index fccf5eaa..a3f923ab 100644 --- a/rust/src/api/wallet.rs +++ b/rust/src/api/wallet.rs @@ -1,336 +1,206 @@ -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::borrow::BorrowMut; use std::str::FromStr; +use std::sync::{Mutex, MutexGuard}; -use crate::api::blockchain::BdkBlockchain; -use crate::api::error::BdkError; -use crate::api::psbt::BdkPsbt; -use crate::frb_generated::RustOpaque; -use bdk::bitcoin::script::PushBytesBuf; -use bdk::bitcoin::{Sequence, Txid}; -pub use bdk::blockchain::GetTx; - -use bdk::database::ConfigurableDatabase; -use std::sync::MutexGuard; +use bdk_core::bitcoin::Txid; +use bdk_wallet::PersistedWallet; use flutter_rust_bridge::frb; +use crate::api::descriptor::FfiDescriptor; + +use super::bitcoin::{FeeRate, FfiPsbt, FfiScriptBuf, FfiTransaction}; +use super::error::{ + CalculateFeeError, CannotConnectError, CreateWithPersistError, DescriptorError, + LoadWithPersistError, SignerError, SqliteError, TxidParseError, +}; +use super::store::FfiConnection; +use super::types::{ + AddressInfo, Balance, FfiCanonicalTx, FfiFullScanRequestBuilder, FfiPolicy, + FfiSyncRequestBuilder, FfiUpdate, KeychainKind, LocalOutput, Network, SignOptions, +}; +use crate::frb_generated::RustOpaque; + #[derive(Debug)] -pub struct BdkWallet { - pub ptr: RustOpaque>>, +pub struct FfiWallet { + pub opaque: + RustOpaque>>, } -impl BdkWallet { +impl FfiWallet { pub fn new( - descriptor: BdkDescriptor, - change_descriptor: Option, + descriptor: FfiDescriptor, + change_descriptor: FfiDescriptor, network: Network, - database_config: DatabaseConfig, - ) -> Result { - let database = bdk::database::AnyDatabase::from_config(&database_config.into())?; - let descriptor: String = descriptor.to_string_private(); - let change_descriptor: Option = change_descriptor.map(|d| d.to_string_private()); + connection: FfiConnection, + ) -> Result { + let descriptor = descriptor.to_string_with_secret(); + let change_descriptor = change_descriptor.to_string_with_secret(); + let mut binding = connection.get_store(); + let db: &mut bdk_wallet::rusqlite::Connection = binding.borrow_mut(); + + let wallet: bdk_wallet::PersistedWallet = + bdk_wallet::Wallet::create(descriptor, change_descriptor) + .network(network.into()) + .create_wallet(db)?; + Ok(FfiWallet { + opaque: RustOpaque::new(std::sync::Mutex::new(wallet)), + }) + } - let wallet = bdk::Wallet::new( - &descriptor, - change_descriptor.as_ref(), - network.into(), - database, - )?; - Ok(BdkWallet { - ptr: RustOpaque::new(std::sync::Mutex::new(wallet)), + pub fn load( + descriptor: FfiDescriptor, + change_descriptor: FfiDescriptor, + connection: FfiConnection, + ) -> Result { + let descriptor = descriptor.to_string_with_secret(); + let change_descriptor = change_descriptor.to_string_with_secret(); + let mut binding = connection.get_store(); + let db: &mut bdk_wallet::rusqlite::Connection = binding.borrow_mut(); + + let wallet: PersistedWallet = bdk_wallet::Wallet::load() + .descriptor(bdk_wallet::KeychainKind::External, Some(descriptor)) + .descriptor(bdk_wallet::KeychainKind::Internal, Some(change_descriptor)) + .extract_keys() + .load_wallet(db)? + .ok_or(LoadWithPersistError::CouldNotLoad)?; + + Ok(FfiWallet { + opaque: RustOpaque::new(std::sync::Mutex::new(wallet)), }) } - pub(crate) fn get_wallet(&self) -> MutexGuard> { - self.ptr.lock().expect("") + //TODO; crate a macro to handle unwrapping lock + pub(crate) fn get_wallet( + &self, + ) -> MutexGuard> { + self.opaque.lock().expect("wallet") + } + /// Attempt to reveal the next address of the given `keychain`. + /// + /// This will increment the keychain's derivation index. If the keychain's descriptor doesn't + /// contain a wildcard or every address is already revealed up to the maximum derivation + /// index defined in [BIP32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki), + /// then the last revealed address will be returned. + #[frb(sync)] + pub fn reveal_next_address(opaque: FfiWallet, keychain_kind: KeychainKind) -> AddressInfo { + opaque + .get_wallet() + .reveal_next_address(keychain_kind.into()) + .into() } + pub fn apply_update(&self, update: FfiUpdate) -> Result<(), CannotConnectError> { + self.get_wallet() + .apply_update(update) + .map_err(CannotConnectError::from) + } /// Get the Bitcoin network the wallet is using. - #[frb(sync)] + #[frb(sync)] 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). #[frb(sync)] - pub fn is_mine(&self, script: BdkScriptBuf) -> Result { + pub fn is_mine(&self, script: FfiScriptBuf) -> bool { 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. - #[frb(sync)] - 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]. - #[frb(sync)] - 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()) + .is_mine(>::into( + script, + )) } /// Return the balance, meaning the sum of this wallet’s unspent outputs’ values. Note that this method only operates /// on the internal database, which first needs to be Wallet.sync manually. #[frb(sync)] - pub fn get_balance(&self) -> Result { - self.get_wallet() - .get_balance() - .map(|b| b.into()) - .map_err(|e| e.into()) + pub fn get_balance(&self) -> Balance { + let bdk_balance = self.get_wallet().balance(); + Balance::from(bdk_balance) } - /// Return the list of transactions made and received by the wallet. Note that this method only operate on the internal database, which first needs to be [Wallet.sync] manually. - #[frb(sync)] - pub fn list_transactions( - &self, - include_raw: bool, - ) -> Result, BdkError> { - let mut transaction_details = vec![]; - for e in self + + pub fn sign( + opaque: &FfiWallet, + psbt: FfiPsbt, + sign_options: SignOptions, + ) -> Result { + let mut psbt = psbt.opaque.lock().unwrap(); + opaque .get_wallet() - .list_transactions(include_raw)? - .into_iter() - { - transaction_details.push(e.try_into()?); - } - Ok(transaction_details) + .sign(&mut psbt, sign_options.into()) + .map_err(SignerError::from) } - /// 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. + ///Iterate over the transactions in the wallet. #[frb(sync)] - pub fn list_unspent(&self) -> Result, BdkError> { - let unspent: Vec = self.get_wallet().list_unspent()?; - Ok(unspent.into_iter().map(LocalUtxo::from).collect()) + pub fn transactions(&self) -> Vec { + self.get_wallet() + .transactions() + .map(|tx| tx.into()) + .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(), - ) + #[frb(sync)] + ///Get a single transaction from the wallet as a WalletTx (if the transaction exists). + pub fn get_tx(&self, txid: String) -> Result, TxidParseError> { + let txid = + Txid::from_str(txid.as_str()).map_err(|_| TxidParseError::InvalidTxid { txid })?; + Ok(self.get_wallet().get_tx(txid).map(|tx| tx.into())) + } + pub fn calculate_fee(opaque: &FfiWallet, tx: FfiTransaction) -> Result { + opaque + .get_wallet() + .calculate_fee(&(&tx).into()) + .map(|e| e.to_sat()) .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()) + + pub fn calculate_fee_rate( + opaque: &FfiWallet, + tx: FfiTransaction, + ) -> Result { + opaque + .get_wallet() + .calculate_fee_rate(&(&tx).into()) + .map(|bdk_fee_rate| FeeRate { + sat_kwu: bdk_fee_rate.to_sat_per_kwu(), + }) .map_err(|e| e.into()) } - //TODO recreate verify_tx properly - // pub fn verify_tx(ptr: BdkWallet, tx: BdkTransaction) -> Result<(), BdkError> { - // let serialized_tx = tx.serialize()?; - // let tx: Transaction = (&tx).try_into()?; - // let locked_wallet = ptr.get_wallet(); - // // Loop through all the inputs - // for (index, input) in tx.input.iter().enumerate() { - // let input = input.clone(); - // let txid = input.previous_output.txid; - // let prev_tx = match locked_wallet.database().get_raw_tx(&txid){ - // Ok(prev_tx) => Ok(prev_tx), - // Err(e) => Err(BdkError::VerifyTransaction(format!("The transaction {:?} being spent is not available in the wallet database: {:?} ", txid,e))) - // }; - // if let Some(prev_tx) = prev_tx? { - // let spent_output = match prev_tx.output.get(input.previous_output.vout as usize) { - // Some(output) => Ok(output), - // None => Err(BdkError::VerifyTransaction(format!( - // "Failed to verify transaction: missing output {:?} in tx {:?}", - // input.previous_output.vout, txid - // ))), - // }; - // let spent_output = spent_output?; - // return match bitcoinconsensus::verify( - // &spent_output.clone().script_pubkey.to_bytes(), - // spent_output.value, - // &serialized_tx, - // None, - // index, - // ) { - // Ok(()) => Ok(()), - // Err(e) => Err(BdkError::VerifyTransaction(e.to_string())), - // }; - // } else { - // if tx.is_coin_base() { - // continue; - // } else { - // return Err(BdkError::VerifyTransaction(format!( - // "Failed to verify transaction: missing previous transaction {:?}", - // txid - // ))); - // } - // } - // } - // Ok(()) - // } - ///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. + + /// Return the list of unspent outputs of this wallet. #[frb(sync)] - 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 list_unspent(&self) -> Vec { + self.get_wallet().list_unspent().map(|o| o.into()).collect() } -} - -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(); + #[frb(sync)] + ///List all relevant outputs (includes both spent and unspent, confirmed and unconfirmed). + pub fn list_output(&self) -> Vec { + self.get_wallet().list_output().map(|o| o.into()).collect() } - if let Some(n_sequence) = n_sequence { - tx_builder.enable_rbf_with_sequence(Sequence(n_sequence)); + #[frb(sync)] + pub fn policies( + opaque: FfiWallet, + keychain_kind: KeychainKind, + ) -> Result, DescriptorError> { + opaque + .get_wallet() + .policies(keychain_kind.into()) + .map(|e| e.map(|p| p.into())) + .map_err(|e| e.into()) } - if enable_rbf { - tx_builder.enable_rbf(); + pub fn start_full_scan(&self) -> FfiFullScanRequestBuilder { + let builder = self.get_wallet().start_full_scan(); + FfiFullScanRequestBuilder(RustOpaque::new(Mutex::new(Some(builder)))) } - 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); + pub fn start_sync_with_revealed_spks(&self) -> FfiSyncRequestBuilder { + let builder = self.get_wallet().start_sync_with_revealed_spks(); + FfiSyncRequestBuilder(RustOpaque::new(Mutex::new(Some(builder)))) } - 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); + // pub fn persist(&self, connection: Connection) -> Result { + pub fn persist(opaque: &FfiWallet, connection: FfiConnection) -> Result { + let mut binding = connection.get_store(); + let db: &mut bdk_wallet::rusqlite::Connection = binding.borrow_mut(); + opaque + .get_wallet() + .persist(db) + .map_err(|e| SqliteError::Sqlite { + rusqlite_error: e.to_string(), + }) } - - return match tx_builder.finish() { - Ok(e) => Ok((e.0.into(), TransactionDetails::try_from(&e.1)?)), - Err(e) => Err(e.into()), - }; } diff --git a/rust/src/frb_generated.io.rs b/rust/src/frb_generated.io.rs index dc01ea4b..a778b9b0 100644 --- a/rust/src/frb_generated.io.rs +++ b/rust/src/frb_generated.io.rs @@ -4,6 +4,10 @@ // Section: imports use super::*; +use crate::api::electrum::*; +use crate::api::esplora::*; +use crate::api::store::*; +use crate::api::types::*; use crate::*; use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt}; use flutter_rust_bridge::for_generated::{transform_result_dco, Lifetimeable, Lockable}; @@ -15,949 +19,866 @@ flutter_rust_bridge::frb_generated_boilerplate_io!(); // Section: dart2rust -impl CstDecode> for usize { +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) -> RustOpaqueNom { - unsafe { decode_rust_opaque_nom(self as _) } + fn cst_decode(self) -> flutter_rust_bridge::for_generated::anyhow::Error { + unimplemented!() } } -impl CstDecode> for usize { +impl CstDecode for *const std::ffi::c_void { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom { - unsafe { decode_rust_opaque_nom(self as _) } + fn cst_decode(self) -> flutter_rust_bridge::DartOpaque { + unsafe { flutter_rust_bridge::for_generated::cst_decode_dart_opaque(self as _) } } } -impl CstDecode> for usize { +impl CstDecode> for usize { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom { + fn cst_decode(self) -> RustOpaqueNom { unsafe { decode_rust_opaque_nom(self as _) } } } -impl CstDecode> for usize { +impl + CstDecode>> + for usize +{ // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom { + fn cst_decode( + self, + ) -> RustOpaqueNom> { unsafe { decode_rust_opaque_nom(self as _) } } } -impl CstDecode> for usize { +impl CstDecode> for usize { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom { + fn cst_decode(self) -> RustOpaqueNom { unsafe { decode_rust_opaque_nom(self as _) } } } -impl CstDecode> for usize { +impl CstDecode> for usize { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom { + fn cst_decode(self) -> RustOpaqueNom { unsafe { decode_rust_opaque_nom(self as _) } } } -impl CstDecode> for usize { +impl CstDecode> for usize { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom { + fn cst_decode(self) -> RustOpaqueNom { unsafe { decode_rust_opaque_nom(self as _) } } } -impl CstDecode> for usize { +impl CstDecode> for usize { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> RustOpaqueNom { + fn cst_decode(self) -> RustOpaqueNom { unsafe { decode_rust_opaque_nom(self as _) } } } -impl CstDecode>>> for usize { +impl CstDecode> for usize { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode( - self, - ) -> RustOpaqueNom>> { + fn cst_decode(self) -> RustOpaqueNom { unsafe { decode_rust_opaque_nom(self as _) } } } -impl CstDecode>> - for usize -{ +impl CstDecode> for usize { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode( - self, - ) -> RustOpaqueNom> { + fn cst_decode(self) -> RustOpaqueNom { unsafe { decode_rust_opaque_nom(self as _) } } } -impl CstDecode for *mut wire_cst_list_prim_u_8_strict { +impl CstDecode> for usize { // 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() + fn cst_decode(self) -> RustOpaqueNom { + unsafe { decode_rust_opaque_nom(self as _) } } } -impl CstDecode for wire_cst_address_error { +impl CstDecode> for usize { // 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!(), - } + fn cst_decode(self) -> RustOpaqueNom { + unsafe { decode_rust_opaque_nom(self as _) } } } -impl CstDecode for wire_cst_address_index { +impl + CstDecode< + RustOpaqueNom< + std::sync::Mutex< + Option>, + >, + >, + > for usize +{ // 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!(), - } + fn cst_decode( + self, + ) -> RustOpaqueNom< + std::sync::Mutex< + Option>, + >, + > { + unsafe { decode_rust_opaque_nom(self as _) } } } -impl CstDecode for wire_cst_auth { +impl + CstDecode< + RustOpaqueNom< + std::sync::Mutex< + Option>, + >, + >, + > for usize +{ // 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!(), - } + fn cst_decode( + self, + ) -> RustOpaqueNom< + std::sync::Mutex>>, + > { + unsafe { decode_rust_opaque_nom(self as _) } } } -impl CstDecode for wire_cst_balance { +impl + CstDecode< + RustOpaqueNom< + std::sync::Mutex< + Option>, + >, + >, + > for usize +{ // 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(), - } + fn cst_decode( + self, + ) -> RustOpaqueNom< + std::sync::Mutex< + Option>, + >, + > { + unsafe { decode_rust_opaque_nom(self as _) } } } -impl CstDecode for wire_cst_bdk_address { +impl + CstDecode< + RustOpaqueNom< + std::sync::Mutex< + Option>, + >, + >, + > for usize +{ // 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(), - } + fn cst_decode( + self, + ) -> RustOpaqueNom< + std::sync::Mutex< + Option>, + >, + > { + unsafe { decode_rust_opaque_nom(self as _) } } } -impl CstDecode for wire_cst_bdk_blockchain { +impl CstDecode>> for usize { // 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(), - } + fn cst_decode(self) -> RustOpaqueNom> { + unsafe { decode_rust_opaque_nom(self as _) } } } -impl CstDecode for wire_cst_bdk_derivation_path { +impl + CstDecode< + RustOpaqueNom< + std::sync::Mutex>, + >, + > for usize +{ // 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(), - } + fn cst_decode( + self, + ) -> RustOpaqueNom< + std::sync::Mutex>, + > { + unsafe { decode_rust_opaque_nom(self as _) } } } -impl CstDecode for wire_cst_bdk_descriptor { +impl CstDecode>> for usize { // 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(), - } + fn cst_decode(self) -> RustOpaqueNom> { + unsafe { decode_rust_opaque_nom(self as _) } } } -impl CstDecode for wire_cst_bdk_descriptor_public_key { +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) -> crate::api::key::BdkDescriptorPublicKey { - crate::api::key::BdkDescriptorPublicKey { - ptr: self.ptr.cst_decode(), - } + fn cst_decode(self) -> String { + let vec: Vec = self.cst_decode(); + String::from_utf8(vec).unwrap() } } -impl CstDecode for wire_cst_bdk_descriptor_secret_key { +impl CstDecode for wire_cst_address_parse_error { // 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(), + fn cst_decode(self) -> crate::api::error::AddressParseError { + match self.tag { + 0 => crate::api::error::AddressParseError::Base58, + 1 => crate::api::error::AddressParseError::Bech32, + 2 => { + let ans = unsafe { self.kind.WitnessVersion }; + crate::api::error::AddressParseError::WitnessVersion { + error_message: ans.error_message.cst_decode(), + } + } + 3 => { + let ans = unsafe { self.kind.WitnessProgram }; + crate::api::error::AddressParseError::WitnessProgram { + error_message: ans.error_message.cst_decode(), + } + } + 4 => crate::api::error::AddressParseError::UnknownHrp, + 5 => crate::api::error::AddressParseError::LegacyAddressTooLong, + 6 => crate::api::error::AddressParseError::InvalidBase58PayloadLength, + 7 => crate::api::error::AddressParseError::InvalidLegacyPrefix, + 8 => crate::api::error::AddressParseError::NetworkValidation, + 9 => crate::api::error::AddressParseError::OtherAddressParseErr, + _ => unreachable!(), } } } -impl CstDecode for wire_cst_bdk_error { +impl CstDecode for wire_cst_bip_32_error { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::error::BdkError { + fn cst_decode(self) -> crate::api::error::Bip32Error { match self.tag { - 0 => { - let ans = unsafe { self.kind.Hex }; - crate::api::error::BdkError::Hex(ans.field0.cst_decode()) - } + 0 => crate::api::error::Bip32Error::CannotDeriveFromHardenedKey, 1 => { - let ans = unsafe { self.kind.Consensus }; - crate::api::error::BdkError::Consensus(ans.field0.cst_decode()) + let ans = unsafe { self.kind.Secp256k1 }; + crate::api::error::Bip32Error::Secp256k1 { + error_message: ans.error_message.cst_decode(), + } } 2 => { - let ans = unsafe { self.kind.VerifyTransaction }; - crate::api::error::BdkError::VerifyTransaction(ans.field0.cst_decode()) - } - 3 => { - let ans = unsafe { self.kind.Address }; - crate::api::error::BdkError::Address(ans.field0.cst_decode()) - } - 4 => { - let ans = unsafe { self.kind.Descriptor }; - crate::api::error::BdkError::Descriptor(ans.field0.cst_decode()) + let ans = unsafe { self.kind.InvalidChildNumber }; + crate::api::error::Bip32Error::InvalidChildNumber { + child_number: ans.child_number.cst_decode(), + } } + 3 => crate::api::error::Bip32Error::InvalidChildNumberFormat, + 4 => crate::api::error::Bip32Error::InvalidDerivationPathFormat, 5 => { - let ans = unsafe { self.kind.InvalidU32Bytes }; - crate::api::error::BdkError::InvalidU32Bytes(ans.field0.cst_decode()) + let ans = unsafe { self.kind.UnknownVersion }; + crate::api::error::Bip32Error::UnknownVersion { + version: ans.version.cst_decode(), + } } 6 => { - let ans = unsafe { self.kind.Generic }; - crate::api::error::BdkError::Generic(ans.field0.cst_decode()) - } - 7 => crate::api::error::BdkError::ScriptDoesntHaveAddressForm, - 8 => crate::api::error::BdkError::NoRecipients, - 9 => crate::api::error::BdkError::NoUtxosSelected, - 10 => { - let ans = unsafe { self.kind.OutputBelowDustLimit }; - crate::api::error::BdkError::OutputBelowDustLimit(ans.field0.cst_decode()) - } - 11 => { - let ans = unsafe { self.kind.InsufficientFunds }; - crate::api::error::BdkError::InsufficientFunds { - needed: ans.needed.cst_decode(), - available: ans.available.cst_decode(), + let ans = unsafe { self.kind.WrongExtendedKeyLength }; + crate::api::error::Bip32Error::WrongExtendedKeyLength { + length: ans.length.cst_decode(), } } - 12 => crate::api::error::BdkError::BnBTotalTriesExceeded, - 13 => crate::api::error::BdkError::BnBNoExactMatch, - 14 => crate::api::error::BdkError::UnknownUtxo, - 15 => crate::api::error::BdkError::TransactionNotFound, - 16 => crate::api::error::BdkError::TransactionConfirmed, - 17 => crate::api::error::BdkError::IrreplaceableTransaction, - 18 => { - let ans = unsafe { self.kind.FeeRateTooLow }; - crate::api::error::BdkError::FeeRateTooLow { - needed: ans.needed.cst_decode(), + 7 => { + let ans = unsafe { self.kind.Base58 }; + crate::api::error::Bip32Error::Base58 { + error_message: ans.error_message.cst_decode(), } } - 19 => { - let ans = unsafe { self.kind.FeeTooLow }; - crate::api::error::BdkError::FeeTooLow { - needed: ans.needed.cst_decode(), + 8 => { + let ans = unsafe { self.kind.Hex }; + crate::api::error::Bip32Error::Hex { + error_message: ans.error_message.cst_decode(), } } - 20 => crate::api::error::BdkError::FeeRateUnavailable, - 21 => { - let ans = unsafe { self.kind.MissingKeyOrigin }; - crate::api::error::BdkError::MissingKeyOrigin(ans.field0.cst_decode()) - } - 22 => { - let ans = unsafe { self.kind.Key }; - crate::api::error::BdkError::Key(ans.field0.cst_decode()) - } - 23 => crate::api::error::BdkError::ChecksumMismatch, - 24 => { - let ans = unsafe { self.kind.SpendingPolicyRequired }; - crate::api::error::BdkError::SpendingPolicyRequired(ans.field0.cst_decode()) - } - 25 => { - let ans = unsafe { self.kind.InvalidPolicyPathError }; - crate::api::error::BdkError::InvalidPolicyPathError(ans.field0.cst_decode()) - } - 26 => { - let ans = unsafe { self.kind.Signer }; - crate::api::error::BdkError::Signer(ans.field0.cst_decode()) - } - 27 => { - let ans = unsafe { self.kind.InvalidNetwork }; - crate::api::error::BdkError::InvalidNetwork { - requested: ans.requested.cst_decode(), - found: ans.found.cst_decode(), + 9 => { + let ans = unsafe { self.kind.InvalidPublicKeyHexLength }; + crate::api::error::Bip32Error::InvalidPublicKeyHexLength { + length: ans.length.cst_decode(), } } - 28 => { - let ans = unsafe { self.kind.InvalidOutpoint }; - crate::api::error::BdkError::InvalidOutpoint(ans.field0.cst_decode()) - } - 29 => { - let ans = unsafe { self.kind.Encode }; - crate::api::error::BdkError::Encode(ans.field0.cst_decode()) - } - 30 => { - let ans = unsafe { self.kind.Miniscript }; - crate::api::error::BdkError::Miniscript(ans.field0.cst_decode()) - } - 31 => { - let ans = unsafe { self.kind.MiniscriptPsbt }; - crate::api::error::BdkError::MiniscriptPsbt(ans.field0.cst_decode()) - } - 32 => { - let ans = unsafe { self.kind.Bip32 }; - crate::api::error::BdkError::Bip32(ans.field0.cst_decode()) - } - 33 => { - let ans = unsafe { self.kind.Bip39 }; - crate::api::error::BdkError::Bip39(ans.field0.cst_decode()) - } - 34 => { - let ans = unsafe { self.kind.Secp256k1 }; - crate::api::error::BdkError::Secp256k1(ans.field0.cst_decode()) - } - 35 => { - let ans = unsafe { self.kind.Json }; - crate::api::error::BdkError::Json(ans.field0.cst_decode()) - } - 36 => { - let ans = unsafe { self.kind.Psbt }; - crate::api::error::BdkError::Psbt(ans.field0.cst_decode()) - } - 37 => { - let ans = unsafe { self.kind.PsbtParse }; - crate::api::error::BdkError::PsbtParse(ans.field0.cst_decode()) - } - 38 => { - let ans = unsafe { self.kind.MissingCachedScripts }; - crate::api::error::BdkError::MissingCachedScripts( - ans.field0.cst_decode(), - ans.field1.cst_decode(), - ) - } - 39 => { - let ans = unsafe { self.kind.Electrum }; - crate::api::error::BdkError::Electrum(ans.field0.cst_decode()) - } - 40 => { - let ans = unsafe { self.kind.Esplora }; - crate::api::error::BdkError::Esplora(ans.field0.cst_decode()) - } - 41 => { - let ans = unsafe { self.kind.Sled }; - crate::api::error::BdkError::Sled(ans.field0.cst_decode()) - } - 42 => { - let ans = unsafe { self.kind.Rpc }; - crate::api::error::BdkError::Rpc(ans.field0.cst_decode()) - } - 43 => { - let ans = unsafe { self.kind.Rusqlite }; - crate::api::error::BdkError::Rusqlite(ans.field0.cst_decode()) - } - 44 => { - let ans = unsafe { self.kind.InvalidInput }; - crate::api::error::BdkError::InvalidInput(ans.field0.cst_decode()) - } - 45 => { - let ans = unsafe { self.kind.InvalidLockTime }; - crate::api::error::BdkError::InvalidLockTime(ans.field0.cst_decode()) - } - 46 => { - let ans = unsafe { self.kind.InvalidTransaction }; - crate::api::error::BdkError::InvalidTransaction(ans.field0.cst_decode()) + 10 => { + let ans = unsafe { self.kind.UnknownError }; + crate::api::error::Bip32Error::UnknownError { + error_message: ans.error_message.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 { - s: self.s.cst_decode(), - } - } -} -impl CstDecode for wire_cst_bdk_wallet { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::wallet::BdkWallet { - crate::api::wallet::BdkWallet { - ptr: self.ptr.cst_decode(), - } - } -} -impl CstDecode for wire_cst_block_time { +impl CstDecode for wire_cst_bip_39_error { // 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 { + fn cst_decode(self) -> crate::api::error::Bip39Error { match self.tag { 0 => { - let ans = unsafe { self.kind.Electrum }; - crate::api::blockchain::BlockchainConfig::Electrum { - config: ans.config.cst_decode(), + let ans = unsafe { self.kind.BadWordCount }; + crate::api::error::Bip39Error::BadWordCount { + word_count: ans.word_count.cst_decode(), } } 1 => { - let ans = unsafe { self.kind.Esplora }; - crate::api::blockchain::BlockchainConfig::Esplora { - config: ans.config.cst_decode(), + let ans = unsafe { self.kind.UnknownWord }; + crate::api::error::Bip39Error::UnknownWord { + index: ans.index.cst_decode(), } } 2 => { - let ans = unsafe { self.kind.Rpc }; - crate::api::blockchain::BlockchainConfig::Rpc { - config: ans.config.cst_decode(), + let ans = unsafe { self.kind.BadEntropyBitCount }; + crate::api::error::Bip39Error::BadEntropyBitCount { + bit_count: ans.bit_count.cst_decode(), + } + } + 3 => crate::api::error::Bip39Error::InvalidChecksum, + 4 => { + let ans = unsafe { self.kind.AmbiguousLanguages }; + crate::api::error::Bip39Error::AmbiguousLanguages { + languages: ans.languages.cst_decode(), } } _ => unreachable!(), } } } -impl CstDecode for *mut wire_cst_address_error { +impl CstDecode for *mut wire_cst_electrum_client { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::error::AddressError { + fn cst_decode(self) -> crate::api::electrum::ElectrumClient { 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_address_index { +impl CstDecode for *mut wire_cst_esplora_client { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::AddressIndex { + fn cst_decode(self) -> crate::api::esplora::EsploraClient { 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_bdk_address { +impl CstDecode for *mut wire_cst_ffi_address { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::BdkAddress { + fn cst_decode(self) -> crate::api::bitcoin::FfiAddress { 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_bdk_blockchain { +impl CstDecode for *mut wire_cst_ffi_connection { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::blockchain::BdkBlockchain { + fn cst_decode(self) -> crate::api::store::FfiConnection { 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_bdk_derivation_path { +impl CstDecode for *mut wire_cst_ffi_derivation_path { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::key::BdkDerivationPath { + fn cst_decode(self) -> crate::api::key::FfiDerivationPath { 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_bdk_descriptor { +impl CstDecode for *mut wire_cst_ffi_descriptor { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::descriptor::BdkDescriptor { + fn cst_decode(self) -> crate::api::descriptor::FfiDescriptor { 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_bdk_descriptor_public_key +impl CstDecode + for *mut wire_cst_ffi_descriptor_public_key { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::key::BdkDescriptorPublicKey { + fn cst_decode(self) -> crate::api::key::FfiDescriptorPublicKey { 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_bdk_descriptor_secret_key +impl CstDecode + for *mut wire_cst_ffi_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 { + fn cst_decode(self) -> crate::api::key::FfiDescriptorSecretKey { 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_bdk_wallet { +impl CstDecode for *mut wire_cst_ffi_full_scan_request { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::wallet::BdkWallet { + fn cst_decode(self) -> crate::api::types::FfiFullScanRequest { 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 { +impl CstDecode + for *mut wire_cst_ffi_full_scan_request_builder +{ // 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::FfiFullScanRequestBuilder { 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_ffi_mnemonic { // 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::FfiMnemonic { 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_ffi_psbt { // 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::bitcoin::FfiPsbt { 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_ffi_script_buf { // 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::bitcoin::FfiScriptBuf { 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_ffi_sync_request { // 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::types::FfiSyncRequest { 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_electrum_config { +impl CstDecode + for *mut wire_cst_ffi_sync_request_builder +{ // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::blockchain::ElectrumConfig { + fn cst_decode(self) -> crate::api::types::FfiSyncRequestBuilder { 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_esplora_config { +impl CstDecode for *mut wire_cst_ffi_transaction { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::blockchain::EsploraConfig { + fn cst_decode(self) -> crate::api::bitcoin::FfiTransaction { 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 f32 { +impl CstDecode for *mut u64 { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> f32 { + fn cst_decode(self) -> u64 { 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 { +impl CstDecode for wire_cst_create_with_persist_error { // 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() + fn cst_decode(self) -> crate::api::error::CreateWithPersistError { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Persist }; + crate::api::error::CreateWithPersistError::Persist { + error_message: ans.error_message.cst_decode(), + } + } + 1 => crate::api::error::CreateWithPersistError::DataAlreadyExists, + 2 => { + let ans = unsafe { self.kind.Descriptor }; + crate::api::error::CreateWithPersistError::Descriptor { + error_message: ans.error_message.cst_decode(), + } + } + _ => unreachable!(), + } } } -impl CstDecode for *mut wire_cst_out_point { +impl CstDecode for wire_cst_descriptor_error { // 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) } + fn cst_decode(self) -> crate::api::error::DescriptorError { + match self.tag { + 0 => crate::api::error::DescriptorError::InvalidHdKeyPath, + 1 => crate::api::error::DescriptorError::MissingPrivateData, + 2 => crate::api::error::DescriptorError::InvalidDescriptorChecksum, + 3 => crate::api::error::DescriptorError::HardenedDerivationXpub, + 4 => crate::api::error::DescriptorError::MultiPath, + 5 => { + let ans = unsafe { self.kind.Key }; + crate::api::error::DescriptorError::Key { + error_message: ans.error_message.cst_decode(), + } + } + 6 => { + let ans = unsafe { self.kind.Generic }; + crate::api::error::DescriptorError::Generic { + error_message: ans.error_message.cst_decode(), + } + } + 7 => { + let ans = unsafe { self.kind.Policy }; + crate::api::error::DescriptorError::Policy { + error_message: ans.error_message.cst_decode(), + } + } + 8 => { + let ans = unsafe { self.kind.InvalidDescriptorCharacter }; + crate::api::error::DescriptorError::InvalidDescriptorCharacter { + char: ans.char.cst_decode(), + } + } + 9 => { + let ans = unsafe { self.kind.Bip32 }; + crate::api::error::DescriptorError::Bip32 { + error_message: ans.error_message.cst_decode(), + } + } + 10 => { + let ans = unsafe { self.kind.Base58 }; + crate::api::error::DescriptorError::Base58 { + error_message: ans.error_message.cst_decode(), + } + } + 11 => { + let ans = unsafe { self.kind.Pk }; + crate::api::error::DescriptorError::Pk { + error_message: ans.error_message.cst_decode(), + } + } + 12 => { + let ans = unsafe { self.kind.Miniscript }; + crate::api::error::DescriptorError::Miniscript { + error_message: ans.error_message.cst_decode(), + } + } + 13 => { + let ans = unsafe { self.kind.Hex }; + crate::api::error::DescriptorError::Hex { + error_message: ans.error_message.cst_decode(), + } + } + 14 => crate::api::error::DescriptorError::ExternalAndInternalAreTheSame, + _ => unreachable!(), + } } } -impl CstDecode for *mut u64 { +impl CstDecode for wire_cst_descriptor_key_error { // 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) } + fn cst_decode(self) -> crate::api::error::DescriptorKeyError { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Parse }; + crate::api::error::DescriptorKeyError::Parse { + error_message: ans.error_message.cst_decode(), + } + } + 1 => crate::api::error::DescriptorKeyError::InvalidKeyType, + 2 => { + let ans = unsafe { self.kind.Bip32 }; + crate::api::error::DescriptorKeyError::Bip32 { + error_message: ans.error_message.cst_decode(), + } + } + _ => unreachable!(), + } } } -impl CstDecode for *mut u8 { +impl CstDecode for wire_cst_electrum_client { // 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) } + fn cst_decode(self) -> crate::api::electrum::ElectrumClient { + crate::api::electrum::ElectrumClient(self.field0.cst_decode()) } } -impl CstDecode for wire_cst_consensus_error { +impl CstDecode for wire_cst_electrum_error { // 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::error::ElectrumError { match self.tag { 0 => { - let ans = unsafe { self.kind.Io }; - crate::api::error::ConsensusError::Io(ans.field0.cst_decode()) + let ans = unsafe { self.kind.IOError }; + crate::api::error::ElectrumError::IOError { + error_message: ans.error_message.cst_decode(), + } } 1 => { - let ans = unsafe { self.kind.OversizedVectorAllocation }; - crate::api::error::ConsensusError::OversizedVectorAllocation { - requested: ans.requested.cst_decode(), - max: ans.max.cst_decode(), + let ans = unsafe { self.kind.Json }; + crate::api::error::ElectrumError::Json { + error_message: ans.error_message.cst_decode(), } } 2 => { - let ans = unsafe { self.kind.InvalidChecksum }; - crate::api::error::ConsensusError::InvalidChecksum { - expected: ans.expected.cst_decode(), - actual: ans.actual.cst_decode(), + let ans = unsafe { self.kind.Hex }; + crate::api::error::ElectrumError::Hex { + error_message: ans.error_message.cst_decode(), + } + } + 3 => { + let ans = unsafe { self.kind.Protocol }; + crate::api::error::ElectrumError::Protocol { + error_message: ans.error_message.cst_decode(), } } - 3 => crate::api::error::ConsensusError::NonMinimalVarInt, 4 => { - let ans = unsafe { self.kind.ParseFailed }; - crate::api::error::ConsensusError::ParseFailed(ans.field0.cst_decode()) + let ans = unsafe { self.kind.Bitcoin }; + crate::api::error::ElectrumError::Bitcoin { + error_message: ans.error_message.cst_decode(), + } } - 5 => { - let ans = unsafe { self.kind.UnsupportedSegwitFlag }; - crate::api::error::ConsensusError::UnsupportedSegwitFlag(ans.field0.cst_decode()) + 5 => crate::api::error::ElectrumError::AlreadySubscribed, + 6 => crate::api::error::ElectrumError::NotSubscribed, + 7 => { + let ans = unsafe { self.kind.InvalidResponse }; + crate::api::error::ElectrumError::InvalidResponse { + error_message: ans.error_message.cst_decode(), + } + } + 8 => { + let ans = unsafe { self.kind.Message }; + crate::api::error::ElectrumError::Message { + error_message: ans.error_message.cst_decode(), + } + } + 9 => { + let ans = unsafe { self.kind.InvalidDNSNameError }; + crate::api::error::ElectrumError::InvalidDNSNameError { + domain: ans.domain.cst_decode(), + } } + 10 => crate::api::error::ElectrumError::MissingDomain, + 11 => crate::api::error::ElectrumError::AllAttemptsErrored, + 12 => { + let ans = unsafe { self.kind.SharedIOError }; + crate::api::error::ElectrumError::SharedIOError { + error_message: ans.error_message.cst_decode(), + } + } + 13 => crate::api::error::ElectrumError::CouldntLockReader, + 14 => crate::api::error::ElectrumError::Mpsc, + 15 => { + let ans = unsafe { self.kind.CouldNotCreateConnection }; + crate::api::error::ElectrumError::CouldNotCreateConnection { + error_message: ans.error_message.cst_decode(), + } + } + 16 => crate::api::error::ElectrumError::RequestAlreadyConsumed, _ => unreachable!(), } } } -impl CstDecode for wire_cst_database_config { +impl CstDecode for wire_cst_esplora_client { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::esplora::EsploraClient { + crate::api::esplora::EsploraClient(self.field0.cst_decode()) + } +} +impl CstDecode for wire_cst_esplora_error { // 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::error::EsploraError { match self.tag { - 0 => crate::api::types::DatabaseConfig::Memory, + 0 => { + let ans = unsafe { self.kind.Minreq }; + crate::api::error::EsploraError::Minreq { + error_message: ans.error_message.cst_decode(), + } + } 1 => { - let ans = unsafe { self.kind.Sqlite }; - crate::api::types::DatabaseConfig::Sqlite { - config: ans.config.cst_decode(), + let ans = unsafe { self.kind.HttpResponse }; + crate::api::error::EsploraError::HttpResponse { + status: ans.status.cst_decode(), + error_message: ans.error_message.cst_decode(), } } 2 => { - let ans = unsafe { self.kind.Sled }; - crate::api::types::DatabaseConfig::Sled { - config: ans.config.cst_decode(), + let ans = unsafe { self.kind.Parsing }; + crate::api::error::EsploraError::Parsing { + error_message: ans.error_message.cst_decode(), + } + } + 3 => { + let ans = unsafe { self.kind.StatusCode }; + crate::api::error::EsploraError::StatusCode { + error_message: ans.error_message.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()) + let ans = unsafe { self.kind.BitcoinEncoding }; + crate::api::error::EsploraError::BitcoinEncoding { + error_message: ans.error_message.cst_decode(), + } } 5 => { - let ans = unsafe { self.kind.Policy }; - crate::api::error::DescriptorError::Policy(ans.field0.cst_decode()) + let ans = unsafe { self.kind.HexToArray }; + crate::api::error::EsploraError::HexToArray { + error_message: ans.error_message.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()) + let ans = unsafe { self.kind.HexToBytes }; + crate::api::error::EsploraError::HexToBytes { + error_message: ans.error_message.cst_decode(), + } } + 7 => crate::api::error::EsploraError::TransactionNotFound, 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()) + let ans = unsafe { self.kind.HeaderHeightNotFound }; + crate::api::error::EsploraError::HeaderHeightNotFound { + height: ans.height.cst_decode(), + } } + 9 => crate::api::error::EsploraError::HeaderHashNotFound, 10 => { - let ans = unsafe { self.kind.Miniscript }; - crate::api::error::DescriptorError::Miniscript(ans.field0.cst_decode()) + let ans = unsafe { self.kind.InvalidHttpHeaderName }; + crate::api::error::EsploraError::InvalidHttpHeaderName { + name: ans.name.cst_decode(), + } } 11 => { - let ans = unsafe { self.kind.Hex }; - crate::api::error::DescriptorError::Hex(ans.field0.cst_decode()) + let ans = unsafe { self.kind.InvalidHttpHeaderValue }; + crate::api::error::EsploraError::InvalidHttpHeaderValue { + value: ans.value.cst_decode(), + } } + 12 => crate::api::error::EsploraError::RequestAlreadyConsumed, _ => unreachable!(), } } } -impl CstDecode for wire_cst_electrum_config { +impl CstDecode for wire_cst_extract_tx_error { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::error::ExtractTxError { + match self.tag { + 0 => { + let ans = unsafe { self.kind.AbsurdFeeRate }; + crate::api::error::ExtractTxError::AbsurdFeeRate { + fee_rate: ans.fee_rate.cst_decode(), + } + } + 1 => crate::api::error::ExtractTxError::MissingInputValue, + 2 => crate::api::error::ExtractTxError::SendingTooMuch, + 3 => crate::api::error::ExtractTxError::OtherExtractTxErr, + _ => unreachable!(), + } + } +} +impl CstDecode for wire_cst_ffi_address { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::bitcoin::FfiAddress { + crate::api::bitcoin::FfiAddress(self.field0.cst_decode()) + } +} +impl CstDecode for wire_cst_ffi_connection { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::store::FfiConnection { + crate::api::store::FfiConnection(self.field0.cst_decode()) + } +} +impl CstDecode for wire_cst_ffi_derivation_path { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::key::FfiDerivationPath { + crate::api::key::FfiDerivationPath { + ptr: self.ptr.cst_decode(), + } + } +} +impl CstDecode for wire_cst_ffi_descriptor { // 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(), + fn cst_decode(self) -> crate::api::descriptor::FfiDescriptor { + crate::api::descriptor::FfiDescriptor { + extended_descriptor: self.extended_descriptor.cst_decode(), + key_map: self.key_map.cst_decode(), } } } -impl CstDecode for wire_cst_esplora_config { +impl CstDecode for wire_cst_ffi_descriptor_public_key { // 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(), + fn cst_decode(self) -> crate::api::key::FfiDescriptorPublicKey { + crate::api::key::FfiDescriptorPublicKey { + ptr: self.ptr.cst_decode(), } } } -impl CstDecode for wire_cst_fee_rate { +impl CstDecode for wire_cst_ffi_descriptor_secret_key { // 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(), + fn cst_decode(self) -> crate::api::key::FfiDescriptorSecretKey { + crate::api::key::FfiDescriptorSecretKey { + ptr: self.ptr.cst_decode(), } } } -impl CstDecode for wire_cst_hex_error { +impl CstDecode for wire_cst_ffi_full_scan_request { // 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!(), + fn cst_decode(self) -> crate::api::types::FfiFullScanRequest { + crate::api::types::FfiFullScanRequest(self.field0.cst_decode()) + } +} +impl CstDecode + for wire_cst_ffi_full_scan_request_builder +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::FfiFullScanRequestBuilder { + crate::api::types::FfiFullScanRequestBuilder(self.field0.cst_decode()) + } +} +impl CstDecode for wire_cst_ffi_mnemonic { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::key::FfiMnemonic { + crate::api::key::FfiMnemonic { + ptr: self.ptr.cst_decode(), + } + } +} +impl CstDecode for wire_cst_ffi_psbt { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::bitcoin::FfiPsbt { + crate::api::bitcoin::FfiPsbt { + ptr: self.ptr.cst_decode(), + } + } +} +impl CstDecode for wire_cst_ffi_script_buf { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::bitcoin::FfiScriptBuf { + crate::api::bitcoin::FfiScriptBuf { + bytes: self.bytes.cst_decode(), } } } -impl CstDecode for wire_cst_input { +impl CstDecode for wire_cst_ffi_sync_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::FfiSyncRequest { + crate::api::types::FfiSyncRequest(self.field0.cst_decode()) + } +} +impl CstDecode for wire_cst_ffi_sync_request_builder { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::FfiSyncRequestBuilder { + crate::api::types::FfiSyncRequestBuilder(self.field0.cst_decode()) + } +} +impl CstDecode for wire_cst_ffi_transaction { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::Input { - crate::api::types::Input { + fn cst_decode(self) -> crate::api::bitcoin::FfiTransaction { + crate::api::bitcoin::FfiTransaction { s: self.s.cst_decode(), } } } -impl CstDecode>> for *mut wire_cst_list_list_prim_u_8_strict { +impl CstDecode for wire_cst_ffi_wallet { // 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() + fn cst_decode(self) -> crate::api::wallet::FfiWallet { + crate::api::wallet::FfiWallet { + ptr: self.ptr.cst_decode(), + } } } -impl CstDecode> for *mut wire_cst_list_local_utxo { +impl CstDecode for wire_cst_from_script_error { // 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() + fn cst_decode(self) -> crate::api::error::FromScriptError { + match self.tag { + 0 => crate::api::error::FromScriptError::UnrecognizedScript, + 1 => { + let ans = unsafe { self.kind.WitnessProgram }; + crate::api::error::FromScriptError::WitnessProgram { + error_message: ans.error_message.cst_decode(), + } + } + 2 => { + let ans = unsafe { self.kind.WitnessVersion }; + crate::api::error::FromScriptError::WitnessVersion { + error_message: ans.error_message.cst_decode(), + } + } + 3 => crate::api::error::FromScriptError::OtherFromScriptErr, + _ => unreachable!(), + } } } -impl CstDecode> for *mut wire_cst_list_out_point { +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 { + 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) @@ -983,31 +904,9 @@ impl CstDecode> for *mut wire_cst_list_prim_u_8_strict { } } } -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 { +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 { + 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) @@ -1015,9 +914,9 @@ impl CstDecode> for *mut wire_cst_list_tx_in { vec.into_iter().map(CstDecode::cst_decode).collect() } } -impl CstDecode> for *mut wire_cst_list_tx_out { +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 { + 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) @@ -1025,17 +924,6 @@ impl CstDecode> for *mut wire_cst_list_tx_out { 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 { @@ -1052,756 +940,616 @@ impl CstDecode for wire_cst_lock_time { } } } -impl CstDecode for wire_cst_out_point { +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 { + fn cst_decode(self) -> crate::api::bitcoin::OutPoint { + crate::api::bitcoin::OutPoint { txid: self.txid.cst_decode(), vout: self.vout.cst_decode(), } } } -impl CstDecode for wire_cst_payload { +impl CstDecode for wire_cst_psbt_error { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::Payload { + fn cst_decode(self) -> crate::api::error::PsbtError { match self.tag { - 0 => { - let ans = unsafe { self.kind.PubkeyHash }; - crate::api::types::Payload::PubkeyHash { - pubkey_hash: ans.pubkey_hash.cst_decode(), + 0 => crate::api::error::PsbtError::InvalidMagic, + 1 => crate::api::error::PsbtError::MissingUtxo, + 2 => crate::api::error::PsbtError::InvalidSeparator, + 3 => crate::api::error::PsbtError::PsbtUtxoOutOfBounds, + 4 => { + let ans = unsafe { self.kind.InvalidKey }; + crate::api::error::PsbtError::InvalidKey { + key: ans.key.cst_decode(), } } - 1 => { - let ans = unsafe { self.kind.ScriptHash }; - crate::api::types::Payload::ScriptHash { - script_hash: ans.script_hash.cst_decode(), + 5 => crate::api::error::PsbtError::InvalidProprietaryKey, + 6 => { + let ans = unsafe { self.kind.DuplicateKey }; + crate::api::error::PsbtError::DuplicateKey { + key: ans.key.cst_decode(), } } - 2 => { - let ans = unsafe { self.kind.WitnessProgram }; - crate::api::types::Payload::WitnessProgram { - version: ans.version.cst_decode(), - program: ans.program.cst_decode(), + 7 => crate::api::error::PsbtError::UnsignedTxHasScriptSigs, + 8 => crate::api::error::PsbtError::UnsignedTxHasScriptWitnesses, + 9 => crate::api::error::PsbtError::MustHaveUnsignedTx, + 10 => crate::api::error::PsbtError::NoMorePairs, + 11 => crate::api::error::PsbtError::UnexpectedUnsignedTx, + 12 => { + let ans = unsafe { self.kind.NonStandardSighashType }; + crate::api::error::PsbtError::NonStandardSighashType { + sighash: ans.sighash.cst_decode(), + } + } + 13 => { + let ans = unsafe { self.kind.InvalidHash }; + crate::api::error::PsbtError::InvalidHash { + hash: ans.hash.cst_decode(), + } + } + 14 => crate::api::error::PsbtError::InvalidPreimageHashPair, + 15 => { + let ans = unsafe { self.kind.CombineInconsistentKeySources }; + crate::api::error::PsbtError::CombineInconsistentKeySources { + xpub: ans.xpub.cst_decode(), + } + } + 16 => { + let ans = unsafe { self.kind.ConsensusEncoding }; + crate::api::error::PsbtError::ConsensusEncoding { + encoding_error: ans.encoding_error.cst_decode(), + } + } + 17 => crate::api::error::PsbtError::NegativeFee, + 18 => crate::api::error::PsbtError::FeeOverflow, + 19 => { + let ans = unsafe { self.kind.InvalidPublicKey }; + crate::api::error::PsbtError::InvalidPublicKey { + error_message: ans.error_message.cst_decode(), + } + } + 20 => { + let ans = unsafe { self.kind.InvalidSecp256k1PublicKey }; + crate::api::error::PsbtError::InvalidSecp256k1PublicKey { + secp256k1_error: ans.secp256k1_error.cst_decode(), + } + } + 21 => crate::api::error::PsbtError::InvalidXOnlyPublicKey, + 22 => { + let ans = unsafe { self.kind.InvalidEcdsaSignature }; + crate::api::error::PsbtError::InvalidEcdsaSignature { + error_message: ans.error_message.cst_decode(), } } + 23 => { + let ans = unsafe { self.kind.InvalidTaprootSignature }; + crate::api::error::PsbtError::InvalidTaprootSignature { + error_message: ans.error_message.cst_decode(), + } + } + 24 => crate::api::error::PsbtError::InvalidControlBlock, + 25 => crate::api::error::PsbtError::InvalidLeafVersion, + 26 => crate::api::error::PsbtError::Taproot, + 27 => { + let ans = unsafe { self.kind.TapTree }; + crate::api::error::PsbtError::TapTree { + error_message: ans.error_message.cst_decode(), + } + } + 28 => crate::api::error::PsbtError::XPubKey, + 29 => { + let ans = unsafe { self.kind.Version }; + crate::api::error::PsbtError::Version { + error_message: ans.error_message.cst_decode(), + } + } + 30 => crate::api::error::PsbtError::PartialDataConsumption, + 31 => { + let ans = unsafe { self.kind.Io }; + crate::api::error::PsbtError::Io { + error_message: ans.error_message.cst_decode(), + } + } + 32 => crate::api::error::PsbtError::OtherPsbtErr, _ => 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 { +impl CstDecode for wire_cst_psbt_parse_error { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::RbfValue { + fn cst_decode(self) -> crate::api::error::PsbtParseError { match self.tag { - 0 => crate::api::types::RbfValue::RbfDefault, + 0 => { + let ans = unsafe { self.kind.PsbtEncoding }; + crate::api::error::PsbtParseError::PsbtEncoding { + error_message: ans.error_message.cst_decode(), + } + } 1 => { - let ans = unsafe { self.kind.Value }; - crate::api::types::RbfValue::Value(ans.field0.cst_decode()) + let ans = unsafe { self.kind.Base64Encoding }; + crate::api::error::PsbtParseError::Base64Encoding { + error_message: ans.error_message.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 { +impl CstDecode for wire_cst_sqlite_error { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::ScriptAmount { - crate::api::types::ScriptAmount { - script: self.script.cst_decode(), - amount: self.amount.cst_decode(), - } - } -} -impl CstDecode for wire_cst_sign_options { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::SignOptions { - crate::api::types::SignOptions { - trust_witness_utxo: self.trust_witness_utxo.cst_decode(), - assume_height: self.assume_height.cst_decode(), - allow_all_sighashes: self.allow_all_sighashes.cst_decode(), - remove_partial_sigs: self.remove_partial_sigs.cst_decode(), - try_finalize: self.try_finalize.cst_decode(), - sign_with_tap_internal_key: self.sign_with_tap_internal_key.cst_decode(), - allow_grinding: self.allow_grinding.cst_decode(), - } - } -} -impl CstDecode for wire_cst_sled_db_configuration { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::SledDbConfiguration { - crate::api::types::SledDbConfiguration { - path: self.path.cst_decode(), - tree_name: self.tree_name.cst_decode(), - } - } -} -impl CstDecode for wire_cst_sqlite_db_configuration { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::SqliteDbConfiguration { - crate::api::types::SqliteDbConfiguration { - path: self.path.cst_decode(), - } - } -} -impl CstDecode for wire_cst_transaction_details { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::TransactionDetails { - crate::api::types::TransactionDetails { - transaction: self.transaction.cst_decode(), - txid: self.txid.cst_decode(), - received: self.received.cst_decode(), - sent: self.sent.cst_decode(), - fee: self.fee.cst_decode(), - confirmation_time: self.confirmation_time.cst_decode(), - } - } -} -impl CstDecode for wire_cst_tx_in { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::TxIn { - crate::api::types::TxIn { - previous_output: self.previous_output.cst_decode(), - script_sig: self.script_sig.cst_decode(), - sequence: self.sequence.cst_decode(), - witness: self.witness.cst_decode(), - } - } -} -impl CstDecode for wire_cst_tx_out { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::api::types::TxOut { - crate::api::types::TxOut { - value: self.value.cst_decode(), - script_pubkey: self.script_pubkey.cst_decode(), + fn cst_decode(self) -> crate::api::error::SqliteError { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Sqlite }; + crate::api::error::SqliteError::Sqlite { + rusqlite_error: ans.rusqlite_error.cst_decode(), + } + } + _ => unreachable!(), } } } -impl CstDecode<[u8; 4]> for *mut wire_cst_list_prim_u_8_strict { +impl CstDecode for wire_cst_transaction_error { // 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(), + fn cst_decode(self) -> crate::api::error::TransactionError { + match self.tag { + 0 => crate::api::error::TransactionError::Io, + 1 => crate::api::error::TransactionError::OversizedVectorAllocation, + 2 => { + let ans = unsafe { self.kind.InvalidChecksum }; + crate::api::error::TransactionError::InvalidChecksum { + expected: ans.expected.cst_decode(), + actual: ans.actual.cst_decode(), + } + } + 3 => crate::api::error::TransactionError::NonMinimalVarInt, + 4 => crate::api::error::TransactionError::ParseFailed, + 5 => { + let ans = unsafe { self.kind.UnsupportedSegwitFlag }; + crate::api::error::TransactionError::UnsupportedSegwitFlag { + flag: ans.flag.cst_decode(), + } + } + 6 => crate::api::error::TransactionError::OtherTransactionErr, + _ => unreachable!(), } } } -impl Default for wire_cst_bdk_descriptor { - fn default() -> Self { - Self::new_with_null_ptr() +impl CstDecode for wire_cst_tx_in { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::bitcoin::TxIn { + crate::api::bitcoin::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 NewWithNullPtr for wire_cst_bdk_descriptor_public_key { - fn new_with_null_ptr() -> Self { - Self { - ptr: Default::default(), +impl CstDecode for wire_cst_tx_out { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::bitcoin::TxOut { + crate::api::bitcoin::TxOut { + value: self.value.cst_decode(), + script_pubkey: self.script_pubkey.cst_decode(), } } } -impl Default for wire_cst_bdk_descriptor_public_key { - fn default() -> Self { - Self::new_with_null_ptr() +impl CstDecode for wire_cst_update { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::Update { + crate::api::types::Update(self.field0.cst_decode()) } } -impl NewWithNullPtr for wire_cst_bdk_descriptor_secret_key { +impl NewWithNullPtr for wire_cst_address_parse_error { fn new_with_null_ptr() -> Self { Self { - ptr: Default::default(), + tag: -1, + kind: AddressParseErrorKind { nil__: () }, } } } -impl Default for wire_cst_bdk_descriptor_secret_key { +impl Default for wire_cst_address_parse_error { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_bdk_error { +impl NewWithNullPtr for wire_cst_bip_32_error { fn new_with_null_ptr() -> Self { Self { tag: -1, - kind: BdkErrorKind { nil__: () }, + kind: Bip32ErrorKind { nil__: () }, } } } -impl Default for wire_cst_bdk_error { +impl Default for wire_cst_bip_32_error { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_bdk_mnemonic { +impl NewWithNullPtr for wire_cst_bip_39_error { fn new_with_null_ptr() -> Self { Self { - ptr: Default::default(), + tag: -1, + kind: Bip39ErrorKind { nil__: () }, } } } -impl Default for wire_cst_bdk_mnemonic { +impl Default for wire_cst_bip_39_error { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_bdk_psbt { +impl NewWithNullPtr for wire_cst_create_with_persist_error { fn new_with_null_ptr() -> Self { Self { - ptr: Default::default(), + tag: -1, + kind: CreateWithPersistErrorKind { nil__: () }, } } } -impl Default for wire_cst_bdk_psbt { +impl Default for wire_cst_create_with_persist_error { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_bdk_script_buf { +impl NewWithNullPtr for wire_cst_descriptor_error { fn new_with_null_ptr() -> Self { Self { - bytes: core::ptr::null_mut(), + tag: -1, + kind: DescriptorErrorKind { nil__: () }, } } } -impl Default for wire_cst_bdk_script_buf { +impl Default for wire_cst_descriptor_error { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_bdk_transaction { +impl NewWithNullPtr for wire_cst_descriptor_key_error { fn new_with_null_ptr() -> Self { Self { - s: core::ptr::null_mut(), + tag: -1, + kind: DescriptorKeyErrorKind { nil__: () }, } } } -impl Default for wire_cst_bdk_transaction { +impl Default for wire_cst_descriptor_key_error { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_bdk_wallet { +impl NewWithNullPtr for wire_cst_electrum_client { fn new_with_null_ptr() -> Self { Self { - ptr: Default::default(), + field0: Default::default(), } } } -impl Default for wire_cst_bdk_wallet { +impl Default for wire_cst_electrum_client { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_block_time { +impl NewWithNullPtr for wire_cst_electrum_error { fn new_with_null_ptr() -> Self { Self { - height: Default::default(), - timestamp: Default::default(), + tag: -1, + kind: ElectrumErrorKind { nil__: () }, } } } -impl Default for wire_cst_block_time { +impl Default for wire_cst_electrum_error { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_blockchain_config { +impl NewWithNullPtr for wire_cst_esplora_client { fn new_with_null_ptr() -> Self { Self { - tag: -1, - kind: BlockchainConfigKind { nil__: () }, + field0: Default::default(), } } } -impl Default for wire_cst_blockchain_config { +impl Default for wire_cst_esplora_client { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_consensus_error { +impl NewWithNullPtr for wire_cst_esplora_error { fn new_with_null_ptr() -> Self { Self { tag: -1, - kind: ConsensusErrorKind { nil__: () }, + kind: EsploraErrorKind { nil__: () }, } } } -impl Default for wire_cst_consensus_error { +impl Default for wire_cst_esplora_error { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_database_config { +impl NewWithNullPtr for wire_cst_extract_tx_error { fn new_with_null_ptr() -> Self { Self { tag: -1, - kind: DatabaseConfigKind { nil__: () }, + kind: ExtractTxErrorKind { nil__: () }, } } } -impl Default for wire_cst_database_config { +impl Default for wire_cst_extract_tx_error { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_descriptor_error { +impl NewWithNullPtr for wire_cst_ffi_address { fn new_with_null_ptr() -> Self { Self { - tag: -1, - kind: DescriptorErrorKind { nil__: () }, + field0: Default::default(), } } } -impl Default for wire_cst_descriptor_error { +impl Default for wire_cst_ffi_address { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_electrum_config { +impl NewWithNullPtr for wire_cst_ffi_connection { 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(), + field0: Default::default(), } } } -impl Default for wire_cst_electrum_config { +impl Default for wire_cst_ffi_connection { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_esplora_config { +impl NewWithNullPtr for wire_cst_ffi_derivation_path { 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(), + ptr: Default::default(), } } } -impl Default for wire_cst_esplora_config { +impl Default for wire_cst_ffi_derivation_path { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_fee_rate { +impl NewWithNullPtr for wire_cst_ffi_descriptor { fn new_with_null_ptr() -> Self { Self { - sat_per_vb: Default::default(), + extended_descriptor: Default::default(), + key_map: Default::default(), } } } -impl Default for wire_cst_fee_rate { +impl Default for wire_cst_ffi_descriptor { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_hex_error { +impl NewWithNullPtr for wire_cst_ffi_descriptor_public_key { fn new_with_null_ptr() -> Self { Self { - tag: -1, - kind: HexErrorKind { nil__: () }, + ptr: Default::default(), } } } -impl Default for wire_cst_hex_error { +impl Default for wire_cst_ffi_descriptor_public_key { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_input { +impl NewWithNullPtr for wire_cst_ffi_descriptor_secret_key { fn new_with_null_ptr() -> Self { Self { - s: core::ptr::null_mut(), + ptr: Default::default(), } } } -impl Default for wire_cst_input { +impl Default for wire_cst_ffi_descriptor_secret_key { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_local_utxo { +impl NewWithNullPtr for wire_cst_ffi_full_scan_request { fn new_with_null_ptr() -> Self { Self { - outpoint: Default::default(), - txout: Default::default(), - keychain: Default::default(), - is_spent: Default::default(), + field0: Default::default(), } } } -impl Default for wire_cst_local_utxo { +impl Default for wire_cst_ffi_full_scan_request { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_lock_time { +impl NewWithNullPtr for wire_cst_ffi_full_scan_request_builder { fn new_with_null_ptr() -> Self { Self { - tag: -1, - kind: LockTimeKind { nil__: () }, + field0: Default::default(), } } } -impl Default for wire_cst_lock_time { +impl Default for wire_cst_ffi_full_scan_request_builder { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_out_point { +impl NewWithNullPtr for wire_cst_ffi_mnemonic { fn new_with_null_ptr() -> Self { Self { - txid: core::ptr::null_mut(), - vout: Default::default(), + ptr: Default::default(), } } } -impl Default for wire_cst_out_point { +impl Default for wire_cst_ffi_mnemonic { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_payload { +impl NewWithNullPtr for wire_cst_ffi_psbt { fn new_with_null_ptr() -> Self { Self { - tag: -1, - kind: PayloadKind { nil__: () }, + ptr: Default::default(), } } } -impl Default for wire_cst_payload { +impl Default for wire_cst_ffi_psbt { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_psbt_sig_hash_type { +impl NewWithNullPtr for wire_cst_ffi_script_buf { fn new_with_null_ptr() -> Self { Self { - inner: Default::default(), + bytes: core::ptr::null_mut(), } } } -impl Default for wire_cst_psbt_sig_hash_type { +impl Default for wire_cst_ffi_script_buf { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_rbf_value { +impl NewWithNullPtr for wire_cst_ffi_sync_request { fn new_with_null_ptr() -> Self { Self { - tag: -1, - kind: RbfValueKind { nil__: () }, + field0: Default::default(), } } } -impl Default for wire_cst_rbf_value { +impl Default for wire_cst_ffi_sync_request { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_record_bdk_address_u_32 { +impl NewWithNullPtr for wire_cst_ffi_sync_request_builder { fn new_with_null_ptr() -> Self { Self { field0: Default::default(), - field1: Default::default(), } } } -impl Default for wire_cst_record_bdk_address_u_32 { +impl Default for wire_cst_ffi_sync_request_builder { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_record_bdk_psbt_transaction_details { +impl NewWithNullPtr for wire_cst_ffi_transaction { fn new_with_null_ptr() -> Self { Self { - field0: Default::default(), - field1: Default::default(), + s: core::ptr::null_mut(), } } } -impl Default for wire_cst_record_bdk_psbt_transaction_details { +impl Default for wire_cst_ffi_transaction { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_record_out_point_input_usize { +impl NewWithNullPtr for wire_cst_ffi_wallet { fn new_with_null_ptr() -> Self { Self { - field0: Default::default(), - field1: Default::default(), - field2: Default::default(), + ptr: Default::default(), } } } -impl Default for wire_cst_record_out_point_input_usize { +impl Default for wire_cst_ffi_wallet { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_rpc_config { +impl NewWithNullPtr for wire_cst_from_script_error { 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(), + tag: -1, + kind: FromScriptErrorKind { nil__: () }, } } } -impl Default for wire_cst_rpc_config { +impl Default for wire_cst_from_script_error { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_rpc_sync_params { +impl NewWithNullPtr for wire_cst_lock_time { 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(), + tag: -1, + kind: LockTimeKind { nil__: () }, } } } -impl Default for wire_cst_rpc_sync_params { +impl Default for wire_cst_lock_time { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_script_amount { +impl NewWithNullPtr for wire_cst_out_point { fn new_with_null_ptr() -> Self { Self { - script: Default::default(), - amount: Default::default(), + txid: core::ptr::null_mut(), + vout: Default::default(), } } } -impl Default for wire_cst_script_amount { +impl Default for wire_cst_out_point { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_sign_options { +impl NewWithNullPtr for wire_cst_psbt_error { fn new_with_null_ptr() -> Self { Self { - trust_witness_utxo: Default::default(), - assume_height: core::ptr::null_mut(), - allow_all_sighashes: Default::default(), - remove_partial_sigs: Default::default(), - try_finalize: Default::default(), - sign_with_tap_internal_key: Default::default(), - allow_grinding: Default::default(), + tag: -1, + kind: PsbtErrorKind { nil__: () }, } } } -impl Default for wire_cst_sign_options { +impl Default for wire_cst_psbt_error { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_sled_db_configuration { +impl NewWithNullPtr for wire_cst_psbt_parse_error { fn new_with_null_ptr() -> Self { Self { - path: core::ptr::null_mut(), - tree_name: core::ptr::null_mut(), + tag: -1, + kind: PsbtParseErrorKind { nil__: () }, } } } -impl Default for wire_cst_sled_db_configuration { +impl Default for wire_cst_psbt_parse_error { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_sqlite_db_configuration { +impl NewWithNullPtr for wire_cst_sqlite_error { fn new_with_null_ptr() -> Self { Self { - path: core::ptr::null_mut(), + tag: -1, + kind: SqliteErrorKind { nil__: () }, } } } -impl Default for wire_cst_sqlite_db_configuration { +impl Default for wire_cst_sqlite_error { fn default() -> Self { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_transaction_details { +impl NewWithNullPtr for wire_cst_transaction_error { 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(), + tag: -1, + kind: TransactionErrorKind { nil__: () }, } } } -impl Default for wire_cst_transaction_details { +impl Default for wire_cst_transaction_error { fn default() -> Self { Self::new_with_null_ptr() } @@ -1834,1210 +1582,1160 @@ impl Default for wire_cst_tx_out { Self::new_with_null_ptr() } } - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_broadcast( - port_: i64, - that: *mut wire_cst_bdk_blockchain, - transaction: *mut wire_cst_bdk_transaction, -) { - wire__crate__api__blockchain__bdk_blockchain_broadcast_impl(port_, that, transaction) +impl NewWithNullPtr for wire_cst_update { + fn new_with_null_ptr() -> Self { + Self { + field0: Default::default(), + } + } } - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_create( - port_: i64, - blockchain_config: *mut wire_cst_blockchain_config, -) { - wire__crate__api__blockchain__bdk_blockchain_create_impl(port_, blockchain_config) +impl Default for wire_cst_update { + fn default() -> Self { + Self::new_with_null_ptr() + } } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_estimate_fee( - port_: i64, - that: *mut wire_cst_bdk_blockchain, - target: u64, -) { - wire__crate__api__blockchain__bdk_blockchain_estimate_fee_impl(port_, that, target) +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_as_string( + that: *mut wire_cst_ffi_address, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__bitcoin__ffi_address_as_string_impl(that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_get_block_hash( +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_from_script( port_: i64, - that: *mut wire_cst_bdk_blockchain, - height: u32, + script: *mut wire_cst_ffi_script_buf, + network: i32, ) { - wire__crate__api__blockchain__bdk_blockchain_get_block_hash_impl(port_, that, height) + wire__crate__api__bitcoin__ffi_address_from_script_impl(port_, script, network) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_get_height( +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_from_string( port_: i64, - that: *mut wire_cst_bdk_blockchain, + address: *mut wire_cst_list_prim_u_8_strict, + network: i32, ) { - wire__crate__api__blockchain__bdk_blockchain_get_height_impl(port_, that) + wire__crate__api__bitcoin__ffi_address_from_string_impl(port_, address, network) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_as_string( - that: *mut wire_cst_bdk_descriptor, +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_is_valid_for_network( + that: *mut wire_cst_ffi_address, + network: i32, ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__descriptor__bdk_descriptor_as_string_impl(that) + wire__crate__api__bitcoin__ffi_address_is_valid_for_network_impl(that, network) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weight( - that: *mut wire_cst_bdk_descriptor, +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_script( + ptr: *mut wire_cst_ffi_address, ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weight_impl(that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new( - port_: i64, - descriptor: *mut wire_cst_list_prim_u_8_strict, - network: i32, -) { - wire__crate__api__descriptor__bdk_descriptor_new_impl(port_, descriptor, network) + wire__crate__api__bitcoin__ffi_address_script_impl(ptr) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44( - port_: i64, - secret_key: *mut wire_cst_bdk_descriptor_secret_key, - keychain_kind: i32, - network: i32, -) { - wire__crate__api__descriptor__bdk_descriptor_new_bip44_impl( - port_, - secret_key, - keychain_kind, - network, - ) +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_to_qr_uri( + that: *mut wire_cst_ffi_address, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__bitcoin__ffi_address_to_qr_uri_impl(that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44_public( +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_as_string( 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, + that: *mut wire_cst_ffi_psbt, ) { - wire__crate__api__descriptor__bdk_descriptor_new_bip44_public_impl( - port_, - public_key, - fingerprint, - keychain_kind, - network, - ) + wire__crate__api__bitcoin__ffi_psbt_as_string_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip49( +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_combine( port_: i64, - secret_key: *mut wire_cst_bdk_descriptor_secret_key, - keychain_kind: i32, - network: i32, + ptr: *mut wire_cst_ffi_psbt, + other: *mut wire_cst_ffi_psbt, ) { - wire__crate__api__descriptor__bdk_descriptor_new_bip49_impl( - port_, - secret_key, - keychain_kind, - network, - ) + wire__crate__api__bitcoin__ffi_psbt_combine_impl(port_, ptr, other) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip49_public( - port_: i64, - public_key: *mut wire_cst_bdk_descriptor_public_key, - fingerprint: *mut wire_cst_list_prim_u_8_strict, - keychain_kind: i32, - network: i32, -) { - wire__crate__api__descriptor__bdk_descriptor_new_bip49_public_impl( - port_, - public_key, - fingerprint, - keychain_kind, - network, - ) +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_extract_tx( + ptr: *mut wire_cst_ffi_psbt, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__bitcoin__ffi_psbt_extract_tx_impl(ptr) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip84( - port_: i64, - secret_key: *mut wire_cst_bdk_descriptor_secret_key, - keychain_kind: i32, - network: i32, -) { - wire__crate__api__descriptor__bdk_descriptor_new_bip84_impl( - port_, - secret_key, - keychain_kind, - network, - ) +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_fee_amount( + that: *mut wire_cst_ffi_psbt, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__bitcoin__ffi_psbt_fee_amount_impl(that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip84_public( +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_from_str( 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, + psbt_base64: *mut wire_cst_list_prim_u_8_strict, ) { - wire__crate__api__descriptor__bdk_descriptor_new_bip84_public_impl( - port_, - public_key, - fingerprint, - keychain_kind, - network, - ) + wire__crate__api__bitcoin__ffi_psbt_from_str_impl(port_, psbt_base64) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip86( - port_: i64, - secret_key: *mut wire_cst_bdk_descriptor_secret_key, - keychain_kind: i32, - network: i32, -) { - wire__crate__api__descriptor__bdk_descriptor_new_bip86_impl( - port_, - secret_key, - keychain_kind, - network, - ) +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_json_serialize( + that: *mut wire_cst_ffi_psbt, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__bitcoin__ffi_psbt_json_serialize_impl(that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip86_public( - port_: i64, - public_key: *mut wire_cst_bdk_descriptor_public_key, - fingerprint: *mut wire_cst_list_prim_u_8_strict, - keychain_kind: i32, - network: i32, -) { - wire__crate__api__descriptor__bdk_descriptor_new_bip86_public_impl( - port_, - public_key, - fingerprint, - keychain_kind, - network, - ) +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_serialize( + that: *mut wire_cst_ffi_psbt, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__bitcoin__ffi_psbt_serialize_impl(that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_to_string_private( - that: *mut wire_cst_bdk_descriptor, +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_script_buf_as_string( + that: *mut wire_cst_ffi_script_buf, ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__descriptor__bdk_descriptor_to_string_private_impl(that) + wire__crate__api__bitcoin__ffi_script_buf_as_string_impl(that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_derivation_path_as_string( - that: *mut wire_cst_bdk_derivation_path, +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_script_buf_empty( ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__key__bdk_derivation_path_as_string_impl(that) + wire__crate__api__bitcoin__ffi_script_buf_empty_impl() } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_derivation_path_from_string( +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_script_buf_with_capacity( port_: i64, - path: *mut wire_cst_list_prim_u_8_strict, + capacity: usize, ) { - wire__crate__api__key__bdk_derivation_path_from_string_impl(port_, path) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_as_string( - that: *mut wire_cst_bdk_descriptor_public_key, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__key__bdk_descriptor_public_key_as_string_impl(that) + wire__crate__api__bitcoin__ffi_script_buf_with_capacity_impl(port_, capacity) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_derive( +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_compute_txid( port_: i64, - ptr: *mut wire_cst_bdk_descriptor_public_key, - path: *mut wire_cst_bdk_derivation_path, + that: *mut wire_cst_ffi_transaction, ) { - wire__crate__api__key__bdk_descriptor_public_key_derive_impl(port_, ptr, path) + wire__crate__api__bitcoin__ffi_transaction_compute_txid_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_extend( +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_from_bytes( port_: i64, - ptr: *mut wire_cst_bdk_descriptor_public_key, - path: *mut wire_cst_bdk_derivation_path, + transaction_bytes: *mut wire_cst_list_prim_u_8_loose, ) { - wire__crate__api__key__bdk_descriptor_public_key_extend_impl(port_, ptr, path) + wire__crate__api__bitcoin__ffi_transaction_from_bytes_impl(port_, transaction_bytes) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_from_string( +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_input( port_: i64, - public_key: *mut wire_cst_list_prim_u_8_strict, + that: *mut wire_cst_ffi_transaction, ) { - wire__crate__api__key__bdk_descriptor_public_key_from_string_impl(port_, public_key) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_as_public( - ptr: *mut wire_cst_bdk_descriptor_secret_key, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__key__bdk_descriptor_secret_key_as_public_impl(ptr) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_as_string( - that: *mut wire_cst_bdk_descriptor_secret_key, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__key__bdk_descriptor_secret_key_as_string_impl(that) + wire__crate__api__bitcoin__ffi_transaction_input_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_create( +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_is_coinbase( port_: i64, - network: i32, - mnemonic: *mut wire_cst_bdk_mnemonic, - password: *mut wire_cst_list_prim_u_8_strict, + that: *mut wire_cst_ffi_transaction, ) { - wire__crate__api__key__bdk_descriptor_secret_key_create_impl(port_, network, mnemonic, password) + wire__crate__api__bitcoin__ffi_transaction_is_coinbase_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_derive( +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_is_explicitly_rbf( port_: i64, - ptr: *mut wire_cst_bdk_descriptor_secret_key, - path: *mut wire_cst_bdk_derivation_path, + that: *mut wire_cst_ffi_transaction, ) { - wire__crate__api__key__bdk_descriptor_secret_key_derive_impl(port_, ptr, path) + wire__crate__api__bitcoin__ffi_transaction_is_explicitly_rbf_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_extend( +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_is_lock_time_enabled( port_: i64, - ptr: *mut wire_cst_bdk_descriptor_secret_key, - path: *mut wire_cst_bdk_derivation_path, + that: *mut wire_cst_ffi_transaction, ) { - wire__crate__api__key__bdk_descriptor_secret_key_extend_impl(port_, ptr, path) + wire__crate__api__bitcoin__ffi_transaction_is_lock_time_enabled_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_from_string( +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_lock_time( port_: i64, - secret_key: *mut wire_cst_list_prim_u_8_strict, + that: *mut wire_cst_ffi_transaction, ) { - wire__crate__api__key__bdk_descriptor_secret_key_from_string_impl(port_, secret_key) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_secret_bytes( - that: *mut wire_cst_bdk_descriptor_secret_key, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__key__bdk_descriptor_secret_key_secret_bytes_impl(that) + wire__crate__api__bitcoin__ffi_transaction_lock_time_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_as_string( - that: *mut wire_cst_bdk_mnemonic, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__key__bdk_mnemonic_as_string_impl(that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_entropy( +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_output( port_: i64, - entropy: *mut wire_cst_list_prim_u_8_loose, + that: *mut wire_cst_ffi_transaction, ) { - wire__crate__api__key__bdk_mnemonic_from_entropy_impl(port_, entropy) + wire__crate__api__bitcoin__ffi_transaction_output_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_string( +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_serialize( port_: i64, - mnemonic: *mut wire_cst_list_prim_u_8_strict, + that: *mut wire_cst_ffi_transaction, ) { - wire__crate__api__key__bdk_mnemonic_from_string_impl(port_, mnemonic) + wire__crate__api__bitcoin__ffi_transaction_serialize_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_new( +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_version( port_: i64, - word_count: i32, + that: *mut wire_cst_ffi_transaction, ) { - wire__crate__api__key__bdk_mnemonic_new_impl(port_, word_count) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_as_string( - that: *mut wire_cst_bdk_psbt, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__psbt__bdk_psbt_as_string_impl(that) + wire__crate__api__bitcoin__ffi_transaction_version_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_combine( +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_vsize( port_: i64, - ptr: *mut wire_cst_bdk_psbt, - other: *mut wire_cst_bdk_psbt, + that: *mut wire_cst_ffi_transaction, ) { - wire__crate__api__psbt__bdk_psbt_combine_impl(port_, ptr, other) + wire__crate__api__bitcoin__ffi_transaction_vsize_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_extract_tx( - ptr: *mut wire_cst_bdk_psbt, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__psbt__bdk_psbt_extract_tx_impl(ptr) +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_weight( + port_: i64, + that: *mut wire_cst_ffi_transaction, +) { + wire__crate__api__bitcoin__ffi_transaction_weight_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_fee_amount( - that: *mut wire_cst_bdk_psbt, +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_as_string( + that: *mut wire_cst_ffi_descriptor, ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__psbt__bdk_psbt_fee_amount_impl(that) + wire__crate__api__descriptor__ffi_descriptor_as_string_impl(that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_fee_rate( - that: *mut wire_cst_bdk_psbt, +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_max_satisfaction_weight( + that: *mut wire_cst_ffi_descriptor, ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__psbt__bdk_psbt_fee_rate_impl(that) + wire__crate__api__descriptor__ffi_descriptor_max_satisfaction_weight_impl(that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_from_str( +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new( port_: i64, - psbt_base64: *mut wire_cst_list_prim_u_8_strict, + descriptor: *mut wire_cst_list_prim_u_8_strict, + network: i32, ) { - wire__crate__api__psbt__bdk_psbt_from_str_impl(port_, psbt_base64) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_json_serialize( - that: *mut wire_cst_bdk_psbt, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__psbt__bdk_psbt_json_serialize_impl(that) -} - -#[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_serialize( - that: *mut wire_cst_bdk_psbt, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__psbt__bdk_psbt_serialize_impl(that) + wire__crate__api__descriptor__ffi_descriptor_new_impl(port_, descriptor, network) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_txid( - that: *mut wire_cst_bdk_psbt, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__psbt__bdk_psbt_txid_impl(that) +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip44( + port_: i64, + secret_key: *mut wire_cst_ffi_descriptor_secret_key, + keychain_kind: i32, + network: i32, +) { + wire__crate__api__descriptor__ffi_descriptor_new_bip44_impl( + port_, + secret_key, + keychain_kind, + network, + ) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_address_as_string( - that: *mut wire_cst_bdk_address, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__types__bdk_address_as_string_impl(that) +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip44_public( + port_: i64, + public_key: *mut wire_cst_ffi_descriptor_public_key, + fingerprint: *mut wire_cst_list_prim_u_8_strict, + keychain_kind: i32, + network: i32, +) { + wire__crate__api__descriptor__ffi_descriptor_new_bip44_public_impl( + port_, + public_key, + fingerprint, + keychain_kind, + network, + ) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_address_from_script( +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip49( port_: i64, - script: *mut wire_cst_bdk_script_buf, + secret_key: *mut wire_cst_ffi_descriptor_secret_key, + keychain_kind: i32, network: i32, ) { - wire__crate__api__types__bdk_address_from_script_impl(port_, script, network) + wire__crate__api__descriptor__ffi_descriptor_new_bip49_impl( + port_, + secret_key, + keychain_kind, + network, + ) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_address_from_string( +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip49_public( port_: i64, - address: *mut wire_cst_list_prim_u_8_strict, + public_key: *mut wire_cst_ffi_descriptor_public_key, + fingerprint: *mut wire_cst_list_prim_u_8_strict, + keychain_kind: i32, network: i32, ) { - wire__crate__api__types__bdk_address_from_string_impl(port_, address, network) + wire__crate__api__descriptor__ffi_descriptor_new_bip49_public_impl( + port_, + public_key, + fingerprint, + keychain_kind, + network, + ) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_address_is_valid_for_network( - that: *mut wire_cst_bdk_address, +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip84( + port_: i64, + secret_key: *mut wire_cst_ffi_descriptor_secret_key, + keychain_kind: i32, network: i32, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__types__bdk_address_is_valid_for_network_impl(that, network) +) { + wire__crate__api__descriptor__ffi_descriptor_new_bip84_impl( + port_, + secret_key, + keychain_kind, + network, + ) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_address_network( - that: *mut wire_cst_bdk_address, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__types__bdk_address_network_impl(that) +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip84_public( + port_: i64, + public_key: *mut wire_cst_ffi_descriptor_public_key, + fingerprint: *mut wire_cst_list_prim_u_8_strict, + keychain_kind: i32, + network: i32, +) { + wire__crate__api__descriptor__ffi_descriptor_new_bip84_public_impl( + port_, + public_key, + fingerprint, + keychain_kind, + network, + ) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_address_payload( - that: *mut wire_cst_bdk_address, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__types__bdk_address_payload_impl(that) +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip86( + port_: i64, + secret_key: *mut wire_cst_ffi_descriptor_secret_key, + keychain_kind: i32, + network: i32, +) { + wire__crate__api__descriptor__ffi_descriptor_new_bip86_impl( + port_, + secret_key, + keychain_kind, + network, + ) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_address_script( - ptr: *mut wire_cst_bdk_address, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__types__bdk_address_script_impl(ptr) +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip86_public( + port_: i64, + public_key: *mut wire_cst_ffi_descriptor_public_key, + fingerprint: *mut wire_cst_list_prim_u_8_strict, + keychain_kind: i32, + network: i32, +) { + wire__crate__api__descriptor__ffi_descriptor_new_bip86_public_impl( + port_, + public_key, + fingerprint, + keychain_kind, + network, + ) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_address_to_qr_uri( - that: *mut wire_cst_bdk_address, +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_to_string_with_secret( + that: *mut wire_cst_ffi_descriptor, ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__types__bdk_address_to_qr_uri_impl(that) + wire__crate__api__descriptor__ffi_descriptor_to_string_with_secret_impl(that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_as_string( - that: *mut wire_cst_bdk_script_buf, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__types__bdk_script_buf_as_string_impl(that) +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__electrum__electrum_client_broadcast( + port_: i64, + that: *mut wire_cst_electrum_client, + transaction: *mut wire_cst_ffi_transaction, +) { + wire__crate__api__electrum__electrum_client_broadcast_impl(port_, that, transaction) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_empty( -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__types__bdk_script_buf_empty_impl() +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__electrum__electrum_client_full_scan( + port_: i64, + that: *mut wire_cst_electrum_client, + request: *mut wire_cst_ffi_full_scan_request, + stop_gap: u64, + batch_size: u64, + fetch_prev_txouts: bool, +) { + wire__crate__api__electrum__electrum_client_full_scan_impl( + port_, + that, + request, + stop_gap, + batch_size, + fetch_prev_txouts, + ) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_from_hex( +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__electrum__electrum_client_new( port_: i64, - s: *mut wire_cst_list_prim_u_8_strict, + url: *mut wire_cst_list_prim_u_8_strict, ) { - wire__crate__api__types__bdk_script_buf_from_hex_impl(port_, s) + wire__crate__api__electrum__electrum_client_new_impl(port_, url) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_with_capacity( +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__electrum__electrum_client_sync( port_: i64, - capacity: usize, + that: *mut wire_cst_electrum_client, + request: *mut wire_cst_ffi_sync_request, + batch_size: u64, + fetch_prev_txouts: bool, ) { - wire__crate__api__types__bdk_script_buf_with_capacity_impl(port_, capacity) + wire__crate__api__electrum__electrum_client_sync_impl( + port_, + that, + request, + batch_size, + fetch_prev_txouts, + ) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_from_bytes( +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__esplora__esplora_client_broadcast( port_: i64, - transaction_bytes: *mut wire_cst_list_prim_u_8_loose, + that: *mut wire_cst_esplora_client, + transaction: *mut wire_cst_ffi_transaction, ) { - wire__crate__api__types__bdk_transaction_from_bytes_impl(port_, transaction_bytes) + wire__crate__api__esplora__esplora_client_broadcast_impl(port_, that, transaction) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_input( +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__esplora__esplora_client_full_scan( port_: i64, - that: *mut wire_cst_bdk_transaction, + that: *mut wire_cst_esplora_client, + request: *mut wire_cst_ffi_full_scan_request, + stop_gap: u64, + parallel_requests: u64, ) { - wire__crate__api__types__bdk_transaction_input_impl(port_, that) + wire__crate__api__esplora__esplora_client_full_scan_impl( + port_, + that, + request, + stop_gap, + parallel_requests, + ) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_coin_base( +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__esplora__esplora_client_new( port_: i64, - that: *mut wire_cst_bdk_transaction, + url: *mut wire_cst_list_prim_u_8_strict, ) { - wire__crate__api__types__bdk_transaction_is_coin_base_impl(port_, that) + wire__crate__api__esplora__esplora_client_new_impl(port_, url) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_explicitly_rbf( +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__esplora__esplora_client_sync( port_: i64, - that: *mut wire_cst_bdk_transaction, + that: *mut wire_cst_esplora_client, + request: *mut wire_cst_ffi_sync_request, + parallel_requests: u64, ) { - wire__crate__api__types__bdk_transaction_is_explicitly_rbf_impl(port_, that) + wire__crate__api__esplora__esplora_client_sync_impl(port_, that, request, parallel_requests) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_lock_time_enabled( - port_: i64, - that: *mut wire_cst_bdk_transaction, -) { - wire__crate__api__types__bdk_transaction_is_lock_time_enabled_impl(port_, that) +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__ffi_derivation_path_as_string( + that: *mut wire_cst_ffi_derivation_path, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__key__ffi_derivation_path_as_string_impl(that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_lock_time( +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__ffi_derivation_path_from_string( port_: i64, - that: *mut wire_cst_bdk_transaction, + path: *mut wire_cst_list_prim_u_8_strict, ) { - wire__crate__api__types__bdk_transaction_lock_time_impl(port_, that) + wire__crate__api__key__ffi_derivation_path_from_string_impl(port_, path) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_new( - port_: i64, - version: i32, - lock_time: *mut wire_cst_lock_time, - input: *mut wire_cst_list_tx_in, - output: *mut wire_cst_list_tx_out, -) { - wire__crate__api__types__bdk_transaction_new_impl(port_, version, lock_time, input, output) +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_public_key_as_string( + that: *mut wire_cst_ffi_descriptor_public_key, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__key__ffi_descriptor_public_key_as_string_impl(that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_output( +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_public_key_derive( port_: i64, - that: *mut wire_cst_bdk_transaction, + ptr: *mut wire_cst_ffi_descriptor_public_key, + path: *mut wire_cst_ffi_derivation_path, ) { - wire__crate__api__types__bdk_transaction_output_impl(port_, that) + wire__crate__api__key__ffi_descriptor_public_key_derive_impl(port_, ptr, path) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_serialize( +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_public_key_extend( port_: i64, - that: *mut wire_cst_bdk_transaction, + ptr: *mut wire_cst_ffi_descriptor_public_key, + path: *mut wire_cst_ffi_derivation_path, ) { - wire__crate__api__types__bdk_transaction_serialize_impl(port_, that) + wire__crate__api__key__ffi_descriptor_public_key_extend_impl(port_, ptr, path) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_size( +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_public_key_from_string( port_: i64, - that: *mut wire_cst_bdk_transaction, + public_key: *mut wire_cst_list_prim_u_8_strict, ) { - wire__crate__api__types__bdk_transaction_size_impl(port_, that) + wire__crate__api__key__ffi_descriptor_public_key_from_string_impl(port_, public_key) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_txid( - port_: i64, - that: *mut wire_cst_bdk_transaction, -) { - wire__crate__api__types__bdk_transaction_txid_impl(port_, that) +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_as_public( + ptr: *mut wire_cst_ffi_descriptor_secret_key, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__key__ffi_descriptor_secret_key_as_public_impl(ptr) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_version( - port_: i64, - that: *mut wire_cst_bdk_transaction, -) { - wire__crate__api__types__bdk_transaction_version_impl(port_, that) +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_as_string( + that: *mut wire_cst_ffi_descriptor_secret_key, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__key__ffi_descriptor_secret_key_as_string_impl(that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_vsize( +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_create( port_: i64, - that: *mut wire_cst_bdk_transaction, + network: i32, + mnemonic: *mut wire_cst_ffi_mnemonic, + password: *mut wire_cst_list_prim_u_8_strict, ) { - wire__crate__api__types__bdk_transaction_vsize_impl(port_, that) + wire__crate__api__key__ffi_descriptor_secret_key_create_impl(port_, network, mnemonic, password) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_weight( +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_derive( port_: i64, - that: *mut wire_cst_bdk_transaction, + ptr: *mut wire_cst_ffi_descriptor_secret_key, + path: *mut wire_cst_ffi_derivation_path, ) { - wire__crate__api__types__bdk_transaction_weight_impl(port_, that) + wire__crate__api__key__ffi_descriptor_secret_key_derive_impl(port_, ptr, path) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_address( - ptr: *mut wire_cst_bdk_wallet, - address_index: *mut wire_cst_address_index, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__wallet__bdk_wallet_get_address_impl(ptr, address_index) +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_extend( + port_: i64, + ptr: *mut wire_cst_ffi_descriptor_secret_key, + path: *mut wire_cst_ffi_derivation_path, +) { + wire__crate__api__key__ffi_descriptor_secret_key_extend_impl(port_, ptr, path) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_balance( - that: *mut wire_cst_bdk_wallet, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__wallet__bdk_wallet_get_balance_impl(that) +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_from_string( + port_: i64, + secret_key: *mut wire_cst_list_prim_u_8_strict, +) { + wire__crate__api__key__ffi_descriptor_secret_key_from_string_impl(port_, secret_key) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychain( - ptr: *mut wire_cst_bdk_wallet, - keychain: i32, +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_secret_bytes( + that: *mut wire_cst_ffi_descriptor_secret_key, ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychain_impl(ptr, keychain) + wire__crate__api__key__ffi_descriptor_secret_key_secret_bytes_impl(that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_internal_address( - ptr: *mut wire_cst_bdk_wallet, - address_index: *mut wire_cst_address_index, +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__ffi_mnemonic_as_string( + that: *mut wire_cst_ffi_mnemonic, ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__wallet__bdk_wallet_get_internal_address_impl(ptr, address_index) + wire__crate__api__key__ffi_mnemonic_as_string_impl(that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_psbt_input( +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__ffi_mnemonic_from_entropy( 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, + entropy: *mut wire_cst_list_prim_u_8_loose, ) { - wire__crate__api__wallet__bdk_wallet_get_psbt_input_impl( - port_, - that, - utxo, - only_witness_utxo, - sighash_type, - ) + wire__crate__api__key__ffi_mnemonic_from_entropy_impl(port_, entropy) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_is_mine( - that: *mut wire_cst_bdk_wallet, - script: *mut wire_cst_bdk_script_buf, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__wallet__bdk_wallet_is_mine_impl(that, script) +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__ffi_mnemonic_from_string( + port_: i64, + mnemonic: *mut wire_cst_list_prim_u_8_strict, +) { + wire__crate__api__key__ffi_mnemonic_from_string_impl(port_, mnemonic) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_list_transactions( - that: *mut wire_cst_bdk_wallet, - include_raw: bool, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__wallet__bdk_wallet_list_transactions_impl(that, include_raw) +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__ffi_mnemonic_new( + port_: i64, + word_count: i32, +) { + wire__crate__api__key__ffi_mnemonic_new_impl(port_, word_count) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_list_unspent( - that: *mut wire_cst_bdk_wallet, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__wallet__bdk_wallet_list_unspent_impl(that) +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__store__ffi_connection_new( + port_: i64, + path: *mut wire_cst_list_prim_u_8_strict, +) { + wire__crate__api__store__ffi_connection_new_impl(port_, path) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_network( - that: *mut wire_cst_bdk_wallet, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - wire__crate__api__wallet__bdk_wallet_network_impl(that) +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__store__ffi_connection_new_in_memory( + port_: i64, +) { + wire__crate__api__store__ffi_connection_new_in_memory_impl(port_) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_new( +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__ffi_full_scan_request_builder_build( port_: i64, - descriptor: *mut wire_cst_bdk_descriptor, - change_descriptor: *mut wire_cst_bdk_descriptor, - network: i32, - database_config: *mut wire_cst_database_config, + that: *mut wire_cst_ffi_full_scan_request_builder, ) { - wire__crate__api__wallet__bdk_wallet_new_impl( - port_, - descriptor, - change_descriptor, - network, - database_config, - ) + wire__crate__api__types__ffi_full_scan_request_builder_build_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sign( +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__ffi_full_scan_request_builder_inspect_spks_for_all_keychains( port_: i64, - ptr: *mut wire_cst_bdk_wallet, - psbt: *mut wire_cst_bdk_psbt, - sign_options: *mut wire_cst_sign_options, + that: *mut wire_cst_ffi_full_scan_request_builder, + inspector: *const std::ffi::c_void, ) { - wire__crate__api__wallet__bdk_wallet_sign_impl(port_, ptr, psbt, sign_options) + wire__crate__api__types__ffi_full_scan_request_builder_inspect_spks_for_all_keychains_impl( + port_, that, inspector, + ) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sync( +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__ffi_sync_request_builder_build( port_: i64, - ptr: *mut wire_cst_bdk_wallet, - blockchain: *mut wire_cst_bdk_blockchain, + that: *mut wire_cst_ffi_sync_request_builder, ) { - wire__crate__api__wallet__bdk_wallet_sync_impl(port_, ptr, blockchain) + wire__crate__api__types__ffi_sync_request_builder_build_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__finish_bump_fee_tx_builder( +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__ffi_sync_request_builder_inspect_spks( 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, + that: *mut wire_cst_ffi_sync_request_builder, + inspector: *const std::ffi::c_void, ) { - wire__crate__api__wallet__finish_bump_fee_tx_builder_impl( - port_, - txid, - fee_rate, - allow_shrinking, - wallet, - enable_rbf, - n_sequence, - ) + wire__crate__api__types__ffi_sync_request_builder_inspect_spks_impl(port_, that, inspector) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__tx_builder_finish( +pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_new( 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__crate__api__wallet__tx_builder_finish_impl( + descriptor: *mut wire_cst_ffi_descriptor, + change_descriptor: *mut wire_cst_ffi_descriptor, + network: i32, + connection: *mut wire_cst_ffi_connection, +) { + wire__crate__api__wallet__ffi_wallet_new_impl( port_, - wallet, - recipients, - utxos, - foreign_utxo, - un_spendable, - change_policy, - manually_selected_only, - fee_rate, - fee_absolute, - drain_wallet, - drain_to, - rbf, - data, + descriptor, + change_descriptor, + network, + connection, ) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddress( +pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_corebitcoinAddress( ptr: *const std::ffi::c_void, ) { unsafe { - StdArc::::increment_strong_count(ptr as _); + StdArc::::increment_strong_count(ptr as _); } } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress( +pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_corebitcoinAddress( ptr: *const std::ffi::c_void, ) { unsafe { - StdArc::::decrement_strong_count(ptr as _); + StdArc::::decrement_strong_count(ptr as _); } } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath( +pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_electrumBdkElectrumClientbdk_electrumelectrum_clientClient( ptr: *const std::ffi::c_void, ) { unsafe { - StdArc::::increment_strong_count(ptr as _); + StdArc::>::increment_strong_count(ptr as _); } } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath( +pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_electrumBdkElectrumClientbdk_electrumelectrum_clientClient( ptr: *const std::ffi::c_void, ) { unsafe { - StdArc::::decrement_strong_count(ptr as _); + StdArc::>::decrement_strong_count(ptr as _); } } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkblockchainAnyBlockchain( +pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_esploraesplora_clientBlockingClient( ptr: *const std::ffi::c_void, ) { unsafe { - StdArc::::increment_strong_count(ptr as _); + StdArc::::increment_strong_count(ptr as _); } } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkblockchainAnyBlockchain( +pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_esploraesplora_clientBlockingClient( ptr: *const std::ffi::c_void, ) { unsafe { - StdArc::::decrement_strong_count(ptr as _); + StdArc::::decrement_strong_count(ptr as _); } } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor( +pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletUpdate( ptr: *const std::ffi::c_void, ) { unsafe { - StdArc::::increment_strong_count(ptr as _); + StdArc::::increment_strong_count(ptr as _); } } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkdescriptorExtendedDescriptor( +pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletUpdate( ptr: *const std::ffi::c_void, ) { unsafe { - StdArc::::decrement_strong_count(ptr as _); + StdArc::::decrement_strong_count(ptr as _); } } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorPublicKey( +pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletbitcoinbip32DerivationPath( ptr: *const std::ffi::c_void, ) { unsafe { - StdArc::::increment_strong_count(ptr as _); + StdArc::::increment_strong_count(ptr as _); } } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorPublicKey( +pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletbitcoinbip32DerivationPath( ptr: *const std::ffi::c_void, ) { unsafe { - StdArc::::decrement_strong_count(ptr as _); + StdArc::::decrement_strong_count(ptr as _); } } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysDescriptorSecretKey( +pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletdescriptorExtendedDescriptor( ptr: *const std::ffi::c_void, ) { unsafe { - StdArc::::increment_strong_count(ptr as _); + StdArc::::increment_strong_count(ptr as _); } } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysDescriptorSecretKey( +pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletdescriptorExtendedDescriptor( ptr: *const std::ffi::c_void, ) { unsafe { - StdArc::::decrement_strong_count(ptr as _); + StdArc::::decrement_strong_count(ptr as _); } } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysKeyMap( +pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysDescriptorPublicKey( ptr: *const std::ffi::c_void, ) { unsafe { - StdArc::::increment_strong_count(ptr as _); + StdArc::::increment_strong_count(ptr as _); } } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysKeyMap( +pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysDescriptorPublicKey( ptr: *const std::ffi::c_void, ) { unsafe { - StdArc::::decrement_strong_count(ptr as _); + StdArc::::decrement_strong_count(ptr as _); } } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkkeysbip39Mnemonic( +pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysDescriptorSecretKey( ptr: *const std::ffi::c_void, ) { unsafe { - StdArc::::increment_strong_count(ptr as _); + StdArc::::increment_strong_count(ptr as _); } } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkkeysbip39Mnemonic( +pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysDescriptorSecretKey( ptr: *const std::ffi::c_void, ) { unsafe { - StdArc::::decrement_strong_count(ptr as _); + StdArc::::decrement_strong_count(ptr as _); } } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( +pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysKeyMap( ptr: *const std::ffi::c_void, ) { unsafe { - StdArc::>>::increment_strong_count( - ptr as _, - ); + StdArc::::increment_strong_count(ptr as _); } } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkWalletbdkdatabaseAnyDatabase( +pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysKeyMap( ptr: *const std::ffi::c_void, ) { unsafe { - StdArc::>>::decrement_strong_count( - ptr as _, - ); + StdArc::::decrement_strong_count(ptr as _); } } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( +pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysbip39Mnemonic( ptr: *const std::ffi::c_void, ) { unsafe { - StdArc::>::increment_strong_count(ptr as _); + StdArc::::increment_strong_count(ptr as _); } } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdkbitcoinpsbtPartiallySignedTransaction( +pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysbip39Mnemonic( ptr: *const std::ffi::c_void, ) { unsafe { - StdArc::>::decrement_strong_count(ptr as _); + 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()) +pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestBuilderbdk_walletKeychainKind( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::< + std::sync::Mutex< + Option>, + >, + >::increment_strong_count(ptr as _); + } } #[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()) +pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestBuilderbdk_walletKeychainKind( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::< + std::sync::Mutex< + Option>, + >, + >::decrement_strong_count(ptr as _); + } } #[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()) +pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestbdk_walletKeychainKind( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::< + std::sync::Mutex< + Option>, + >, + >::increment_strong_count(ptr as _); + } } #[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(), - ) +pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestbdk_walletKeychainKind( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::< + std::sync::Mutex< + Option>, + >, + >::decrement_strong_count(ptr as _); + } } #[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(), - ) +pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestBuilderbdk_walletKeychainKindu32( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::< + std::sync::Mutex< + Option>, + >, + >::increment_strong_count(ptr as _); + } } #[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(), - ) +pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestBuilderbdk_walletKeychainKindu32( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::< + std::sync::Mutex< + Option>, + >, + >::decrement_strong_count(ptr as _); + } } #[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(), - ) +pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestbdk_walletKeychainKindu32( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::< + std::sync::Mutex< + Option>, + >, + >::increment_strong_count(ptr as _); + } } #[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(), - ) +pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestbdk_walletKeychainKindu32( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::< + std::sync::Mutex< + Option>, + >, + >::decrement_strong_count(ptr as _); + } } #[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()) +pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdk_corebitcoinpsbtPsbt( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::>::increment_strong_count(ptr as _); + } } #[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()) +pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_corebitcoinpsbtPsbt( + 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_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(), - ) +pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdk_walletPersistedWalletbdk_walletrusqliteConnection( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc:: >>::increment_strong_count(ptr as _); + } } #[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(), - ) +pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_walletPersistedWalletbdk_walletrusqliteConnection( + 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_bdk_wallet() -> *mut wire_cst_bdk_wallet { - flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_bdk_wallet::new_with_null_ptr()) +pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdk_walletrusqliteConnection( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::>::increment_strong_count( + ptr as _, + ); + } } #[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_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_walletrusqliteConnection( + 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_blockchain_config( -) -> *mut wire_cst_blockchain_config { +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_electrum_client( +) -> *mut wire_cst_electrum_client { flutter_rust_bridge::for_generated::new_leak_box_ptr( - wire_cst_blockchain_config::new_with_null_ptr(), + wire_cst_electrum_client::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_esplora_client( +) -> *mut wire_cst_esplora_client { flutter_rust_bridge::for_generated::new_leak_box_ptr( - wire_cst_consensus_error::new_with_null_ptr(), + wire_cst_esplora_client::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(), - ) +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_ffi_address() -> *mut wire_cst_ffi_address +{ + flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_ffi_address::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_ffi_connection( +) -> *mut wire_cst_ffi_connection { flutter_rust_bridge::for_generated::new_leak_box_ptr( - wire_cst_descriptor_error::new_with_null_ptr(), + wire_cst_ffi_connection::new_with_null_ptr(), ) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_electrum_config( -) -> *mut wire_cst_electrum_config { +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_ffi_derivation_path( +) -> *mut wire_cst_ffi_derivation_path { flutter_rust_bridge::for_generated::new_leak_box_ptr( - wire_cst_electrum_config::new_with_null_ptr(), + wire_cst_ffi_derivation_path::new_with_null_ptr(), ) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_esplora_config( -) -> *mut wire_cst_esplora_config { +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_ffi_descriptor( +) -> *mut wire_cst_ffi_descriptor { flutter_rust_bridge::for_generated::new_leak_box_ptr( - wire_cst_esplora_config::new_with_null_ptr(), + wire_cst_ffi_descriptor::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 { +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_ffi_descriptor_public_key( +) -> *mut wire_cst_ffi_descriptor_public_key { flutter_rust_bridge::for_generated::new_leak_box_ptr( - wire_cst_psbt_sig_hash_type::new_with_null_ptr(), + wire_cst_ffi_descriptor_public_key::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 { +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_ffi_descriptor_secret_key( +) -> *mut wire_cst_ffi_descriptor_secret_key { flutter_rust_bridge::for_generated::new_leak_box_ptr( - wire_cst_record_out_point_input_usize::new_with_null_ptr(), + wire_cst_ffi_descriptor_secret_key::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()) +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_ffi_full_scan_request( +) -> *mut wire_cst_ffi_full_scan_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ffi_full_scan_request::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 { +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_ffi_full_scan_request_builder( +) -> *mut wire_cst_ffi_full_scan_request_builder { flutter_rust_bridge::for_generated::new_leak_box_ptr( - wire_cst_rpc_sync_params::new_with_null_ptr(), + wire_cst_ffi_full_scan_request_builder::new_with_null_ptr(), ) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_sign_options() -> *mut wire_cst_sign_options +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_ffi_mnemonic() -> *mut wire_cst_ffi_mnemonic { - flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_sign_options::new_with_null_ptr()) + flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_ffi_mnemonic::new_with_null_ptr()) +} + +#[no_mangle] +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_ffi_psbt() -> *mut wire_cst_ffi_psbt { + flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_ffi_psbt::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 { +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_ffi_script_buf( +) -> *mut wire_cst_ffi_script_buf { flutter_rust_bridge::for_generated::new_leak_box_ptr( - wire_cst_sled_db_configuration::new_with_null_ptr(), + wire_cst_ffi_script_buf::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 { +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_ffi_sync_request( +) -> *mut wire_cst_ffi_sync_request { flutter_rust_bridge::for_generated::new_leak_box_ptr( - wire_cst_sqlite_db_configuration::new_with_null_ptr(), + wire_cst_ffi_sync_request::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) +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_ffi_sync_request_builder( +) -> *mut wire_cst_ffi_sync_request_builder { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ffi_sync_request_builder::new_with_null_ptr(), + ) } #[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) +pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_ffi_transaction( +) -> *mut wire_cst_ffi_transaction { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ffi_transaction::new_with_null_ptr(), + ) } #[no_mangle] -pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_u_8(value: u8) -> *mut u8 { +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) } @@ -3055,34 +2753,6 @@ pub extern "C" fn frbgen_bdk_flutter_cst_new_list_list_prim_u_8_strict( 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, @@ -3105,34 +2775,6 @@ pub extern "C" fn frbgen_bdk_flutter_cst_new_list_prim_u_8_strict( 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 { @@ -3159,633 +2801,500 @@ pub extern "C" fn frbgen_bdk_flutter_cst_new_list_tx_out(len: i32) -> *mut wire_ #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_address_error { +pub struct wire_cst_address_parse_error { tag: i32, - kind: AddressErrorKind, + kind: AddressParseErrorKind, } #[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, +pub union AddressParseErrorKind { + WitnessVersion: wire_cst_AddressParseError_WitnessVersion, + WitnessProgram: wire_cst_AddressParseError_WitnessProgram, 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, +pub struct wire_cst_AddressParseError_WitnessVersion { + error_message: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_AddressError_InvalidBech32Variant { - expected: i32, - found: i32, +pub struct wire_cst_AddressParseError_WitnessProgram { + error_message: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_AddressError_InvalidWitnessVersion { - field0: u8, +pub struct wire_cst_bip_32_error { + tag: i32, + kind: Bip32ErrorKind, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_AddressError_UnparsableWitnessVersion { - field0: *mut wire_cst_list_prim_u_8_strict, +pub union Bip32ErrorKind { + Secp256k1: wire_cst_Bip32Error_Secp256k1, + InvalidChildNumber: wire_cst_Bip32Error_InvalidChildNumber, + UnknownVersion: wire_cst_Bip32Error_UnknownVersion, + WrongExtendedKeyLength: wire_cst_Bip32Error_WrongExtendedKeyLength, + Base58: wire_cst_Bip32Error_Base58, + Hex: wire_cst_Bip32Error_Hex, + InvalidPublicKeyHexLength: wire_cst_Bip32Error_InvalidPublicKeyHexLength, + UnknownError: wire_cst_Bip32Error_UnknownError, + nil__: (), } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_AddressError_InvalidWitnessProgramLength { - field0: usize, +pub struct wire_cst_Bip32Error_Secp256k1 { + error_message: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_AddressError_InvalidSegwitV0ProgramLength { - field0: usize, +pub struct wire_cst_Bip32Error_InvalidChildNumber { + child_number: u32, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_AddressError_UnknownAddressType { - field0: *mut wire_cst_list_prim_u_8_strict, +pub struct wire_cst_Bip32Error_UnknownVersion { + version: *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, +pub struct wire_cst_Bip32Error_WrongExtendedKeyLength { + length: u32, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_address_index { - tag: i32, - kind: AddressIndexKind, +pub struct wire_cst_Bip32Error_Base58 { + error_message: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] -pub union AddressIndexKind { - Peek: wire_cst_AddressIndex_Peek, - Reset: wire_cst_AddressIndex_Reset, - nil__: (), +pub struct wire_cst_Bip32Error_Hex { + error_message: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_AddressIndex_Peek { - index: u32, +pub struct wire_cst_Bip32Error_InvalidPublicKeyHexLength { + length: u32, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_AddressIndex_Reset { - index: u32, +pub struct wire_cst_Bip32Error_UnknownError { + error_message: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_auth { +pub struct wire_cst_bip_39_error { tag: i32, - kind: AuthKind, + kind: Bip39ErrorKind, } #[repr(C)] #[derive(Clone, Copy)] -pub union AuthKind { - UserPass: wire_cst_Auth_UserPass, - Cookie: wire_cst_Auth_Cookie, +pub union Bip39ErrorKind { + BadWordCount: wire_cst_Bip39Error_BadWordCount, + UnknownWord: wire_cst_Bip39Error_UnknownWord, + BadEntropyBitCount: wire_cst_Bip39Error_BadEntropyBitCount, + AmbiguousLanguages: wire_cst_Bip39Error_AmbiguousLanguages, 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, +pub struct wire_cst_Bip39Error_BadWordCount { + word_count: u64, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_balance { - immature: u64, - trusted_pending: u64, - untrusted_pending: u64, - confirmed: u64, - spendable: u64, - total: u64, +pub struct wire_cst_Bip39Error_UnknownWord { + index: u64, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_bdk_address { - ptr: usize, +pub struct wire_cst_Bip39Error_BadEntropyBitCount { + bit_count: u64, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_bdk_blockchain { - ptr: usize, +pub struct wire_cst_Bip39Error_AmbiguousLanguages { + languages: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_bdk_derivation_path { - ptr: usize, +pub struct wire_cst_create_with_persist_error { + tag: i32, + kind: CreateWithPersistErrorKind, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_bdk_descriptor { - extended_descriptor: usize, - key_map: usize, +pub union CreateWithPersistErrorKind { + Persist: wire_cst_CreateWithPersistError_Persist, + Descriptor: wire_cst_CreateWithPersistError_Descriptor, + nil__: (), } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_bdk_descriptor_public_key { - ptr: usize, +pub struct wire_cst_CreateWithPersistError_Persist { + error_message: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_bdk_descriptor_secret_key { - ptr: usize, +pub struct wire_cst_CreateWithPersistError_Descriptor { + error_message: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_bdk_error { +pub struct wire_cst_descriptor_error { tag: i32, - kind: BdkErrorKind, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub union BdkErrorKind { - Hex: wire_cst_BdkError_Hex, - Consensus: wire_cst_BdkError_Consensus, - VerifyTransaction: wire_cst_BdkError_VerifyTransaction, - Address: wire_cst_BdkError_Address, - Descriptor: wire_cst_BdkError_Descriptor, - InvalidU32Bytes: wire_cst_BdkError_InvalidU32Bytes, - Generic: wire_cst_BdkError_Generic, - OutputBelowDustLimit: wire_cst_BdkError_OutputBelowDustLimit, - InsufficientFunds: wire_cst_BdkError_InsufficientFunds, - FeeRateTooLow: wire_cst_BdkError_FeeRateTooLow, - FeeTooLow: wire_cst_BdkError_FeeTooLow, - MissingKeyOrigin: wire_cst_BdkError_MissingKeyOrigin, - Key: wire_cst_BdkError_Key, - SpendingPolicyRequired: wire_cst_BdkError_SpendingPolicyRequired, - InvalidPolicyPathError: wire_cst_BdkError_InvalidPolicyPathError, - Signer: wire_cst_BdkError_Signer, - InvalidNetwork: wire_cst_BdkError_InvalidNetwork, - InvalidOutpoint: wire_cst_BdkError_InvalidOutpoint, - Encode: wire_cst_BdkError_Encode, - Miniscript: wire_cst_BdkError_Miniscript, - MiniscriptPsbt: wire_cst_BdkError_MiniscriptPsbt, - Bip32: wire_cst_BdkError_Bip32, - Bip39: wire_cst_BdkError_Bip39, - Secp256k1: wire_cst_BdkError_Secp256k1, - Json: wire_cst_BdkError_Json, - Psbt: wire_cst_BdkError_Psbt, - PsbtParse: wire_cst_BdkError_PsbtParse, - MissingCachedScripts: wire_cst_BdkError_MissingCachedScripts, - Electrum: wire_cst_BdkError_Electrum, - Esplora: wire_cst_BdkError_Esplora, - Sled: wire_cst_BdkError_Sled, - Rpc: wire_cst_BdkError_Rpc, - Rusqlite: wire_cst_BdkError_Rusqlite, - InvalidInput: wire_cst_BdkError_InvalidInput, - InvalidLockTime: wire_cst_BdkError_InvalidLockTime, - InvalidTransaction: wire_cst_BdkError_InvalidTransaction, - nil__: (), + kind: DescriptorErrorKind, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_BdkError_Hex { - field0: *mut wire_cst_hex_error, +pub union DescriptorErrorKind { + Key: wire_cst_DescriptorError_Key, + Generic: wire_cst_DescriptorError_Generic, + 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_BdkError_Consensus { - field0: *mut wire_cst_consensus_error, +pub struct wire_cst_DescriptorError_Key { + error_message: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_BdkError_VerifyTransaction { - field0: *mut wire_cst_list_prim_u_8_strict, +pub struct wire_cst_DescriptorError_Generic { + error_message: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_BdkError_Address { - field0: *mut wire_cst_address_error, +pub struct wire_cst_DescriptorError_Policy { + error_message: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_BdkError_Descriptor { - field0: *mut wire_cst_descriptor_error, +pub struct wire_cst_DescriptorError_InvalidDescriptorCharacter { + char: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_BdkError_InvalidU32Bytes { - field0: *mut wire_cst_list_prim_u_8_strict, +pub struct wire_cst_DescriptorError_Bip32 { + error_message: *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, +pub struct wire_cst_DescriptorError_Base58 { + error_message: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_BdkError_OutputBelowDustLimit { - field0: usize, +pub struct wire_cst_DescriptorError_Pk { + error_message: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_BdkError_InsufficientFunds { - needed: u64, - available: u64, +pub struct wire_cst_DescriptorError_Miniscript { + error_message: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_BdkError_FeeRateTooLow { - needed: f32, +pub struct wire_cst_DescriptorError_Hex { + error_message: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_BdkError_FeeTooLow { - needed: u64, +pub struct wire_cst_descriptor_key_error { + tag: i32, + kind: DescriptorKeyErrorKind, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_BdkError_MissingKeyOrigin { - field0: *mut wire_cst_list_prim_u_8_strict, +pub union DescriptorKeyErrorKind { + Parse: wire_cst_DescriptorKeyError_Parse, + Bip32: wire_cst_DescriptorKeyError_Bip32, + nil__: (), } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_BdkError_Key { - field0: *mut wire_cst_list_prim_u_8_strict, +pub struct wire_cst_DescriptorKeyError_Parse { + error_message: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_BdkError_SpendingPolicyRequired { - field0: i32, +pub struct wire_cst_DescriptorKeyError_Bip32 { + error_message: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_BdkError_InvalidPolicyPathError { - field0: *mut wire_cst_list_prim_u_8_strict, +pub struct wire_cst_electrum_client { + field0: usize, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_BdkError_Signer { - field0: *mut wire_cst_list_prim_u_8_strict, +pub struct wire_cst_electrum_error { + tag: i32, + kind: ElectrumErrorKind, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_BdkError_InvalidNetwork { - requested: i32, - found: i32, +pub union ElectrumErrorKind { + IOError: wire_cst_ElectrumError_IOError, + Json: wire_cst_ElectrumError_Json, + Hex: wire_cst_ElectrumError_Hex, + Protocol: wire_cst_ElectrumError_Protocol, + Bitcoin: wire_cst_ElectrumError_Bitcoin, + InvalidResponse: wire_cst_ElectrumError_InvalidResponse, + Message: wire_cst_ElectrumError_Message, + InvalidDNSNameError: wire_cst_ElectrumError_InvalidDNSNameError, + SharedIOError: wire_cst_ElectrumError_SharedIOError, + CouldNotCreateConnection: wire_cst_ElectrumError_CouldNotCreateConnection, + nil__: (), } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_BdkError_InvalidOutpoint { - field0: *mut wire_cst_out_point, +pub struct wire_cst_ElectrumError_IOError { + error_message: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_BdkError_Encode { - field0: *mut wire_cst_list_prim_u_8_strict, +pub struct wire_cst_ElectrumError_Json { + error_message: *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, +pub struct wire_cst_ElectrumError_Hex { + error_message: *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, +pub struct wire_cst_ElectrumError_Protocol { + error_message: *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, +pub struct wire_cst_ElectrumError_Bitcoin { + error_message: *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, +pub struct wire_cst_ElectrumError_InvalidResponse { + error_message: *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, +pub struct wire_cst_ElectrumError_Message { + error_message: *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, +pub struct wire_cst_ElectrumError_InvalidDNSNameError { + domain: *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, +pub struct wire_cst_ElectrumError_SharedIOError { + error_message: *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, +pub struct wire_cst_ElectrumError_CouldNotCreateConnection { + error_message: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_BdkError_MissingCachedScripts { +pub struct wire_cst_esplora_client { 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, +pub struct wire_cst_esplora_error { + tag: i32, + kind: EsploraErrorKind, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_BdkError_InvalidInput { - field0: *mut wire_cst_list_prim_u_8_strict, +pub union EsploraErrorKind { + Minreq: wire_cst_EsploraError_Minreq, + HttpResponse: wire_cst_EsploraError_HttpResponse, + Parsing: wire_cst_EsploraError_Parsing, + StatusCode: wire_cst_EsploraError_StatusCode, + BitcoinEncoding: wire_cst_EsploraError_BitcoinEncoding, + HexToArray: wire_cst_EsploraError_HexToArray, + HexToBytes: wire_cst_EsploraError_HexToBytes, + HeaderHeightNotFound: wire_cst_EsploraError_HeaderHeightNotFound, + InvalidHttpHeaderName: wire_cst_EsploraError_InvalidHttpHeaderName, + InvalidHttpHeaderValue: wire_cst_EsploraError_InvalidHttpHeaderValue, + nil__: (), } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_BdkError_InvalidLockTime { - field0: *mut wire_cst_list_prim_u_8_strict, +pub struct wire_cst_EsploraError_Minreq { + error_message: *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, +pub struct wire_cst_EsploraError_HttpResponse { + status: u16, + error_message: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_bdk_mnemonic { - ptr: usize, +pub struct wire_cst_EsploraError_Parsing { + error_message: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_bdk_psbt { - ptr: usize, +pub struct wire_cst_EsploraError_StatusCode { + error_message: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_bdk_script_buf { - bytes: *mut wire_cst_list_prim_u_8_strict, +pub struct wire_cst_EsploraError_BitcoinEncoding { + error_message: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_bdk_transaction { - s: *mut wire_cst_list_prim_u_8_strict, +pub struct wire_cst_EsploraError_HexToArray { + error_message: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_bdk_wallet { - ptr: usize, +pub struct wire_cst_EsploraError_HexToBytes { + error_message: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_block_time { +pub struct wire_cst_EsploraError_HeaderHeightNotFound { 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, +pub struct wire_cst_EsploraError_InvalidHttpHeaderName { + name: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_BlockchainConfig_Rpc { - config: *mut wire_cst_rpc_config, +pub struct wire_cst_EsploraError_InvalidHttpHeaderValue { + value: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_consensus_error { +pub struct wire_cst_extract_tx_error { tag: i32, - kind: ConsensusErrorKind, + kind: ExtractTxErrorKind, } #[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, +pub union ExtractTxErrorKind { + AbsurdFeeRate: wire_cst_ExtractTxError_AbsurdFeeRate, 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__: (), +pub struct wire_cst_ExtractTxError_AbsurdFeeRate { + fee_rate: u64, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_DatabaseConfig_Sqlite { - config: *mut wire_cst_sqlite_db_configuration, +pub struct wire_cst_ffi_address { + field0: usize, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_DatabaseConfig_Sled { - config: *mut wire_cst_sled_db_configuration, +pub struct wire_cst_ffi_connection { + field0: usize, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_descriptor_error { - tag: i32, - kind: DescriptorErrorKind, +pub struct wire_cst_ffi_derivation_path { + ptr: usize, } #[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__: (), +pub struct wire_cst_ffi_descriptor { + extended_descriptor: usize, + key_map: usize, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_DescriptorError_Key { - field0: *mut wire_cst_list_prim_u_8_strict, +pub struct wire_cst_ffi_descriptor_public_key { + ptr: usize, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_DescriptorError_Policy { - field0: *mut wire_cst_list_prim_u_8_strict, +pub struct wire_cst_ffi_descriptor_secret_key { + ptr: usize, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_DescriptorError_InvalidDescriptorCharacter { - field0: u8, +pub struct wire_cst_ffi_full_scan_request { + field0: usize, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_DescriptorError_Bip32 { - field0: *mut wire_cst_list_prim_u_8_strict, +pub struct wire_cst_ffi_full_scan_request_builder { + field0: usize, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_DescriptorError_Base58 { - field0: *mut wire_cst_list_prim_u_8_strict, +pub struct wire_cst_ffi_mnemonic { + ptr: usize, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_DescriptorError_Pk { - field0: *mut wire_cst_list_prim_u_8_strict, +pub struct wire_cst_ffi_psbt { + ptr: usize, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_DescriptorError_Miniscript { - field0: *mut wire_cst_list_prim_u_8_strict, +pub struct wire_cst_ffi_script_buf { + bytes: *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, +pub struct wire_cst_ffi_sync_request { + field0: 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, - retry: u8, - timeout: *mut u8, - stop_gap: u64, - validate_domain: bool, +pub struct wire_cst_ffi_sync_request_builder { + field0: usize, } #[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, +pub struct wire_cst_ffi_transaction { + s: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_fee_rate { - sat_per_vb: f32, +pub struct wire_cst_ffi_wallet { + ptr: usize, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_hex_error { +pub struct wire_cst_from_script_error { tag: i32, - kind: HexErrorKind, + kind: FromScriptErrorKind, } #[repr(C)] #[derive(Clone, Copy)] -pub union HexErrorKind { - InvalidChar: wire_cst_HexError_InvalidChar, - OddLengthString: wire_cst_HexError_OddLengthString, - InvalidLength: wire_cst_HexError_InvalidLength, +pub union FromScriptErrorKind { + WitnessProgram: wire_cst_FromScriptError_WitnessProgram, + WitnessVersion: wire_cst_FromScriptError_WitnessVersion, 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, +pub struct wire_cst_FromScriptError_WitnessProgram { + error_message: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_input { - s: *mut wire_cst_list_prim_u_8_strict, +pub struct wire_cst_FromScriptError_WitnessVersion { + error_message: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] @@ -3795,18 +3304,6 @@ pub struct wire_cst_list_list_prim_u_8_strict { } #[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, @@ -3819,18 +3316,6 @@ pub struct wire_cst_list_prim_u_8_strict { } #[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, @@ -3843,14 +3328,6 @@ pub struct wire_cst_list_tx_out { } #[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, @@ -3880,135 +3357,162 @@ pub struct wire_cst_out_point { } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_payload { +pub struct wire_cst_psbt_error { tag: i32, - kind: PayloadKind, + kind: PsbtErrorKind, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union PsbtErrorKind { + InvalidKey: wire_cst_PsbtError_InvalidKey, + DuplicateKey: wire_cst_PsbtError_DuplicateKey, + NonStandardSighashType: wire_cst_PsbtError_NonStandardSighashType, + InvalidHash: wire_cst_PsbtError_InvalidHash, + CombineInconsistentKeySources: wire_cst_PsbtError_CombineInconsistentKeySources, + ConsensusEncoding: wire_cst_PsbtError_ConsensusEncoding, + InvalidPublicKey: wire_cst_PsbtError_InvalidPublicKey, + InvalidSecp256k1PublicKey: wire_cst_PsbtError_InvalidSecp256k1PublicKey, + InvalidEcdsaSignature: wire_cst_PsbtError_InvalidEcdsaSignature, + InvalidTaprootSignature: wire_cst_PsbtError_InvalidTaprootSignature, + TapTree: wire_cst_PsbtError_TapTree, + Version: wire_cst_PsbtError_Version, + Io: wire_cst_PsbtError_Io, + nil__: (), } #[repr(C)] #[derive(Clone, Copy)] -pub union PayloadKind { - PubkeyHash: wire_cst_Payload_PubkeyHash, - ScriptHash: wire_cst_Payload_ScriptHash, - WitnessProgram: wire_cst_Payload_WitnessProgram, - nil__: (), +pub struct wire_cst_PsbtError_InvalidKey { + key: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_Payload_PubkeyHash { - pubkey_hash: *mut wire_cst_list_prim_u_8_strict, +pub struct wire_cst_PsbtError_DuplicateKey { + key: *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, +pub struct wire_cst_PsbtError_NonStandardSighashType { + sighash: u32, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_Payload_WitnessProgram { - version: i32, - program: *mut wire_cst_list_prim_u_8_strict, +pub struct wire_cst_PsbtError_InvalidHash { + hash: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_psbt_sig_hash_type { - inner: u32, +pub struct wire_cst_PsbtError_CombineInconsistentKeySources { + xpub: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_rbf_value { - tag: i32, - kind: RbfValueKind, +pub struct wire_cst_PsbtError_ConsensusEncoding { + encoding_error: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] -pub union RbfValueKind { - Value: wire_cst_RbfValue_Value, - nil__: (), +pub struct wire_cst_PsbtError_InvalidPublicKey { + error_message: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_RbfValue_Value { - field0: u32, +pub struct wire_cst_PsbtError_InvalidSecp256k1PublicKey { + secp256k1_error: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_record_bdk_address_u_32 { - field0: wire_cst_bdk_address, - field1: u32, +pub struct wire_cst_PsbtError_InvalidEcdsaSignature { + error_message: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_record_bdk_psbt_transaction_details { - field0: wire_cst_bdk_psbt, - field1: wire_cst_transaction_details, +pub struct wire_cst_PsbtError_InvalidTaprootSignature { + error_message: *mut wire_cst_list_prim_u_8_strict, } #[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_PsbtError_TapTree { + error_message: *mut wire_cst_list_prim_u_8_strict, } #[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, +pub struct wire_cst_PsbtError_Version { + error_message: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_PsbtError_Io { + error_message: *mut wire_cst_list_prim_u_8_strict, } #[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, +pub struct wire_cst_psbt_parse_error { + tag: i32, + kind: PsbtParseErrorKind, } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_script_amount { - script: wire_cst_bdk_script_buf, - amount: u64, +pub union PsbtParseErrorKind { + PsbtEncoding: wire_cst_PsbtParseError_PsbtEncoding, + Base64Encoding: wire_cst_PsbtParseError_Base64Encoding, + nil__: (), } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_sign_options { - trust_witness_utxo: bool, - assume_height: *mut u32, - allow_all_sighashes: bool, - remove_partial_sigs: bool, - try_finalize: bool, - sign_with_tap_internal_key: bool, - allow_grinding: bool, +pub struct wire_cst_PsbtParseError_PsbtEncoding { + error_message: *mut wire_cst_list_prim_u_8_strict, } #[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, +pub struct wire_cst_PsbtParseError_Base64Encoding { + error_message: *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, +pub struct wire_cst_sqlite_error { + tag: i32, + kind: SqliteErrorKind, } #[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, +pub union SqliteErrorKind { + Sqlite: wire_cst_SqliteError_Sqlite, + nil__: (), +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_SqliteError_Sqlite { + rusqlite_error: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_transaction_error { + tag: i32, + kind: TransactionErrorKind, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union TransactionErrorKind { + InvalidChecksum: wire_cst_TransactionError_InvalidChecksum, + UnsupportedSegwitFlag: wire_cst_TransactionError_UnsupportedSegwitFlag, + nil__: (), +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_TransactionError_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_TransactionError_UnsupportedSegwitFlag { + flag: u8, } #[repr(C)] #[derive(Clone, Copy)] pub struct wire_cst_tx_in { previous_output: wire_cst_out_point, - script_sig: wire_cst_bdk_script_buf, + script_sig: wire_cst_ffi_script_buf, sequence: u32, witness: *mut wire_cst_list_list_prim_u_8_strict, } @@ -4016,5 +3520,10 @@ pub struct wire_cst_tx_in { #[derive(Clone, Copy)] pub struct wire_cst_tx_out { value: u64, - script_pubkey: wire_cst_bdk_script_buf, + script_pubkey: wire_cst_ffi_script_buf, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_update { + field0: usize, } diff --git a/rust/src/frb_generated.rs b/rust/src/frb_generated.rs index 032d2b13..05efe12f 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. +// @generated by `flutter_rust_bridge`@ 2.4.0. #![allow( non_camel_case_types, @@ -25,6 +25,10 @@ // Section: imports +use crate::api::electrum::*; +use crate::api::esplora::*; +use crate::api::store::*; +use crate::api::types::*; use crate::*; use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt}; use flutter_rust_bridge::for_generated::{transform_result_dco, Lifetimeable, Lockable}; @@ -37,8 +41,8 @@ flutter_rust_bridge::frb_generated_boilerplate!( default_rust_opaque = RustOpaqueNom, default_rust_auto_opaque = RustAutoOpaqueNom, ); -pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.0.0"; -pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = 1897842111; +pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.4.0"; +pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = 1560530746; // Section: executor @@ -46,392 +50,324 @@ flutter_rust_bridge::frb_generated_default_handler!(); // Section: wire_funcs -fn wire__crate__api__blockchain__bdk_blockchain_broadcast_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, - transaction: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( +fn wire__crate__api__bitcoin__ffi_address_as_string_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_blockchain_broadcast", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + debug_name: "ffi_address_as_string", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, }, move || { let api_that = that.cst_decode(); - let api_transaction = transaction.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::blockchain::BdkBlockchain::broadcast( - &api_that, - &api_transaction, - )?; - Ok(output_ok) - })()) - } + transform_result_dco::<_, _, ()>((move || { + let output_ok = + Result::<_, ()>::Ok(crate::api::bitcoin::FfiAddress::as_string(&api_that))?; + Ok(output_ok) + })()) }, ) } -fn wire__crate__api__blockchain__bdk_blockchain_create_impl( +fn wire__crate__api__bitcoin__ffi_address_from_script_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - blockchain_config: impl CstDecode, + script: impl CstDecode, + network: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_blockchain_create", + debug_name: "ffi_address_from_script", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_blockchain_config = blockchain_config.cst_decode(); + let api_script = script.cst_decode(); + let api_network = network.cst_decode(); move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + transform_result_dco::<_, _, crate::api::error::FromScriptError>((move || { let output_ok = - crate::api::blockchain::BdkBlockchain::create(api_blockchain_config)?; + crate::api::bitcoin::FfiAddress::from_script(api_script, api_network)?; Ok(output_ok) - })()) + })( + )) } }, ) } -fn wire__crate__api__blockchain__bdk_blockchain_estimate_fee_impl( +fn wire__crate__api__bitcoin__ffi_address_from_string_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, - target: impl CstDecode, + address: impl CstDecode, + network: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_blockchain_estimate_fee", + debug_name: "ffi_address_from_string", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_that = that.cst_decode(); - let api_target = target.cst_decode(); + let api_address = address.cst_decode(); + let api_network = network.cst_decode(); move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + transform_result_dco::<_, _, crate::api::error::AddressParseError>((move || { let output_ok = - crate::api::blockchain::BdkBlockchain::estimate_fee(&api_that, api_target)?; + crate::api::bitcoin::FfiAddress::from_string(api_address, api_network)?; Ok(output_ok) - })()) + })( + )) } }, ) } -fn wire__crate__api__blockchain__bdk_blockchain_get_block_hash_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, - height: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( +fn wire__crate__api__bitcoin__ffi_address_is_valid_for_network_impl( + that: impl CstDecode, + network: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_blockchain_get_block_hash", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + debug_name: "ffi_address_is_valid_for_network", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, }, move || { let api_that = that.cst_decode(); - let api_height = height.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::blockchain::BdkBlockchain::get_block_hash( - &api_that, api_height, - )?; - Ok(output_ok) - })()) - } + let api_network = network.cst_decode(); + transform_result_dco::<_, _, ()>((move || { + let output_ok = Result::<_, ()>::Ok( + crate::api::bitcoin::FfiAddress::is_valid_for_network(&api_that, api_network), + )?; + Ok(output_ok) + })()) }, ) } -fn wire__crate__api__blockchain__bdk_blockchain_get_height_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( +fn wire__crate__api__bitcoin__ffi_address_script_impl( + opaque: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_blockchain_get_height", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + debug_name: "ffi_address_script", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, }, move || { - let api_that = that.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::blockchain::BdkBlockchain::get_height(&api_that)?; - Ok(output_ok) - })()) - } + let api_opaque = opaque.cst_decode(); + transform_result_dco::<_, _, ()>((move || { + let output_ok = + Result::<_, ()>::Ok(crate::api::bitcoin::FfiAddress::script(api_opaque))?; + Ok(output_ok) + })()) }, ) } -fn wire__crate__api__descriptor__bdk_descriptor_as_string_impl( - that: impl CstDecode, +fn wire__crate__api__bitcoin__ffi_address_to_qr_uri_impl( + that: impl CstDecode, ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_as_string", + debug_name: "ffi_address_to_qr_uri", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, }, move || { let api_that = that.cst_decode(); transform_result_dco::<_, _, ()>((move || { - let output_ok = Result::<_, ()>::Ok( - crate::api::descriptor::BdkDescriptor::as_string(&api_that), - )?; + let output_ok = + Result::<_, ()>::Ok(crate::api::bitcoin::FfiAddress::to_qr_uri(&api_that))?; Ok(output_ok) })()) }, ) } -fn wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weight_impl( - that: impl CstDecode, +fn wire__crate__api__bitcoin__ffi_psbt_as_string_impl( + that: impl CstDecode, ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_max_satisfaction_weight", + debug_name: "ffi_psbt_as_string", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, }, move || { let api_that = that.cst_decode(); - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + transform_result_dco::<_, _, ()>((move || { let output_ok = - crate::api::descriptor::BdkDescriptor::max_satisfaction_weight(&api_that)?; + Result::<_, ()>::Ok(crate::api::bitcoin::FfiPsbt::as_string(&api_that))?; Ok(output_ok) })()) }, ) } -fn wire__crate__api__descriptor__bdk_descriptor_new_impl( +fn wire__crate__api__bitcoin__ffi_psbt_combine_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - descriptor: impl CstDecode, - network: impl CstDecode, + opaque: impl CstDecode, + other: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_new", + debug_name: "ffi_psbt_combine", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_descriptor = descriptor.cst_decode(); - let api_network = network.cst_decode(); + let api_opaque = opaque.cst_decode(); + let api_other = other.cst_decode(); move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = - crate::api::descriptor::BdkDescriptor::new(api_descriptor, api_network)?; + transform_result_dco::<_, _, crate::api::error::PsbtError>((move || { + let output_ok = crate::api::bitcoin::FfiPsbt::combine(api_opaque, api_other)?; Ok(output_ok) })()) } }, ) } -fn wire__crate__api__descriptor__bdk_descriptor_new_bip44_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - secret_key: impl CstDecode, - keychain_kind: impl CstDecode, - network: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( +fn wire__crate__api__bitcoin__ffi_psbt_extract_tx_impl( + opaque: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_new_bip44", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + debug_name: "ffi_psbt_extract_tx", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, }, move || { - let api_secret_key = secret_key.cst_decode(); - let api_keychain_kind = keychain_kind.cst_decode(); - let api_network = network.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::descriptor::BdkDescriptor::new_bip44( - api_secret_key, - api_keychain_kind, - api_network, - )?; - Ok(output_ok) - })()) - } + let api_opaque = opaque.cst_decode(); + transform_result_dco::<_, _, crate::api::error::ExtractTxError>((move || { + let output_ok = crate::api::bitcoin::FfiPsbt::extract_tx(api_opaque)?; + Ok(output_ok) + })()) }, ) } -fn wire__crate__api__descriptor__bdk_descriptor_new_bip44_public_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - public_key: impl CstDecode, - fingerprint: impl CstDecode, - keychain_kind: impl CstDecode, - network: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( +fn wire__crate__api__bitcoin__ffi_psbt_fee_amount_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_new_bip44_public", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + debug_name: "ffi_psbt_fee_amount", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, }, move || { - let api_public_key = public_key.cst_decode(); - let api_fingerprint = fingerprint.cst_decode(); - let api_keychain_kind = keychain_kind.cst_decode(); - let api_network = network.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::descriptor::BdkDescriptor::new_bip44_public( - api_public_key, - api_fingerprint, - api_keychain_kind, - api_network, - )?; - Ok(output_ok) - })()) - } + let api_that = that.cst_decode(); + transform_result_dco::<_, _, ()>((move || { + let output_ok = + Result::<_, ()>::Ok(crate::api::bitcoin::FfiPsbt::fee_amount(&api_that))?; + Ok(output_ok) + })()) }, ) } -fn wire__crate__api__descriptor__bdk_descriptor_new_bip49_impl( +fn wire__crate__api__bitcoin__ffi_psbt_from_str_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - secret_key: impl CstDecode, - keychain_kind: impl CstDecode, - network: impl CstDecode, + psbt_base64: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_new_bip49", + debug_name: "ffi_psbt_from_str", 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(); + let api_psbt_base64 = psbt_base64.cst_decode(); move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::descriptor::BdkDescriptor::new_bip49( - api_secret_key, - api_keychain_kind, - api_network, - )?; + transform_result_dco::<_, _, crate::api::error::PsbtParseError>((move || { + let output_ok = crate::api::bitcoin::FfiPsbt::from_str(api_psbt_base64)?; Ok(output_ok) - })()) + })( + )) } }, ) } -fn wire__crate__api__descriptor__bdk_descriptor_new_bip49_public_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - public_key: impl CstDecode, - fingerprint: impl CstDecode, - keychain_kind: impl CstDecode, - network: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( +fn wire__crate__api__bitcoin__ffi_psbt_json_serialize_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_new_bip49_public", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + debug_name: "ffi_psbt_json_serialize", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, }, move || { - let api_public_key = public_key.cst_decode(); - let api_fingerprint = fingerprint.cst_decode(); - let api_keychain_kind = keychain_kind.cst_decode(); - let api_network = network.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::descriptor::BdkDescriptor::new_bip49_public( - api_public_key, - api_fingerprint, - api_keychain_kind, - api_network, - )?; - Ok(output_ok) - })()) - } + let api_that = that.cst_decode(); + transform_result_dco::<_, _, crate::api::error::PsbtError>((move || { + let output_ok = crate::api::bitcoin::FfiPsbt::json_serialize(&api_that)?; + Ok(output_ok) + })()) }, ) } -fn wire__crate__api__descriptor__bdk_descriptor_new_bip84_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - secret_key: impl CstDecode, - keychain_kind: impl CstDecode, - network: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( +fn wire__crate__api__bitcoin__ffi_psbt_serialize_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_new_bip84", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + debug_name: "ffi_psbt_serialize", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, }, move || { - let api_secret_key = secret_key.cst_decode(); - let api_keychain_kind = keychain_kind.cst_decode(); - let api_network = network.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::descriptor::BdkDescriptor::new_bip84( - api_secret_key, - api_keychain_kind, - api_network, - )?; - Ok(output_ok) - })()) - } + let api_that = that.cst_decode(); + transform_result_dco::<_, _, ()>((move || { + let output_ok = + Result::<_, ()>::Ok(crate::api::bitcoin::FfiPsbt::serialize(&api_that))?; + Ok(output_ok) + })()) }, ) } -fn wire__crate__api__descriptor__bdk_descriptor_new_bip84_public_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - public_key: impl CstDecode, - fingerprint: impl CstDecode, - keychain_kind: impl CstDecode, - network: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( +fn wire__crate__api__bitcoin__ffi_script_buf_as_string_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_new_bip84_public", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + debug_name: "ffi_script_buf_as_string", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, }, move || { - let api_public_key = public_key.cst_decode(); - let api_fingerprint = fingerprint.cst_decode(); - let api_keychain_kind = keychain_kind.cst_decode(); - let api_network = network.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::descriptor::BdkDescriptor::new_bip84_public( - api_public_key, - api_fingerprint, - api_keychain_kind, - api_network, - )?; - Ok(output_ok) - })()) - } + let api_that = that.cst_decode(); + transform_result_dco::<_, _, ()>((move || { + let output_ok = + Result::<_, ()>::Ok(crate::api::bitcoin::FfiScriptBuf::as_string(&api_that))?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__bitcoin__ffi_script_buf_empty_impl( +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "ffi_script_buf_empty", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + transform_result_dco::<_, _, ()>((move || { + let output_ok = Result::<_, ()>::Ok(crate::api::bitcoin::FfiScriptBuf::empty())?; + Ok(output_ok) + })()) }, ) } -fn wire__crate__api__descriptor__bdk_descriptor_new_bip86_impl( +fn wire__crate__api__bitcoin__ffi_script_buf_with_capacity_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - secret_key: impl CstDecode, - keychain_kind: impl CstDecode, - network: impl CstDecode, + capacity: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_new_bip86", + debug_name: "ffi_script_buf_with_capacity", 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(); + let api_capacity = capacity.cst_decode(); move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::descriptor::BdkDescriptor::new_bip86( - api_secret_key, - api_keychain_kind, - api_network, + transform_result_dco::<_, _, ()>((move || { + let output_ok = Result::<_, ()>::Ok( + crate::api::bitcoin::FfiScriptBuf::with_capacity(api_capacity), )?; Ok(output_ok) })()) @@ -439,104 +375,94 @@ fn wire__crate__api__descriptor__bdk_descriptor_new_bip86_impl( }, ) } -fn wire__crate__api__descriptor__bdk_descriptor_new_bip86_public_impl( +fn wire__crate__api__bitcoin__ffi_transaction_compute_txid_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "ffi_transaction_compute_txid", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_that = that.cst_decode(); + transform_result_dco::<_, _, ()>((move || { + let output_ok = Result::<_, ()>::Ok( + crate::api::bitcoin::FfiTransaction::compute_txid(&api_that), + )?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__bitcoin__ffi_transaction_from_bytes_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - public_key: impl CstDecode, - fingerprint: impl CstDecode, - keychain_kind: impl CstDecode, - network: impl CstDecode, + transaction_bytes: impl CstDecode>, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_new_bip86_public", + debug_name: "ffi_transaction_from_bytes", 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(); + let api_transaction_bytes = transaction_bytes.cst_decode(); move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::descriptor::BdkDescriptor::new_bip86_public( - api_public_key, - api_fingerprint, - api_keychain_kind, - api_network, - )?; + transform_result_dco::<_, _, crate::api::error::TransactionError>((move || { + let output_ok = + crate::api::bitcoin::FfiTransaction::from_bytes(api_transaction_bytes)?; Ok(output_ok) - })()) + })( + )) } }, ) } -fn wire__crate__api__descriptor__bdk_descriptor_to_string_private_impl( - that: impl CstDecode, +fn wire__crate__api__bitcoin__ffi_transaction_input_impl( + that: impl CstDecode, ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_to_string_private", + debug_name: "ffi_transaction_input", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, }, move || { let api_that = that.cst_decode(); transform_result_dco::<_, _, ()>((move || { - let output_ok = Result::<_, ()>::Ok( - crate::api::descriptor::BdkDescriptor::to_string_private(&api_that), - )?; + let output_ok = + Result::<_, ()>::Ok(crate::api::bitcoin::FfiTransaction::input(&api_that))?; Ok(output_ok) })()) }, ) } -fn wire__crate__api__key__bdk_derivation_path_as_string_impl( - that: impl CstDecode, +fn wire__crate__api__bitcoin__ffi_transaction_is_coinbase_impl( + that: impl CstDecode, ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_derivation_path_as_string", + debug_name: "ffi_transaction_is_coinbase", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, }, move || { let api_that = that.cst_decode(); transform_result_dco::<_, _, ()>((move || { - let output_ok = - Result::<_, ()>::Ok(crate::api::key::BdkDerivationPath::as_string(&api_that))?; + let output_ok = Result::<_, ()>::Ok( + crate::api::bitcoin::FfiTransaction::is_coinbase(&api_that), + )?; Ok(output_ok) })()) }, ) } -fn wire__crate__api__key__bdk_derivation_path_from_string_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - path: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_derivation_path_from_string", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_path = path.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::key::BdkDerivationPath::from_string(api_path)?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__key__bdk_descriptor_public_key_as_string_impl( - that: impl CstDecode, +fn wire__crate__api__bitcoin__ffi_transaction_is_explicitly_rbf_impl( + that: impl CstDecode, ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_public_key_as_string", + debug_name: "ffi_transaction_is_explicitly_rbf", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, }, @@ -544,647 +470,749 @@ fn wire__crate__api__key__bdk_descriptor_public_key_as_string_impl( let api_that = that.cst_decode(); transform_result_dco::<_, _, ()>((move || { let output_ok = Result::<_, ()>::Ok( - crate::api::key::BdkDescriptorPublicKey::as_string(&api_that), + crate::api::bitcoin::FfiTransaction::is_explicitly_rbf(&api_that), )?; Ok(output_ok) })()) }, ) } -fn wire__crate__api__key__bdk_descriptor_public_key_derive_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: impl CstDecode, - path: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( +fn wire__crate__api__bitcoin__ffi_transaction_is_lock_time_enabled_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_public_key_derive", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + debug_name: "ffi_transaction_is_lock_time_enabled", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, }, move || { - let api_ptr = ptr.cst_decode(); - let api_path = path.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = - crate::api::key::BdkDescriptorPublicKey::derive(api_ptr, api_path)?; - Ok(output_ok) - })()) - } + let api_that = that.cst_decode(); + transform_result_dco::<_, _, ()>((move || { + let output_ok = Result::<_, ()>::Ok( + crate::api::bitcoin::FfiTransaction::is_lock_time_enabled(&api_that), + )?; + Ok(output_ok) + })()) }, ) } -fn wire__crate__api__key__bdk_descriptor_public_key_extend_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: impl CstDecode, - path: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( +fn wire__crate__api__bitcoin__ffi_transaction_lock_time_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_public_key_extend", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + debug_name: "ffi_transaction_lock_time", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, }, move || { - let api_ptr = ptr.cst_decode(); - let api_path = path.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = - crate::api::key::BdkDescriptorPublicKey::extend(api_ptr, api_path)?; - Ok(output_ok) - })()) - } + let api_that = that.cst_decode(); + transform_result_dco::<_, _, ()>((move || { + let output_ok = + Result::<_, ()>::Ok(crate::api::bitcoin::FfiTransaction::lock_time(&api_that))?; + Ok(output_ok) + })()) }, ) } -fn wire__crate__api__key__bdk_descriptor_public_key_from_string_impl( +fn wire__crate__api__bitcoin__ffi_transaction_new_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - public_key: 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: "bdk_descriptor_public_key_from_string", + debug_name: "ffi_transaction_new", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_public_key = public_key.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::<_, _, crate::api::error::BdkError>((move || { - let output_ok = - crate::api::key::BdkDescriptorPublicKey::from_string(api_public_key)?; + transform_result_dco::<_, _, crate::api::error::TransactionError>((move || { + let output_ok = crate::api::bitcoin::FfiTransaction::new( + api_version, + api_lock_time, + api_input, + api_output, + )?; Ok(output_ok) - })()) + })( + )) } }, ) } -fn wire__crate__api__key__bdk_descriptor_secret_key_as_public_impl( - ptr: impl CstDecode, +fn wire__crate__api__bitcoin__ffi_transaction_output_impl( + that: impl CstDecode, ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_secret_key_as_public", + debug_name: "ffi_transaction_output", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, }, move || { - let api_ptr = ptr.cst_decode(); - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::key::BdkDescriptorSecretKey::as_public(api_ptr)?; + let api_that = that.cst_decode(); + transform_result_dco::<_, _, ()>((move || { + let output_ok = + Result::<_, ()>::Ok(crate::api::bitcoin::FfiTransaction::output(&api_that))?; Ok(output_ok) })()) }, ) } -fn wire__crate__api__key__bdk_descriptor_secret_key_as_string_impl( - that: impl CstDecode, +fn wire__crate__api__bitcoin__ffi_transaction_serialize_impl( + that: impl CstDecode, ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_secret_key_as_string", + debug_name: "ffi_transaction_serialize", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, }, move || { let api_that = that.cst_decode(); transform_result_dco::<_, _, ()>((move || { - let output_ok = Result::<_, ()>::Ok( - crate::api::key::BdkDescriptorSecretKey::as_string(&api_that), - )?; + let output_ok = + Result::<_, ()>::Ok(crate::api::bitcoin::FfiTransaction::serialize(&api_that))?; Ok(output_ok) })()) }, ) } -fn wire__crate__api__key__bdk_descriptor_secret_key_create_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - network: impl CstDecode, - mnemonic: impl CstDecode, - password: impl CstDecode>, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_secret_key_create", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_network = network.cst_decode(); - let api_mnemonic = mnemonic.cst_decode(); - let api_password = password.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::key::BdkDescriptorSecretKey::create( - api_network, - api_mnemonic, - api_password, - )?; - Ok(output_ok) - })()) - } - }, - ) -} -fn wire__crate__api__key__bdk_descriptor_secret_key_derive_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: impl CstDecode, - path: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( +fn wire__crate__api__bitcoin__ffi_transaction_version_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_secret_key_derive", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + debug_name: "ffi_transaction_version", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, }, move || { - let api_ptr = ptr.cst_decode(); - let api_path = path.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = - crate::api::key::BdkDescriptorSecretKey::derive(api_ptr, api_path)?; - Ok(output_ok) - })()) - } + let api_that = that.cst_decode(); + transform_result_dco::<_, _, ()>((move || { + let output_ok = + Result::<_, ()>::Ok(crate::api::bitcoin::FfiTransaction::version(&api_that))?; + Ok(output_ok) + })()) }, ) } -fn wire__crate__api__key__bdk_descriptor_secret_key_extend_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: impl CstDecode, - path: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( +fn wire__crate__api__bitcoin__ffi_transaction_vsize_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_secret_key_extend", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + debug_name: "ffi_transaction_vsize", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, }, move || { - let api_ptr = ptr.cst_decode(); - let api_path = path.cst_decode(); - move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = - crate::api::key::BdkDescriptorSecretKey::extend(api_ptr, api_path)?; - Ok(output_ok) - })()) - } + let api_that = that.cst_decode(); + transform_result_dco::<_, _, ()>((move || { + let output_ok = + Result::<_, ()>::Ok(crate::api::bitcoin::FfiTransaction::vsize(&api_that))?; + Ok(output_ok) + })()) }, ) } -fn wire__crate__api__key__bdk_descriptor_secret_key_from_string_impl( +fn wire__crate__api__bitcoin__ffi_transaction_weight_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - secret_key: impl CstDecode, + that: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_secret_key_from_string", + debug_name: "ffi_transaction_weight", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_secret_key = secret_key.cst_decode(); + let api_that = that.cst_decode(); move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = - crate::api::key::BdkDescriptorSecretKey::from_string(api_secret_key)?; + transform_result_dco::<_, _, ()>((move || { + let output_ok = Result::<_, ()>::Ok( + crate::api::bitcoin::FfiTransaction::weight(&api_that), + )?; Ok(output_ok) })()) } }, ) } -fn wire__crate__api__key__bdk_descriptor_secret_key_secret_bytes_impl( - that: impl CstDecode, +fn wire__crate__api__descriptor__ffi_descriptor_as_string_impl( + that: impl CstDecode, ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_descriptor_secret_key_secret_bytes", + debug_name: "ffi_descriptor_as_string", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, }, move || { let api_that = that.cst_decode(); - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::key::BdkDescriptorSecretKey::secret_bytes(&api_that)?; + transform_result_dco::<_, _, ()>((move || { + let output_ok = Result::<_, ()>::Ok( + crate::api::descriptor::FfiDescriptor::as_string(&api_that), + )?; Ok(output_ok) })()) }, ) } -fn wire__crate__api__key__bdk_mnemonic_as_string_impl( - that: impl CstDecode, +fn wire__crate__api__descriptor__ffi_descriptor_max_satisfaction_weight_impl( + that: impl CstDecode, ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_mnemonic_as_string", + debug_name: "ffi_descriptor_max_satisfaction_weight", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, }, move || { let api_that = that.cst_decode(); - transform_result_dco::<_, _, ()>((move || { + transform_result_dco::<_, _, crate::api::error::DescriptorError>((move || { let output_ok = - Result::<_, ()>::Ok(crate::api::key::BdkMnemonic::as_string(&api_that))?; + crate::api::descriptor::FfiDescriptor::max_satisfaction_weight(&api_that)?; Ok(output_ok) })()) }, ) } -fn wire__crate__api__key__bdk_mnemonic_from_entropy_impl( +fn wire__crate__api__descriptor__ffi_descriptor_new_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - entropy: impl CstDecode>, + descriptor: impl CstDecode, + network: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_mnemonic_from_entropy", + debug_name: "ffi_descriptor_new", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_entropy = entropy.cst_decode(); + let api_descriptor = descriptor.cst_decode(); + let api_network = network.cst_decode(); move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::key::BdkMnemonic::from_entropy(api_entropy)?; + transform_result_dco::<_, _, crate::api::error::DescriptorError>((move || { + let output_ok = + crate::api::descriptor::FfiDescriptor::new(api_descriptor, api_network)?; Ok(output_ok) - })()) + })( + )) } }, ) } -fn wire__crate__api__key__bdk_mnemonic_from_string_impl( +fn wire__crate__api__descriptor__ffi_descriptor_new_bip44_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - mnemonic: 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: "bdk_mnemonic_from_string", + debug_name: "ffi_descriptor_new_bip44", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_mnemonic = mnemonic.cst_decode(); + let api_secret_key = secret_key.cst_decode(); + let api_keychain_kind = keychain_kind.cst_decode(); + let api_network = network.cst_decode(); move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::key::BdkMnemonic::from_string(api_mnemonic)?; + transform_result_dco::<_, _, crate::api::error::DescriptorError>((move || { + let output_ok = crate::api::descriptor::FfiDescriptor::new_bip44( + api_secret_key, + api_keychain_kind, + api_network, + )?; Ok(output_ok) - })()) + })( + )) } }, ) } -fn wire__crate__api__key__bdk_mnemonic_new_impl( +fn wire__crate__api__descriptor__ffi_descriptor_new_bip44_public_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - word_count: 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: "bdk_mnemonic_new", + debug_name: "ffi_descriptor_new_bip44_public", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_word_count = word_count.cst_decode(); + let api_public_key = public_key.cst_decode(); + let api_fingerprint = fingerprint.cst_decode(); + let api_keychain_kind = keychain_kind.cst_decode(); + let api_network = network.cst_decode(); move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::key::BdkMnemonic::new(api_word_count)?; + transform_result_dco::<_, _, crate::api::error::DescriptorError>((move || { + let output_ok = crate::api::descriptor::FfiDescriptor::new_bip44_public( + api_public_key, + api_fingerprint, + api_keychain_kind, + api_network, + )?; Ok(output_ok) - })()) + })( + )) } }, ) } -fn wire__crate__api__psbt__bdk_psbt_as_string_impl( - that: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_psbt_as_string", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, - }, - move || { - let api_that = that.cst_decode(); - transform_result_dco::<_, _, ()>((move || { - let output_ok = - Result::<_, ()>::Ok(crate::api::psbt::BdkPsbt::as_string(&api_that))?; - Ok(output_ok) - })()) - }, - ) -} -fn wire__crate__api__psbt__bdk_psbt_combine_impl( +fn wire__crate__api__descriptor__ffi_descriptor_new_bip49_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: impl CstDecode, - other: 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: "bdk_psbt_combine", + debug_name: "ffi_descriptor_new_bip49", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_ptr = ptr.cst_decode(); - let api_other = other.cst_decode(); + let api_secret_key = secret_key.cst_decode(); + let api_keychain_kind = keychain_kind.cst_decode(); + let api_network = network.cst_decode(); move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::psbt::BdkPsbt::combine(api_ptr, api_other)?; + transform_result_dco::<_, _, crate::api::error::DescriptorError>((move || { + let output_ok = crate::api::descriptor::FfiDescriptor::new_bip49( + api_secret_key, + api_keychain_kind, + api_network, + )?; Ok(output_ok) - })()) + })( + )) } }, ) } -fn wire__crate__api__psbt__bdk_psbt_extract_tx_impl( - ptr: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_psbt_extract_tx", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, +fn wire__crate__api__descriptor__ffi_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: "ffi_descriptor_new_bip49_public", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_ptr = ptr.cst_decode(); - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::psbt::BdkPsbt::extract_tx(api_ptr)?; - Ok(output_ok) - })()) + let api_public_key = public_key.cst_decode(); + let api_fingerprint = fingerprint.cst_decode(); + let api_keychain_kind = keychain_kind.cst_decode(); + let api_network = network.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::DescriptorError>((move || { + let output_ok = crate::api::descriptor::FfiDescriptor::new_bip49_public( + api_public_key, + api_fingerprint, + api_keychain_kind, + api_network, + )?; + Ok(output_ok) + })( + )) + } }, ) } -fn wire__crate__api__psbt__bdk_psbt_fee_amount_impl( - that: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( +fn wire__crate__api__descriptor__ffi_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_psbt_fee_amount", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + debug_name: "ffi_descriptor_new_bip84", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_that = that.cst_decode(); - transform_result_dco::<_, _, ()>((move || { - let output_ok = - Result::<_, ()>::Ok(crate::api::psbt::BdkPsbt::fee_amount(&api_that))?; - Ok(output_ok) - })()) + let api_secret_key = secret_key.cst_decode(); + let api_keychain_kind = keychain_kind.cst_decode(); + let api_network = network.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::DescriptorError>((move || { + let output_ok = crate::api::descriptor::FfiDescriptor::new_bip84( + api_secret_key, + api_keychain_kind, + api_network, + )?; + Ok(output_ok) + })( + )) + } }, ) } -fn wire__crate__api__psbt__bdk_psbt_fee_rate_impl( - that: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( +fn wire__crate__api__descriptor__ffi_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_psbt_fee_rate", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + debug_name: "ffi_descriptor_new_bip84_public", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_that = that.cst_decode(); - transform_result_dco::<_, _, ()>((move || { - let output_ok = - Result::<_, ()>::Ok(crate::api::psbt::BdkPsbt::fee_rate(&api_that))?; - Ok(output_ok) - })()) + let api_public_key = public_key.cst_decode(); + let api_fingerprint = fingerprint.cst_decode(); + let api_keychain_kind = keychain_kind.cst_decode(); + let api_network = network.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::DescriptorError>((move || { + let output_ok = crate::api::descriptor::FfiDescriptor::new_bip84_public( + api_public_key, + api_fingerprint, + api_keychain_kind, + api_network, + )?; + Ok(output_ok) + })( + )) + } }, ) } -fn wire__crate__api__psbt__bdk_psbt_from_str_impl( +fn wire__crate__api__descriptor__ffi_descriptor_new_bip86_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - psbt_base64: 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: "bdk_psbt_from_str", + debug_name: "ffi_descriptor_new_bip86", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_psbt_base64 = psbt_base64.cst_decode(); + let api_secret_key = secret_key.cst_decode(); + let api_keychain_kind = keychain_kind.cst_decode(); + let api_network = network.cst_decode(); move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::psbt::BdkPsbt::from_str(api_psbt_base64)?; + transform_result_dco::<_, _, crate::api::error::DescriptorError>((move || { + let output_ok = crate::api::descriptor::FfiDescriptor::new_bip86( + api_secret_key, + api_keychain_kind, + api_network, + )?; Ok(output_ok) - })()) + })( + )) } }, ) } -fn wire__crate__api__psbt__bdk_psbt_json_serialize_impl( - that: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( +fn wire__crate__api__descriptor__ffi_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_psbt_json_serialize", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + debug_name: "ffi_descriptor_new_bip86_public", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_that = that.cst_decode(); - transform_result_dco::<_, _, ()>((move || { - let output_ok = - Result::<_, ()>::Ok(crate::api::psbt::BdkPsbt::json_serialize(&api_that))?; - Ok(output_ok) - })()) + let api_public_key = public_key.cst_decode(); + let api_fingerprint = fingerprint.cst_decode(); + let api_keychain_kind = keychain_kind.cst_decode(); + let api_network = network.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::DescriptorError>((move || { + let output_ok = crate::api::descriptor::FfiDescriptor::new_bip86_public( + api_public_key, + api_fingerprint, + api_keychain_kind, + api_network, + )?; + Ok(output_ok) + })( + )) + } }, ) } -fn wire__crate__api__psbt__bdk_psbt_serialize_impl( - that: impl CstDecode, +fn wire__crate__api__descriptor__ffi_descriptor_to_string_with_secret_impl( + that: impl CstDecode, ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_psbt_serialize", + debug_name: "ffi_descriptor_to_string_with_secret", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, }, move || { let api_that = that.cst_decode(); transform_result_dco::<_, _, ()>((move || { - let output_ok = - Result::<_, ()>::Ok(crate::api::psbt::BdkPsbt::serialize(&api_that))?; + let output_ok = Result::<_, ()>::Ok( + crate::api::descriptor::FfiDescriptor::to_string_with_secret(&api_that), + )?; Ok(output_ok) })()) }, ) } -fn wire__crate__api__psbt__bdk_psbt_txid_impl( - that: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( +fn wire__crate__api__electrum__ffi_electrum_client_broadcast_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + opaque: impl CstDecode, + transaction: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_psbt_txid", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + debug_name: "ffi_electrum_client_broadcast", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_that = that.cst_decode(); - transform_result_dco::<_, _, ()>((move || { - let output_ok = Result::<_, ()>::Ok(crate::api::psbt::BdkPsbt::txid(&api_that))?; - Ok(output_ok) - })()) + let api_opaque = opaque.cst_decode(); + let api_transaction = transaction.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::ElectrumError>((move || { + let output_ok = crate::api::electrum::FfiElectrumClient::broadcast( + api_opaque, + &api_transaction, + )?; + Ok(output_ok) + })()) + } }, ) } -fn wire__crate__api__types__bdk_address_as_string_impl( - that: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( +fn wire__crate__api__electrum__ffi_electrum_client_full_scan_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + opaque: impl CstDecode, + request: impl CstDecode, + stop_gap: impl CstDecode, + batch_size: impl CstDecode, + fetch_prev_txouts: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_address_as_string", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + debug_name: "ffi_electrum_client_full_scan", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_that = that.cst_decode(); - transform_result_dco::<_, _, ()>((move || { - let output_ok = - Result::<_, ()>::Ok(crate::api::types::BdkAddress::as_string(&api_that))?; - Ok(output_ok) - })()) + let api_opaque = opaque.cst_decode(); + let api_request = request.cst_decode(); + let api_stop_gap = stop_gap.cst_decode(); + let api_batch_size = batch_size.cst_decode(); + let api_fetch_prev_txouts = fetch_prev_txouts.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::ElectrumError>((move || { + let output_ok = crate::api::electrum::FfiElectrumClient::full_scan( + api_opaque, + api_request, + api_stop_gap, + api_batch_size, + api_fetch_prev_txouts, + )?; + Ok(output_ok) + })()) + } }, ) } -fn wire__crate__api__types__bdk_address_from_script_impl( +fn wire__crate__api__electrum__ffi_electrum_client_new_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - script: impl CstDecode, - network: impl CstDecode, + url: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_address_from_script", + debug_name: "ffi_electrum_client_new", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_script = script.cst_decode(); - let api_network = network.cst_decode(); + let api_url = url.cst_decode(); move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = - crate::api::types::BdkAddress::from_script(api_script, api_network)?; + transform_result_dco::<_, _, crate::api::error::ElectrumError>((move || { + let output_ok = crate::api::electrum::FfiElectrumClient::new(api_url)?; Ok(output_ok) })()) } }, ) } -fn wire__crate__api__types__bdk_address_from_string_impl( +fn wire__crate__api__electrum__ffi_electrum_client_sync_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - address: impl CstDecode, - network: impl CstDecode, + opaque: impl CstDecode, + request: impl CstDecode, + batch_size: impl CstDecode, + fetch_prev_txouts: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_address_from_string", + debug_name: "ffi_electrum_client_sync", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_address = address.cst_decode(); - let api_network = network.cst_decode(); + let api_opaque = opaque.cst_decode(); + let api_request = request.cst_decode(); + let api_batch_size = batch_size.cst_decode(); + let api_fetch_prev_txouts = fetch_prev_txouts.cst_decode(); move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = - crate::api::types::BdkAddress::from_string(api_address, api_network)?; + transform_result_dco::<_, _, crate::api::error::ElectrumError>((move || { + let output_ok = crate::api::electrum::FfiElectrumClient::sync( + api_opaque, + api_request, + api_batch_size, + api_fetch_prev_txouts, + )?; Ok(output_ok) })()) } }, ) } -fn wire__crate__api__types__bdk_address_is_valid_for_network_impl( - that: impl CstDecode, - network: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( +fn wire__crate__api__esplora__ffi_esplora_client_broadcast_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + opaque: impl CstDecode, + transaction: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_address_is_valid_for_network", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + debug_name: "ffi_esplora_client_broadcast", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_that = that.cst_decode(); - let api_network = network.cst_decode(); - transform_result_dco::<_, _, ()>((move || { - let output_ok = Result::<_, ()>::Ok( - crate::api::types::BdkAddress::is_valid_for_network(&api_that, api_network), - )?; - Ok(output_ok) - })()) + let api_opaque = opaque.cst_decode(); + let api_transaction = transaction.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::EsploraError>((move || { + let output_ok = crate::api::esplora::FfiEsploraClient::broadcast( + api_opaque, + &api_transaction, + )?; + Ok(output_ok) + })()) + } }, ) } -fn wire__crate__api__types__bdk_address_network_impl( - that: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( +fn wire__crate__api__esplora__ffi_esplora_client_full_scan_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + opaque: impl CstDecode, + request: impl CstDecode, + stop_gap: impl CstDecode, + parallel_requests: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_address_network", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + debug_name: "ffi_esplora_client_full_scan", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_that = that.cst_decode(); - transform_result_dco::<_, _, ()>((move || { - let output_ok = - Result::<_, ()>::Ok(crate::api::types::BdkAddress::network(&api_that))?; - Ok(output_ok) - })()) + let api_opaque = opaque.cst_decode(); + let api_request = request.cst_decode(); + let api_stop_gap = stop_gap.cst_decode(); + let api_parallel_requests = parallel_requests.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::EsploraError>((move || { + let output_ok = crate::api::esplora::FfiEsploraClient::full_scan( + api_opaque, + api_request, + api_stop_gap, + api_parallel_requests, + )?; + Ok(output_ok) + })()) + } }, ) } -fn wire__crate__api__types__bdk_address_payload_impl( - that: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( +fn wire__crate__api__esplora__ffi_esplora_client_new_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + url: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_address_payload", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + debug_name: "ffi_esplora_client_new", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_that = that.cst_decode(); - transform_result_dco::<_, _, ()>((move || { - let output_ok = - Result::<_, ()>::Ok(crate::api::types::BdkAddress::payload(&api_that))?; - Ok(output_ok) - })()) + let api_url = url.cst_decode(); + move |context| { + transform_result_dco::<_, _, ()>((move || { + let output_ok = + Result::<_, ()>::Ok(crate::api::esplora::FfiEsploraClient::new(api_url))?; + Ok(output_ok) + })()) + } }, ) } -fn wire__crate__api__types__bdk_address_script_impl( - ptr: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( +fn wire__crate__api__esplora__ffi_esplora_client_sync_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + opaque: impl CstDecode, + request: impl CstDecode, + parallel_requests: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_address_script", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + debug_name: "ffi_esplora_client_sync", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_ptr = ptr.cst_decode(); - transform_result_dco::<_, _, ()>((move || { - let output_ok = - Result::<_, ()>::Ok(crate::api::types::BdkAddress::script(api_ptr))?; - Ok(output_ok) - })()) + let api_opaque = opaque.cst_decode(); + let api_request = request.cst_decode(); + let api_parallel_requests = parallel_requests.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::EsploraError>((move || { + let output_ok = crate::api::esplora::FfiEsploraClient::sync( + api_opaque, + api_request, + api_parallel_requests, + )?; + Ok(output_ok) + })()) + } }, ) } -fn wire__crate__api__types__bdk_address_to_qr_uri_impl( - that: impl CstDecode, +fn wire__crate__api__key__ffi_derivation_path_as_string_impl( + that: impl CstDecode, ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_address_to_qr_uri", + debug_name: "ffi_derivation_path_as_string", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, }, @@ -1192,581 +1220,828 @@ fn wire__crate__api__types__bdk_address_to_qr_uri_impl( let api_that = that.cst_decode(); transform_result_dco::<_, _, ()>((move || { let output_ok = - Result::<_, ()>::Ok(crate::api::types::BdkAddress::to_qr_uri(&api_that))?; + Result::<_, ()>::Ok(crate::api::key::FfiDerivationPath::as_string(&api_that))?; Ok(output_ok) })()) }, ) } -fn wire__crate__api__types__bdk_script_buf_as_string_impl( - that: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( +fn wire__crate__api__key__ffi_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_script_buf_as_string", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + debug_name: "ffi_derivation_path_from_string", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_that = that.cst_decode(); - transform_result_dco::<_, _, ()>((move || { - let output_ok = - Result::<_, ()>::Ok(crate::api::types::BdkScriptBuf::as_string(&api_that))?; - Ok(output_ok) - })()) + let api_path = path.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::Bip32Error>((move || { + let output_ok = crate::api::key::FfiDerivationPath::from_string(api_path)?; + Ok(output_ok) + })()) + } }, ) } -fn wire__crate__api__types__bdk_script_buf_empty_impl( +fn wire__crate__api__key__ffi_descriptor_public_key_as_string_impl( + that: impl CstDecode, ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_script_buf_empty", + debug_name: "ffi_descriptor_public_key_as_string", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, }, move || { + let api_that = that.cst_decode(); transform_result_dco::<_, _, ()>((move || { - let output_ok = Result::<_, ()>::Ok(crate::api::types::BdkScriptBuf::empty())?; + let output_ok = Result::<_, ()>::Ok( + crate::api::key::FfiDescriptorPublicKey::as_string(&api_that), + )?; Ok(output_ok) })()) }, ) } -fn wire__crate__api__types__bdk_script_buf_from_hex_impl( +fn wire__crate__api__key__ffi_descriptor_public_key_derive_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - s: impl CstDecode, + opaque: impl CstDecode, + path: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_script_buf_from_hex", + debug_name: "ffi_descriptor_public_key_derive", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_s = s.cst_decode(); + let api_opaque = opaque.cst_decode(); + let api_path = path.cst_decode(); move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::types::BdkScriptBuf::from_hex(api_s)?; + transform_result_dco::<_, _, crate::api::error::DescriptorKeyError>((move || { + let output_ok = + crate::api::key::FfiDescriptorPublicKey::derive(api_opaque, api_path)?; Ok(output_ok) - })()) + })( + )) } }, ) } -fn wire__crate__api__types__bdk_script_buf_with_capacity_impl( +fn wire__crate__api__key__ffi_descriptor_public_key_extend_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - capacity: impl CstDecode, + opaque: impl CstDecode, + path: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_script_buf_with_capacity", + debug_name: "ffi_descriptor_public_key_extend", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_capacity = capacity.cst_decode(); + let api_opaque = opaque.cst_decode(); + let api_path = path.cst_decode(); move |context| { - transform_result_dco::<_, _, ()>((move || { - let output_ok = Result::<_, ()>::Ok( - crate::api::types::BdkScriptBuf::with_capacity(api_capacity), - )?; + transform_result_dco::<_, _, crate::api::error::DescriptorKeyError>((move || { + let output_ok = + crate::api::key::FfiDescriptorPublicKey::extend(api_opaque, api_path)?; Ok(output_ok) - })()) + })( + )) } }, ) } -fn wire__crate__api__types__bdk_transaction_from_bytes_impl( +fn wire__crate__api__key__ffi_descriptor_public_key_from_string_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - transaction_bytes: impl CstDecode>, + public_key: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_transaction_from_bytes", + debug_name: "ffi_descriptor_public_key_from_string", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_transaction_bytes = transaction_bytes.cst_decode(); + let api_public_key = public_key.cst_decode(); move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + transform_result_dco::<_, _, crate::api::error::DescriptorKeyError>((move || { let output_ok = - crate::api::types::BdkTransaction::from_bytes(api_transaction_bytes)?; + crate::api::key::FfiDescriptorPublicKey::from_string(api_public_key)?; Ok(output_ok) - })()) + })( + )) } }, ) } -fn wire__crate__api__types__bdk_transaction_input_impl( +fn wire__crate__api__key__ffi_descriptor_secret_key_as_public_impl( + opaque: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "ffi_descriptor_secret_key_as_public", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_opaque = opaque.cst_decode(); + transform_result_dco::<_, _, crate::api::error::DescriptorKeyError>((move || { + let output_ok = crate::api::key::FfiDescriptorSecretKey::as_public(api_opaque)?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__key__ffi_descriptor_secret_key_as_string_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "ffi_descriptor_secret_key_as_string", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_that = that.cst_decode(); + transform_result_dco::<_, _, ()>((move || { + let output_ok = Result::<_, ()>::Ok( + crate::api::key::FfiDescriptorSecretKey::as_string(&api_that), + )?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__key__ffi_descriptor_secret_key_create_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + network: impl CstDecode, + mnemonic: impl CstDecode, + password: impl CstDecode>, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_transaction_input", + debug_name: "ffi_descriptor_secret_key_create", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_that = that.cst_decode(); + let api_network = network.cst_decode(); + let api_mnemonic = mnemonic.cst_decode(); + let api_password = password.cst_decode(); move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::types::BdkTransaction::input(&api_that)?; + transform_result_dco::<_, _, crate::api::error::DescriptorError>((move || { + let output_ok = crate::api::key::FfiDescriptorSecretKey::create( + api_network, + api_mnemonic, + api_password, + )?; Ok(output_ok) - })()) + })( + )) } }, ) } -fn wire__crate__api__types__bdk_transaction_is_coin_base_impl( +fn wire__crate__api__key__ffi_descriptor_secret_key_derive_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + opaque: impl CstDecode, + path: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_transaction_is_coin_base", + debug_name: "ffi_descriptor_secret_key_derive", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_that = that.cst_decode(); + let api_opaque = opaque.cst_decode(); + let api_path = path.cst_decode(); move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::types::BdkTransaction::is_coin_base(&api_that)?; + transform_result_dco::<_, _, crate::api::error::DescriptorKeyError>((move || { + let output_ok = + crate::api::key::FfiDescriptorSecretKey::derive(api_opaque, api_path)?; Ok(output_ok) - })()) + })( + )) } }, ) } -fn wire__crate__api__types__bdk_transaction_is_explicitly_rbf_impl( +fn wire__crate__api__key__ffi_descriptor_secret_key_extend_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + opaque: impl CstDecode, + path: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_transaction_is_explicitly_rbf", + debug_name: "ffi_descriptor_secret_key_extend", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_that = that.cst_decode(); + let api_opaque = opaque.cst_decode(); + let api_path = path.cst_decode(); move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + transform_result_dco::<_, _, crate::api::error::DescriptorKeyError>((move || { let output_ok = - crate::api::types::BdkTransaction::is_explicitly_rbf(&api_that)?; + crate::api::key::FfiDescriptorSecretKey::extend(api_opaque, api_path)?; Ok(output_ok) - })()) + })( + )) } }, ) } -fn wire__crate__api__types__bdk_transaction_is_lock_time_enabled_impl( +fn wire__crate__api__key__ffi_descriptor_secret_key_from_string_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + secret_key: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_transaction_is_lock_time_enabled", + debug_name: "ffi_descriptor_secret_key_from_string", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_that = that.cst_decode(); + let api_secret_key = secret_key.cst_decode(); move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + transform_result_dco::<_, _, crate::api::error::DescriptorKeyError>((move || { let output_ok = - crate::api::types::BdkTransaction::is_lock_time_enabled(&api_that)?; + crate::api::key::FfiDescriptorSecretKey::from_string(api_secret_key)?; Ok(output_ok) - })()) + })( + )) } }, ) } -fn wire__crate__api__types__bdk_transaction_lock_time_impl( +fn wire__crate__api__key__ffi_descriptor_secret_key_secret_bytes_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "ffi_descriptor_secret_key_secret_bytes", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_that = that.cst_decode(); + transform_result_dco::<_, _, crate::api::error::DescriptorKeyError>((move || { + let output_ok = crate::api::key::FfiDescriptorSecretKey::secret_bytes(&api_that)?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__key__ffi_mnemonic_as_string_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "ffi_mnemonic_as_string", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_that = that.cst_decode(); + transform_result_dco::<_, _, ()>((move || { + let output_ok = + Result::<_, ()>::Ok(crate::api::key::FfiMnemonic::as_string(&api_that))?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__key__ffi_mnemonic_from_entropy_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + entropy: impl CstDecode>, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_transaction_lock_time", + debug_name: "ffi_mnemonic_from_entropy", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_that = that.cst_decode(); + let api_entropy = entropy.cst_decode(); move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::types::BdkTransaction::lock_time(&api_that)?; + transform_result_dco::<_, _, crate::api::error::Bip39Error>((move || { + let output_ok = crate::api::key::FfiMnemonic::from_entropy(api_entropy)?; Ok(output_ok) })()) } }, ) } -fn wire__crate__api__types__bdk_transaction_new_impl( +fn wire__crate__api__key__ffi_mnemonic_from_string_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - version: impl CstDecode, - lock_time: impl CstDecode, - input: impl CstDecode>, - output: impl CstDecode>, + mnemonic: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_transaction_new", + debug_name: "ffi_mnemonic_from_string", 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(); + let api_mnemonic = mnemonic.cst_decode(); move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::types::BdkTransaction::new( - api_version, - api_lock_time, - api_input, - api_output, - )?; + transform_result_dco::<_, _, crate::api::error::Bip39Error>((move || { + let output_ok = crate::api::key::FfiMnemonic::from_string(api_mnemonic)?; Ok(output_ok) })()) } }, ) } -fn wire__crate__api__types__bdk_transaction_output_impl( +fn wire__crate__api__key__ffi_mnemonic_new_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + word_count: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_transaction_output", + debug_name: "ffi_mnemonic_new", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_that = that.cst_decode(); + let api_word_count = word_count.cst_decode(); move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::types::BdkTransaction::output(&api_that)?; + transform_result_dco::<_, _, crate::api::error::Bip39Error>((move || { + let output_ok = crate::api::key::FfiMnemonic::new(api_word_count)?; Ok(output_ok) })()) } }, ) } -fn wire__crate__api__types__bdk_transaction_serialize_impl( +fn wire__crate__api__store__ffi_connection_new_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + path: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_transaction_serialize", + debug_name: "ffi_connection_new", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_that = that.cst_decode(); + let api_path = path.cst_decode(); move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::types::BdkTransaction::serialize(&api_that)?; + transform_result_dco::<_, _, crate::api::error::SqliteError>((move || { + let output_ok = crate::api::store::FfiConnection::new(api_path)?; Ok(output_ok) })()) } }, ) } -fn wire__crate__api__types__bdk_transaction_size_impl( +fn wire__crate__api__store__ffi_connection_new_in_memory_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", + debug_name: "ffi_connection_new_in_memory", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_that = that.cst_decode(); move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::types::BdkTransaction::size(&api_that)?; + transform_result_dco::<_, _, crate::api::error::SqliteError>((move || { + let output_ok = crate::api::store::FfiConnection::new_in_memory()?; Ok(output_ok) })()) } }, ) } -fn wire__crate__api__types__bdk_transaction_txid_impl( +fn wire__crate__api__tx_builder__finish_bump_fee_tx_builder_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + txid: impl CstDecode, + fee_rate: 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: "bdk_transaction_txid", + debug_name: "finish_bump_fee_tx_builder", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_that = that.cst_decode(); + let api_txid = txid.cst_decode(); + let api_fee_rate = fee_rate.cst_decode(); + let api_wallet = wallet.cst_decode(); + let api_enable_rbf = enable_rbf.cst_decode(); + let api_n_sequence = n_sequence.cst_decode(); move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::types::BdkTransaction::txid(&api_that)?; + transform_result_dco::<_, _, crate::api::error::CreateTxError>((move || { + let output_ok = crate::api::tx_builder::finish_bump_fee_tx_builder( + api_txid, + api_fee_rate, + api_wallet, + api_enable_rbf, + api_n_sequence, + )?; Ok(output_ok) })()) } }, ) } -fn wire__crate__api__types__bdk_transaction_version_impl( +fn wire__crate__api__tx_builder__tx_builder_finish_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - that: impl CstDecode, + wallet: impl CstDecode, + recipients: impl CstDecode>, + utxos: 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, + policy_path: impl CstDecode< + Option<( + std::collections::HashMap>, + crate::api::types::KeychainKind, + )>, + >, + drain_to: impl CstDecode>, + rbf: impl CstDecode>, + data: impl CstDecode>, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_transaction_version", + debug_name: "tx_builder_finish", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_that = that.cst_decode(); + let api_wallet = wallet.cst_decode(); + let api_recipients = recipients.cst_decode(); + let api_utxos = utxos.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_policy_path = policy_path.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::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::types::BdkTransaction::version(&api_that)?; + transform_result_dco::<_, _, crate::api::error::CreateTxError>((move || { + let output_ok = crate::api::tx_builder::tx_builder_finish( + api_wallet, + api_recipients, + api_utxos, + api_un_spendable, + api_change_policy, + api_manually_selected_only, + api_fee_rate, + api_fee_absolute, + api_drain_wallet, + api_policy_path, + api_drain_to, + api_rbf, + api_data, + )?; Ok(output_ok) })()) } }, ) } -fn wire__crate__api__types__bdk_transaction_vsize_impl( +fn wire__crate__api__types__change_spend_policy_default_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", + debug_name: "change_spend_policy_default", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_that = that.cst_decode(); move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::types::BdkTransaction::vsize(&api_that)?; + transform_result_dco::<_, _, ()>((move || { + let output_ok = + Result::<_, ()>::Ok(crate::api::types::ChangeSpendPolicy::default())?; Ok(output_ok) })()) } }, ) } -fn wire__crate__api__types__bdk_transaction_weight_impl( +fn wire__crate__api__types__ffi_full_scan_request_builder_build_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: "bdk_transaction_weight", + debug_name: "ffi_full_scan_request_builder_build", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { let api_that = that.cst_decode(); move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::types::BdkTransaction::weight(&api_that)?; + transform_result_dco::<_, _, crate::api::error::RequestBuilderError>((move || { + let output_ok = crate::api::types::FfiFullScanRequestBuilder::build(&api_that)?; Ok(output_ok) - })()) + })( + )) } }, ) } -fn wire__crate__api__wallet__bdk_wallet_get_address_impl( - ptr: impl CstDecode, - address_index: impl CstDecode, +fn wire__crate__api__types__ffi_full_scan_request_builder_inspect_spks_for_all_keychains_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode, + inspector: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "ffi_full_scan_request_builder_inspect_spks_for_all_keychains", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_inspector = decode_DartFn_Inputs_keychain_kind_u_32_ffi_script_buf_Output_unit_AnyhowException(inspector.cst_decode()); move |context| { + transform_result_dco::<_, _, crate::api::error::RequestBuilderError>((move || { + let output_ok = crate::api::types::FfiFullScanRequestBuilder::inspect_spks_for_all_keychains(&api_that, api_inspector)?; Ok(output_ok) + })()) + } }) +} +fn wire__crate__api__types__ffi_policy_id_impl( + that: impl CstDecode, ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_wallet_get_address", + debug_name: "ffi_policy_id", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, }, move || { - let api_ptr = ptr.cst_decode(); - let api_address_index = address_index.cst_decode(); - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = - crate::api::wallet::BdkWallet::get_address(api_ptr, api_address_index)?; + let api_that = that.cst_decode(); + transform_result_dco::<_, _, ()>((move || { + let output_ok = Result::<_, ()>::Ok(crate::api::types::FfiPolicy::id(&api_that))?; Ok(output_ok) })()) }, ) } -fn wire__crate__api__wallet__bdk_wallet_get_balance_impl( - that: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( +fn wire__crate__api__types__ffi_sync_request_builder_build_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: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + debug_name: "ffi_sync_request_builder_build", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { let api_that = that.cst_decode(); - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::wallet::BdkWallet::get_balance(&api_that)?; - Ok(output_ok) - })()) + move |context| { + transform_result_dco::<_, _, crate::api::error::RequestBuilderError>((move || { + let output_ok = crate::api::types::FfiSyncRequestBuilder::build(&api_that)?; + Ok(output_ok) + })( + )) + } }, ) } -fn wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychain_impl( - ptr: impl CstDecode, - keychain: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( +fn wire__crate__api__types__ffi_sync_request_builder_inspect_spks_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode, + inspector: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_wallet_get_descriptor_for_keychain", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + debug_name: "ffi_sync_request_builder_inspect_spks", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_ptr = ptr.cst_decode(); - let api_keychain = keychain.cst_decode(); - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::wallet::BdkWallet::get_descriptor_for_keychain( - api_ptr, - api_keychain, - )?; - Ok(output_ok) - })()) + let api_that = that.cst_decode(); + let api_inspector = + decode_DartFn_Inputs_ffi_script_buf_sync_progress_Output_unit_AnyhowException( + inspector.cst_decode(), + ); + move |context| { + transform_result_dco::<_, _, crate::api::error::RequestBuilderError>((move || { + let output_ok = crate::api::types::FfiSyncRequestBuilder::inspect_spks( + &api_that, + api_inspector, + )?; + Ok(output_ok) + })( + )) + } }, ) } -fn wire__crate__api__wallet__bdk_wallet_get_internal_address_impl( - ptr: impl CstDecode, - address_index: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( +fn wire__crate__api__types__network_default_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_wallet_get_internal_address", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + debug_name: "network_default", + 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(); - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::wallet::BdkWallet::get_internal_address( - api_ptr, - api_address_index, - )?; - Ok(output_ok) - })()) + move |context| { + transform_result_dco::<_, _, ()>((move || { + let output_ok = Result::<_, ()>::Ok(crate::api::types::Network::default())?; + Ok(output_ok) + })()) + } }, ) } -fn wire__crate__api__wallet__bdk_wallet_get_psbt_input_impl( +fn wire__crate__api__types__sign_options_default_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", + debug_name: "sign_options_default", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_that = that.cst_decode(); - let api_utxo = utxo.cst_decode(); - let api_only_witness_utxo = only_witness_utxo.cst_decode(); - let api_sighash_type = sighash_type.cst_decode(); move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::wallet::BdkWallet::get_psbt_input( - &api_that, - api_utxo, - api_only_witness_utxo, - api_sighash_type, - )?; + transform_result_dco::<_, _, ()>((move || { + let output_ok = Result::<_, ()>::Ok(crate::api::types::SignOptions::default())?; Ok(output_ok) })()) } }, ) } -fn wire__crate__api__wallet__bdk_wallet_is_mine_impl( - that: impl CstDecode, - script: impl CstDecode, -) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( +fn wire__crate__api__wallet__ffi_wallet_apply_update_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode, + update: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_wallet_is_mine", - port: None, - mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + debug_name: "ffi_wallet_apply_update", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { let api_that = that.cst_decode(); - let api_script = script.cst_decode(); - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::wallet::BdkWallet::is_mine(&api_that, api_script)?; + let api_update = update.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::CannotConnectError>((move || { + let output_ok = + crate::api::wallet::FfiWallet::apply_update(&api_that, api_update)?; + Ok(output_ok) + })( + )) + } + }, + ) +} +fn wire__crate__api__wallet__ffi_wallet_calculate_fee_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + opaque: impl CstDecode, + tx: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "ffi_wallet_calculate_fee", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_opaque = opaque.cst_decode(); + let api_tx = tx.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::CalculateFeeError>((move || { + let output_ok = + crate::api::wallet::FfiWallet::calculate_fee(&api_opaque, api_tx)?; + Ok(output_ok) + })( + )) + } + }, + ) +} +fn wire__crate__api__wallet__ffi_wallet_calculate_fee_rate_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + opaque: impl CstDecode, + tx: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "ffi_wallet_calculate_fee_rate", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_opaque = opaque.cst_decode(); + let api_tx = tx.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::CalculateFeeError>((move || { + let output_ok = + crate::api::wallet::FfiWallet::calculate_fee_rate(&api_opaque, api_tx)?; + Ok(output_ok) + })( + )) + } + }, + ) +} +fn wire__crate__api__wallet__ffi_wallet_get_balance_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "ffi_wallet_get_balance", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_that = that.cst_decode(); + transform_result_dco::<_, _, ()>((move || { + let output_ok = + Result::<_, ()>::Ok(crate::api::wallet::FfiWallet::get_balance(&api_that))?; Ok(output_ok) })()) }, ) } -fn wire__crate__api__wallet__bdk_wallet_list_transactions_impl( - that: impl CstDecode, - include_raw: impl CstDecode, +fn wire__crate__api__wallet__ffi_wallet_get_tx_impl( + that: impl CstDecode, + txid: impl CstDecode, ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_wallet_list_transactions", + debug_name: "ffi_wallet_get_tx", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, }, move || { let api_that = that.cst_decode(); - let api_include_raw = include_raw.cst_decode(); - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = - crate::api::wallet::BdkWallet::list_transactions(&api_that, api_include_raw)?; + let api_txid = txid.cst_decode(); + transform_result_dco::<_, _, crate::api::error::TxidParseError>((move || { + let output_ok = crate::api::wallet::FfiWallet::get_tx(&api_that, api_txid)?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__wallet__ffi_wallet_is_mine_impl( + that: impl CstDecode, + script: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "ffi_wallet_is_mine", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_that = that.cst_decode(); + let api_script = script.cst_decode(); + transform_result_dco::<_, _, ()>((move || { + let output_ok = Result::<_, ()>::Ok(crate::api::wallet::FfiWallet::is_mine( + &api_that, api_script, + ))?; Ok(output_ok) })()) }, ) } -fn wire__crate__api__wallet__bdk_wallet_list_unspent_impl( - that: impl CstDecode, +fn wire__crate__api__wallet__ffi_wallet_list_output_impl( + that: impl CstDecode, ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_wallet_list_unspent", + debug_name: "ffi_wallet_list_output", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, }, move || { let api_that = that.cst_decode(); - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::wallet::BdkWallet::list_unspent(&api_that)?; + transform_result_dco::<_, _, ()>((move || { + let output_ok = + Result::<_, ()>::Ok(crate::api::wallet::FfiWallet::list_output(&api_that))?; Ok(output_ok) })()) }, ) } -fn wire__crate__api__wallet__bdk_wallet_network_impl( - that: impl CstDecode, +fn wire__crate__api__wallet__ffi_wallet_list_unspent_impl( + that: impl CstDecode, ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_wallet_network", + debug_name: "ffi_wallet_list_unspent", port: None, mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, }, @@ -1774,124 +2049,209 @@ fn wire__crate__api__wallet__bdk_wallet_network_impl( let api_that = that.cst_decode(); transform_result_dco::<_, _, ()>((move || { let output_ok = - Result::<_, ()>::Ok(crate::api::wallet::BdkWallet::network(&api_that))?; + Result::<_, ()>::Ok(crate::api::wallet::FfiWallet::list_unspent(&api_that))?; Ok(output_ok) })()) }, ) } -fn wire__crate__api__wallet__bdk_wallet_new_impl( +fn wire__crate__api__wallet__ffi_wallet_load_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - descriptor: impl CstDecode, - change_descriptor: impl CstDecode>, - network: impl CstDecode, - database_config: impl CstDecode, + descriptor: impl CstDecode, + change_descriptor: impl CstDecode, + connection: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_wallet_new", + debug_name: "ffi_wallet_load", 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(); + let api_connection = connection.cst_decode(); move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::wallet::BdkWallet::new( + transform_result_dco::<_, _, crate::api::error::LoadWithPersistError>((move || { + let output_ok = crate::api::wallet::FfiWallet::load( api_descriptor, api_change_descriptor, - api_network, - api_database_config, + api_connection, )?; Ok(output_ok) - })()) + })( + )) } }, ) } -fn wire__crate__api__wallet__bdk_wallet_sign_impl( +fn wire__crate__api__wallet__ffi_wallet_network_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "ffi_wallet_network", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_that = that.cst_decode(); + transform_result_dco::<_, _, ()>((move || { + let output_ok = + Result::<_, ()>::Ok(crate::api::wallet::FfiWallet::network(&api_that))?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__wallet__ffi_wallet_new_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: impl CstDecode, - psbt: impl CstDecode, - sign_options: impl CstDecode>, + descriptor: impl CstDecode, + change_descriptor: impl CstDecode, + network: impl CstDecode, + connection: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "bdk_wallet_sign", + debug_name: "ffi_wallet_new", 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(); + let api_descriptor = descriptor.cst_decode(); + let api_change_descriptor = change_descriptor.cst_decode(); + let api_network = network.cst_decode(); + let api_connection = connection.cst_decode(); + move |context| { + transform_result_dco::<_, _, crate::api::error::CreateWithPersistError>( + (move || { + let output_ok = crate::api::wallet::FfiWallet::new( + api_descriptor, + api_change_descriptor, + api_network, + api_connection, + )?; + Ok(output_ok) + })(), + ) + } + }, + ) +} +fn wire__crate__api__wallet__ffi_wallet_persist_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + opaque: impl CstDecode, + connection: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "ffi_wallet_persist", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_opaque = opaque.cst_decode(); + let api_connection = connection.cst_decode(); move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { + transform_result_dco::<_, _, crate::api::error::SqliteError>((move || { let output_ok = - crate::api::wallet::BdkWallet::sign(api_ptr, api_psbt, api_sign_options)?; + crate::api::wallet::FfiWallet::persist(&api_opaque, api_connection)?; Ok(output_ok) })()) } }, ) } -fn wire__crate__api__wallet__bdk_wallet_sync_impl( +fn wire__crate__api__wallet__ffi_wallet_policies_impl( + opaque: impl CstDecode, + keychain_kind: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "ffi_wallet_policies", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_opaque = opaque.cst_decode(); + let api_keychain_kind = keychain_kind.cst_decode(); + transform_result_dco::<_, _, crate::api::error::DescriptorError>((move || { + let output_ok = + crate::api::wallet::FfiWallet::policies(api_opaque, api_keychain_kind)?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__wallet__ffi_wallet_reveal_next_address_impl( + opaque: impl CstDecode, + keychain_kind: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "ffi_wallet_reveal_next_address", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_opaque = opaque.cst_decode(); + let api_keychain_kind = keychain_kind.cst_decode(); + transform_result_dco::<_, _, ()>((move || { + let output_ok = + Result::<_, ()>::Ok(crate::api::wallet::FfiWallet::reveal_next_address( + api_opaque, + api_keychain_kind, + ))?; + Ok(output_ok) + })()) + }, + ) +} +fn wire__crate__api__wallet__ffi_wallet_sign_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - ptr: impl CstDecode, - blockchain: impl CstDecode, + opaque: 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_sync", + debug_name: "ffi_wallet_sign", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_ptr = ptr.cst_decode(); - let api_blockchain = blockchain.cst_decode(); + let api_opaque = opaque.cst_decode(); + let api_psbt = psbt.cst_decode(); + let api_sign_options = sign_options.cst_decode(); move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::wallet::BdkWallet::sync(api_ptr, &api_blockchain)?; + transform_result_dco::<_, _, crate::api::error::SignerError>((move || { + let output_ok = crate::api::wallet::FfiWallet::sign( + &api_opaque, + api_psbt, + api_sign_options, + )?; Ok(output_ok) })()) } }, ) } -fn wire__crate__api__wallet__finish_bump_fee_tx_builder_impl( +fn wire__crate__api__wallet__ffi_wallet_start_full_scan_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>, + that: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "finish_bump_fee_tx_builder", + debug_name: "ffi_wallet_start_full_scan", 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(); + let api_that = that.cst_decode(); move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::wallet::finish_bump_fee_tx_builder( - api_txid, - api_fee_rate, - api_allow_shrinking, - api_wallet, - api_enable_rbf, - api_n_sequence, + transform_result_dco::<_, _, ()>((move || { + let output_ok = Result::<_, ()>::Ok( + crate::api::wallet::FfiWallet::start_full_scan(&api_that), )?; Ok(output_ok) })()) @@ -1899,58 +2259,22 @@ fn wire__crate__api__wallet__finish_bump_fee_tx_builder_impl( }, ) } -fn wire__crate__api__wallet__tx_builder_finish_impl( +fn wire__crate__api__wallet__ffi_wallet_start_sync_with_revealed_spks_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>, + that: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "tx_builder_finish", + debug_name: "ffi_wallet_start_sync_with_revealed_spks", 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(); + let api_that = that.cst_decode(); move |context| { - transform_result_dco::<_, _, crate::api::error::BdkError>((move || { - let output_ok = crate::api::wallet::tx_builder_finish( - api_wallet, - api_recipients, - api_utxos, - api_foreign_utxo, - api_un_spendable, - api_change_policy, - api_manually_selected_only, - api_fee_rate, - api_fee_absolute, - api_drain_wallet, - api_drain_to, - api_rbf, - api_data, + transform_result_dco::<_, _, ()>((move || { + let output_ok = Result::<_, ()>::Ok( + crate::api::wallet::FfiWallet::start_sync_with_revealed_spks(&api_that), )?; Ok(output_ok) })()) @@ -1958,6 +2282,120 @@ fn wire__crate__api__wallet__tx_builder_finish_impl( }, ) } +fn wire__crate__api__wallet__ffi_wallet_transactions_impl( + that: impl CstDecode, +) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "ffi_wallet_transactions", + port: None, + mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync, + }, + move || { + let api_that = that.cst_decode(); + transform_result_dco::<_, _, ()>((move || { + let output_ok = + Result::<_, ()>::Ok(crate::api::wallet::FfiWallet::transactions(&api_that))?; + Ok(output_ok) + })()) + }, + ) +} + +// Section: related_funcs + +fn decode_DartFn_Inputs_ffi_script_buf_sync_progress_Output_unit_AnyhowException( + dart_opaque: flutter_rust_bridge::DartOpaque, +) -> impl Fn( + crate::api::bitcoin::FfiScriptBuf, + crate::api::types::SyncProgress, +) -> flutter_rust_bridge::DartFnFuture<()> { + use flutter_rust_bridge::IntoDart; + + async fn body( + dart_opaque: flutter_rust_bridge::DartOpaque, + arg0: crate::api::bitcoin::FfiScriptBuf, + arg1: crate::api::types::SyncProgress, + ) -> () { + let args = vec![ + arg0.into_into_dart().into_dart(), + arg1.into_into_dart().into_dart(), + ]; + let message = FLUTTER_RUST_BRIDGE_HANDLER + .dart_fn_invoke(dart_opaque, args) + .await; + + let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let action = deserializer.cursor.read_u8().unwrap(); + let ans = match action { + 0 => std::result::Result::Ok(<()>::sse_decode(&mut deserializer)), + 1 => std::result::Result::Err( + ::sse_decode(&mut deserializer), + ), + _ => unreachable!(), + }; + deserializer.end(); + let ans = ans.expect("Dart throws exception but Rust side assume it is not failable"); + ans + } + + move |arg0: crate::api::bitcoin::FfiScriptBuf, arg1: crate::api::types::SyncProgress| { + flutter_rust_bridge::for_generated::convert_into_dart_fn_future(body( + dart_opaque.clone(), + arg0, + arg1, + )) + } +} +fn decode_DartFn_Inputs_keychain_kind_u_32_ffi_script_buf_Output_unit_AnyhowException( + dart_opaque: flutter_rust_bridge::DartOpaque, +) -> impl Fn( + crate::api::types::KeychainKind, + u32, + crate::api::bitcoin::FfiScriptBuf, +) -> flutter_rust_bridge::DartFnFuture<()> { + use flutter_rust_bridge::IntoDart; + + async fn body( + dart_opaque: flutter_rust_bridge::DartOpaque, + arg0: crate::api::types::KeychainKind, + arg1: u32, + arg2: crate::api::bitcoin::FfiScriptBuf, + ) -> () { + let args = vec![ + arg0.into_into_dart().into_dart(), + arg1.into_into_dart().into_dart(), + arg2.into_into_dart().into_dart(), + ]; + let message = FLUTTER_RUST_BRIDGE_HANDLER + .dart_fn_invoke(dart_opaque, args) + .await; + + let mut deserializer = flutter_rust_bridge::for_generated::SseDeserializer::new(message); + let action = deserializer.cursor.read_u8().unwrap(); + let ans = match action { + 0 => std::result::Result::Ok(<()>::sse_decode(&mut deserializer)), + 1 => std::result::Result::Err( + ::sse_decode(&mut deserializer), + ), + _ => unreachable!(), + }; + deserializer.end(); + let ans = ans.expect("Dart throws exception but Rust side assume it is not failable"); + ans + } + + move |arg0: crate::api::types::KeychainKind, + arg1: u32, + arg2: crate::api::bitcoin::FfiScriptBuf| { + flutter_rust_bridge::for_generated::convert_into_dart_fn_future(body( + dart_opaque.clone(), + arg0, + arg1, + arg2, + )) + } +} // Section: dart2rust @@ -1978,15 +2416,15 @@ impl CstDecode for i32 { } } } -impl CstDecode for f32 { +impl CstDecode for i32 { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> f32 { + fn cst_decode(self) -> i32 { self } } -impl CstDecode for i32 { +impl CstDecode for isize { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> i32 { + fn cst_decode(self) -> isize { self } } @@ -2012,6 +2450,21 @@ impl CstDecode for i32 { } } } +impl CstDecode for i32 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::error::RequestBuilderError { + match self { + 0 => crate::api::error::RequestBuilderError::RequestAlreadyConsumed, + _ => unreachable!("Invalid variant for RequestBuilderError: {}", self), + } + } +} +impl CstDecode for u16 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> u16 { + self + } +} impl CstDecode for u32 { // Codec=Cst (C-struct based), see doc to use other codecs fn cst_decode(self) -> u32 { @@ -2036,41 +2489,6 @@ impl CstDecode for 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 { @@ -2082,23 +2500,31 @@ impl CstDecode for i32 { } } } -impl SseDecode for RustOpaqueNom { +impl SseDecode for flutter_rust_bridge::for_generated::anyhow::Error { // 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) }; + let mut inner = ::sse_decode(deserializer); + return flutter_rust_bridge::for_generated::anyhow::anyhow!("{}", inner); } } -impl SseDecode for RustOpaqueNom { +impl SseDecode for flutter_rust_bridge::DartOpaque { // 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) }; + return unsafe { flutter_rust_bridge::for_generated::sse_decode_dart_opaque(inner) }; + } +} + +impl SseDecode for std::collections::HashMap> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut inner = )>>::sse_decode(deserializer); + return inner.into_iter().collect(); } } -impl SseDecode for RustOpaqueNom { +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); @@ -2106,7 +2532,7 @@ impl SseDecode for RustOpaqueNom { } } -impl SseDecode for RustOpaqueNom { +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); @@ -2114,7 +2540,9 @@ impl SseDecode for RustOpaqueNom { } } -impl SseDecode for RustOpaqueNom { +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); @@ -2122,7 +2550,7 @@ impl SseDecode for RustOpaqueNom { } } -impl SseDecode for RustOpaqueNom { +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); @@ -2130,7 +2558,7 @@ impl SseDecode for RustOpaqueNom { } } -impl SseDecode for RustOpaqueNom { +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); @@ -2138,7 +2566,7 @@ impl SseDecode for RustOpaqueNom { } } -impl SseDecode for RustOpaqueNom { +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); @@ -2146,7 +2574,7 @@ impl SseDecode for RustOpaqueNom { } } -impl SseDecode for RustOpaqueNom>> { +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); @@ -2154,7 +2582,7 @@ impl SseDecode for RustOpaqueNom> { +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); @@ -2162,80 +2590,182 @@ 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 String::from_utf8(inner).unwrap(); + let mut inner = ::sse_decode(deserializer); + return unsafe { decode_rust_opaque_nom(inner) }; } } -impl SseDecode for crate::api::error::AddressError { +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< + std::sync::Mutex< + Option>, + >, + > +{ + // 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< + std::sync::Mutex>>, + > +{ + // 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< + std::sync::Mutex< + Option>, + >, + > +{ + // 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< + std::sync::Mutex< + Option>, + >, + > +{ + // 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< + std::sync::Mutex>, + > +{ + // 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::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); + let mut var_keychain = ::sse_decode(deserializer); + return crate::api::types::AddressInfo { + index: var_index, + address: var_address, + keychain: var_keychain, + }; + } +} + +impl SseDecode for crate::api::error::AddressParseError { // 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); + return crate::api::error::AddressParseError::Base58; } 1 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::AddressError::Bech32(var_field0); + return crate::api::error::AddressParseError::Bech32; } 2 => { - return crate::api::error::AddressError::EmptyBech32Payload; + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::AddressParseError::WitnessVersion { + error_message: var_errorMessage, + }; } 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, + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::AddressParseError::WitnessProgram { + error_message: var_errorMessage, }; } 4 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::AddressError::InvalidWitnessVersion(var_field0); + return crate::api::error::AddressParseError::UnknownHrp; } 5 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::AddressError::UnparsableWitnessVersion(var_field0); + return crate::api::error::AddressParseError::LegacyAddressTooLong; } 6 => { - return crate::api::error::AddressError::MalformedWitnessVersion; + return crate::api::error::AddressParseError::InvalidBase58PayloadLength; } 7 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::AddressError::InvalidWitnessProgramLength(var_field0); + return crate::api::error::AddressParseError::InvalidLegacyPrefix; } 8 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::AddressError::InvalidSegwitV0ProgramLength(var_field0); + return crate::api::error::AddressParseError::NetworkValidation; } 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, - }; + return crate::api::error::AddressParseError::OtherAddressParseErr; } _ => { unimplemented!(""); @@ -2244,24 +2774,87 @@ impl SseDecode for crate::api::error::AddressError { } } -impl SseDecode for crate::api::types::AddressIndex { +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::error::Bip32Error { // 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; + return crate::api::error::Bip32Error::CannotDeriveFromHardenedKey; } 1 => { - return crate::api::types::AddressIndex::LastUnused; + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::Bip32Error::Secp256k1 { + error_message: var_errorMessage, + }; } 2 => { - let mut var_index = ::sse_decode(deserializer); - return crate::api::types::AddressIndex::Peek { index: var_index }; + let mut var_childNumber = ::sse_decode(deserializer); + return crate::api::error::Bip32Error::InvalidChildNumber { + child_number: var_childNumber, + }; } 3 => { - let mut var_index = ::sse_decode(deserializer); - return crate::api::types::AddressIndex::Reset { index: var_index }; + return crate::api::error::Bip32Error::InvalidChildNumberFormat; + } + 4 => { + return crate::api::error::Bip32Error::InvalidDerivationPathFormat; + } + 5 => { + let mut var_version = ::sse_decode(deserializer); + return crate::api::error::Bip32Error::UnknownVersion { + version: var_version, + }; + } + 6 => { + let mut var_length = ::sse_decode(deserializer); + return crate::api::error::Bip32Error::WrongExtendedKeyLength { + length: var_length, + }; + } + 7 => { + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::Bip32Error::Base58 { + error_message: var_errorMessage, + }; + } + 8 => { + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::Bip32Error::Hex { + error_message: var_errorMessage, + }; + } + 9 => { + let mut var_length = ::sse_decode(deserializer); + return crate::api::error::Bip32Error::InvalidPublicKeyHexLength { + length: var_length, + }; + } + 10 => { + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::Bip32Error::UnknownError { + error_message: var_errorMessage, + }; } _ => { unimplemented!(""); @@ -2270,25 +2863,41 @@ impl SseDecode for crate::api::types::AddressIndex { } } -impl SseDecode for crate::api::blockchain::Auth { +impl SseDecode for crate::api::error::Bip39Error { // 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; + let mut var_wordCount = ::sse_decode(deserializer); + return crate::api::error::Bip39Error::BadWordCount { + word_count: var_wordCount, + }; } 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, - }; + let mut var_index = ::sse_decode(deserializer); + return crate::api::error::Bip39Error::UnknownWord { index: var_index }; } 2 => { - let mut var_file = ::sse_decode(deserializer); - return crate::api::blockchain::Auth::Cookie { file: var_file }; + let mut var_bitCount = ::sse_decode(deserializer); + return crate::api::error::Bip39Error::BadEntropyBitCount { + bit_count: var_bitCount, + }; + } + 3 => { + return crate::api::error::Bip39Error::InvalidChecksum; + } + 4 => { + let mut var_languages = ::sse_decode(deserializer); + return crate::api::error::Bip39Error::AmbiguousLanguages { + languages: var_languages, + }; + } + 5 => { + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::Bip39Error::Generic { + error_message: var_errorMessage, + }; } _ => { unimplemented!(""); @@ -2297,270 +2906,366 @@ impl SseDecode for crate::api::blockchain::Auth { } } -impl SseDecode for crate::api::types::Balance { +impl SseDecode for crate::api::types::BlockId { // 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, + let mut var_height = ::sse_decode(deserializer); + let mut var_hash = ::sse_decode(deserializer); + return crate::api::types::BlockId { + height: var_height, + hash: var_hash, }; } } -impl SseDecode for crate::api::types::BdkAddress { +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 { - let mut var_ptr = >::sse_decode(deserializer); - return crate::api::types::BdkAddress { ptr: var_ptr }; + deserializer.cursor.read_u8().unwrap() != 0 } } -impl SseDecode for crate::api::blockchain::BdkBlockchain { +impl SseDecode for crate::api::error::CalculateFeeError { // 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 }; + let mut tag_ = ::sse_decode(deserializer); + match tag_ { + 0 => { + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::CalculateFeeError::Generic { + error_message: var_errorMessage, + }; + } + 1 => { + let mut var_outPoints = + >::sse_decode(deserializer); + return crate::api::error::CalculateFeeError::MissingTxOut { + out_points: var_outPoints, + }; + } + 2 => { + let mut var_amount = ::sse_decode(deserializer); + return crate::api::error::CalculateFeeError::NegativeFee { amount: var_amount }; + } + _ => { + unimplemented!(""); + } + } } } -impl SseDecode for crate::api::key::BdkDerivationPath { +impl SseDecode for crate::api::error::CannotConnectError { // 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 }; + let mut tag_ = ::sse_decode(deserializer); + match tag_ { + 0 => { + let mut var_height = ::sse_decode(deserializer); + return crate::api::error::CannotConnectError::Include { height: var_height }; + } + _ => { + unimplemented!(""); + } + } } } -impl SseDecode for crate::api::descriptor::BdkDescriptor { +impl SseDecode for crate::api::types::ChainPosition { // 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, - }; + let mut tag_ = ::sse_decode(deserializer); + match tag_ { + 0 => { + let mut var_confirmationBlockTime = + ::sse_decode(deserializer); + return crate::api::types::ChainPosition::Confirmed { + confirmation_block_time: var_confirmationBlockTime, + }; + } + 1 => { + let mut var_timestamp = ::sse_decode(deserializer); + return crate::api::types::ChainPosition::Unconfirmed { + timestamp: var_timestamp, + }; + } + _ => { + unimplemented!(""); + } + } } } -impl SseDecode for crate::api::key::BdkDescriptorPublicKey { +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 var_ptr = >::sse_decode(deserializer); - return crate::api::key::BdkDescriptorPublicKey { ptr: var_ptr }; + 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::key::BdkDescriptorSecretKey { +impl SseDecode for crate::api::types::ConfirmationBlockTime { // 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 }; + let mut var_blockId = ::sse_decode(deserializer); + let mut var_confirmationTime = ::sse_decode(deserializer); + return crate::api::types::ConfirmationBlockTime { + block_id: var_blockId, + confirmation_time: var_confirmationTime, + }; } } -impl SseDecode for crate::api::error::BdkError { +impl SseDecode for crate::api::error::CreateTxError { // 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); + let mut var_txid = ::sse_decode(deserializer); + return crate::api::error::CreateTxError::TransactionNotFound { txid: var_txid }; } 1 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Consensus(var_field0); + let mut var_txid = ::sse_decode(deserializer); + return crate::api::error::CreateTxError::TransactionConfirmed { txid: var_txid }; } 2 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::VerifyTransaction(var_field0); + let mut var_txid = ::sse_decode(deserializer); + return crate::api::error::CreateTxError::IrreplaceableTransaction { + txid: var_txid, + }; } 3 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Address(var_field0); + return crate::api::error::CreateTxError::FeeRateUnavailable; } 4 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Descriptor(var_field0); + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::CreateTxError::Generic { + error_message: var_errorMessage, + }; } 5 => { - let mut var_field0 = >::sse_decode(deserializer); - return crate::api::error::BdkError::InvalidU32Bytes(var_field0); + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::CreateTxError::Descriptor { + error_message: var_errorMessage, + }; } 6 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Generic(var_field0); + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::CreateTxError::Policy { + error_message: var_errorMessage, + }; } 7 => { - return crate::api::error::BdkError::ScriptDoesntHaveAddressForm; + let mut var_kind = ::sse_decode(deserializer); + return crate::api::error::CreateTxError::SpendingPolicyRequired { kind: var_kind }; } 8 => { - return crate::api::error::BdkError::NoRecipients; + return crate::api::error::CreateTxError::Version0; } 9 => { - return crate::api::error::BdkError::NoUtxosSelected; + return crate::api::error::CreateTxError::Version1Csv; } 10 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::OutputBelowDustLimit(var_field0); + let mut var_requestedTime = ::sse_decode(deserializer); + let mut var_requiredTime = ::sse_decode(deserializer); + return crate::api::error::CreateTxError::LockTime { + requested_time: var_requestedTime, + required_time: var_requiredTime, + }; } 11 => { - let mut var_needed = ::sse_decode(deserializer); - let mut var_available = ::sse_decode(deserializer); - return crate::api::error::BdkError::InsufficientFunds { - needed: var_needed, - available: var_available, - }; + return crate::api::error::CreateTxError::RbfSequence; } 12 => { - return crate::api::error::BdkError::BnBTotalTriesExceeded; + let mut var_rbf = ::sse_decode(deserializer); + let mut var_csv = ::sse_decode(deserializer); + return crate::api::error::CreateTxError::RbfSequenceCsv { + rbf: var_rbf, + csv: var_csv, + }; } 13 => { - return crate::api::error::BdkError::BnBNoExactMatch; + let mut var_feeRequired = ::sse_decode(deserializer); + return crate::api::error::CreateTxError::FeeTooLow { + fee_required: var_feeRequired, + }; } 14 => { - return crate::api::error::BdkError::UnknownUtxo; + let mut var_feeRateRequired = ::sse_decode(deserializer); + return crate::api::error::CreateTxError::FeeRateTooLow { + fee_rate_required: var_feeRateRequired, + }; } 15 => { - return crate::api::error::BdkError::TransactionNotFound; + return crate::api::error::CreateTxError::NoUtxosSelected; } 16 => { - return crate::api::error::BdkError::TransactionConfirmed; + let mut var_index = ::sse_decode(deserializer); + return crate::api::error::CreateTxError::OutputBelowDustLimit { index: var_index }; } 17 => { - return crate::api::error::BdkError::IrreplaceableTransaction; + return crate::api::error::CreateTxError::ChangePolicyDescriptor; } 18 => { - let mut var_needed = ::sse_decode(deserializer); - return crate::api::error::BdkError::FeeRateTooLow { needed: var_needed }; + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::CreateTxError::CoinSelection { + error_message: var_errorMessage, + }; } 19 => { let mut var_needed = ::sse_decode(deserializer); - return crate::api::error::BdkError::FeeTooLow { needed: var_needed }; + let mut var_available = ::sse_decode(deserializer); + return crate::api::error::CreateTxError::InsufficientFunds { + needed: var_needed, + available: var_available, + }; } 20 => { - return crate::api::error::BdkError::FeeRateUnavailable; + return crate::api::error::CreateTxError::NoRecipients; } 21 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::MissingKeyOrigin(var_field0); + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::CreateTxError::Psbt { + error_message: var_errorMessage, + }; } 22 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Key(var_field0); + let mut var_key = ::sse_decode(deserializer); + return crate::api::error::CreateTxError::MissingKeyOrigin { key: var_key }; } 23 => { - return crate::api::error::BdkError::ChecksumMismatch; + let mut var_outpoint = ::sse_decode(deserializer); + return crate::api::error::CreateTxError::UnknownUtxo { + outpoint: var_outpoint, + }; } 24 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::SpendingPolicyRequired(var_field0); + let mut var_outpoint = ::sse_decode(deserializer); + return crate::api::error::CreateTxError::MissingNonWitnessUtxo { + outpoint: var_outpoint, + }; } 25 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::InvalidPolicyPathError(var_field0); - } - 26 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Signer(var_field0); - } - 27 => { - let mut var_requested = ::sse_decode(deserializer); - let mut var_found = ::sse_decode(deserializer); - return crate::api::error::BdkError::InvalidNetwork { - requested: var_requested, - found: var_found, + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::CreateTxError::MiniscriptPsbt { + error_message: var_errorMessage, }; } - 28 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::InvalidOutpoint(var_field0); + _ => { + unimplemented!(""); } - 29 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Encode(var_field0); + } + } +} + +impl SseDecode for crate::api::error::CreateWithPersistError { + // 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_errorMessage = ::sse_decode(deserializer); + return crate::api::error::CreateWithPersistError::Persist { + error_message: var_errorMessage, + }; } - 30 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Miniscript(var_field0); + 1 => { + return crate::api::error::CreateWithPersistError::DataAlreadyExists; } - 31 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::MiniscriptPsbt(var_field0); + 2 => { + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::CreateWithPersistError::Descriptor { + error_message: var_errorMessage, + }; } - 32 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Bip32(var_field0); + _ => { + 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; } - 33 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Bip39(var_field0); + 1 => { + return crate::api::error::DescriptorError::MissingPrivateData; } - 34 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Secp256k1(var_field0); + 2 => { + return crate::api::error::DescriptorError::InvalidDescriptorChecksum; } - 35 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Json(var_field0); + 3 => { + return crate::api::error::DescriptorError::HardenedDerivationXpub; } - 36 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Psbt(var_field0); + 4 => { + return crate::api::error::DescriptorError::MultiPath; } - 37 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::PsbtParse(var_field0); + 5 => { + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::DescriptorError::Key { + error_message: var_errorMessage, + }; } - 38 => { - let mut var_field0 = ::sse_decode(deserializer); - let mut var_field1 = ::sse_decode(deserializer); - return crate::api::error::BdkError::MissingCachedScripts(var_field0, var_field1); + 6 => { + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::DescriptorError::Generic { + error_message: var_errorMessage, + }; } - 39 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Electrum(var_field0); + 7 => { + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::DescriptorError::Policy { + error_message: var_errorMessage, + }; } - 40 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Esplora(var_field0); + 8 => { + let mut var_charector = ::sse_decode(deserializer); + return crate::api::error::DescriptorError::InvalidDescriptorCharacter { + charector: var_charector, + }; } - 41 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Sled(var_field0); + 9 => { + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::DescriptorError::Bip32 { + error_message: var_errorMessage, + }; } - 42 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Rpc(var_field0); + 10 => { + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::DescriptorError::Base58 { + error_message: var_errorMessage, + }; } - 43 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::Rusqlite(var_field0); + 11 => { + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::DescriptorError::Pk { + error_message: var_errorMessage, + }; } - 44 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::InvalidInput(var_field0); + 12 => { + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::DescriptorError::Miniscript { + error_message: var_errorMessage, + }; } - 45 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::InvalidLockTime(var_field0); + 13 => { + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::DescriptorError::Hex { + error_message: var_errorMessage, + }; } - 46 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::BdkError::InvalidTransaction(var_field0); + 14 => { + return crate::api::error::DescriptorError::ExternalAndInternalAreTheSame; } _ => { unimplemented!(""); @@ -2569,81 +3274,25 @@ 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_s = ::sse_decode(deserializer); - return crate::api::types::BdkTransaction { s: var_s }; - } -} - -impl SseDecode for crate::api::wallet::BdkWallet { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut var_ptr = - >>>::sse_decode( - deserializer, - ); - return crate::api::wallet::BdkWallet { ptr: var_ptr }; - } -} - -impl SseDecode for crate::api::types::BlockTime { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - let mut var_height = ::sse_decode(deserializer); - let mut var_timestamp = ::sse_decode(deserializer); - return crate::api::types::BlockTime { - height: var_height, - timestamp: var_timestamp, - }; - } -} - -impl SseDecode for crate::api::blockchain::BlockchainConfig { +impl SseDecode for crate::api::error::DescriptorKeyError { // 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 }; + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::DescriptorKeyError::Parse { + error_message: var_errorMessage, + }; } 1 => { - let mut var_config = - ::sse_decode(deserializer); - return crate::api::blockchain::BlockchainConfig::Esplora { config: var_config }; + return crate::api::error::DescriptorKeyError::InvalidKeyType; } 2 => { - let mut var_config = ::sse_decode(deserializer); - return crate::api::blockchain::BlockchainConfig::Rpc { config: var_config }; + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::DescriptorKeyError::Bip32 { + error_message: var_errorMessage, + }; } _ => { unimplemented!(""); @@ -2652,86 +3301,91 @@ impl SseDecode for crate::api::blockchain::BlockchainConfig { } } -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 { +impl SseDecode for crate::api::error::ElectrumError { // 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); + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::ElectrumError::IOError { + error_message: var_errorMessage, + }; } 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, + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::ElectrumError::Json { + error_message: var_errorMessage, }; } 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, + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::ElectrumError::Hex { + error_message: var_errorMessage, }; } 3 => { - return crate::api::error::ConsensusError::NonMinimalVarInt; + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::ElectrumError::Protocol { + error_message: var_errorMessage, + }; } 4 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::ConsensusError::ParseFailed(var_field0); + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::ElectrumError::Bitcoin { + error_message: var_errorMessage, + }; } 5 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::ConsensusError::UnsupportedSegwitFlag(var_field0); + return crate::api::error::ElectrumError::AlreadySubscribed; } - _ => { - unimplemented!(""); + 6 => { + return crate::api::error::ElectrumError::NotSubscribed; } - } - } -} - -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; + 7 => { + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::ElectrumError::InvalidResponse { + error_message: var_errorMessage, + }; } - 1 => { - let mut var_config = - ::sse_decode(deserializer); - return crate::api::types::DatabaseConfig::Sqlite { config: var_config }; + 8 => { + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::ElectrumError::Message { + error_message: var_errorMessage, + }; } - 2 => { - let mut var_config = - ::sse_decode(deserializer); - return crate::api::types::DatabaseConfig::Sled { config: var_config }; + 9 => { + let mut var_domain = ::sse_decode(deserializer); + return crate::api::error::ElectrumError::InvalidDNSNameError { + domain: var_domain, + }; + } + 10 => { + return crate::api::error::ElectrumError::MissingDomain; + } + 11 => { + return crate::api::error::ElectrumError::AllAttemptsErrored; + } + 12 => { + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::ElectrumError::SharedIOError { + error_message: var_errorMessage, + }; + } + 13 => { + return crate::api::error::ElectrumError::CouldntLockReader; + } + 14 => { + return crate::api::error::ElectrumError::Mpsc; + } + 15 => { + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::ElectrumError::CouldNotCreateConnection { + error_message: var_errorMessage, + }; + } + 16 => { + return crate::api::error::ElectrumError::RequestAlreadyConsumed; } _ => { unimplemented!(""); @@ -2740,54 +3394,79 @@ impl SseDecode for crate::api::types::DatabaseConfig { } } -impl SseDecode for crate::api::error::DescriptorError { +impl SseDecode for crate::api::error::EsploraError { // 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; + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::EsploraError::Minreq { + error_message: var_errorMessage, + }; } 1 => { - return crate::api::error::DescriptorError::InvalidDescriptorChecksum; + let mut var_status = ::sse_decode(deserializer); + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::EsploraError::HttpResponse { + status: var_status, + error_message: var_errorMessage, + }; } 2 => { - return crate::api::error::DescriptorError::HardenedDerivationXpub; + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::EsploraError::Parsing { + error_message: var_errorMessage, + }; } 3 => { - return crate::api::error::DescriptorError::MultiPath; + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::EsploraError::StatusCode { + error_message: var_errorMessage, + }; } 4 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::DescriptorError::Key(var_field0); + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::EsploraError::BitcoinEncoding { + error_message: var_errorMessage, + }; } 5 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::DescriptorError::Policy(var_field0); + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::EsploraError::HexToArray { + error_message: var_errorMessage, + }; } 6 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::DescriptorError::InvalidDescriptorCharacter(var_field0); + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::EsploraError::HexToBytes { + error_message: var_errorMessage, + }; } 7 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::DescriptorError::Bip32(var_field0); + return crate::api::error::EsploraError::TransactionNotFound; } 8 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::DescriptorError::Base58(var_field0); + let mut var_height = ::sse_decode(deserializer); + return crate::api::error::EsploraError::HeaderHeightNotFound { + height: var_height, + }; } 9 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::DescriptorError::Pk(var_field0); + return crate::api::error::EsploraError::HeaderHashNotFound; } 10 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::DescriptorError::Miniscript(var_field0); + let mut var_name = ::sse_decode(deserializer); + return crate::api::error::EsploraError::InvalidHttpHeaderName { name: var_name }; } 11 => { - let mut var_field0 = ::sse_decode(deserializer); - return crate::api::error::DescriptorError::Hex(var_field0); + let mut var_value = ::sse_decode(deserializer); + return crate::api::error::EsploraError::InvalidHttpHeaderValue { + value: var_value, + }; + } + 12 => { + return crate::api::error::EsploraError::RequestAlreadyConsumed; } _ => { unimplemented!(""); @@ -2796,485 +3475,444 @@ impl SseDecode for crate::api::error::DescriptorError { } } -impl SseDecode for crate::api::blockchain::ElectrumConfig { +impl SseDecode for crate::api::error::ExtractTxError { // 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, - }; + let mut tag_ = ::sse_decode(deserializer); + match tag_ { + 0 => { + let mut var_feeRate = ::sse_decode(deserializer); + return crate::api::error::ExtractTxError::AbsurdFeeRate { + fee_rate: var_feeRate, + }; + } + 1 => { + return crate::api::error::ExtractTxError::MissingInputValue; + } + 2 => { + return crate::api::error::ExtractTxError::SendingTooMuch; + } + 3 => { + return crate::api::error::ExtractTxError::OtherExtractTxErr; + } + _ => { + unimplemented!(""); + } + } } } -impl SseDecode for crate::api::blockchain::EsploraConfig { +impl SseDecode for crate::api::bitcoin::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_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, + let mut var_satKwu = ::sse_decode(deserializer); + return crate::api::bitcoin::FeeRate { + sat_kwu: var_satKwu, }; } } -impl SseDecode for f32 { +impl SseDecode for crate::api::bitcoin::FfiAddress { // 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() + let mut var_field0 = >::sse_decode(deserializer); + return crate::api::bitcoin::FfiAddress(var_field0); } } -impl SseDecode for crate::api::types::FeeRate { +impl SseDecode for crate::api::types::FfiCanonicalTx { // 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, + let mut var_transaction = ::sse_decode(deserializer); + let mut var_chainPosition = ::sse_decode(deserializer); + return crate::api::types::FfiCanonicalTx { + transaction: var_transaction, + chain_position: var_chainPosition, }; } } -impl SseDecode for crate::api::error::HexError { +impl SseDecode for crate::api::store::FfiConnection { // 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!(""); - } - } + let mut var_field0 = + >>::sse_decode( + deserializer, + ); + return crate::api::store::FfiConnection(var_field0); } } -impl SseDecode for i32 { +impl SseDecode for crate::api::key::FfiDerivationPath { // 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() + let mut var_opaque = + >::sse_decode(deserializer); + return crate::api::key::FfiDerivationPath { opaque: var_opaque }; } } -impl SseDecode for crate::api::types::Input { +impl SseDecode for crate::api::descriptor::FfiDescriptor { // 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 }; + let mut var_extendedDescriptor = + >::sse_decode(deserializer); + let mut var_keyMap = >::sse_decode(deserializer); + return crate::api::descriptor::FfiDescriptor { + extended_descriptor: var_extendedDescriptor, + key_map: var_keyMap, + }; } } -impl SseDecode for crate::api::types::KeychainKind { +impl SseDecode for crate::api::key::FfiDescriptorPublicKey { // 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), - }; + let mut var_opaque = + >::sse_decode(deserializer); + return crate::api::key::FfiDescriptorPublicKey { opaque: var_opaque }; } } -impl SseDecode for Vec> { +impl SseDecode for crate::api::key::FfiDescriptorSecretKey { // 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_; + let mut var_opaque = + >::sse_decode(deserializer); + return crate::api::key::FfiDescriptorSecretKey { opaque: var_opaque }; } } -impl SseDecode for Vec { +impl SseDecode for crate::api::electrum::FfiElectrumClient { // 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_; + let mut var_opaque = , + >>::sse_decode(deserializer); + return crate::api::electrum::FfiElectrumClient { opaque: var_opaque }; } } -impl SseDecode for Vec { +impl SseDecode for crate::api::esplora::FfiEsploraClient { // 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_; + let mut var_opaque = + >::sse_decode(deserializer); + return crate::api::esplora::FfiEsploraClient { opaque: var_opaque }; } } -impl SseDecode for Vec { +impl SseDecode for crate::api::types::FfiFullScanRequest { // 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_; + let mut var_field0 = >, + >, + >>::sse_decode(deserializer); + return crate::api::types::FfiFullScanRequest(var_field0); } } -impl SseDecode for Vec { +impl SseDecode for crate::api::types::FfiFullScanRequestBuilder { // 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_; + let mut var_field0 = >, + >, + >>::sse_decode(deserializer); + return crate::api::types::FfiFullScanRequestBuilder(var_field0); } } -impl SseDecode for Vec { +impl SseDecode for crate::api::key::FfiMnemonic { // 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_; + let mut var_opaque = + >::sse_decode(deserializer); + return crate::api::key::FfiMnemonic { opaque: var_opaque }; } } -impl SseDecode for Vec { +impl SseDecode for crate::api::types::FfiPolicy { // 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_; + let mut var_opaque = + >::sse_decode(deserializer); + return crate::api::types::FfiPolicy { opaque: var_opaque }; } } -impl SseDecode for Vec { +impl SseDecode for crate::api::bitcoin::FfiPsbt { // 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_; + let mut var_opaque = + >>::sse_decode( + deserializer, + ); + return crate::api::bitcoin::FfiPsbt { opaque: var_opaque }; } } -impl SseDecode for crate::api::types::LocalUtxo { +impl SseDecode for crate::api::bitcoin::FfiScriptBuf { // 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, - }; + let mut var_bytes = >::sse_decode(deserializer); + return crate::api::bitcoin::FfiScriptBuf { bytes: var_bytes }; } } -impl SseDecode for crate::api::types::LockTime { +impl SseDecode for crate::api::types::FfiSyncRequest { // 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!(""); - } - } + let mut var_field0 = >, + >, + >>::sse_decode(deserializer); + return crate::api::types::FfiSyncRequest(var_field0); } } -impl SseDecode for crate::api::types::Network { +impl SseDecode for crate::api::types::FfiSyncRequestBuilder { // 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), - }; + let mut var_field0 = >, + >, + >>::sse_decode(deserializer); + return crate::api::types::FfiSyncRequestBuilder(var_field0); } } -impl SseDecode for Option { +impl SseDecode for crate::api::bitcoin::FfiTransaction { // 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; - } + let mut var_opaque = + >::sse_decode(deserializer); + return crate::api::bitcoin::FfiTransaction { opaque: var_opaque }; } } -impl SseDecode for Option { +impl SseDecode for crate::api::types::FfiUpdate { // 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; - } + let mut var_field0 = >::sse_decode(deserializer); + return crate::api::types::FfiUpdate(var_field0); } } -impl SseDecode for Option { +impl SseDecode for crate::api::wallet::FfiWallet { // 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; - } + let mut var_opaque = >, + >>::sse_decode(deserializer); + return crate::api::wallet::FfiWallet { opaque: var_opaque }; } } -impl SseDecode for Option { +impl SseDecode for crate::api::error::FromScriptError { // 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; + let mut tag_ = ::sse_decode(deserializer); + match tag_ { + 0 => { + return crate::api::error::FromScriptError::UnrecognizedScript; + } + 1 => { + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::FromScriptError::WitnessProgram { + error_message: var_errorMessage, + }; + } + 2 => { + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::FromScriptError::WitnessVersion { + error_message: var_errorMessage, + }; + } + 3 => { + return crate::api::error::FromScriptError::OtherFromScriptErr; + } + _ => { + unimplemented!(""); + } } } } -impl SseDecode for Option { +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 { - if (::sse_decode(deserializer)) { - return Some(::sse_decode( - deserializer, - )); - } else { - return None; - } + deserializer.cursor.read_i32::().unwrap() } } -impl SseDecode for Option { +impl SseDecode for isize { // 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; - } + deserializer.cursor.read_i64::().unwrap() as _ } } -impl SseDecode for Option { +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 { - if (::sse_decode(deserializer)) { - return Some(::sse_decode(deserializer)); - } else { - return None; - } + 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 Option { +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 { - if (::sse_decode(deserializer)) { - return Some(::sse_decode(deserializer)); - } else { - return None; + 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 Option { +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 { - if (::sse_decode(deserializer)) { - return Some(::sse_decode( - deserializer, - )); - } else { - return None; + 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 Option { +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 { - if (::sse_decode(deserializer)) { - return Some(::sse_decode(deserializer)); - } else { - return None; + 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 Option<(crate::api::types::OutPoint, crate::api::types::Input, usize)> { +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 { - if (::sse_decode(deserializer)) { - return Some(<( - crate::api::types::OutPoint, - crate::api::types::Input, - usize, - )>::sse_decode(deserializer)); - } else { - return None; + 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 Option { +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 { - if (::sse_decode(deserializer)) { - return Some(::sse_decode( - deserializer, - )); - } else { - return None; + 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 Option { +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 { - if (::sse_decode(deserializer)) { - return Some(::sse_decode(deserializer)); - } else { - return None; + 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 Option { +impl SseDecode for Vec<(crate::api::bitcoin::FfiScriptBuf, u64)> { // 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; + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = vec![]; + for idx_ in 0..len_ { + ans_.push(<(crate::api::bitcoin::FfiScriptBuf, u64)>::sse_decode( + deserializer, + )); } + return ans_; } } -impl SseDecode for Option { +impl SseDecode for Vec<(String, Vec)> { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - if (::sse_decode(deserializer)) { - return Some(::sse_decode(deserializer)); - } else { - return None; + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = vec![]; + for idx_ in 0..len_ { + ans_.push(<(String, Vec)>::sse_decode(deserializer)); } + return ans_; } } -impl SseDecode for Option { +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 { - if (::sse_decode(deserializer)) { - return Some(::sse_decode(deserializer)); - } else { - return None; + 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::OutPoint { +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 var_txid = ::sse_decode(deserializer); - let mut var_vout = ::sse_decode(deserializer); - return crate::api::types::OutPoint { - txid: var_txid, - vout: var_vout, - }; + 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::Payload { +impl SseDecode for crate::api::error::LoadWithPersistError { // 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, + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::LoadWithPersistError::Persist { + error_message: var_errorMessage, }; } 1 => { - let mut var_scriptHash = ::sse_decode(deserializer); - return crate::api::types::Payload::ScriptHash { - script_hash: var_scriptHash, + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::LoadWithPersistError::InvalidChangeSet { + error_message: var_errorMessage, }; } 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, - }; + return crate::api::error::LoadWithPersistError::CouldNotLoad; } _ => { unimplemented!(""); @@ -3283,25 +3921,34 @@ impl SseDecode for crate::api::types::Payload { } } -impl SseDecode for crate::api::types::PsbtSigHashType { +impl SseDecode for crate::api::types::LocalOutput { // 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 }; + 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::LocalOutput { + outpoint: var_outpoint, + txout: var_txout, + keychain: var_keychain, + is_spent: var_isSpent, + }; } } -impl SseDecode for crate::api::types::RbfValue { +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 => { - return crate::api::types::RbfValue::RbfDefault; + 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::RbfValue::Value(var_field0); + return crate::api::types::LockTime::Seconds(var_field0); } _ => { unimplemented!(""); @@ -3310,373 +3957,546 @@ impl SseDecode for crate::api::types::RbfValue { } } -impl SseDecode for (crate::api::types::BdkAddress, u32) { +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 var_field0 = ::sse_decode(deserializer); - let mut var_field1 = ::sse_decode(deserializer); - return (var_field0, var_field1); + 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 ( - crate::api::psbt::BdkPsbt, - crate::api::types::TransactionDetails, - ) -{ +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 { - let mut var_field0 = ::sse_decode(deserializer); - let mut var_field1 = ::sse_decode(deserializer); - return (var_field0, var_field1); + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } } } -impl SseDecode for (crate::api::types::OutPoint, crate::api::types::Input, usize) { +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 { - 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); + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } } } -impl SseDecode for crate::api::blockchain::RpcConfig { +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 { - 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, - }; + if (::sse_decode(deserializer)) { + return Some(::sse_decode( + deserializer, + )); + } else { + return None; + } } } -impl SseDecode for crate::api::blockchain::RpcSyncParams { +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 { - 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, - }; + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } } } -impl SseDecode for crate::api::types::ScriptAmount { +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 { - 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, - }; + if (::sse_decode(deserializer)) { + return Some(::sse_decode( + deserializer, + )); + } else { + return None; + } } } -impl SseDecode for crate::api::types::SignOptions { +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 { - let mut var_trustWitnessUtxo = ::sse_decode(deserializer); - let mut var_assumeHeight = >::sse_decode(deserializer); - let mut var_allowAllSighashes = ::sse_decode(deserializer); - let mut var_removePartialSigs = ::sse_decode(deserializer); - let mut var_tryFinalize = ::sse_decode(deserializer); - let mut var_signWithTapInternalKey = ::sse_decode(deserializer); - let mut var_allowGrinding = ::sse_decode(deserializer); - return crate::api::types::SignOptions { - trust_witness_utxo: var_trustWitnessUtxo, - assume_height: var_assumeHeight, - allow_all_sighashes: var_allowAllSighashes, - remove_partial_sigs: var_removePartialSigs, - try_finalize: var_tryFinalize, - sign_with_tap_internal_key: var_signWithTapInternalKey, - allow_grinding: var_allowGrinding, - }; + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } } } -impl SseDecode for crate::api::types::SledDbConfiguration { +impl SseDecode + for Option<( + std::collections::HashMap>, + 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 var_path = ::sse_decode(deserializer); - let mut var_treeName = ::sse_decode(deserializer); - return crate::api::types::SledDbConfiguration { - path: var_path, - tree_name: var_treeName, - }; + if (::sse_decode(deserializer)) { + return Some(<( + std::collections::HashMap>, + crate::api::types::KeychainKind, + )>::sse_decode(deserializer)); + } else { + return None; + } } } -impl SseDecode for crate::api::types::SqliteDbConfiguration { +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 { - let mut var_path = ::sse_decode(deserializer); - return crate::api::types::SqliteDbConfiguration { path: var_path }; + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } } } -impl SseDecode for crate::api::types::TransactionDetails { +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 { - 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, - }; + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } } } -impl SseDecode for crate::api::types::TxIn { +impl SseDecode for crate::api::bitcoin::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_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, + let mut var_txid = ::sse_decode(deserializer); + let mut var_vout = ::sse_decode(deserializer); + return crate::api::bitcoin::OutPoint { + txid: var_txid, + vout: var_vout, }; } } -impl SseDecode for crate::api::types::TxOut { +impl SseDecode for crate::api::error::PsbtError { // 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, - }; + let mut tag_ = ::sse_decode(deserializer); + match tag_ { + 0 => { + return crate::api::error::PsbtError::InvalidMagic; + } + 1 => { + return crate::api::error::PsbtError::MissingUtxo; + } + 2 => { + return crate::api::error::PsbtError::InvalidSeparator; + } + 3 => { + return crate::api::error::PsbtError::PsbtUtxoOutOfBounds; + } + 4 => { + let mut var_key = ::sse_decode(deserializer); + return crate::api::error::PsbtError::InvalidKey { key: var_key }; + } + 5 => { + return crate::api::error::PsbtError::InvalidProprietaryKey; + } + 6 => { + let mut var_key = ::sse_decode(deserializer); + return crate::api::error::PsbtError::DuplicateKey { key: var_key }; + } + 7 => { + return crate::api::error::PsbtError::UnsignedTxHasScriptSigs; + } + 8 => { + return crate::api::error::PsbtError::UnsignedTxHasScriptWitnesses; + } + 9 => { + return crate::api::error::PsbtError::MustHaveUnsignedTx; + } + 10 => { + return crate::api::error::PsbtError::NoMorePairs; + } + 11 => { + return crate::api::error::PsbtError::UnexpectedUnsignedTx; + } + 12 => { + let mut var_sighash = ::sse_decode(deserializer); + return crate::api::error::PsbtError::NonStandardSighashType { + sighash: var_sighash, + }; + } + 13 => { + let mut var_hash = ::sse_decode(deserializer); + return crate::api::error::PsbtError::InvalidHash { hash: var_hash }; + } + 14 => { + return crate::api::error::PsbtError::InvalidPreimageHashPair; + } + 15 => { + let mut var_xpub = ::sse_decode(deserializer); + return crate::api::error::PsbtError::CombineInconsistentKeySources { + xpub: var_xpub, + }; + } + 16 => { + let mut var_encodingError = ::sse_decode(deserializer); + return crate::api::error::PsbtError::ConsensusEncoding { + encoding_error: var_encodingError, + }; + } + 17 => { + return crate::api::error::PsbtError::NegativeFee; + } + 18 => { + return crate::api::error::PsbtError::FeeOverflow; + } + 19 => { + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::PsbtError::InvalidPublicKey { + error_message: var_errorMessage, + }; + } + 20 => { + let mut var_secp256K1Error = ::sse_decode(deserializer); + return crate::api::error::PsbtError::InvalidSecp256k1PublicKey { + secp256k1_error: var_secp256K1Error, + }; + } + 21 => { + return crate::api::error::PsbtError::InvalidXOnlyPublicKey; + } + 22 => { + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::PsbtError::InvalidEcdsaSignature { + error_message: var_errorMessage, + }; + } + 23 => { + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::PsbtError::InvalidTaprootSignature { + error_message: var_errorMessage, + }; + } + 24 => { + return crate::api::error::PsbtError::InvalidControlBlock; + } + 25 => { + return crate::api::error::PsbtError::InvalidLeafVersion; + } + 26 => { + return crate::api::error::PsbtError::Taproot; + } + 27 => { + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::PsbtError::TapTree { + error_message: var_errorMessage, + }; + } + 28 => { + return crate::api::error::PsbtError::XPubKey; + } + 29 => { + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::PsbtError::Version { + error_message: var_errorMessage, + }; + } + 30 => { + return crate::api::error::PsbtError::PartialDataConsumption; + } + 31 => { + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::PsbtError::Io { + error_message: var_errorMessage, + }; + } + 32 => { + return crate::api::error::PsbtError::OtherPsbtErr; + } + _ => { + unimplemented!(""); + } + } } } -impl SseDecode for u32 { +impl SseDecode for crate::api::error::PsbtParseError { // 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() + let mut tag_ = ::sse_decode(deserializer); + match tag_ { + 0 => { + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::PsbtParseError::PsbtEncoding { + error_message: var_errorMessage, + }; + } + 1 => { + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::PsbtParseError::Base64Encoding { + error_message: var_errorMessage, + }; + } + _ => { + unimplemented!(""); + } + } } } -impl SseDecode for u64 { +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 { - deserializer.cursor.read_u64::().unwrap() + 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 u8 { +impl SseDecode for (crate::api::bitcoin::FfiScriptBuf, 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_u8().unwrap() + let mut var_field0 = ::sse_decode(deserializer); + let mut var_field1 = ::sse_decode(deserializer); + return (var_field0, var_field1); } } -impl SseDecode for [u8; 4] { +impl SseDecode + for ( + std::collections::HashMap>, + 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 flutter_rust_bridge::for_generated::from_vec_to_array(inner); + let mut var_field0 = + >>::sse_decode(deserializer); + let mut var_field1 = ::sse_decode(deserializer); + return (var_field0, var_field1); } } -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 { +impl SseDecode for (String, Vec) { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - deserializer.cursor.read_u64::().unwrap() as _ + 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::Variant { +impl SseDecode for crate::api::error::RequestBuilderError { // 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), + 0 => crate::api::error::RequestBuilderError::RequestAlreadyConsumed, + _ => unreachable!("Invalid variant for RequestBuilderError: {}", inner), }; } } -impl SseDecode for crate::api::types::WitnessVersion { +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 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), + let mut var_trustWitnessUtxo = ::sse_decode(deserializer); + let mut var_assumeHeight = >::sse_decode(deserializer); + let mut var_allowAllSighashes = ::sse_decode(deserializer); + let mut var_tryFinalize = ::sse_decode(deserializer); + let mut var_signWithTapInternalKey = ::sse_decode(deserializer); + let mut var_allowGrinding = ::sse_decode(deserializer); + return crate::api::types::SignOptions { + trust_witness_utxo: var_trustWitnessUtxo, + assume_height: var_assumeHeight, + allow_all_sighashes: var_allowAllSighashes, + try_finalize: var_tryFinalize, + sign_with_tap_internal_key: var_signWithTapInternalKey, + allow_grinding: var_allowGrinding, }; } } -impl SseDecode for crate::api::types::WordCount { +impl SseDecode for crate::api::error::SignerError { // 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() + let mut tag_ = ::sse_decode(deserializer); + match tag_ { + 0 => { + return crate::api::error::SignerError::MissingKey; } - crate::api::error::AddressError::Bech32(field0) => { - [1.into_dart(), field0.into_into_dart().into_dart()].into_dart() + 1 => { + return crate::api::error::SignerError::InvalidKey; } - 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() + 2 => { + return crate::api::error::SignerError::UserCanceled; } - crate::api::error::AddressError::UnparsableWitnessVersion(field0) => { - [5.into_dart(), field0.into_into_dart().into_dart()].into_dart() + 3 => { + return crate::api::error::SignerError::InputIndexOutOfRange; } - 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() + 4 => { + return crate::api::error::SignerError::MissingNonWitnessUtxo; } - crate::api::error::AddressError::InvalidSegwitV0ProgramLength(field0) => { - [8.into_dart(), field0.into_into_dart().into_dart()].into_dart() + 5 => { + return crate::api::error::SignerError::InvalidNonWitnessUtxo; } - 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() + 6 => { + return crate::api::error::SignerError::MissingWitnessUtxo; + } + 7 => { + return crate::api::error::SignerError::MissingWitnessScript; + } + 8 => { + return crate::api::error::SignerError::MissingHdKeypath; + } + 9 => { + return crate::api::error::SignerError::NonStandardSighash; + } + 10 => { + return crate::api::error::SignerError::InvalidSighash; + } + 11 => { + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::SignerError::SighashP2wpkh { + error_message: var_errorMessage, + }; + } + 12 => { + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::SignerError::SighashTaproot { + error_message: var_errorMessage, + }; + } + 13 => { + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::SignerError::TxInputsIndexError { + error_message: var_errorMessage, + }; + } + 14 => { + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::SignerError::MiniscriptPsbt { + error_message: var_errorMessage, + }; + } + 15 => { + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::SignerError::External { + error_message: var_errorMessage, + }; + } + 16 => { + let mut var_errorMessage = ::sse_decode(deserializer); + return crate::api::error::SignerError::Psbt { + error_message: var_errorMessage, + }; } - crate::api::error::AddressError::NetworkValidation { - network_required, - network_found, - address, - } => [ - 13.into_dart(), - network_required.into_into_dart().into_dart(), - network_found.into_into_dart().into_dart(), - address.into_into_dart().into_dart(), - ] - .into_dart(), _ => { unimplemented!(""); } } } } -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::error::AddressError -{ + +impl SseDecode for crate::api::error::SqliteError { + // 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_rusqliteError = ::sse_decode(deserializer); + return crate::api::error::SqliteError::Sqlite { + rusqlite_error: var_rusqliteError, + }; + } + _ => { + unimplemented!(""); + } + } + } } -impl flutter_rust_bridge::IntoIntoDart - for crate::api::error::AddressError -{ - fn into_into_dart(self) -> crate::api::error::AddressError { - self + +impl SseDecode for crate::api::types::SyncProgress { + // 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_spksConsumed = ::sse_decode(deserializer); + let mut var_spksRemaining = ::sse_decode(deserializer); + let mut var_txidsConsumed = ::sse_decode(deserializer); + let mut var_txidsRemaining = ::sse_decode(deserializer); + let mut var_outpointsConsumed = ::sse_decode(deserializer); + let mut var_outpointsRemaining = ::sse_decode(deserializer); + return crate::api::types::SyncProgress { + spks_consumed: var_spksConsumed, + spks_remaining: var_spksRemaining, + txids_consumed: var_txidsConsumed, + txids_remaining: var_txidsRemaining, + outpoints_consumed: var_outpointsConsumed, + outpoints_remaining: var_outpointsRemaining, + }; } } -// 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() + +impl SseDecode for crate::api::error::TransactionError { + // 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::TransactionError::Io; } - crate::api::types::AddressIndex::Reset { index } => { - [3.into_dart(), index.into_into_dart().into_dart()].into_dart() + 1 => { + return crate::api::error::TransactionError::OversizedVectorAllocation; + } + 2 => { + let mut var_expected = ::sse_decode(deserializer); + let mut var_actual = ::sse_decode(deserializer); + return crate::api::error::TransactionError::InvalidChecksum { + expected: var_expected, + actual: var_actual, + }; + } + 3 => { + return crate::api::error::TransactionError::NonMinimalVarInt; + } + 4 => { + return crate::api::error::TransactionError::ParseFailed; + } + 5 => { + let mut var_flag = ::sse_decode(deserializer); + return crate::api::error::TransactionError::UnsupportedSegwitFlag { + flag: var_flag, + }; + } + 6 => { + return crate::api::error::TransactionError::OtherTransactionErr; } _ => { unimplemented!(""); @@ -3684,30 +4504,43 @@ impl flutter_rust_bridge::IntoDart for crate::api::types::AddressIndex { } } } -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::types::AddressIndex -{ + +impl SseDecode for crate::api::bitcoin::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::bitcoin::TxIn { + previous_output: var_previousOutput, + script_sig: var_scriptSig, + sequence: var_sequence, + witness: var_witness, + }; + } } -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::AddressIndex -{ - fn into_into_dart(self) -> crate::api::types::AddressIndex { - self + +impl SseDecode for crate::api::bitcoin::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::bitcoin::TxOut { + value: var_value, + script_pubkey: var_scriptPubkey, + }; } } -// 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 SseDecode for crate::api::error::TxidParseError { + // 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_txid = ::sse_decode(deserializer); + return crate::api::error::TxidParseError::InvalidTxid { txid: var_txid }; } _ => { unimplemented!(""); @@ -3715,387 +4548,338 @@ impl flutter_rust_bridge::IntoDart for crate::api::blockchain::Auth { } } } -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 + +impl SseDecode for u16 { + // 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_u16::().unwrap() } } -// 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 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 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 + +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() } } -// 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 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 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 - } + +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 {} } -// 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 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 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 + +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), + }; } } -// 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() + +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!(), } } -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 + +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::descriptor::BdkDescriptor { +impl flutter_rust_bridge::IntoDart for crate::api::types::AddressInfo { 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(), + self.index.into_into_dart().into_dart(), + self.address.into_into_dart().into_dart(), + self.keychain.into_into_dart().into_dart(), ] .into_dart() } } impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::descriptor::BdkDescriptor + for crate::api::types::AddressInfo { } -impl flutter_rust_bridge::IntoIntoDart - for crate::api::descriptor::BdkDescriptor +impl flutter_rust_bridge::IntoIntoDart + for crate::api::types::AddressInfo { - fn into_into_dart(self) -> crate::api::descriptor::BdkDescriptor { + 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::key::BdkDescriptorPublicKey { +impl flutter_rust_bridge::IntoDart for crate::api::error::AddressParseError { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [self.ptr.into_into_dart().into_dart()].into_dart() + match self { + crate::api::error::AddressParseError::Base58 => [0.into_dart()].into_dart(), + crate::api::error::AddressParseError::Bech32 => [1.into_dart()].into_dart(), + crate::api::error::AddressParseError::WitnessVersion { error_message } => { + [2.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::AddressParseError::WitnessProgram { error_message } => { + [3.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::AddressParseError::UnknownHrp => [4.into_dart()].into_dart(), + crate::api::error::AddressParseError::LegacyAddressTooLong => { + [5.into_dart()].into_dart() + } + crate::api::error::AddressParseError::InvalidBase58PayloadLength => { + [6.into_dart()].into_dart() + } + crate::api::error::AddressParseError::InvalidLegacyPrefix => { + [7.into_dart()].into_dart() + } + crate::api::error::AddressParseError::NetworkValidation => [8.into_dart()].into_dart(), + crate::api::error::AddressParseError::OtherAddressParseErr => { + [9.into_dart()].into_dart() + } + _ => { + unimplemented!(""); + } + } } } impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::key::BdkDescriptorPublicKey + for crate::api::error::AddressParseError { } -impl flutter_rust_bridge::IntoIntoDart - for crate::api::key::BdkDescriptorPublicKey +impl flutter_rust_bridge::IntoIntoDart + for crate::api::error::AddressParseError { - fn into_into_dart(self) -> crate::api::key::BdkDescriptorPublicKey { + fn into_into_dart(self) -> crate::api::error::AddressParseError { self } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::key::BdkDescriptorSecretKey { +impl flutter_rust_bridge::IntoDart for crate::api::types::Balance { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [self.ptr.into_into_dart().into_dart()].into_dart() + [ + 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::key::BdkDescriptorSecretKey -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::key::BdkDescriptorSecretKey -{ - fn into_into_dart(self) -> crate::api::key::BdkDescriptorSecretKey { +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::error::BdkError { +impl flutter_rust_bridge::IntoDart for crate::api::error::Bip32Error { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { match self { - crate::api::error::BdkError::Hex(field0) => { - [0.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Consensus(field0) => { - [1.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::VerifyTransaction(field0) => { - [2.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Address(field0) => { - [3.into_dart(), field0.into_into_dart().into_dart()].into_dart() + crate::api::error::Bip32Error::CannotDeriveFromHardenedKey => { + [0.into_dart()].into_dart() } - crate::api::error::BdkError::Descriptor(field0) => { - [4.into_dart(), field0.into_into_dart().into_dart()].into_dart() + crate::api::error::Bip32Error::Secp256k1 { error_message } => { + [1.into_dart(), error_message.into_into_dart().into_dart()].into_dart() } - crate::api::error::BdkError::InvalidU32Bytes(field0) => { - [5.into_dart(), field0.into_into_dart().into_dart()].into_dart() + crate::api::error::Bip32Error::InvalidChildNumber { child_number } => { + [2.into_dart(), child_number.into_into_dart().into_dart()].into_dart() } - crate::api::error::BdkError::Generic(field0) => { - [6.into_dart(), field0.into_into_dart().into_dart()].into_dart() + crate::api::error::Bip32Error::InvalidChildNumberFormat => [3.into_dart()].into_dart(), + crate::api::error::Bip32Error::InvalidDerivationPathFormat => { + [4.into_dart()].into_dart() } - crate::api::error::BdkError::ScriptDoesntHaveAddressForm => [7.into_dart()].into_dart(), - crate::api::error::BdkError::NoRecipients => [8.into_dart()].into_dart(), - crate::api::error::BdkError::NoUtxosSelected => [9.into_dart()].into_dart(), - crate::api::error::BdkError::OutputBelowDustLimit(field0) => { - [10.into_dart(), field0.into_into_dart().into_dart()].into_dart() + crate::api::error::Bip32Error::UnknownVersion { version } => { + [5.into_dart(), version.into_into_dart().into_dart()].into_dart() } - crate::api::error::BdkError::InsufficientFunds { needed, available } => [ - 11.into_dart(), - needed.into_into_dart().into_dart(), - available.into_into_dart().into_dart(), - ] - .into_dart(), - crate::api::error::BdkError::BnBTotalTriesExceeded => [12.into_dart()].into_dart(), - crate::api::error::BdkError::BnBNoExactMatch => [13.into_dart()].into_dart(), - crate::api::error::BdkError::UnknownUtxo => [14.into_dart()].into_dart(), - crate::api::error::BdkError::TransactionNotFound => [15.into_dart()].into_dart(), - crate::api::error::BdkError::TransactionConfirmed => [16.into_dart()].into_dart(), - crate::api::error::BdkError::IrreplaceableTransaction => [17.into_dart()].into_dart(), - crate::api::error::BdkError::FeeRateTooLow { needed } => { - [18.into_dart(), needed.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::FeeTooLow { needed } => { - [19.into_dart(), needed.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::FeeRateUnavailable => [20.into_dart()].into_dart(), - crate::api::error::BdkError::MissingKeyOrigin(field0) => { - [21.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Key(field0) => { - [22.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::ChecksumMismatch => [23.into_dart()].into_dart(), - crate::api::error::BdkError::SpendingPolicyRequired(field0) => { - [24.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::InvalidPolicyPathError(field0) => { - [25.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Signer(field0) => { - [26.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::InvalidNetwork { requested, found } => [ - 27.into_dart(), - requested.into_into_dart().into_dart(), - found.into_into_dart().into_dart(), - ] - .into_dart(), - crate::api::error::BdkError::InvalidOutpoint(field0) => { - [28.into_dart(), field0.into_into_dart().into_dart()].into_dart() + crate::api::error::Bip32Error::WrongExtendedKeyLength { length } => { + [6.into_dart(), length.into_into_dart().into_dart()].into_dart() } - crate::api::error::BdkError::Encode(field0) => { - [29.into_dart(), field0.into_into_dart().into_dart()].into_dart() + crate::api::error::Bip32Error::Base58 { error_message } => { + [7.into_dart(), error_message.into_into_dart().into_dart()].into_dart() } - crate::api::error::BdkError::Miniscript(field0) => { - [30.into_dart(), field0.into_into_dart().into_dart()].into_dart() + crate::api::error::Bip32Error::Hex { error_message } => { + [8.into_dart(), error_message.into_into_dart().into_dart()].into_dart() } - crate::api::error::BdkError::MiniscriptPsbt(field0) => { - [31.into_dart(), field0.into_into_dart().into_dart()].into_dart() + crate::api::error::Bip32Error::InvalidPublicKeyHexLength { length } => { + [9.into_dart(), length.into_into_dart().into_dart()].into_dart() } - crate::api::error::BdkError::Bip32(field0) => { - [32.into_dart(), field0.into_into_dart().into_dart()].into_dart() + crate::api::error::Bip32Error::UnknownError { error_message } => { + [10.into_dart(), error_message.into_into_dart().into_dart()].into_dart() } - crate::api::error::BdkError::Bip39(field0) => { - [33.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Secp256k1(field0) => { - [34.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Json(field0) => { - [35.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Psbt(field0) => { - [36.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::PsbtParse(field0) => { - [37.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::MissingCachedScripts(field0, field1) => [ - 38.into_dart(), - field0.into_into_dart().into_dart(), - field1.into_into_dart().into_dart(), - ] - .into_dart(), - crate::api::error::BdkError::Electrum(field0) => { - [39.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Esplora(field0) => { - [40.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Sled(field0) => { - [41.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Rpc(field0) => { - [42.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::Rusqlite(field0) => { - [43.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::InvalidInput(field0) => { - [44.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::InvalidLockTime(field0) => { - [45.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::error::BdkError::InvalidTransaction(field0) => { - [46.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - _ => { - unimplemented!(""); + _ => { + unimplemented!(""); } } } } -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::error::BdkError {} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::error::BdkError +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::error::Bip32Error {} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::error::Bip32Error { - fn into_into_dart(self) -> crate::api::error::BdkError { + fn into_into_dart(self) -> crate::api::error::Bip32Error { self } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::key::BdkMnemonic { +impl flutter_rust_bridge::IntoDart for crate::api::error::Bip39Error { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [self.ptr.into_into_dart().into_dart()].into_dart() + match self { + crate::api::error::Bip39Error::BadWordCount { word_count } => { + [0.into_dart(), word_count.into_into_dart().into_dart()].into_dart() + } + crate::api::error::Bip39Error::UnknownWord { index } => { + [1.into_dart(), index.into_into_dart().into_dart()].into_dart() + } + crate::api::error::Bip39Error::BadEntropyBitCount { bit_count } => { + [2.into_dart(), bit_count.into_into_dart().into_dart()].into_dart() + } + crate::api::error::Bip39Error::InvalidChecksum => [3.into_dart()].into_dart(), + crate::api::error::Bip39Error::AmbiguousLanguages { languages } => { + [4.into_dart(), languages.into_into_dart().into_dart()].into_dart() + } + crate::api::error::Bip39Error::Generic { error_message } => { + [5.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + _ => { + unimplemented!(""); + } + } } } -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::key::BdkMnemonic {} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::key::BdkMnemonic +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::error::Bip39Error {} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::error::Bip39Error { - fn into_into_dart(self) -> crate::api::key::BdkMnemonic { + fn into_into_dart(self) -> crate::api::error::Bip39Error { self } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::psbt::BdkPsbt { +impl flutter_rust_bridge::IntoDart for crate::api::types::BlockId { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [self.ptr.into_into_dart().into_dart()].into_dart() + [ + self.height.into_into_dart().into_dart(), + self.hash.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 { +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::BlockId {} +impl flutter_rust_bridge::IntoIntoDart for crate::api::types::BlockId { + fn into_into_dart(self) -> crate::api::types::BlockId { self } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::BdkScriptBuf { +impl flutter_rust_bridge::IntoDart for crate::api::error::CalculateFeeError { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [self.bytes.into_into_dart().into_dart()].into_dart() + match self { + crate::api::error::CalculateFeeError::Generic { error_message } => { + [0.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::CalculateFeeError::MissingTxOut { out_points } => { + [1.into_dart(), out_points.into_into_dart().into_dart()].into_dart() + } + crate::api::error::CalculateFeeError::NegativeFee { amount } => { + [2.into_dart(), amount.into_into_dart().into_dart()].into_dart() + } + _ => { + unimplemented!(""); + } + } } } impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::types::BdkScriptBuf + for crate::api::error::CalculateFeeError { } -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::BdkScriptBuf +impl flutter_rust_bridge::IntoIntoDart + for crate::api::error::CalculateFeeError { - fn into_into_dart(self) -> crate::api::types::BdkScriptBuf { + fn into_into_dart(self) -> crate::api::error::CalculateFeeError { self } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::BdkTransaction { +impl flutter_rust_bridge::IntoDart for crate::api::error::CannotConnectError { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [self.s.into_into_dart().into_dart()].into_dart() + match self { + crate::api::error::CannotConnectError::Include { height } => { + [0.into_dart(), height.into_into_dart().into_dart()].into_dart() + } + _ => { + unimplemented!(""); + } + } } } impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::types::BdkTransaction -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::BdkTransaction + for crate::api::error::CannotConnectError { - 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 +impl flutter_rust_bridge::IntoIntoDart + for crate::api::error::CannotConnectError { - fn into_into_dart(self) -> crate::api::types::BlockTime { + fn into_into_dart(self) -> crate::api::error::CannotConnectError { self } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::blockchain::BlockchainConfig { +impl flutter_rust_bridge::IntoDart for crate::api::types::ChainPosition { 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() + crate::api::types::ChainPosition::Confirmed { + confirmation_block_time, + } => [ + 0.into_dart(), + confirmation_block_time.into_into_dart().into_dart(), + ] + .into_dart(), + crate::api::types::ChainPosition::Unconfirmed { timestamp } => { + [1.into_dart(), timestamp.into_into_dart().into_dart()].into_dart() } _ => { unimplemented!(""); @@ -4104,13 +4888,13 @@ impl flutter_rust_bridge::IntoDart for crate::api::blockchain::BlockchainConfig } } impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::blockchain::BlockchainConfig + for crate::api::types::ChainPosition { } -impl flutter_rust_bridge::IntoIntoDart - for crate::api::blockchain::BlockchainConfig +impl flutter_rust_bridge::IntoIntoDart + for crate::api::types::ChainPosition { - fn into_into_dart(self) -> crate::api::blockchain::BlockchainConfig { + fn into_into_dart(self) -> crate::api::types::ChainPosition { self } } @@ -4137,30 +4921,109 @@ impl flutter_rust_bridge::IntoIntoDart } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::error::ConsensusError { +impl flutter_rust_bridge::IntoDart for crate::api::types::ConfirmationBlockTime { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.block_id.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::ConfirmationBlockTime +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::types::ConfirmationBlockTime +{ + fn into_into_dart(self) -> crate::api::types::ConfirmationBlockTime { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::error::CreateTxError { 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::CreateTxError::TransactionNotFound { txid } => { + [0.into_dart(), txid.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(), + crate::api::error::CreateTxError::TransactionConfirmed { txid } => { + [1.into_dart(), txid.into_into_dart().into_dart()].into_dart() + } + crate::api::error::CreateTxError::IrreplaceableTransaction { txid } => { + [2.into_dart(), txid.into_into_dart().into_dart()].into_dart() + } + crate::api::error::CreateTxError::FeeRateUnavailable => [3.into_dart()].into_dart(), + crate::api::error::CreateTxError::Generic { error_message } => { + [4.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::CreateTxError::Descriptor { error_message } => { + [5.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::CreateTxError::Policy { error_message } => { + [6.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::CreateTxError::SpendingPolicyRequired { kind } => { + [7.into_dart(), kind.into_into_dart().into_dart()].into_dart() + } + crate::api::error::CreateTxError::Version0 => [8.into_dart()].into_dart(), + crate::api::error::CreateTxError::Version1Csv => [9.into_dart()].into_dart(), + crate::api::error::CreateTxError::LockTime { + requested_time, + required_time, + } => [ + 10.into_dart(), + requested_time.into_into_dart().into_dart(), + required_time.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(), + crate::api::error::CreateTxError::RbfSequence => [11.into_dart()].into_dart(), + crate::api::error::CreateTxError::RbfSequenceCsv { rbf, csv } => [ + 12.into_dart(), + rbf.into_into_dart().into_dart(), + csv.into_into_dart().into_dart(), + ] + .into_dart(), + crate::api::error::CreateTxError::FeeTooLow { fee_required } => { + [13.into_dart(), fee_required.into_into_dart().into_dart()].into_dart() + } + crate::api::error::CreateTxError::FeeRateTooLow { fee_rate_required } => [ + 14.into_dart(), + fee_rate_required.into_into_dart().into_dart(), + ] + .into_dart(), + crate::api::error::CreateTxError::NoUtxosSelected => [15.into_dart()].into_dart(), + crate::api::error::CreateTxError::OutputBelowDustLimit { index } => { + [16.into_dart(), index.into_into_dart().into_dart()].into_dart() + } + crate::api::error::CreateTxError::ChangePolicyDescriptor => { + [17.into_dart()].into_dart() + } + crate::api::error::CreateTxError::CoinSelection { error_message } => { + [18.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::CreateTxError::InsufficientFunds { needed, available } => [ + 19.into_dart(), + needed.into_into_dart().into_dart(), + available.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::CreateTxError::NoRecipients => [20.into_dart()].into_dart(), + crate::api::error::CreateTxError::Psbt { error_message } => { + [21.into_dart(), error_message.into_into_dart().into_dart()].into_dart() } - crate::api::error::ConsensusError::UnsupportedSegwitFlag(field0) => { - [5.into_dart(), field0.into_into_dart().into_dart()].into_dart() + crate::api::error::CreateTxError::MissingKeyOrigin { key } => { + [22.into_dart(), key.into_into_dart().into_dart()].into_dart() + } + crate::api::error::CreateTxError::UnknownUtxo { outpoint } => { + [23.into_dart(), outpoint.into_into_dart().into_dart()].into_dart() + } + crate::api::error::CreateTxError::MissingNonWitnessUtxo { outpoint } => { + [24.into_dart(), outpoint.into_into_dart().into_dart()].into_dart() + } + crate::api::error::CreateTxError::MiniscriptPsbt { error_message } => { + [25.into_dart(), error_message.into_into_dart().into_dart()].into_dart() } _ => { unimplemented!(""); @@ -4169,26 +5032,28 @@ impl flutter_rust_bridge::IntoDart for crate::api::error::ConsensusError { } } impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::error::ConsensusError + for crate::api::error::CreateTxError { } -impl flutter_rust_bridge::IntoIntoDart - for crate::api::error::ConsensusError +impl flutter_rust_bridge::IntoIntoDart + for crate::api::error::CreateTxError { - fn into_into_dart(self) -> crate::api::error::ConsensusError { + fn into_into_dart(self) -> crate::api::error::CreateTxError { self } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::DatabaseConfig { +impl flutter_rust_bridge::IntoDart for crate::api::error::CreateWithPersistError { 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::error::CreateWithPersistError::Persist { error_message } => { + [0.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::CreateWithPersistError::DataAlreadyExists => { + [1.into_dart()].into_dart() } - crate::api::types::DatabaseConfig::Sled { config } => { - [2.into_dart(), config.into_into_dart().into_dart()].into_dart() + crate::api::error::CreateWithPersistError::Descriptor { error_message } => { + [2.into_dart(), error_message.into_into_dart().into_dart()].into_dart() } _ => { unimplemented!(""); @@ -4197,13 +5062,13 @@ impl flutter_rust_bridge::IntoDart for crate::api::types::DatabaseConfig { } } impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::types::DatabaseConfig + for crate::api::error::CreateWithPersistError { } -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::DatabaseConfig +impl flutter_rust_bridge::IntoIntoDart + for crate::api::error::CreateWithPersistError { - fn into_into_dart(self) -> crate::api::types::DatabaseConfig { + fn into_into_dart(self) -> crate::api::error::CreateWithPersistError { self } } @@ -4212,36 +5077,43 @@ 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::MissingPrivateData => [1.into_dart()].into_dart(), crate::api::error::DescriptorError::InvalidDescriptorChecksum => { - [1.into_dart()].into_dart() + [2.into_dart()].into_dart() } crate::api::error::DescriptorError::HardenedDerivationXpub => { - [2.into_dart()].into_dart() + [3.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::MultiPath => [4.into_dart()].into_dart(), + crate::api::error::DescriptorError::Key { error_message } => { + [5.into_dart(), error_message.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::Generic { error_message } => { + [6.into_dart(), error_message.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::Policy { error_message } => { + [7.into_dart(), error_message.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::InvalidDescriptorCharacter { charector } => { + [8.into_dart(), charector.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::Bip32 { error_message } => { + [9.into_dart(), error_message.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::Base58 { error_message } => { + [10.into_dart(), error_message.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::Pk { error_message } => { + [11.into_dart(), error_message.into_into_dart().into_dart()].into_dart() } - crate::api::error::DescriptorError::Hex(field0) => { - [11.into_dart(), field0.into_into_dart().into_dart()].into_dart() + crate::api::error::DescriptorError::Miniscript { error_message } => { + [12.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::DescriptorError::Hex { error_message } => { + [13.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::DescriptorError::ExternalAndInternalAreTheSame => { + [14.into_dart()].into_dart() } _ => { unimplemented!(""); @@ -4261,697 +5133,893 @@ impl flutter_rust_bridge::IntoIntoDart } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::blockchain::ElectrumConfig { +impl flutter_rust_bridge::IntoDart for crate::api::error::DescriptorKeyError { 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() + match self { + crate::api::error::DescriptorKeyError::Parse { error_message } => { + [0.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::DescriptorKeyError::InvalidKeyType => [1.into_dart()].into_dart(), + crate::api::error::DescriptorKeyError::Bip32 { error_message } => { + [2.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + _ => { + unimplemented!(""); + } + } } } impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::blockchain::ElectrumConfig + for crate::api::error::DescriptorKeyError { } -impl flutter_rust_bridge::IntoIntoDart - for crate::api::blockchain::ElectrumConfig +impl flutter_rust_bridge::IntoIntoDart + for crate::api::error::DescriptorKeyError { - fn into_into_dart(self) -> crate::api::blockchain::ElectrumConfig { + fn into_into_dart(self) -> crate::api::error::DescriptorKeyError { self } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::blockchain::EsploraConfig { +impl flutter_rust_bridge::IntoDart for crate::api::error::ElectrumError { 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() + match self { + crate::api::error::ElectrumError::IOError { error_message } => { + [0.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::ElectrumError::Json { error_message } => { + [1.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::ElectrumError::Hex { error_message } => { + [2.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::ElectrumError::Protocol { error_message } => { + [3.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::ElectrumError::Bitcoin { error_message } => { + [4.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::ElectrumError::AlreadySubscribed => [5.into_dart()].into_dart(), + crate::api::error::ElectrumError::NotSubscribed => [6.into_dart()].into_dart(), + crate::api::error::ElectrumError::InvalidResponse { error_message } => { + [7.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::ElectrumError::Message { error_message } => { + [8.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::ElectrumError::InvalidDNSNameError { domain } => { + [9.into_dart(), domain.into_into_dart().into_dart()].into_dart() + } + crate::api::error::ElectrumError::MissingDomain => [10.into_dart()].into_dart(), + crate::api::error::ElectrumError::AllAttemptsErrored => [11.into_dart()].into_dart(), + crate::api::error::ElectrumError::SharedIOError { error_message } => { + [12.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::ElectrumError::CouldntLockReader => [13.into_dart()].into_dart(), + crate::api::error::ElectrumError::Mpsc => [14.into_dart()].into_dart(), + crate::api::error::ElectrumError::CouldNotCreateConnection { error_message } => { + [15.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::ElectrumError::RequestAlreadyConsumed => { + [16.into_dart()].into_dart() + } + _ => { + unimplemented!(""); + } + } } } impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::blockchain::EsploraConfig + for crate::api::error::ElectrumError { } -impl flutter_rust_bridge::IntoIntoDart - for crate::api::blockchain::EsploraConfig +impl flutter_rust_bridge::IntoIntoDart + for crate::api::error::ElectrumError { - fn into_into_dart(self) -> crate::api::blockchain::EsploraConfig { + fn into_into_dart(self) -> crate::api::error::ElectrumError { self } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::FeeRate { +impl flutter_rust_bridge::IntoDart for crate::api::error::EsploraError { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [self.sat_per_vb.into_into_dart().into_dart()].into_dart() + match self { + crate::api::error::EsploraError::Minreq { error_message } => { + [0.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::EsploraError::HttpResponse { + status, + error_message, + } => [ + 1.into_dart(), + status.into_into_dart().into_dart(), + error_message.into_into_dart().into_dart(), + ] + .into_dart(), + crate::api::error::EsploraError::Parsing { error_message } => { + [2.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::EsploraError::StatusCode { error_message } => { + [3.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::EsploraError::BitcoinEncoding { error_message } => { + [4.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::EsploraError::HexToArray { error_message } => { + [5.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::EsploraError::HexToBytes { error_message } => { + [6.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::EsploraError::TransactionNotFound => [7.into_dart()].into_dart(), + crate::api::error::EsploraError::HeaderHeightNotFound { height } => { + [8.into_dart(), height.into_into_dart().into_dart()].into_dart() + } + crate::api::error::EsploraError::HeaderHashNotFound => [9.into_dart()].into_dart(), + crate::api::error::EsploraError::InvalidHttpHeaderName { name } => { + [10.into_dart(), name.into_into_dart().into_dart()].into_dart() + } + crate::api::error::EsploraError::InvalidHttpHeaderValue { value } => { + [11.into_dart(), value.into_into_dart().into_dart()].into_dart() + } + crate::api::error::EsploraError::RequestAlreadyConsumed => [12.into_dart()].into_dart(), + _ => { + unimplemented!(""); + } + } } } -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 { +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::error::EsploraError +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::error::EsploraError +{ + fn into_into_dart(self) -> crate::api::error::EsploraError { self } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::error::HexError { +impl flutter_rust_bridge::IntoDart for crate::api::error::ExtractTxError { 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::ExtractTxError::AbsurdFeeRate { fee_rate } => { + [0.into_dart(), fee_rate.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(), + crate::api::error::ExtractTxError::MissingInputValue => [1.into_dart()].into_dart(), + crate::api::error::ExtractTxError::SendingTooMuch => [2.into_dart()].into_dart(), + crate::api::error::ExtractTxError::OtherExtractTxErr => [3.into_dart()].into_dart(), _ => { unimplemented!(""); } } } } -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::error::HexError {} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::error::HexError +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::error::ExtractTxError +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::error::ExtractTxError { - fn into_into_dart(self) -> crate::api::error::HexError { + fn into_into_dart(self) -> crate::api::error::ExtractTxError { self } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::Input { +impl flutter_rust_bridge::IntoDart for crate::api::bitcoin::FeeRate { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [self.s.into_into_dart().into_dart()].into_dart() + [self.sat_kwu.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 { +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::bitcoin::FeeRate {} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::bitcoin::FeeRate +{ + fn into_into_dart(self) -> crate::api::bitcoin::FeeRate { self } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::KeychainKind { +impl flutter_rust_bridge::IntoDart for crate::api::bitcoin::FfiAddress { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - match self { - Self::ExternalChain => 0.into_dart(), - Self::InternalChain => 1.into_dart(), - _ => unreachable!(), - } + [self.0.into_into_dart().into_dart()].into_dart() } } impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::types::KeychainKind + for crate::api::bitcoin::FfiAddress { } -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::KeychainKind +impl flutter_rust_bridge::IntoIntoDart + for crate::api::bitcoin::FfiAddress { - fn into_into_dart(self) -> crate::api::types::KeychainKind { + fn into_into_dart(self) -> crate::api::bitcoin::FfiAddress { self } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::LocalUtxo { +impl flutter_rust_bridge::IntoDart for crate::api::types::FfiCanonicalTx { 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(), + self.transaction.into_into_dart().into_dart(), + self.chain_position.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 +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::types::FfiCanonicalTx +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::types::FfiCanonicalTx { - fn into_into_dart(self) -> crate::api::types::LocalUtxo { + fn into_into_dart(self) -> crate::api::types::FfiCanonicalTx { self } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::LockTime { +impl flutter_rust_bridge::IntoDart for crate::api::store::FfiConnection { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - match self { - crate::api::types::LockTime::Blocks(field0) => { - [0.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - crate::api::types::LockTime::Seconds(field0) => { - [1.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - _ => { - unimplemented!(""); - } - } + [self.0.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 +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::store::FfiConnection { - fn into_into_dart(self) -> crate::api::types::LockTime { +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::store::FfiConnection +{ + fn into_into_dart(self) -> crate::api::store::FfiConnection { self } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::Network { +impl flutter_rust_bridge::IntoDart for crate::api::key::FfiDerivationPath { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - match self { - Self::Testnet => 0.into_dart(), - Self::Regtest => 1.into_dart(), - Self::Bitcoin => 2.into_dart(), - Self::Signet => 3.into_dart(), - _ => unreachable!(), - } + [self.opaque.into_into_dart().into_dart()].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 { +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::key::FfiDerivationPath +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::key::FfiDerivationPath +{ + fn into_into_dart(self) -> crate::api::key::FfiDerivationPath { self } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::OutPoint { +impl flutter_rust_bridge::IntoDart for crate::api::descriptor::FfiDescriptor { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { [ - self.txid.into_into_dart().into_dart(), - self.vout.into_into_dart().into_dart(), + 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::types::OutPoint {} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::OutPoint +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::descriptor::FfiDescriptor +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::descriptor::FfiDescriptor { - fn into_into_dart(self) -> crate::api::types::OutPoint { + fn into_into_dart(self) -> crate::api::descriptor::FfiDescriptor { self } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::Payload { +impl flutter_rust_bridge::IntoDart for crate::api::key::FfiDescriptorPublicKey { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - match self { - crate::api::types::Payload::PubkeyHash { pubkey_hash } => { - [0.into_dart(), pubkey_hash.into_into_dart().into_dart()].into_dart() - } - crate::api::types::Payload::ScriptHash { script_hash } => { - [1.into_dart(), script_hash.into_into_dart().into_dart()].into_dart() - } - crate::api::types::Payload::WitnessProgram { version, program } => [ - 2.into_dart(), - version.into_into_dart().into_dart(), - program.into_into_dart().into_dart(), - ] - .into_dart(), - _ => { - unimplemented!(""); - } - } + [self.opaque.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 { +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::key::FfiDescriptorPublicKey +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::key::FfiDescriptorPublicKey +{ + fn into_into_dart(self) -> crate::api::key::FfiDescriptorPublicKey { self } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::PsbtSigHashType { +impl flutter_rust_bridge::IntoDart for crate::api::key::FfiDescriptorSecretKey { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [self.inner.into_into_dart().into_dart()].into_dart() + [self.opaque.into_into_dart().into_dart()].into_dart() } } impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::types::PsbtSigHashType + for crate::api::key::FfiDescriptorSecretKey { } -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::PsbtSigHashType +impl flutter_rust_bridge::IntoIntoDart + for crate::api::key::FfiDescriptorSecretKey { - fn into_into_dart(self) -> crate::api::types::PsbtSigHashType { + fn into_into_dart(self) -> crate::api::key::FfiDescriptorSecretKey { self } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::RbfValue { +impl flutter_rust_bridge::IntoDart for crate::api::electrum::FfiElectrumClient { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - match self { - crate::api::types::RbfValue::RbfDefault => [0.into_dart()].into_dart(), - crate::api::types::RbfValue::Value(field0) => { - [1.into_dart(), field0.into_into_dart().into_dart()].into_dart() - } - _ => { - unimplemented!(""); - } - } + [self.opaque.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 +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::electrum::FfiElectrumClient { - fn into_into_dart(self) -> crate::api::types::RbfValue { +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::electrum::FfiElectrumClient +{ + fn into_into_dart(self) -> crate::api::electrum::FfiElectrumClient { self } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::blockchain::RpcConfig { +impl flutter_rust_bridge::IntoDart for crate::api::esplora::FfiEsploraClient { 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() + [self.opaque.into_into_dart().into_dart()].into_dart() } } impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::blockchain::RpcConfig + for crate::api::esplora::FfiEsploraClient { } -impl flutter_rust_bridge::IntoIntoDart - for crate::api::blockchain::RpcConfig +impl flutter_rust_bridge::IntoIntoDart + for crate::api::esplora::FfiEsploraClient { - fn into_into_dart(self) -> crate::api::blockchain::RpcConfig { + fn into_into_dart(self) -> crate::api::esplora::FfiEsploraClient { self } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::blockchain::RpcSyncParams { +impl flutter_rust_bridge::IntoDart for crate::api::types::FfiFullScanRequest { 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() + [self.0.into_into_dart().into_dart()].into_dart() } } impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::blockchain::RpcSyncParams + for crate::api::types::FfiFullScanRequest { } -impl flutter_rust_bridge::IntoIntoDart - for crate::api::blockchain::RpcSyncParams +impl flutter_rust_bridge::IntoIntoDart + for crate::api::types::FfiFullScanRequest { - fn into_into_dart(self) -> crate::api::blockchain::RpcSyncParams { + fn into_into_dart(self) -> crate::api::types::FfiFullScanRequest { self } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::ScriptAmount { +impl flutter_rust_bridge::IntoDart for crate::api::types::FfiFullScanRequestBuilder { 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() + [self.0.into_into_dart().into_dart()].into_dart() } } impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::types::ScriptAmount + for crate::api::types::FfiFullScanRequestBuilder { } -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::ScriptAmount +impl flutter_rust_bridge::IntoIntoDart + for crate::api::types::FfiFullScanRequestBuilder { - fn into_into_dart(self) -> crate::api::types::ScriptAmount { + fn into_into_dart(self) -> crate::api::types::FfiFullScanRequestBuilder { self } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::SignOptions { +impl flutter_rust_bridge::IntoDart for crate::api::key::FfiMnemonic { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [ - self.trust_witness_utxo.into_into_dart().into_dart(), - self.assume_height.into_into_dart().into_dart(), - self.allow_all_sighashes.into_into_dart().into_dart(), - self.remove_partial_sigs.into_into_dart().into_dart(), - self.try_finalize.into_into_dart().into_dart(), - self.sign_with_tap_internal_key.into_into_dart().into_dart(), - self.allow_grinding.into_into_dart().into_dart(), - ] - .into_dart() + [self.opaque.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::key::FfiMnemonic {} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::key::FfiMnemonic +{ + fn into_into_dart(self) -> crate::api::key::FfiMnemonic { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::types::FfiPolicy { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.opaque.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::FfiPolicy {} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::types::FfiPolicy +{ + fn into_into_dart(self) -> crate::api::types::FfiPolicy { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::bitcoin::FfiPsbt { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.opaque.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::bitcoin::FfiPsbt {} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::bitcoin::FfiPsbt +{ + fn into_into_dart(self) -> crate::api::bitcoin::FfiPsbt { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::bitcoin::FfiScriptBuf { + 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::SignOptions + for crate::api::bitcoin::FfiScriptBuf { } -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::SignOptions +impl flutter_rust_bridge::IntoIntoDart + for crate::api::bitcoin::FfiScriptBuf { - fn into_into_dart(self) -> crate::api::types::SignOptions { + fn into_into_dart(self) -> crate::api::bitcoin::FfiScriptBuf { self } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::SledDbConfiguration { +impl flutter_rust_bridge::IntoDart for crate::api::types::FfiSyncRequest { 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() + [self.0.into_into_dart().into_dart()].into_dart() } } impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::types::SledDbConfiguration + for crate::api::types::FfiSyncRequest { } -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::SledDbConfiguration +impl flutter_rust_bridge::IntoIntoDart + for crate::api::types::FfiSyncRequest { - fn into_into_dart(self) -> crate::api::types::SledDbConfiguration { + fn into_into_dart(self) -> crate::api::types::FfiSyncRequest { self } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::SqliteDbConfiguration { +impl flutter_rust_bridge::IntoDart for crate::api::types::FfiSyncRequestBuilder { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [self.path.into_into_dart().into_dart()].into_dart() + [self.0.into_into_dart().into_dart()].into_dart() } } impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::types::SqliteDbConfiguration + for crate::api::types::FfiSyncRequestBuilder { } -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::SqliteDbConfiguration +impl flutter_rust_bridge::IntoIntoDart + for crate::api::types::FfiSyncRequestBuilder { - fn into_into_dart(self) -> crate::api::types::SqliteDbConfiguration { + fn into_into_dart(self) -> crate::api::types::FfiSyncRequestBuilder { self } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::TransactionDetails { +impl flutter_rust_bridge::IntoDart for crate::api::bitcoin::FfiTransaction { 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() + [self.opaque.into_into_dart().into_dart()].into_dart() } } impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::types::TransactionDetails + for crate::api::bitcoin::FfiTransaction { } -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::TransactionDetails +impl flutter_rust_bridge::IntoIntoDart + for crate::api::bitcoin::FfiTransaction { - fn into_into_dart(self) -> crate::api::types::TransactionDetails { + fn into_into_dart(self) -> crate::api::bitcoin::FfiTransaction { self } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::TxIn { +impl flutter_rust_bridge::IntoDart for crate::api::types::FfiUpdate { 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() + [self.0.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 { +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::FfiUpdate {} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::types::FfiUpdate +{ + fn into_into_dart(self) -> crate::api::types::FfiUpdate { self } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::TxOut { +impl flutter_rust_bridge::IntoDart for crate::api::wallet::FfiWallet { 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() + [self.opaque.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 { +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::wallet::FfiWallet {} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::wallet::FfiWallet +{ + fn into_into_dart(self) -> crate::api::wallet::FfiWallet { self } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::Variant { +impl flutter_rust_bridge::IntoDart for crate::api::error::FromScriptError { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { match self { - Self::Bech32 => 0.into_dart(), - Self::Bech32m => 1.into_dart(), - _ => unreachable!(), + crate::api::error::FromScriptError::UnrecognizedScript => [0.into_dart()].into_dart(), + crate::api::error::FromScriptError::WitnessProgram { error_message } => { + [1.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::FromScriptError::WitnessVersion { error_message } => { + [2.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::FromScriptError::OtherFromScriptErr => [3.into_dart()].into_dart(), + _ => { + unimplemented!(""); + } } } } -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 { +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::error::FromScriptError +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::error::FromScriptError +{ + fn into_into_dart(self) -> crate::api::error::FromScriptError { self } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::api::types::WitnessVersion { +impl flutter_rust_bridge::IntoDart for crate::api::types::KeychainKind { 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(), + Self::ExternalChain => 0.into_dart(), + Self::InternalChain => 1.into_dart(), _ => unreachable!(), } } } impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::api::types::WitnessVersion + for crate::api::types::KeychainKind { } -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::WitnessVersion +impl flutter_rust_bridge::IntoIntoDart + for crate::api::types::KeychainKind { - fn into_into_dart(self) -> crate::api::types::WitnessVersion { + 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::WordCount { +impl flutter_rust_bridge::IntoDart for crate::api::error::LoadWithPersistError { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { match self { - Self::Words12 => 0.into_dart(), - Self::Words18 => 1.into_dart(), - Self::Words24 => 2.into_dart(), - _ => unreachable!(), + crate::api::error::LoadWithPersistError::Persist { error_message } => { + [0.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::LoadWithPersistError::InvalidChangeSet { error_message } => { + [1.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::LoadWithPersistError::CouldNotLoad => [2.into_dart()].into_dart(), + _ => { + unimplemented!(""); + } } } } -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::WordCount {} -impl flutter_rust_bridge::IntoIntoDart - for crate::api::types::WordCount +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::error::LoadWithPersistError { - fn into_into_dart(self) -> crate::api::types::WordCount { +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::error::LoadWithPersistError +{ + fn into_into_dart(self) -> crate::api::error::LoadWithPersistError { 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); +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::types::LocalOutput { + 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 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 flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::types::LocalOutput +{ } - -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 flutter_rust_bridge::IntoIntoDart + for crate::api::types::LocalOutput +{ + fn into_into_dart(self) -> crate::api::types::LocalOutput { + 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); +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::types::LockTime { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + crate::api::types::LockTime::Blocks(field0) => { + [0.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + crate::api::types::LockTime::Seconds(field0) => { + [1.into_dart(), field0.into_into_dart().into_dart()].into_dart() + } + _ => { + unimplemented!(""); + } + } } } - -impl 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 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 } } - -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); +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::types::Network { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + Self::Testnet => 0.into_dart(), + Self::Regtest => 1.into_dart(), + Self::Bitcoin => 2.into_dart(), + Self::Signet => 3.into_dart(), + _ => unreachable!(), + } } } - -impl 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 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 } } - -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); +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::bitcoin::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 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 flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::bitcoin::OutPoint {} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::bitcoin::OutPoint +{ + fn into_into_dart(self) -> crate::api::bitcoin::OutPoint { + 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); +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::error::PsbtError { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + crate::api::error::PsbtError::InvalidMagic => [0.into_dart()].into_dart(), + crate::api::error::PsbtError::MissingUtxo => [1.into_dart()].into_dart(), + crate::api::error::PsbtError::InvalidSeparator => [2.into_dart()].into_dart(), + crate::api::error::PsbtError::PsbtUtxoOutOfBounds => [3.into_dart()].into_dart(), + crate::api::error::PsbtError::InvalidKey { key } => { + [4.into_dart(), key.into_into_dart().into_dart()].into_dart() + } + crate::api::error::PsbtError::InvalidProprietaryKey => [5.into_dart()].into_dart(), + crate::api::error::PsbtError::DuplicateKey { key } => { + [6.into_dart(), key.into_into_dart().into_dart()].into_dart() + } + crate::api::error::PsbtError::UnsignedTxHasScriptSigs => [7.into_dart()].into_dart(), + crate::api::error::PsbtError::UnsignedTxHasScriptWitnesses => { + [8.into_dart()].into_dart() + } + crate::api::error::PsbtError::MustHaveUnsignedTx => [9.into_dart()].into_dart(), + crate::api::error::PsbtError::NoMorePairs => [10.into_dart()].into_dart(), + crate::api::error::PsbtError::UnexpectedUnsignedTx => [11.into_dart()].into_dart(), + crate::api::error::PsbtError::NonStandardSighashType { sighash } => { + [12.into_dart(), sighash.into_into_dart().into_dart()].into_dart() + } + crate::api::error::PsbtError::InvalidHash { hash } => { + [13.into_dart(), hash.into_into_dart().into_dart()].into_dart() + } + crate::api::error::PsbtError::InvalidPreimageHashPair => [14.into_dart()].into_dart(), + crate::api::error::PsbtError::CombineInconsistentKeySources { xpub } => { + [15.into_dart(), xpub.into_into_dart().into_dart()].into_dart() + } + crate::api::error::PsbtError::ConsensusEncoding { encoding_error } => { + [16.into_dart(), encoding_error.into_into_dart().into_dart()].into_dart() + } + crate::api::error::PsbtError::NegativeFee => [17.into_dart()].into_dart(), + crate::api::error::PsbtError::FeeOverflow => [18.into_dart()].into_dart(), + crate::api::error::PsbtError::InvalidPublicKey { error_message } => { + [19.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::PsbtError::InvalidSecp256k1PublicKey { secp256k1_error } => { + [20.into_dart(), secp256k1_error.into_into_dart().into_dart()].into_dart() + } + crate::api::error::PsbtError::InvalidXOnlyPublicKey => [21.into_dart()].into_dart(), + crate::api::error::PsbtError::InvalidEcdsaSignature { error_message } => { + [22.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::PsbtError::InvalidTaprootSignature { error_message } => { + [23.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::PsbtError::InvalidControlBlock => [24.into_dart()].into_dart(), + crate::api::error::PsbtError::InvalidLeafVersion => [25.into_dart()].into_dart(), + crate::api::error::PsbtError::Taproot => [26.into_dart()].into_dart(), + crate::api::error::PsbtError::TapTree { error_message } => { + [27.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::PsbtError::XPubKey => [28.into_dart()].into_dart(), + crate::api::error::PsbtError::Version { error_message } => { + [29.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::PsbtError::PartialDataConsumption => [30.into_dart()].into_dart(), + crate::api::error::PsbtError::Io { error_message } => { + [31.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::PsbtError::OtherPsbtErr => [32.into_dart()].into_dart(), + _ => { + unimplemented!(""); + } + } } } - -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 flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::error::PsbtError {} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::error::PsbtError +{ + fn into_into_dart(self) -> crate::api::error::PsbtError { + self } } - -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) { +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::error::PsbtParseError { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { match self { - crate::api::error::AddressError::Base58(field0) => { - ::sse_encode(0, serializer); - ::sse_encode(field0, serializer); + crate::api::error::PsbtParseError::PsbtEncoding { error_message } => { + [0.into_dart(), error_message.into_into_dart().into_dart()].into_dart() } - crate::api::error::AddressError::Bech32(field0) => { - ::sse_encode(1, serializer); - ::sse_encode(field0, serializer); + crate::api::error::PsbtParseError::Base64Encoding { error_message } => { + [1.into_dart(), error_message.into_into_dart().into_dart()].into_dart() } - 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); + _ => { + unimplemented!(""); } - crate::api::error::AddressError::UnrecognizedScript => { - ::sse_encode(11, serializer); + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::error::PsbtParseError +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::error::PsbtParseError +{ + fn into_into_dart(self) -> crate::api::error::PsbtParseError { + 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() } - crate::api::error::AddressError::UnknownAddressType(field0) => { - ::sse_encode(12, serializer); - ::sse_encode(field0, serializer); + _ => { + unimplemented!(""); } - 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 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::error::RequestBuilderError { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + Self::RequestAlreadyConsumed => 0.into_dart(), + _ => unreachable!(), + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::error::RequestBuilderError +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::error::RequestBuilderError +{ + fn into_into_dart(self) -> crate::api::error::RequestBuilderError { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::types::SignOptions { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.trust_witness_utxo.into_into_dart().into_dart(), + self.assume_height.into_into_dart().into_dart(), + self.allow_all_sighashes.into_into_dart().into_dart(), + self.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::error::SignerError { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + crate::api::error::SignerError::MissingKey => [0.into_dart()].into_dart(), + crate::api::error::SignerError::InvalidKey => [1.into_dart()].into_dart(), + crate::api::error::SignerError::UserCanceled => [2.into_dart()].into_dart(), + crate::api::error::SignerError::InputIndexOutOfRange => [3.into_dart()].into_dart(), + crate::api::error::SignerError::MissingNonWitnessUtxo => [4.into_dart()].into_dart(), + crate::api::error::SignerError::InvalidNonWitnessUtxo => [5.into_dart()].into_dart(), + crate::api::error::SignerError::MissingWitnessUtxo => [6.into_dart()].into_dart(), + crate::api::error::SignerError::MissingWitnessScript => [7.into_dart()].into_dart(), + crate::api::error::SignerError::MissingHdKeypath => [8.into_dart()].into_dart(), + crate::api::error::SignerError::NonStandardSighash => [9.into_dart()].into_dart(), + crate::api::error::SignerError::InvalidSighash => [10.into_dart()].into_dart(), + crate::api::error::SignerError::SighashP2wpkh { error_message } => { + [11.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::SignerError::SighashTaproot { error_message } => { + [12.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::SignerError::TxInputsIndexError { error_message } => { + [13.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::SignerError::MiniscriptPsbt { error_message } => { + [14.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::SignerError::External { error_message } => { + [15.into_dart(), error_message.into_into_dart().into_dart()].into_dart() + } + crate::api::error::SignerError::Psbt { error_message } => { + [16.into_dart(), error_message.into_into_dart().into_dart()].into_dart() } _ => { unimplemented!(""); @@ -4959,47 +6027,143 @@ impl SseEncode for crate::api::error::AddressError { } } } - -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) { +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::error::SignerError +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::error::SignerError +{ + fn into_into_dart(self) -> crate::api::error::SignerError { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::error::SqliteError { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { match self { - crate::api::types::AddressIndex::Increase => { - ::sse_encode(0, serializer); + crate::api::error::SqliteError::Sqlite { rusqlite_error } => { + [0.into_dart(), rusqlite_error.into_into_dart().into_dart()].into_dart() } - crate::api::types::AddressIndex::LastUnused => { - ::sse_encode(1, serializer); + _ => { + unimplemented!(""); } - crate::api::types::AddressIndex::Peek { index } => { - ::sse_encode(2, serializer); - ::sse_encode(index, serializer); + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::error::SqliteError +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::error::SqliteError +{ + fn into_into_dart(self) -> crate::api::error::SqliteError { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::types::SyncProgress { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.spks_consumed.into_into_dart().into_dart(), + self.spks_remaining.into_into_dart().into_dart(), + self.txids_consumed.into_into_dart().into_dart(), + self.txids_remaining.into_into_dart().into_dart(), + self.outpoints_consumed.into_into_dart().into_dart(), + self.outpoints_remaining.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::types::SyncProgress +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::types::SyncProgress +{ + fn into_into_dart(self) -> crate::api::types::SyncProgress { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::error::TransactionError { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + crate::api::error::TransactionError::Io => [0.into_dart()].into_dart(), + crate::api::error::TransactionError::OversizedVectorAllocation => { + [1.into_dart()].into_dart() } - crate::api::types::AddressIndex::Reset { index } => { - ::sse_encode(3, serializer); - ::sse_encode(index, serializer); + crate::api::error::TransactionError::InvalidChecksum { expected, actual } => [ + 2.into_dart(), + expected.into_into_dart().into_dart(), + actual.into_into_dart().into_dart(), + ] + .into_dart(), + crate::api::error::TransactionError::NonMinimalVarInt => [3.into_dart()].into_dart(), + crate::api::error::TransactionError::ParseFailed => [4.into_dart()].into_dart(), + crate::api::error::TransactionError::UnsupportedSegwitFlag { flag } => { + [5.into_dart(), flag.into_into_dart().into_dart()].into_dart() } + crate::api::error::TransactionError::OtherTransactionErr => [6.into_dart()].into_dart(), _ => { unimplemented!(""); } } } } - -impl SseEncode for crate::api::blockchain::Auth { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::error::TransactionError +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::error::TransactionError +{ + fn into_into_dart(self) -> crate::api::error::TransactionError { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::bitcoin::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::bitcoin::TxIn {} +impl flutter_rust_bridge::IntoIntoDart for crate::api::bitcoin::TxIn { + fn into_into_dart(self) -> crate::api::bitcoin::TxIn { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::bitcoin::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::bitcoin::TxOut {} +impl flutter_rust_bridge::IntoIntoDart for crate::api::bitcoin::TxOut { + fn into_into_dart(self) -> crate::api::bitcoin::TxOut { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::error::TxidParseError { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { 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); + crate::api::error::TxidParseError::InvalidTxid { txid } => { + [0.into_dart(), txid.into_into_dart().into_dart()].into_dart() } _ => { unimplemented!(""); @@ -5007,1130 +6171,7156 @@ impl SseEncode for crate::api::blockchain::Auth { } } } +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::api::error::TxidParseError +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::error::TxidParseError +{ + fn into_into_dart(self) -> crate::api::error::TxidParseError { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::api::types::WordCount { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + Self::Words12 => 0.into_dart(), + Self::Words18 => 1.into_dart(), + Self::Words24 => 2.into_dart(), + _ => unreachable!(), + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::types::WordCount {} +impl flutter_rust_bridge::IntoIntoDart + for crate::api::types::WordCount +{ + fn into_into_dart(self) -> crate::api::types::WordCount { + self + } +} -impl SseEncode for crate::api::types::Balance { +impl SseEncode for flutter_rust_bridge::for_generated::anyhow::Error { // Codec=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); + ::sse_encode(format!("{:?}", self), serializer); } } -impl SseEncode for crate::api::types::BdkAddress { +impl SseEncode for flutter_rust_bridge::DartOpaque { // Codec=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.encode(), serializer); } } -impl SseEncode for crate::api::blockchain::BdkBlockchain { +impl SseEncode for std::collections::HashMap> { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - >::sse_encode(self.ptr, serializer); + )>>::sse_encode(self.into_iter().collect(), serializer); } } -impl SseEncode for crate::api::key::BdkDerivationPath { +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) { - >::sse_encode(self.ptr, serializer); + let (ptr, size) = self.sse_encode_raw(); + ::sse_encode(ptr, serializer); + ::sse_encode(size, serializer); } } -impl SseEncode for crate::api::descriptor::BdkDescriptor { +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) { - >::sse_encode( - self.extended_descriptor, - serializer, - ); - >::sse_encode(self.key_map, serializer); + let (ptr, size) = self.sse_encode_raw(); + ::sse_encode(ptr, serializer); + ::sse_encode(size, serializer); } } -impl SseEncode for crate::api::key::BdkDescriptorPublicKey { +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) { - >::sse_encode(self.ptr, serializer); + let (ptr, size) = self.sse_encode_raw(); + ::sse_encode(ptr, serializer); + ::sse_encode(size, serializer); } } -impl SseEncode for crate::api::key::BdkDescriptorSecretKey { +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) { - >::sse_encode(self.ptr, serializer); + let (ptr, size) = self.sse_encode_raw(); + ::sse_encode(ptr, serializer); + ::sse_encode(size, serializer); } } -impl SseEncode for crate::api::error::BdkError { +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) { - match self { - crate::api::error::BdkError::Hex(field0) => { - ::sse_encode(0, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::Consensus(field0) => { - ::sse_encode(1, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::VerifyTransaction(field0) => { - ::sse_encode(2, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::Address(field0) => { - ::sse_encode(3, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::Descriptor(field0) => { - ::sse_encode(4, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::InvalidU32Bytes(field0) => { - ::sse_encode(5, serializer); - >::sse_encode(field0, serializer); - } - crate::api::error::BdkError::Generic(field0) => { - ::sse_encode(6, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::BdkError::ScriptDoesntHaveAddressForm => { - ::sse_encode(7, serializer); - } - crate::api::error::BdkError::NoRecipients => { + 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< + std::sync::Mutex< + Option>, + >, + > +{ + // 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< + std::sync::Mutex>>, + > +{ + // 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< + std::sync::Mutex< + Option>, + >, + > +{ + // 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< + std::sync::Mutex< + Option>, + >, + > +{ + // 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< + std::sync::Mutex>, + > +{ + // 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::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); + ::sse_encode(self.keychain, serializer); + } +} + +impl SseEncode for crate::api::error::AddressParseError { + // 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::AddressParseError::Base58 => { + ::sse_encode(0, serializer); + } + crate::api::error::AddressParseError::Bech32 => { + ::sse_encode(1, serializer); + } + crate::api::error::AddressParseError::WitnessVersion { error_message } => { + ::sse_encode(2, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::AddressParseError::WitnessProgram { error_message } => { + ::sse_encode(3, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::AddressParseError::UnknownHrp => { + ::sse_encode(4, serializer); + } + crate::api::error::AddressParseError::LegacyAddressTooLong => { + ::sse_encode(5, serializer); + } + crate::api::error::AddressParseError::InvalidBase58PayloadLength => { + ::sse_encode(6, serializer); + } + crate::api::error::AddressParseError::InvalidLegacyPrefix => { + ::sse_encode(7, serializer); + } + crate::api::error::AddressParseError::NetworkValidation => { + ::sse_encode(8, serializer); + } + crate::api::error::AddressParseError::OtherAddressParseErr => { + ::sse_encode(9, serializer); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseEncode for crate::api::types::Balance { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.immature, serializer); + ::sse_encode(self.trusted_pending, serializer); + ::sse_encode(self.untrusted_pending, serializer); + ::sse_encode(self.confirmed, serializer); + ::sse_encode(self.spendable, serializer); + ::sse_encode(self.total, serializer); + } +} + +impl SseEncode for crate::api::error::Bip32Error { + // 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::Bip32Error::CannotDeriveFromHardenedKey => { + ::sse_encode(0, serializer); + } + crate::api::error::Bip32Error::Secp256k1 { error_message } => { + ::sse_encode(1, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::Bip32Error::InvalidChildNumber { child_number } => { + ::sse_encode(2, serializer); + ::sse_encode(child_number, serializer); + } + crate::api::error::Bip32Error::InvalidChildNumberFormat => { + ::sse_encode(3, serializer); + } + crate::api::error::Bip32Error::InvalidDerivationPathFormat => { + ::sse_encode(4, serializer); + } + crate::api::error::Bip32Error::UnknownVersion { version } => { + ::sse_encode(5, serializer); + ::sse_encode(version, serializer); + } + crate::api::error::Bip32Error::WrongExtendedKeyLength { length } => { + ::sse_encode(6, serializer); + ::sse_encode(length, serializer); + } + crate::api::error::Bip32Error::Base58 { error_message } => { + ::sse_encode(7, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::Bip32Error::Hex { error_message } => { ::sse_encode(8, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::Bip32Error::InvalidPublicKeyHexLength { length } => { + ::sse_encode(9, serializer); + ::sse_encode(length, serializer); + } + crate::api::error::Bip32Error::UnknownError { error_message } => { + ::sse_encode(10, serializer); + ::sse_encode(error_message, serializer); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseEncode for crate::api::error::Bip39Error { + // 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::Bip39Error::BadWordCount { word_count } => { + ::sse_encode(0, serializer); + ::sse_encode(word_count, serializer); + } + crate::api::error::Bip39Error::UnknownWord { index } => { + ::sse_encode(1, serializer); + ::sse_encode(index, serializer); + } + crate::api::error::Bip39Error::BadEntropyBitCount { bit_count } => { + ::sse_encode(2, serializer); + ::sse_encode(bit_count, serializer); + } + crate::api::error::Bip39Error::InvalidChecksum => { + ::sse_encode(3, serializer); + } + crate::api::error::Bip39Error::AmbiguousLanguages { languages } => { + ::sse_encode(4, serializer); + ::sse_encode(languages, serializer); + } + crate::api::error::Bip39Error::Generic { error_message } => { + ::sse_encode(5, serializer); + ::sse_encode(error_message, serializer); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseEncode for crate::api::types::BlockId { + // Codec=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.hash, 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::error::CalculateFeeError { + // 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::CalculateFeeError::Generic { error_message } => { + ::sse_encode(0, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::CalculateFeeError::MissingTxOut { out_points } => { + ::sse_encode(1, serializer); + >::sse_encode(out_points, serializer); + } + crate::api::error::CalculateFeeError::NegativeFee { amount } => { + ::sse_encode(2, serializer); + ::sse_encode(amount, serializer); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseEncode for crate::api::error::CannotConnectError { + // 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::CannotConnectError::Include { height } => { + ::sse_encode(0, serializer); + ::sse_encode(height, serializer); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseEncode for crate::api::types::ChainPosition { + // 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::ChainPosition::Confirmed { + confirmation_block_time, + } => { + ::sse_encode(0, serializer); + ::sse_encode( + confirmation_block_time, + serializer, + ); + } + crate::api::types::ChainPosition::Unconfirmed { timestamp } => { + ::sse_encode(1, serializer); + ::sse_encode(timestamp, serializer); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseEncode for crate::api::types::ChangeSpendPolicy { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode( + match self { + crate::api::types::ChangeSpendPolicy::ChangeAllowed => 0, + crate::api::types::ChangeSpendPolicy::OnlyChange => 1, + crate::api::types::ChangeSpendPolicy::ChangeForbidden => 2, + _ => { + unimplemented!(""); + } + }, + serializer, + ); + } +} + +impl SseEncode for crate::api::types::ConfirmationBlockTime { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.block_id, serializer); + ::sse_encode(self.confirmation_time, serializer); + } +} + +impl SseEncode for crate::api::error::CreateTxError { + // 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::CreateTxError::TransactionNotFound { txid } => { + ::sse_encode(0, serializer); + ::sse_encode(txid, serializer); + } + crate::api::error::CreateTxError::TransactionConfirmed { txid } => { + ::sse_encode(1, serializer); + ::sse_encode(txid, serializer); + } + crate::api::error::CreateTxError::IrreplaceableTransaction { txid } => { + ::sse_encode(2, serializer); + ::sse_encode(txid, serializer); + } + crate::api::error::CreateTxError::FeeRateUnavailable => { + ::sse_encode(3, serializer); + } + crate::api::error::CreateTxError::Generic { error_message } => { + ::sse_encode(4, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::CreateTxError::Descriptor { error_message } => { + ::sse_encode(5, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::CreateTxError::Policy { error_message } => { + ::sse_encode(6, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::CreateTxError::SpendingPolicyRequired { kind } => { + ::sse_encode(7, serializer); + ::sse_encode(kind, serializer); + } + crate::api::error::CreateTxError::Version0 => { + ::sse_encode(8, serializer); + } + crate::api::error::CreateTxError::Version1Csv => { + ::sse_encode(9, serializer); + } + crate::api::error::CreateTxError::LockTime { + requested_time, + required_time, + } => { + ::sse_encode(10, serializer); + ::sse_encode(requested_time, serializer); + ::sse_encode(required_time, serializer); + } + crate::api::error::CreateTxError::RbfSequence => { + ::sse_encode(11, serializer); + } + crate::api::error::CreateTxError::RbfSequenceCsv { rbf, csv } => { + ::sse_encode(12, serializer); + ::sse_encode(rbf, serializer); + ::sse_encode(csv, serializer); + } + crate::api::error::CreateTxError::FeeTooLow { fee_required } => { + ::sse_encode(13, serializer); + ::sse_encode(fee_required, serializer); + } + crate::api::error::CreateTxError::FeeRateTooLow { fee_rate_required } => { + ::sse_encode(14, serializer); + ::sse_encode(fee_rate_required, serializer); + } + crate::api::error::CreateTxError::NoUtxosSelected => { + ::sse_encode(15, serializer); + } + crate::api::error::CreateTxError::OutputBelowDustLimit { index } => { + ::sse_encode(16, serializer); + ::sse_encode(index, serializer); + } + crate::api::error::CreateTxError::ChangePolicyDescriptor => { + ::sse_encode(17, serializer); + } + crate::api::error::CreateTxError::CoinSelection { error_message } => { + ::sse_encode(18, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::CreateTxError::InsufficientFunds { needed, available } => { + ::sse_encode(19, serializer); + ::sse_encode(needed, serializer); + ::sse_encode(available, serializer); + } + crate::api::error::CreateTxError::NoRecipients => { + ::sse_encode(20, serializer); + } + crate::api::error::CreateTxError::Psbt { error_message } => { + ::sse_encode(21, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::CreateTxError::MissingKeyOrigin { key } => { + ::sse_encode(22, serializer); + ::sse_encode(key, serializer); + } + crate::api::error::CreateTxError::UnknownUtxo { outpoint } => { + ::sse_encode(23, serializer); + ::sse_encode(outpoint, serializer); + } + crate::api::error::CreateTxError::MissingNonWitnessUtxo { outpoint } => { + ::sse_encode(24, serializer); + ::sse_encode(outpoint, serializer); + } + crate::api::error::CreateTxError::MiniscriptPsbt { error_message } => { + ::sse_encode(25, serializer); + ::sse_encode(error_message, serializer); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseEncode for crate::api::error::CreateWithPersistError { + // 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::CreateWithPersistError::Persist { error_message } => { + ::sse_encode(0, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::CreateWithPersistError::DataAlreadyExists => { + ::sse_encode(1, serializer); + } + crate::api::error::CreateWithPersistError::Descriptor { error_message } => { + ::sse_encode(2, serializer); + ::sse_encode(error_message, serializer); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseEncode for crate::api::error::DescriptorError { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + match self { + crate::api::error::DescriptorError::InvalidHdKeyPath => { + ::sse_encode(0, serializer); + } + crate::api::error::DescriptorError::MissingPrivateData => { + ::sse_encode(1, serializer); + } + crate::api::error::DescriptorError::InvalidDescriptorChecksum => { + ::sse_encode(2, serializer); + } + crate::api::error::DescriptorError::HardenedDerivationXpub => { + ::sse_encode(3, serializer); + } + crate::api::error::DescriptorError::MultiPath => { + ::sse_encode(4, serializer); + } + crate::api::error::DescriptorError::Key { error_message } => { + ::sse_encode(5, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::DescriptorError::Generic { error_message } => { + ::sse_encode(6, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::DescriptorError::Policy { error_message } => { + ::sse_encode(7, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::DescriptorError::InvalidDescriptorCharacter { charector } => { + ::sse_encode(8, serializer); + ::sse_encode(charector, serializer); + } + crate::api::error::DescriptorError::Bip32 { error_message } => { + ::sse_encode(9, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::DescriptorError::Base58 { error_message } => { + ::sse_encode(10, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::DescriptorError::Pk { error_message } => { + ::sse_encode(11, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::DescriptorError::Miniscript { error_message } => { + ::sse_encode(12, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::DescriptorError::Hex { error_message } => { + ::sse_encode(13, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::DescriptorError::ExternalAndInternalAreTheSame => { + ::sse_encode(14, serializer); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseEncode for crate::api::error::DescriptorKeyError { + // 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::DescriptorKeyError::Parse { error_message } => { + ::sse_encode(0, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::DescriptorKeyError::InvalidKeyType => { + ::sse_encode(1, serializer); + } + crate::api::error::DescriptorKeyError::Bip32 { error_message } => { + ::sse_encode(2, serializer); + ::sse_encode(error_message, serializer); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseEncode for crate::api::error::ElectrumError { + // 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::ElectrumError::IOError { error_message } => { + ::sse_encode(0, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::ElectrumError::Json { error_message } => { + ::sse_encode(1, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::ElectrumError::Hex { error_message } => { + ::sse_encode(2, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::ElectrumError::Protocol { error_message } => { + ::sse_encode(3, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::ElectrumError::Bitcoin { error_message } => { + ::sse_encode(4, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::ElectrumError::AlreadySubscribed => { + ::sse_encode(5, serializer); + } + crate::api::error::ElectrumError::NotSubscribed => { + ::sse_encode(6, serializer); + } + crate::api::error::ElectrumError::InvalidResponse { error_message } => { + ::sse_encode(7, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::ElectrumError::Message { error_message } => { + ::sse_encode(8, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::ElectrumError::InvalidDNSNameError { domain } => { + ::sse_encode(9, serializer); + ::sse_encode(domain, serializer); + } + crate::api::error::ElectrumError::MissingDomain => { + ::sse_encode(10, serializer); + } + crate::api::error::ElectrumError::AllAttemptsErrored => { + ::sse_encode(11, serializer); + } + crate::api::error::ElectrumError::SharedIOError { error_message } => { + ::sse_encode(12, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::ElectrumError::CouldntLockReader => { + ::sse_encode(13, serializer); + } + crate::api::error::ElectrumError::Mpsc => { + ::sse_encode(14, serializer); + } + crate::api::error::ElectrumError::CouldNotCreateConnection { error_message } => { + ::sse_encode(15, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::ElectrumError::RequestAlreadyConsumed => { + ::sse_encode(16, serializer); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseEncode for crate::api::error::EsploraError { + // 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::EsploraError::Minreq { error_message } => { + ::sse_encode(0, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::EsploraError::HttpResponse { + status, + error_message, + } => { + ::sse_encode(1, serializer); + ::sse_encode(status, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::EsploraError::Parsing { error_message } => { + ::sse_encode(2, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::EsploraError::StatusCode { error_message } => { + ::sse_encode(3, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::EsploraError::BitcoinEncoding { error_message } => { + ::sse_encode(4, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::EsploraError::HexToArray { error_message } => { + ::sse_encode(5, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::EsploraError::HexToBytes { error_message } => { + ::sse_encode(6, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::EsploraError::TransactionNotFound => { + ::sse_encode(7, serializer); + } + crate::api::error::EsploraError::HeaderHeightNotFound { height } => { + ::sse_encode(8, serializer); + ::sse_encode(height, serializer); + } + crate::api::error::EsploraError::HeaderHashNotFound => { + ::sse_encode(9, serializer); + } + crate::api::error::EsploraError::InvalidHttpHeaderName { name } => { + ::sse_encode(10, serializer); + ::sse_encode(name, serializer); + } + crate::api::error::EsploraError::InvalidHttpHeaderValue { value } => { + ::sse_encode(11, serializer); + ::sse_encode(value, serializer); + } + crate::api::error::EsploraError::RequestAlreadyConsumed => { + ::sse_encode(12, serializer); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseEncode for crate::api::error::ExtractTxError { + // 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::ExtractTxError::AbsurdFeeRate { fee_rate } => { + ::sse_encode(0, serializer); + ::sse_encode(fee_rate, serializer); + } + crate::api::error::ExtractTxError::MissingInputValue => { + ::sse_encode(1, serializer); + } + crate::api::error::ExtractTxError::SendingTooMuch => { + ::sse_encode(2, serializer); + } + crate::api::error::ExtractTxError::OtherExtractTxErr => { + ::sse_encode(3, serializer); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseEncode for crate::api::bitcoin::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_kwu, serializer); + } +} + +impl SseEncode for crate::api::bitcoin::FfiAddress { + // Codec=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); + } +} + +impl SseEncode for crate::api::types::FfiCanonicalTx { + // Codec=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.chain_position, serializer); + } +} + +impl SseEncode for crate::api::store::FfiConnection { + // Codec=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, + ); + } +} + +impl SseEncode for crate::api::key::FfiDerivationPath { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >::sse_encode( + self.opaque, + serializer, + ); + } +} + +impl SseEncode for crate::api::descriptor::FfiDescriptor { + // Codec=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::FfiDescriptorPublicKey { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >::sse_encode(self.opaque, serializer); + } +} + +impl SseEncode for crate::api::key::FfiDescriptorSecretKey { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >::sse_encode(self.opaque, serializer); + } +} + +impl SseEncode for crate::api::electrum::FfiElectrumClient { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >>::sse_encode(self.opaque, serializer); + } +} + +impl SseEncode for crate::api::esplora::FfiEsploraClient { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >::sse_encode( + self.opaque, + serializer, + ); + } +} + +impl SseEncode for crate::api::types::FfiFullScanRequest { + // Codec=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); + } +} + +impl SseEncode for crate::api::types::FfiFullScanRequestBuilder { + // Codec=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); + } +} + +impl SseEncode for crate::api::key::FfiMnemonic { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >::sse_encode(self.opaque, serializer); + } +} + +impl SseEncode for crate::api::types::FfiPolicy { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >::sse_encode(self.opaque, serializer); + } +} + +impl SseEncode for crate::api::bitcoin::FfiPsbt { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >>::sse_encode( + self.opaque, + serializer, + ); + } +} + +impl SseEncode for crate::api::bitcoin::FfiScriptBuf { + // Codec=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::FfiSyncRequest { + // Codec=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); + } +} + +impl SseEncode for crate::api::types::FfiSyncRequestBuilder { + // Codec=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); + } +} + +impl SseEncode for crate::api::bitcoin::FfiTransaction { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >::sse_encode(self.opaque, serializer); + } +} + +impl SseEncode for crate::api::types::FfiUpdate { + // Codec=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); + } +} + +impl SseEncode for crate::api::wallet::FfiWallet { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >, + >>::sse_encode(self.opaque, serializer); + } +} + +impl SseEncode for crate::api::error::FromScriptError { + // 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::FromScriptError::UnrecognizedScript => { + ::sse_encode(0, serializer); + } + crate::api::error::FromScriptError::WitnessProgram { error_message } => { + ::sse_encode(1, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::FromScriptError::WitnessVersion { error_message } => { + ::sse_encode(2, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::FromScriptError::OtherFromScriptErr => { + ::sse_encode(3, serializer); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseEncode for i32 { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + serializer.cursor.write_i32::(self).unwrap(); + } +} + +impl SseEncode for isize { + // 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_i64::(self as _) + .unwrap(); + } +} + +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<(crate::api::bitcoin::FfiScriptBuf, u64)> { + // Codec=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 { + <(crate::api::bitcoin::FfiScriptBuf, u64)>::sse_encode(item, serializer); + } + } +} + +impl SseEncode for Vec<(String, Vec)> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + <(String, Vec)>::sse_encode(item, serializer); + } + } +} + +impl SseEncode for Vec { + // Codec=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::error::LoadWithPersistError { + // 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::LoadWithPersistError::Persist { error_message } => { + ::sse_encode(0, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::LoadWithPersistError::InvalidChangeSet { error_message } => { + ::sse_encode(1, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::LoadWithPersistError::CouldNotLoad => { + ::sse_encode(2, serializer); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseEncode for crate::api::types::LocalOutput { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.outpoint, serializer); + ::sse_encode(self.txout, serializer); + ::sse_encode(self.keychain, serializer); + ::sse_encode(self.is_spent, serializer); + } +} + +impl SseEncode for crate::api::types::LockTime { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + match self { + crate::api::types::LockTime::Blocks(field0) => { + ::sse_encode(0, serializer); + ::sse_encode(field0, serializer); + } + crate::api::types::LockTime::Seconds(field0) => { + ::sse_encode(1, serializer); + ::sse_encode(field0, serializer); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseEncode for crate::api::types::Network { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode( + match self { + crate::api::types::Network::Testnet => 0, + crate::api::types::Network::Regtest => 1, + crate::api::types::Network::Bitcoin => 2, + crate::api::types::Network::Signet => 3, + _ => { + unimplemented!(""); + } + }, + serializer, + ); + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode + for Option<( + std::collections::HashMap>, + 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(self.is_some(), serializer); + if let Some(value) = self { + <( + std::collections::HashMap>, + crate::api::types::KeychainKind, + )>::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::bitcoin::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::error::PsbtError { + // 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::PsbtError::InvalidMagic => { + ::sse_encode(0, serializer); + } + crate::api::error::PsbtError::MissingUtxo => { + ::sse_encode(1, serializer); + } + crate::api::error::PsbtError::InvalidSeparator => { + ::sse_encode(2, serializer); + } + crate::api::error::PsbtError::PsbtUtxoOutOfBounds => { + ::sse_encode(3, serializer); + } + crate::api::error::PsbtError::InvalidKey { key } => { + ::sse_encode(4, serializer); + ::sse_encode(key, serializer); + } + crate::api::error::PsbtError::InvalidProprietaryKey => { + ::sse_encode(5, serializer); + } + crate::api::error::PsbtError::DuplicateKey { key } => { + ::sse_encode(6, serializer); + ::sse_encode(key, serializer); + } + crate::api::error::PsbtError::UnsignedTxHasScriptSigs => { + ::sse_encode(7, serializer); + } + crate::api::error::PsbtError::UnsignedTxHasScriptWitnesses => { + ::sse_encode(8, serializer); + } + crate::api::error::PsbtError::MustHaveUnsignedTx => { + ::sse_encode(9, serializer); + } + crate::api::error::PsbtError::NoMorePairs => { + ::sse_encode(10, serializer); + } + crate::api::error::PsbtError::UnexpectedUnsignedTx => { + ::sse_encode(11, serializer); + } + crate::api::error::PsbtError::NonStandardSighashType { sighash } => { + ::sse_encode(12, serializer); + ::sse_encode(sighash, serializer); + } + crate::api::error::PsbtError::InvalidHash { hash } => { + ::sse_encode(13, serializer); + ::sse_encode(hash, serializer); + } + crate::api::error::PsbtError::InvalidPreimageHashPair => { + ::sse_encode(14, serializer); + } + crate::api::error::PsbtError::CombineInconsistentKeySources { xpub } => { + ::sse_encode(15, serializer); + ::sse_encode(xpub, serializer); + } + crate::api::error::PsbtError::ConsensusEncoding { encoding_error } => { + ::sse_encode(16, serializer); + ::sse_encode(encoding_error, serializer); + } + crate::api::error::PsbtError::NegativeFee => { + ::sse_encode(17, serializer); + } + crate::api::error::PsbtError::FeeOverflow => { + ::sse_encode(18, serializer); + } + crate::api::error::PsbtError::InvalidPublicKey { error_message } => { + ::sse_encode(19, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::PsbtError::InvalidSecp256k1PublicKey { secp256k1_error } => { + ::sse_encode(20, serializer); + ::sse_encode(secp256k1_error, serializer); + } + crate::api::error::PsbtError::InvalidXOnlyPublicKey => { + ::sse_encode(21, serializer); + } + crate::api::error::PsbtError::InvalidEcdsaSignature { error_message } => { + ::sse_encode(22, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::PsbtError::InvalidTaprootSignature { error_message } => { + ::sse_encode(23, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::PsbtError::InvalidControlBlock => { + ::sse_encode(24, serializer); + } + crate::api::error::PsbtError::InvalidLeafVersion => { + ::sse_encode(25, serializer); + } + crate::api::error::PsbtError::Taproot => { + ::sse_encode(26, serializer); + } + crate::api::error::PsbtError::TapTree { error_message } => { + ::sse_encode(27, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::PsbtError::XPubKey => { + ::sse_encode(28, serializer); + } + crate::api::error::PsbtError::Version { error_message } => { + ::sse_encode(29, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::PsbtError::PartialDataConsumption => { + ::sse_encode(30, serializer); + } + crate::api::error::PsbtError::Io { error_message } => { + ::sse_encode(31, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::PsbtError::OtherPsbtErr => { + ::sse_encode(32, serializer); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseEncode for crate::api::error::PsbtParseError { + // 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::PsbtParseError::PsbtEncoding { error_message } => { + ::sse_encode(0, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::PsbtParseError::Base64Encoding { error_message } => { + ::sse_encode(1, serializer); + ::sse_encode(error_message, serializer); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseEncode for crate::api::types::RbfValue { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + match self { + crate::api::types::RbfValue::RbfDefault => { + ::sse_encode(0, serializer); + } + crate::api::types::RbfValue::Value(field0) => { + ::sse_encode(1, serializer); + ::sse_encode(field0, serializer); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseEncode for (crate::api::bitcoin::FfiScriptBuf, u64) { + // Codec=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 ( + std::collections::HashMap>, + 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(self.0, serializer); + ::sse_encode(self.1, serializer); + } +} + +impl SseEncode for (String, Vec) { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.0, serializer); + >::sse_encode(self.1, serializer); + } +} + +impl SseEncode for crate::api::error::RequestBuilderError { + // 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::error::RequestBuilderError::RequestAlreadyConsumed => 0, + _ => { + unimplemented!(""); + } + }, + serializer, + ); + } +} + +impl SseEncode for crate::api::types::SignOptions { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.trust_witness_utxo, serializer); + >::sse_encode(self.assume_height, serializer); + ::sse_encode(self.allow_all_sighashes, serializer); + ::sse_encode(self.try_finalize, serializer); + ::sse_encode(self.sign_with_tap_internal_key, serializer); + ::sse_encode(self.allow_grinding, serializer); + } +} + +impl SseEncode for crate::api::error::SignerError { + // 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::SignerError::MissingKey => { + ::sse_encode(0, serializer); + } + crate::api::error::SignerError::InvalidKey => { + ::sse_encode(1, serializer); + } + crate::api::error::SignerError::UserCanceled => { + ::sse_encode(2, serializer); + } + crate::api::error::SignerError::InputIndexOutOfRange => { + ::sse_encode(3, serializer); + } + crate::api::error::SignerError::MissingNonWitnessUtxo => { + ::sse_encode(4, serializer); + } + crate::api::error::SignerError::InvalidNonWitnessUtxo => { + ::sse_encode(5, serializer); + } + crate::api::error::SignerError::MissingWitnessUtxo => { + ::sse_encode(6, serializer); + } + crate::api::error::SignerError::MissingWitnessScript => { + ::sse_encode(7, serializer); + } + crate::api::error::SignerError::MissingHdKeypath => { + ::sse_encode(8, serializer); + } + crate::api::error::SignerError::NonStandardSighash => { + ::sse_encode(9, serializer); + } + crate::api::error::SignerError::InvalidSighash => { + ::sse_encode(10, serializer); + } + crate::api::error::SignerError::SighashP2wpkh { error_message } => { + ::sse_encode(11, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::SignerError::SighashTaproot { error_message } => { + ::sse_encode(12, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::SignerError::TxInputsIndexError { error_message } => { + ::sse_encode(13, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::SignerError::MiniscriptPsbt { error_message } => { + ::sse_encode(14, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::SignerError::External { error_message } => { + ::sse_encode(15, serializer); + ::sse_encode(error_message, serializer); + } + crate::api::error::SignerError::Psbt { error_message } => { + ::sse_encode(16, serializer); + ::sse_encode(error_message, serializer); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseEncode for crate::api::error::SqliteError { + // 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::SqliteError::Sqlite { rusqlite_error } => { + ::sse_encode(0, serializer); + ::sse_encode(rusqlite_error, serializer); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseEncode for crate::api::types::SyncProgress { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.spks_consumed, serializer); + ::sse_encode(self.spks_remaining, serializer); + ::sse_encode(self.txids_consumed, serializer); + ::sse_encode(self.txids_remaining, serializer); + ::sse_encode(self.outpoints_consumed, serializer); + ::sse_encode(self.outpoints_remaining, serializer); + } +} + +impl SseEncode for crate::api::error::TransactionError { + // 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::TransactionError::Io => { + ::sse_encode(0, serializer); + } + crate::api::error::TransactionError::OversizedVectorAllocation => { + ::sse_encode(1, serializer); + } + crate::api::error::TransactionError::InvalidChecksum { expected, actual } => { + ::sse_encode(2, serializer); + ::sse_encode(expected, serializer); + ::sse_encode(actual, serializer); + } + crate::api::error::TransactionError::NonMinimalVarInt => { + ::sse_encode(3, serializer); + } + crate::api::error::TransactionError::ParseFailed => { + ::sse_encode(4, serializer); + } + crate::api::error::TransactionError::UnsupportedSegwitFlag { flag } => { + ::sse_encode(5, serializer); + ::sse_encode(flag, serializer); + } + crate::api::error::TransactionError::OtherTransactionErr => { + ::sse_encode(6, serializer); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseEncode for crate::api::bitcoin::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::bitcoin::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 crate::api::error::TxidParseError { + // 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::TxidParseError::InvalidTxid { txid } => { + ::sse_encode(0, serializer); + ::sse_encode(txid, serializer); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseEncode for u16 { + // 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_u16::(self).unwrap(); + } +} + +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 () { + // 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::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"))] +mod io { + // This file is automatically generated, so please do not edit it. + // @generated by `flutter_rust_bridge`@ 2.4.0. + + // Section: imports + + use super::*; + use crate::api::electrum::*; + use crate::api::esplora::*; + use crate::api::store::*; + use crate::api::types::*; + use crate::*; + use flutter_rust_bridge::for_generated::byteorder::{ + NativeEndian, ReadBytesExt, WriteBytesExt, + }; + use flutter_rust_bridge::for_generated::{transform_result_dco, Lifetimeable, Lockable}; + use flutter_rust_bridge::{Handler, IntoIntoDart}; + + // Section: boilerplate + + flutter_rust_bridge::frb_generated_boilerplate_io!(); + + // Section: dart2rust + + impl CstDecode + for *mut wire_cst_list_prim_u_8_strict + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> flutter_rust_bridge::for_generated::anyhow::Error { + unimplemented!() + } + } + impl CstDecode for *const std::ffi::c_void { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> flutter_rust_bridge::DartOpaque { + unsafe { flutter_rust_bridge::for_generated::cst_decode_dart_opaque(self as _) } + } + } + impl CstDecode>> + for *mut wire_cst_list_record_string_list_prim_usize_strict + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> std::collections::HashMap> { + let vec: Vec<(String, Vec)> = self.cst_decode(); + vec.into_iter().collect() + } + } + impl CstDecode> 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< + RustOpaqueNom>, + > 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< + RustOpaqueNom< + std::sync::Mutex< + Option>, + >, + >, + > for usize + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode( + self, + ) -> RustOpaqueNom< + std::sync::Mutex< + Option>, + >, + > { + unsafe { decode_rust_opaque_nom(self as _) } + } + } + impl + CstDecode< + RustOpaqueNom< + std::sync::Mutex< + Option>, + >, + >, + > for usize + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode( + self, + ) -> RustOpaqueNom< + std::sync::Mutex< + Option>, + >, + > { + unsafe { decode_rust_opaque_nom(self as _) } + } + } + impl + CstDecode< + RustOpaqueNom< + std::sync::Mutex< + Option< + bdk_core::spk_client::SyncRequestBuilder<(bdk_wallet::KeychainKind, u32)>, + >, + >, + >, + > for usize + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode( + self, + ) -> RustOpaqueNom< + std::sync::Mutex< + Option>, + >, + > { + unsafe { decode_rust_opaque_nom(self as _) } + } + } + impl + CstDecode< + RustOpaqueNom< + std::sync::Mutex< + Option>, + >, + >, + > for usize + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode( + self, + ) -> RustOpaqueNom< + std::sync::Mutex< + Option>, + >, + > { + 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< + RustOpaqueNom< + std::sync::Mutex>, + >, + > for usize + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode( + self, + ) -> RustOpaqueNom< + std::sync::Mutex>, + > { + 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_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(), + keychain: self.keychain.cst_decode(), + } + } + } + impl CstDecode for wire_cst_address_parse_error { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::error::AddressParseError { + match self.tag { + 0 => crate::api::error::AddressParseError::Base58, + 1 => crate::api::error::AddressParseError::Bech32, + 2 => { + let ans = unsafe { self.kind.WitnessVersion }; + crate::api::error::AddressParseError::WitnessVersion { + error_message: ans.error_message.cst_decode(), + } + } + 3 => { + let ans = unsafe { self.kind.WitnessProgram }; + crate::api::error::AddressParseError::WitnessProgram { + error_message: ans.error_message.cst_decode(), + } + } + 4 => crate::api::error::AddressParseError::UnknownHrp, + 5 => crate::api::error::AddressParseError::LegacyAddressTooLong, + 6 => crate::api::error::AddressParseError::InvalidBase58PayloadLength, + 7 => crate::api::error::AddressParseError::InvalidLegacyPrefix, + 8 => crate::api::error::AddressParseError::NetworkValidation, + 9 => crate::api::error::AddressParseError::OtherAddressParseErr, + _ => 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_bip_32_error { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::error::Bip32Error { + match self.tag { + 0 => crate::api::error::Bip32Error::CannotDeriveFromHardenedKey, + 1 => { + let ans = unsafe { self.kind.Secp256k1 }; + crate::api::error::Bip32Error::Secp256k1 { + error_message: ans.error_message.cst_decode(), + } + } + 2 => { + let ans = unsafe { self.kind.InvalidChildNumber }; + crate::api::error::Bip32Error::InvalidChildNumber { + child_number: ans.child_number.cst_decode(), + } + } + 3 => crate::api::error::Bip32Error::InvalidChildNumberFormat, + 4 => crate::api::error::Bip32Error::InvalidDerivationPathFormat, + 5 => { + let ans = unsafe { self.kind.UnknownVersion }; + crate::api::error::Bip32Error::UnknownVersion { + version: ans.version.cst_decode(), + } + } + 6 => { + let ans = unsafe { self.kind.WrongExtendedKeyLength }; + crate::api::error::Bip32Error::WrongExtendedKeyLength { + length: ans.length.cst_decode(), + } + } + 7 => { + let ans = unsafe { self.kind.Base58 }; + crate::api::error::Bip32Error::Base58 { + error_message: ans.error_message.cst_decode(), + } + } + 8 => { + let ans = unsafe { self.kind.Hex }; + crate::api::error::Bip32Error::Hex { + error_message: ans.error_message.cst_decode(), + } + } + 9 => { + let ans = unsafe { self.kind.InvalidPublicKeyHexLength }; + crate::api::error::Bip32Error::InvalidPublicKeyHexLength { + length: ans.length.cst_decode(), + } + } + 10 => { + let ans = unsafe { self.kind.UnknownError }; + crate::api::error::Bip32Error::UnknownError { + error_message: ans.error_message.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_bip_39_error { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::error::Bip39Error { + match self.tag { + 0 => { + let ans = unsafe { self.kind.BadWordCount }; + crate::api::error::Bip39Error::BadWordCount { + word_count: ans.word_count.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.UnknownWord }; + crate::api::error::Bip39Error::UnknownWord { + index: ans.index.cst_decode(), + } + } + 2 => { + let ans = unsafe { self.kind.BadEntropyBitCount }; + crate::api::error::Bip39Error::BadEntropyBitCount { + bit_count: ans.bit_count.cst_decode(), + } + } + 3 => crate::api::error::Bip39Error::InvalidChecksum, + 4 => { + let ans = unsafe { self.kind.AmbiguousLanguages }; + crate::api::error::Bip39Error::AmbiguousLanguages { + languages: ans.languages.cst_decode(), + } + } + 5 => { + let ans = unsafe { self.kind.Generic }; + crate::api::error::Bip39Error::Generic { + error_message: ans.error_message.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_block_id { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::BlockId { + crate::api::types::BlockId { + height: self.height.cst_decode(), + hash: self.hash.cst_decode(), + } + } + } + impl CstDecode for *mut wire_cst_confirmation_block_time { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::ConfirmationBlockTime { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + 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::bitcoin::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_ffi_address { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::bitcoin::FfiAddress { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_ffi_canonical_tx { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::FfiCanonicalTx { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_ffi_connection { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::store::FfiConnection { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_ffi_derivation_path { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::key::FfiDerivationPath { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_ffi_descriptor { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::descriptor::FfiDescriptor { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode + for *mut wire_cst_ffi_descriptor_public_key + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::key::FfiDescriptorPublicKey { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode + for *mut wire_cst_ffi_descriptor_secret_key + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::key::FfiDescriptorSecretKey { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_ffi_electrum_client { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::electrum::FfiElectrumClient { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_ffi_esplora_client { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::esplora::FfiEsploraClient { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_ffi_full_scan_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::FfiFullScanRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode + for *mut wire_cst_ffi_full_scan_request_builder + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::FfiFullScanRequestBuilder { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_ffi_mnemonic { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::key::FfiMnemonic { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_ffi_policy { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::FfiPolicy { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_ffi_psbt { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::bitcoin::FfiPsbt { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_ffi_script_buf { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::bitcoin::FfiScriptBuf { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_ffi_sync_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::FfiSyncRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode + for *mut wire_cst_ffi_sync_request_builder + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::FfiSyncRequestBuilder { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_ffi_transaction { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::bitcoin::FfiTransaction { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_ffi_update { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::FfiUpdate { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_ffi_wallet { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::wallet::FfiWallet { + 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_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<( + std::collections::HashMap>, + crate::api::types::KeychainKind, + )> for *mut wire_cst_record_map_string_list_prim_usize_strict_keychain_kind + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode( + self, + ) -> ( + std::collections::HashMap>, + crate::api::types::KeychainKind, + ) { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::<( + std::collections::HashMap>, + crate::api::types::KeychainKind, + )>::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 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 wire_cst_calculate_fee_error { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::error::CalculateFeeError { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Generic }; + crate::api::error::CalculateFeeError::Generic { + error_message: ans.error_message.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.MissingTxOut }; + crate::api::error::CalculateFeeError::MissingTxOut { + out_points: ans.out_points.cst_decode(), + } + } + 2 => { + let ans = unsafe { self.kind.NegativeFee }; + crate::api::error::CalculateFeeError::NegativeFee { + amount: ans.amount.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_cannot_connect_error { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::error::CannotConnectError { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Include }; + crate::api::error::CannotConnectError::Include { + height: ans.height.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_chain_position { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::ChainPosition { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Confirmed }; + crate::api::types::ChainPosition::Confirmed { + confirmation_block_time: ans.confirmation_block_time.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.Unconfirmed }; + crate::api::types::ChainPosition::Unconfirmed { + timestamp: ans.timestamp.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_confirmation_block_time { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::ConfirmationBlockTime { + crate::api::types::ConfirmationBlockTime { + block_id: self.block_id.cst_decode(), + confirmation_time: self.confirmation_time.cst_decode(), + } + } + } + impl CstDecode for wire_cst_create_tx_error { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::error::CreateTxError { + match self.tag { + 0 => { + let ans = unsafe { self.kind.TransactionNotFound }; + crate::api::error::CreateTxError::TransactionNotFound { + txid: ans.txid.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.TransactionConfirmed }; + crate::api::error::CreateTxError::TransactionConfirmed { + txid: ans.txid.cst_decode(), + } + } + 2 => { + let ans = unsafe { self.kind.IrreplaceableTransaction }; + crate::api::error::CreateTxError::IrreplaceableTransaction { + txid: ans.txid.cst_decode(), + } + } + 3 => crate::api::error::CreateTxError::FeeRateUnavailable, + 4 => { + let ans = unsafe { self.kind.Generic }; + crate::api::error::CreateTxError::Generic { + error_message: ans.error_message.cst_decode(), + } + } + 5 => { + let ans = unsafe { self.kind.Descriptor }; + crate::api::error::CreateTxError::Descriptor { + error_message: ans.error_message.cst_decode(), + } + } + 6 => { + let ans = unsafe { self.kind.Policy }; + crate::api::error::CreateTxError::Policy { + error_message: ans.error_message.cst_decode(), + } + } + 7 => { + let ans = unsafe { self.kind.SpendingPolicyRequired }; + crate::api::error::CreateTxError::SpendingPolicyRequired { + kind: ans.kind.cst_decode(), + } + } + 8 => crate::api::error::CreateTxError::Version0, + 9 => crate::api::error::CreateTxError::Version1Csv, + 10 => { + let ans = unsafe { self.kind.LockTime }; + crate::api::error::CreateTxError::LockTime { + requested_time: ans.requested_time.cst_decode(), + required_time: ans.required_time.cst_decode(), + } + } + 11 => crate::api::error::CreateTxError::RbfSequence, + 12 => { + let ans = unsafe { self.kind.RbfSequenceCsv }; + crate::api::error::CreateTxError::RbfSequenceCsv { + rbf: ans.rbf.cst_decode(), + csv: ans.csv.cst_decode(), + } + } + 13 => { + let ans = unsafe { self.kind.FeeTooLow }; + crate::api::error::CreateTxError::FeeTooLow { + fee_required: ans.fee_required.cst_decode(), + } + } + 14 => { + let ans = unsafe { self.kind.FeeRateTooLow }; + crate::api::error::CreateTxError::FeeRateTooLow { + fee_rate_required: ans.fee_rate_required.cst_decode(), + } + } + 15 => crate::api::error::CreateTxError::NoUtxosSelected, + 16 => { + let ans = unsafe { self.kind.OutputBelowDustLimit }; + crate::api::error::CreateTxError::OutputBelowDustLimit { + index: ans.index.cst_decode(), + } + } + 17 => crate::api::error::CreateTxError::ChangePolicyDescriptor, + 18 => { + let ans = unsafe { self.kind.CoinSelection }; + crate::api::error::CreateTxError::CoinSelection { + error_message: ans.error_message.cst_decode(), + } + } + 19 => { + let ans = unsafe { self.kind.InsufficientFunds }; + crate::api::error::CreateTxError::InsufficientFunds { + needed: ans.needed.cst_decode(), + available: ans.available.cst_decode(), + } + } + 20 => crate::api::error::CreateTxError::NoRecipients, + 21 => { + let ans = unsafe { self.kind.Psbt }; + crate::api::error::CreateTxError::Psbt { + error_message: ans.error_message.cst_decode(), + } + } + 22 => { + let ans = unsafe { self.kind.MissingKeyOrigin }; + crate::api::error::CreateTxError::MissingKeyOrigin { + key: ans.key.cst_decode(), + } + } + 23 => { + let ans = unsafe { self.kind.UnknownUtxo }; + crate::api::error::CreateTxError::UnknownUtxo { + outpoint: ans.outpoint.cst_decode(), + } + } + 24 => { + let ans = unsafe { self.kind.MissingNonWitnessUtxo }; + crate::api::error::CreateTxError::MissingNonWitnessUtxo { + outpoint: ans.outpoint.cst_decode(), + } + } + 25 => { + let ans = unsafe { self.kind.MiniscriptPsbt }; + crate::api::error::CreateTxError::MiniscriptPsbt { + error_message: ans.error_message.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_create_with_persist_error { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::error::CreateWithPersistError { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Persist }; + crate::api::error::CreateWithPersistError::Persist { + error_message: ans.error_message.cst_decode(), + } + } + 1 => crate::api::error::CreateWithPersistError::DataAlreadyExists, + 2 => { + let ans = unsafe { self.kind.Descriptor }; + crate::api::error::CreateWithPersistError::Descriptor { + error_message: ans.error_message.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::MissingPrivateData, + 2 => crate::api::error::DescriptorError::InvalidDescriptorChecksum, + 3 => crate::api::error::DescriptorError::HardenedDerivationXpub, + 4 => crate::api::error::DescriptorError::MultiPath, + 5 => { + let ans = unsafe { self.kind.Key }; + crate::api::error::DescriptorError::Key { + error_message: ans.error_message.cst_decode(), + } + } + 6 => { + let ans = unsafe { self.kind.Generic }; + crate::api::error::DescriptorError::Generic { + error_message: ans.error_message.cst_decode(), + } + } + 7 => { + let ans = unsafe { self.kind.Policy }; + crate::api::error::DescriptorError::Policy { + error_message: ans.error_message.cst_decode(), + } + } + 8 => { + let ans = unsafe { self.kind.InvalidDescriptorCharacter }; + crate::api::error::DescriptorError::InvalidDescriptorCharacter { + charector: ans.charector.cst_decode(), + } + } + 9 => { + let ans = unsafe { self.kind.Bip32 }; + crate::api::error::DescriptorError::Bip32 { + error_message: ans.error_message.cst_decode(), + } + } + 10 => { + let ans = unsafe { self.kind.Base58 }; + crate::api::error::DescriptorError::Base58 { + error_message: ans.error_message.cst_decode(), + } + } + 11 => { + let ans = unsafe { self.kind.Pk }; + crate::api::error::DescriptorError::Pk { + error_message: ans.error_message.cst_decode(), + } + } + 12 => { + let ans = unsafe { self.kind.Miniscript }; + crate::api::error::DescriptorError::Miniscript { + error_message: ans.error_message.cst_decode(), + } + } + 13 => { + let ans = unsafe { self.kind.Hex }; + crate::api::error::DescriptorError::Hex { + error_message: ans.error_message.cst_decode(), + } + } + 14 => crate::api::error::DescriptorError::ExternalAndInternalAreTheSame, + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_descriptor_key_error { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::error::DescriptorKeyError { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Parse }; + crate::api::error::DescriptorKeyError::Parse { + error_message: ans.error_message.cst_decode(), + } + } + 1 => crate::api::error::DescriptorKeyError::InvalidKeyType, + 2 => { + let ans = unsafe { self.kind.Bip32 }; + crate::api::error::DescriptorKeyError::Bip32 { + error_message: ans.error_message.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_electrum_error { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::error::ElectrumError { + match self.tag { + 0 => { + let ans = unsafe { self.kind.IOError }; + crate::api::error::ElectrumError::IOError { + error_message: ans.error_message.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.Json }; + crate::api::error::ElectrumError::Json { + error_message: ans.error_message.cst_decode(), + } + } + 2 => { + let ans = unsafe { self.kind.Hex }; + crate::api::error::ElectrumError::Hex { + error_message: ans.error_message.cst_decode(), + } + } + 3 => { + let ans = unsafe { self.kind.Protocol }; + crate::api::error::ElectrumError::Protocol { + error_message: ans.error_message.cst_decode(), + } + } + 4 => { + let ans = unsafe { self.kind.Bitcoin }; + crate::api::error::ElectrumError::Bitcoin { + error_message: ans.error_message.cst_decode(), + } + } + 5 => crate::api::error::ElectrumError::AlreadySubscribed, + 6 => crate::api::error::ElectrumError::NotSubscribed, + 7 => { + let ans = unsafe { self.kind.InvalidResponse }; + crate::api::error::ElectrumError::InvalidResponse { + error_message: ans.error_message.cst_decode(), + } + } + 8 => { + let ans = unsafe { self.kind.Message }; + crate::api::error::ElectrumError::Message { + error_message: ans.error_message.cst_decode(), + } + } + 9 => { + let ans = unsafe { self.kind.InvalidDNSNameError }; + crate::api::error::ElectrumError::InvalidDNSNameError { + domain: ans.domain.cst_decode(), + } + } + 10 => crate::api::error::ElectrumError::MissingDomain, + 11 => crate::api::error::ElectrumError::AllAttemptsErrored, + 12 => { + let ans = unsafe { self.kind.SharedIOError }; + crate::api::error::ElectrumError::SharedIOError { + error_message: ans.error_message.cst_decode(), + } + } + 13 => crate::api::error::ElectrumError::CouldntLockReader, + 14 => crate::api::error::ElectrumError::Mpsc, + 15 => { + let ans = unsafe { self.kind.CouldNotCreateConnection }; + crate::api::error::ElectrumError::CouldNotCreateConnection { + error_message: ans.error_message.cst_decode(), + } + } + 16 => crate::api::error::ElectrumError::RequestAlreadyConsumed, + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_esplora_error { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::error::EsploraError { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Minreq }; + crate::api::error::EsploraError::Minreq { + error_message: ans.error_message.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.HttpResponse }; + crate::api::error::EsploraError::HttpResponse { + status: ans.status.cst_decode(), + error_message: ans.error_message.cst_decode(), + } + } + 2 => { + let ans = unsafe { self.kind.Parsing }; + crate::api::error::EsploraError::Parsing { + error_message: ans.error_message.cst_decode(), + } + } + 3 => { + let ans = unsafe { self.kind.StatusCode }; + crate::api::error::EsploraError::StatusCode { + error_message: ans.error_message.cst_decode(), + } + } + 4 => { + let ans = unsafe { self.kind.BitcoinEncoding }; + crate::api::error::EsploraError::BitcoinEncoding { + error_message: ans.error_message.cst_decode(), + } + } + 5 => { + let ans = unsafe { self.kind.HexToArray }; + crate::api::error::EsploraError::HexToArray { + error_message: ans.error_message.cst_decode(), + } + } + 6 => { + let ans = unsafe { self.kind.HexToBytes }; + crate::api::error::EsploraError::HexToBytes { + error_message: ans.error_message.cst_decode(), + } + } + 7 => crate::api::error::EsploraError::TransactionNotFound, + 8 => { + let ans = unsafe { self.kind.HeaderHeightNotFound }; + crate::api::error::EsploraError::HeaderHeightNotFound { + height: ans.height.cst_decode(), + } + } + 9 => crate::api::error::EsploraError::HeaderHashNotFound, + 10 => { + let ans = unsafe { self.kind.InvalidHttpHeaderName }; + crate::api::error::EsploraError::InvalidHttpHeaderName { + name: ans.name.cst_decode(), + } + } + 11 => { + let ans = unsafe { self.kind.InvalidHttpHeaderValue }; + crate::api::error::EsploraError::InvalidHttpHeaderValue { + value: ans.value.cst_decode(), + } + } + 12 => crate::api::error::EsploraError::RequestAlreadyConsumed, + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_extract_tx_error { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::error::ExtractTxError { + match self.tag { + 0 => { + let ans = unsafe { self.kind.AbsurdFeeRate }; + crate::api::error::ExtractTxError::AbsurdFeeRate { + fee_rate: ans.fee_rate.cst_decode(), + } + } + 1 => crate::api::error::ExtractTxError::MissingInputValue, + 2 => crate::api::error::ExtractTxError::SendingTooMuch, + 3 => crate::api::error::ExtractTxError::OtherExtractTxErr, + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_fee_rate { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::bitcoin::FeeRate { + crate::api::bitcoin::FeeRate { + sat_kwu: self.sat_kwu.cst_decode(), + } + } + } + impl CstDecode for wire_cst_ffi_address { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::bitcoin::FfiAddress { + crate::api::bitcoin::FfiAddress(self.field0.cst_decode()) + } + } + impl CstDecode for wire_cst_ffi_canonical_tx { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::FfiCanonicalTx { + crate::api::types::FfiCanonicalTx { + transaction: self.transaction.cst_decode(), + chain_position: self.chain_position.cst_decode(), + } + } + } + impl CstDecode for wire_cst_ffi_connection { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::store::FfiConnection { + crate::api::store::FfiConnection(self.field0.cst_decode()) + } + } + impl CstDecode for wire_cst_ffi_derivation_path { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::key::FfiDerivationPath { + crate::api::key::FfiDerivationPath { + opaque: self.opaque.cst_decode(), + } + } + } + impl CstDecode for wire_cst_ffi_descriptor { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::descriptor::FfiDescriptor { + crate::api::descriptor::FfiDescriptor { + extended_descriptor: self.extended_descriptor.cst_decode(), + key_map: self.key_map.cst_decode(), + } + } + } + impl CstDecode for wire_cst_ffi_descriptor_public_key { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::key::FfiDescriptorPublicKey { + crate::api::key::FfiDescriptorPublicKey { + opaque: self.opaque.cst_decode(), + } + } + } + impl CstDecode for wire_cst_ffi_descriptor_secret_key { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::key::FfiDescriptorSecretKey { + crate::api::key::FfiDescriptorSecretKey { + opaque: self.opaque.cst_decode(), + } + } + } + impl CstDecode for wire_cst_ffi_electrum_client { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::electrum::FfiElectrumClient { + crate::api::electrum::FfiElectrumClient { + opaque: self.opaque.cst_decode(), + } + } + } + impl CstDecode for wire_cst_ffi_esplora_client { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::esplora::FfiEsploraClient { + crate::api::esplora::FfiEsploraClient { + opaque: self.opaque.cst_decode(), + } + } + } + impl CstDecode for wire_cst_ffi_full_scan_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::FfiFullScanRequest { + crate::api::types::FfiFullScanRequest(self.field0.cst_decode()) + } + } + impl CstDecode + for wire_cst_ffi_full_scan_request_builder + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::FfiFullScanRequestBuilder { + crate::api::types::FfiFullScanRequestBuilder(self.field0.cst_decode()) + } + } + impl CstDecode for wire_cst_ffi_mnemonic { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::key::FfiMnemonic { + crate::api::key::FfiMnemonic { + opaque: self.opaque.cst_decode(), + } + } + } + impl CstDecode for wire_cst_ffi_policy { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::FfiPolicy { + crate::api::types::FfiPolicy { + opaque: self.opaque.cst_decode(), + } + } + } + impl CstDecode for wire_cst_ffi_psbt { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::bitcoin::FfiPsbt { + crate::api::bitcoin::FfiPsbt { + opaque: self.opaque.cst_decode(), + } + } + } + impl CstDecode for wire_cst_ffi_script_buf { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::bitcoin::FfiScriptBuf { + crate::api::bitcoin::FfiScriptBuf { + bytes: self.bytes.cst_decode(), + } + } + } + impl CstDecode for wire_cst_ffi_sync_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::FfiSyncRequest { + crate::api::types::FfiSyncRequest(self.field0.cst_decode()) + } + } + impl CstDecode for wire_cst_ffi_sync_request_builder { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::FfiSyncRequestBuilder { + crate::api::types::FfiSyncRequestBuilder(self.field0.cst_decode()) + } + } + impl CstDecode for wire_cst_ffi_transaction { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::bitcoin::FfiTransaction { + crate::api::bitcoin::FfiTransaction { + opaque: self.opaque.cst_decode(), + } + } + } + impl CstDecode for wire_cst_ffi_update { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::FfiUpdate { + crate::api::types::FfiUpdate(self.field0.cst_decode()) + } + } + impl CstDecode for wire_cst_ffi_wallet { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::wallet::FfiWallet { + crate::api::wallet::FfiWallet { + opaque: self.opaque.cst_decode(), + } + } + } + impl CstDecode for wire_cst_from_script_error { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::error::FromScriptError { + match self.tag { + 0 => crate::api::error::FromScriptError::UnrecognizedScript, + 1 => { + let ans = unsafe { self.kind.WitnessProgram }; + crate::api::error::FromScriptError::WitnessProgram { + error_message: ans.error_message.cst_decode(), + } + } + 2 => { + let ans = unsafe { self.kind.WitnessVersion }; + crate::api::error::FromScriptError::WitnessVersion { + error_message: ans.error_message.cst_decode(), + } + } + 3 => crate::api::error::FromScriptError::OtherFromScriptErr, + _ => unreachable!(), + } + } + } + impl CstDecode> for *mut wire_cst_list_ffi_canonical_tx { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + let vec = unsafe { + let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); + flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) + }; + vec.into_iter().map(CstDecode::cst_decode).collect() + } + } + impl CstDecode>> for *mut wire_cst_list_list_prim_u_8_strict { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec> { + let vec = unsafe { + let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); + flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) + }; + vec.into_iter().map(CstDecode::cst_decode).collect() + } + } + impl CstDecode> for *mut wire_cst_list_local_output { + // 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_prim_usize_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_record_ffi_script_buf_u_64 + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec<(crate::api::bitcoin::FfiScriptBuf, u64)> { + let vec = unsafe { + let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); + flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) + }; + vec.into_iter().map(CstDecode::cst_decode).collect() + } + } + impl CstDecode)>> + for *mut wire_cst_list_record_string_list_prim_usize_strict + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec<(String, Vec)> { + let vec = unsafe { + let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); + flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) + }; + vec.into_iter().map(CstDecode::cst_decode).collect() + } + } + impl CstDecode> for *mut wire_cst_list_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_load_with_persist_error { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::error::LoadWithPersistError { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Persist }; + crate::api::error::LoadWithPersistError::Persist { + error_message: ans.error_message.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.InvalidChangeSet }; + crate::api::error::LoadWithPersistError::InvalidChangeSet { + error_message: ans.error_message.cst_decode(), + } + } + 2 => crate::api::error::LoadWithPersistError::CouldNotLoad, + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_local_output { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::LocalOutput { + crate::api::types::LocalOutput { + 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::bitcoin::OutPoint { + crate::api::bitcoin::OutPoint { + txid: self.txid.cst_decode(), + vout: self.vout.cst_decode(), + } + } + } + impl CstDecode for wire_cst_psbt_error { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::error::PsbtError { + match self.tag { + 0 => crate::api::error::PsbtError::InvalidMagic, + 1 => crate::api::error::PsbtError::MissingUtxo, + 2 => crate::api::error::PsbtError::InvalidSeparator, + 3 => crate::api::error::PsbtError::PsbtUtxoOutOfBounds, + 4 => { + let ans = unsafe { self.kind.InvalidKey }; + crate::api::error::PsbtError::InvalidKey { + key: ans.key.cst_decode(), + } + } + 5 => crate::api::error::PsbtError::InvalidProprietaryKey, + 6 => { + let ans = unsafe { self.kind.DuplicateKey }; + crate::api::error::PsbtError::DuplicateKey { + key: ans.key.cst_decode(), + } + } + 7 => crate::api::error::PsbtError::UnsignedTxHasScriptSigs, + 8 => crate::api::error::PsbtError::UnsignedTxHasScriptWitnesses, + 9 => crate::api::error::PsbtError::MustHaveUnsignedTx, + 10 => crate::api::error::PsbtError::NoMorePairs, + 11 => crate::api::error::PsbtError::UnexpectedUnsignedTx, + 12 => { + let ans = unsafe { self.kind.NonStandardSighashType }; + crate::api::error::PsbtError::NonStandardSighashType { + sighash: ans.sighash.cst_decode(), + } + } + 13 => { + let ans = unsafe { self.kind.InvalidHash }; + crate::api::error::PsbtError::InvalidHash { + hash: ans.hash.cst_decode(), + } + } + 14 => crate::api::error::PsbtError::InvalidPreimageHashPair, + 15 => { + let ans = unsafe { self.kind.CombineInconsistentKeySources }; + crate::api::error::PsbtError::CombineInconsistentKeySources { + xpub: ans.xpub.cst_decode(), + } + } + 16 => { + let ans = unsafe { self.kind.ConsensusEncoding }; + crate::api::error::PsbtError::ConsensusEncoding { + encoding_error: ans.encoding_error.cst_decode(), + } + } + 17 => crate::api::error::PsbtError::NegativeFee, + 18 => crate::api::error::PsbtError::FeeOverflow, + 19 => { + let ans = unsafe { self.kind.InvalidPublicKey }; + crate::api::error::PsbtError::InvalidPublicKey { + error_message: ans.error_message.cst_decode(), + } + } + 20 => { + let ans = unsafe { self.kind.InvalidSecp256k1PublicKey }; + crate::api::error::PsbtError::InvalidSecp256k1PublicKey { + secp256k1_error: ans.secp256k1_error.cst_decode(), + } + } + 21 => crate::api::error::PsbtError::InvalidXOnlyPublicKey, + 22 => { + let ans = unsafe { self.kind.InvalidEcdsaSignature }; + crate::api::error::PsbtError::InvalidEcdsaSignature { + error_message: ans.error_message.cst_decode(), + } + } + 23 => { + let ans = unsafe { self.kind.InvalidTaprootSignature }; + crate::api::error::PsbtError::InvalidTaprootSignature { + error_message: ans.error_message.cst_decode(), + } + } + 24 => crate::api::error::PsbtError::InvalidControlBlock, + 25 => crate::api::error::PsbtError::InvalidLeafVersion, + 26 => crate::api::error::PsbtError::Taproot, + 27 => { + let ans = unsafe { self.kind.TapTree }; + crate::api::error::PsbtError::TapTree { + error_message: ans.error_message.cst_decode(), + } + } + 28 => crate::api::error::PsbtError::XPubKey, + 29 => { + let ans = unsafe { self.kind.Version }; + crate::api::error::PsbtError::Version { + error_message: ans.error_message.cst_decode(), + } + } + 30 => crate::api::error::PsbtError::PartialDataConsumption, + 31 => { + let ans = unsafe { self.kind.Io }; + crate::api::error::PsbtError::Io { + error_message: ans.error_message.cst_decode(), + } + } + 32 => crate::api::error::PsbtError::OtherPsbtErr, + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_psbt_parse_error { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::error::PsbtParseError { + match self.tag { + 0 => { + let ans = unsafe { self.kind.PsbtEncoding }; + crate::api::error::PsbtParseError::PsbtEncoding { + error_message: ans.error_message.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.Base64Encoding }; + crate::api::error::PsbtParseError::Base64Encoding { + error_message: ans.error_message.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + 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::bitcoin::FfiScriptBuf, u64)> for wire_cst_record_ffi_script_buf_u_64 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> (crate::api::bitcoin::FfiScriptBuf, u64) { + (self.field0.cst_decode(), self.field1.cst_decode()) + } + } + impl + CstDecode<( + std::collections::HashMap>, + crate::api::types::KeychainKind, + )> for wire_cst_record_map_string_list_prim_usize_strict_keychain_kind + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode( + self, + ) -> ( + std::collections::HashMap>, + crate::api::types::KeychainKind, + ) { + (self.field0.cst_decode(), self.field1.cst_decode()) + } + } + impl CstDecode<(String, Vec)> for wire_cst_record_string_list_prim_usize_strict { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> (String, Vec) { + (self.field0.cst_decode(), self.field1.cst_decode()) + } + } + impl CstDecode for wire_cst_sign_options { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::SignOptions { + crate::api::types::SignOptions { + trust_witness_utxo: self.trust_witness_utxo.cst_decode(), + assume_height: self.assume_height.cst_decode(), + allow_all_sighashes: self.allow_all_sighashes.cst_decode(), + 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_signer_error { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::error::SignerError { + match self.tag { + 0 => crate::api::error::SignerError::MissingKey, + 1 => crate::api::error::SignerError::InvalidKey, + 2 => crate::api::error::SignerError::UserCanceled, + 3 => crate::api::error::SignerError::InputIndexOutOfRange, + 4 => crate::api::error::SignerError::MissingNonWitnessUtxo, + 5 => crate::api::error::SignerError::InvalidNonWitnessUtxo, + 6 => crate::api::error::SignerError::MissingWitnessUtxo, + 7 => crate::api::error::SignerError::MissingWitnessScript, + 8 => crate::api::error::SignerError::MissingHdKeypath, + 9 => crate::api::error::SignerError::NonStandardSighash, + 10 => crate::api::error::SignerError::InvalidSighash, + 11 => { + let ans = unsafe { self.kind.SighashP2wpkh }; + crate::api::error::SignerError::SighashP2wpkh { + error_message: ans.error_message.cst_decode(), + } + } + 12 => { + let ans = unsafe { self.kind.SighashTaproot }; + crate::api::error::SignerError::SighashTaproot { + error_message: ans.error_message.cst_decode(), + } + } + 13 => { + let ans = unsafe { self.kind.TxInputsIndexError }; + crate::api::error::SignerError::TxInputsIndexError { + error_message: ans.error_message.cst_decode(), + } + } + 14 => { + let ans = unsafe { self.kind.MiniscriptPsbt }; + crate::api::error::SignerError::MiniscriptPsbt { + error_message: ans.error_message.cst_decode(), + } + } + 15 => { + let ans = unsafe { self.kind.External }; + crate::api::error::SignerError::External { + error_message: ans.error_message.cst_decode(), + } + } + 16 => { + let ans = unsafe { self.kind.Psbt }; + crate::api::error::SignerError::Psbt { + error_message: ans.error_message.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_sqlite_error { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::error::SqliteError { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Sqlite }; + crate::api::error::SqliteError::Sqlite { + rusqlite_error: ans.rusqlite_error.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_sync_progress { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::types::SyncProgress { + crate::api::types::SyncProgress { + spks_consumed: self.spks_consumed.cst_decode(), + spks_remaining: self.spks_remaining.cst_decode(), + txids_consumed: self.txids_consumed.cst_decode(), + txids_remaining: self.txids_remaining.cst_decode(), + outpoints_consumed: self.outpoints_consumed.cst_decode(), + outpoints_remaining: self.outpoints_remaining.cst_decode(), + } + } + } + impl CstDecode for wire_cst_transaction_error { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::error::TransactionError { + match self.tag { + 0 => crate::api::error::TransactionError::Io, + 1 => crate::api::error::TransactionError::OversizedVectorAllocation, + 2 => { + let ans = unsafe { self.kind.InvalidChecksum }; + crate::api::error::TransactionError::InvalidChecksum { + expected: ans.expected.cst_decode(), + actual: ans.actual.cst_decode(), + } + } + 3 => crate::api::error::TransactionError::NonMinimalVarInt, + 4 => crate::api::error::TransactionError::ParseFailed, + 5 => { + let ans = unsafe { self.kind.UnsupportedSegwitFlag }; + crate::api::error::TransactionError::UnsupportedSegwitFlag { + flag: ans.flag.cst_decode(), + } + } + 6 => crate::api::error::TransactionError::OtherTransactionErr, + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_tx_in { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::bitcoin::TxIn { + crate::api::bitcoin::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::bitcoin::TxOut { + crate::api::bitcoin::TxOut { + value: self.value.cst_decode(), + script_pubkey: self.script_pubkey.cst_decode(), + } + } + } + impl CstDecode for wire_cst_txid_parse_error { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::api::error::TxidParseError { + match self.tag { + 0 => { + let ans = unsafe { self.kind.InvalidTxid }; + crate::api::error::TxidParseError::InvalidTxid { + txid: ans.txid.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + impl NewWithNullPtr for wire_cst_address_info { + fn new_with_null_ptr() -> Self { + Self { + index: Default::default(), + address: Default::default(), + keychain: Default::default(), + } + } + } + impl Default for wire_cst_address_info { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_address_parse_error { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: AddressParseErrorKind { nil__: () }, + } + } + } + impl Default for wire_cst_address_parse_error { + 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_bip_32_error { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: Bip32ErrorKind { nil__: () }, + } + } + } + impl Default for wire_cst_bip_32_error { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_bip_39_error { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: Bip39ErrorKind { nil__: () }, + } + } + } + impl Default for wire_cst_bip_39_error { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_block_id { + fn new_with_null_ptr() -> Self { + Self { + height: Default::default(), + hash: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_block_id { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_calculate_fee_error { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: CalculateFeeErrorKind { nil__: () }, + } + } + } + impl Default for wire_cst_calculate_fee_error { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_cannot_connect_error { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: CannotConnectErrorKind { nil__: () }, + } + } + } + impl Default for wire_cst_cannot_connect_error { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_chain_position { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: ChainPositionKind { nil__: () }, + } + } + } + impl Default for wire_cst_chain_position { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_confirmation_block_time { + fn new_with_null_ptr() -> Self { + Self { + block_id: Default::default(), + confirmation_time: Default::default(), + } + } + } + impl Default for wire_cst_confirmation_block_time { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_create_tx_error { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: CreateTxErrorKind { nil__: () }, + } + } + } + impl Default for wire_cst_create_tx_error { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_create_with_persist_error { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: CreateWithPersistErrorKind { nil__: () }, + } + } + } + impl Default for wire_cst_create_with_persist_error { + 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_descriptor_key_error { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: DescriptorKeyErrorKind { nil__: () }, + } + } + } + impl Default for wire_cst_descriptor_key_error { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_electrum_error { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: ElectrumErrorKind { nil__: () }, + } + } + } + impl Default for wire_cst_electrum_error { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_esplora_error { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: EsploraErrorKind { nil__: () }, } - crate::api::error::BdkError::NoUtxosSelected => { - ::sse_encode(9, serializer); + } + } + impl Default for wire_cst_esplora_error { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_extract_tx_error { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: ExtractTxErrorKind { nil__: () }, } - crate::api::error::BdkError::OutputBelowDustLimit(field0) => { - ::sse_encode(10, serializer); - ::sse_encode(field0, serializer); + } + } + impl Default for wire_cst_extract_tx_error { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_fee_rate { + fn new_with_null_ptr() -> Self { + Self { + sat_kwu: Default::default(), } - crate::api::error::BdkError::InsufficientFunds { needed, available } => { - ::sse_encode(11, serializer); - ::sse_encode(needed, serializer); - ::sse_encode(available, serializer); + } + } + impl Default for wire_cst_fee_rate { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ffi_address { + fn new_with_null_ptr() -> Self { + Self { + field0: Default::default(), } - crate::api::error::BdkError::BnBTotalTriesExceeded => { - ::sse_encode(12, serializer); + } + } + impl Default for wire_cst_ffi_address { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ffi_canonical_tx { + fn new_with_null_ptr() -> Self { + Self { + transaction: Default::default(), + chain_position: Default::default(), } - crate::api::error::BdkError::BnBNoExactMatch => { - ::sse_encode(13, serializer); + } + } + impl Default for wire_cst_ffi_canonical_tx { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ffi_connection { + fn new_with_null_ptr() -> Self { + Self { + field0: Default::default(), } - crate::api::error::BdkError::UnknownUtxo => { - ::sse_encode(14, serializer); + } + } + impl Default for wire_cst_ffi_connection { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ffi_derivation_path { + fn new_with_null_ptr() -> Self { + Self { + opaque: Default::default(), } - crate::api::error::BdkError::TransactionNotFound => { - ::sse_encode(15, serializer); + } + } + impl Default for wire_cst_ffi_derivation_path { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ffi_descriptor { + fn new_with_null_ptr() -> Self { + Self { + extended_descriptor: Default::default(), + key_map: Default::default(), } - crate::api::error::BdkError::TransactionConfirmed => { - ::sse_encode(16, serializer); + } + } + impl Default for wire_cst_ffi_descriptor { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ffi_descriptor_public_key { + fn new_with_null_ptr() -> Self { + Self { + opaque: Default::default(), } - crate::api::error::BdkError::IrreplaceableTransaction => { - ::sse_encode(17, serializer); + } + } + impl Default for wire_cst_ffi_descriptor_public_key { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ffi_descriptor_secret_key { + fn new_with_null_ptr() -> Self { + Self { + opaque: Default::default(), } - crate::api::error::BdkError::FeeRateTooLow { needed } => { - ::sse_encode(18, serializer); - ::sse_encode(needed, serializer); + } + } + impl Default for wire_cst_ffi_descriptor_secret_key { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ffi_electrum_client { + fn new_with_null_ptr() -> Self { + Self { + opaque: Default::default(), } - crate::api::error::BdkError::FeeTooLow { needed } => { - ::sse_encode(19, serializer); - ::sse_encode(needed, serializer); + } + } + impl Default for wire_cst_ffi_electrum_client { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ffi_esplora_client { + fn new_with_null_ptr() -> Self { + Self { + opaque: Default::default(), } - crate::api::error::BdkError::FeeRateUnavailable => { - ::sse_encode(20, serializer); + } + } + impl Default for wire_cst_ffi_esplora_client { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ffi_full_scan_request { + fn new_with_null_ptr() -> Self { + Self { + field0: Default::default(), } - crate::api::error::BdkError::MissingKeyOrigin(field0) => { - ::sse_encode(21, serializer); - ::sse_encode(field0, serializer); + } + } + impl Default for wire_cst_ffi_full_scan_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ffi_full_scan_request_builder { + fn new_with_null_ptr() -> Self { + Self { + field0: Default::default(), } - crate::api::error::BdkError::Key(field0) => { - ::sse_encode(22, serializer); - ::sse_encode(field0, serializer); + } + } + impl Default for wire_cst_ffi_full_scan_request_builder { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ffi_mnemonic { + fn new_with_null_ptr() -> Self { + Self { + opaque: Default::default(), } - crate::api::error::BdkError::ChecksumMismatch => { - ::sse_encode(23, serializer); + } + } + impl Default for wire_cst_ffi_mnemonic { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ffi_policy { + fn new_with_null_ptr() -> Self { + Self { + opaque: Default::default(), } - crate::api::error::BdkError::SpendingPolicyRequired(field0) => { - ::sse_encode(24, serializer); - ::sse_encode(field0, serializer); + } + } + impl Default for wire_cst_ffi_policy { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ffi_psbt { + fn new_with_null_ptr() -> Self { + Self { + opaque: Default::default(), } - crate::api::error::BdkError::InvalidPolicyPathError(field0) => { - ::sse_encode(25, serializer); - ::sse_encode(field0, serializer); + } + } + impl Default for wire_cst_ffi_psbt { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ffi_script_buf { + fn new_with_null_ptr() -> Self { + Self { + bytes: core::ptr::null_mut(), } - crate::api::error::BdkError::Signer(field0) => { - ::sse_encode(26, serializer); - ::sse_encode(field0, serializer); + } + } + impl Default for wire_cst_ffi_script_buf { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ffi_sync_request { + fn new_with_null_ptr() -> Self { + Self { + field0: Default::default(), } - crate::api::error::BdkError::InvalidNetwork { requested, found } => { - ::sse_encode(27, serializer); - ::sse_encode(requested, serializer); - ::sse_encode(found, serializer); + } + } + impl Default for wire_cst_ffi_sync_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ffi_sync_request_builder { + fn new_with_null_ptr() -> Self { + Self { + field0: Default::default(), } - crate::api::error::BdkError::InvalidOutpoint(field0) => { - ::sse_encode(28, serializer); - ::sse_encode(field0, serializer); + } + } + impl Default for wire_cst_ffi_sync_request_builder { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ffi_transaction { + fn new_with_null_ptr() -> Self { + Self { + opaque: Default::default(), } - crate::api::error::BdkError::Encode(field0) => { - ::sse_encode(29, serializer); - ::sse_encode(field0, serializer); + } + } + impl Default for wire_cst_ffi_transaction { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ffi_update { + fn new_with_null_ptr() -> Self { + Self { + field0: Default::default(), } - crate::api::error::BdkError::Miniscript(field0) => { - ::sse_encode(30, serializer); - ::sse_encode(field0, serializer); + } + } + impl Default for wire_cst_ffi_update { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ffi_wallet { + fn new_with_null_ptr() -> Self { + Self { + opaque: Default::default(), } - crate::api::error::BdkError::MiniscriptPsbt(field0) => { - ::sse_encode(31, serializer); - ::sse_encode(field0, serializer); + } + } + impl Default for wire_cst_ffi_wallet { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_from_script_error { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: FromScriptErrorKind { nil__: () }, } - crate::api::error::BdkError::Bip32(field0) => { - ::sse_encode(32, serializer); - ::sse_encode(field0, serializer); + } + } + impl Default for wire_cst_from_script_error { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_load_with_persist_error { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: LoadWithPersistErrorKind { nil__: () }, + } + } + } + impl Default for wire_cst_load_with_persist_error { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_local_output { + fn new_with_null_ptr() -> Self { + Self { + outpoint: Default::default(), + txout: Default::default(), + keychain: Default::default(), + is_spent: Default::default(), } - crate::api::error::BdkError::Bip39(field0) => { - ::sse_encode(33, serializer); - ::sse_encode(field0, serializer); + } + } + impl Default for wire_cst_local_output { + 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__: () }, } - crate::api::error::BdkError::Secp256k1(field0) => { - ::sse_encode(34, serializer); - ::sse_encode(field0, serializer); + } + } + 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(), } - crate::api::error::BdkError::Json(field0) => { - ::sse_encode(35, serializer); - ::sse_encode(field0, serializer); + } + } + impl Default for wire_cst_out_point { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_psbt_error { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: PsbtErrorKind { nil__: () }, } - crate::api::error::BdkError::Psbt(field0) => { - ::sse_encode(36, serializer); - ::sse_encode(field0, serializer); + } + } + impl Default for wire_cst_psbt_error { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_psbt_parse_error { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: PsbtParseErrorKind { nil__: () }, } - crate::api::error::BdkError::PsbtParse(field0) => { - ::sse_encode(37, serializer); - ::sse_encode(field0, serializer); + } + } + impl Default for wire_cst_psbt_parse_error { + 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__: () }, } - crate::api::error::BdkError::MissingCachedScripts(field0, field1) => { - ::sse_encode(38, serializer); - ::sse_encode(field0, serializer); - ::sse_encode(field1, serializer); + } + } + impl Default for wire_cst_rbf_value { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_record_ffi_script_buf_u_64 { + fn new_with_null_ptr() -> Self { + Self { + field0: Default::default(), + field1: Default::default(), } - crate::api::error::BdkError::Electrum(field0) => { - ::sse_encode(39, serializer); - ::sse_encode(field0, serializer); + } + } + impl Default for wire_cst_record_ffi_script_buf_u_64 { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_record_map_string_list_prim_usize_strict_keychain_kind { + fn new_with_null_ptr() -> Self { + Self { + field0: core::ptr::null_mut(), + field1: Default::default(), } - crate::api::error::BdkError::Esplora(field0) => { - ::sse_encode(40, serializer); - ::sse_encode(field0, serializer); + } + } + impl Default for wire_cst_record_map_string_list_prim_usize_strict_keychain_kind { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_record_string_list_prim_usize_strict { + fn new_with_null_ptr() -> Self { + Self { + field0: core::ptr::null_mut(), + field1: core::ptr::null_mut(), } - crate::api::error::BdkError::Sled(field0) => { - ::sse_encode(41, serializer); - ::sse_encode(field0, serializer); + } + } + impl Default for wire_cst_record_string_list_prim_usize_strict { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_sign_options { + fn new_with_null_ptr() -> Self { + Self { + trust_witness_utxo: Default::default(), + assume_height: core::ptr::null_mut(), + allow_all_sighashes: Default::default(), + try_finalize: Default::default(), + sign_with_tap_internal_key: Default::default(), + allow_grinding: Default::default(), } - crate::api::error::BdkError::Rpc(field0) => { - ::sse_encode(42, serializer); - ::sse_encode(field0, serializer); + } + } + impl Default for wire_cst_sign_options { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_signer_error { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: SignerErrorKind { nil__: () }, } - crate::api::error::BdkError::Rusqlite(field0) => { - ::sse_encode(43, serializer); - ::sse_encode(field0, serializer); + } + } + impl Default for wire_cst_signer_error { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_sqlite_error { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: SqliteErrorKind { nil__: () }, } - crate::api::error::BdkError::InvalidInput(field0) => { - ::sse_encode(44, serializer); - ::sse_encode(field0, serializer); + } + } + impl Default for wire_cst_sqlite_error { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_sync_progress { + fn new_with_null_ptr() -> Self { + Self { + spks_consumed: Default::default(), + spks_remaining: Default::default(), + txids_consumed: Default::default(), + txids_remaining: Default::default(), + outpoints_consumed: Default::default(), + outpoints_remaining: Default::default(), } - crate::api::error::BdkError::InvalidLockTime(field0) => { - ::sse_encode(45, serializer); - ::sse_encode(field0, serializer); + } + } + impl Default for wire_cst_sync_progress { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_transaction_error { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: TransactionErrorKind { nil__: () }, } - crate::api::error::BdkError::InvalidTransaction(field0) => { - ::sse_encode(46, serializer); - ::sse_encode(field0, serializer); + } + } + impl Default for wire_cst_transaction_error { + 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(), } - _ => { - unimplemented!(""); + } + } + 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() + } + } + impl NewWithNullPtr for wire_cst_txid_parse_error { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: TxidParseErrorKind { nil__: () }, + } + } + } + impl Default for wire_cst_txid_parse_error { + fn default() -> Self { + Self::new_with_null_ptr() + } + } -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_as_string( + that: *mut wire_cst_ffi_address, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__bitcoin__ffi_address_as_string_impl(that) } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_from_script( + port_: i64, + script: *mut wire_cst_ffi_script_buf, + network: i32, + ) { + wire__crate__api__bitcoin__ffi_address_from_script_impl(port_, script, network) } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_from_string( + port_: i64, + address: *mut wire_cst_list_prim_u_8_strict, + network: i32, + ) { + wire__crate__api__bitcoin__ffi_address_from_string_impl(port_, address, network) } -} -impl SseEncode for crate::api::types::BdkTransaction { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.s, serializer); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_is_valid_for_network( + that: *mut wire_cst_ffi_address, + network: i32, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__bitcoin__ffi_address_is_valid_for_network_impl(that, network) } -} -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, - ); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_script( + opaque: *mut wire_cst_ffi_address, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__bitcoin__ffi_address_script_impl(opaque) } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_address_to_qr_uri( + that: *mut wire_cst_ffi_address, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__bitcoin__ffi_address_to_qr_uri_impl(that) } -} -impl SseEncode for crate::api::blockchain::BlockchainConfig { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - match self { - crate::api::blockchain::BlockchainConfig::Electrum { config } => { - ::sse_encode(0, serializer); - ::sse_encode(config, serializer); - } - crate::api::blockchain::BlockchainConfig::Esplora { config } => { - ::sse_encode(1, serializer); - ::sse_encode(config, serializer); - } - crate::api::blockchain::BlockchainConfig::Rpc { config } => { - ::sse_encode(2, serializer); - ::sse_encode(config, serializer); - } - _ => { - unimplemented!(""); - } - } + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_as_string( + that: *mut wire_cst_ffi_psbt, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__bitcoin__ffi_psbt_as_string_impl(that) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_combine( + port_: i64, + opaque: *mut wire_cst_ffi_psbt, + other: *mut wire_cst_ffi_psbt, + ) { + wire__crate__api__bitcoin__ffi_psbt_combine_impl(port_, opaque, other) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_extract_tx( + opaque: *mut wire_cst_ffi_psbt, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__bitcoin__ffi_psbt_extract_tx_impl(opaque) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_fee_amount( + that: *mut wire_cst_ffi_psbt, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__bitcoin__ffi_psbt_fee_amount_impl(that) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_from_str( + port_: i64, + psbt_base64: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__api__bitcoin__ffi_psbt_from_str_impl(port_, psbt_base64) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_json_serialize( + that: *mut wire_cst_ffi_psbt, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__bitcoin__ffi_psbt_json_serialize_impl(that) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_psbt_serialize( + that: *mut wire_cst_ffi_psbt, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__bitcoin__ffi_psbt_serialize_impl(that) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_script_buf_as_string( + that: *mut wire_cst_ffi_script_buf, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__bitcoin__ffi_script_buf_as_string_impl(that) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_script_buf_empty( + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__bitcoin__ffi_script_buf_empty_impl() + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_script_buf_with_capacity( + port_: i64, + capacity: usize, + ) { + wire__crate__api__bitcoin__ffi_script_buf_with_capacity_impl(port_, capacity) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_compute_txid( + that: *mut wire_cst_ffi_transaction, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__bitcoin__ffi_transaction_compute_txid_impl(that) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_from_bytes( + port_: i64, + transaction_bytes: *mut wire_cst_list_prim_u_8_loose, + ) { + wire__crate__api__bitcoin__ffi_transaction_from_bytes_impl(port_, transaction_bytes) } -} -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(); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_input( + that: *mut wire_cst_ffi_transaction, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__bitcoin__ffi_transaction_input_impl(that) } -} -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, - ); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_is_coinbase( + that: *mut wire_cst_ffi_transaction, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__bitcoin__ffi_transaction_is_coinbase_impl(that) } -} -impl SseEncode for crate::api::error::ConsensusError { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - match self { - crate::api::error::ConsensusError::Io(field0) => { - ::sse_encode(0, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::ConsensusError::OversizedVectorAllocation { requested, max } => { - ::sse_encode(1, serializer); - ::sse_encode(requested, serializer); - ::sse_encode(max, serializer); - } - crate::api::error::ConsensusError::InvalidChecksum { expected, actual } => { - ::sse_encode(2, serializer); - <[u8; 4]>::sse_encode(expected, serializer); - <[u8; 4]>::sse_encode(actual, serializer); - } - crate::api::error::ConsensusError::NonMinimalVarInt => { - ::sse_encode(3, serializer); - } - crate::api::error::ConsensusError::ParseFailed(field0) => { - ::sse_encode(4, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::ConsensusError::UnsupportedSegwitFlag(field0) => { - ::sse_encode(5, serializer); - ::sse_encode(field0, serializer); - } - _ => { - unimplemented!(""); - } - } + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_is_explicitly_rbf( + that: *mut wire_cst_ffi_transaction, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__bitcoin__ffi_transaction_is_explicitly_rbf_impl(that) } -} -impl SseEncode for crate::api::types::DatabaseConfig { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - match self { - crate::api::types::DatabaseConfig::Memory => { - ::sse_encode(0, serializer); - } - crate::api::types::DatabaseConfig::Sqlite { config } => { - ::sse_encode(1, serializer); - ::sse_encode(config, serializer); - } - crate::api::types::DatabaseConfig::Sled { config } => { - ::sse_encode(2, serializer); - ::sse_encode(config, serializer); - } - _ => { - unimplemented!(""); - } + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_is_lock_time_enabled( + that: *mut wire_cst_ffi_transaction, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__bitcoin__ffi_transaction_is_lock_time_enabled_impl(that) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_lock_time( + that: *mut wire_cst_ffi_transaction, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__bitcoin__ffi_transaction_lock_time_impl(that) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_new( + port_: i64, + version: i32, + lock_time: *mut wire_cst_lock_time, + input: *mut wire_cst_list_tx_in, + output: *mut wire_cst_list_tx_out, + ) { + wire__crate__api__bitcoin__ffi_transaction_new_impl( + port_, version, lock_time, input, output, + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_output( + that: *mut wire_cst_ffi_transaction, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__bitcoin__ffi_transaction_output_impl(that) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_serialize( + that: *mut wire_cst_ffi_transaction, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__bitcoin__ffi_transaction_serialize_impl(that) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_version( + that: *mut wire_cst_ffi_transaction, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__bitcoin__ffi_transaction_version_impl(that) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_vsize( + that: *mut wire_cst_ffi_transaction, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__bitcoin__ffi_transaction_vsize_impl(that) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__bitcoin__ffi_transaction_weight( + port_: i64, + that: *mut wire_cst_ffi_transaction, + ) { + wire__crate__api__bitcoin__ffi_transaction_weight_impl(port_, that) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_as_string( + that: *mut wire_cst_ffi_descriptor, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__descriptor__ffi_descriptor_as_string_impl(that) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_max_satisfaction_weight( + that: *mut wire_cst_ffi_descriptor, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__descriptor__ffi_descriptor_max_satisfaction_weight_impl(that) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new( + port_: i64, + descriptor: *mut wire_cst_list_prim_u_8_strict, + network: i32, + ) { + wire__crate__api__descriptor__ffi_descriptor_new_impl(port_, descriptor, network) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip44( + port_: i64, + secret_key: *mut wire_cst_ffi_descriptor_secret_key, + keychain_kind: i32, + network: i32, + ) { + wire__crate__api__descriptor__ffi_descriptor_new_bip44_impl( + port_, + secret_key, + keychain_kind, + network, + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip44_public( + port_: i64, + public_key: *mut wire_cst_ffi_descriptor_public_key, + fingerprint: *mut wire_cst_list_prim_u_8_strict, + keychain_kind: i32, + network: i32, + ) { + wire__crate__api__descriptor__ffi_descriptor_new_bip44_public_impl( + port_, + public_key, + fingerprint, + keychain_kind, + network, + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip49( + port_: i64, + secret_key: *mut wire_cst_ffi_descriptor_secret_key, + keychain_kind: i32, + network: i32, + ) { + wire__crate__api__descriptor__ffi_descriptor_new_bip49_impl( + port_, + secret_key, + keychain_kind, + network, + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip49_public( + port_: i64, + public_key: *mut wire_cst_ffi_descriptor_public_key, + fingerprint: *mut wire_cst_list_prim_u_8_strict, + keychain_kind: i32, + network: i32, + ) { + wire__crate__api__descriptor__ffi_descriptor_new_bip49_public_impl( + port_, + public_key, + fingerprint, + keychain_kind, + network, + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip84( + port_: i64, + secret_key: *mut wire_cst_ffi_descriptor_secret_key, + keychain_kind: i32, + network: i32, + ) { + wire__crate__api__descriptor__ffi_descriptor_new_bip84_impl( + port_, + secret_key, + keychain_kind, + network, + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip84_public( + port_: i64, + public_key: *mut wire_cst_ffi_descriptor_public_key, + fingerprint: *mut wire_cst_list_prim_u_8_strict, + keychain_kind: i32, + network: i32, + ) { + wire__crate__api__descriptor__ffi_descriptor_new_bip84_public_impl( + port_, + public_key, + fingerprint, + keychain_kind, + network, + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip86( + port_: i64, + secret_key: *mut wire_cst_ffi_descriptor_secret_key, + keychain_kind: i32, + network: i32, + ) { + wire__crate__api__descriptor__ffi_descriptor_new_bip86_impl( + port_, + secret_key, + keychain_kind, + network, + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_new_bip86_public( + port_: i64, + public_key: *mut wire_cst_ffi_descriptor_public_key, + fingerprint: *mut wire_cst_list_prim_u_8_strict, + keychain_kind: i32, + network: i32, + ) { + wire__crate__api__descriptor__ffi_descriptor_new_bip86_public_impl( + port_, + public_key, + fingerprint, + keychain_kind, + network, + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__descriptor__ffi_descriptor_to_string_with_secret( + that: *mut wire_cst_ffi_descriptor, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__descriptor__ffi_descriptor_to_string_with_secret_impl(that) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__electrum__ffi_electrum_client_broadcast( + port_: i64, + opaque: *mut wire_cst_ffi_electrum_client, + transaction: *mut wire_cst_ffi_transaction, + ) { + wire__crate__api__electrum__ffi_electrum_client_broadcast_impl(port_, opaque, transaction) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__electrum__ffi_electrum_client_full_scan( + port_: i64, + opaque: *mut wire_cst_ffi_electrum_client, + request: *mut wire_cst_ffi_full_scan_request, + stop_gap: u64, + batch_size: u64, + fetch_prev_txouts: bool, + ) { + wire__crate__api__electrum__ffi_electrum_client_full_scan_impl( + port_, + opaque, + request, + stop_gap, + batch_size, + fetch_prev_txouts, + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__electrum__ffi_electrum_client_new( + port_: i64, + url: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__api__electrum__ffi_electrum_client_new_impl(port_, url) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__electrum__ffi_electrum_client_sync( + port_: i64, + opaque: *mut wire_cst_ffi_electrum_client, + request: *mut wire_cst_ffi_sync_request, + batch_size: u64, + fetch_prev_txouts: bool, + ) { + wire__crate__api__electrum__ffi_electrum_client_sync_impl( + port_, + opaque, + request, + batch_size, + fetch_prev_txouts, + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__esplora__ffi_esplora_client_broadcast( + port_: i64, + opaque: *mut wire_cst_ffi_esplora_client, + transaction: *mut wire_cst_ffi_transaction, + ) { + wire__crate__api__esplora__ffi_esplora_client_broadcast_impl(port_, opaque, transaction) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__esplora__ffi_esplora_client_full_scan( + port_: i64, + opaque: *mut wire_cst_ffi_esplora_client, + request: *mut wire_cst_ffi_full_scan_request, + stop_gap: u64, + parallel_requests: u64, + ) { + wire__crate__api__esplora__ffi_esplora_client_full_scan_impl( + port_, + opaque, + request, + stop_gap, + parallel_requests, + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__esplora__ffi_esplora_client_new( + port_: i64, + url: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__api__esplora__ffi_esplora_client_new_impl(port_, url) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__esplora__ffi_esplora_client_sync( + port_: i64, + opaque: *mut wire_cst_ffi_esplora_client, + request: *mut wire_cst_ffi_sync_request, + parallel_requests: u64, + ) { + wire__crate__api__esplora__ffi_esplora_client_sync_impl( + port_, + opaque, + request, + parallel_requests, + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__ffi_derivation_path_as_string( + that: *mut wire_cst_ffi_derivation_path, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__key__ffi_derivation_path_as_string_impl(that) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__ffi_derivation_path_from_string( + port_: i64, + path: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__api__key__ffi_derivation_path_from_string_impl(port_, path) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_public_key_as_string( + that: *mut wire_cst_ffi_descriptor_public_key, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__key__ffi_descriptor_public_key_as_string_impl(that) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_public_key_derive( + port_: i64, + opaque: *mut wire_cst_ffi_descriptor_public_key, + path: *mut wire_cst_ffi_derivation_path, + ) { + wire__crate__api__key__ffi_descriptor_public_key_derive_impl(port_, opaque, path) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_public_key_extend( + port_: i64, + opaque: *mut wire_cst_ffi_descriptor_public_key, + path: *mut wire_cst_ffi_derivation_path, + ) { + wire__crate__api__key__ffi_descriptor_public_key_extend_impl(port_, opaque, path) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_public_key_from_string( + port_: i64, + public_key: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__api__key__ffi_descriptor_public_key_from_string_impl(port_, public_key) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_as_public( + opaque: *mut wire_cst_ffi_descriptor_secret_key, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__key__ffi_descriptor_secret_key_as_public_impl(opaque) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_as_string( + that: *mut wire_cst_ffi_descriptor_secret_key, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__key__ffi_descriptor_secret_key_as_string_impl(that) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_create( + port_: i64, + network: i32, + mnemonic: *mut wire_cst_ffi_mnemonic, + password: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__api__key__ffi_descriptor_secret_key_create_impl( + port_, network, mnemonic, password, + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_derive( + port_: i64, + opaque: *mut wire_cst_ffi_descriptor_secret_key, + path: *mut wire_cst_ffi_derivation_path, + ) { + wire__crate__api__key__ffi_descriptor_secret_key_derive_impl(port_, opaque, path) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_extend( + port_: i64, + opaque: *mut wire_cst_ffi_descriptor_secret_key, + path: *mut wire_cst_ffi_derivation_path, + ) { + wire__crate__api__key__ffi_descriptor_secret_key_extend_impl(port_, opaque, path) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_from_string( + port_: i64, + secret_key: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__api__key__ffi_descriptor_secret_key_from_string_impl(port_, secret_key) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__ffi_descriptor_secret_key_secret_bytes( + that: *mut wire_cst_ffi_descriptor_secret_key, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__key__ffi_descriptor_secret_key_secret_bytes_impl(that) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__ffi_mnemonic_as_string( + that: *mut wire_cst_ffi_mnemonic, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__key__ffi_mnemonic_as_string_impl(that) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__ffi_mnemonic_from_entropy( + port_: i64, + entropy: *mut wire_cst_list_prim_u_8_loose, + ) { + wire__crate__api__key__ffi_mnemonic_from_entropy_impl(port_, entropy) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__ffi_mnemonic_from_string( + port_: i64, + mnemonic: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__api__key__ffi_mnemonic_from_string_impl(port_, mnemonic) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__key__ffi_mnemonic_new( + port_: i64, + word_count: i32, + ) { + wire__crate__api__key__ffi_mnemonic_new_impl(port_, word_count) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__store__ffi_connection_new( + port_: i64, + path: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__api__store__ffi_connection_new_impl(port_, path) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__store__ffi_connection_new_in_memory( + port_: i64, + ) { + wire__crate__api__store__ffi_connection_new_in_memory_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__tx_builder__finish_bump_fee_tx_builder( + port_: i64, + txid: *mut wire_cst_list_prim_u_8_strict, + fee_rate: *mut wire_cst_fee_rate, + wallet: *mut wire_cst_ffi_wallet, + enable_rbf: bool, + n_sequence: *mut u32, + ) { + wire__crate__api__tx_builder__finish_bump_fee_tx_builder_impl( + port_, txid, fee_rate, wallet, enable_rbf, n_sequence, + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__tx_builder__tx_builder_finish( + port_: i64, + wallet: *mut wire_cst_ffi_wallet, + recipients: *mut wire_cst_list_record_ffi_script_buf_u_64, + utxos: *mut wire_cst_list_out_point, + un_spendable: *mut wire_cst_list_out_point, + change_policy: i32, + manually_selected_only: bool, + fee_rate: *mut wire_cst_fee_rate, + fee_absolute: *mut u64, + drain_wallet: bool, + policy_path: *mut wire_cst_record_map_string_list_prim_usize_strict_keychain_kind, + drain_to: *mut wire_cst_ffi_script_buf, + rbf: *mut wire_cst_rbf_value, + data: *mut wire_cst_list_prim_u_8_loose, + ) { + wire__crate__api__tx_builder__tx_builder_finish_impl( + port_, + wallet, + recipients, + utxos, + un_spendable, + change_policy, + manually_selected_only, + fee_rate, + fee_absolute, + drain_wallet, + policy_path, + drain_to, + rbf, + data, + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__change_spend_policy_default( + port_: i64, + ) { + wire__crate__api__types__change_spend_policy_default_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__ffi_full_scan_request_builder_build( + port_: i64, + that: *mut wire_cst_ffi_full_scan_request_builder, + ) { + wire__crate__api__types__ffi_full_scan_request_builder_build_impl(port_, that) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__ffi_full_scan_request_builder_inspect_spks_for_all_keychains( + port_: i64, + that: *mut wire_cst_ffi_full_scan_request_builder, + inspector: *const std::ffi::c_void, + ) { + wire__crate__api__types__ffi_full_scan_request_builder_inspect_spks_for_all_keychains_impl( + port_, that, inspector, + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__ffi_policy_id( + that: *mut wire_cst_ffi_policy, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__types__ffi_policy_id_impl(that) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__ffi_sync_request_builder_build( + port_: i64, + that: *mut wire_cst_ffi_sync_request_builder, + ) { + wire__crate__api__types__ffi_sync_request_builder_build_impl(port_, that) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__ffi_sync_request_builder_inspect_spks( + port_: i64, + that: *mut wire_cst_ffi_sync_request_builder, + inspector: *const std::ffi::c_void, + ) { + wire__crate__api__types__ffi_sync_request_builder_inspect_spks_impl(port_, that, inspector) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__network_default(port_: i64) { + wire__crate__api__types__network_default_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__types__sign_options_default(port_: i64) { + wire__crate__api__types__sign_options_default_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_apply_update( + port_: i64, + that: *mut wire_cst_ffi_wallet, + update: *mut wire_cst_ffi_update, + ) { + wire__crate__api__wallet__ffi_wallet_apply_update_impl(port_, that, update) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_calculate_fee( + port_: i64, + opaque: *mut wire_cst_ffi_wallet, + tx: *mut wire_cst_ffi_transaction, + ) { + wire__crate__api__wallet__ffi_wallet_calculate_fee_impl(port_, opaque, tx) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_calculate_fee_rate( + port_: i64, + opaque: *mut wire_cst_ffi_wallet, + tx: *mut wire_cst_ffi_transaction, + ) { + wire__crate__api__wallet__ffi_wallet_calculate_fee_rate_impl(port_, opaque, tx) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_get_balance( + that: *mut wire_cst_ffi_wallet, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__wallet__ffi_wallet_get_balance_impl(that) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_get_tx( + that: *mut wire_cst_ffi_wallet, + txid: *mut wire_cst_list_prim_u_8_strict, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__wallet__ffi_wallet_get_tx_impl(that, txid) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_is_mine( + that: *mut wire_cst_ffi_wallet, + script: *mut wire_cst_ffi_script_buf, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__wallet__ffi_wallet_is_mine_impl(that, script) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_list_output( + that: *mut wire_cst_ffi_wallet, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__wallet__ffi_wallet_list_output_impl(that) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_list_unspent( + that: *mut wire_cst_ffi_wallet, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__wallet__ffi_wallet_list_unspent_impl(that) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_load( + port_: i64, + descriptor: *mut wire_cst_ffi_descriptor, + change_descriptor: *mut wire_cst_ffi_descriptor, + connection: *mut wire_cst_ffi_connection, + ) { + wire__crate__api__wallet__ffi_wallet_load_impl( + port_, + descriptor, + change_descriptor, + connection, + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_network( + that: *mut wire_cst_ffi_wallet, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__wallet__ffi_wallet_network_impl(that) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_new( + port_: i64, + descriptor: *mut wire_cst_ffi_descriptor, + change_descriptor: *mut wire_cst_ffi_descriptor, + network: i32, + connection: *mut wire_cst_ffi_connection, + ) { + wire__crate__api__wallet__ffi_wallet_new_impl( + port_, + descriptor, + change_descriptor, + network, + connection, + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_persist( + port_: i64, + opaque: *mut wire_cst_ffi_wallet, + connection: *mut wire_cst_ffi_connection, + ) { + wire__crate__api__wallet__ffi_wallet_persist_impl(port_, opaque, connection) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_policies( + opaque: *mut wire_cst_ffi_wallet, + keychain_kind: i32, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__wallet__ffi_wallet_policies_impl(opaque, keychain_kind) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_reveal_next_address( + opaque: *mut wire_cst_ffi_wallet, + keychain_kind: i32, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__wallet__ffi_wallet_reveal_next_address_impl(opaque, keychain_kind) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_sign( + port_: i64, + opaque: *mut wire_cst_ffi_wallet, + psbt: *mut wire_cst_ffi_psbt, + sign_options: *mut wire_cst_sign_options, + ) { + wire__crate__api__wallet__ffi_wallet_sign_impl(port_, opaque, psbt, sign_options) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_start_full_scan( + port_: i64, + that: *mut wire_cst_ffi_wallet, + ) { + wire__crate__api__wallet__ffi_wallet_start_full_scan_impl(port_, that) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_start_sync_with_revealed_spks( + port_: i64, + that: *mut wire_cst_ffi_wallet, + ) { + wire__crate__api__wallet__ffi_wallet_start_sync_with_revealed_spks_impl(port_, that) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_wire__crate__api__wallet__ffi_wallet_transactions( + that: *mut wire_cst_ffi_wallet, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__api__wallet__ffi_wallet_transactions_impl(that) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_corebitcoinAddress( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::::increment_strong_count(ptr as _); } } -} -impl SseEncode for crate::api::error::DescriptorError { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - match self { - crate::api::error::DescriptorError::InvalidHdKeyPath => { - ::sse_encode(0, serializer); - } - crate::api::error::DescriptorError::InvalidDescriptorChecksum => { - ::sse_encode(1, serializer); - } - crate::api::error::DescriptorError::HardenedDerivationXpub => { - ::sse_encode(2, serializer); - } - crate::api::error::DescriptorError::MultiPath => { - ::sse_encode(3, serializer); - } - crate::api::error::DescriptorError::Key(field0) => { - ::sse_encode(4, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::DescriptorError::Policy(field0) => { - ::sse_encode(5, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::DescriptorError::InvalidDescriptorCharacter(field0) => { - ::sse_encode(6, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::DescriptorError::Bip32(field0) => { - ::sse_encode(7, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::DescriptorError::Base58(field0) => { - ::sse_encode(8, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::DescriptorError::Pk(field0) => { - ::sse_encode(9, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::DescriptorError::Miniscript(field0) => { - ::sse_encode(10, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::DescriptorError::Hex(field0) => { - ::sse_encode(11, serializer); - ::sse_encode(field0, serializer); - } - _ => { - unimplemented!(""); - } + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_corebitcoinAddress( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::::decrement_strong_count(ptr as _); } } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_corebitcoinTransaction( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::::increment_strong_count(ptr as _); + } } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_corebitcoinTransaction( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::::decrement_strong_count(ptr as _); + } } -} -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(); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_electrumBdkElectrumClientbdk_electrumelectrum_clientClient( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::>::increment_strong_count(ptr as _); + } } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_electrumBdkElectrumClientbdk_electrumelectrum_clientClient( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::>::decrement_strong_count(ptr as _); + } } -} -impl SseEncode for crate::api::error::HexError { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - match self { - crate::api::error::HexError::InvalidChar(field0) => { - ::sse_encode(0, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::HexError::OddLengthString(field0) => { - ::sse_encode(1, serializer); - ::sse_encode(field0, serializer); - } - crate::api::error::HexError::InvalidLength(field0, field1) => { - ::sse_encode(2, serializer); - ::sse_encode(field0, serializer); - ::sse_encode(field1, serializer); - } - _ => { - unimplemented!(""); - } + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_esploraesplora_clientBlockingClient( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::::increment_strong_count(ptr as _); } } -} -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(); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_esploraesplora_clientBlockingClient( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::::decrement_strong_count(ptr as _); + } } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletUpdate( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::::increment_strong_count(ptr as _); + } } -} -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, - ); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletUpdate( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::::decrement_strong_count(ptr as _); + } } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletbitcoinbip32DerivationPath( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::::increment_strong_count(ptr as _); } } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletbitcoinbip32DerivationPath( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::::decrement_strong_count(ptr as _); } } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletdescriptorExtendedDescriptor( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::::increment_strong_count(ptr as _); } } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletdescriptorExtendedDescriptor( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::::decrement_strong_count(ptr as _); } } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletdescriptorPolicy( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::::increment_strong_count(ptr as _); } } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletdescriptorPolicy( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::::decrement_strong_count(ptr as _); } } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysDescriptorPublicKey( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::::increment_strong_count(ptr as _); } } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysDescriptorPublicKey( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::::decrement_strong_count(ptr as _); } } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysDescriptorSecretKey( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::::increment_strong_count(ptr as _); + } } -} -impl SseEncode for crate::api::types::LockTime { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - match self { - crate::api::types::LockTime::Blocks(field0) => { - ::sse_encode(0, serializer); - ::sse_encode(field0, serializer); - } - crate::api::types::LockTime::Seconds(field0) => { - ::sse_encode(1, serializer); - ::sse_encode(field0, serializer); - } - _ => { - unimplemented!(""); - } + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysDescriptorSecretKey( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::::decrement_strong_count(ptr as _); } } -} -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, - ); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysKeyMap( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::::increment_strong_count(ptr as _); + } } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysKeyMap( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::::decrement_strong_count(ptr as _); } } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdk_walletkeysbip39Mnemonic( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::::increment_strong_count(ptr as _); } } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdk_walletkeysbip39Mnemonic( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::::decrement_strong_count(ptr as _); } } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestBuilderbdk_walletKeychainKind( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::< + std::sync::Mutex< + Option>, + >, + >::increment_strong_count(ptr as _); } } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestBuilderbdk_walletKeychainKind( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::< + std::sync::Mutex< + Option>, + >, + >::decrement_strong_count(ptr as _); } } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestbdk_walletKeychainKind( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::< + std::sync::Mutex< + Option>, + >, + >::increment_strong_count(ptr as _); } } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientFullScanRequestbdk_walletKeychainKind( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::< + std::sync::Mutex< + Option>, + >, + >::decrement_strong_count(ptr as _); } } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestBuilderbdk_walletKeychainKindu32( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::< + std::sync::Mutex< + Option< + bdk_core::spk_client::SyncRequestBuilder<(bdk_wallet::KeychainKind, u32)>, + >, + >, + >::increment_strong_count(ptr as _); } } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestBuilderbdk_walletKeychainKindu32( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::< + std::sync::Mutex< + Option< + bdk_core::spk_client::SyncRequestBuilder<(bdk_wallet::KeychainKind, u32)>, + >, + >, + >::decrement_strong_count(ptr as _); } } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestbdk_walletKeychainKindu32( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::< + std::sync::Mutex< + Option>, + >, + >::increment_strong_count(ptr as _); } } -} -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, + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexOptionbdk_corespk_clientSyncRequestbdk_walletKeychainKindu32( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::< + std::sync::Mutex< + Option>, + >, + >::decrement_strong_count(ptr as _); + } + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdk_corebitcoinpsbtPsbt( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::>::increment_strong_count( + ptr as _, ); } } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_corebitcoinpsbtPsbt( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::>::decrement_strong_count( + ptr as _, + ); } } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdk_walletPersistedWalletbdk_walletrusqliteConnection( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc:: >>::increment_strong_count(ptr as _); } } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_walletPersistedWalletbdk_walletrusqliteConnection( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc:: >>::decrement_strong_count(ptr as _); } } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_stdsyncMutexbdk_walletrusqliteConnection( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::>::increment_strong_count( + ptr as _, + ); } } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_stdsyncMutexbdk_walletrusqliteConnection( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::>::decrement_strong_count( + ptr as _, + ); } } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_confirmation_block_time( + ) -> *mut wire_cst_confirmation_block_time { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_confirmation_block_time::new_with_null_ptr(), + ) } -} -impl SseEncode for crate::api::types::Payload { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - match self { - crate::api::types::Payload::PubkeyHash { pubkey_hash } => { - ::sse_encode(0, serializer); - ::sse_encode(pubkey_hash, serializer); - } - crate::api::types::Payload::ScriptHash { script_hash } => { - ::sse_encode(1, serializer); - ::sse_encode(script_hash, serializer); - } - crate::api::types::Payload::WitnessProgram { version, program } => { - ::sse_encode(2, serializer); - ::sse_encode(version, serializer); - >::sse_encode(program, serializer); - } - _ => { - unimplemented!(""); - } - } + #[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()) } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_ffi_address( + ) -> *mut wire_cst_ffi_address { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ffi_address::new_with_null_ptr(), + ) } -} -impl SseEncode for crate::api::types::RbfValue { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - match self { - crate::api::types::RbfValue::RbfDefault => { - ::sse_encode(0, serializer); - } - crate::api::types::RbfValue::Value(field0) => { - ::sse_encode(1, serializer); - ::sse_encode(field0, serializer); - } - _ => { - unimplemented!(""); - } - } + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_ffi_canonical_tx( + ) -> *mut wire_cst_ffi_canonical_tx { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ffi_canonical_tx::new_with_null_ptr(), + ) } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_ffi_connection( + ) -> *mut wire_cst_ffi_connection { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ffi_connection::new_with_null_ptr(), + ) } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_ffi_derivation_path( + ) -> *mut wire_cst_ffi_derivation_path { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ffi_derivation_path::new_with_null_ptr(), + ) } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_ffi_descriptor( + ) -> *mut wire_cst_ffi_descriptor { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ffi_descriptor::new_with_null_ptr(), + ) } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_ffi_descriptor_public_key( + ) -> *mut wire_cst_ffi_descriptor_public_key { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ffi_descriptor_public_key::new_with_null_ptr(), + ) } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_ffi_descriptor_secret_key( + ) -> *mut wire_cst_ffi_descriptor_secret_key { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ffi_descriptor_secret_key::new_with_null_ptr(), + ) } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_ffi_electrum_client( + ) -> *mut wire_cst_ffi_electrum_client { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ffi_electrum_client::new_with_null_ptr(), + ) } -} -impl SseEncode for crate::api::types::SignOptions { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.trust_witness_utxo, serializer); - >::sse_encode(self.assume_height, serializer); - ::sse_encode(self.allow_all_sighashes, serializer); - ::sse_encode(self.remove_partial_sigs, serializer); - ::sse_encode(self.try_finalize, serializer); - ::sse_encode(self.sign_with_tap_internal_key, serializer); - ::sse_encode(self.allow_grinding, serializer); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_ffi_esplora_client( + ) -> *mut wire_cst_ffi_esplora_client { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ffi_esplora_client::new_with_null_ptr(), + ) } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_ffi_full_scan_request( + ) -> *mut wire_cst_ffi_full_scan_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ffi_full_scan_request::new_with_null_ptr(), + ) } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_ffi_full_scan_request_builder( + ) -> *mut wire_cst_ffi_full_scan_request_builder { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ffi_full_scan_request_builder::new_with_null_ptr(), + ) } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_ffi_mnemonic( + ) -> *mut wire_cst_ffi_mnemonic { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ffi_mnemonic::new_with_null_ptr(), + ) } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_ffi_policy() -> *mut wire_cst_ffi_policy + { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ffi_policy::new_with_null_ptr(), + ) } -} -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); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_ffi_psbt() -> *mut wire_cst_ffi_psbt { + flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_ffi_psbt::new_with_null_ptr()) } -} -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(); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_ffi_script_buf( + ) -> *mut wire_cst_ffi_script_buf { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ffi_script_buf::new_with_null_ptr(), + ) } -} -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(); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_ffi_sync_request( + ) -> *mut wire_cst_ffi_sync_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ffi_sync_request::new_with_null_ptr(), + ) } -} -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(); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_ffi_sync_request_builder( + ) -> *mut wire_cst_ffi_sync_request_builder { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ffi_sync_request_builder::new_with_null_ptr(), + ) } -} -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, - ); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_ffi_transaction( + ) -> *mut wire_cst_ffi_transaction { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ffi_transaction::new_with_null_ptr(), + ) } -} -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) {} -} + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_ffi_update() -> *mut wire_cst_ffi_update + { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ffi_update::new_with_null_ptr(), + ) + } -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(); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_ffi_wallet() -> *mut wire_cst_ffi_wallet + { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ffi_wallet::new_with_null_ptr(), + ) } -} -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, - ); + #[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()) } -} -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, - ); + #[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()) } -} -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, - ); + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_cst_new_box_autoadd_record_map_string_list_prim_usize_strict_keychain_kind( + ) -> *mut wire_cst_record_map_string_list_prim_usize_strict_keychain_kind { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_record_map_string_list_prim_usize_strict_keychain_kind::new_with_null_ptr(), + ) } -} -#[cfg(not(target_family = "wasm"))] -#[path = "frb_generated.io.rs"] -mod io; + #[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_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_list_ffi_canonical_tx( + len: i32, + ) -> *mut wire_cst_list_ffi_canonical_tx { + let wrap = wire_cst_list_ffi_canonical_tx { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( + ::new_with_null_ptr(), + len, + ), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_cst_new_list_list_prim_u_8_strict( + len: i32, + ) -> *mut wire_cst_list_list_prim_u_8_strict { + let wrap = wire_cst_list_list_prim_u_8_strict { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( + <*mut wire_cst_list_prim_u_8_strict>::new_with_null_ptr(), + len, + ), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_cst_new_list_local_output( + len: i32, + ) -> *mut wire_cst_list_local_output { + let wrap = wire_cst_list_local_output { + 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_prim_usize_strict( + len: i32, + ) -> *mut wire_cst_list_prim_usize_strict { + let ans = wire_cst_list_prim_usize_strict { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr(Default::default(), len), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(ans) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_cst_new_list_record_ffi_script_buf_u_64( + len: i32, + ) -> *mut wire_cst_list_record_ffi_script_buf_u_64 { + let wrap = wire_cst_list_record_ffi_script_buf_u_64 { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( + ::new_with_null_ptr(), + len, + ), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_cst_new_list_record_string_list_prim_usize_strict( + len: i32, + ) -> *mut wire_cst_list_record_string_list_prim_usize_strict { + let wrap = wire_cst_list_record_string_list_prim_usize_strict { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( + ::new_with_null_ptr(), + len, + ), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) + } + + #[no_mangle] + pub extern "C" fn frbgen_bdk_flutter_cst_new_list_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_info { + index: u32, + address: wire_cst_ffi_address, + keychain: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_address_parse_error { + tag: i32, + kind: AddressParseErrorKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union AddressParseErrorKind { + WitnessVersion: wire_cst_AddressParseError_WitnessVersion, + WitnessProgram: wire_cst_AddressParseError_WitnessProgram, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_AddressParseError_WitnessVersion { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_AddressParseError_WitnessProgram { + error_message: *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_bip_32_error { + tag: i32, + kind: Bip32ErrorKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union Bip32ErrorKind { + Secp256k1: wire_cst_Bip32Error_Secp256k1, + InvalidChildNumber: wire_cst_Bip32Error_InvalidChildNumber, + UnknownVersion: wire_cst_Bip32Error_UnknownVersion, + WrongExtendedKeyLength: wire_cst_Bip32Error_WrongExtendedKeyLength, + Base58: wire_cst_Bip32Error_Base58, + Hex: wire_cst_Bip32Error_Hex, + InvalidPublicKeyHexLength: wire_cst_Bip32Error_InvalidPublicKeyHexLength, + UnknownError: wire_cst_Bip32Error_UnknownError, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_Bip32Error_Secp256k1 { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_Bip32Error_InvalidChildNumber { + child_number: u32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_Bip32Error_UnknownVersion { + version: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_Bip32Error_WrongExtendedKeyLength { + length: u32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_Bip32Error_Base58 { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_Bip32Error_Hex { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_Bip32Error_InvalidPublicKeyHexLength { + length: u32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_Bip32Error_UnknownError { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_bip_39_error { + tag: i32, + kind: Bip39ErrorKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union Bip39ErrorKind { + BadWordCount: wire_cst_Bip39Error_BadWordCount, + UnknownWord: wire_cst_Bip39Error_UnknownWord, + BadEntropyBitCount: wire_cst_Bip39Error_BadEntropyBitCount, + AmbiguousLanguages: wire_cst_Bip39Error_AmbiguousLanguages, + Generic: wire_cst_Bip39Error_Generic, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_Bip39Error_BadWordCount { + word_count: u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_Bip39Error_UnknownWord { + index: u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_Bip39Error_BadEntropyBitCount { + bit_count: u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_Bip39Error_AmbiguousLanguages { + languages: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_Bip39Error_Generic { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_block_id { + height: u32, + hash: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_calculate_fee_error { + tag: i32, + kind: CalculateFeeErrorKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union CalculateFeeErrorKind { + Generic: wire_cst_CalculateFeeError_Generic, + MissingTxOut: wire_cst_CalculateFeeError_MissingTxOut, + NegativeFee: wire_cst_CalculateFeeError_NegativeFee, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_CalculateFeeError_Generic { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_CalculateFeeError_MissingTxOut { + out_points: *mut wire_cst_list_out_point, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_CalculateFeeError_NegativeFee { + amount: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_cannot_connect_error { + tag: i32, + kind: CannotConnectErrorKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union CannotConnectErrorKind { + Include: wire_cst_CannotConnectError_Include, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_CannotConnectError_Include { + height: u32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_chain_position { + tag: i32, + kind: ChainPositionKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union ChainPositionKind { + Confirmed: wire_cst_ChainPosition_Confirmed, + Unconfirmed: wire_cst_ChainPosition_Unconfirmed, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ChainPosition_Confirmed { + confirmation_block_time: *mut wire_cst_confirmation_block_time, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ChainPosition_Unconfirmed { + timestamp: u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_confirmation_block_time { + block_id: wire_cst_block_id, + confirmation_time: u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_create_tx_error { + tag: i32, + kind: CreateTxErrorKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union CreateTxErrorKind { + TransactionNotFound: wire_cst_CreateTxError_TransactionNotFound, + TransactionConfirmed: wire_cst_CreateTxError_TransactionConfirmed, + IrreplaceableTransaction: wire_cst_CreateTxError_IrreplaceableTransaction, + Generic: wire_cst_CreateTxError_Generic, + Descriptor: wire_cst_CreateTxError_Descriptor, + Policy: wire_cst_CreateTxError_Policy, + SpendingPolicyRequired: wire_cst_CreateTxError_SpendingPolicyRequired, + LockTime: wire_cst_CreateTxError_LockTime, + RbfSequenceCsv: wire_cst_CreateTxError_RbfSequenceCsv, + FeeTooLow: wire_cst_CreateTxError_FeeTooLow, + FeeRateTooLow: wire_cst_CreateTxError_FeeRateTooLow, + OutputBelowDustLimit: wire_cst_CreateTxError_OutputBelowDustLimit, + CoinSelection: wire_cst_CreateTxError_CoinSelection, + InsufficientFunds: wire_cst_CreateTxError_InsufficientFunds, + Psbt: wire_cst_CreateTxError_Psbt, + MissingKeyOrigin: wire_cst_CreateTxError_MissingKeyOrigin, + UnknownUtxo: wire_cst_CreateTxError_UnknownUtxo, + MissingNonWitnessUtxo: wire_cst_CreateTxError_MissingNonWitnessUtxo, + MiniscriptPsbt: wire_cst_CreateTxError_MiniscriptPsbt, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_CreateTxError_TransactionNotFound { + txid: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_CreateTxError_TransactionConfirmed { + txid: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_CreateTxError_IrreplaceableTransaction { + txid: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_CreateTxError_Generic { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_CreateTxError_Descriptor { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_CreateTxError_Policy { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_CreateTxError_SpendingPolicyRequired { + kind: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_CreateTxError_LockTime { + requested_time: *mut wire_cst_list_prim_u_8_strict, + required_time: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_CreateTxError_RbfSequenceCsv { + rbf: *mut wire_cst_list_prim_u_8_strict, + csv: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_CreateTxError_FeeTooLow { + fee_required: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_CreateTxError_FeeRateTooLow { + fee_rate_required: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_CreateTxError_OutputBelowDustLimit { + index: u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_CreateTxError_CoinSelection { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_CreateTxError_InsufficientFunds { + needed: u64, + available: u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_CreateTxError_Psbt { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_CreateTxError_MissingKeyOrigin { + key: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_CreateTxError_UnknownUtxo { + outpoint: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_CreateTxError_MissingNonWitnessUtxo { + outpoint: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_CreateTxError_MiniscriptPsbt { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_create_with_persist_error { + tag: i32, + kind: CreateWithPersistErrorKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union CreateWithPersistErrorKind { + Persist: wire_cst_CreateWithPersistError_Persist, + Descriptor: wire_cst_CreateWithPersistError_Descriptor, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_CreateWithPersistError_Persist { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_CreateWithPersistError_Descriptor { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[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, + Generic: wire_cst_DescriptorError_Generic, + 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 { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_DescriptorError_Generic { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_DescriptorError_Policy { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_DescriptorError_InvalidDescriptorCharacter { + charector: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_DescriptorError_Bip32 { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_DescriptorError_Base58 { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_DescriptorError_Pk { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_DescriptorError_Miniscript { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_DescriptorError_Hex { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_descriptor_key_error { + tag: i32, + kind: DescriptorKeyErrorKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union DescriptorKeyErrorKind { + Parse: wire_cst_DescriptorKeyError_Parse, + Bip32: wire_cst_DescriptorKeyError_Bip32, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_DescriptorKeyError_Parse { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_DescriptorKeyError_Bip32 { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_electrum_error { + tag: i32, + kind: ElectrumErrorKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union ElectrumErrorKind { + IOError: wire_cst_ElectrumError_IOError, + Json: wire_cst_ElectrumError_Json, + Hex: wire_cst_ElectrumError_Hex, + Protocol: wire_cst_ElectrumError_Protocol, + Bitcoin: wire_cst_ElectrumError_Bitcoin, + InvalidResponse: wire_cst_ElectrumError_InvalidResponse, + Message: wire_cst_ElectrumError_Message, + InvalidDNSNameError: wire_cst_ElectrumError_InvalidDNSNameError, + SharedIOError: wire_cst_ElectrumError_SharedIOError, + CouldNotCreateConnection: wire_cst_ElectrumError_CouldNotCreateConnection, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ElectrumError_IOError { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ElectrumError_Json { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ElectrumError_Hex { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ElectrumError_Protocol { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ElectrumError_Bitcoin { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ElectrumError_InvalidResponse { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ElectrumError_Message { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ElectrumError_InvalidDNSNameError { + domain: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ElectrumError_SharedIOError { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ElectrumError_CouldNotCreateConnection { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_esplora_error { + tag: i32, + kind: EsploraErrorKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union EsploraErrorKind { + Minreq: wire_cst_EsploraError_Minreq, + HttpResponse: wire_cst_EsploraError_HttpResponse, + Parsing: wire_cst_EsploraError_Parsing, + StatusCode: wire_cst_EsploraError_StatusCode, + BitcoinEncoding: wire_cst_EsploraError_BitcoinEncoding, + HexToArray: wire_cst_EsploraError_HexToArray, + HexToBytes: wire_cst_EsploraError_HexToBytes, + HeaderHeightNotFound: wire_cst_EsploraError_HeaderHeightNotFound, + InvalidHttpHeaderName: wire_cst_EsploraError_InvalidHttpHeaderName, + InvalidHttpHeaderValue: wire_cst_EsploraError_InvalidHttpHeaderValue, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_EsploraError_Minreq { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_EsploraError_HttpResponse { + status: u16, + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_EsploraError_Parsing { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_EsploraError_StatusCode { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_EsploraError_BitcoinEncoding { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_EsploraError_HexToArray { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_EsploraError_HexToBytes { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_EsploraError_HeaderHeightNotFound { + height: u32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_EsploraError_InvalidHttpHeaderName { + name: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_EsploraError_InvalidHttpHeaderValue { + value: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_extract_tx_error { + tag: i32, + kind: ExtractTxErrorKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union ExtractTxErrorKind { + AbsurdFeeRate: wire_cst_ExtractTxError_AbsurdFeeRate, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ExtractTxError_AbsurdFeeRate { + fee_rate: u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_fee_rate { + sat_kwu: u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ffi_address { + field0: usize, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ffi_canonical_tx { + transaction: wire_cst_ffi_transaction, + chain_position: wire_cst_chain_position, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ffi_connection { + field0: usize, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ffi_derivation_path { + opaque: usize, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ffi_descriptor { + extended_descriptor: usize, + key_map: usize, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ffi_descriptor_public_key { + opaque: usize, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ffi_descriptor_secret_key { + opaque: usize, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ffi_electrum_client { + opaque: usize, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ffi_esplora_client { + opaque: usize, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ffi_full_scan_request { + field0: usize, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ffi_full_scan_request_builder { + field0: usize, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ffi_mnemonic { + opaque: usize, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ffi_policy { + opaque: usize, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ffi_psbt { + opaque: usize, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ffi_script_buf { + bytes: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ffi_sync_request { + field0: usize, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ffi_sync_request_builder { + field0: usize, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ffi_transaction { + opaque: usize, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ffi_update { + field0: usize, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ffi_wallet { + opaque: usize, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_from_script_error { + tag: i32, + kind: FromScriptErrorKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union FromScriptErrorKind { + WitnessProgram: wire_cst_FromScriptError_WitnessProgram, + WitnessVersion: wire_cst_FromScriptError_WitnessVersion, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_FromScriptError_WitnessProgram { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_FromScriptError_WitnessVersion { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_ffi_canonical_tx { + ptr: *mut wire_cst_ffi_canonical_tx, + len: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_list_prim_u_8_strict { + ptr: *mut *mut wire_cst_list_prim_u_8_strict, + len: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_local_output { + ptr: *mut wire_cst_local_output, + 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_prim_usize_strict { + ptr: *mut usize, + len: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_record_ffi_script_buf_u_64 { + ptr: *mut wire_cst_record_ffi_script_buf_u_64, + len: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_record_string_list_prim_usize_strict { + ptr: *mut wire_cst_record_string_list_prim_usize_strict, + 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_load_with_persist_error { + tag: i32, + kind: LoadWithPersistErrorKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union LoadWithPersistErrorKind { + Persist: wire_cst_LoadWithPersistError_Persist, + InvalidChangeSet: wire_cst_LoadWithPersistError_InvalidChangeSet, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LoadWithPersistError_Persist { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LoadWithPersistError_InvalidChangeSet { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_local_output { + 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_psbt_error { + tag: i32, + kind: PsbtErrorKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union PsbtErrorKind { + InvalidKey: wire_cst_PsbtError_InvalidKey, + DuplicateKey: wire_cst_PsbtError_DuplicateKey, + NonStandardSighashType: wire_cst_PsbtError_NonStandardSighashType, + InvalidHash: wire_cst_PsbtError_InvalidHash, + CombineInconsistentKeySources: wire_cst_PsbtError_CombineInconsistentKeySources, + ConsensusEncoding: wire_cst_PsbtError_ConsensusEncoding, + InvalidPublicKey: wire_cst_PsbtError_InvalidPublicKey, + InvalidSecp256k1PublicKey: wire_cst_PsbtError_InvalidSecp256k1PublicKey, + InvalidEcdsaSignature: wire_cst_PsbtError_InvalidEcdsaSignature, + InvalidTaprootSignature: wire_cst_PsbtError_InvalidTaprootSignature, + TapTree: wire_cst_PsbtError_TapTree, + Version: wire_cst_PsbtError_Version, + Io: wire_cst_PsbtError_Io, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_PsbtError_InvalidKey { + key: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_PsbtError_DuplicateKey { + key: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_PsbtError_NonStandardSighashType { + sighash: u32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_PsbtError_InvalidHash { + hash: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_PsbtError_CombineInconsistentKeySources { + xpub: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_PsbtError_ConsensusEncoding { + encoding_error: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_PsbtError_InvalidPublicKey { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_PsbtError_InvalidSecp256k1PublicKey { + secp256k1_error: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_PsbtError_InvalidEcdsaSignature { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_PsbtError_InvalidTaprootSignature { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_PsbtError_TapTree { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_PsbtError_Version { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_PsbtError_Io { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_psbt_parse_error { + tag: i32, + kind: PsbtParseErrorKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union PsbtParseErrorKind { + PsbtEncoding: wire_cst_PsbtParseError_PsbtEncoding, + Base64Encoding: wire_cst_PsbtParseError_Base64Encoding, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_PsbtParseError_PsbtEncoding { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_PsbtParseError_Base64Encoding { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[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_ffi_script_buf_u_64 { + field0: wire_cst_ffi_script_buf, + field1: u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_record_map_string_list_prim_usize_strict_keychain_kind { + field0: *mut wire_cst_list_record_string_list_prim_usize_strict, + field1: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_record_string_list_prim_usize_strict { + field0: *mut wire_cst_list_prim_u_8_strict, + field1: *mut wire_cst_list_prim_usize_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_sign_options { + trust_witness_utxo: bool, + assume_height: *mut u32, + allow_all_sighashes: bool, + try_finalize: bool, + sign_with_tap_internal_key: bool, + allow_grinding: bool, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_signer_error { + tag: i32, + kind: SignerErrorKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union SignerErrorKind { + SighashP2wpkh: wire_cst_SignerError_SighashP2wpkh, + SighashTaproot: wire_cst_SignerError_SighashTaproot, + TxInputsIndexError: wire_cst_SignerError_TxInputsIndexError, + MiniscriptPsbt: wire_cst_SignerError_MiniscriptPsbt, + External: wire_cst_SignerError_External, + Psbt: wire_cst_SignerError_Psbt, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_SignerError_SighashP2wpkh { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_SignerError_SighashTaproot { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_SignerError_TxInputsIndexError { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_SignerError_MiniscriptPsbt { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_SignerError_External { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_SignerError_Psbt { + error_message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_sqlite_error { + tag: i32, + kind: SqliteErrorKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union SqliteErrorKind { + Sqlite: wire_cst_SqliteError_Sqlite, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_SqliteError_Sqlite { + rusqlite_error: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_sync_progress { + spks_consumed: u64, + spks_remaining: u64, + txids_consumed: u64, + txids_remaining: u64, + outpoints_consumed: u64, + outpoints_remaining: u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_transaction_error { + tag: i32, + kind: TransactionErrorKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union TransactionErrorKind { + InvalidChecksum: wire_cst_TransactionError_InvalidChecksum, + UnsupportedSegwitFlag: wire_cst_TransactionError_UnsupportedSegwitFlag, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_TransactionError_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_TransactionError_UnsupportedSegwitFlag { + flag: u8, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_tx_in { + previous_output: wire_cst_out_point, + script_sig: wire_cst_ffi_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_ffi_script_buf, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_txid_parse_error { + tag: i32, + kind: TxidParseErrorKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union TxidParseErrorKind { + InvalidTxid: wire_cst_TxidParseError_InvalidTxid, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_TxidParseError_InvalidTxid { + txid: *mut wire_cst_list_prim_u_8_strict, + } +} #[cfg(not(target_family = "wasm"))] pub use io::*; diff --git a/test/bdk_flutter_test.dart b/test/bdk_flutter_test.dart index 029bc3be..a80df534 100644 --- a/test/bdk_flutter_test.dart +++ b/test/bdk_flutter_test.dart @@ -1,104 +1,109 @@ -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 'package:bdk_flutter/bdk_flutter.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()]) @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()]) +@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"); + final mockElectrumClient = MockElectrumClient(); + final mockTx = MockTransaction(); + final mockPSBT = MockPSBT(); + group('Address', () { + test('verify scriptPubKey()', () { + final res = mockAddress.script(); + expect(res, isA()); }); }); - 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('Bump Fee Tx Builder', () { + final mockBumpFeeTxBuilder = MockBumpFeeTxBuilder(); + test('Should throw a CreateTxException when txid is invalid', () async { + try { + when(mockBumpFeeTxBuilder.finish(mockWallet)).thenThrow( + CreateTxException(code: "Unknown", errorMessage: "Invalid txid")); + await mockBumpFeeTxBuilder.finish(mockWallet); + } catch (error) { + expect(error, isA()); + expect(error.toString().contains("Unknown"), true); + } }); - }); - group('Wallet', () { - test('Should return valid AddressInfo Object', () async { - final res = mockWallet.getAddress(addressIndex: AddressIndex.increase()); - expect(res, isA()); + test( + 'Should throw a CreateTxException when a tx is not found in the internal database', + () async { + try { + when(mockBumpFeeTxBuilder.finish(mockWallet)) + .thenThrow(CreateTxException(code: "TransactionNotFound")); + await mockBumpFeeTxBuilder.finish(mockWallet); + } catch (error) { + expect(error, isA()); + expect(error.toString().contains("TransactionNotFound"), true); + } }); - test('Should return valid Balance object', () async { - final res = mockWallet.getBalance(); - expect(res, isA()); - }); - test('Should return Network enum', () async { - final res = mockWallet.network(); - expect(res, isA()); - }); - test('Should return list of LocalUtxo object', () async { - final res = mockWallet.listUnspent(); - expect(res, isA>()); - }); - test('Should return a Input object', () async { - final res = await mockWallet.getPsbtInput( - utxo: MockLocalUtxo(), onlyWitnessUtxo: true); - expect(res, isA()); - }); - test('Should return a Descriptor object', () async { - final res = await mockWallet.getDescriptorForKeychain( - keychain: KeychainKind.externalChain); - expect(res, isA()); + test('Should thow a CreateTxException when feeRate is too low', () async { + try { + when(mockBumpFeeTxBuilder.finish(mockWallet)) + .thenThrow(CreateTxException(code: "FeeRateTooLow")); + await mockBumpFeeTxBuilder.finish(mockWallet); + } catch (error) { + expect(error, isA()); + expect(error.toString().contains("FeeRateTooLow"), true); + } }); - test('Should return an empty list of TransactionDetails', () async { - when(mockWallet.listTransactions(includeRaw: any)) - .thenAnswer((e) => List.empty()); - final res = mockWallet.listTransactions(includeRaw: true); - expect(res, isA>()); - expect(res, List.empty()); + test( + 'Should return a CreateTxException when trying to spend an UTXO that is not in the internal database', + () async { + try { + when(mockBumpFeeTxBuilder.finish(mockWallet)).thenThrow( + CreateTxException( + code: "UnknownUtxo", + errorMessage: "reference to an unknown utxo}"), + ); + await mockBumpFeeTxBuilder.finish(mockWallet); + } catch (error) { + expect(error, isA()); + expect(error.toString().contains("UnknownUtxo"), true); + } }); - test('verify function call order', () async { - await mockWallet.sync(blockchain: mockBlockchain); - mockWallet.listTransactions(includeRaw: true); - verifyInOrder([ - await mockWallet.sync(blockchain: mockBlockchain), - mockWallet.listTransactions(includeRaw: true) - ]); + }); + + group('Electrum Client', () { + test('verify brodcast', () async { + when(mockElectrumClient.broadcast(transaction: mockTx)).thenAnswer( + (_) async => + "af7e34474bc17dbe93d47ab465a1122fb31f52cd2400fb4a4c5f3870db597f11"); + + final res = await mockElectrumClient.broadcast(transaction: mockTx); + expect(res, + "af7e34474bc17dbe93d47ab465a1122fb31f52cd2400fb4a4c5f3870db597f11"); }); }); + group('DescriptorSecret', () { final mockSDescriptorSecret = MockDescriptorSecretKey(); @@ -106,8 +111,8 @@ void main() { final res = mockSDescriptorSecret.toPublic(); expect(res, isA()); }); - test('verify asString', () async { - final res = mockSDescriptorSecret.asString(); + test('verify toString', () async { + final res = mockSDescriptorSecret.toString(); expect(res, isA()); }); }); @@ -126,35 +131,56 @@ void main() { expect(res, isA()); }); }); + + group('Wallet', () { + test('Should return valid AddressInfo Object', () async { + final res = mockWallet.revealNextAddress( + keychainKind: KeychainKind.externalChain); + expect(res, isA()); + }); + + test('Should return valid Balance object', () async { + final res = mockWallet.getBalance(); + expect(res, isA()); + }); + test('Should return Network enum', () async { + final res = mockWallet.network(); + expect(res, isA()); + }); + test('Should return list of LocalUtxo object', () async { + final res = mockWallet.listUnspent(); + expect(res, isA>()); + }); + + test('Should return an empty list of TransactionDetails', () async { + when(mockWallet.transactions()).thenAnswer((e) => [MockCanonicalTx()]); + final res = mockWallet.transactions(); + 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()); + .thenThrow(CreateTxException(code: 'InsufficientFunds')); await mockTxBuilder.finish(mockWallet); } catch (error) { - expect(error, isA()); + expect(error, isA()); + expect(error.toString().contains("InsufficientFunds"), true); } }); test('Should return a TxBuilderException when no recipients are added', () async { try { - when(mockTxBuilder.finish(mockWallet)) - .thenThrow(NoRecipientsException()); + when(mockTxBuilder.finish(mockWallet)).thenThrow( + CreateTxException(code: "NoRecipients"), + ); 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()); + expect(error, isA()); + expect(error.toString().contains("NoRecipients"), true); } }); test('Verify unSpendable()', () async { @@ -164,80 +190,6 @@ void main() { vout: 1)); expect(res, isNot(mockTxBuilder)); }); - test('Verify addForeignUtxo()', () async { - const inputInternal = { - "non_witness_utxo": { - "version": 1, - "lock_time": 2433744, - "input": [ - { - "previous_output": - "8eca3ac01866105f79a1a6b87ec968565bb5ccc9cb1c5cf5b13491bafca24f0d:1", - "script_sig": - "483045022100f1bb7ab927473c78111b11cb3f134bc6d1782b4d9b9b664924682b83dc67763b02203bcdc8c9291d17098d11af7ed8a9aa54e795423f60c042546da059b9d912f3c001210238149dc7894a6790ba82c2584e09e5ed0e896dea4afb2de089ea02d017ff0682", - "sequence": 4294967294, - "witness": [] - } - ], - "output": [ - { - "value": 3356, - "script_pubkey": - "76a91400df17234b8e0f60afe1c8f9ae2e91c23cd07c3088ac" - }, - { - "value": 1500, - "script_pubkey": - "76a9149f9a7abd600c0caa03983a77c8c3df8e062cb2fa88ac" - } - ] - }, - "witness_utxo": null, - "partial_sigs": {}, - "sighash_type": null, - "redeem_script": null, - "witness_script": null, - "bip32_derivation": [ - [ - "030da577f40a6de2e0a55d3c5c72da44c77e6f820f09e1b7bbcc6a557bf392b5a4", - ["d91e6add", "m/44'/1'/0'/0/146"] - ] - ], - "final_script_sig": null, - "final_script_witness": null, - "ripemd160_preimages": {}, - "sha256_preimages": {}, - "hash160_preimages": {}, - "hash256_preimages": {}, - "tap_key_sig": null, - "tap_script_sigs": [], - "tap_scripts": [], - "tap_key_origins": [], - "tap_internal_key": null, - "tap_merkle_root": null, - "proprietary": [], - "unknown": [] - }; - final input = Input(s: json.encode(inputInternal)); - final outPoint = OutPoint( - txid: - 'b3b72ce9c7aa09b9c868c214e88c002a28aac9a62fd3971eff6de83c418f4db3', - vout: 0); - when(mockAddress.scriptPubkey()).thenAnswer((_) => mockScript); - when(mockTxBuilder.addRecipient(mockScript, any)) - .thenReturn(mockTxBuilder); - when(mockTxBuilder.addForeignUtxo(input, outPoint, BigInt.zero)) - .thenReturn(mockTxBuilder); - when(mockTxBuilder.finish(mockWallet)).thenAnswer((_) async => - Future.value( - (MockPartiallySignedTransaction(), MockTransactionDetails()))); - final script = mockAddress.scriptPubkey(); - final txBuilder = mockTxBuilder - .addRecipient(script, BigInt.from(1200)) - .addForeignUtxo(input, outPoint, BigInt.zero); - final res = await txBuilder.finish(mockWallet); - expect(res, isA<(PartiallySignedTransaction, TransactionDetails)>()); - }); test('Create a proper psbt transaction ', () async { const psbtBase64 = "cHNidP8BAHEBAAAAAfU6uDG8hNUox2Qw1nodiir" "QhnLkDCYpTYfnY4+lUgjFAAAAAAD+////Ag5EAAAAAAAAFgAUxYD3fd+pId3hWxeuvuWmiUlS+1PoAwAAAAAAABYAFP+dpWfmLzDqhlT6HV+9R774474TxqQkAAABAN4" @@ -245,44 +197,16 @@ void main() { "vjjvhMCRzBEAiAa6a72jEfDuiyaNtlBYAxsc2oSruDWF2vuNQ3rJSshggIgLtJ/YuB8FmhjrPvTC9r2w9gpdfUNLuxw/C7oqo95cEIBIQM9XzutA2SgZFHjPDAATuWwHg19TTkb/NKZD/" "hfN7fWP8akJAABAR+USAAAAAAAABYAFPBXTsqsprXNanArNb6973eltDhHIgYCHrxaLpnD4ed01bFHcixnAicv15oKiiVHrcVmxUWBW54Y2R5q3VQAAIABAACAAAAAgAEAAABbAAAAACICAqS" "F0mhBBlgMe9OyICKlkhGHZfPjA0Q03I559ccj9x6oGNkeat1UAACAAQAAgAAAAIABAAAAXAAAAAAA"; - final psbt = await PartiallySignedTransaction.fromString(psbtBase64); - when(mockAddress.scriptPubkey()).thenAnswer((_) => MockScriptBuf()); + when(mockPSBT.asString()).thenAnswer((_) => psbtBase64); when(mockTxBuilder.addRecipient(mockScript, any)) .thenReturn(mockTxBuilder); - - when(mockAddress.scriptPubkey()).thenAnswer((_) => mockScript); - when(mockTxBuilder.finish(mockWallet)).thenAnswer( - (_) async => Future.value((psbt, MockTransactionDetails()))); - final script = mockAddress.scriptPubkey(); + when(mockAddress.script()).thenAnswer((_) => mockScript); + when(mockTxBuilder.finish(mockWallet)).thenAnswer((_) async => mockPSBT); + final script = mockAddress.script(); final txBuilder = mockTxBuilder.addRecipient(script, BigInt.from(1200)); final res = await txBuilder.finish(mockWallet); - expect(res.$1, psbt); - }); - }); - group('Bump Fee Tx Builder', () { - final mockBumpFeeTxBuilder = MockBumpFeeTxBuilder(); - test('Should return a TxBuilderException when txid is invalid', () async { - try { - when(mockBumpFeeTxBuilder.finish(mockWallet)) - .thenThrow(TransactionNotFoundException()); - await mockBumpFeeTxBuilder.finish(mockWallet); - } catch (error) { - expect(error, isA()); - } - }); - }); - group('Address', () { - test('verify network()', () { - final res = mockAddress.network(); - expect(res, isA()); - }); - test('verify payload()', () { - final res = mockAddress.network(); - expect(res, isA()); - }); - test('verify scriptPubKey()', () { - final res = mockAddress.scriptPubkey(); - expect(res, isA()); + expect(res, isA()); + expect(res.asString(), psbtBase64); }); }); group('Script', () { @@ -294,52 +218,48 @@ void main() { group('Transaction', () { final mockTx = MockTransaction(); test('verify serialize', () async { - final res = await mockTx.serialize(); + final res = mockTx.serialize(); expect(res, isA>()); }); test('verify txid', () async { - final res = await mockTx.txid(); + final res = mockTx.computeTxid(); 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>()); - }); + // test('verify weight', () async { + // final res = await mockTx.weight(); + // expect(res, isA()); + // }); + // test('verify vsize', () async { + // final res = mockTx.vsize(); + // expect(res, isA()); + // }); + // test('verify isCoinbase', () async { + // final res = mockTx.isCoinbase(); + // expect(res, isA()); + // }); + // test('verify isExplicitlyRbf', () async { + // final res = mockTx.isExplicitlyRbf(); + // expect(res, isA()); + // }); + // test('verify isLockTimeEnabled', () async { + // final res = mockTx.isLockTimeEnabled(); + // expect(res, isA()); + // }); + // test('verify version', () async { + // final res = mockTx.version(); + // expect(res, isA()); + // }); + // test('verify lockTime', () async { + // final res = mockTx.lockTime(); + // expect(res, isA()); + // }); + // test('verify input', () async { + // final res = mockTx.input(); + // expect(res, isA>()); + // }); + // test('verify output', () async { + // final res = mockTx.output(); + // expect(res, isA>()); + // }); }); } diff --git a/test/bdk_flutter_test.mocks.dart b/test/bdk_flutter_test.mocks.dart index 191bee69..0b31c4f6 100644 --- a/test/bdk_flutter_test.mocks.dart +++ b/test/bdk_flutter_test.mocks.dart @@ -3,14 +3,18 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i4; -import 'dart:typed_data' as _i7; - -import 'package:bdk_flutter/bdk_flutter.dart' as _i3; -import 'package:bdk_flutter/src/generated/api/types.dart' as _i5; -import 'package:bdk_flutter/src/generated/lib.dart' as _i2; +import 'dart:async' as _i10; +import 'dart:typed_data' as _i11; + +import 'package:bdk_flutter/bdk_flutter.dart' as _i2; +import 'package:bdk_flutter/src/generated/api/bitcoin.dart' as _i8; +import 'package:bdk_flutter/src/generated/api/electrum.dart' as _i6; +import 'package:bdk_flutter/src/generated/api/esplora.dart' as _i5; +import 'package:bdk_flutter/src/generated/api/store.dart' as _i4; +import 'package:bdk_flutter/src/generated/api/types.dart' as _i7; +import 'package:bdk_flutter/src/generated/lib.dart' as _i3; import 'package:mockito/mockito.dart' as _i1; -import 'package:mockito/src/dummies.dart' as _i6; +import 'package:mockito/src/dummies.dart' as _i9; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -25,9 +29,8 @@ import 'package:mockito/src/dummies.dart' as _i6; // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class -class _FakeMutexWalletAnyDatabase_0 extends _i1.SmartFake - implements _i2.MutexWalletAnyDatabase { - _FakeMutexWalletAnyDatabase_0( +class _FakeAddress_0 extends _i1.SmartFake implements _i2.Address { + _FakeAddress_0( Object parent, Invocation parentInvocation, ) : super( @@ -36,8 +39,8 @@ class _FakeMutexWalletAnyDatabase_0 extends _i1.SmartFake ); } -class _FakeAddressInfo_1 extends _i1.SmartFake implements _i3.AddressInfo { - _FakeAddressInfo_1( +class _FakeAddress_1 extends _i1.SmartFake implements _i3.Address { + _FakeAddress_1( Object parent, Invocation parentInvocation, ) : super( @@ -46,8 +49,8 @@ class _FakeAddressInfo_1 extends _i1.SmartFake implements _i3.AddressInfo { ); } -class _FakeBalance_2 extends _i1.SmartFake implements _i3.Balance { - _FakeBalance_2( +class _FakeScriptBuf_2 extends _i1.SmartFake implements _i2.ScriptBuf { + _FakeScriptBuf_2( Object parent, Invocation parentInvocation, ) : super( @@ -56,8 +59,8 @@ class _FakeBalance_2 extends _i1.SmartFake implements _i3.Balance { ); } -class _FakeDescriptor_3 extends _i1.SmartFake implements _i3.Descriptor { - _FakeDescriptor_3( +class _FakeFeeRate_3 extends _i1.SmartFake implements _i2.FeeRate { + _FakeFeeRate_3( Object parent, Invocation parentInvocation, ) : super( @@ -66,8 +69,9 @@ class _FakeDescriptor_3 extends _i1.SmartFake implements _i3.Descriptor { ); } -class _FakeInput_4 extends _i1.SmartFake implements _i3.Input { - _FakeInput_4( +class _FakeBumpFeeTxBuilder_4 extends _i1.SmartFake + implements _i2.BumpFeeTxBuilder { + _FakeBumpFeeTxBuilder_4( Object parent, Invocation parentInvocation, ) : super( @@ -76,8 +80,8 @@ class _FakeInput_4 extends _i1.SmartFake implements _i3.Input { ); } -class _FakeAnyBlockchain_5 extends _i1.SmartFake implements _i2.AnyBlockchain { - _FakeAnyBlockchain_5( +class _FakePSBT_5 extends _i1.SmartFake implements _i2.PSBT { + _FakePSBT_5( Object parent, Invocation parentInvocation, ) : super( @@ -86,8 +90,9 @@ class _FakeAnyBlockchain_5 extends _i1.SmartFake implements _i2.AnyBlockchain { ); } -class _FakeFeeRate_6 extends _i1.SmartFake implements _i3.FeeRate { - _FakeFeeRate_6( +class _FakeMutexConnection_6 extends _i1.SmartFake + implements _i4.MutexConnection { + _FakeMutexConnection_6( Object parent, Invocation parentInvocation, ) : super( @@ -96,9 +101,19 @@ class _FakeFeeRate_6 extends _i1.SmartFake implements _i3.FeeRate { ); } -class _FakeDescriptorSecretKey_7 extends _i1.SmartFake - implements _i2.DescriptorSecretKey { - _FakeDescriptorSecretKey_7( +class _FakeTransaction_7 extends _i1.SmartFake implements _i2.Transaction { + _FakeTransaction_7( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeDerivationPath_8 extends _i1.SmartFake + implements _i3.DerivationPath { + _FakeDerivationPath_8( Object parent, Invocation parentInvocation, ) : super( @@ -107,9 +122,9 @@ class _FakeDescriptorSecretKey_7 extends _i1.SmartFake ); } -class _FakeDescriptorSecretKey_8 extends _i1.SmartFake +class _FakeDescriptorSecretKey_9 extends _i1.SmartFake implements _i3.DescriptorSecretKey { - _FakeDescriptorSecretKey_8( + _FakeDescriptorSecretKey_9( Object parent, Invocation parentInvocation, ) : super( @@ -118,9 +133,9 @@ class _FakeDescriptorSecretKey_8 extends _i1.SmartFake ); } -class _FakeDescriptorPublicKey_9 extends _i1.SmartFake - implements _i3.DescriptorPublicKey { - _FakeDescriptorPublicKey_9( +class _FakeDescriptorSecretKey_10 extends _i1.SmartFake + implements _i2.DescriptorSecretKey { + _FakeDescriptorSecretKey_10( Object parent, Invocation parentInvocation, ) : super( @@ -129,9 +144,9 @@ class _FakeDescriptorPublicKey_9 extends _i1.SmartFake ); } -class _FakeDescriptorPublicKey_10 extends _i1.SmartFake +class _FakeDescriptorPublicKey_11 extends _i1.SmartFake implements _i2.DescriptorPublicKey { - _FakeDescriptorPublicKey_10( + _FakeDescriptorPublicKey_11( Object parent, Invocation parentInvocation, ) : super( @@ -140,9 +155,9 @@ class _FakeDescriptorPublicKey_10 extends _i1.SmartFake ); } -class _FakeMutexPartiallySignedTransaction_11 extends _i1.SmartFake - implements _i2.MutexPartiallySignedTransaction { - _FakeMutexPartiallySignedTransaction_11( +class _FakeDescriptorPublicKey_12 extends _i1.SmartFake + implements _i3.DescriptorPublicKey { + _FakeDescriptorPublicKey_12( Object parent, Invocation parentInvocation, ) : super( @@ -151,8 +166,9 @@ class _FakeMutexPartiallySignedTransaction_11 extends _i1.SmartFake ); } -class _FakeTransaction_12 extends _i1.SmartFake implements _i3.Transaction { - _FakeTransaction_12( +class _FakeExtendedDescriptor_13 extends _i1.SmartFake + implements _i3.ExtendedDescriptor { + _FakeExtendedDescriptor_13( Object parent, Invocation parentInvocation, ) : super( @@ -161,9 +177,8 @@ class _FakeTransaction_12 extends _i1.SmartFake implements _i3.Transaction { ); } -class _FakePartiallySignedTransaction_13 extends _i1.SmartFake - implements _i3.PartiallySignedTransaction { - _FakePartiallySignedTransaction_13( +class _FakeKeyMap_14 extends _i1.SmartFake implements _i3.KeyMap { + _FakeKeyMap_14( Object parent, Invocation parentInvocation, ) : super( @@ -172,8 +187,9 @@ class _FakePartiallySignedTransaction_13 extends _i1.SmartFake ); } -class _FakeTxBuilder_14 extends _i1.SmartFake implements _i3.TxBuilder { - _FakeTxBuilder_14( +class _FakeBlockingClient_15 extends _i1.SmartFake + implements _i5.BlockingClient { + _FakeBlockingClient_15( Object parent, Invocation parentInvocation, ) : super( @@ -182,9 +198,8 @@ class _FakeTxBuilder_14 extends _i1.SmartFake implements _i3.TxBuilder { ); } -class _FakeTransactionDetails_15 extends _i1.SmartFake - implements _i3.TransactionDetails { - _FakeTransactionDetails_15( +class _FakeUpdate_16 extends _i1.SmartFake implements _i2.Update { + _FakeUpdate_16( Object parent, Invocation parentInvocation, ) : super( @@ -193,9 +208,9 @@ class _FakeTransactionDetails_15 extends _i1.SmartFake ); } -class _FakeBumpFeeTxBuilder_16 extends _i1.SmartFake - implements _i3.BumpFeeTxBuilder { - _FakeBumpFeeTxBuilder_16( +class _FakeBdkElectrumClientClient_17 extends _i1.SmartFake + implements _i6.BdkElectrumClientClient { + _FakeBdkElectrumClientClient_17( Object parent, Invocation parentInvocation, ) : super( @@ -204,8 +219,9 @@ class _FakeBumpFeeTxBuilder_16 extends _i1.SmartFake ); } -class _FakeAddress_17 extends _i1.SmartFake implements _i2.Address { - _FakeAddress_17( +class _FakeMutexOptionFullScanRequestBuilderKeychainKind_18 extends _i1 + .SmartFake implements _i7.MutexOptionFullScanRequestBuilderKeychainKind { + _FakeMutexOptionFullScanRequestBuilderKeychainKind_18( Object parent, Invocation parentInvocation, ) : super( @@ -214,8 +230,9 @@ class _FakeAddress_17 extends _i1.SmartFake implements _i2.Address { ); } -class _FakeScriptBuf_18 extends _i1.SmartFake implements _i3.ScriptBuf { - _FakeScriptBuf_18( +class _FakeFullScanRequestBuilder_19 extends _i1.SmartFake + implements _i2.FullScanRequestBuilder { + _FakeFullScanRequestBuilder_19( Object parent, Invocation parentInvocation, ) : super( @@ -224,9 +241,9 @@ class _FakeScriptBuf_18 extends _i1.SmartFake implements _i3.ScriptBuf { ); } -class _FakeDerivationPath_19 extends _i1.SmartFake - implements _i2.DerivationPath { - _FakeDerivationPath_19( +class _FakeFullScanRequest_20 extends _i1.SmartFake + implements _i2.FullScanRequest { + _FakeFullScanRequest_20( Object parent, Invocation parentInvocation, ) : super( @@ -235,8 +252,9 @@ class _FakeDerivationPath_19 extends _i1.SmartFake ); } -class _FakeOutPoint_20 extends _i1.SmartFake implements _i3.OutPoint { - _FakeOutPoint_20( +class _FakeMutexOptionFullScanRequestKeychainKind_21 extends _i1.SmartFake + implements _i6.MutexOptionFullScanRequestKeychainKind { + _FakeMutexOptionFullScanRequestKeychainKind_21( Object parent, Invocation parentInvocation, ) : super( @@ -245,8 +263,8 @@ class _FakeOutPoint_20 extends _i1.SmartFake implements _i3.OutPoint { ); } -class _FakeTxOut_21 extends _i1.SmartFake implements _i3.TxOut { - _FakeTxOut_21( +class _FakeOutPoint_22 extends _i1.SmartFake implements _i2.OutPoint { + _FakeOutPoint_22( Object parent, Invocation parentInvocation, ) : super( @@ -255,879 +273,1338 @@ class _FakeTxOut_21 extends _i1.SmartFake implements _i3.TxOut { ); } -/// A class which mocks [Wallet]. +class _FakeTxOut_23 extends _i1.SmartFake implements _i8.TxOut { + _FakeTxOut_23( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeMnemonic_24 extends _i1.SmartFake implements _i3.Mnemonic { + _FakeMnemonic_24( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeMutexPsbt_25 extends _i1.SmartFake implements _i3.MutexPsbt { + _FakeMutexPsbt_25( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeTransaction_26 extends _i1.SmartFake implements _i3.Transaction { + _FakeTransaction_26( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeTxBuilder_27 extends _i1.SmartFake implements _i2.TxBuilder { + _FakeTxBuilder_27( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeMutexPersistedWalletConnection_28 extends _i1.SmartFake + implements _i3.MutexPersistedWalletConnection { + _FakeMutexPersistedWalletConnection_28( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeAddressInfo_29 extends _i1.SmartFake implements _i2.AddressInfo { + _FakeAddressInfo_29( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeBalance_30 extends _i1.SmartFake implements _i2.Balance { + _FakeBalance_30( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeSyncRequestBuilder_31 extends _i1.SmartFake + implements _i2.SyncRequestBuilder { + _FakeSyncRequestBuilder_31( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeUpdate_32 extends _i1.SmartFake implements _i6.Update { + _FakeUpdate_32( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +/// A class which mocks [AddressInfo]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockAddressInfo extends _i1.Mock implements _i2.AddressInfo { + @override + int get index => (super.noSuchMethod( + Invocation.getter(#index), + returnValue: 0, + returnValueForMissingStub: 0, + ) as int); + + @override + _i2.Address get address => (super.noSuchMethod( + Invocation.getter(#address), + returnValue: _FakeAddress_0( + this, + Invocation.getter(#address), + ), + returnValueForMissingStub: _FakeAddress_0( + this, + Invocation.getter(#address), + ), + ) as _i2.Address); +} + +/// A class which mocks [Address]. /// /// See the documentation for Mockito's code generation for more information. -class MockWallet extends _i1.Mock implements _i3.Wallet { +class MockAddress extends _i1.Mock implements _i2.Address { @override - _i2.MutexWalletAnyDatabase get ptr => (super.noSuchMethod( - Invocation.getter(#ptr), - returnValue: _FakeMutexWalletAnyDatabase_0( + _i3.Address get field0 => (super.noSuchMethod( + Invocation.getter(#field0), + returnValue: _FakeAddress_1( this, - Invocation.getter(#ptr), + Invocation.getter(#field0), ), - returnValueForMissingStub: _FakeMutexWalletAnyDatabase_0( + returnValueForMissingStub: _FakeAddress_1( this, - Invocation.getter(#ptr), + Invocation.getter(#field0), ), - ) as _i2.MutexWalletAnyDatabase); + ) as _i3.Address); @override - _i3.AddressInfo getAddress({ - required _i3.AddressIndex? addressIndex, - dynamic hint, - }) => - (super.noSuchMethod( + _i2.ScriptBuf script() => (super.noSuchMethod( Invocation.method( - #getAddress, + #script, [], - { - #addressIndex: addressIndex, - #hint: hint, - }, ), - returnValue: _FakeAddressInfo_1( + returnValue: _FakeScriptBuf_2( this, Invocation.method( - #getAddress, + #script, [], - { - #addressIndex: addressIndex, - #hint: hint, - }, ), ), - returnValueForMissingStub: _FakeAddressInfo_1( + returnValueForMissingStub: _FakeScriptBuf_2( this, Invocation.method( - #getAddress, + #script, [], - { - #addressIndex: addressIndex, - #hint: hint, - }, ), ), - ) as _i3.AddressInfo); + ) as _i2.ScriptBuf); @override - _i3.Balance getBalance({dynamic hint}) => (super.noSuchMethod( + String toQrUri() => (super.noSuchMethod( Invocation.method( - #getBalance, + #toQrUri, [], - {#hint: hint}, ), - returnValue: _FakeBalance_2( + returnValue: _i9.dummyValue( this, Invocation.method( - #getBalance, + #toQrUri, [], - {#hint: hint}, ), ), - returnValueForMissingStub: _FakeBalance_2( + returnValueForMissingStub: _i9.dummyValue( this, Invocation.method( - #getBalance, + #toQrUri, [], - {#hint: hint}, ), ), - ) as _i3.Balance); + ) as String); @override - _i4.Future<_i3.Descriptor> getDescriptorForKeychain({ - required _i3.KeychainKind? keychain, - dynamic hint, - }) => + bool isValidForNetwork({required _i2.Network? network}) => (super.noSuchMethod( Invocation.method( - #getDescriptorForKeychain, + #isValidForNetwork, + [], + {#network: network}, + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + + @override + String asString() => (super.noSuchMethod( + Invocation.method( + #asString, [], - { - #keychain: keychain, - #hint: hint, - }, ), - returnValue: _i4.Future<_i3.Descriptor>.value(_FakeDescriptor_3( + returnValue: _i9.dummyValue( this, Invocation.method( - #getDescriptorForKeychain, + #asString, [], - { - #keychain: keychain, - #hint: hint, - }, ), - )), - returnValueForMissingStub: - _i4.Future<_i3.Descriptor>.value(_FakeDescriptor_3( + ), + returnValueForMissingStub: _i9.dummyValue( this, Invocation.method( - #getDescriptorForKeychain, + #asString, [], - { - #keychain: keychain, - #hint: hint, - }, ), - )), - ) as _i4.Future<_i3.Descriptor>); + ), + ) as String); +} +/// A class which mocks [BumpFeeTxBuilder]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockBumpFeeTxBuilder extends _i1.Mock implements _i2.BumpFeeTxBuilder { @override - _i3.AddressInfo getInternalAddress({ - required _i3.AddressIndex? addressIndex, - dynamic hint, - }) => - (super.noSuchMethod( + String get txid => (super.noSuchMethod( + Invocation.getter(#txid), + returnValue: _i9.dummyValue( + this, + Invocation.getter(#txid), + ), + returnValueForMissingStub: _i9.dummyValue( + this, + Invocation.getter(#txid), + ), + ) as String); + + @override + _i2.FeeRate get feeRate => (super.noSuchMethod( + Invocation.getter(#feeRate), + returnValue: _FakeFeeRate_3( + this, + Invocation.getter(#feeRate), + ), + returnValueForMissingStub: _FakeFeeRate_3( + this, + Invocation.getter(#feeRate), + ), + ) as _i2.FeeRate); + + @override + _i2.BumpFeeTxBuilder enableRbf() => (super.noSuchMethod( Invocation.method( - #getInternalAddress, + #enableRbf, [], - { - #addressIndex: addressIndex, - #hint: hint, - }, ), - returnValue: _FakeAddressInfo_1( + returnValue: _FakeBumpFeeTxBuilder_4( this, Invocation.method( - #getInternalAddress, + #enableRbf, [], - { - #addressIndex: addressIndex, - #hint: hint, - }, ), ), - returnValueForMissingStub: _FakeAddressInfo_1( + returnValueForMissingStub: _FakeBumpFeeTxBuilder_4( this, Invocation.method( - #getInternalAddress, + #enableRbf, [], - { - #addressIndex: addressIndex, - #hint: hint, - }, ), ), - ) as _i3.AddressInfo); + ) as _i2.BumpFeeTxBuilder); @override - _i4.Future<_i3.Input> getPsbtInput({ - required _i3.LocalUtxo? utxo, - required bool? onlyWitnessUtxo, - _i3.PsbtSigHashType? sighashType, - dynamic hint, - }) => + _i2.BumpFeeTxBuilder enableRbfWithSequence(int? nSequence) => (super.noSuchMethod( Invocation.method( - #getPsbtInput, - [], - { - #utxo: utxo, - #onlyWitnessUtxo: onlyWitnessUtxo, - #sighashType: sighashType, - #hint: hint, - }, + #enableRbfWithSequence, + [nSequence], ), - returnValue: _i4.Future<_i3.Input>.value(_FakeInput_4( + returnValue: _FakeBumpFeeTxBuilder_4( this, Invocation.method( - #getPsbtInput, - [], - { - #utxo: utxo, - #onlyWitnessUtxo: onlyWitnessUtxo, - #sighashType: sighashType, - #hint: hint, - }, + #enableRbfWithSequence, + [nSequence], ), - )), - returnValueForMissingStub: _i4.Future<_i3.Input>.value(_FakeInput_4( + ), + returnValueForMissingStub: _FakeBumpFeeTxBuilder_4( this, Invocation.method( - #getPsbtInput, - [], - { - #utxo: utxo, - #onlyWitnessUtxo: onlyWitnessUtxo, - #sighashType: sighashType, - #hint: hint, - }, + #enableRbfWithSequence, + [nSequence], ), - )), - ) as _i4.Future<_i3.Input>); - - @override - bool isMine({ - required _i5.BdkScriptBuf? script, - dynamic hint, - }) => - (super.noSuchMethod( - Invocation.method( - #isMine, - [], - { - #script: script, - #hint: hint, - }, ), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); + ) as _i2.BumpFeeTxBuilder); @override - List<_i3.TransactionDetails> listTransactions({ - required bool? includeRaw, - dynamic hint, - }) => - (super.noSuchMethod( + _i10.Future<_i2.PSBT> finish(_i2.Wallet? wallet) => (super.noSuchMethod( Invocation.method( - #listTransactions, - [], - { - #includeRaw: includeRaw, - #hint: hint, - }, + #finish, + [wallet], ), - returnValue: <_i3.TransactionDetails>[], - returnValueForMissingStub: <_i3.TransactionDetails>[], - ) as List<_i3.TransactionDetails>); + returnValue: _i10.Future<_i2.PSBT>.value(_FakePSBT_5( + this, + Invocation.method( + #finish, + [wallet], + ), + )), + returnValueForMissingStub: _i10.Future<_i2.PSBT>.value(_FakePSBT_5( + this, + Invocation.method( + #finish, + [wallet], + ), + )), + ) as _i10.Future<_i2.PSBT>); +} +/// A class which mocks [Connection]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockConnection extends _i1.Mock implements _i2.Connection { @override - List<_i3.LocalUtxo> listUnspent({dynamic hint}) => (super.noSuchMethod( - Invocation.method( - #listUnspent, - [], - {#hint: hint}, + _i4.MutexConnection get field0 => (super.noSuchMethod( + Invocation.getter(#field0), + returnValue: _FakeMutexConnection_6( + this, + Invocation.getter(#field0), ), - returnValue: <_i3.LocalUtxo>[], - returnValueForMissingStub: <_i3.LocalUtxo>[], - ) as List<_i3.LocalUtxo>); + returnValueForMissingStub: _FakeMutexConnection_6( + this, + Invocation.getter(#field0), + ), + ) as _i4.MutexConnection); +} +/// A class which mocks [CanonicalTx]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockCanonicalTx extends _i1.Mock implements _i2.CanonicalTx { @override - _i3.Network network({dynamic hint}) => (super.noSuchMethod( - Invocation.method( - #network, - [], - {#hint: hint}, + _i2.Transaction get transaction => (super.noSuchMethod( + Invocation.getter(#transaction), + returnValue: _FakeTransaction_7( + this, + Invocation.getter(#transaction), ), - returnValue: _i3.Network.testnet, - returnValueForMissingStub: _i3.Network.testnet, - ) as _i3.Network); + returnValueForMissingStub: _FakeTransaction_7( + this, + Invocation.getter(#transaction), + ), + ) as _i2.Transaction); @override - _i4.Future sign({ - required _i3.PartiallySignedTransaction? psbt, - _i3.SignOptions? signOptions, - dynamic hint, - }) => - (super.noSuchMethod( - Invocation.method( - #sign, - [], - { - #psbt: psbt, - #signOptions: signOptions, - #hint: hint, - }, + _i2.ChainPosition get chainPosition => (super.noSuchMethod( + Invocation.getter(#chainPosition), + returnValue: _i9.dummyValue<_i2.ChainPosition>( + this, + Invocation.getter(#chainPosition), + ), + returnValueForMissingStub: _i9.dummyValue<_i2.ChainPosition>( + this, + Invocation.getter(#chainPosition), ), - returnValue: _i4.Future.value(false), - returnValueForMissingStub: _i4.Future.value(false), - ) as _i4.Future); + ) as _i2.ChainPosition); +} +/// A class which mocks [DerivationPath]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockDerivationPath extends _i1.Mock implements _i2.DerivationPath { @override - _i4.Future sync({ - required _i3.Blockchain? blockchain, - dynamic hint, - }) => - (super.noSuchMethod( + _i3.DerivationPath get opaque => (super.noSuchMethod( + Invocation.getter(#opaque), + returnValue: _FakeDerivationPath_8( + this, + Invocation.getter(#opaque), + ), + returnValueForMissingStub: _FakeDerivationPath_8( + this, + Invocation.getter(#opaque), + ), + ) as _i3.DerivationPath); + + @override + String asString() => (super.noSuchMethod( Invocation.method( - #sync, + #asString, [], - { - #blockchain: blockchain, - #hint: hint, - }, ), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); + returnValue: _i9.dummyValue( + this, + Invocation.method( + #asString, + [], + ), + ), + returnValueForMissingStub: _i9.dummyValue( + this, + Invocation.method( + #asString, + [], + ), + ), + ) as String); } -/// A class which mocks [Transaction]. +/// A class which mocks [DescriptorSecretKey]. /// /// See the documentation for Mockito's code generation for more information. -class MockTransaction extends _i1.Mock implements _i3.Transaction { +class MockDescriptorSecretKey extends _i1.Mock + implements _i2.DescriptorSecretKey { @override - String get s => (super.noSuchMethod( - Invocation.getter(#s), - returnValue: _i6.dummyValue( + _i3.DescriptorSecretKey get opaque => (super.noSuchMethod( + Invocation.getter(#opaque), + returnValue: _FakeDescriptorSecretKey_9( this, - Invocation.getter(#s), + Invocation.getter(#opaque), ), - returnValueForMissingStub: _i6.dummyValue( + returnValueForMissingStub: _FakeDescriptorSecretKey_9( this, - Invocation.getter(#s), + Invocation.getter(#opaque), ), - ) as String); + ) as _i3.DescriptorSecretKey); @override - _i4.Future> input() => (super.noSuchMethod( + _i10.Future<_i2.DescriptorSecretKey> derive(_i2.DerivationPath? path) => + (super.noSuchMethod( Invocation.method( - #input, - [], + #derive, + [path], ), - returnValue: _i4.Future>.value(<_i3.TxIn>[]), - returnValueForMissingStub: - _i4.Future>.value(<_i3.TxIn>[]), - ) as _i4.Future>); + returnValue: _i10.Future<_i2.DescriptorSecretKey>.value( + _FakeDescriptorSecretKey_10( + this, + Invocation.method( + #derive, + [path], + ), + )), + returnValueForMissingStub: _i10.Future<_i2.DescriptorSecretKey>.value( + _FakeDescriptorSecretKey_10( + this, + Invocation.method( + #derive, + [path], + ), + )), + ) as _i10.Future<_i2.DescriptorSecretKey>); @override - _i4.Future isCoinBase() => (super.noSuchMethod( + _i10.Future<_i2.DescriptorSecretKey> extend(_i2.DerivationPath? path) => + (super.noSuchMethod( Invocation.method( - #isCoinBase, - [], + #extend, + [path], ), - returnValue: _i4.Future.value(false), - returnValueForMissingStub: _i4.Future.value(false), - ) as _i4.Future); + returnValue: _i10.Future<_i2.DescriptorSecretKey>.value( + _FakeDescriptorSecretKey_10( + this, + Invocation.method( + #extend, + [path], + ), + )), + returnValueForMissingStub: _i10.Future<_i2.DescriptorSecretKey>.value( + _FakeDescriptorSecretKey_10( + this, + Invocation.method( + #extend, + [path], + ), + )), + ) as _i10.Future<_i2.DescriptorSecretKey>); @override - _i4.Future isExplicitlyRbf() => (super.noSuchMethod( + _i2.DescriptorPublicKey toPublic() => (super.noSuchMethod( Invocation.method( - #isExplicitlyRbf, + #toPublic, [], ), - returnValue: _i4.Future.value(false), - returnValueForMissingStub: _i4.Future.value(false), - ) as _i4.Future); + returnValue: _FakeDescriptorPublicKey_11( + this, + Invocation.method( + #toPublic, + [], + ), + ), + returnValueForMissingStub: _FakeDescriptorPublicKey_11( + this, + Invocation.method( + #toPublic, + [], + ), + ), + ) as _i2.DescriptorPublicKey); @override - _i4.Future isLockTimeEnabled() => (super.noSuchMethod( + _i11.Uint8List secretBytes({dynamic hint}) => (super.noSuchMethod( Invocation.method( - #isLockTimeEnabled, + #secretBytes, [], + {#hint: hint}, ), - returnValue: _i4.Future.value(false), - returnValueForMissingStub: _i4.Future.value(false), - ) as _i4.Future); + returnValue: _i11.Uint8List(0), + returnValueForMissingStub: _i11.Uint8List(0), + ) as _i11.Uint8List); @override - _i4.Future<_i3.LockTime> lockTime() => (super.noSuchMethod( + String asString() => (super.noSuchMethod( Invocation.method( - #lockTime, + #asString, [], ), - returnValue: - _i4.Future<_i3.LockTime>.value(_i6.dummyValue<_i3.LockTime>( + returnValue: _i9.dummyValue( this, Invocation.method( - #lockTime, + #asString, [], ), - )), - returnValueForMissingStub: - _i4.Future<_i3.LockTime>.value(_i6.dummyValue<_i3.LockTime>( + ), + returnValueForMissingStub: _i9.dummyValue( this, Invocation.method( - #lockTime, + #asString, [], ), - )), - ) as _i4.Future<_i3.LockTime>); + ), + ) as String); +} +/// A class which mocks [DescriptorPublicKey]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockDescriptorPublicKey extends _i1.Mock + implements _i2.DescriptorPublicKey { @override - _i4.Future> output() => (super.noSuchMethod( - Invocation.method( - #output, - [], + _i3.DescriptorPublicKey get opaque => (super.noSuchMethod( + Invocation.getter(#opaque), + returnValue: _FakeDescriptorPublicKey_12( + this, + Invocation.getter(#opaque), ), - returnValue: _i4.Future>.value(<_i3.TxOut>[]), - returnValueForMissingStub: - _i4.Future>.value(<_i3.TxOut>[]), - ) as _i4.Future>); + returnValueForMissingStub: _FakeDescriptorPublicKey_12( + this, + Invocation.getter(#opaque), + ), + ) as _i3.DescriptorPublicKey); @override - _i4.Future<_i7.Uint8List> serialize() => (super.noSuchMethod( + _i10.Future<_i2.DescriptorPublicKey> derive({ + required _i2.DerivationPath? path, + dynamic hint, + }) => + (super.noSuchMethod( Invocation.method( - #serialize, + #derive, [], + { + #path: path, + #hint: hint, + }, ), - returnValue: _i4.Future<_i7.Uint8List>.value(_i7.Uint8List(0)), - returnValueForMissingStub: - _i4.Future<_i7.Uint8List>.value(_i7.Uint8List(0)), - ) as _i4.Future<_i7.Uint8List>); + returnValue: _i10.Future<_i2.DescriptorPublicKey>.value( + _FakeDescriptorPublicKey_11( + this, + Invocation.method( + #derive, + [], + { + #path: path, + #hint: hint, + }, + ), + )), + returnValueForMissingStub: _i10.Future<_i2.DescriptorPublicKey>.value( + _FakeDescriptorPublicKey_11( + this, + Invocation.method( + #derive, + [], + { + #path: path, + #hint: hint, + }, + ), + )), + ) as _i10.Future<_i2.DescriptorPublicKey>); @override - _i4.Future size() => (super.noSuchMethod( + _i10.Future<_i2.DescriptorPublicKey> extend({ + required _i2.DerivationPath? path, + dynamic hint, + }) => + (super.noSuchMethod( Invocation.method( - #size, + #extend, [], + { + #path: path, + #hint: hint, + }, ), - returnValue: _i4.Future.value(_i6.dummyValue( + returnValue: _i10.Future<_i2.DescriptorPublicKey>.value( + _FakeDescriptorPublicKey_11( this, Invocation.method( - #size, + #extend, [], + { + #path: path, + #hint: hint, + }, ), )), - returnValueForMissingStub: - _i4.Future.value(_i6.dummyValue( + returnValueForMissingStub: _i10.Future<_i2.DescriptorPublicKey>.value( + _FakeDescriptorPublicKey_11( this, Invocation.method( - #size, + #extend, [], + { + #path: path, + #hint: hint, + }, ), )), - ) as _i4.Future); + ) as _i10.Future<_i2.DescriptorPublicKey>); @override - _i4.Future txid() => (super.noSuchMethod( + String asString() => (super.noSuchMethod( Invocation.method( - #txid, + #asString, [], ), - returnValue: _i4.Future.value(_i6.dummyValue( + returnValue: _i9.dummyValue( this, Invocation.method( - #txid, + #asString, [], ), - )), - returnValueForMissingStub: - _i4.Future.value(_i6.dummyValue( + ), + returnValueForMissingStub: _i9.dummyValue( this, Invocation.method( - #txid, + #asString, [], ), - )), - ) as _i4.Future); + ), + ) as String); +} +/// A class which mocks [Descriptor]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockDescriptor extends _i1.Mock implements _i2.Descriptor { @override - _i4.Future version() => (super.noSuchMethod( + _i3.ExtendedDescriptor get extendedDescriptor => (super.noSuchMethod( + Invocation.getter(#extendedDescriptor), + returnValue: _FakeExtendedDescriptor_13( + this, + Invocation.getter(#extendedDescriptor), + ), + returnValueForMissingStub: _FakeExtendedDescriptor_13( + this, + Invocation.getter(#extendedDescriptor), + ), + ) as _i3.ExtendedDescriptor); + + @override + _i3.KeyMap get keyMap => (super.noSuchMethod( + Invocation.getter(#keyMap), + returnValue: _FakeKeyMap_14( + this, + Invocation.getter(#keyMap), + ), + returnValueForMissingStub: _FakeKeyMap_14( + this, + Invocation.getter(#keyMap), + ), + ) as _i3.KeyMap); + + @override + String toStringWithSecret({dynamic hint}) => (super.noSuchMethod( Invocation.method( - #version, + #toStringWithSecret, [], + {#hint: hint}, ), - returnValue: _i4.Future.value(0), - returnValueForMissingStub: _i4.Future.value(0), - ) as _i4.Future); + returnValue: _i9.dummyValue( + this, + Invocation.method( + #toStringWithSecret, + [], + {#hint: hint}, + ), + ), + returnValueForMissingStub: _i9.dummyValue( + this, + Invocation.method( + #toStringWithSecret, + [], + {#hint: hint}, + ), + ), + ) as String); @override - _i4.Future vsize() => (super.noSuchMethod( + BigInt maxSatisfactionWeight({dynamic hint}) => (super.noSuchMethod( Invocation.method( - #vsize, + #maxSatisfactionWeight, [], + {#hint: hint}, ), - returnValue: _i4.Future.value(_i6.dummyValue( + returnValue: _i9.dummyValue( this, Invocation.method( - #vsize, + #maxSatisfactionWeight, [], + {#hint: hint}, ), - )), - returnValueForMissingStub: - _i4.Future.value(_i6.dummyValue( + ), + returnValueForMissingStub: _i9.dummyValue( this, Invocation.method( - #vsize, + #maxSatisfactionWeight, [], + {#hint: hint}, ), - )), - ) as _i4.Future); + ), + ) as BigInt); @override - _i4.Future weight() => (super.noSuchMethod( + String asString() => (super.noSuchMethod( Invocation.method( - #weight, + #asString, [], ), - returnValue: _i4.Future.value(_i6.dummyValue( + returnValue: _i9.dummyValue( this, Invocation.method( - #weight, + #asString, [], ), - )), - returnValueForMissingStub: - _i4.Future.value(_i6.dummyValue( + ), + returnValueForMissingStub: _i9.dummyValue( this, Invocation.method( - #weight, + #asString, [], ), - )), - ) as _i4.Future); + ), + ) as String); } -/// A class which mocks [Blockchain]. +/// A class which mocks [EsploraClient]. /// /// See the documentation for Mockito's code generation for more information. -class MockBlockchain extends _i1.Mock implements _i3.Blockchain { +class MockEsploraClient extends _i1.Mock implements _i2.EsploraClient { @override - _i2.AnyBlockchain get ptr => (super.noSuchMethod( - Invocation.getter(#ptr), - returnValue: _FakeAnyBlockchain_5( + _i5.BlockingClient get opaque => (super.noSuchMethod( + Invocation.getter(#opaque), + returnValue: _FakeBlockingClient_15( this, - Invocation.getter(#ptr), + Invocation.getter(#opaque), ), - returnValueForMissingStub: _FakeAnyBlockchain_5( + returnValueForMissingStub: _FakeBlockingClient_15( this, - Invocation.getter(#ptr), + Invocation.getter(#opaque), ), - ) as _i2.AnyBlockchain); + ) as _i5.BlockingClient); @override - _i4.Future<_i3.FeeRate> estimateFee({ - required BigInt? target, - dynamic hint, + _i10.Future broadcast({required _i2.Transaction? transaction}) => + (super.noSuchMethod( + Invocation.method( + #broadcast, + [], + {#transaction: transaction}, + ), + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); + + @override + _i10.Future<_i2.Update> fullScan({ + required _i2.FullScanRequest? request, + required BigInt? stopGap, + required BigInt? parallelRequests, }) => (super.noSuchMethod( Invocation.method( - #estimateFee, + #fullScan, [], { - #target: target, - #hint: hint, + #request: request, + #stopGap: stopGap, + #parallelRequests: parallelRequests, }, ), - returnValue: _i4.Future<_i3.FeeRate>.value(_FakeFeeRate_6( + returnValue: _i10.Future<_i2.Update>.value(_FakeUpdate_16( this, Invocation.method( - #estimateFee, + #fullScan, [], { - #target: target, - #hint: hint, + #request: request, + #stopGap: stopGap, + #parallelRequests: parallelRequests, }, ), )), - returnValueForMissingStub: _i4.Future<_i3.FeeRate>.value(_FakeFeeRate_6( + returnValueForMissingStub: _i10.Future<_i2.Update>.value(_FakeUpdate_16( this, Invocation.method( - #estimateFee, + #fullScan, [], { - #target: target, - #hint: hint, + #request: request, + #stopGap: stopGap, + #parallelRequests: parallelRequests, }, ), )), - ) as _i4.Future<_i3.FeeRate>); + ) as _i10.Future<_i2.Update>); @override - _i4.Future broadcast({ - required _i5.BdkTransaction? transaction, - dynamic hint, + _i10.Future<_i2.Update> sync({ + required _i2.SyncRequest? request, + required BigInt? parallelRequests, }) => (super.noSuchMethod( Invocation.method( - #broadcast, + #sync, [], { - #transaction: transaction, - #hint: hint, + #request: request, + #parallelRequests: parallelRequests, }, ), - returnValue: _i4.Future.value(_i6.dummyValue( + returnValue: _i10.Future<_i2.Update>.value(_FakeUpdate_16( this, Invocation.method( - #broadcast, + #sync, [], { - #transaction: transaction, - #hint: hint, + #request: request, + #parallelRequests: parallelRequests, }, ), )), + returnValueForMissingStub: _i10.Future<_i2.Update>.value(_FakeUpdate_16( + this, + Invocation.method( + #sync, + [], + { + #request: request, + #parallelRequests: parallelRequests, + }, + ), + )), + ) as _i10.Future<_i2.Update>); +} + +/// A class which mocks [ElectrumClient]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockElectrumClient extends _i1.Mock implements _i2.ElectrumClient { + @override + _i6.BdkElectrumClientClient get opaque => (super.noSuchMethod( + Invocation.getter(#opaque), + returnValue: _FakeBdkElectrumClientClient_17( + this, + Invocation.getter(#opaque), + ), + returnValueForMissingStub: _FakeBdkElectrumClientClient_17( + this, + Invocation.getter(#opaque), + ), + ) as _i6.BdkElectrumClientClient); + + @override + _i10.Future broadcast({required _i2.Transaction? transaction}) => + (super.noSuchMethod( + Invocation.method( + #broadcast, + [], + {#transaction: transaction}, + ), + returnValue: _i10.Future.value(_i9.dummyValue( + this, + Invocation.method( + #broadcast, + [], + {#transaction: transaction}, + ), + )), returnValueForMissingStub: - _i4.Future.value(_i6.dummyValue( + _i10.Future.value(_i9.dummyValue( this, Invocation.method( #broadcast, [], + {#transaction: transaction}, + ), + )), + ) as _i10.Future); + + @override + _i10.Future<_i2.Update> fullScan({ + required _i7.FfiFullScanRequest? request, + required BigInt? stopGap, + required BigInt? batchSize, + required bool? fetchPrevTxouts, + }) => + (super.noSuchMethod( + Invocation.method( + #fullScan, + [], + { + #request: request, + #stopGap: stopGap, + #batchSize: batchSize, + #fetchPrevTxouts: fetchPrevTxouts, + }, + ), + returnValue: _i10.Future<_i2.Update>.value(_FakeUpdate_16( + this, + Invocation.method( + #fullScan, + [], { - #transaction: transaction, - #hint: hint, + #request: request, + #stopGap: stopGap, + #batchSize: batchSize, + #fetchPrevTxouts: fetchPrevTxouts, + }, + ), + )), + returnValueForMissingStub: _i10.Future<_i2.Update>.value(_FakeUpdate_16( + this, + Invocation.method( + #fullScan, + [], + { + #request: request, + #stopGap: stopGap, + #batchSize: batchSize, + #fetchPrevTxouts: fetchPrevTxouts, }, ), )), - ) as _i4.Future); + ) as _i10.Future<_i2.Update>); @override - _i4.Future getBlockHash({ - required int? height, - dynamic hint, + _i10.Future<_i2.Update> sync({ + required _i2.SyncRequest? request, + required BigInt? batchSize, + required bool? fetchPrevTxouts, }) => (super.noSuchMethod( Invocation.method( - #getBlockHash, + #sync, [], { - #height: height, - #hint: hint, + #request: request, + #batchSize: batchSize, + #fetchPrevTxouts: fetchPrevTxouts, }, ), - returnValue: _i4.Future.value(_i6.dummyValue( + returnValue: _i10.Future<_i2.Update>.value(_FakeUpdate_16( this, Invocation.method( - #getBlockHash, + #sync, [], { - #height: height, - #hint: hint, + #request: request, + #batchSize: batchSize, + #fetchPrevTxouts: fetchPrevTxouts, }, ), )), - returnValueForMissingStub: - _i4.Future.value(_i6.dummyValue( + returnValueForMissingStub: _i10.Future<_i2.Update>.value(_FakeUpdate_16( this, Invocation.method( - #getBlockHash, + #sync, [], { - #height: height, - #hint: hint, + #request: request, + #batchSize: batchSize, + #fetchPrevTxouts: fetchPrevTxouts, }, ), )), - ) as _i4.Future); + ) as _i10.Future<_i2.Update>); +} +/// A class which mocks [FeeRate]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockFeeRate extends _i1.Mock implements _i2.FeeRate { @override - _i4.Future getHeight({dynamic hint}) => (super.noSuchMethod( + BigInt get satKwu => (super.noSuchMethod( + Invocation.getter(#satKwu), + returnValue: _i9.dummyValue( + this, + Invocation.getter(#satKwu), + ), + returnValueForMissingStub: _i9.dummyValue( + this, + Invocation.getter(#satKwu), + ), + ) as BigInt); +} + +/// A class which mocks [FullScanRequestBuilder]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockFullScanRequestBuilder extends _i1.Mock + implements _i2.FullScanRequestBuilder { + @override + _i7.MutexOptionFullScanRequestBuilderKeychainKind get field0 => + (super.noSuchMethod( + Invocation.getter(#field0), + returnValue: _FakeMutexOptionFullScanRequestBuilderKeychainKind_18( + this, + Invocation.getter(#field0), + ), + returnValueForMissingStub: + _FakeMutexOptionFullScanRequestBuilderKeychainKind_18( + this, + Invocation.getter(#field0), + ), + ) as _i7.MutexOptionFullScanRequestBuilderKeychainKind); + + @override + _i10.Future<_i2.FullScanRequestBuilder> inspectSpksForAllKeychains( + {required _i10.FutureOr Function( + _i2.KeychainKind, + int, + _i2.ScriptBuf, + )? inspector}) => + (super.noSuchMethod( Invocation.method( - #getHeight, + #inspectSpksForAllKeychains, + [], + {#inspector: inspector}, + ), + returnValue: _i10.Future<_i2.FullScanRequestBuilder>.value( + _FakeFullScanRequestBuilder_19( + this, + Invocation.method( + #inspectSpksForAllKeychains, + [], + {#inspector: inspector}, + ), + )), + returnValueForMissingStub: + _i10.Future<_i2.FullScanRequestBuilder>.value( + _FakeFullScanRequestBuilder_19( + this, + Invocation.method( + #inspectSpksForAllKeychains, + [], + {#inspector: inspector}, + ), + )), + ) as _i10.Future<_i2.FullScanRequestBuilder>); + + @override + _i10.Future<_i2.FullScanRequest> build() => (super.noSuchMethod( + Invocation.method( + #build, [], - {#hint: hint}, ), - returnValue: _i4.Future.value(0), - returnValueForMissingStub: _i4.Future.value(0), - ) as _i4.Future); + returnValue: + _i10.Future<_i2.FullScanRequest>.value(_FakeFullScanRequest_20( + this, + Invocation.method( + #build, + [], + ), + )), + returnValueForMissingStub: + _i10.Future<_i2.FullScanRequest>.value(_FakeFullScanRequest_20( + this, + Invocation.method( + #build, + [], + ), + )), + ) as _i10.Future<_i2.FullScanRequest>); +} + +/// A class which mocks [FullScanRequest]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockFullScanRequest extends _i1.Mock implements _i2.FullScanRequest { + @override + _i6.MutexOptionFullScanRequestKeychainKind get field0 => (super.noSuchMethod( + Invocation.getter(#field0), + returnValue: _FakeMutexOptionFullScanRequestKeychainKind_21( + this, + Invocation.getter(#field0), + ), + returnValueForMissingStub: + _FakeMutexOptionFullScanRequestKeychainKind_21( + this, + Invocation.getter(#field0), + ), + ) as _i6.MutexOptionFullScanRequestKeychainKind); +} + +/// A class which mocks [LocalOutput]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockLocalOutput extends _i1.Mock implements _i2.LocalOutput { + @override + _i2.OutPoint get outpoint => (super.noSuchMethod( + Invocation.getter(#outpoint), + returnValue: _FakeOutPoint_22( + this, + Invocation.getter(#outpoint), + ), + returnValueForMissingStub: _FakeOutPoint_22( + this, + Invocation.getter(#outpoint), + ), + ) as _i2.OutPoint); + + @override + _i8.TxOut get txout => (super.noSuchMethod( + Invocation.getter(#txout), + returnValue: _FakeTxOut_23( + this, + Invocation.getter(#txout), + ), + returnValueForMissingStub: _FakeTxOut_23( + this, + Invocation.getter(#txout), + ), + ) as _i8.TxOut); + + @override + _i2.KeychainKind get keychain => (super.noSuchMethod( + Invocation.getter(#keychain), + returnValue: _i2.KeychainKind.externalChain, + returnValueForMissingStub: _i2.KeychainKind.externalChain, + ) as _i2.KeychainKind); + + @override + bool get isSpent => (super.noSuchMethod( + Invocation.getter(#isSpent), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); } -/// A class which mocks [DescriptorSecretKey]. +/// A class which mocks [Mnemonic]. /// /// See the documentation for Mockito's code generation for more information. -class MockDescriptorSecretKey extends _i1.Mock - implements _i3.DescriptorSecretKey { +class MockMnemonic extends _i1.Mock implements _i2.Mnemonic { @override - _i2.DescriptorSecretKey get ptr => (super.noSuchMethod( - Invocation.getter(#ptr), - returnValue: _FakeDescriptorSecretKey_7( + _i3.Mnemonic get opaque => (super.noSuchMethod( + Invocation.getter(#opaque), + returnValue: _FakeMnemonic_24( this, - Invocation.getter(#ptr), + Invocation.getter(#opaque), ), - returnValueForMissingStub: _FakeDescriptorSecretKey_7( + returnValueForMissingStub: _FakeMnemonic_24( this, - Invocation.getter(#ptr), + Invocation.getter(#opaque), ), - ) as _i2.DescriptorSecretKey); + ) as _i3.Mnemonic); @override - _i4.Future<_i3.DescriptorSecretKey> derive(_i3.DerivationPath? path) => - (super.noSuchMethod( + String asString() => (super.noSuchMethod( Invocation.method( - #derive, - [path], + #asString, + [], ), - returnValue: _i4.Future<_i3.DescriptorSecretKey>.value( - _FakeDescriptorSecretKey_8( + returnValue: _i9.dummyValue( this, Invocation.method( - #derive, - [path], + #asString, + [], ), - )), - returnValueForMissingStub: _i4.Future<_i3.DescriptorSecretKey>.value( - _FakeDescriptorSecretKey_8( + ), + returnValueForMissingStub: _i9.dummyValue( this, Invocation.method( - #derive, - [path], + #asString, + [], ), - )), - ) as _i4.Future<_i3.DescriptorSecretKey>); + ), + ) as String); +} +/// A class which mocks [PSBT]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockPSBT extends _i1.Mock implements _i2.PSBT { @override - _i4.Future<_i3.DescriptorSecretKey> extend(_i3.DerivationPath? path) => - (super.noSuchMethod( - Invocation.method( - #extend, - [path], - ), - returnValue: _i4.Future<_i3.DescriptorSecretKey>.value( - _FakeDescriptorSecretKey_8( + _i3.MutexPsbt get opaque => (super.noSuchMethod( + Invocation.getter(#opaque), + returnValue: _FakeMutexPsbt_25( this, - Invocation.method( - #extend, - [path], - ), - )), - returnValueForMissingStub: _i4.Future<_i3.DescriptorSecretKey>.value( - _FakeDescriptorSecretKey_8( + Invocation.getter(#opaque), + ), + returnValueForMissingStub: _FakeMutexPsbt_25( this, - Invocation.method( - #extend, - [path], - ), - )), - ) as _i4.Future<_i3.DescriptorSecretKey>); + Invocation.getter(#opaque), + ), + ) as _i3.MutexPsbt); @override - _i3.DescriptorPublicKey toPublic() => (super.noSuchMethod( + String jsonSerialize({dynamic hint}) => (super.noSuchMethod( Invocation.method( - #toPublic, + #jsonSerialize, [], + {#hint: hint}, ), - returnValue: _FakeDescriptorPublicKey_9( + returnValue: _i9.dummyValue( this, Invocation.method( - #toPublic, + #jsonSerialize, [], + {#hint: hint}, ), ), - returnValueForMissingStub: _FakeDescriptorPublicKey_9( + returnValueForMissingStub: _i9.dummyValue( this, Invocation.method( - #toPublic, + #jsonSerialize, [], + {#hint: hint}, ), ), - ) as _i3.DescriptorPublicKey); + ) as String); @override - _i7.Uint8List secretBytes({dynamic hint}) => (super.noSuchMethod( + _i11.Uint8List serialize({dynamic hint}) => (super.noSuchMethod( Invocation.method( - #secretBytes, + #serialize, [], {#hint: hint}, ), - returnValue: _i7.Uint8List(0), - returnValueForMissingStub: _i7.Uint8List(0), - ) as _i7.Uint8List); + returnValue: _i11.Uint8List(0), + returnValueForMissingStub: _i11.Uint8List(0), + ) as _i11.Uint8List); @override - String asString() => (super.noSuchMethod( + _i2.Transaction extractTx() => (super.noSuchMethod( Invocation.method( - #asString, + #extractTx, [], ), - returnValue: _i6.dummyValue( + returnValue: _FakeTransaction_7( this, Invocation.method( - #asString, + #extractTx, [], ), ), - returnValueForMissingStub: _i6.dummyValue( + returnValueForMissingStub: _FakeTransaction_7( this, Invocation.method( - #asString, + #extractTx, [], ), ), - ) as String); -} - -/// A class which mocks [DescriptorPublicKey]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockDescriptorPublicKey extends _i1.Mock - implements _i3.DescriptorPublicKey { - @override - _i2.DescriptorPublicKey get ptr => (super.noSuchMethod( - Invocation.getter(#ptr), - returnValue: _FakeDescriptorPublicKey_10( - this, - Invocation.getter(#ptr), - ), - returnValueForMissingStub: _FakeDescriptorPublicKey_10( - this, - Invocation.getter(#ptr), - ), - ) as _i2.DescriptorPublicKey); + ) as _i2.Transaction); @override - _i4.Future<_i3.DescriptorPublicKey> derive({ - required _i3.DerivationPath? path, - dynamic hint, - }) => - (super.noSuchMethod( + _i10.Future<_i2.PSBT> combine(_i2.PSBT? other) => (super.noSuchMethod( Invocation.method( - #derive, - [], - { - #path: path, - #hint: hint, - }, + #combine, + [other], ), - returnValue: _i4.Future<_i3.DescriptorPublicKey>.value( - _FakeDescriptorPublicKey_9( + returnValue: _i10.Future<_i2.PSBT>.value(_FakePSBT_5( this, Invocation.method( - #derive, - [], - { - #path: path, - #hint: hint, - }, + #combine, + [other], ), )), - returnValueForMissingStub: _i4.Future<_i3.DescriptorPublicKey>.value( - _FakeDescriptorPublicKey_9( + returnValueForMissingStub: _i10.Future<_i2.PSBT>.value(_FakePSBT_5( this, Invocation.method( - #derive, - [], - { - #path: path, - #hint: hint, - }, + #combine, + [other], ), )), - ) as _i4.Future<_i3.DescriptorPublicKey>); + ) as _i10.Future<_i2.PSBT>); @override - _i4.Future<_i3.DescriptorPublicKey> extend({ - required _i3.DerivationPath? path, - dynamic hint, - }) => - (super.noSuchMethod( + String asString() => (super.noSuchMethod( Invocation.method( - #extend, + #asString, [], - { - #path: path, - #hint: hint, - }, ), - returnValue: _i4.Future<_i3.DescriptorPublicKey>.value( - _FakeDescriptorPublicKey_9( + returnValue: _i9.dummyValue( this, Invocation.method( - #extend, + #asString, [], - { - #path: path, - #hint: hint, - }, ), - )), - returnValueForMissingStub: _i4.Future<_i3.DescriptorPublicKey>.value( - _FakeDescriptorPublicKey_9( + ), + returnValueForMissingStub: _i9.dummyValue( this, Invocation.method( - #extend, + #asString, [], - { - #path: path, - #hint: hint, - }, ), - )), - ) as _i4.Future<_i3.DescriptorPublicKey>); + ), + ) as String); +} + +/// A class which mocks [ScriptBuf]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockScriptBuf extends _i1.Mock implements _i2.ScriptBuf { + @override + _i11.Uint8List get bytes => (super.noSuchMethod( + Invocation.getter(#bytes), + returnValue: _i11.Uint8List(0), + returnValueForMissingStub: _i11.Uint8List(0), + ) as _i11.Uint8List); @override String asString() => (super.noSuchMethod( @@ -1135,14 +1612,14 @@ class MockDescriptorPublicKey extends _i1.Mock #asString, [], ), - returnValue: _i6.dummyValue( + returnValue: _i9.dummyValue( this, Invocation.method( #asString, [], ), ), - returnValueForMissingStub: _i6.dummyValue( + returnValueForMissingStub: _i9.dummyValue( this, Invocation.method( #asString, @@ -1152,169 +1629,195 @@ class MockDescriptorPublicKey extends _i1.Mock ) as String); } -/// A class which mocks [PartiallySignedTransaction]. +/// A class which mocks [Transaction]. /// /// See the documentation for Mockito's code generation for more information. -class MockPartiallySignedTransaction extends _i1.Mock - implements _i3.PartiallySignedTransaction { +class MockTransaction extends _i1.Mock implements _i2.Transaction { @override - _i2.MutexPartiallySignedTransaction get ptr => (super.noSuchMethod( - Invocation.getter(#ptr), - returnValue: _FakeMutexPartiallySignedTransaction_11( + _i3.Transaction get opaque => (super.noSuchMethod( + Invocation.getter(#opaque), + returnValue: _FakeTransaction_26( this, - Invocation.getter(#ptr), + Invocation.getter(#opaque), ), - returnValueForMissingStub: _FakeMutexPartiallySignedTransaction_11( + returnValueForMissingStub: _FakeTransaction_26( this, - Invocation.getter(#ptr), + Invocation.getter(#opaque), ), - ) as _i2.MutexPartiallySignedTransaction); + ) as _i3.Transaction); @override - String jsonSerialize({dynamic hint}) => (super.noSuchMethod( + String computeTxid() => (super.noSuchMethod( Invocation.method( - #jsonSerialize, + #computeTxid, [], - {#hint: hint}, ), - returnValue: _i6.dummyValue( + returnValue: _i9.dummyValue( this, Invocation.method( - #jsonSerialize, + #computeTxid, [], - {#hint: hint}, ), ), - returnValueForMissingStub: _i6.dummyValue( + returnValueForMissingStub: _i9.dummyValue( this, Invocation.method( - #jsonSerialize, + #computeTxid, [], - {#hint: hint}, ), ), ) as String); @override - _i7.Uint8List serialize({dynamic hint}) => (super.noSuchMethod( + List<_i8.TxIn> input() => (super.noSuchMethod( Invocation.method( - #serialize, + #input, [], - {#hint: hint}, ), - returnValue: _i7.Uint8List(0), - returnValueForMissingStub: _i7.Uint8List(0), - ) as _i7.Uint8List); + returnValue: <_i8.TxIn>[], + returnValueForMissingStub: <_i8.TxIn>[], + ) as List<_i8.TxIn>); @override - _i3.Transaction extractTx() => (super.noSuchMethod( + bool isCoinbase() => (super.noSuchMethod( Invocation.method( - #extractTx, + #isCoinbase, + [], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + + @override + bool isExplicitlyRbf() => (super.noSuchMethod( + Invocation.method( + #isExplicitlyRbf, + [], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + + @override + bool isLockTimeEnabled() => (super.noSuchMethod( + Invocation.method( + #isLockTimeEnabled, + [], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + + @override + _i7.LockTime lockTime() => (super.noSuchMethod( + Invocation.method( + #lockTime, [], ), - returnValue: _FakeTransaction_12( + returnValue: _i9.dummyValue<_i7.LockTime>( this, Invocation.method( - #extractTx, + #lockTime, [], ), ), - returnValueForMissingStub: _FakeTransaction_12( + returnValueForMissingStub: _i9.dummyValue<_i7.LockTime>( this, Invocation.method( - #extractTx, + #lockTime, [], ), ), - ) as _i3.Transaction); + ) as _i7.LockTime); @override - _i4.Future<_i3.PartiallySignedTransaction> combine( - _i3.PartiallySignedTransaction? other) => - (super.noSuchMethod( + List<_i8.TxOut> output() => (super.noSuchMethod( Invocation.method( - #combine, - [other], + #output, + [], ), - returnValue: _i4.Future<_i3.PartiallySignedTransaction>.value( - _FakePartiallySignedTransaction_13( - this, - Invocation.method( - #combine, - [other], - ), - )), - returnValueForMissingStub: - _i4.Future<_i3.PartiallySignedTransaction>.value( - _FakePartiallySignedTransaction_13( - this, - Invocation.method( - #combine, - [other], - ), - )), - ) as _i4.Future<_i3.PartiallySignedTransaction>); + returnValue: <_i8.TxOut>[], + returnValueForMissingStub: <_i8.TxOut>[], + ) as List<_i8.TxOut>); @override - String txid({dynamic hint}) => (super.noSuchMethod( + _i11.Uint8List serialize() => (super.noSuchMethod( Invocation.method( - #txid, + #serialize, + [], + ), + returnValue: _i11.Uint8List(0), + returnValueForMissingStub: _i11.Uint8List(0), + ) as _i11.Uint8List); + + @override + int version() => (super.noSuchMethod( + Invocation.method( + #version, + [], + ), + returnValue: 0, + returnValueForMissingStub: 0, + ) as int); + + @override + BigInt vsize() => (super.noSuchMethod( + Invocation.method( + #vsize, [], - {#hint: hint}, ), - returnValue: _i6.dummyValue( + returnValue: _i9.dummyValue( this, Invocation.method( - #txid, + #vsize, [], - {#hint: hint}, ), ), - returnValueForMissingStub: _i6.dummyValue( + returnValueForMissingStub: _i9.dummyValue( this, Invocation.method( - #txid, + #vsize, [], - {#hint: hint}, ), ), - ) as String); + ) as BigInt); @override - String asString() => (super.noSuchMethod( + _i10.Future weight() => (super.noSuchMethod( Invocation.method( - #asString, + #weight, [], ), - returnValue: _i6.dummyValue( + returnValue: _i10.Future.value(_i9.dummyValue( this, Invocation.method( - #asString, + #weight, [], ), - ), - returnValueForMissingStub: _i6.dummyValue( + )), + returnValueForMissingStub: + _i10.Future.value(_i9.dummyValue( this, Invocation.method( - #asString, + #weight, [], ), - ), - ) as String); + )), + ) as _i10.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 { +class MockTxBuilder extends _i1.Mock implements _i2.TxBuilder { @override - _i3.TxBuilder addData({required List? data}) => (super.noSuchMethod( + _i2.TxBuilder addData({required List? data}) => (super.noSuchMethod( Invocation.method( #addData, [], {#data: data}, ), - returnValue: _FakeTxBuilder_14( + returnValue: _FakeTxBuilder_27( this, Invocation.method( #addData, @@ -1322,7 +1825,7 @@ class MockTxBuilder extends _i1.Mock implements _i3.TxBuilder { {#data: data}, ), ), - returnValueForMissingStub: _FakeTxBuilder_14( + returnValueForMissingStub: _FakeTxBuilder_27( this, Invocation.method( #addData, @@ -1330,11 +1833,11 @@ class MockTxBuilder extends _i1.Mock implements _i3.TxBuilder { {#data: data}, ), ), - ) as _i3.TxBuilder); + ) as _i2.TxBuilder); @override - _i3.TxBuilder addRecipient( - _i3.ScriptBuf? script, + _i2.TxBuilder addRecipient( + _i2.ScriptBuf? script, BigInt? amount, ) => (super.noSuchMethod( @@ -1345,7 +1848,7 @@ class MockTxBuilder extends _i1.Mock implements _i3.TxBuilder { amount, ], ), - returnValue: _FakeTxBuilder_14( + returnValue: _FakeTxBuilder_27( this, Invocation.method( #addRecipient, @@ -1355,7 +1858,7 @@ class MockTxBuilder extends _i1.Mock implements _i3.TxBuilder { ], ), ), - returnValueForMissingStub: _FakeTxBuilder_14( + returnValueForMissingStub: _FakeTxBuilder_27( this, Invocation.method( #addRecipient, @@ -1365,842 +1868,621 @@ class MockTxBuilder extends _i1.Mock implements _i3.TxBuilder { ], ), ), - ) as _i3.TxBuilder); + ) as _i2.TxBuilder); @override - _i3.TxBuilder unSpendable(List<_i3.OutPoint>? outpoints) => + _i2.TxBuilder unSpendable(List<_i2.OutPoint>? outpoints) => (super.noSuchMethod( Invocation.method( #unSpendable, [outpoints], ), - returnValue: _FakeTxBuilder_14( + returnValue: _FakeTxBuilder_27( this, Invocation.method( #unSpendable, [outpoints], ), ), - returnValueForMissingStub: _FakeTxBuilder_14( + returnValueForMissingStub: _FakeTxBuilder_27( this, Invocation.method( #unSpendable, [outpoints], ), ), - ) as _i3.TxBuilder); + ) as _i2.TxBuilder); @override - _i3.TxBuilder addUtxo(_i3.OutPoint? outpoint) => (super.noSuchMethod( + _i2.TxBuilder addUtxo(_i2.OutPoint? outpoint) => (super.noSuchMethod( Invocation.method( #addUtxo, [outpoint], ), - returnValue: _FakeTxBuilder_14( - this, - Invocation.method( - #addUtxo, - [outpoint], - ), - ), - returnValueForMissingStub: _FakeTxBuilder_14( + returnValue: _FakeTxBuilder_27( this, Invocation.method( #addUtxo, [outpoint], ), ), - ) as _i3.TxBuilder); - - @override - _i3.TxBuilder addUtxos(List<_i3.OutPoint>? outpoints) => (super.noSuchMethod( - Invocation.method( - #addUtxos, - [outpoints], - ), - returnValue: _FakeTxBuilder_14( - this, - Invocation.method( - #addUtxos, - [outpoints], - ), - ), - returnValueForMissingStub: _FakeTxBuilder_14( + returnValueForMissingStub: _FakeTxBuilder_27( this, - Invocation.method( - #addUtxos, - [outpoints], + Invocation.method( + #addUtxo, + [outpoint], ), ), - ) as _i3.TxBuilder); + ) as _i2.TxBuilder); @override - _i3.TxBuilder addForeignUtxo( - _i3.Input? psbtInput, - _i3.OutPoint? outPoint, - BigInt? satisfactionWeight, - ) => - (super.noSuchMethod( + _i2.TxBuilder addUtxos(List<_i2.OutPoint>? outpoints) => (super.noSuchMethod( Invocation.method( - #addForeignUtxo, - [ - psbtInput, - outPoint, - satisfactionWeight, - ], + #addUtxos, + [outpoints], ), - returnValue: _FakeTxBuilder_14( + returnValue: _FakeTxBuilder_27( this, Invocation.method( - #addForeignUtxo, - [ - psbtInput, - outPoint, - satisfactionWeight, - ], + #addUtxos, + [outpoints], ), ), - returnValueForMissingStub: _FakeTxBuilder_14( + returnValueForMissingStub: _FakeTxBuilder_27( this, Invocation.method( - #addForeignUtxo, - [ - psbtInput, - outPoint, - satisfactionWeight, - ], + #addUtxos, + [outpoints], ), ), - ) as _i3.TxBuilder); + ) as _i2.TxBuilder); @override - _i3.TxBuilder doNotSpendChange() => (super.noSuchMethod( + _i2.TxBuilder doNotSpendChange() => (super.noSuchMethod( Invocation.method( #doNotSpendChange, [], ), - returnValue: _FakeTxBuilder_14( + returnValue: _FakeTxBuilder_27( this, Invocation.method( #doNotSpendChange, [], ), ), - returnValueForMissingStub: _FakeTxBuilder_14( + returnValueForMissingStub: _FakeTxBuilder_27( this, Invocation.method( #doNotSpendChange, [], ), ), - ) as _i3.TxBuilder); + ) as _i2.TxBuilder); @override - _i3.TxBuilder drainWallet() => (super.noSuchMethod( + _i2.TxBuilder drainWallet() => (super.noSuchMethod( Invocation.method( #drainWallet, [], ), - returnValue: _FakeTxBuilder_14( + returnValue: _FakeTxBuilder_27( this, Invocation.method( #drainWallet, [], ), ), - returnValueForMissingStub: _FakeTxBuilder_14( + returnValueForMissingStub: _FakeTxBuilder_27( this, Invocation.method( #drainWallet, [], ), ), - ) as _i3.TxBuilder); + ) as _i2.TxBuilder); @override - _i3.TxBuilder drainTo(_i3.ScriptBuf? script) => (super.noSuchMethod( + _i2.TxBuilder drainTo(_i2.ScriptBuf? script) => (super.noSuchMethod( Invocation.method( #drainTo, [script], ), - returnValue: _FakeTxBuilder_14( + returnValue: _FakeTxBuilder_27( this, Invocation.method( #drainTo, [script], ), ), - returnValueForMissingStub: _FakeTxBuilder_14( + returnValueForMissingStub: _FakeTxBuilder_27( this, Invocation.method( #drainTo, [script], ), ), - ) as _i3.TxBuilder); + ) as _i2.TxBuilder); @override - _i3.TxBuilder enableRbfWithSequence(int? nSequence) => (super.noSuchMethod( + _i2.TxBuilder enableRbfWithSequence(int? nSequence) => (super.noSuchMethod( Invocation.method( #enableRbfWithSequence, [nSequence], ), - returnValue: _FakeTxBuilder_14( + returnValue: _FakeTxBuilder_27( this, Invocation.method( #enableRbfWithSequence, [nSequence], ), ), - returnValueForMissingStub: _FakeTxBuilder_14( + returnValueForMissingStub: _FakeTxBuilder_27( this, Invocation.method( #enableRbfWithSequence, [nSequence], ), ), - ) as _i3.TxBuilder); + ) as _i2.TxBuilder); @override - _i3.TxBuilder enableRbf() => (super.noSuchMethod( + _i2.TxBuilder enableRbf() => (super.noSuchMethod( Invocation.method( #enableRbf, [], ), - returnValue: _FakeTxBuilder_14( + returnValue: _FakeTxBuilder_27( this, Invocation.method( #enableRbf, [], ), ), - returnValueForMissingStub: _FakeTxBuilder_14( + returnValueForMissingStub: _FakeTxBuilder_27( this, Invocation.method( #enableRbf, [], ), ), - ) as _i3.TxBuilder); + ) as _i2.TxBuilder); @override - _i3.TxBuilder feeAbsolute(BigInt? feeAmount) => (super.noSuchMethod( + _i2.TxBuilder feeAbsolute(BigInt? feeAmount) => (super.noSuchMethod( Invocation.method( #feeAbsolute, [feeAmount], ), - returnValue: _FakeTxBuilder_14( + returnValue: _FakeTxBuilder_27( this, Invocation.method( #feeAbsolute, [feeAmount], ), ), - returnValueForMissingStub: _FakeTxBuilder_14( + returnValueForMissingStub: _FakeTxBuilder_27( this, Invocation.method( #feeAbsolute, [feeAmount], ), ), - ) as _i3.TxBuilder); + ) as _i2.TxBuilder); @override - _i3.TxBuilder feeRate(double? satPerVbyte) => (super.noSuchMethod( + _i2.TxBuilder feeRate(_i2.FeeRate? satPerVbyte) => (super.noSuchMethod( Invocation.method( #feeRate, [satPerVbyte], ), - returnValue: _FakeTxBuilder_14( + returnValue: _FakeTxBuilder_27( this, Invocation.method( #feeRate, [satPerVbyte], ), ), - returnValueForMissingStub: _FakeTxBuilder_14( + returnValueForMissingStub: _FakeTxBuilder_27( this, Invocation.method( #feeRate, [satPerVbyte], ), ), - ) as _i3.TxBuilder); - - @override - _i3.TxBuilder setRecipients(List<_i3.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); + ) as _i2.TxBuilder); @override - _i3.TxBuilder manuallySelectedOnly() => (super.noSuchMethod( + _i2.TxBuilder manuallySelectedOnly() => (super.noSuchMethod( Invocation.method( #manuallySelectedOnly, [], ), - returnValue: _FakeTxBuilder_14( + returnValue: _FakeTxBuilder_27( this, Invocation.method( #manuallySelectedOnly, [], ), ), - returnValueForMissingStub: _FakeTxBuilder_14( + returnValueForMissingStub: _FakeTxBuilder_27( this, Invocation.method( #manuallySelectedOnly, [], ), ), - ) as _i3.TxBuilder); + ) as _i2.TxBuilder); @override - _i3.TxBuilder addUnSpendable(_i3.OutPoint? unSpendable) => + _i2.TxBuilder addUnSpendable(_i2.OutPoint? unSpendable) => (super.noSuchMethod( Invocation.method( #addUnSpendable, [unSpendable], ), - returnValue: _FakeTxBuilder_14( + returnValue: _FakeTxBuilder_27( this, Invocation.method( #addUnSpendable, [unSpendable], ), ), - returnValueForMissingStub: _FakeTxBuilder_14( + returnValueForMissingStub: _FakeTxBuilder_27( this, Invocation.method( #addUnSpendable, [unSpendable], ), ), - ) as _i3.TxBuilder); + ) as _i2.TxBuilder); @override - _i3.TxBuilder onlySpendChange() => (super.noSuchMethod( + _i2.TxBuilder onlySpendChange() => (super.noSuchMethod( Invocation.method( #onlySpendChange, [], ), - returnValue: _FakeTxBuilder_14( + returnValue: _FakeTxBuilder_27( this, Invocation.method( #onlySpendChange, [], ), ), - returnValueForMissingStub: _FakeTxBuilder_14( + returnValueForMissingStub: _FakeTxBuilder_27( this, Invocation.method( #onlySpendChange, [], ), ), - ) as _i3.TxBuilder); + ) as _i2.TxBuilder); @override - _i4.Future<(_i3.PartiallySignedTransaction, _i3.TransactionDetails)> finish( - _i3.Wallet? wallet) => - (super.noSuchMethod( + _i10.Future<_i2.PSBT> finish(_i2.Wallet? wallet) => (super.noSuchMethod( Invocation.method( #finish, [wallet], ), - returnValue: _i4.Future< - (_i3.PartiallySignedTransaction, _i3.TransactionDetails)>.value(( - _FakePartiallySignedTransaction_13( - this, - Invocation.method( - #finish, - [wallet], - ), - ), - _FakeTransactionDetails_15( - this, - Invocation.method( - #finish, - [wallet], - ), - ) + returnValue: _i10.Future<_i2.PSBT>.value(_FakePSBT_5( + this, + Invocation.method( + #finish, + [wallet], + ), )), - returnValueForMissingStub: _i4.Future< - (_i3.PartiallySignedTransaction, _i3.TransactionDetails)>.value(( - _FakePartiallySignedTransaction_13( - this, - Invocation.method( - #finish, - [wallet], - ), - ), - _FakeTransactionDetails_15( - this, - Invocation.method( - #finish, - [wallet], - ), - ) + returnValueForMissingStub: _i10.Future<_i2.PSBT>.value(_FakePSBT_5( + this, + Invocation.method( + #finish, + [wallet], + ), )), - ) as _i4 - .Future<(_i3.PartiallySignedTransaction, _i3.TransactionDetails)>); + ) as _i10.Future<_i2.PSBT>); } -/// A class which mocks [BumpFeeTxBuilder]. +/// A class which mocks [Wallet]. /// /// See the documentation for Mockito's code generation for more information. -class MockBumpFeeTxBuilder extends _i1.Mock implements _i3.BumpFeeTxBuilder { +class MockWallet extends _i1.Mock implements _i2.Wallet { @override - String get txid => (super.noSuchMethod( - Invocation.getter(#txid), - returnValue: _i6.dummyValue( + _i3.MutexPersistedWalletConnection get opaque => (super.noSuchMethod( + Invocation.getter(#opaque), + returnValue: _FakeMutexPersistedWalletConnection_28( this, - Invocation.getter(#txid), + Invocation.getter(#opaque), ), - returnValueForMissingStub: _i6.dummyValue( + returnValueForMissingStub: _FakeMutexPersistedWalletConnection_28( this, - Invocation.getter(#txid), + Invocation.getter(#opaque), ), - ) as String); + ) as _i3.MutexPersistedWalletConnection); @override - double get feeRate => (super.noSuchMethod( - Invocation.getter(#feeRate), - returnValue: 0.0, - returnValueForMissingStub: 0.0, - ) as double); - - @override - _i3.BumpFeeTxBuilder allowShrinking(_i3.Address? address) => + _i2.AddressInfo revealNextAddress( + {required _i2.KeychainKind? keychainKind}) => (super.noSuchMethod( Invocation.method( - #allowShrinking, - [address], + #revealNextAddress, + [], + {#keychainKind: keychainKind}, ), - returnValue: _FakeBumpFeeTxBuilder_16( + returnValue: _FakeAddressInfo_29( this, Invocation.method( - #allowShrinking, - [address], + #revealNextAddress, + [], + {#keychainKind: keychainKind}, ), ), - returnValueForMissingStub: _FakeBumpFeeTxBuilder_16( + returnValueForMissingStub: _FakeAddressInfo_29( this, Invocation.method( - #allowShrinking, - [address], + #revealNextAddress, + [], + {#keychainKind: keychainKind}, ), ), - ) as _i3.BumpFeeTxBuilder); + ) as _i2.AddressInfo); @override - _i3.BumpFeeTxBuilder enableRbf() => (super.noSuchMethod( + _i2.Balance getBalance({dynamic hint}) => (super.noSuchMethod( Invocation.method( - #enableRbf, + #getBalance, [], + {#hint: hint}, ), - returnValue: _FakeBumpFeeTxBuilder_16( + returnValue: _FakeBalance_30( this, Invocation.method( - #enableRbf, + #getBalance, [], + {#hint: hint}, ), ), - returnValueForMissingStub: _FakeBumpFeeTxBuilder_16( + returnValueForMissingStub: _FakeBalance_30( this, Invocation.method( - #enableRbf, + #getBalance, [], + {#hint: hint}, ), ), - ) as _i3.BumpFeeTxBuilder); + ) as _i2.Balance); @override - _i3.BumpFeeTxBuilder enableRbfWithSequence(int? nSequence) => - (super.noSuchMethod( + List<_i2.CanonicalTx> transactions() => (super.noSuchMethod( Invocation.method( - #enableRbfWithSequence, - [nSequence], - ), - returnValue: _FakeBumpFeeTxBuilder_16( - this, - Invocation.method( - #enableRbfWithSequence, - [nSequence], - ), - ), - returnValueForMissingStub: _FakeBumpFeeTxBuilder_16( - this, - Invocation.method( - #enableRbfWithSequence, - [nSequence], - ), + #transactions, + [], ), - ) as _i3.BumpFeeTxBuilder); + returnValue: <_i2.CanonicalTx>[], + returnValueForMissingStub: <_i2.CanonicalTx>[], + ) as List<_i2.CanonicalTx>); @override - _i4.Future<(_i3.PartiallySignedTransaction, _i3.TransactionDetails)> finish( - _i3.Wallet? wallet) => - (super.noSuchMethod( + _i2.CanonicalTx? getTx({required String? txid}) => (super.noSuchMethod( Invocation.method( - #finish, - [wallet], + #getTx, + [], + {#txid: txid}, ), - returnValue: _i4.Future< - (_i3.PartiallySignedTransaction, _i3.TransactionDetails)>.value(( - _FakePartiallySignedTransaction_13( - this, - Invocation.method( - #finish, - [wallet], - ), - ), - _FakeTransactionDetails_15( - this, - Invocation.method( - #finish, - [wallet], - ), - ) - )), - returnValueForMissingStub: _i4.Future< - (_i3.PartiallySignedTransaction, _i3.TransactionDetails)>.value(( - _FakePartiallySignedTransaction_13( - this, - Invocation.method( - #finish, - [wallet], - ), - ), - _FakeTransactionDetails_15( - this, - Invocation.method( - #finish, - [wallet], - ), - ) - )), - ) as _i4 - .Future<(_i3.PartiallySignedTransaction, _i3.TransactionDetails)>); -} + returnValueForMissingStub: null, + ) as _i2.CanonicalTx?); -/// A class which mocks [ScriptBuf]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockScriptBuf extends _i1.Mock implements _i3.ScriptBuf { @override - _i7.Uint8List get bytes => (super.noSuchMethod( - Invocation.getter(#bytes), - returnValue: _i7.Uint8List(0), - returnValueForMissingStub: _i7.Uint8List(0), - ) as _i7.Uint8List); + List<_i2.LocalOutput> listUnspent({dynamic hint}) => (super.noSuchMethod( + Invocation.method( + #listUnspent, + [], + {#hint: hint}, + ), + returnValue: <_i2.LocalOutput>[], + returnValueForMissingStub: <_i2.LocalOutput>[], + ) as List<_i2.LocalOutput>); @override - String asString() => (super.noSuchMethod( + List<_i2.LocalOutput> listOutput() => (super.noSuchMethod( Invocation.method( - #asString, + #listOutput, [], ), - returnValue: _i6.dummyValue( - this, - Invocation.method( - #asString, - [], - ), - ), - returnValueForMissingStub: _i6.dummyValue( - this, - Invocation.method( - #asString, - [], - ), - ), - ) as String); -} + returnValue: <_i2.LocalOutput>[], + returnValueForMissingStub: <_i2.LocalOutput>[], + ) as List<_i2.LocalOutput>); -/// A class which mocks [Address]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockAddress extends _i1.Mock implements _i3.Address { @override - _i2.Address get ptr => (super.noSuchMethod( - Invocation.getter(#ptr), - returnValue: _FakeAddress_17( - this, - Invocation.getter(#ptr), - ), - returnValueForMissingStub: _FakeAddress_17( - this, - Invocation.getter(#ptr), + _i2.Policy? policies(_i2.KeychainKind? keychainKind) => (super.noSuchMethod( + Invocation.method( + #policies, + [keychainKind], ), - ) as _i2.Address); + returnValueForMissingStub: null, + ) as _i2.Policy?); @override - _i3.ScriptBuf scriptPubkey() => (super.noSuchMethod( + _i10.Future sign({ + required _i2.PSBT? psbt, + _i2.SignOptions? signOptions, + }) => + (super.noSuchMethod( Invocation.method( - #scriptPubkey, + #sign, [], + { + #psbt: psbt, + #signOptions: signOptions, + }, ), - returnValue: _FakeScriptBuf_18( - this, - Invocation.method( - #scriptPubkey, - [], - ), - ), - returnValueForMissingStub: _FakeScriptBuf_18( - this, - Invocation.method( - #scriptPubkey, - [], - ), - ), - ) as _i3.ScriptBuf); + returnValue: _i10.Future.value(false), + returnValueForMissingStub: _i10.Future.value(false), + ) as _i10.Future); @override - String toQrUri() => (super.noSuchMethod( + _i10.Future calculateFee({required _i2.Transaction? tx}) => + (super.noSuchMethod( Invocation.method( - #toQrUri, + #calculateFee, [], + {#tx: tx}, ), - returnValue: _i6.dummyValue( + returnValue: _i10.Future.value(_i9.dummyValue( this, Invocation.method( - #toQrUri, + #calculateFee, [], + {#tx: tx}, ), - ), - returnValueForMissingStub: _i6.dummyValue( + )), + returnValueForMissingStub: + _i10.Future.value(_i9.dummyValue( this, Invocation.method( - #toQrUri, + #calculateFee, [], + {#tx: tx}, ), - ), - ) as String); + )), + ) as _i10.Future); @override - bool isValidForNetwork({required _i3.Network? network}) => + _i10.Future<_i2.FeeRate> calculateFeeRate({required _i2.Transaction? tx}) => (super.noSuchMethod( Invocation.method( - #isValidForNetwork, - [], - {#network: network}, - ), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - - @override - _i3.Network network() => (super.noSuchMethod( - Invocation.method( - #network, - [], - ), - returnValue: _i3.Network.testnet, - returnValueForMissingStub: _i3.Network.testnet, - ) as _i3.Network); - - @override - _i3.Payload payload() => (super.noSuchMethod( - Invocation.method( - #payload, + #calculateFeeRate, [], + {#tx: tx}, ), - returnValue: _i6.dummyValue<_i3.Payload>( + returnValue: _i10.Future<_i2.FeeRate>.value(_FakeFeeRate_3( this, Invocation.method( - #payload, + #calculateFeeRate, [], + {#tx: tx}, ), - ), - returnValueForMissingStub: _i6.dummyValue<_i3.Payload>( + )), + returnValueForMissingStub: + _i10.Future<_i2.FeeRate>.value(_FakeFeeRate_3( this, Invocation.method( - #payload, + #calculateFeeRate, [], + {#tx: tx}, ), - ), - ) as _i3.Payload); + )), + ) as _i10.Future<_i2.FeeRate>); @override - String asString() => (super.noSuchMethod( + _i10.Future<_i2.FullScanRequestBuilder> startFullScan() => + (super.noSuchMethod( Invocation.method( - #asString, + #startFullScan, [], ), - returnValue: _i6.dummyValue( + returnValue: _i10.Future<_i2.FullScanRequestBuilder>.value( + _FakeFullScanRequestBuilder_19( this, Invocation.method( - #asString, + #startFullScan, [], ), - ), - returnValueForMissingStub: _i6.dummyValue( + )), + returnValueForMissingStub: + _i10.Future<_i2.FullScanRequestBuilder>.value( + _FakeFullScanRequestBuilder_19( this, Invocation.method( - #asString, + #startFullScan, [], ), - ), - ) as String); -} - -/// A class which mocks [DerivationPath]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockDerivationPath extends _i1.Mock implements _i3.DerivationPath { - @override - _i2.DerivationPath get ptr => (super.noSuchMethod( - Invocation.getter(#ptr), - returnValue: _FakeDerivationPath_19( - this, - Invocation.getter(#ptr), - ), - returnValueForMissingStub: _FakeDerivationPath_19( - this, - Invocation.getter(#ptr), - ), - ) as _i2.DerivationPath); + )), + ) as _i10.Future<_i2.FullScanRequestBuilder>); @override - String asString() => (super.noSuchMethod( + _i10.Future<_i2.SyncRequestBuilder> startSyncWithRevealedSpks() => + (super.noSuchMethod( Invocation.method( - #asString, + #startSyncWithRevealedSpks, [], ), - returnValue: _i6.dummyValue( + returnValue: _i10.Future<_i2.SyncRequestBuilder>.value( + _FakeSyncRequestBuilder_31( this, Invocation.method( - #asString, + #startSyncWithRevealedSpks, [], ), - ), - returnValueForMissingStub: _i6.dummyValue( + )), + returnValueForMissingStub: _i10.Future<_i2.SyncRequestBuilder>.value( + _FakeSyncRequestBuilder_31( this, Invocation.method( - #asString, + #startSyncWithRevealedSpks, [], ), - ), - ) as String); -} - -/// A class which mocks [FeeRate]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockFeeRate extends _i1.Mock implements _i3.FeeRate { - @override - double get satPerVb => (super.noSuchMethod( - Invocation.getter(#satPerVb), - returnValue: 0.0, - returnValueForMissingStub: 0.0, - ) as double); -} + )), + ) as _i10.Future<_i2.SyncRequestBuilder>); -/// A class which mocks [LocalUtxo]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockLocalUtxo extends _i1.Mock implements _i3.LocalUtxo { @override - _i3.OutPoint get outpoint => (super.noSuchMethod( - Invocation.getter(#outpoint), - returnValue: _FakeOutPoint_20( - this, - Invocation.getter(#outpoint), - ), - returnValueForMissingStub: _FakeOutPoint_20( - this, - Invocation.getter(#outpoint), + _i10.Future persist({required _i2.Connection? connection}) => + (super.noSuchMethod( + Invocation.method( + #persist, + [], + {#connection: connection}, ), - ) as _i3.OutPoint); + returnValue: _i10.Future.value(false), + returnValueForMissingStub: _i10.Future.value(false), + ) as _i10.Future); @override - _i3.TxOut get txout => (super.noSuchMethod( - Invocation.getter(#txout), - returnValue: _FakeTxOut_21( - this, - Invocation.getter(#txout), - ), - returnValueForMissingStub: _FakeTxOut_21( - this, - Invocation.getter(#txout), + _i10.Future applyUpdate({required _i7.FfiUpdate? update}) => + (super.noSuchMethod( + Invocation.method( + #applyUpdate, + [], + {#update: update}, ), - ) as _i3.TxOut); - - @override - _i3.KeychainKind get keychain => (super.noSuchMethod( - Invocation.getter(#keychain), - returnValue: _i3.KeychainKind.externalChain, - returnValueForMissingStub: _i3.KeychainKind.externalChain, - ) as _i3.KeychainKind); + returnValue: _i10.Future.value(), + returnValueForMissingStub: _i10.Future.value(), + ) as _i10.Future); @override - bool get isSpent => (super.noSuchMethod( - Invocation.getter(#isSpent), + bool isMine({required _i8.FfiScriptBuf? script}) => (super.noSuchMethod( + Invocation.method( + #isMine, + [], + {#script: script}, + ), returnValue: false, returnValueForMissingStub: false, ) as bool); -} - -/// A class which mocks [TransactionDetails]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockTransactionDetails extends _i1.Mock - implements _i3.TransactionDetails { - @override - String get txid => (super.noSuchMethod( - Invocation.getter(#txid), - returnValue: _i6.dummyValue( - this, - Invocation.getter(#txid), - ), - returnValueForMissingStub: _i6.dummyValue( - this, - Invocation.getter(#txid), - ), - ) as String); @override - BigInt get received => (super.noSuchMethod( - Invocation.getter(#received), - returnValue: _i6.dummyValue( - this, - Invocation.getter(#received), - ), - returnValueForMissingStub: _i6.dummyValue( - this, - Invocation.getter(#received), + _i2.Network network() => (super.noSuchMethod( + Invocation.method( + #network, + [], ), - ) as BigInt); + returnValue: _i2.Network.testnet, + returnValueForMissingStub: _i2.Network.testnet, + ) as _i2.Network); +} +/// A class which mocks [Update]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockUpdate extends _i1.Mock implements _i2.Update { @override - BigInt get sent => (super.noSuchMethod( - Invocation.getter(#sent), - returnValue: _i6.dummyValue( + _i6.Update get field0 => (super.noSuchMethod( + Invocation.getter(#field0), + returnValue: _FakeUpdate_32( this, - Invocation.getter(#sent), + Invocation.getter(#field0), ), - returnValueForMissingStub: _i6.dummyValue( + returnValueForMissingStub: _FakeUpdate_32( this, - Invocation.getter(#sent), + Invocation.getter(#field0), ), - ) as BigInt); + ) as _i6.Update); }